diff --git a/composer.lock b/composer.lock
index a2dfacc..cc71d26 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "dd60f002b07aecc895bd1d3bc6fcb257",
+ "content-hash": "f23a244e1074b81f923db1e36b4a521d",
"packages": [
{
"name": "kigkonsult/icalcreator",
@@ -115,16 +115,16 @@
},
{
"name": "phpmailer/phpmailer",
- "version": "v6.9.1",
+ "version": "v6.9.3",
"source": {
"type": "git",
"url": "https://github.com/PHPMailer/PHPMailer.git",
- "reference": "039de174cd9c17a8389754d3b877a2ed22743e18"
+ "reference": "2f5c94fe7493efc213f643c23b1b1c249d40f47e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/039de174cd9c17a8389754d3b877a2ed22743e18",
- "reference": "039de174cd9c17a8389754d3b877a2ed22743e18",
+ "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/2f5c94fe7493efc213f643c23b1b1c249d40f47e",
+ "reference": "2f5c94fe7493efc213f643c23b1b1c249d40f47e",
"shasum": ""
},
"require": {
@@ -184,7 +184,7 @@
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
"support": {
"issues": "https://github.com/PHPMailer/PHPMailer/issues",
- "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.9.1"
+ "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.9.3"
},
"funding": [
{
@@ -192,7 +192,7 @@
"type": "github"
}
],
- "time": "2023-11-25T22:23:28+00:00"
+ "time": "2024-11-24T18:04:13+00:00"
},
{
"name": "psr/log",
@@ -246,25 +246,24 @@
},
{
"name": "twilio/sdk",
- "version": "5.42.2",
+ "version": "8.3.8",
"source": {
"type": "git",
"url": "https://github.com/twilio/twilio-php.git",
- "reference": "0cfcb871b18a9c427dd9e8f0ed7458d43009b48a"
+ "reference": "d05c08d0b9ed017f61ebbc31bc4e5f4d758a0326"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/twilio/twilio-php/zipball/0cfcb871b18a9c427dd9e8f0ed7458d43009b48a",
- "reference": "0cfcb871b18a9c427dd9e8f0ed7458d43009b48a",
+ "url": "https://api.github.com/repos/twilio/twilio-php/zipball/d05c08d0b9ed017f61ebbc31bc4e5f4d758a0326",
+ "reference": "d05c08d0b9ed017f61ebbc31bc4e5f4d758a0326",
"shasum": ""
},
"require": {
- "php": ">=5.5.0"
+ "php": ">=7.1.0"
},
"require-dev": {
- "apigen/apigen": "^4.1",
- "guzzlehttp/guzzle": "^6.3",
- "phpunit/phpunit": ">=4.5"
+ "guzzlehttp/guzzle": "^6.3 || ^7.0",
+ "phpunit/phpunit": ">=7.0 < 10"
},
"suggest": {
"guzzlehttp/guzzle": "An HTTP client to execute the API requests"
@@ -286,7 +285,7 @@
}
],
"description": "A PHP wrapper for Twilio's API",
- "homepage": "http://github.com/twilio/twilio-php",
+ "homepage": "https://github.com/twilio/twilio-php",
"keywords": [
"api",
"sms",
@@ -294,18 +293,18 @@
],
"support": {
"issues": "https://github.com/twilio/twilio-php/issues",
- "source": "https://github.com/twilio/twilio-php/tree/5.42.2"
+ "source": "https://github.com/twilio/twilio-php/tree/8.3.8"
},
- "time": "2020-02-05T19:55:13+00:00"
+ "time": "2024-11-15T07:19:40+00:00"
}
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
- "stability-flags": [],
+ "stability-flags": {},
"prefer-stable": false,
"prefer-lowest": false,
- "platform": [],
- "platform-dev": [],
+ "platform": {},
+ "platform-dev": {},
"plugin-api-version": "2.6.0"
}
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index fa1573a..98a2e93 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -112,17 +112,17 @@
},
{
"name": "phpmailer/phpmailer",
- "version": "v6.9.1",
- "version_normalized": "6.9.1.0",
+ "version": "v6.9.3",
+ "version_normalized": "6.9.3.0",
"source": {
"type": "git",
"url": "https://github.com/PHPMailer/PHPMailer.git",
- "reference": "039de174cd9c17a8389754d3b877a2ed22743e18"
+ "reference": "2f5c94fe7493efc213f643c23b1b1c249d40f47e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/039de174cd9c17a8389754d3b877a2ed22743e18",
- "reference": "039de174cd9c17a8389754d3b877a2ed22743e18",
+ "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/2f5c94fe7493efc213f643c23b1b1c249d40f47e",
+ "reference": "2f5c94fe7493efc213f643c23b1b1c249d40f47e",
"shasum": ""
},
"require": {
@@ -152,7 +152,7 @@
"symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)",
"thenetworg/oauth2-azure": "Needed for Microsoft XOAUTH2 authentication"
},
- "time": "2023-11-25T22:23:28+00:00",
+ "time": "2024-11-24T18:04:13+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -184,7 +184,7 @@
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
"support": {
"issues": "https://github.com/PHPMailer/PHPMailer/issues",
- "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.9.1"
+ "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.9.3"
},
"funding": [
{
@@ -249,31 +249,30 @@
},
{
"name": "twilio/sdk",
- "version": "5.42.2",
- "version_normalized": "5.42.2.0",
+ "version": "8.3.8",
+ "version_normalized": "8.3.8.0",
"source": {
"type": "git",
"url": "https://github.com/twilio/twilio-php.git",
- "reference": "0cfcb871b18a9c427dd9e8f0ed7458d43009b48a"
+ "reference": "d05c08d0b9ed017f61ebbc31bc4e5f4d758a0326"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/twilio/twilio-php/zipball/0cfcb871b18a9c427dd9e8f0ed7458d43009b48a",
- "reference": "0cfcb871b18a9c427dd9e8f0ed7458d43009b48a",
+ "url": "https://api.github.com/repos/twilio/twilio-php/zipball/d05c08d0b9ed017f61ebbc31bc4e5f4d758a0326",
+ "reference": "d05c08d0b9ed017f61ebbc31bc4e5f4d758a0326",
"shasum": ""
},
"require": {
- "php": ">=5.5.0"
+ "php": ">=7.1.0"
},
"require-dev": {
- "apigen/apigen": "^4.1",
- "guzzlehttp/guzzle": "^6.3",
- "phpunit/phpunit": ">=4.5"
+ "guzzlehttp/guzzle": "^6.3 || ^7.0",
+ "phpunit/phpunit": ">=7.0 < 10"
},
"suggest": {
"guzzlehttp/guzzle": "An HTTP client to execute the API requests"
},
- "time": "2020-02-05T19:55:13+00:00",
+ "time": "2024-11-15T07:19:40+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -292,7 +291,7 @@
}
],
"description": "A PHP wrapper for Twilio's API",
- "homepage": "http://github.com/twilio/twilio-php",
+ "homepage": "https://github.com/twilio/twilio-php",
"keywords": [
"api",
"sms",
@@ -300,7 +299,7 @@
],
"support": {
"issues": "https://github.com/twilio/twilio-php/issues",
- "source": "https://github.com/twilio/twilio-php/tree/5.42.2"
+ "source": "https://github.com/twilio/twilio-php/tree/8.3.8"
},
"install-path": "../twilio/sdk"
}
diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php
index 8713e6f..5266e5e 100644
--- a/vendor/composer/installed.php
+++ b/vendor/composer/installed.php
@@ -3,7 +3,7 @@
'name' => '__root__',
'pretty_version' => 'dev-main',
'version' => 'dev-main',
- 'reference' => 'd9db0af898bd120a958867d6bd0fe512d8f4bcbd',
+ 'reference' => '4460cb29380fb6f97a573de15792a5be269fdb0c',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -13,7 +13,7 @@
'__root__' => array(
'pretty_version' => 'dev-main',
'version' => 'dev-main',
- 'reference' => 'd9db0af898bd120a958867d6bd0fe512d8f4bcbd',
+ 'reference' => '4460cb29380fb6f97a573de15792a5be269fdb0c',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -29,9 +29,9 @@
'dev_requirement' => false,
),
'phpmailer/phpmailer' => array(
- 'pretty_version' => 'v6.9.1',
- 'version' => '6.9.1.0',
- 'reference' => '039de174cd9c17a8389754d3b877a2ed22743e18',
+ 'pretty_version' => 'v6.9.3',
+ 'version' => '6.9.3.0',
+ 'reference' => '2f5c94fe7493efc213f643c23b1b1c249d40f47e',
'type' => 'library',
'install_path' => __DIR__ . '/../phpmailer/phpmailer',
'aliases' => array(),
@@ -47,9 +47,9 @@
'dev_requirement' => false,
),
'twilio/sdk' => array(
- 'pretty_version' => '5.42.2',
- 'version' => '5.42.2.0',
- 'reference' => '0cfcb871b18a9c427dd9e8f0ed7458d43009b48a',
+ 'pretty_version' => '8.3.8',
+ 'version' => '8.3.8.0',
+ 'reference' => 'd05c08d0b9ed017f61ebbc31bc4e5f4d758a0326',
'type' => 'library',
'install_path' => __DIR__ . '/../twilio/sdk',
'aliases' => array(),
diff --git a/vendor/phpmailer/phpmailer/README.md b/vendor/phpmailer/phpmailer/README.md
index e3e4ecf..07fe8c8 100644
--- a/vendor/phpmailer/phpmailer/README.md
+++ b/vendor/phpmailer/phpmailer/README.md
@@ -41,13 +41,13 @@ you should look at before rolling your own. Try [SwiftMailer](https://swiftmaile
, [Laminas/Mail](https://docs.laminas.dev/laminas-mail/), [ZetaComponents](https://github.com/zetacomponents/Mail), etc.
## License
-This software is distributed under the [LGPL 2.1](http://www.gnu.org/licenses/lgpl-2.1.html) license, along with the [GPL Cooperation Commitment](https://gplcc.github.io/gplcc/). Please read [LICENSE](https://github.com/PHPMailer/PHPMailer/blob/master/LICENSE) for information on the software availability and distribution.
+This software is distributed under the [LGPL 2.1](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html) license, along with the [GPL Cooperation Commitment](https://gplcc.github.io/gplcc/). Please read [LICENSE](https://github.com/PHPMailer/PHPMailer/blob/master/LICENSE) for information on the software availability and distribution.
## Installation & loading
PHPMailer is available on [Packagist](https://packagist.org/packages/phpmailer/phpmailer) (using semantic versioning), and installation via [Composer](https://getcomposer.org) is the recommended way to install PHPMailer. Just add this line to your `composer.json` file:
```json
-"phpmailer/phpmailer": "^6.9.1"
+"phpmailer/phpmailer": "^6.9.2"
```
or run
@@ -144,7 +144,7 @@ If you are re-using the instance (e.g. when sending to a mailing list), you may
That's it. You should now be ready to use PHPMailer!
## Localization
-PHPMailer defaults to English, but in the [language](https://github.com/PHPMailer/PHPMailer/tree/master/language/) folder, you'll find many translations for PHPMailer error messages that you may encounter. Their filenames contain [ISO 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the translations, for example `fr` for French. To specify a language, you need to tell PHPMailer which one to use, like this:
+PHPMailer defaults to English, but in the [language](https://github.com/PHPMailer/PHPMailer/tree/master/language/) folder, you'll find many translations for PHPMailer error messages that you may encounter. Their filenames contain [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) language code for the translations, for example `fr` for French. To specify a language, you need to tell PHPMailer which one to use, like this:
```php
//To load the French version
@@ -162,9 +162,9 @@ To reduce PHPMailer's deployed code footprint, examples are not included if you
Complete generated API documentation is [available online](https://phpmailer.github.io/PHPMailer/).
-You can generate complete API-level documentation by running `phpdoc` in the top-level folder, and documentation will appear in the `docs` folder, though you'll need to have [PHPDocumentor](http://www.phpdoc.org) installed. You may find [the unit tests](https://github.com/PHPMailer/PHPMailer/blob/master/test/PHPMailerTest.php) a good reference for how to do various operations such as encryption.
+You can generate complete API-level documentation by running `phpdoc` in the top-level folder, and documentation will appear in the `docs` folder, though you'll need to have [PHPDocumentor](https://www.phpdoc.org) installed. You may find [the unit tests](https://github.com/PHPMailer/PHPMailer/blob/master/test/PHPMailer/PHPMailerTest.php) a good reference for how to do various operations such as encryption.
-If the documentation doesn't cover what you need, search the [many questions on Stack Overflow](http://stackoverflow.com/questions/tagged/phpmailer), and before you ask a question about "SMTP Error: Could not connect to SMTP host.", [read the troubleshooting guide](https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting).
+If the documentation doesn't cover what you need, search the [many questions on Stack Overflow](https://stackoverflow.com/questions/tagged/phpmailer), and before you ask a question about "SMTP Error: Could not connect to SMTP host.", [read the troubleshooting guide](https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting).
## Tests
[PHPMailer tests](https://github.com/PHPMailer/PHPMailer/tree/master/test/) use PHPUnit 9, with [a polyfill](https://github.com/Yoast/PHPUnit-Polyfills) to let 9-style tests run on older PHPUnit and PHP versions.
@@ -213,7 +213,7 @@ use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-phpmailer-php
See [changelog](changelog.md).
## History
-- PHPMailer was originally written in 2001 by Brent R. Matzelle as a [SourceForge project](http://sourceforge.net/projects/phpmailer/).
+- PHPMailer was originally written in 2001 by Brent R. Matzelle as a [SourceForge project](https://sourceforge.net/projects/phpmailer/).
- [Marcus Bointon](https://github.com/Synchro) (`coolbru` on SF) and Andy Prevost (`codeworxtech`) took over the project in 2004.
- Became an Apache incubator project on Google Code in 2010, managed by Jim Jagielski.
- Marcus created [his fork on GitHub](https://github.com/Synchro/PHPMailer) in 2008.
diff --git a/vendor/phpmailer/phpmailer/SECURITY.md b/vendor/phpmailer/phpmailer/SECURITY.md
index 035a87f..4f34026 100644
--- a/vendor/phpmailer/phpmailer/SECURITY.md
+++ b/vendor/phpmailer/phpmailer/SECURITY.md
@@ -13,13 +13,13 @@ PHPMailer versions 6.1.5 and earlier contain an output escaping bug that occurs
PHPMailer versions prior to 6.0.6 and 5.2.27 are vulnerable to an object injection attack by passing `phar://` paths into `addAttachment()` and other functions that may receive unfiltered local paths, possibly leading to RCE. Recorded as [CVE-2018-19296](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2018-19296). See [this article](https://knasmueller.net/5-answers-about-php-phar-exploitation) for more info on this type of vulnerability. Mitigated by blocking the use of paths containing URL-protocol style prefixes such as `phar://`. Reported by Sehun Oh of cyberone.kr.
-PHPMailer versions prior to 5.2.24 (released July 26th 2017) have an XSS vulnerability in one of the code examples, [CVE-2017-11503](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-11503). The `code_generator.phps` example did not filter user input prior to output. This file is distributed with a `.phps` extension, so it it not normally executable unless it is explicitly renamed, and the file is not included when PHPMailer is loaded through composer, so it is safe by default. There was also an undisclosed potential XSS vulnerability in the default exception handler (unused by default). Patches for both issues kindly provided by Patrick Monnerat of the Fedora Project.
+PHPMailer versions prior to 5.2.24 (released July 26th 2017) have an XSS vulnerability in one of the code examples, [CVE-2017-11503](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-11503). The `code_generator.phps` example did not filter user input prior to output. This file is distributed with a `.phps` extension, so it is not normally executable unless it is explicitly renamed, and the file is not included when PHPMailer is loaded through composer, so it is safe by default. There was also an undisclosed potential XSS vulnerability in the default exception handler (unused by default). Patches for both issues kindly provided by Patrick Monnerat of the Fedora Project.
PHPMailer versions prior to 5.2.22 (released January 9th 2017) have a local file disclosure vulnerability, [CVE-2017-5223](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-5223). If content passed into `msgHTML()` is sourced from unfiltered user input, relative paths can map to absolute local file paths and added as attachments. Also note that `addAttachment` (just like `file_get_contents`, `passthru`, `unlink`, etc) should not be passed user-sourced params either! Reported by Yongxiang Li of Asiasecurity.
PHPMailer versions prior to 5.2.20 (released December 28th 2016) are vulnerable to [CVE-2016-10045](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-10045) a remote code execution vulnerability, responsibly reported by [Dawid Golunski](https://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10045-Vuln-Patch-Bypass.html), and patched by Paul Buonopane (@Zenexer).
-PHPMailer versions prior to 5.2.18 (released December 2016) are vulnerable to [CVE-2016-10033](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-10033) a remote code execution vulnerability, responsibly reported by [Dawid Golunski](http://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10033-Vuln.html).
+PHPMailer versions prior to 5.2.18 (released December 2016) are vulnerable to [CVE-2016-10033](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-10033) a remote code execution vulnerability, responsibly reported by [Dawid Golunski](https://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10033-Vuln.html).
PHPMailer versions prior to 5.2.14 (released November 2015) are vulnerable to [CVE-2015-8476](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2015-8476) an SMTP CRLF injection bug permitting arbitrary message sending.
diff --git a/vendor/phpmailer/phpmailer/VERSION b/vendor/phpmailer/phpmailer/VERSION
index dc3829f..5f54f91 100644
--- a/vendor/phpmailer/phpmailer/VERSION
+++ b/vendor/phpmailer/phpmailer/VERSION
@@ -1 +1 @@
-6.9.1
+6.9.3
diff --git a/vendor/phpmailer/phpmailer/composer.json b/vendor/phpmailer/phpmailer/composer.json
index fa170a0..7b008b7 100644
--- a/vendor/phpmailer/phpmailer/composer.json
+++ b/vendor/phpmailer/phpmailer/composer.json
@@ -28,7 +28,8 @@
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
- }
+ },
+ "lock": false
},
"require": {
"php": ">=5.5.0",
diff --git a/vendor/phpmailer/phpmailer/get_oauth_token.php b/vendor/phpmailer/phpmailer/get_oauth_token.php
index cda0445..0e54a00 100644
--- a/vendor/phpmailer/phpmailer/get_oauth_token.php
+++ b/vendor/phpmailer/phpmailer/get_oauth_token.php
@@ -12,7 +12,7 @@
* @copyright 2012 - 2020 Marcus Bointon
* @copyright 2010 - 2012 Jim Jagielski
* @copyright 2004 - 2009 Andy Prevost
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
+ * @license https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU Lesser General Public License
* @note This program is distributed in the hope that it will be useful - WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
@@ -36,7 +36,7 @@
* Aliases for League Provider Classes
* Make sure you have added these to your composer.json and run `composer install`
* Plenty to choose from here:
- * @see http://oauth2-client.thephpleague.com/providers/thirdparty/
+ * @see https://oauth2-client.thephpleague.com/providers/thirdparty/
*/
//@see https://github.com/thephpleague/oauth2-google
use League\OAuth2\Client\Provider\Google;
@@ -178,5 +178,5 @@
);
//Use this to interact with an API on the users behalf
//Use this to get a new access token if the old one expires
- echo 'Refresh Token: ', $token->getRefreshToken();
+ echo 'Refresh Token: ', htmlspecialchars($token->getRefreshToken());
}
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-es.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-es.php
index 6992041..4e74bfb 100644
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-es.php
+++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-es.php
@@ -5,27 +5,32 @@
* @package PHPMailer
* @author Matt Sturdy
* @author Crystopher Glodzienski Cardoso
+ * @author Daniel Cruz
*/
$PHPMAILER_LANG['authenticate'] = 'Error SMTP: Imposible autentificar.';
+$PHPMAILER_LANG['buggy_php'] = 'Tu versión de PHP está afectada por un bug que puede resultar en mensajes corruptos. Para arreglarlo, cambia a enviar usando SMTP, deshabilita la opción mail.add_x_header en tu php.ini, cambia a MacOS o Linux, o actualiza tu PHP a la versión 7.0.17+ o 7.1.3+.';
$PHPMAILER_LANG['connect_host'] = 'Error SMTP: Imposible conectar al servidor SMTP.';
$PHPMAILER_LANG['data_not_accepted'] = 'Error SMTP: Datos no aceptados.';
$PHPMAILER_LANG['empty_message'] = 'El cuerpo del mensaje está vacío.';
$PHPMAILER_LANG['encoding'] = 'Codificación desconocida: ';
$PHPMAILER_LANG['execute'] = 'Imposible ejecutar: ';
+$PHPMAILER_LANG['extension_missing'] = 'Extensión faltante: ';
$PHPMAILER_LANG['file_access'] = 'Imposible acceder al archivo: ';
$PHPMAILER_LANG['file_open'] = 'Error de Archivo: Imposible abrir el archivo: ';
$PHPMAILER_LANG['from_failed'] = 'La(s) siguiente(s) direcciones de remitente fallaron: ';
$PHPMAILER_LANG['instantiate'] = 'Imposible crear una instancia de la función Mail.';
$PHPMAILER_LANG['invalid_address'] = 'Imposible enviar: dirección de email inválido: ';
+$PHPMAILER_LANG['invalid_header'] = 'Nombre o valor de encabezado no válido';
+$PHPMAILER_LANG['invalid_hostentry'] = 'Hostentry inválido: ';
+$PHPMAILER_LANG['invalid_host'] = 'Host inválido: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer no está soportado.';
$PHPMAILER_LANG['provide_address'] = 'Debe proporcionar al menos una dirección de email de destino.';
$PHPMAILER_LANG['recipients_failed'] = 'Error SMTP: Los siguientes destinos fallaron: ';
$PHPMAILER_LANG['signing'] = 'Error al firmar: ';
+$PHPMAILER_LANG['smtp_code'] = 'Código del servidor SMTP: ';
+$PHPMAILER_LANG['smtp_code_ex'] = 'Información adicional del servidor SMTP: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falló.';
+$PHPMAILER_LANG['smtp_detail'] = 'Detalle: ';
$PHPMAILER_LANG['smtp_error'] = 'Error del servidor SMTP: ';
$PHPMAILER_LANG['variable_set'] = 'No se pudo configurar la variable: ';
-$PHPMAILER_LANG['extension_missing'] = 'Extensión faltante: ';
-$PHPMAILER_LANG['smtp_code'] = 'Código del servidor SMTP: ';
-$PHPMAILER_LANG['smtp_code_ex'] = 'Información adicional del servidor SMTP: ';
-$PHPMAILER_LANG['invalid_header'] = 'Nombre o valor de encabezado no válido';
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php
index 0d367fc..a6d582d 100644
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php
+++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php
@@ -6,7 +6,6 @@
* Some French punctuation requires a thin non-breaking space (U+202F) character before it,
* for example before a colon or exclamation mark.
* There is one of these characters between these quotes: " "
- * @see http://unicode.org/udhr/n/notes_fra.html
*/
$PHPMAILER_LANG['authenticate'] = 'Erreur SMTP : échec de l’authentification.';
@@ -31,7 +30,7 @@
$PHPMAILER_LANG['signing'] = 'Erreur de signature : ';
$PHPMAILER_LANG['smtp_code'] = 'Code SMTP : ';
$PHPMAILER_LANG['smtp_code_ex'] = 'Informations supplémentaires SMTP : ';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'La fonction SMTP connect() a échouée.';
+$PHPMAILER_LANG['smtp_connect_failed'] = 'La fonction SMTP connect() a échoué.';
$PHPMAILER_LANG['smtp_detail'] = 'Détails : ';
$PHPMAILER_LANG['smtp_error'] = 'Erreur du serveur SMTP : ';
$PHPMAILER_LANG['variable_set'] = 'Impossible d’initialiser ou de réinitialiser une variable : ';
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ja.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ja.php
index c76f526..d01869c 100644
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ja.php
+++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ja.php
@@ -3,27 +3,35 @@
/**
* Japanese PHPMailer language file: refer to English translation for definitive list
* @package PHPMailer
- * @author Mitsuhiro Yoshida
+ * @author Mitsuhiro Yoshida
* @author Yoshi Sakai
* @author Arisophy
+ * @author ARAKI Musashi
*/
$PHPMAILER_LANG['authenticate'] = 'SMTPエラー: 認証できませんでした。';
+$PHPMAILER_LANG['buggy_php'] = 'ご利用のバージョンのPHPには不具合があり、メッセージが破損するおそれがあります。問題の解決は以下のいずれかを行ってください。SMTPでの送信に切り替える。php.iniのmail.add_x_headerをoffにする。MacOSまたはLinuxに切り替える。PHPバージョン7.0.17以降または7.1.3以降にアップグレードする。';
$PHPMAILER_LANG['connect_host'] = 'SMTPエラー: SMTPホストに接続できませんでした。';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTPエラー: データが受け付けられませんでした。';
$PHPMAILER_LANG['empty_message'] = 'メール本文が空です。';
$PHPMAILER_LANG['encoding'] = '不明なエンコーディング: ';
$PHPMAILER_LANG['execute'] = '実行できませんでした: ';
+$PHPMAILER_LANG['extension_missing'] = '拡張機能が見つかりません: ';
$PHPMAILER_LANG['file_access'] = 'ファイルにアクセスできません: ';
$PHPMAILER_LANG['file_open'] = 'ファイルエラー: ファイルを開けません: ';
$PHPMAILER_LANG['from_failed'] = 'Fromアドレスを登録する際にエラーが発生しました: ';
$PHPMAILER_LANG['instantiate'] = 'メール関数が正常に動作しませんでした。';
$PHPMAILER_LANG['invalid_address'] = '不正なメールアドレス: ';
-$PHPMAILER_LANG['provide_address'] = '少なくとも1つメールアドレスを 指定する必要があります。';
+$PHPMAILER_LANG['invalid_header'] = '不正なヘッダー名またはその内容';
+$PHPMAILER_LANG['invalid_hostentry'] = '不正なホストエントリー: ';
+$PHPMAILER_LANG['invalid_host'] = '不正なホスト: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' メーラーがサポートされていません。';
+$PHPMAILER_LANG['provide_address'] = '少なくとも1つメールアドレスを 指定する必要があります。';
$PHPMAILER_LANG['recipients_failed'] = 'SMTPエラー: 次の受信者アドレスに 間違いがあります: ';
$PHPMAILER_LANG['signing'] = '署名エラー: ';
+$PHPMAILER_LANG['smtp_code'] = 'SMTPコード: ';
+$PHPMAILER_LANG['smtp_code_ex'] = 'SMTP追加情報: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP接続に失敗しました。';
+$PHPMAILER_LANG['smtp_detail'] = '詳細: ';
$PHPMAILER_LANG['smtp_error'] = 'SMTPサーバーエラー: ';
$PHPMAILER_LANG['variable_set'] = '変数が存在しません: ';
-$PHPMAILER_LANG['extension_missing'] = '拡張機能が見つかりません: ';
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ru.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ru.php
index 8c8c5e8..8013f37 100644
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ru.php
+++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ru.php
@@ -5,24 +5,32 @@
* @package PHPMailer
* @author Alexey Chumakov
* @author Foster Snowhill
+ * @author ProjectSoft
*/
-$PHPMAILER_LANG['authenticate'] = 'Ошибка SMTP: ошибка авторизации.';
+$PHPMAILER_LANG['authenticate'] = 'Ошибка SMTP: не удалось пройти аутентификацию.';
+$PHPMAILER_LANG['buggy_php'] = 'В вашей версии PHP есть ошибка, которая может привести к повреждению сообщений. Чтобы исправить, переключитесь на отправку по SMTP, отключите опцию mail.add_x_header в ваш php.ini, переключитесь на MacOS или Linux или обновите PHP до версии 7.0.17+ или 7.1.3+.';
$PHPMAILER_LANG['connect_host'] = 'Ошибка SMTP: не удается подключиться к SMTP-серверу.';
$PHPMAILER_LANG['data_not_accepted'] = 'Ошибка SMTP: данные не приняты.';
+$PHPMAILER_LANG['empty_message'] = 'Пустое сообщение';
$PHPMAILER_LANG['encoding'] = 'Неизвестная кодировка: ';
$PHPMAILER_LANG['execute'] = 'Невозможно выполнить команду: ';
+$PHPMAILER_LANG['extension_missing'] = 'Расширение отсутствует: ';
$PHPMAILER_LANG['file_access'] = 'Нет доступа к файлу: ';
$PHPMAILER_LANG['file_open'] = 'Файловая ошибка: не удаётся открыть файл: ';
$PHPMAILER_LANG['from_failed'] = 'Неверный адрес отправителя: ';
$PHPMAILER_LANG['instantiate'] = 'Невозможно запустить функцию mail().';
-$PHPMAILER_LANG['provide_address'] = 'Пожалуйста, введите хотя бы один email-адрес получателя.';
-$PHPMAILER_LANG['mailer_not_supported'] = ' — почтовый сервер не поддерживается.';
-$PHPMAILER_LANG['recipients_failed'] = 'Ошибка SMTP: не удалась отправка таким адресатам: ';
-$PHPMAILER_LANG['empty_message'] = 'Пустое сообщение';
$PHPMAILER_LANG['invalid_address'] = 'Не отправлено из-за неправильного формата email-адреса: ';
+$PHPMAILER_LANG['invalid_header'] = 'Неверное имя или значение заголовка';
+$PHPMAILER_LANG['invalid_hostentry'] = 'Неверная запись хоста: ';
+$PHPMAILER_LANG['invalid_host'] = 'Неверный хост: ';
+$PHPMAILER_LANG['mailer_not_supported'] = ' — почтовый сервер не поддерживается.';
+$PHPMAILER_LANG['provide_address'] = 'Вы должны указать хотя бы один адрес электронной почты получателя.';
+$PHPMAILER_LANG['recipients_failed'] = 'Ошибка SMTP: Ошибка следующих получателей: ';
$PHPMAILER_LANG['signing'] = 'Ошибка подписи: ';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'Ошибка соединения с SMTP-сервером';
+$PHPMAILER_LANG['smtp_code'] = 'Код SMTP: ';
+$PHPMAILER_LANG['smtp_code_ex'] = 'Дополнительная информация SMTP: ';
+$PHPMAILER_LANG['smtp_connect_failed'] = 'Ошибка соединения с SMTP-сервером.';
+$PHPMAILER_LANG['smtp_detail'] = 'Детали: ';
$PHPMAILER_LANG['smtp_error'] = 'Ошибка SMTP-сервера: ';
$PHPMAILER_LANG['variable_set'] = 'Невозможно установить или сбросить переменную: ';
-$PHPMAILER_LANG['extension_missing'] = 'Расширение отсутствует: ';
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-tr.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-tr.php
index f938f80..3c45bc1 100644
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-tr.php
+++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-tr.php
@@ -11,21 +11,28 @@
*/
$PHPMAILER_LANG['authenticate'] = 'SMTP Hatası: Oturum açılamadı.';
+$PHPMAILER_LANG['buggy_php'] = 'PHP sürümünüz iletilerin bozulmasına neden olabilecek bir hatadan etkileniyor. Bunu düzeltmek için, SMTP kullanarak göndermeye geçin, mail.add_x_header seçeneğini devre dışı bırakın php.ini dosyanızdaki mail.add_x_header seçeneğini devre dışı bırakın, MacOS veya Linux geçin veya PHP sürümünü 7.0.17+ veya 7.1.3+ sürümüne yükseltin,';
$PHPMAILER_LANG['connect_host'] = 'SMTP Hatası: SMTP sunucusuna bağlanılamadı.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Hatası: Veri kabul edilmedi.';
$PHPMAILER_LANG['empty_message'] = 'Mesajın içeriği boş';
$PHPMAILER_LANG['encoding'] = 'Bilinmeyen karakter kodlama: ';
$PHPMAILER_LANG['execute'] = 'Çalıştırılamadı: ';
+$PHPMAILER_LANG['extension_missing'] = 'Eklenti bulunamadı: ';
$PHPMAILER_LANG['file_access'] = 'Dosyaya erişilemedi: ';
$PHPMAILER_LANG['file_open'] = 'Dosya Hatası: Dosya açılamadı: ';
$PHPMAILER_LANG['from_failed'] = 'Belirtilen adreslere gönderme başarısız: ';
$PHPMAILER_LANG['instantiate'] = 'Örnek e-posta fonksiyonu oluşturulamadı.';
$PHPMAILER_LANG['invalid_address'] = 'Geçersiz e-posta adresi: ';
+$PHPMAILER_LANG['invalid_header'] = 'Geçersiz başlık adı veya değeri: ';
+$PHPMAILER_LANG['invalid_hostentry'] = 'Geçersiz ana bilgisayar girişi: ';
+$PHPMAILER_LANG['invalid_host'] = 'Geçersiz ana bilgisayar: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' e-posta kütüphanesi desteklenmiyor.';
$PHPMAILER_LANG['provide_address'] = 'En az bir alıcı e-posta adresi belirtmelisiniz.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Hatası: Belirtilen alıcılara ulaşılamadı: ';
$PHPMAILER_LANG['signing'] = 'İmzalama hatası: ';
+$PHPMAILER_LANG['smtp_code'] = 'SMTP kodu: ';
+$PHPMAILER_LANG['smtp_code_ex'] = 'ek SMTP bilgileri: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP connect() fonksiyonu başarısız.';
+$PHPMAILER_LANG['smtp_detail'] = 'SMTP SMTP Detayı: ';
$PHPMAILER_LANG['smtp_error'] = 'SMTP sunucu hatası: ';
$PHPMAILER_LANG['variable_set'] = 'Değişken ayarlanamadı ya da sıfırlanamadı: ';
-$PHPMAILER_LANG['extension_missing'] = 'Eklenti bulunamadı: ';
diff --git a/vendor/phpmailer/phpmailer/src/Exception.php b/vendor/phpmailer/phpmailer/src/Exception.php
index 52eaf95..09c1a2c 100644
--- a/vendor/phpmailer/phpmailer/src/Exception.php
+++ b/vendor/phpmailer/phpmailer/src/Exception.php
@@ -13,7 +13,7 @@
* @copyright 2012 - 2020 Marcus Bointon
* @copyright 2010 - 2012 Jim Jagielski
* @copyright 2004 - 2009 Andy Prevost
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
+ * @license https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU Lesser General Public License
* @note This program is distributed in the hope that it will be useful - WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/vendor/phpmailer/phpmailer/src/OAuth.php b/vendor/phpmailer/phpmailer/src/OAuth.php
index c1d5b77..a7e9588 100644
--- a/vendor/phpmailer/phpmailer/src/OAuth.php
+++ b/vendor/phpmailer/phpmailer/src/OAuth.php
@@ -13,7 +13,7 @@
* @copyright 2012 - 2020 Marcus Bointon
* @copyright 2010 - 2012 Jim Jagielski
* @copyright 2004 - 2009 Andy Prevost
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
+ * @license https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU Lesser General Public License
* @note This program is distributed in the hope that it will be useful - WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
@@ -29,7 +29,7 @@
* OAuth - OAuth2 authentication wrapper class.
* Uses the oauth2-client package from the League of Extraordinary Packages.
*
- * @see http://oauth2-client.thephpleague.com
+ * @see https://oauth2-client.thephpleague.com
*
* @author Marcus Bointon (Synchro/coolbru)
*/
diff --git a/vendor/phpmailer/phpmailer/src/OAuthTokenProvider.php b/vendor/phpmailer/phpmailer/src/OAuthTokenProvider.php
index 1155507..cbda1a1 100644
--- a/vendor/phpmailer/phpmailer/src/OAuthTokenProvider.php
+++ b/vendor/phpmailer/phpmailer/src/OAuthTokenProvider.php
@@ -13,7 +13,7 @@
* @copyright 2012 - 2020 Marcus Bointon
* @copyright 2010 - 2012 Jim Jagielski
* @copyright 2004 - 2009 Andy Prevost
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
+ * @license https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU Lesser General Public License
* @note This program is distributed in the hope that it will be useful - WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/vendor/phpmailer/phpmailer/src/PHPMailer.php b/vendor/phpmailer/phpmailer/src/PHPMailer.php
index ba4bcd4..4a6077c 100644
--- a/vendor/phpmailer/phpmailer/src/PHPMailer.php
+++ b/vendor/phpmailer/phpmailer/src/PHPMailer.php
@@ -13,7 +13,7 @@
* @copyright 2012 - 2020 Marcus Bointon
* @copyright 2010 - 2012 Jim Jagielski
* @copyright 2004 - 2009 Andy Prevost
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
+ * @license https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU Lesser General Public License
* @note This program is distributed in the hope that it will be useful - WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
@@ -152,8 +152,7 @@ class PHPMailer
* Only supported in simple alt or alt_inline message types
* To generate iCal event structures, use classes like EasyPeasyICS or iCalcreator.
*
- * @see http://sprain.ch/blog/downloads/php-class-easypeasyics-create-ical-files-with-php/
- * @see http://kigkonsult.se/iCalcreator/
+ * @see https://kigkonsult.se/iCalcreator/
*
* @var string
*/
@@ -254,7 +253,7 @@ class PHPMailer
* You can set your own, but it must be in the format "",
* as defined in RFC5322 section 3.6.4 or it will be ignored.
*
- * @see https://tools.ietf.org/html/rfc5322#section-3.6.4
+ * @see https://www.rfc-editor.org/rfc/rfc5322#section-3.6.4
*
* @var string
*/
@@ -358,7 +357,7 @@ class PHPMailer
public $AuthType = '';
/**
- * SMTP SMTPXClient command attibutes
+ * SMTP SMTPXClient command attributes
*
* @var array
*/
@@ -388,7 +387,7 @@ class PHPMailer
* 'DELAY' will notify you if there is an unusual delay in delivery, but the actual
* delivery's outcome (success or failure) is not yet decided.
*
- * @see https://tools.ietf.org/html/rfc3461 See section 4.1 for more information about NOTIFY
+ * @see https://www.rfc-editor.org/rfc/rfc3461.html#section-4.1 for more information about NOTIFY
*/
public $dsn = '';
@@ -468,7 +467,7 @@ class PHPMailer
* Only applicable when sending via SMTP.
*
* @see https://en.wikipedia.org/wiki/Variable_envelope_return_path
- * @see http://www.postfix.org/VERP_README.html Postfix VERP info
+ * @see https://www.postfix.org/VERP_README.html Postfix VERP info
*
* @var bool
*/
@@ -551,10 +550,10 @@ class PHPMailer
* The function that handles the result of the send email action.
* It is called out by send() for each email sent.
*
- * Value can be any php callable: http://www.php.net/is_callable
+ * Value can be any php callable: https://www.php.net/is_callable
*
* Parameters:
- * bool $result result of the send action
+ * bool $result result of the send action
* array $to email addresses of the recipients
* array $cc cc email addresses
* array $bcc bcc email addresses
@@ -757,7 +756,7 @@ class PHPMailer
*
* @var string
*/
- const VERSION = '6.9.1';
+ const VERSION = '6.9.3';
/**
* Error severity: message only, continue processing.
@@ -903,7 +902,7 @@ protected function edebug($str)
}
//Is this a PSR-3 logger?
if ($this->Debugoutput instanceof \Psr\Log\LoggerInterface) {
- $this->Debugoutput->debug($str);
+ $this->Debugoutput->debug(rtrim($str, "\r\n"));
return;
}
@@ -1072,7 +1071,7 @@ public function addReplyTo($address, $name = '')
* be modified after calling this function), addition of such addresses is delayed until send().
* Addresses that have been added already return false, but do not throw exceptions.
*
- * @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo'
+ * @param string $kind One of 'to', 'cc', 'bcc', or 'Reply-To'
* @param string $address The email address
* @param string $name An optional username associated with the address
*
@@ -1212,7 +1211,7 @@ protected function addAnAddress($kind, $address, $name = '')
* Uses the imap_rfc822_parse_adrlist function if the IMAP extension is available.
* Note that quotes in the name part are removed.
*
- * @see http://www.andrew.cmu.edu/user/agreen1/testing/mrbs/web/Mail/RFC822.php A more careful implementation
+ * @see https://www.andrew.cmu.edu/user/agreen1/testing/mrbs/web/Mail/RFC822.php A more careful implementation
*
* @param string $addrstr The address list string
* @param bool $useimap Whether to use the IMAP extension to parse the list
@@ -1407,7 +1406,6 @@ public static function validateAddress($address, $patternselect = null)
* * IPv6 literals: 'first.last@[IPv6:a1::]'
* Not all of these will necessarily work for sending!
*
- * @see http://squiloople.com/2009/12/20/email-address-validation/
* @copyright 2009-2010 Michael Rushton
* Feel free to use and redistribute this code. But please keep this copyright notice.
*/
@@ -1734,9 +1732,8 @@ protected function sendmailSend($header, $body)
//This sets the SMTP envelope sender which gets turned into a return-path header by the receiver
//A space after `-f` is optional, but there is a long history of its presence
//causing problems, so we don't use one
- //Exim docs: http://www.exim.org/exim-html-current/doc/html/spec_html/ch-the_exim_command_line.html
- //Sendmail docs: http://www.sendmail.org/~ca/email/man/sendmail.html
- //Qmail docs: http://www.qmail.org/man/man8/qmail-inject.html
+ //Exim docs: https://www.exim.org/exim-html-current/doc/html/spec_html/ch-the_exim_command_line.html
+ //Sendmail docs: https://www.sendmail.org/~ca/email/man/sendmail.html
//Example problem: https://www.drupal.org/node/1057954
//PHP 5.6 workaround
@@ -1874,7 +1871,7 @@ protected static function isShellSafe($string)
*/
protected static function isPermittedPath($path)
{
- //Matches scheme definition from https://tools.ietf.org/html/rfc3986#section-3.1
+ //Matches scheme definition from https://www.rfc-editor.org/rfc/rfc3986#section-3.1
return !preg_match('#^[a-z][a-z\d+.-]*://#i', $path);
}
@@ -1901,7 +1898,7 @@ protected static function fileIsAccessible($path)
/**
* Send mail using the PHP mail() function.
*
- * @see http://www.php.net/manual/en/book.mail.php
+ * @see https://www.php.net/manual/en/book.mail.php
*
* @param string $header The message headers
* @param string $body The message body
@@ -1931,9 +1928,8 @@ protected function mailSend($header, $body)
//This sets the SMTP envelope sender which gets turned into a return-path header by the receiver
//A space after `-f` is optional, but there is a long history of its presence
//causing problems, so we don't use one
- //Exim docs: http://www.exim.org/exim-html-current/doc/html/spec_html/ch-the_exim_command_line.html
- //Sendmail docs: http://www.sendmail.org/~ca/email/man/sendmail.html
- //Qmail docs: http://www.qmail.org/man/man8/qmail-inject.html
+ //Exim docs: https://www.exim.org/exim-html-current/doc/html/spec_html/ch-the_exim_command_line.html
+ //Sendmail docs: https://www.sendmail.org/~ca/email/man/sendmail.html
//Example problem: https://www.drupal.org/node/1057954
//CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped.
@@ -2709,7 +2705,7 @@ public function createHeader()
}
//Only allow a custom message ID if it conforms to RFC 5322 section 3.6.4
- //https://tools.ietf.org/html/rfc5322#section-3.6.4
+ //https://www.rfc-editor.org/rfc/rfc5322#section-3.6.4
if (
'' !== $this->MessageID &&
preg_match(
@@ -3634,7 +3630,7 @@ public function has8bitChars($text)
* without breaking lines within a character.
* Adapted from a function by paravoid.
*
- * @see http://www.php.net/manual/en/function.mb-encode-mimeheader.php#60283
+ * @see https://www.php.net/manual/en/function.mb-encode-mimeheader.php#60283
*
* @param string $str multi-byte text to wrap encode
* @param string $linebreak string to use as linefeed/end-of-line
@@ -3690,7 +3686,7 @@ public function encodeQP($string)
/**
* Encode a string using Q encoding.
*
- * @see http://tools.ietf.org/html/rfc2047#section-4.2
+ * @see https://www.rfc-editor.org/rfc/rfc2047#section-4.2
*
* @param string $str the text to encode
* @param string $position Where the text is going to be used, see the RFC for what that means
@@ -4228,7 +4224,7 @@ protected function serverHostname()
$result = $_SERVER['SERVER_NAME'];
} elseif (function_exists('gethostname') && gethostname() !== false) {
$result = gethostname();
- } elseif (php_uname('n') !== false) {
+ } elseif (php_uname('n') !== '') {
$result = php_uname('n');
}
if (!static::isValidHost($result)) {
@@ -4253,7 +4249,7 @@ public static function isValidHost($host)
empty($host)
|| !is_string($host)
|| strlen($host) > 256
- || !preg_match('/^([a-zA-Z\d.-]*|\[[a-fA-F\d:]+\])$/', $host)
+ || !preg_match('/^([a-z\d.-]*|\[[a-f\d:]+\])$/i', $host)
) {
return false;
}
@@ -4267,8 +4263,8 @@ public static function isValidHost($host)
//Is it a valid IPv4 address?
return filter_var($host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) !== false;
}
- //Is it a syntactically valid hostname (when embeded in a URL)?
- return filter_var('http://' . $host, FILTER_VALIDATE_URL) !== false;
+ //Is it a syntactically valid hostname (when embedded in a URL)?
+ return filter_var('https://' . $host, FILTER_VALIDATE_URL) !== false;
}
/**
@@ -4679,7 +4675,7 @@ public static function filenameToType($filename)
* Multi-byte-safe pathinfo replacement.
* Drop-in replacement for pathinfo(), but multibyte- and cross-platform-safe.
*
- * @see http://www.php.net/manual/en/function.pathinfo.php#107461
+ * @see https://www.php.net/manual/en/function.pathinfo.php#107461
*
* @param string $path A filename or path, does not need to exist as a file
* @param int|string $options Either a PATHINFO_* constant,
@@ -4914,7 +4910,7 @@ public function DKIM_Sign($signHeader)
* Uses the 'relaxed' algorithm from RFC6376 section 3.4.2.
* Canonicalized headers should *always* use CRLF, regardless of mailer setting.
*
- * @see https://tools.ietf.org/html/rfc6376#section-3.4.2
+ * @see https://www.rfc-editor.org/rfc/rfc6376#section-3.4.2
*
* @param string $signHeader Header
*
@@ -4926,7 +4922,7 @@ public function DKIM_HeaderC($signHeader)
$signHeader = static::normalizeBreaks($signHeader, self::CRLF);
//Unfold header lines
//Note PCRE \s is too broad a definition of whitespace; RFC5322 defines it as `[ \t]`
- //@see https://tools.ietf.org/html/rfc5322#section-2.2
+ //@see https://www.rfc-editor.org/rfc/rfc5322#section-2.2
//That means this may break if you do something daft like put vertical tabs in your headers.
$signHeader = preg_replace('/\r\n[ \t]+/', ' ', $signHeader);
//Break headers out into an array
@@ -4958,7 +4954,7 @@ public function DKIM_HeaderC($signHeader)
* Uses the 'simple' algorithm from RFC6376 section 3.4.3.
* Canonicalized bodies should *always* use CRLF, regardless of mailer setting.
*
- * @see https://tools.ietf.org/html/rfc6376#section-3.4.3
+ * @see https://www.rfc-editor.org/rfc/rfc6376#section-3.4.3
*
* @param string $body Message Body
*
@@ -4994,7 +4990,7 @@ public function DKIM_Add($headers_line, $subject, $body)
$DKIMquery = 'dns/txt'; //Query method
$DKIMtime = time();
//Always sign these headers without being asked
- //Recommended list from https://tools.ietf.org/html/rfc6376#section-5.4.1
+ //Recommended list from https://www.rfc-editor.org/rfc/rfc6376#section-5.4.1
$autoSignHeaders = [
'from',
'to',
@@ -5100,7 +5096,7 @@ public function DKIM_Add($headers_line, $subject, $body)
}
//The DKIM-Signature header is included in the signature *except for* the value of the `b` tag
//which is appended after calculating the signature
- //https://tools.ietf.org/html/rfc6376#section-3.5
+ //https://www.rfc-editor.org/rfc/rfc6376#section-3.5
$dkimSignatureHeader = 'DKIM-Signature: v=1;' .
' d=' . $this->DKIM_domain . ';' .
' s=' . $this->DKIM_selector . ';' . static::$LE .
diff --git a/vendor/phpmailer/phpmailer/src/POP3.php b/vendor/phpmailer/phpmailer/src/POP3.php
index 7b25fdd..376fae2 100644
--- a/vendor/phpmailer/phpmailer/src/POP3.php
+++ b/vendor/phpmailer/phpmailer/src/POP3.php
@@ -13,7 +13,7 @@
* @copyright 2012 - 2020 Marcus Bointon
* @copyright 2010 - 2012 Jim Jagielski
* @copyright 2004 - 2009 Andy Prevost
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
+ * @license https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU Lesser General Public License
* @note This program is distributed in the hope that it will be useful - WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
@@ -46,7 +46,7 @@ class POP3
*
* @var string
*/
- const VERSION = '6.9.1';
+ const VERSION = '6.9.3';
/**
* Default POP3 port number.
@@ -250,7 +250,9 @@ public function connect($host, $port = false, $tval = 30)
//On Windows this will raise a PHP Warning error if the hostname doesn't exist.
//Rather than suppress it with @fsockopen, capture it cleanly instead
- set_error_handler([$this, 'catchWarning']);
+ set_error_handler(function () {
+ call_user_func_array([$this, 'catchWarning'], func_get_args());
+ });
if (false === $port) {
$port = static::DEFAULT_PORT;
diff --git a/vendor/phpmailer/phpmailer/src/SMTP.php b/vendor/phpmailer/phpmailer/src/SMTP.php
index 1b5b007..b4eff40 100644
--- a/vendor/phpmailer/phpmailer/src/SMTP.php
+++ b/vendor/phpmailer/phpmailer/src/SMTP.php
@@ -13,7 +13,7 @@
* @copyright 2012 - 2020 Marcus Bointon
* @copyright 2010 - 2012 Jim Jagielski
* @copyright 2004 - 2009 Andy Prevost
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
+ * @license https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU Lesser General Public License
* @note This program is distributed in the hope that it will be useful - WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
@@ -35,7 +35,7 @@ class SMTP
*
* @var string
*/
- const VERSION = '6.9.1';
+ const VERSION = '6.9.3';
/**
* SMTP line break constant.
@@ -62,7 +62,7 @@ class SMTP
* The maximum line length allowed by RFC 5321 section 4.5.3.1.6,
* *excluding* a trailing CRLF break.
*
- * @see https://tools.ietf.org/html/rfc5321#section-4.5.3.1.6
+ * @see https://www.rfc-editor.org/rfc/rfc5321#section-4.5.3.1.6
*
* @var int
*/
@@ -72,7 +72,7 @@ class SMTP
* The maximum line length allowed for replies in RFC 5321 section 4.5.3.1.5,
* *including* a trailing CRLF line break.
*
- * @see https://tools.ietf.org/html/rfc5321#section-4.5.3.1.5
+ * @see https://www.rfc-editor.org/rfc/rfc5321#section-4.5.3.1.5
*
* @var int
*/
@@ -152,8 +152,8 @@ class SMTP
/**
* Whether to use VERP.
*
- * @see http://en.wikipedia.org/wiki/Variable_envelope_return_path
- * @see http://www.postfix.org/VERP_README.html Info on VERP
+ * @see https://en.wikipedia.org/wiki/Variable_envelope_return_path
+ * @see https://www.postfix.org/VERP_README.html Info on VERP
*
* @var bool
*/
@@ -164,7 +164,7 @@ class SMTP
* Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2.
* This needs to be quite high to function correctly with hosts using greetdelay as an anti-spam measure.
*
- * @see http://tools.ietf.org/html/rfc2821#section-4.5.3.2
+ * @see https://www.rfc-editor.org/rfc/rfc2821#section-4.5.3.2
*
* @var int
*/
@@ -187,12 +187,12 @@ class SMTP
*/
protected $smtp_transaction_id_patterns = [
'exim' => '/[\d]{3} OK id=(.*)/',
- 'sendmail' => '/[\d]{3} 2.0.0 (.*) Message/',
- 'postfix' => '/[\d]{3} 2.0.0 Ok: queued as (.*)/',
- 'Microsoft_ESMTP' => '/[0-9]{3} 2.[\d].0 (.*)@(?:.*) Queued mail for delivery/',
+ 'sendmail' => '/[\d]{3} 2\.0\.0 (.*) Message/',
+ 'postfix' => '/[\d]{3} 2\.0\.0 Ok: queued as (.*)/',
+ 'Microsoft_ESMTP' => '/[0-9]{3} 2\.[\d]\.0 (.*)@(?:.*) Queued mail for delivery/',
'Amazon_SES' => '/[\d]{3} Ok (.*)/',
'SendGrid' => '/[\d]{3} Ok: queued as (.*)/',
- 'CampaignMonitor' => '/[\d]{3} 2.0.0 OK:([a-zA-Z\d]{48})/',
+ 'CampaignMonitor' => '/[\d]{3} 2\.0\.0 OK:([a-zA-Z\d]{48})/',
'Haraka' => '/[\d]{3} Message Queued \((.*)\)/',
'ZoneMTA' => '/[\d]{3} Message queued as (.*)/',
'Mailjet' => '/[\d]{3} OK queued as (.*)/',
@@ -280,7 +280,8 @@ protected function edebug($str, $level = 0)
}
//Is this a PSR-3 logger?
if ($this->Debugoutput instanceof \Psr\Log\LoggerInterface) {
- $this->Debugoutput->debug($str);
+ //Remove trailing line breaks potentially added by calls to SMTP::client_send()
+ $this->Debugoutput->debug(rtrim($str, "\r\n"));
return;
}
@@ -293,6 +294,7 @@ protected function edebug($str, $level = 0)
switch ($this->Debugoutput) {
case 'error_log':
//Don't output, just log
+ /** @noinspection ForgottenDebugOutputInspection */
error_log($str);
break;
case 'html':
@@ -371,7 +373,7 @@ public function connect($host, $port = null, $timeout = 30, $options = [])
}
//Anything other than a 220 response means something went wrong
//RFC 5321 says the server will wait for us to send a QUIT in response to a 554 error
- //https://tools.ietf.org/html/rfc5321#section-3.1
+ //https://www.rfc-editor.org/rfc/rfc5321#section-3.1
if ($responseCode === 554) {
$this->quit();
}
@@ -404,7 +406,9 @@ protected function getSMTPConnection($host, $port = null, $timeout = 30, $option
$errstr = '';
if ($streamok) {
$socket_context = stream_context_create($options);
- set_error_handler([$this, 'errorHandler']);
+ set_error_handler(function () {
+ call_user_func_array([$this, 'errorHandler'], func_get_args());
+ });
$connection = stream_socket_client(
$host . ':' . $port,
$errno,
@@ -419,7 +423,9 @@ protected function getSMTPConnection($host, $port = null, $timeout = 30, $option
'Connection: stream_socket_client not available, falling back to fsockopen',
self::DEBUG_CONNECTION
);
- set_error_handler([$this, 'errorHandler']);
+ set_error_handler(function () {
+ call_user_func_array([$this, 'errorHandler'], func_get_args());
+ });
$connection = fsockopen(
$host,
$port,
@@ -483,7 +489,9 @@ public function startTLS()
}
//Begin encrypted connection
- set_error_handler([$this, 'errorHandler']);
+ set_error_handler(function () {
+ call_user_func_array([$this, 'errorHandler'], func_get_args());
+ });
$crypto_ok = stream_socket_enable_crypto(
$this->smtp_conn,
true,
@@ -574,7 +582,7 @@ public function authenticate(
}
//Send encoded username and password
if (
- //Format from https://tools.ietf.org/html/rfc4616#section-2
+ //Format from https://www.rfc-editor.org/rfc/rfc4616#section-2
//We skip the first field (it's forgery), so the string starts with a null byte
!$this->sendCommand(
'User & Password',
@@ -648,7 +656,7 @@ protected function hmac($data, $key)
}
//The following borrowed from
- //http://php.net/manual/en/function.mhash.php#27225
+ //https://www.php.net/manual/en/function.mhash.php#27225
//RFC 2104 HMAC implementation for php.
//Creates an md5 HMAC.
@@ -787,7 +795,7 @@ public function data($msg_data)
//Send the lines to the server
foreach ($lines_out as $line_out) {
//Dot-stuffing as per RFC5321 section 4.5.2
- //https://tools.ietf.org/html/rfc5321#section-4.5.2
+ //https://www.rfc-editor.org/rfc/rfc5321#section-4.5.2
if (!empty($line_out) && $line_out[0] === '.') {
$line_out = '.' . $line_out;
}
@@ -1162,7 +1170,9 @@ public function client_send($data, $command = '')
} else {
$this->edebug('CLIENT -> SERVER: ' . $data, self::DEBUG_CLIENT);
}
- set_error_handler([$this, 'errorHandler']);
+ set_error_handler(function () {
+ call_user_func_array([$this, 'errorHandler'], func_get_args());
+ });
$result = fwrite($this->smtp_conn, $data);
restore_error_handler();
@@ -1265,7 +1275,9 @@ protected function get_lines()
while (is_resource($this->smtp_conn) && !feof($this->smtp_conn)) {
//Must pass vars in here as params are by reference
//solution for signals inspired by https://github.com/symfony/symfony/pull/6540
- set_error_handler([$this, 'errorHandler']);
+ set_error_handler(function () {
+ call_user_func_array([$this, 'errorHandler'], func_get_args());
+ });
$n = stream_select($selR, $selW, $selW, $this->Timelimit);
restore_error_handler();
diff --git a/vendor/twilio/sdk/Dockerfile b/vendor/twilio/sdk/Dockerfile
index e8919be..fde80b9 100644
--- a/vendor/twilio/sdk/Dockerfile
+++ b/vendor/twilio/sdk/Dockerfile
@@ -1,11 +1,14 @@
FROM php:7.4
+RUN apt-get update -y && apt-get install -y zip
+
RUN mkdir /twilio
WORKDIR /twilio
+ENV PATH="vendor/bin:$PATH"
COPY src src
+COPY tests tests
COPY composer* ./
-RUN curl --silent --show-error https://getcomposer.org/installer | php
-RUN mv composer.phar /usr/local/bin/composer
-RUN composer install --no-dev
+COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
+RUN composer install --prefer-dist
diff --git a/vendor/twilio/sdk/PULL_REQUEST_TEMPLATE.md b/vendor/twilio/sdk/PULL_REQUEST_TEMPLATE.md
index 3cd79c3..95ffa50 100644
--- a/vendor/twilio/sdk/PULL_REQUEST_TEMPLATE.md
+++ b/vendor/twilio/sdk/PULL_REQUEST_TEMPLATE.md
@@ -3,7 +3,7 @@ We appreciate the effort for this pull request but before that please make sure
Please format the PR title appropriately based on the type of change:
[!]:
-Where is one of: docs, chore, feat, fix, test.
+Where is one of: docs, chore, feat, fix, test, misc.
Add a '!' after the type for breaking changes (e.g. feat!: new breaking feature).
**All third-party contributors acknowledge that any contributions they provide will be made under the same open-source license that the open-source project is provided under.**
@@ -19,15 +19,13 @@ Closes #2
A short description of what this PR does.
### Checklist
-
-- [ ] I acknowledge that all my contributions will be made under the project's license
+- [x] I acknowledge that all my contributions will be made under the project's license
- [ ] I have made a material change to the repo (functionality, testing, spelling, grammar)
-- [ ] I have read the [Contribution Guidelines](CONTRIBUTING.md) and my PR follows them
+- [ ] I have read the [Contribution Guidelines](https://github.com/twilio/twilio-php/blob/main/CONTRIBUTING.md) and my PR follows them
- [ ] I have titled the PR appropriately
-- [ ] I have updated my branch with the master branch
+- [ ] I have updated my branch with the main branch
- [ ] I have added tests that prove my fix is effective or that my feature works
-- [ ] I have added necessary documentation about the functionality in the appropriate .md file
+- [ ] I have added the necessary documentation about the functionality in the appropriate .md file
- [ ] I have added inline documentation to the code I modified
-If you have questions, please file a [support ticket](https://twilio.com/help/contact), or create a GitHub Issue in this
-repository.
+If you have questions, please file a [support ticket](https://twilio.com/help/contact), or create a GitHub Issue in this repository.
diff --git a/vendor/twilio/sdk/composer.json b/vendor/twilio/sdk/composer.json
index f15cd74..fa61a9d 100644
--- a/vendor/twilio/sdk/composer.json
+++ b/vendor/twilio/sdk/composer.json
@@ -1,39 +1,38 @@
{
- "name": "twilio/sdk",
- "type": "library",
- "description": "A PHP wrapper for Twilio's API",
- "keywords": [
- "twilio",
- "sms",
- "api"
- ],
- "homepage": "http://github.com/twilio/twilio-php",
- "license": "MIT",
- "authors": [
- {
- "name": "Twilio API Team",
- "email": "api@twilio.com"
+ "name": "twilio/sdk",
+ "type": "library",
+ "description": "A PHP wrapper for Twilio's API",
+ "keywords": ["twilio", "sms", "api"],
+ "homepage": "https://github.com/twilio/twilio-php",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Twilio API Team",
+ "email": "api@twilio.com"
+ }
+ ],
+ "require": {
+ "php": ">=7.1.0"
+ },
+ "require-dev": {
+ "guzzlehttp/guzzle": "^6.3 || ^7.0",
+ "phpunit/phpunit": ">=7.0 < 10"
+ },
+ "suggest": {
+ "guzzlehttp/guzzle": "An HTTP client to execute the API requests"
+ },
+ "autoload": {
+ "psr-4": {
+ "Twilio\\": "src/Twilio/"
+ }
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "": "src/Twilio/",
+ "Twilio\\Tests\\": "tests/Twilio/"
+ }
+ },
+ "config": {
+ "lock": false
}
- ],
- "require": {
- "php": ">=5.5.0"
- },
- "require-dev": {
- "guzzlehttp/guzzle": "^6.3",
- "apigen/apigen": "^4.1",
- "phpunit/phpunit": ">=4.5"
- },
- "suggest": {
- "guzzlehttp/guzzle": "An HTTP client to execute the API requests"
- },
- "autoload": {
- "psr-4": {
- "Twilio\\": "src/Twilio/"
- }
- },
- "autoload-dev": {
- "psr-4": {
- "Twilio\\Tests\\": "tests/Twilio/"
- }
- }
-}
+}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Deserialize.php b/vendor/twilio/sdk/src/Twilio/Deserialize.php
index 997e93e..f0d9967 100644
--- a/vendor/twilio/sdk/src/Twilio/Deserialize.php
+++ b/vendor/twilio/sdk/src/Twilio/Deserialize.php
@@ -2,6 +2,8 @@
namespace Twilio;
+use Twilio\Base\PhoneNumberCapabilities;
+
class Deserialize
{
@@ -12,7 +14,7 @@ class Deserialize
* YYYY-MM-DD format.
* @return \DateTime|string DateTime corresponding to the input string, in UTC time.
*/
- public static function dateTime($s)
+ public static function dateTime(?string $s)
{
try {
if ($s) {
@@ -24,4 +26,26 @@ public static function dateTime($s)
return $s;
}
+
+ /**
+ * Deserialize an array into a PhoneNumberCapabilities object
+ *
+ * @param array|null $arr An array
+ * @return PhoneNumberCapabilities|array PhoneNumberCapabilities object corresponding to the input array.
+ */
+ public static function phoneNumberCapabilities(?array $arr)
+ {
+ try {
+ if ($arr) {
+ $required = ["mms", "sms", "voice", "fax"];
+ if (count(array_intersect($required, array_keys($arr))) > 0) {
+ return new PhoneNumberCapabilities($arr);
+ }
+ }
+ } catch (\Exception $e) {
+ // no-op
+ }
+
+ return $arr;
+ }
}
diff --git a/vendor/twilio/sdk/src/Twilio/Domain.php b/vendor/twilio/sdk/src/Twilio/Domain.php
index 2e35d4a..cbf6dd2 100644
--- a/vendor/twilio/sdk/src/Twilio/Domain.php
+++ b/vendor/twilio/sdk/src/Twilio/Domain.php
@@ -4,6 +4,7 @@
namespace Twilio;
+use Twilio\Http\Response;
use Twilio\Rest\Client;
/**
@@ -11,10 +12,9 @@
* Abstracts a Twilio sub domain
* @package Twilio
*/
-abstract class Domain
-{
+abstract class Domain {
/**
- * @var \Twilio\Rest\Client Twilio Client
+ * @var Client Twilio Client
*/
protected $client;
@@ -25,10 +25,9 @@ abstract class Domain
/**
* Construct a new Domain
- * @param \Twilio\Rest\Client $client used to communicate with Twilio
+ * @param Client $client used to communicate with Twilio
*/
- public function __construct(Client $client)
- {
+ public function __construct(Client $client) {
$this->client = $client;
$this->baseUrl = '';
}
@@ -39,9 +38,8 @@ public function __construct(Client $client)
* @param string $uri Version relative URI
* @return string Absolute URL for this domain
*/
- public function absoluteUrl($uri)
- {
- return \implode('/', array(\trim($this->baseUrl, '/'), \trim($uri, '/')));
+ public function absoluteUrl(string $uri): string {
+ return \implode('/', [\trim($this->baseUrl, '/'), \trim($uri, '/')]);
}
/**
@@ -54,13 +52,13 @@ public function absoluteUrl($uri)
* @param array $headers HTTP headers to send with the request
* @param string $user User to authenticate as
* @param string $password Password
- * @param null $timeout Request timeout
- * @return \Twilio\Http\Response the response for the request
+ * @param int $timeout Request timeout
+ * @return Response the response for the request
*/
- public function request($method, $uri, $params = array(), $data = array(),
- $headers = array(), $user = null, $password = null,
- $timeout = null)
- {
+ public function request(string $method, string $uri,
+ array $params = [], array $data = [], array $headers = [],
+ string $user = null, string $password = null,
+ int $timeout = null): Response {
$url = $this->absoluteUrl($uri);
return $this->client->request(
$method,
@@ -74,16 +72,11 @@ public function request($method, $uri, $params = array(), $data = array(),
);
}
- /**
- * @return \Twilio\Rest\Client
- */
- public function getClient()
- {
+ public function getClient(): Client {
return $this->client;
}
- public function __toString()
- {
+ public function __toString(): string {
return '[Domain]';
}
}
diff --git a/vendor/twilio/sdk/src/Twilio/Exceptions/ConfigurationException.php b/vendor/twilio/sdk/src/Twilio/Exceptions/ConfigurationException.php
index 89188e6..985cc4d 100644
--- a/vendor/twilio/sdk/src/Twilio/Exceptions/ConfigurationException.php
+++ b/vendor/twilio/sdk/src/Twilio/Exceptions/ConfigurationException.php
@@ -4,7 +4,6 @@
namespace Twilio\Exceptions;
-class ConfigurationException extends TwilioException
-{
+class ConfigurationException extends TwilioException {
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Exceptions/DeserializeException.php b/vendor/twilio/sdk/src/Twilio/Exceptions/DeserializeException.php
index ed8f1ab..766b12f 100644
--- a/vendor/twilio/sdk/src/Twilio/Exceptions/DeserializeException.php
+++ b/vendor/twilio/sdk/src/Twilio/Exceptions/DeserializeException.php
@@ -4,7 +4,6 @@
namespace Twilio\Exceptions;
-class DeserializeException extends TwilioException
-{
+class DeserializeException extends TwilioException {
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Exceptions/EnvironmentException.php b/vendor/twilio/sdk/src/Twilio/Exceptions/EnvironmentException.php
index 7e8fc47..6b4771f 100644
--- a/vendor/twilio/sdk/src/Twilio/Exceptions/EnvironmentException.php
+++ b/vendor/twilio/sdk/src/Twilio/Exceptions/EnvironmentException.php
@@ -4,7 +4,6 @@
namespace Twilio\Exceptions;
-class EnvironmentException extends TwilioException
-{
+class EnvironmentException extends TwilioException {
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Exceptions/HttpException.php b/vendor/twilio/sdk/src/Twilio/Exceptions/HttpException.php
index a403e17..31ef34a 100644
--- a/vendor/twilio/sdk/src/Twilio/Exceptions/HttpException.php
+++ b/vendor/twilio/sdk/src/Twilio/Exceptions/HttpException.php
@@ -4,7 +4,6 @@
namespace Twilio\Exceptions;
-class HttpException extends TwilioException
-{
+class HttpException extends TwilioException {
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Exceptions/RestException.php b/vendor/twilio/sdk/src/Twilio/Exceptions/RestException.php
index 52569eb..f704f57 100644
--- a/vendor/twilio/sdk/src/Twilio/Exceptions/RestException.php
+++ b/vendor/twilio/sdk/src/Twilio/Exceptions/RestException.php
@@ -4,9 +4,10 @@
namespace Twilio\Exceptions;
-class RestException extends TwilioException
-{
+class RestException extends TwilioException {
protected $statusCode;
+ protected $details;
+ protected $moreInfo;
/**
* Construct the exception. Note: The message is NOT binary safe.
@@ -14,11 +15,14 @@ class RestException extends TwilioException
* @param string $message [optional] The Exception message to throw.
* @param int $code [optional] The Exception code.
* @param int $statusCode [optional] The HTTP Status code.
+ * @param string $moreInfo [optional] More information about the error.
+ * @param array $details [optional] Additional details about the error.
* @since 5.1.0
*/
- public function __construct($message, $code, $statusCode)
- {
+ public function __construct(string $message, int $code, int $statusCode, string $moreInfo = '', array $details = []) {
$this->statusCode = $statusCode;
+ $this->moreInfo = $moreInfo;
+ $this->details = $details;
parent::__construct($message, $code);
}
@@ -26,10 +30,23 @@ public function __construct($message, $code, $statusCode)
* Get the HTTP Status Code of the RestException
* @return int HTTP Status Code
*/
- public function getStatusCode()
- {
+ public function getStatusCode(): int {
return $this->statusCode;
}
+ /**
+ * Get more information of the RestException
+ * @return string More error information
+ */
+ public function getMoreInfo(): string {
+ return $this->moreInfo;
+ }
-}
\ No newline at end of file
+ /**
+ * Get the details of the RestException
+ * @return exception details
+ */
+ public function getDetails(): array {
+ return $this->details;
+ }
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Exceptions/TwilioException.php b/vendor/twilio/sdk/src/Twilio/Exceptions/TwilioException.php
index 3111715..fc0a53b 100644
--- a/vendor/twilio/sdk/src/Twilio/Exceptions/TwilioException.php
+++ b/vendor/twilio/sdk/src/Twilio/Exceptions/TwilioException.php
@@ -4,7 +4,6 @@
namespace Twilio\Exceptions;
-class TwilioException extends \Exception
-{
+class TwilioException extends \Exception {
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Exceptions/TwimlException.php b/vendor/twilio/sdk/src/Twilio/Exceptions/TwimlException.php
index 027a8dc..4b35e57 100644
--- a/vendor/twilio/sdk/src/Twilio/Exceptions/TwimlException.php
+++ b/vendor/twilio/sdk/src/Twilio/Exceptions/TwimlException.php
@@ -4,7 +4,6 @@
namespace Twilio\Exceptions;
-class TwimlException extends TwilioException
-{
+class TwimlException extends TwilioException {
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Http/Client.php b/vendor/twilio/sdk/src/Twilio/Http/Client.php
index 52e4a07..9f3d103 100644
--- a/vendor/twilio/sdk/src/Twilio/Http/Client.php
+++ b/vendor/twilio/sdk/src/Twilio/Http/Client.php
@@ -4,9 +4,9 @@
namespace Twilio\Http;
-interface Client
-{
- public function request($method, $url, $params = array(), $data = array(),
- $headers = array(), $user = null, $password = null,
- $timeout = null);
-}
\ No newline at end of file
+interface Client {
+ public function request(string $method, string $url,
+ array $params = [], array $data = [], array $headers = [],
+ string $user = null, string $password = null,
+ int $timeout = null): Response;
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Http/CurlClient.php b/vendor/twilio/sdk/src/Twilio/Http/CurlClient.php
index 1785243..aaf99f2 100644
--- a/vendor/twilio/sdk/src/Twilio/Http/CurlClient.php
+++ b/vendor/twilio/sdk/src/Twilio/Http/CurlClient.php
@@ -4,29 +4,26 @@
namespace Twilio\Http;
+use Twilio\Exceptions\ConfigurationException;
use Twilio\Exceptions\EnvironmentException;
-class CurlClient implements Client
-{
- const DEFAULT_TIMEOUT = 60;
- protected $curlOptions = array();
- protected $debugHttp = false;
+class CurlClient implements Client {
+ public const DEFAULT_TIMEOUT = 60;
+ protected $curlOptions = [];
- public $lastRequest = null;
- public $lastResponse = null;
+ public $lastRequest;
+ public $lastResponse;
- public function __construct(array $options = array())
- {
+ public function __construct(array $options = []) {
$this->curlOptions = $options;
- $this->debugHttp = \getenv('DEBUG_HTTP_TRAFFIC') === 'true';
}
- public function request($method, $url, $params = array(), $data = array(),
- $headers = array(), $user = null, $password = null,
- $timeout = null)
- {
+ public function request(string $method, string $url,
+ array $params = [], array $data = [], array $headers = [],
+ string $user = null, string $password = null,
+ int $timeout = null): Response {
$options = $this->options($method, $url, $params, $data, $headers,
- $user, $password, $timeout);
+ $user, $password, $timeout);
$this->lastRequest = $options;
$this->lastResponse = null;
@@ -54,23 +51,9 @@ public function request($method, $url, $params = array(), $data = array(),
? array($parts[1], $parts[2])
: array($parts[0], $parts[1]);
- if ($this->debugHttp) {
- $u = \parse_url($url);
- $hdrLine = $method . ' ' . $u['path'];
- if (isset($u['query']) && \strlen($u['query']) > 0) {
- $hdrLine = $hdrLine . '?' . $u['query'];
- }
- \error_log($hdrLine);
- foreach ($headers as $key => $value) {
- \error_log("$key: $value");
- }
- if ($method === 'POST') {
- \error_log("\n" . $options[CURLOPT_POSTFIELDS] . "\n");
- }
- }
$statusCode = \curl_getinfo($curl, CURLINFO_HTTP_CODE);
- $responseHeaders = array();
+ $responseHeaders = [];
$headerLines = \explode("\r\n", $head);
\array_shift($headerLines);
foreach ($headerLines as $line) {
@@ -80,16 +63,8 @@ public function request($method, $url, $params = array(), $data = array(),
\curl_close($curl);
- if (isset($buffer) && \is_resource($buffer)) {
- \fclose($buffer);
- }
-
- if ($this->debugHttp) {
- \error_log("HTTP/1.1 $statusCode");
- foreach ($responseHeaders as $key => $value) {
- \error_log("$key: $value");
- }
- \error_log("\n$body");
+ if (isset($options[CURLOPT_INFILE]) && \is_resource($options[CURLOPT_INFILE])) {
+ \fclose($options[CURLOPT_INFILE]);
}
$this->lastResponse = new Response($statusCode, $body, $responseHeaders);
@@ -100,30 +75,27 @@ public function request($method, $url, $params = array(), $data = array(),
\curl_close($curl);
}
- if (isset($buffer) && \is_resource($buffer)) {
- \fclose($buffer);
+ if (isset($options[CURLOPT_INFILE]) && \is_resource($options[CURLOPT_INFILE])) {
+ \fclose($options[CURLOPT_INFILE]);
}
throw $e;
}
}
- public function options($method, $url, $params = array(), $data = array(),
- $headers = array(), $user = null, $password = null,
- $timeout = null)
- {
-
- $timeout = \is_null($timeout)
- ? self::DEFAULT_TIMEOUT
- : $timeout;
- $options = $this->curlOptions + array(
- CURLOPT_URL => $url,
- CURLOPT_HEADER => true,
- CURLOPT_RETURNTRANSFER => true,
- CURLOPT_INFILESIZE => Null,
- CURLOPT_HTTPHEADER => array(),
- CURLOPT_TIMEOUT => $timeout,
- );
+ public function options(string $method, string $url,
+ array $params = [], array $data = [], array $headers = [],
+ string $user = null, string $password = null,
+ int $timeout = null): array {
+ $timeout = $timeout ?? self::DEFAULT_TIMEOUT;
+ $options = $this->curlOptions + [
+ CURLOPT_URL => $url,
+ CURLOPT_HEADER => true,
+ CURLOPT_RETURNTRANSFER => true,
+ CURLOPT_INFILESIZE => Null,
+ CURLOPT_HTTPHEADER => [],
+ CURLOPT_TIMEOUT => $timeout,
+ ];
foreach ($headers as $key => $value) {
$options[CURLOPT_HTTPHEADER][] = "$key: $value";
@@ -133,9 +105,9 @@ public function options($method, $url, $params = array(), $data = array(),
$options[CURLOPT_HTTPHEADER][] = 'Authorization: Basic ' . \base64_encode("$user:$password");
}
- $body = $this->buildQuery($params);
- if ($body) {
- $options[CURLOPT_URL] .= '?' . $body;
+ $query = $this->buildQuery($params);
+ if ($query) {
+ $options[CURLOPT_URL] .= '?' . $query;
}
switch (\strtolower(\trim($method))) {
@@ -144,21 +116,31 @@ public function options($method, $url, $params = array(), $data = array(),
break;
case 'post':
$options[CURLOPT_POST] = true;
- $options[CURLOPT_POSTFIELDS] = $this->buildQuery($data);
+ if ($this->hasFile($data)) {
+ [$headers, $body] = $this->buildMultipartOptions($data);
+ $options[CURLOPT_POSTFIELDS] = $body;
+ $options[CURLOPT_HTTPHEADER] = \array_merge($options[CURLOPT_HTTPHEADER], $headers);
+ }
+ elseif ($headers['Content-Type'] === 'application/json') {
+ $options[CURLOPT_POSTFIELDS] = json_encode($data);
+ }
+ else {
+ $options[CURLOPT_POSTFIELDS] = $this->buildQuery($data);
+ }
break;
case 'put':
- $options[CURLOPT_PUT] = true;
- if ($data) {
- if ($buffer = \fopen('php://memory', 'w+')) {
- $dataString = $this->buildQuery($data);
- \fwrite($buffer, $dataString);
- \fseek($buffer, 0);
- $options[CURLOPT_INFILE] = $buffer;
- $options[CURLOPT_INFILESIZE] = \strlen($dataString);
- } else {
- throw new EnvironmentException('Unable to open a temporary file');
- }
+ $options[CURLOPT_CUSTOMREQUEST] = 'PUT';
+ if ($this->hasFile($data)) {
+ [$headers, $body] = $this->buildMultipartOptions($data);
+ $options[CURLOPT_POSTFIELDS] = $body;
+ $options[CURLOPT_HTTPHEADER] = \array_merge($options[CURLOPT_HTTPHEADER], $headers);
+ }
+ elseif ($headers['Content-Type'] === 'application/json') {
+ $options[CURLOPT_POSTFIELDS] = json_encode($data);
+ }
+ else {
+ $options[CURLOPT_POSTFIELDS] = $this->buildQuery($data);
}
break;
case 'head':
@@ -171,15 +153,9 @@ public function options($method, $url, $params = array(), $data = array(),
return $options;
}
- public function buildQuery($params)
- {
- $parts = array();
-
- if (\is_string($params)) {
- return $params;
- }
-
- $params = $params ?: array();
+ public function buildQuery(?array $params): string {
+ $parts = [];
+ $params = $params ?: [];
foreach ($params as $key => $value) {
if (\is_array($value)) {
@@ -193,4 +169,72 @@ public function buildQuery($params)
return \implode('&', $parts);
}
+
+ private function hasFile(array $data): bool {
+ foreach ($data as $value) {
+ if ($value instanceof File) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ private function buildMultipartOptions(array $data): array {
+ $boundary = \uniqid('', true);
+ $delimiter = "-------------{$boundary}";
+ $body = '';
+
+ foreach ($data as $key => $value) {
+ if ($value instanceof File) {
+ $contents = $value->getContents();
+ if ($contents === null) {
+ $chunk = \file_get_contents($value->getFileName());
+ $filename = \basename($value->getFileName());
+ } elseif (\is_resource($contents)) {
+ $chunk = '';
+ while (!\feof($contents)) {
+ $chunk .= \fread($contents, 8096);
+ }
+
+ $filename = $value->getFileName();
+ } elseif (\is_string($contents)) {
+ $chunk = $contents;
+ $filename = $value->getFileName();
+ } else {
+ throw new \InvalidArgumentException('Unsupported content type');
+ }
+
+ $headers = '';
+ $contentType = $value->getContentType();
+ if ($contentType !== null) {
+ $headers .= "Content-Type: {$contentType}\r\n";
+ }
+
+ $body .= \vsprintf("--%s\r\nContent-Disposition: form-data; name=\"%s\"; filename=\"%s\"\r\n%s\r\n%s\r\n", [
+ $delimiter,
+ $key,
+ $filename,
+ $headers,
+ $chunk,
+ ]);
+ } else {
+ $body .= \vsprintf("--%s\r\nContent-Disposition: form-data; name=\"%s\"\r\n\r\n%s\r\n", [
+ $delimiter,
+ $key,
+ $value,
+ ]);
+ }
+ }
+
+ $body .= "--{$delimiter}--\r\n";
+
+ return [
+ [
+ "Content-Type: multipart/form-data; boundary={$delimiter}",
+ 'Content-Length: ' . \strlen($body),
+ ],
+ $body,
+ ];
+ }
}
diff --git a/vendor/twilio/sdk/src/Twilio/Http/GuzzleClient.php b/vendor/twilio/sdk/src/Twilio/Http/GuzzleClient.php
index c37a37c..8b88b09 100644
--- a/vendor/twilio/sdk/src/Twilio/Http/GuzzleClient.php
+++ b/vendor/twilio/sdk/src/Twilio/Http/GuzzleClient.php
@@ -6,46 +6,94 @@
use GuzzleHttp\ClientInterface;
use GuzzleHttp\Exception\BadResponseException;
+use GuzzleHttp\Psr7\Query;
use GuzzleHttp\Psr7\Request;
use Twilio\Exceptions\HttpException;
-final class GuzzleClient implements Client
-{
+final class GuzzleClient implements Client {
/**
* @var ClientInterface
*/
private $client;
- public function __construct(ClientInterface $client)
- {
+ public function __construct(ClientInterface $client) {
$this->client = $client;
}
- public function request(
- $method,
- $url,
- $params = [],
- $data = [],
- $headers = [],
- $user = null,
- $password = null,
- $timeout = null
- )
- {
+ public function request(string $method, string $url,
+ array $params = [], array $data = [], array $headers = [],
+ string $user = null, string $password = null,
+ int $timeout = null): Response {
try {
- $response = $this->client->send(new Request($method, $url, $headers), [
+ $options = [
'timeout' => $timeout,
'auth' => [$user, $password],
- 'query' => $params,
- 'form_params' => $data,
- ]);
+ 'allow_redirects' => false,
+ ];
+
+ if ($params) {
+ $options['query'] = Query::build($params, PHP_QUERY_RFC1738);
+ }
+
+ if ($method === 'POST' || $method === 'PUT') {
+ if ($this->hasFile($data)) {
+ $options['multipart'] = $this->buildMultipartParam($data);
+ } else {
+ $options['body'] = Query::build($data, PHP_QUERY_RFC1738);
+ $headers['Content-Type'] = 'application/x-www-form-urlencoded';
+ }
+ }
+
+ $response = $this->client->send(new Request($method, $url, $headers), $options);
} catch (BadResponseException $exception) {
$response = $exception->getResponse();
} catch (\Exception $exception) {
throw new HttpException('Unable to complete the HTTP request', 0, $exception);
}
+
// Casting the body (stream) to a string performs a rewind, ensuring we return the entire response.
// See https://stackoverflow.com/a/30549372/86696
return new Response($response->getStatusCode(), (string)$response->getBody(), $response->getHeaders());
}
+
+ private function hasFile(array $data): bool {
+ foreach ($data as $value) {
+ if ($value instanceof File) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ private function buildMultipartParam(array $data): array {
+ $multipart = [];
+ foreach ($data as $key => $value) {
+ if ($value instanceof File) {
+ $contents = $value->getContents();
+ if ($contents === null) {
+ $contents = fopen($value->getFileName(), 'rb');
+ }
+
+ $chunk = [
+ 'name' => $key,
+ 'contents' => $contents,
+ 'filename' => $value->getFileName(),
+ ];
+
+ if ($value->getContentType() !== null) {
+ $chunk['headers']['Content-Type'] = $value->getContentType();
+ }
+ } else {
+ $chunk = [
+ 'name' => $key,
+ 'contents' => $value,
+ ];
+ }
+
+ $multipart[] = $chunk;
+ }
+
+ return $multipart;
+ }
}
diff --git a/vendor/twilio/sdk/src/Twilio/Http/Response.php b/vendor/twilio/sdk/src/Twilio/Http/Response.php
index f3c03eb..5b55956 100644
--- a/vendor/twilio/sdk/src/Twilio/Http/Response.php
+++ b/vendor/twilio/sdk/src/Twilio/Http/Response.php
@@ -4,14 +4,12 @@
namespace Twilio\Http;
-class Response
-{
+class Response {
protected $headers;
protected $content;
protected $statusCode;
- public function __construct($statusCode, $content, $headers = array())
- {
+ public function __construct(int $statusCode, ?string $content, ?array $headers = []) {
$this->statusCode = $statusCode;
$this->content = $content;
$this->headers = $headers;
@@ -20,31 +18,23 @@ public function __construct($statusCode, $content, $headers = array())
/**
* @return mixed
*/
- public function getContent()
- {
+ public function getContent() {
return \json_decode($this->content, true);
}
- /**
- * @return mixed
- */
- public function getStatusCode()
- {
+ public function getStatusCode(): int {
return $this->statusCode;
}
- public function getHeaders()
- {
+ public function getHeaders(): array {
return $this->headers;
}
- public function ok()
- {
+ public function ok(): bool {
return $this->getStatusCode() < 400;
}
- public function __toString()
- {
+ public function __toString(): string {
return '[Response] HTTP ' . $this->getStatusCode() . ' ' . $this->content;
}
}
diff --git a/vendor/twilio/sdk/src/Twilio/InstanceContext.php b/vendor/twilio/sdk/src/Twilio/InstanceContext.php
index 5285e32..cd87bd8 100644
--- a/vendor/twilio/sdk/src/Twilio/InstanceContext.php
+++ b/vendor/twilio/sdk/src/Twilio/InstanceContext.php
@@ -4,19 +4,16 @@
namespace Twilio;
-class InstanceContext
-{
+class InstanceContext {
protected $version;
- protected $solution = array();
+ protected $solution = [];
protected $uri;
- public function __construct(Version $version)
- {
+ public function __construct(Version $version) {
$this->version = $version;
}
- public function __toString()
- {
+ public function __toString(): string {
return '[InstanceContext]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/InstanceResource.php b/vendor/twilio/sdk/src/Twilio/InstanceResource.php
index f2d98e0..798546b 100644
--- a/vendor/twilio/sdk/src/Twilio/InstanceResource.php
+++ b/vendor/twilio/sdk/src/Twilio/InstanceResource.php
@@ -4,25 +4,25 @@
namespace Twilio;
-class InstanceResource
-{
+class InstanceResource {
protected $version;
- protected $context = null;
- protected $properties = array();
- protected $solution = array();
+ protected $context;
+ protected $properties = [];
+ protected $solution = [];
- public function __construct(Version $version)
- {
+ public function __construct(Version $version) {
$this->version = $version;
}
- public function toArray()
- {
+ public function toArray(): array {
return $this->properties;
}
- public function __toString()
- {
+ public function __toString(): string {
return '[InstanceResource]';
}
-}
\ No newline at end of file
+
+ public function __isset($name): bool {
+ return \array_key_exists($name, $this->properties);
+ }
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Jwt/AccessToken.php b/vendor/twilio/sdk/src/Twilio/Jwt/AccessToken.php
index 2d89f40..4ac8a3f 100644
--- a/vendor/twilio/sdk/src/Twilio/Jwt/AccessToken.php
+++ b/vendor/twilio/sdk/src/Twilio/Jwt/AccessToken.php
@@ -5,32 +5,32 @@
use Twilio\Jwt\Grants\Grant;
-class AccessToken
-{
+class AccessToken {
private $signingKeySid;
private $accountSid;
private $secret;
private $ttl;
private $identity;
private $nbf;
+ private $region;
/** @var Grant[] $grants */
private $grants;
/** @var string[] $customClaims */
private $customClaims;
- public function __construct($accountSid, $signingKeySid, $secret, $ttl = 3600, $identity = null)
- {
+ public function __construct(string $accountSid, string $signingKeySid, string $secret, int $ttl = 3600, string $identity = null, string $region = null) {
$this->signingKeySid = $signingKeySid;
$this->accountSid = $accountSid;
$this->secret = $secret;
$this->ttl = $ttl;
+ $this->region = $region;
- if (!\is_null($identity)) {
+ if ($identity !== null) {
$this->identity = $identity;
}
- $this->grants = array();
- $this->customClaims = array();
+ $this->grants = [];
+ $this->customClaims = [];
}
/**
@@ -40,8 +40,7 @@ public function __construct($accountSid, $signingKeySid, $secret, $ttl = 3600, $
*
* @return $this updated access token
*/
- public function setIdentity($identity)
- {
+ public function setIdentity(string $identity): self {
$this->identity = $identity;
return $this;
}
@@ -51,20 +50,18 @@ public function setIdentity($identity)
*
* @return string the identity
*/
- public function getIdentity()
- {
+ public function getIdentity(): string {
return $this->identity;
}
/**
* Set the nbf of this access token
*
- * @param integer $nbf nbf in epoch seconds of the grant
+ * @param int $nbf nbf in epoch seconds of the grant
*
* @return $this updated access token
*/
- public function setNbf($nbf)
- {
+ public function setNbf(int $nbf): self {
$this->nbf = $nbf;
return $this;
}
@@ -72,13 +69,33 @@ public function setNbf($nbf)
/**
* Returns the nbf of the grant
*
- * @return integer the nbf in epoch seconds
+ * @return int the nbf in epoch seconds
*/
- public function getNbf()
- {
+ public function getNbf(): int {
return $this->nbf;
}
+ /**
+ * Set the region of this access token
+ *
+ * @param string $region Home region of the account sid in this access token
+ *
+ * @return $this updated access token
+ */
+ public function setRegion(string $region): self {
+ $this->region = $region;
+ return $this;
+ }
+
+ /**
+ * Returns the region of this access token
+ *
+ * @return string Home region of the account sid in this access token
+ */
+ public function getRegion(): string {
+ return $this->region;
+ }
+
/**
* Add a grant to the access token
*
@@ -86,8 +103,7 @@ public function getNbf()
*
* @return $this the updated access token
*/
- public function addGrant(Grant $grant)
- {
+ public function addGrant(Grant $grant): self {
$this->grants[] = $grant;
return $this;
}
@@ -98,21 +114,23 @@ public function addGrant(Grant $grant)
* @param string $name
* @param string $value
*/
- public function addClaim($name, $value)
- {
+ public function addClaim(string $name, string $value): void {
$this->customClaims[$name] = $value;
}
- public function toJWT($algorithm = 'HS256')
- {
- $header = array(
+ public function toJWT(string $algorithm = 'HS256'): string {
+ $header = [
'cty' => 'twilio-fpa;v=1',
'typ' => 'JWT'
- );
+ ];
+
+ if ($this->region) {
+ $header['twr'] = $this->region;
+ }
$now = \time();
- $grants = array();
+ $grants = [];
if ($this->identity) {
$grants['identity'] = $this->identity;
}
@@ -130,23 +148,22 @@ public function toJWT($algorithm = 'HS256')
$grants = \json_decode('{}');
}
- $payload = \array_merge($this->customClaims, array(
+ $payload = \array_merge($this->customClaims, [
'jti' => $this->signingKeySid . '-' . $now,
'iss' => $this->signingKeySid,
'sub' => $this->accountSid,
'exp' => $now + $this->ttl,
'grants' => $grants
- ));
+ ]);
- if (!\is_null($this->nbf)) {
+ if ($this->nbf !== null) {
$payload['nbf'] = $this->nbf;
}
return JWT::encode($payload, $this->secret, $algorithm, $header);
}
- public function __toString()
- {
+ public function __toString(): string {
return $this->toJWT();
}
}
diff --git a/vendor/twilio/sdk/src/Twilio/Jwt/Client/ScopeURI.php b/vendor/twilio/sdk/src/Twilio/Jwt/Client/ScopeURI.php
index a269c3e..3340f94 100644
--- a/vendor/twilio/sdk/src/Twilio/Jwt/Client/ScopeURI.php
+++ b/vendor/twilio/sdk/src/Twilio/Jwt/Client/ScopeURI.php
@@ -15,24 +15,21 @@
* For example:
* scope:client:incoming?name=jonas
*/
-class ScopeURI
-{
+class ScopeURI {
public $service;
public $privilege;
public $params;
- public function __construct($service, $privilege, $params = array())
- {
+ public function __construct(string $service, string $privilege, array $params = []) {
$this->service = $service;
$this->privilege = $privilege;
$this->params = $params;
}
- public function toString()
- {
+ public function toString(): string {
$uri = "scope:{$this->service}:{$this->privilege}";
if (\count($this->params)) {
- $uri .= "?" . \http_build_query($this->params, '', '&');
+ $uri .= '?' . \http_build_query($this->params, '', '&');
}
return $uri;
}
@@ -44,8 +41,7 @@ public function toString()
* @return ScopeURI The parsed scope uri
* @throws \UnexpectedValueException
*/
- public static function parse($uri)
- {
+ public static function parse(string $uri): ScopeURI {
if (\strpos($uri, 'scope:') !== 0) {
throw new \UnexpectedValueException(
'Not a scope URI according to scheme');
@@ -60,12 +56,12 @@ public static function parse($uri)
$parts = \explode(':', $parts[0], 2);
- if (\count($parts) != 3) {
+ if (\count($parts) !== 3) {
throw new \UnexpectedValueException(
'Not enough parts for scope URI');
}
- list($scheme, $service, $privilege) = $parts;
+ [$scheme, $service, $privilege] = $parts;
return new ScopeURI($service, $privilege, $params);
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Jwt/ClientToken.php b/vendor/twilio/sdk/src/Twilio/Jwt/ClientToken.php
index 654562e..8e32432 100644
--- a/vendor/twilio/sdk/src/Twilio/Jwt/ClientToken.php
+++ b/vendor/twilio/sdk/src/Twilio/Jwt/ClientToken.php
@@ -8,12 +8,12 @@
/**
* Twilio Capability Token generator
*/
-class ClientToken
-{
+class ClientToken {
public $accountSid;
public $authToken;
/** @var ScopeURI[] $scopes */
public $scopes;
+ public $clientName;
/** @var string[] $customClaims */
private $customClaims;
@@ -27,13 +27,12 @@ class ClientToken
* @param string $authToken the secret key used to sign the token. Note,
* this auth token is not visible to the user of the token.
*/
- public function __construct($accountSid, $authToken)
- {
+ public function __construct(string $accountSid, string $authToken) {
$this->accountSid = $accountSid;
$this->authToken = $authToken;
- $this->scopes = array();
+ $this->scopes = [];
$this->clientName = false;
- $this->customClaims = array();
+ $this->customClaims = [];
}
/**
@@ -41,26 +40,23 @@ public function __construct($accountSid, $authToken)
* connections then configure the TwilioCapability through this method and
* specify the client name.
*
- * @param $clientName
+ * @param string $clientName
* @throws \InvalidArgumentException
*/
- public function allowClientIncoming($clientName)
- {
-
+ public function allowClientIncoming(string $clientName): void {
// clientName must be a non-zero length alphanumeric string
if (\preg_match('/\W/', $clientName)) {
throw new \InvalidArgumentException(
'Only alphanumeric characters allowed in client name.');
}
- if (\strlen($clientName) == 0) {
+ if ($clientName === '') {
throw new \InvalidArgumentException(
'Client name must not be a zero length string.');
}
$this->clientName = $clientName;
- $this->allow('client', 'incoming',
- array('clientName' => $clientName));
+ $this->allow('client', 'incoming', ['clientName' => $clientName]);
}
/**
@@ -70,11 +66,11 @@ public function allowClientIncoming($clientName)
* @param mixed[] $appParams signed parameters that the user of this token
* cannot overwrite.
*/
- public function allowClientOutgoing($appSid, array $appParams = array())
- {
- $this->allow('client', 'outgoing', array(
+ public function allowClientOutgoing(string $appSid, array $appParams = []): void {
+ $this->allow('client', 'outgoing', [
'appSid' => $appSid,
- 'appParams' => \http_build_query($appParams, '', '&')));
+ 'appParams' => \http_build_query($appParams, '', '&')
+ ]);
}
/**
@@ -82,12 +78,11 @@ public function allowClientOutgoing($appSid, array $appParams = array())
*
* @param mixed[] $filters key/value filters to apply to the event stream
*/
- public function allowEventStream(array $filters = array())
- {
- $this->allow('stream', 'subscribe', array(
+ public function allowEventStream(array $filters = []): void {
+ $this->allow('stream', 'subscribe', [
'path' => '/2010-04-01/Events',
'params' => \http_build_query($filters, '', '&'),
- ));
+ ]);
}
/**
@@ -96,8 +91,7 @@ public function allowEventStream(array $filters = array())
* @param string $name
* @param string $value
*/
- public function addClaim($name, $value)
- {
+ public function addClaim(string $name, string $value): void {
$this->customClaims[$name] = $value;
}
@@ -107,21 +101,20 @@ public function addClaim($name, $value)
*
* @param int $ttl the expiration time of the token (in seconds). Default
* value is 3600 (1hr)
- * @return ClientToken the newly generated token that is valid for $ttl
- * seconds
+ * @return string the newly generated token that is valid for $ttl seconds
*/
- public function generateToken($ttl = 3600)
- {
- $payload = \array_merge($this->customClaims, array(
- 'scope' => array(),
+ public function generateToken(int $ttl = 3600): string {
+ $payload = \array_merge($this->customClaims, [
+ 'scope' => [],
'iss' => $this->accountSid,
'exp' => \time() + $ttl,
- ));
- $scopeStrings = array();
+ ]);
+ $scopeStrings = [];
foreach ($this->scopes as $scope) {
- if ($scope->privilege == "outgoing" && $this->clientName)
- $scope->params["clientName"] = $this->clientName;
+ if ($scope->privilege === 'outgoing' && $this->clientName) {
+ $scope->params['clientName'] = $this->clientName;
+ }
$scopeStrings[] = $scope->toString();
}
@@ -129,8 +122,7 @@ public function generateToken($ttl = 3600)
return JWT::encode($payload, $this->authToken, 'HS256');
}
- protected function allow($service, $privilege, $params)
- {
+ protected function allow(string $service, string $privilege, array $params): void {
$this->scopes[] = new ScopeURI($service, $privilege, $params);
}
}
diff --git a/vendor/twilio/sdk/src/Twilio/Jwt/Grants/ChatGrant.php b/vendor/twilio/sdk/src/Twilio/Jwt/Grants/ChatGrant.php
index 622a8a7..2dfa9dd 100644
--- a/vendor/twilio/sdk/src/Twilio/Jwt/Grants/ChatGrant.php
+++ b/vendor/twilio/sdk/src/Twilio/Jwt/Grants/ChatGrant.php
@@ -4,8 +4,7 @@
namespace Twilio\Jwt\Grants;
-class ChatGrant implements Grant
-{
+class ChatGrant implements Grant {
private $serviceSid;
private $endpointId;
private $deploymentRoleSid;
@@ -16,8 +15,7 @@ class ChatGrant implements Grant
*
* @return string the service sid
*/
- public function getServiceSid()
- {
+ public function getServiceSid(): string {
return $this->serviceSid;
}
@@ -28,8 +26,7 @@ public function getServiceSid()
*
* @return $this updated grant
*/
- public function setServiceSid($serviceSid)
- {
+ public function setServiceSid(string $serviceSid): self {
$this->serviceSid = $serviceSid;
return $this;
}
@@ -39,8 +36,7 @@ public function setServiceSid($serviceSid)
*
* @return string the endpoint id
*/
- public function getEndpointId()
- {
+ public function getEndpointId(): string {
return $this->endpointId;
}
@@ -51,8 +47,7 @@ public function getEndpointId()
*
* @return $this updated grant
*/
- public function setEndpointId($endpointId)
- {
+ public function setEndpointId(string $endpointId): self {
$this->endpointId = $endpointId;
return $this;
}
@@ -62,8 +57,7 @@ public function setEndpointId($endpointId)
*
* @return string the deployment role sid
*/
- public function getDeploymentRoleSid()
- {
+ public function getDeploymentRoleSid(): string {
return $this->deploymentRoleSid;
}
@@ -74,8 +68,7 @@ public function getDeploymentRoleSid()
*
* @return $this updated grant
*/
- public function setDeploymentRoleSid($deploymentRoleSid)
- {
+ public function setDeploymentRoleSid(string $deploymentRoleSid): self {
$this->deploymentRoleSid = $deploymentRoleSid;
return $this;
}
@@ -85,8 +78,7 @@ public function setDeploymentRoleSid($deploymentRoleSid)
*
* @return string the push credential sid
*/
- public function getPushCredentialSid()
- {
+ public function getPushCredentialSid(): string {
return $this->pushCredentialSid;
}
@@ -97,8 +89,7 @@ public function getPushCredentialSid()
*
* @return $this updated grant
*/
- public function setPushCredentialSid($pushCredentialSid)
- {
+ public function setPushCredentialSid(string $pushCredentialSid): self {
$this->pushCredentialSid = $pushCredentialSid;
return $this;
}
@@ -108,9 +99,8 @@ public function setPushCredentialSid($pushCredentialSid)
*
* @return string type of the grant
*/
- public function getGrantKey()
- {
- return "chat";
+ public function getGrantKey(): string {
+ return 'chat';
}
/**
@@ -118,9 +108,8 @@ public function getGrantKey()
*
* @return array data of the grant
*/
- public function getPayload()
- {
- $payload = array();
+ public function getPayload(): array {
+ $payload = [];
if ($this->serviceSid) {
$payload['service_sid'] = $this->serviceSid;
}
@@ -136,4 +125,4 @@ public function getPayload()
return $payload;
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Jwt/Grants/Grant.php b/vendor/twilio/sdk/src/Twilio/Jwt/Grants/Grant.php
index c5eabd6..faf55ee 100644
--- a/vendor/twilio/sdk/src/Twilio/Jwt/Grants/Grant.php
+++ b/vendor/twilio/sdk/src/Twilio/Jwt/Grants/Grant.php
@@ -4,19 +4,18 @@
namespace Twilio\Jwt\Grants;
-interface Grant
-{
+interface Grant {
/**
* Returns the grant type
*
* @return string type of the grant
*/
- public function getGrantKey();
+ public function getGrantKey(): string;
/**
* Returns the grant data
*
* @return array data of the grant
*/
- public function getPayload();
-}
\ No newline at end of file
+ public function getPayload(): array;
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Jwt/Grants/SyncGrant.php b/vendor/twilio/sdk/src/Twilio/Jwt/Grants/SyncGrant.php
index 0d5fafe..ad7889d 100644
--- a/vendor/twilio/sdk/src/Twilio/Jwt/Grants/SyncGrant.php
+++ b/vendor/twilio/sdk/src/Twilio/Jwt/Grants/SyncGrant.php
@@ -2,8 +2,7 @@
namespace Twilio\Jwt\Grants;
-class SyncGrant implements Grant
-{
+class SyncGrant implements Grant {
private $serviceSid;
private $endpointId;
private $deploymentRoleSid;
@@ -14,8 +13,7 @@ class SyncGrant implements Grant
*
* @return string the service sid
*/
- public function getServiceSid()
- {
+ public function getServiceSid(): string {
return $this->serviceSid;
}
@@ -24,10 +22,9 @@ public function getServiceSid()
*
* @param string $serviceSid service sid of the grant
*
- * @return Services_Twilio_Auth_SyncGrant updated grant
+ * @return $this updated grant
*/
- public function setServiceSid($serviceSid)
- {
+ public function setServiceSid(string $serviceSid): self {
$this->serviceSid = $serviceSid;
return $this;
}
@@ -37,8 +34,7 @@ public function setServiceSid($serviceSid)
*
* @return string the endpoint id
*/
- public function getEndpointId()
- {
+ public function getEndpointId(): string {
return $this->endpointId;
}
@@ -47,10 +43,9 @@ public function getEndpointId()
*
* @param string $endpointId endpoint id of the grant
*
- * @return Services_Twilio_Auth_SyncGrant updated grant
+ * @return $this updated grant
*/
- public function setEndpointId($endpointId)
- {
+ public function setEndpointId(string $endpointId): self {
$this->endpointId = $endpointId;
return $this;
}
@@ -60,8 +55,7 @@ public function setEndpointId($endpointId)
*
* @return string the deployment role sid
*/
- public function getDeploymentRoleSid()
- {
+ public function getDeploymentRoleSid(): string {
return $this->deploymentRoleSid;
}
@@ -70,10 +64,9 @@ public function getDeploymentRoleSid()
*
* @param string $deploymentRoleSid role sid of the grant
*
- * @return Services_Twilio_Auth_SyncGrant updated grant
+ * @return $this updated grant
*/
- public function setDeploymentRoleSid($deploymentRoleSid)
- {
+ public function setDeploymentRoleSid(string $deploymentRoleSid): self {
$this->deploymentRoleSid = $deploymentRoleSid;
return $this;
}
@@ -83,8 +76,7 @@ public function setDeploymentRoleSid($deploymentRoleSid)
*
* @return string the push credential sid
*/
- public function getPushCredentialSid()
- {
+ public function getPushCredentialSid(): string {
return $this->pushCredentialSid;
}
@@ -93,10 +85,9 @@ public function getPushCredentialSid()
*
* @param string $pushCredentialSid push credential sid of the grant
*
- * @return Services_Twilio_Auth_SyncGrant updated grant
+ * @return $this updated grant
*/
- public function setPushCredentialSid($pushCredentialSid)
- {
+ public function setPushCredentialSid(string $pushCredentialSid): self {
$this->pushCredentialSid = $pushCredentialSid;
return $this;
}
@@ -106,9 +97,8 @@ public function setPushCredentialSid($pushCredentialSid)
*
* @return string type of the grant
*/
- public function getGrantKey()
- {
- return "data_sync";
+ public function getGrantKey(): string {
+ return 'data_sync';
}
/**
@@ -116,9 +106,8 @@ public function getGrantKey()
*
* @return array data of the grant
*/
- public function getPayload()
- {
- $payload = array();
+ public function getPayload(): array {
+ $payload = [];
if ($this->serviceSid) {
$payload['service_sid'] = $this->serviceSid;
}
@@ -134,5 +123,4 @@ public function getPayload()
return $payload;
}
-
}
diff --git a/vendor/twilio/sdk/src/Twilio/Jwt/Grants/TaskRouterGrant.php b/vendor/twilio/sdk/src/Twilio/Jwt/Grants/TaskRouterGrant.php
index 06aa317..8707c66 100644
--- a/vendor/twilio/sdk/src/Twilio/Jwt/Grants/TaskRouterGrant.php
+++ b/vendor/twilio/sdk/src/Twilio/Jwt/Grants/TaskRouterGrant.php
@@ -2,8 +2,7 @@
namespace Twilio\Jwt\Grants;
-class TaskRouterGrant implements Grant
-{
+class TaskRouterGrant implements Grant {
private $workspaceSid;
private $workerSid;
private $role;
@@ -13,8 +12,7 @@ class TaskRouterGrant implements Grant
*
* @return string the workspace sid
*/
- public function getWorkspaceSid()
- {
+ public function getWorkspaceSid(): string {
return $this->workspaceSid;
}
@@ -23,10 +21,9 @@ public function getWorkspaceSid()
*
* @param string $workspaceSid workspace sid of the grant
*
- * @return Services_Twilio_Auth_TaskRouterGrant updated grant
+ * @return $this updated grant
*/
- public function setWorkspaceSid($workspaceSid)
- {
+ public function setWorkspaceSid(string $workspaceSid): self {
$this->workspaceSid = $workspaceSid;
return $this;
}
@@ -36,20 +33,18 @@ public function setWorkspaceSid($workspaceSid)
*
* @return string the worker sid
*/
- public function getWorkerSid()
- {
+ public function getWorkerSid(): string {
return $this->workerSid;
}
/**
* Set the worker sid of this grant
*
- * @param string $worker worker sid of the grant
+ * @param string $workerSid worker sid of the grant
*
- * @return Services_Twilio_Auth_TaskRouterGrant updated grant
+ * @return $this updated grant
*/
- public function setWorkerSid($workerSid)
- {
+ public function setWorkerSid(string $workerSid): self {
$this->workerSid = $workerSid;
return $this;
}
@@ -59,8 +54,7 @@ public function setWorkerSid($workerSid)
*
* @return string the role
*/
- public function getRole()
- {
+ public function getRole(): string {
return $this->role;
}
@@ -69,10 +63,9 @@ public function getRole()
*
* @param string $role role of the grant
*
- * @return Services_Twilio_Auth_TaskRouterGrant updated grant
+ * @return $this updated grant
*/
- public function setRole($role)
- {
+ public function setRole(string $role): self {
$this->role = $role;
return $this;
}
@@ -82,9 +75,8 @@ public function setRole($role)
*
* @return string type of the grant
*/
- public function getGrantKey()
- {
- return "task_router";
+ public function getGrantKey(): string {
+ return 'task_router';
}
/**
@@ -92,9 +84,8 @@ public function getGrantKey()
*
* @return array data of the grant
*/
- public function getPayload()
- {
- $payload = array();
+ public function getPayload(): array {
+ $payload = [];
if ($this->workspaceSid) {
$payload['workspace_sid'] = $this->workspaceSid;
}
@@ -107,5 +98,4 @@ public function getPayload()
return $payload;
}
-
}
diff --git a/vendor/twilio/sdk/src/Twilio/Jwt/Grants/VideoGrant.php b/vendor/twilio/sdk/src/Twilio/Jwt/Grants/VideoGrant.php
index c6f7112..25887ce 100644
--- a/vendor/twilio/sdk/src/Twilio/Jwt/Grants/VideoGrant.php
+++ b/vendor/twilio/sdk/src/Twilio/Jwt/Grants/VideoGrant.php
@@ -4,8 +4,7 @@
namespace Twilio\Jwt\Grants;
-class VideoGrant implements Grant
-{
+class VideoGrant implements Grant {
private $room;
@@ -14,8 +13,7 @@ class VideoGrant implements Grant
*
* @return string room name or sid set in this grant
*/
- public function getRoom()
- {
+ public function getRoom(): string {
return $this->room;
}
@@ -25,8 +23,7 @@ public function getRoom()
* @param string $roomSidOrName room sid or name
* @return $this updated grant
*/
- public function setRoom($roomSidOrName)
- {
+ public function setRoom(string $roomSidOrName): self {
$this->room = $roomSidOrName;
return $this;
}
@@ -36,8 +33,7 @@ public function setRoom($roomSidOrName)
*
* @return string type of the grant
*/
- public function getGrantKey()
- {
+ public function getGrantKey(): string {
return 'video';
}
@@ -46,13 +42,11 @@ public function getGrantKey()
*
* @return array data of the grant
*/
- public function getPayload()
- {
- $payload = array();
+ public function getPayload(): array {
+ $payload = [];
if ($this->room) {
$payload['room'] = $this->room;
}
return $payload;
}
-
}
diff --git a/vendor/twilio/sdk/src/Twilio/Jwt/Grants/VoiceGrant.php b/vendor/twilio/sdk/src/Twilio/Jwt/Grants/VoiceGrant.php
index 5817d0e..a3608b0 100644
--- a/vendor/twilio/sdk/src/Twilio/Jwt/Grants/VoiceGrant.php
+++ b/vendor/twilio/sdk/src/Twilio/Jwt/Grants/VoiceGrant.php
@@ -4,8 +4,7 @@
namespace Twilio\Jwt\Grants;
-class VoiceGrant implements Grant
-{
+class VoiceGrant implements Grant {
private $incomingAllow;
private $outgoingApplicationSid;
@@ -16,22 +15,20 @@ class VoiceGrant implements Grant
/**
* Returns whether incoming is allowed
*
- * @return boolean whether incoming is allowed
+ * @return bool whether incoming is allowed
*/
- public function getIncomingAllow()
- {
+ public function getIncomingAllow(): bool {
return $this->incomingAllow;
}
/**
* Set whether incoming is allowed
*
- * @param boolean $incomingAllow whether incoming is allowed
+ * @param bool $incomingAllow whether incoming is allowed
*
* @return $this updated grant
*/
- public function setIncomingAllow($incomingAllow)
- {
+ public function setIncomingAllow(bool $incomingAllow): self {
$this->incomingAllow = $incomingAllow;
return $this;
}
@@ -41,8 +38,7 @@ public function setIncomingAllow($incomingAllow)
*
* @return string the outgoing application sid
*/
- public function getOutgoingApplicationSid()
- {
+ public function getOutgoingApplicationSid(): string {
return $this->outgoingApplicationSid;
}
@@ -53,8 +49,7 @@ public function getOutgoingApplicationSid()
*
* @return $this updated grant
*/
- public function setOutgoingApplicationSid($outgoingApplicationSid)
- {
+ public function setOutgoingApplicationSid(string $outgoingApplicationSid): self {
$this->outgoingApplicationSid = $outgoingApplicationSid;
return $this;
}
@@ -64,8 +59,7 @@ public function setOutgoingApplicationSid($outgoingApplicationSid)
*
* @return array the outgoing application params
*/
- public function getOutgoingApplicationParams()
- {
+ public function getOutgoingApplicationParams(): array {
return $this->outgoingApplicationParams;
}
@@ -73,12 +67,11 @@ public function getOutgoingApplicationParams()
* Set the outgoing application of the the grant
*
* @param string $sid outgoing application sid of the grant
- * @param string $params params to pass the the application
+ * @param array $params params to pass the the application
*
* @return $this updated grant
*/
- public function setOutgoingApplication($sid, $params)
- {
+ public function setOutgoingApplication(string $sid, array $params): self {
$this->outgoingApplicationSid = $sid;
$this->outgoingApplicationParams = $params;
return $this;
@@ -89,8 +82,7 @@ public function setOutgoingApplication($sid, $params)
*
* @return string the push credential sid
*/
- public function getPushCredentialSid()
- {
+ public function getPushCredentialSid(): string {
return $this->pushCredentialSid;
}
@@ -101,8 +93,7 @@ public function getPushCredentialSid()
*
* @return $this updated grant
*/
- public function setPushCredentialSid($pushCredentialSid)
- {
+ public function setPushCredentialSid(string $pushCredentialSid): self {
$this->pushCredentialSid = $pushCredentialSid;
return $this;
}
@@ -112,8 +103,7 @@ public function setPushCredentialSid($pushCredentialSid)
*
* @return string the endpoint id
*/
- public function getEndpointId()
- {
+ public function getEndpointId(): string {
return $this->endpointId;
}
@@ -124,8 +114,7 @@ public function getEndpointId()
*
* @return $this updated grant
*/
- public function setEndpointId($endpointId)
- {
+ public function setEndpointId(string $endpointId): self {
$this->endpointId = $endpointId;
return $this;
}
@@ -135,9 +124,8 @@ public function setEndpointId($endpointId)
*
* @return string type of the grant
*/
- public function getGrantKey()
- {
- return "voice";
+ public function getGrantKey(): string {
+ return 'voice';
}
/**
@@ -145,17 +133,16 @@ public function getGrantKey()
*
* @return array data of the grant
*/
- public function getPayload()
- {
- $payload = array();
- if ($this->incomingAllow == true) {
- $incoming = array();
+ public function getPayload(): array {
+ $payload = [];
+ if ($this->incomingAllow === true) {
+ $incoming = [];
$incoming['allow'] = true;
$payload['incoming'] = $incoming;
}
if ($this->outgoingApplicationSid) {
- $outgoing = array();
+ $outgoing = [];
$outgoing['application_sid'] = $this->outgoingApplicationSid;
if ($this->outgoingApplicationParams) {
@@ -175,6 +162,4 @@ public function getPayload()
return $payload;
}
-
-
}
diff --git a/vendor/twilio/sdk/src/Twilio/Jwt/JWT.php b/vendor/twilio/sdk/src/Twilio/Jwt/JWT.php
index 2add11d..8e1cbd2 100644
--- a/vendor/twilio/sdk/src/Twilio/Jwt/JWT.php
+++ b/vendor/twilio/sdk/src/Twilio/Jwt/JWT.php
@@ -10,8 +10,7 @@
*
* @author Neuman Vong
*/
-class JWT
-{
+class JWT {
/**
* @param string $jwt The JWT
* @param string|null $key The secret key
@@ -20,10 +19,9 @@ class JWT
* @throws \DomainException
* @throws \UnexpectedValueException
*/
- public static function decode($jwt, $key = null, $verify = true)
- {
+ public static function decode(string $jwt, string $key = null, bool $verify = true) {
$tks = \explode('.', $jwt);
- if (\count($tks) != 3) {
+ if (\count($tks) !== 3) {
throw new \UnexpectedValueException('Wrong number of segments');
}
list($headb64, $payloadb64, $cryptob64) = $tks;
@@ -40,13 +38,32 @@ public static function decode($jwt, $key = null, $verify = true)
if (empty($header->alg)) {
throw new \DomainException('Empty algorithm');
}
- if ($sig != self::sign("$headb64.$payloadb64", $key, $header->alg)) {
+
+ if (!hash_equals($sig, self::sign("$headb64.$payloadb64", $key, $header->alg))) {
throw new \UnexpectedValueException('Signature verification failed');
}
}
return $payload;
}
+ /**
+ * @param string $jwt The JWT
+ * @return object The JWT's header as a PHP object
+ * @throws \UnexpectedValueException
+ */
+ public static function getHeader(string $jwt) {
+ $tks = \explode('.', $jwt);
+ if (\count($tks) !== 3) {
+ throw new \UnexpectedValueException('Wrong number of segments');
+ }
+ list($headb64) = $tks;
+ if (null === ($header = self::jsonDecode(self::urlsafeB64Decode($headb64)))
+ ) {
+ throw new \UnexpectedValueException('Invalid segment encoding');
+ }
+ return $header;
+ }
+
/**
* @param object|array $payload PHP object or array
* @param string $key The secret key
@@ -55,12 +72,11 @@ public static function decode($jwt, $key = null, $verify = true)
*
* @return string A JWT
*/
- public static function encode($payload, $key, $algo = 'HS256', $additionalHeaders = array())
- {
- $header = array('typ' => 'JWT', 'alg' => $algo);
- $header = $header + $additionalHeaders;
+ public static function encode($payload, string $key, string $algo = 'HS256', array $additionalHeaders = []): string {
+ $header = ['typ' => 'JWT', 'alg' => $algo];
+ $header += $additionalHeaders;
- $segments = array();
+ $segments = [];
$segments[] = self::urlsafeB64Encode(self::jsonEncode($header));
$segments[] = self::urlsafeB64Encode(self::jsonEncode($payload));
$signing_input = \implode('.', $segments);
@@ -78,13 +94,12 @@ public static function encode($payload, $key, $algo = 'HS256', $additionalHeader
* @return string An encrypted message
* @throws \DomainException
*/
- public static function sign($msg, $key, $method = 'HS256')
- {
- $methods = array(
+ public static function sign(string $msg, string $key, string $method = 'HS256'): string {
+ $methods = [
'HS256' => 'sha256',
'HS384' => 'sha384',
'HS512' => 'sha512',
- );
+ ];
if (empty($methods[$method])) {
throw new \DomainException('Algorithm not supported');
}
@@ -96,8 +111,7 @@ public static function sign($msg, $key, $method = 'HS256')
* @return object Object representation of JSON string
* @throws \DomainException
*/
- public static function jsonDecode($input)
- {
+ public static function jsonDecode(string $input) {
$obj = \json_decode($input);
if (\function_exists('json_last_error') && $errno = \json_last_error()) {
self::handleJsonError($errno);
@@ -112,8 +126,7 @@ public static function jsonDecode($input)
* @return string JSON representation of the PHP object or array
* @throws \DomainException
*/
- public static function jsonEncode($input)
- {
+ public static function jsonEncode($input): string {
$json = \json_encode($input);
if (\function_exists('json_last_error') && $errno = \json_last_error()) {
self::handleJsonError($errno);
@@ -128,10 +141,9 @@ public static function jsonEncode($input)
*
* @return string A decoded string
*/
- public static function urlsafeB64Decode($input)
- {
- $padlen = 4 - \strlen($input) % 4;
- $input .= \str_repeat('=', $padlen);
+ public static function urlsafeB64Decode(string $input): string {
+ $padLen = 4 - \strlen($input) % 4;
+ $input .= \str_repeat('=', $padLen);
return \base64_decode(\strtr($input, '-_', '+/'));
}
@@ -140,8 +152,7 @@ public static function urlsafeB64Decode($input)
*
* @return string The base64 encode of what you passed in
*/
- public static function urlsafeB64Encode($input)
- {
+ public static function urlsafeB64Encode(string $input): string {
return \str_replace('=', '', \strtr(\base64_encode($input), '+/', '-_'));
}
@@ -150,16 +161,12 @@ public static function urlsafeB64Encode($input)
*
* @throws \DomainException
*/
- private static function handleJsonError($errno)
- {
- $messages = array(
+ private static function handleJsonError(int $errno): void {
+ $messages = [
JSON_ERROR_DEPTH => 'Maximum stack depth exceeded',
JSON_ERROR_CTRL_CHAR => 'Unexpected control character found',
JSON_ERROR_SYNTAX => 'Syntax error, malformed JSON'
- );
- throw new \DomainException(isset($messages[$errno])
- ? $messages[$errno]
- : 'Unknown JSON error: ' . $errno
- );
+ ];
+ throw new \DomainException($messages[$errno] ?? 'Unknown JSON error: ' . $errno);
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Jwt/TaskRouter/CapabilityToken.php b/vendor/twilio/sdk/src/Twilio/Jwt/TaskRouter/CapabilityToken.php
index 2ae6393..e2ed051 100644
--- a/vendor/twilio/sdk/src/Twilio/Jwt/TaskRouter/CapabilityToken.php
+++ b/vendor/twilio/sdk/src/Twilio/Jwt/TaskRouter/CapabilityToken.php
@@ -12,8 +12,7 @@
* @author Justin Witz
* @license http://creativecommons.org/licenses/MIT/ MIT
*/
-class CapabilityToken
-{
+class CapabilityToken {
protected $accountSid;
protected $authToken;
private $friendlyName;
@@ -28,15 +27,15 @@ class CapabilityToken
protected $channelId;
protected $resourceUrl;
- protected $required = array("required" => true);
- protected $optional = array("required" => false);
+ protected $required = ['required' => true];
+ protected $optional = ['required' => false];
- public function __construct($accountSid, $authToken, $workspaceSid, $channelId, $resourceUrl = null, $overrideBaseUrl = null, $overrideBaseWSUrl = null)
- {
+ public function __construct(string $accountSid, string $authToken, string $workspaceSid, string $channelId,
+ string $resourceUrl = null, string $overrideBaseUrl = null, string $overrideBaseWSUrl = null) {
$this->accountSid = $accountSid;
$this->authToken = $authToken;
$this->friendlyName = $channelId;
- $this->policies = array();
+ $this->policies = [];
$this->workspaceSid = $workspaceSid;
$this->channelId = $channelId;
@@ -46,7 +45,7 @@ public function __construct($accountSid, $authToken, $workspaceSid, $channelId,
if (isset($overrideBaseWSUrl)) {
$this->baseWsUrl = $overrideBaseWSUrl;
}
- $this->baseUrl = $this->baseUrl . '/Workspaces/' . $workspaceSid;
+ $this->baseUrl .= '/Workspaces/' . $workspaceSid;
$this->validateJWT();
@@ -55,95 +54,83 @@ public function __construct($accountSid, $authToken, $workspaceSid, $channelId,
}
//add permissions to GET and POST to the event-bridge channel
- $this->allow($this->baseWsUrl . "/" . $this->accountSid . "/" . $this->channelId, "GET", null, null);
- $this->allow($this->baseWsUrl . "/" . $this->accountSid . "/" . $this->channelId, "POST", null, null);
+ $this->allow($this->baseWsUrl . '/' . $this->accountSid . '/' . $this->channelId, 'GET', null, null);
+ $this->allow($this->baseWsUrl . '/' . $this->accountSid . '/' . $this->channelId, 'POST', null, null);
//add permissions to fetch the instance resource
- $this->allow($this->resourceUrl, "GET", null, null);
+ $this->allow($this->resourceUrl, 'GET', null, null);
}
- protected function setupResource()
- {
-
+ protected function setupResource(): void {
}
- public function addPolicyDeconstructed($url, $method, $queryFilter = array(), $postFilter = array(), $allow = true)
- {
+ public function addPolicyDeconstructed(string $url, string $method, ?array $queryFilter = [], ?array $postFilter = [], bool $allow = true): Policy {
$policy = new Policy($url, $method, $queryFilter, $postFilter, $allow);
- \array_push($this->policies, $policy);
+ $this->policies[] = $policy;
return $policy;
}
- public function allow($url, $method, $queryFilter = array(), $postFilter = array())
- {
+ public function allow(string $url, string $method, ?array $queryFilter = [], ?array $postFilter = []): void {
$this->addPolicyDeconstructed($url, $method, $queryFilter, $postFilter, true);
}
- public function deny($url, $method, $queryFilter = array(), $postFilter = array())
- {
+ public function deny(string $url, string $method, array $queryFilter = [], array $postFilter = []): void {
$this->addPolicyDeconstructed($url, $method, $queryFilter, $postFilter, false);
}
- private function validateJWT()
- {
- if (!isset($this->accountSid) || \substr($this->accountSid, 0, 2) != 'AC') {
- throw new \Exception("Invalid AccountSid provided: " . $this->accountSid);
+ private function validateJWT(): void {
+ if (!isset($this->accountSid) || \strpos($this->accountSid, 'AC') !== 0) {
+ throw new \Exception('Invalid AccountSid provided: ' . $this->accountSid);
}
- if (!isset($this->workspaceSid) || \substr($this->workspaceSid, 0, 2) != 'WS') {
- throw new \Exception("Invalid WorkspaceSid provided: " . $this->workspaceSid);
+ if (!isset($this->workspaceSid) || \strpos($this->workspaceSid, 'WS') !== 0) {
+ throw new \Exception('Invalid WorkspaceSid provided: ' . $this->workspaceSid);
}
if (!isset($this->channelId)) {
- throw new \Exception("ChannelId not provided");
+ throw new \Exception('ChannelId not provided');
}
$prefix = \substr($this->channelId, 0, 2);
- if ($prefix != 'WS' && $prefix != 'WK' && $prefix != 'WQ') {
+ if ($prefix !== 'WS' && $prefix !== 'WK' && $prefix !== 'WQ') {
throw new \Exception("Invalid ChannelId provided: " . $this->channelId);
}
}
- public function allowFetchSubresources()
- {
+ public function allowFetchSubresources(): void {
$method = 'GET';
- $queryFilter = array();
- $postFilter = array();
+ $queryFilter = [];
+ $postFilter = [];
$this->allow($this->resourceUrl . '/**', $method, $queryFilter, $postFilter);
}
- public function allowUpdates()
- {
+ public function allowUpdates(): void {
$method = 'POST';
- $queryFilter = array();
- $postFilter = array();
+ $queryFilter = [];
+ $postFilter = [];
$this->allow($this->resourceUrl, $method, $queryFilter, $postFilter);
}
- public function allowUpdatesSubresources()
- {
+ public function allowUpdatesSubresources(): void {
$method = 'POST';
- $queryFilter = array();
- $postFilter = array();
+ $queryFilter = [];
+ $postFilter = [];
$this->allow($this->resourceUrl . '/**', $method, $queryFilter, $postFilter);
}
- public function allowDelete()
- {
+ public function allowDelete(): void {
$method = 'DELETE';
- $queryFilter = array();
- $postFilter = array();
+ $queryFilter = [];
+ $postFilter = [];
$this->allow($this->resourceUrl, $method, $queryFilter, $postFilter);
}
- public function allowDeleteSubresources()
- {
+ public function allowDeleteSubresources(): void {
$method = 'DELETE';
- $queryFilter = array();
- $postFilter = array();
+ $queryFilter = [];
+ $postFilter = [];
$this->allow($this->resourceUrl . '/**', $method, $queryFilter, $postFilter);
}
- public function generateToken($ttl = 3600, $extraAttributes = array())
- {
- $payload = array(
+ public function generateToken(int $ttl = 3600, array $extraAttributes = []): string {
+ $payload = [
'version' => $this->version,
'friendly_name' => $this->friendlyName,
'iss' => $this->accountSid,
@@ -151,11 +138,11 @@ public function generateToken($ttl = 3600, $extraAttributes = array())
'account_sid' => $this->accountSid,
'channel' => $this->channelId,
'workspace_sid' => $this->workspaceSid
- );
+ ];
- if (\substr($this->channelId, 0, 2) == 'WK') {
+ if (\strpos($this->channelId, 'WK') === 0) {
$payload['worker_sid'] = $this->channelId;
- } else if (\substr($this->channelId, 0, 2) == 'WQ') {
+ } else if (\strpos($this->channelId, 'WQ') === 0) {
$payload['taskqueue_sid'] = $this->channelId;
}
@@ -163,7 +150,7 @@ public function generateToken($ttl = 3600, $extraAttributes = array())
$payload[$key] = $value;
}
- $policyStrings = array();
+ $policyStrings = [];
foreach ($this->policies as $policy) {
$policyStrings[] = $policy->toArray();
}
@@ -171,4 +158,4 @@ public function generateToken($ttl = 3600, $extraAttributes = array())
$payload['policies'] = $policyStrings;
return JWT::encode($payload, $this->authToken, 'HS256');
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Jwt/TaskRouter/Policy.php b/vendor/twilio/sdk/src/Twilio/Jwt/TaskRouter/Policy.php
index afd5351..2e41dfd 100644
--- a/vendor/twilio/sdk/src/Twilio/Jwt/TaskRouter/Policy.php
+++ b/vendor/twilio/sdk/src/Twilio/Jwt/TaskRouter/Policy.php
@@ -10,16 +10,14 @@
* @author Justin Witz
* @license http://creativecommons.org/licenses/MIT/ MIT
*/
-class Policy
-{
+class Policy {
private $url;
private $method;
private $queryFilter;
private $postFilter;
private $allow;
- public function __construct($url, $method, $queryFilter = array(), $postFilter = array(), $allow = true)
- {
+ public function __construct(string $url, string $method, ?array $queryFilter = [], ?array $postFilter = [], bool $allow = true) {
$this->url = $url;
$this->method = $method;
$this->queryFilter = $queryFilter;
@@ -27,27 +25,24 @@ public function __construct($url, $method, $queryFilter = array(), $postFilter =
$this->allow = $allow;
}
- public function addQueryFilter($queryFilter)
- {
- \array_push($this->queryFilter, $queryFilter);
+ public function addQueryFilter($queryFilter): void {
+ $this->queryFilter[] = $queryFilter;
}
- public function addPostFilter($postFilter)
- {
- \array_push($this->postFilter, $postFilter);
+ public function addPostFilter($postFilter): void {
+ $this->postFilter[] = $postFilter;
}
- public function toArray()
- {
- $policy_array = array('url' => $this->url, 'method' => $this->method, 'allow' => $this->allow);
- if (!\is_null($this->queryFilter)) {
+ public function toArray(): array {
+ $policy_array = ['url' => $this->url, 'method' => $this->method, 'allow' => $this->allow];
+ if ($this->queryFilter !== null) {
if (\count($this->queryFilter) > 0) {
$policy_array['query_filter'] = $this->queryFilter;
} else {
$policy_array['query_filter'] = new \stdClass();
}
}
- if (!\is_null($this->postFilter)) {
+ if ($this->postFilter !== null) {
if (\count($this->postFilter) > 0) {
$policy_array['post_filter'] = $this->postFilter;
} else {
@@ -56,4 +51,4 @@ public function toArray()
}
return $policy_array;
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Jwt/TaskRouter/TaskQueueCapability.php b/vendor/twilio/sdk/src/Twilio/Jwt/TaskRouter/TaskQueueCapability.php
index fcceec7..51ca2d0 100644
--- a/vendor/twilio/sdk/src/Twilio/Jwt/TaskRouter/TaskQueueCapability.php
+++ b/vendor/twilio/sdk/src/Twilio/Jwt/TaskRouter/TaskQueueCapability.php
@@ -9,15 +9,13 @@
* @author Justin Witz
* @license http://creativecommons.org/licenses/MIT/ MIT
*/
-class TaskQueueCapability extends CapabilityToken
-{
- public function __construct($accountSid, $authToken, $workspaceSid, $taskQueueSid, $overrideBaseUrl = null, $overrideBaseWSUrl = null)
- {
+class TaskQueueCapability extends CapabilityToken {
+ public function __construct(string $accountSid, string $authToken, string $workspaceSid, string $taskQueueSid,
+ string $overrideBaseUrl = null, string $overrideBaseWSUrl = null) {
parent::__construct($accountSid, $authToken, $workspaceSid, $taskQueueSid, null, $overrideBaseUrl, $overrideBaseWSUrl);
}
- protected function setupResource()
- {
+ protected function setupResource(): void {
$this->resourceUrl = $this->baseUrl . '/TaskQueues/' . $this->channelId;
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Jwt/TaskRouter/WorkerCapability.php b/vendor/twilio/sdk/src/Twilio/Jwt/TaskRouter/WorkerCapability.php
index 0c19a05..2bde217 100644
--- a/vendor/twilio/sdk/src/Twilio/Jwt/TaskRouter/WorkerCapability.php
+++ b/vendor/twilio/sdk/src/Twilio/Jwt/TaskRouter/WorkerCapability.php
@@ -9,14 +9,13 @@
* @author Justin Witz
* @license http://creativecommons.org/licenses/MIT/ MIT
*/
-class WorkerCapability extends CapabilityToken
-{
+class WorkerCapability extends CapabilityToken {
private $tasksUrl;
private $workerReservationsUrl;
private $activityUrl;
- public function __construct($accountSid, $authToken, $workspaceSid, $workerSid, $overrideBaseUrl = null, $overrideBaseWSUrl = null)
- {
+ public function __construct(string $accountSid, string $authToken, string $workspaceSid, string $workerSid,
+ string $overrideBaseUrl = null, string $overrideBaseWSUrl = null) {
parent::__construct($accountSid, $authToken, $workspaceSid, $workerSid, null, $overrideBaseUrl, $overrideBaseWSUrl);
$this->tasksUrl = $this->baseUrl . '/Tasks/**';
@@ -24,30 +23,27 @@ public function __construct($accountSid, $authToken, $workspaceSid, $workerSid,
$this->workerReservationsUrl = $this->resourceUrl . '/Reservations/**';
//add permissions to fetch the list of activities, tasks, and worker reservations
- $this->allow($this->activityUrl, "GET", null, null);
- $this->allow($this->tasksUrl, "GET", null, null);
- $this->allow($this->workerReservationsUrl, "GET", null, null);
+ $this->allow($this->activityUrl, 'GET', null, null);
+ $this->allow($this->tasksUrl, 'GET', null, null);
+ $this->allow($this->workerReservationsUrl, 'GET', null, null);
}
- protected function setupResource()
- {
+ protected function setupResource(): void {
$this->resourceUrl = $this->baseUrl . '/Workers/' . $this->channelId;
}
- public function allowActivityUpdates()
- {
+ public function allowActivityUpdates(): void {
$method = 'POST';
- $queryFilter = array();
- $postFilter = array("ActivitySid" => $this->required);
+ $queryFilter = [];
+ $postFilter = ['ActivitySid' => $this->required];
$this->allow($this->resourceUrl, $method, $queryFilter, $postFilter);
}
- public function allowReservationUpdates()
- {
+ public function allowReservationUpdates(): void {
$method = 'POST';
- $queryFilter = array();
- $postFilter = array();
+ $queryFilter = [];
+ $postFilter = [];
$this->allow($this->tasksUrl, $method, $queryFilter, $postFilter);
$this->allow($this->workerReservationsUrl, $method, $queryFilter, $postFilter);
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Jwt/TaskRouter/WorkspaceCapability.php b/vendor/twilio/sdk/src/Twilio/Jwt/TaskRouter/WorkspaceCapability.php
index b9916cd..c644ec1 100644
--- a/vendor/twilio/sdk/src/Twilio/Jwt/TaskRouter/WorkspaceCapability.php
+++ b/vendor/twilio/sdk/src/Twilio/Jwt/TaskRouter/WorkspaceCapability.php
@@ -4,15 +4,13 @@
namespace Twilio\Jwt\TaskRouter;
-class WorkspaceCapability extends CapabilityToken
-{
- public function __construct($accountSid, $authToken, $workspaceSid, $overrideBaseUrl = null, $overrideBaseWSUrl = null)
- {
+class WorkspaceCapability extends CapabilityToken {
+ public function __construct(string $accountSid, string $authToken, string $workspaceSid,
+ string $overrideBaseUrl = null, string $overrideBaseWSUrl = null) {
parent::__construct($accountSid, $authToken, $workspaceSid, $workspaceSid, null, $overrideBaseUrl, $overrideBaseWSUrl);
}
- protected function setupResource()
- {
+ protected function setupResource(): void {
$this->resourceUrl = $this->baseUrl;
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/ListResource.php b/vendor/twilio/sdk/src/Twilio/ListResource.php
index 5405ade..889f208 100644
--- a/vendor/twilio/sdk/src/Twilio/ListResource.php
+++ b/vendor/twilio/sdk/src/Twilio/ListResource.php
@@ -4,19 +4,16 @@
namespace Twilio;
-class ListResource
-{
+class ListResource {
protected $version;
- protected $solution = array();
+ protected $solution = [];
protected $uri;
- public function __construct(Version $version)
- {
+ public function __construct(Version $version) {
$this->version = $version;
}
- public function __toString()
- {
+ public function __toString(): string {
return '[ListResource]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Options.php b/vendor/twilio/sdk/src/Twilio/Options.php
index fb98604..ac262b1 100644
--- a/vendor/twilio/sdk/src/Twilio/Options.php
+++ b/vendor/twilio/sdk/src/Twilio/Options.php
@@ -4,12 +4,10 @@
namespace Twilio;
-abstract class Options implements \IteratorAggregate
-{
- protected $options = array();
+abstract class Options implements \IteratorAggregate {
+ protected $options = [];
- public function getIterator()
- {
+ public function getIterator(): \Traversable {
return new \ArrayIterator($this->options);
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Page.php b/vendor/twilio/sdk/src/Twilio/Page.php
index 16705f5..df59add 100644
--- a/vendor/twilio/sdk/src/Twilio/Page.php
+++ b/vendor/twilio/sdk/src/Twilio/Page.php
@@ -8,9 +8,8 @@
use Twilio\Exceptions\RestException;
use Twilio\Http\Response;
-abstract class Page implements \Iterator
-{
- protected static $metaKeys = array(
+abstract class Page implements \Iterator {
+ protected static $metaKeys = [
'end',
'first_page_uri',
'next_page_uri',
@@ -22,7 +21,7 @@ abstract class Page implements \Iterator
'num_pages',
'start',
'uri',
- );
+ ];
protected $version;
protected $payload;
@@ -31,74 +30,71 @@ abstract class Page implements \Iterator
abstract public function buildInstance(array $payload);
- public function __construct(Version $version, Response $response)
- {
+ public function __construct(Version $version, Response $response) {
$payload = $this->processResponse($response);
$this->version = $version;
$this->payload = $payload;
- $this->solution = array();
+ $this->solution = [];
$this->records = new \ArrayIterator($this->loadPage());
}
- protected function processResponse(Response $response)
- {
- if ($response->getStatusCode() != 200 && !$this->isPagingEol($response->getContent())) {
+ protected function processResponse(Response $response) {
+ if ($response->getStatusCode() !== 200 && !$this->isPagingEol($response->getContent())) {
$message = '[HTTP ' . $response->getStatusCode() . '] Unable to fetch page';
$code = $response->getStatusCode();
$content = $response->getContent();
+ $details = [];
+ $moreInfo = '';
if (\is_array($content)) {
$message .= isset($content['message']) ? ': ' . $content['message'] : '';
- $code = isset($content['code']) ? $content['code'] : $code;
+ $code = $content['code'] ?? $code;
+ $moreInfo = $content['more_info'] ?? '';
+ $details = $content['details'] ?? [] ;
}
- throw new RestException($message, $code, $response->getStatusCode());
+ throw new RestException($message, $code, $response->getStatusCode(), $moreInfo, $details);
}
return $response->getContent();
}
- protected function isPagingEol($content)
- {
- return !\is_null($content) && \array_key_exists('code', $content) && $content['code'] == 20006;
+ protected function isPagingEol(?array $content): bool {
+ return $content !== null && \array_key_exists('code', $content) && $content['code'] === 20006;
}
- protected function hasMeta($key)
- {
+ protected function hasMeta(string $key): bool {
return \array_key_exists('meta', $this->payload) && \array_key_exists($key, $this->payload['meta']);
}
- protected function getMeta($key, $default = null)
- {
+ protected function getMeta(string $key, string $default = null): ?string {
return $this->hasMeta($key) ? $this->payload['meta'][$key] : $default;
}
- protected function loadPage()
- {
+ protected function loadPage(): array {
$key = $this->getMeta('key');
if ($key) {
return $this->payload[$key];
- } else {
- $keys = \array_keys($this->payload);
- $key = \array_diff($keys, self::$metaKeys);
- $key = \array_values($key);
+ }
- if (\count($key) == 1) {
- return $this->payload[$key[0]];
- }
+ $keys = \array_keys($this->payload);
+ $key = \array_diff($keys, self::$metaKeys);
+ $key = \array_values($key);
+
+ if (\count($key) === 1) {
+ return $this->payload[$key[0]];
}
// handle end of results error code
if ($this->isPagingEol($this->payload)) {
- return array();
+ return [];
}
throw new DeserializeException('Page Records can not be deserialized');
}
- public function getPreviousPageUrl()
- {
+ public function getPreviousPageUrl(): ?string {
if ($this->hasMeta('previous_page_url')) {
return $this->getMeta('previous_page_url');
} else if (\array_key_exists('previous_page_uri', $this->payload) && $this->payload['previous_page_uri']) {
@@ -107,8 +103,7 @@ public function getPreviousPageUrl()
return null;
}
- public function getNextPageUrl()
- {
+ public function getNextPageUrl(): ?string {
if ($this->hasMeta('next_page_url')) {
return $this->getMeta('next_page_url');
} else if (\array_key_exists('next_page_uri', $this->payload) && $this->payload['next_page_uri']) {
@@ -117,8 +112,7 @@ public function getNextPageUrl()
return null;
}
- public function nextPage()
- {
+ public function nextPage(): ?Page {
if (!$this->getNextPageUrl()) {
return null;
}
@@ -127,8 +121,7 @@ public function nextPage()
return new static($this->getVersion(), $response, $this->solution);
}
- public function previousPage()
- {
+ public function previousPage(): ?Page {
if (!$this->getPreviousPageUrl()) {
return null;
}
@@ -143,8 +136,8 @@ public function previousPage()
* @link http://php.net/manual/en/iterator.current.php
* @return mixed Can return any type.
*/
- public function current()
- {
+ #[\ReturnTypeWillChange]
+ public function current() {
return $this->buildInstance($this->records->current());
}
@@ -154,8 +147,7 @@ public function current()
* @link http://php.net/manual/en/iterator.next.php
* @return void Any returned value is ignored.
*/
- public function next()
- {
+ public function next(): void {
$this->records->next();
}
@@ -165,8 +157,8 @@ public function next()
* @link http://php.net/manual/en/iterator.key.php
* @return mixed scalar on success, or null on failure.
*/
- public function key()
- {
+ #[\ReturnTypeWillChange]
+ public function key() {
return $this->records->key();
}
@@ -174,11 +166,10 @@ public function key()
* (PHP 5 >= 5.0.0)
* Checks if current position is valid
* @link http://php.net/manual/en/iterator.valid.php
- * @return boolean The return value will be casted to boolean and then evaluated.
+ * @return bool The return value will be casted to boolean and then evaluated.
* Returns true on success or false on failure.
*/
- public function valid()
- {
+ public function valid(): bool {
return $this->records->valid();
}
@@ -188,22 +179,16 @@ public function valid()
* @link http://php.net/manual/en/iterator.rewind.php
* @return void Any returned value is ignored.
*/
- public function rewind()
- {
+ public function rewind(): void {
$this->records->rewind();
}
- /**
- * @return Version
- */
- public function getVersion()
- {
+ public function getVersion(): Version {
return $this->version;
}
- public function __toString()
- {
+ public function __toString(): string {
return '[Page]';
}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Accounts.php b/vendor/twilio/sdk/src/Twilio/Rest/Accounts.php
index 70f2749..9d76551 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Accounts.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Accounts.php
@@ -1,101 +1,47 @@
authTokenPromotion instead
*/
- public function __construct(Client $client)
- {
- parent::__construct($client);
-
- $this->baseUrl = 'https://accounts.twilio.com';
+ protected function getAuthTokenPromotion(): \Twilio\Rest\Accounts\V1\AuthTokenPromotionList {
+ echo "authTokenPromotion is deprecated. Use v1->authTokenPromotion instead.";
+ return $this->v1->authTokenPromotion;
}
/**
- * @return \Twilio\Rest\Accounts\V1 Version v1 of accounts
+ * @deprecated Use v1->authTokenPromotion() instead.
*/
- protected function getV1()
- {
- if (!$this->_v1) {
- $this->_v1 = new V1($this);
- }
- return $this->_v1;
+ protected function contextAuthTokenPromotion(): \Twilio\Rest\Accounts\V1\AuthTokenPromotionContext {
+ echo "authTokenPromotion() is deprecated. Use v1->authTokenPromotion() instead.";
+ return $this->v1->authTokenPromotion();
}
/**
- * Magic getter to lazy load version
- *
- * @param string $name Version to return
- * @return \Twilio\Version The requested version
- * @throws TwilioException For unknown versions
+ * @deprecated Use v1->credentials instead.
*/
- public function __get($name)
- {
- $method = 'get' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return $this->$method();
- }
-
- throw new TwilioException('Unknown version ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $method = 'context' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return \call_user_func_array(array($this, $method), $arguments);
- }
-
- throw new TwilioException('Unknown context ' . $name);
+ protected function getCredentials(): \Twilio\Rest\Accounts\V1\CredentialList {
+ echo "credentials is deprecated. Use v1->credentials instead.";
+ return $this->v1->credentials;
}
/**
- * @return \Twilio\Rest\Accounts\V1\CredentialList
+ * @deprecated Use v1->secondaryAuthToken instead.
*/
- protected function getCredentials()
- {
- return $this->v1->credentials;
+ protected function getSecondaryAuthToken(): \Twilio\Rest\Accounts\V1\SecondaryAuthTokenList {
+ echo "secondaryAuthToken is deprecated. Use v1->secondaryAuthToken instead.";
+ return $this->v1->secondaryAuthToken;
}
/**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
+ * @deprecated Use v1->secondaryAuthToken() instead.
*/
- public function __toString()
- {
- return '[Twilio.Accounts]';
+ protected function contextSecondaryAuthToken(): \Twilio\Rest\Accounts\V1\SecondaryAuthTokenContext {
+ echo "secondaryAuthToken() is deprecated. Use v1->secondaryAuthToken() instead.";
+ return $this->v1->secondaryAuthToken();
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1.php b/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1.php
index cff04e1..0714246 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1.php
@@ -1,31 +1,52 @@
version = 'v1';
}
- /**
- * @return \Twilio\Rest\Accounts\V1\CredentialList
- */
- protected function getCredentials()
+ protected function getAuthTokenPromotion(): AuthTokenPromotionList
+ {
+ if (!$this->_authTokenPromotion) {
+ $this->_authTokenPromotion = new AuthTokenPromotionList($this);
+ }
+ return $this->_authTokenPromotion;
+ }
+
+ protected function getBulkConsents(): BulkConsentsList
+ {
+ if (!$this->_bulkConsents) {
+ $this->_bulkConsents = new BulkConsentsList($this);
+ }
+ return $this->_bulkConsents;
+ }
+
+ protected function getBulkContacts(): BulkContactsList
+ {
+ if (!$this->_bulkContacts) {
+ $this->_bulkContacts = new BulkContactsList($this);
+ }
+ return $this->_bulkContacts;
+ }
+
+ protected function getCredentials(): CredentialList
{
if (!$this->_credentials) {
$this->_credentials = new CredentialList($this);
@@ -44,6 +86,22 @@ protected function getCredentials()
return $this->_credentials;
}
+ protected function getSafelist(): SafelistList
+ {
+ if (!$this->_safelist) {
+ $this->_safelist = new SafelistList($this);
+ }
+ return $this->_safelist;
+ }
+
+ protected function getSecondaryAuthToken(): SecondaryAuthTokenList
+ {
+ if (!$this->_secondaryAuthToken) {
+ $this->_secondaryAuthToken = new SecondaryAuthTokenList($this);
+ }
+ return $this->_secondaryAuthToken;
+ }
+
/**
* Magic getter to lazy load root resources
*
@@ -51,7 +109,7 @@ protected function getCredentials()
* @return \Twilio\ListResource The requested resource
* @throws TwilioException For unknown resource
*/
- public function __get($name)
+ public function __get(string $name)
{
$method = 'get' . \ucfirst($name);
if (\method_exists($this, $method)) {
@@ -66,10 +124,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -84,8 +142,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Accounts.V1]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/Credential/AwsContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/Credential/AwsContext.php
index 6a54ff0..ae408f8 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/Credential/AwsContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/Credential/AwsContext.php
@@ -2,102 +2,125 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Accounts
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Accounts\V1\Credential;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class AwsContext extends InstanceContext
-{
+ {
/**
* Initialize the AwsContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Accounts\V1\Credential\AwsContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid The Twilio-provided string that uniquely identifies the AWS resource to delete.
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Credentials/AWS/' . \rawurlencode($sid) . '';
+ $this->uri = '/Credentials/AWS/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a AwsInstance
+ * Delete the AwsInstance
*
- * @return AwsInstance Fetched AwsInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new AwsInstance($this->version, $payload, $this->solution['sid']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Update the AwsInstance
+ * Fetch the AwsInstance
*
- * @param array|Options $options Optional Arguments
- * @return AwsInstance Updated AwsInstance
+ * @return AwsInstance Fetched AwsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): AwsInstance
{
- $options = new Values($options);
- $data = Values::of(array('FriendlyName' => $options['friendlyName'],));
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
+ return new AwsInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
);
-
- return new AwsInstance($this->version, $payload, $this->solution['sid']);
}
+
/**
- * Deletes the AwsInstance
+ * Update the AwsInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return AwsInstance Updated AwsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): AwsInstance
{
- return $this->version->delete('delete', $this->uri);
+
+ $options = new Values($options);
+
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
+
+ return new AwsInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Accounts.V1.AwsContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/Credential/AwsInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/Credential/AwsInstance.php
index 26958a0..747cc65 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/Credential/AwsInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/Credential/AwsInstance.php
@@ -2,103 +2,116 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Accounts
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Accounts\V1\Credential;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $friendlyName
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $friendlyName
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
*/
class AwsInstance extends InstanceResource
{
/**
* Initialize the AwsInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Accounts\V1\Credential\AwsInstance
+ * @param string $sid The Twilio-provided string that uniquely identifies the AWS resource to delete.
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Accounts\V1\Credential\AwsContext Context for this
- * AwsInstance
+ * @return AwsContext Context for this AwsInstance
*/
- protected function proxy()
+ protected function proxy(): AwsContext
{
if (!$this->context) {
- $this->context = new AwsContext($this->version, $this->solution['sid']);
+ $this->context = new AwsContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a AwsInstance
+ * Delete the AwsInstance
*
- * @return AwsInstance Fetched AwsInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Update the AwsInstance
+ * Fetch the AwsInstance
*
- * @param array|Options $options Optional Arguments
- * @return AwsInstance Updated AwsInstance
+ * @return AwsInstance Fetched AwsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): AwsInstance
{
- return $this->proxy()->update($options);
+
+ return $this->proxy()->fetch();
}
/**
- * Deletes the AwsInstance
+ * Update the AwsInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return AwsInstance Updated AwsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): AwsInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->update($options);
}
/**
@@ -108,7 +121,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -127,12 +140,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Accounts.V1.AwsInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/Credential/AwsList.php b/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/Credential/AwsList.php
index f198bb3..66ccc8b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/Credential/AwsList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/Credential/AwsList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Accounts
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Accounts\V1\Credential;
@@ -12,54 +19,62 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class AwsList extends ListResource
-{
+ {
/**
* Construct the AwsList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Accounts\V1\Credential\AwsList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/Credentials/AWS';
}
/**
- * Streams AwsInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the AwsInstance
*
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @param string $credentials A string that contains the AWS access credentials in the format `:`. For example, `AKIAIOSFODNN7EXAMPLE:wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY`
+ * @param array|Options $options Optional Arguments
+ * @return AwsInstance Created AwsInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($limit = null, $pageSize = null)
+ public function create(string $credentials, array $options = []): AwsInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'Credentials' =>
+ $credentials,
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'AccountSid' =>
+ $options['accountSid'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new AwsInstance(
+ $this->version,
+ $payload
+ );
}
+
/**
* Reads AwsInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -75,11 +90,38 @@ public function stream($limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return AwsInstance[] Array of results
*/
- public function read($limit = null, $pageSize = null)
+ public function read(int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($limit, $pageSize), false);
}
+ /**
+ * Streams AwsInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of AwsInstance records from the API.
* Request is executed immediately
@@ -87,21 +129,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of AwsInstance
+ * @return AwsPage Page of AwsInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): AwsPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new AwsPage($this->version, $response, $this->solution);
}
@@ -111,9 +154,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of AwsInstance
+ * @return AwsPage Page of AwsInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): AwsPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -123,45 +166,21 @@ public function getPage($targetUrl)
return new AwsPage($this->version, $response, $this->solution);
}
- /**
- * Create a new AwsInstance
- *
- * @param string $credentials A string that contains the AWS access credentials
- * in the format
- * :
- * @param array|Options $options Optional Arguments
- * @return AwsInstance Newly created AwsInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($credentials, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'Credentials' => $credentials,
- 'FriendlyName' => $options['friendlyName'],
- 'AccountSid' => $options['accountSid'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new AwsInstance($this->version, $payload);
- }
/**
* Constructs a AwsContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Accounts\V1\Credential\AwsContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the AWS resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): AwsContext
{
- return new AwsContext($this->version, $sid);
+ return new AwsContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -169,8 +188,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Accounts.V1.AwsList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/Credential/AwsOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/Credential/AwsOptions.php
index f1e2170..124df1b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/Credential/AwsOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/Credential/AwsOptions.php
@@ -1,10 +1,16 @@
options['friendlyName'] = $friendlyName;
$this->options['accountSid'] = $accountSid;
}
@@ -51,10 +77,10 @@ public function __construct($friendlyName = Values::NONE, $accountSid = Values::
/**
* A descriptive string that you create to describe the resource. It can be up to 64 characters long.
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -63,11 +89,10 @@ public function setFriendlyName($friendlyName)
/**
* The SID of the Subaccount that this Credential should be associated with. Must be a valid Subaccount of the account issuing the request.
*
- * @param string $accountSid The Subaccount this Credential should be
- * associated with.
+ * @param string $accountSid The SID of the Subaccount that this Credential should be associated with. Must be a valid Subaccount of the account issuing the request.
* @return $this Fluent Builder
*/
- public function setAccountSid($accountSid)
+ public function setAccountSid(string $accountSid): self
{
$this->options['accountSid'] = $accountSid;
return $this;
@@ -78,35 +103,36 @@ public function setAccountSid($accountSid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Accounts.V1.CreateAwsOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Accounts.V1.CreateAwsOptions ' . $options . ']';
}
}
+
+
+
class UpdateAwsOptions extends Options
-{
+ {
/**
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
*/
- public function __construct($friendlyName = Values::NONE)
- {
+ public function __construct(
+
+ string $friendlyName = Values::NONE
+
+ ) {
$this->options['friendlyName'] = $friendlyName;
}
/**
* A descriptive string that you create to describe the resource. It can be up to 64 characters long.
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -117,14 +143,10 @@ public function setFriendlyName($friendlyName)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Accounts.V1.UpdateAwsOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Accounts.V1.UpdateAwsOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/Credential/AwsPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/Credential/AwsPage.php
index 99fb44a..a9d5c92 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/Credential/AwsPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/Credential/AwsPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return AwsInstance \Twilio\Rest\Accounts\V1\Credential\AwsInstance
+ */
+ public function buildInstance(array $payload): AwsInstance
{
return new AwsInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Accounts.V1.AwsPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/Credential/PublicKeyContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/Credential/PublicKeyContext.php
index 0ae3bd8..9585d1d 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/Credential/PublicKeyContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/Credential/PublicKeyContext.php
@@ -2,102 +2,125 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Accounts
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Accounts\V1\Credential;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class PublicKeyContext extends InstanceContext
-{
+ {
/**
* Initialize the PublicKeyContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Accounts\V1\Credential\PublicKeyContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid The Twilio-provided string that uniquely identifies the PublicKey resource to delete.
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Credentials/PublicKeys/' . \rawurlencode($sid) . '';
+ $this->uri = '/Credentials/PublicKeys/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a PublicKeyInstance
+ * Delete the PublicKeyInstance
*
- * @return PublicKeyInstance Fetched PublicKeyInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new PublicKeyInstance($this->version, $payload, $this->solution['sid']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Update the PublicKeyInstance
+ * Fetch the PublicKeyInstance
*
- * @param array|Options $options Optional Arguments
- * @return PublicKeyInstance Updated PublicKeyInstance
+ * @return PublicKeyInstance Fetched PublicKeyInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): PublicKeyInstance
{
- $options = new Values($options);
- $data = Values::of(array('FriendlyName' => $options['friendlyName'],));
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
+ return new PublicKeyInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
);
-
- return new PublicKeyInstance($this->version, $payload, $this->solution['sid']);
}
+
/**
- * Deletes the PublicKeyInstance
+ * Update the PublicKeyInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return PublicKeyInstance Updated PublicKeyInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): PublicKeyInstance
{
- return $this->version->delete('delete', $this->uri);
+
+ $options = new Values($options);
+
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
+
+ return new PublicKeyInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Accounts.V1.PublicKeyContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/Credential/PublicKeyInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/Credential/PublicKeyInstance.php
index ca42451..b1ba700 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/Credential/PublicKeyInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/Credential/PublicKeyInstance.php
@@ -2,104 +2,116 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Accounts
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Accounts\V1\Credential;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $friendlyName
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $friendlyName
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
*/
class PublicKeyInstance extends InstanceResource
{
/**
* Initialize the PublicKeyInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Accounts\V1\Credential\PublicKeyInstance
+ * @param string $sid The Twilio-provided string that uniquely identifies the PublicKey resource to delete.
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Accounts\V1\Credential\PublicKeyContext Context for
- * this
- * PublicKeyInstance
+ * @return PublicKeyContext Context for this PublicKeyInstance
*/
- protected function proxy()
+ protected function proxy(): PublicKeyContext
{
if (!$this->context) {
- $this->context = new PublicKeyContext($this->version, $this->solution['sid']);
+ $this->context = new PublicKeyContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a PublicKeyInstance
+ * Delete the PublicKeyInstance
*
- * @return PublicKeyInstance Fetched PublicKeyInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Update the PublicKeyInstance
+ * Fetch the PublicKeyInstance
*
- * @param array|Options $options Optional Arguments
- * @return PublicKeyInstance Updated PublicKeyInstance
+ * @return PublicKeyInstance Fetched PublicKeyInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): PublicKeyInstance
{
- return $this->proxy()->update($options);
+
+ return $this->proxy()->fetch();
}
/**
- * Deletes the PublicKeyInstance
+ * Update the PublicKeyInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return PublicKeyInstance Updated PublicKeyInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): PublicKeyInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->update($options);
}
/**
@@ -109,7 +121,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -128,12 +140,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Accounts.V1.PublicKeyInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/Credential/PublicKeyList.php b/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/Credential/PublicKeyList.php
index 5aff911..448e637 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/Credential/PublicKeyList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/Credential/PublicKeyList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Accounts
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Accounts\V1\Credential;
@@ -12,54 +19,62 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class PublicKeyList extends ListResource
-{
+ {
/**
* Construct the PublicKeyList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Accounts\V1\Credential\PublicKeyList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/Credentials/PublicKeys';
}
/**
- * Streams PublicKeyInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the PublicKeyInstance
*
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @param string $publicKey A URL encoded representation of the public key. For example, `-----BEGIN PUBLIC KEY-----MIIBIjANB.pa9xQIDAQAB-----END PUBLIC KEY-----`
+ * @param array|Options $options Optional Arguments
+ * @return PublicKeyInstance Created PublicKeyInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($limit = null, $pageSize = null)
+ public function create(string $publicKey, array $options = []): PublicKeyInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'PublicKey' =>
+ $publicKey,
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'AccountSid' =>
+ $options['accountSid'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new PublicKeyInstance(
+ $this->version,
+ $payload
+ );
}
+
/**
* Reads PublicKeyInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -75,11 +90,38 @@ public function stream($limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return PublicKeyInstance[] Array of results
*/
- public function read($limit = null, $pageSize = null)
+ public function read(int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($limit, $pageSize), false);
}
+ /**
+ * Streams PublicKeyInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of PublicKeyInstance records from the API.
* Request is executed immediately
@@ -87,21 +129,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of PublicKeyInstance
+ * @return PublicKeyPage Page of PublicKeyInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): PublicKeyPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new PublicKeyPage($this->version, $response, $this->solution);
}
@@ -111,9 +154,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of PublicKeyInstance
+ * @return PublicKeyPage Page of PublicKeyInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): PublicKeyPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -123,43 +166,21 @@ public function getPage($targetUrl)
return new PublicKeyPage($this->version, $response, $this->solution);
}
- /**
- * Create a new PublicKeyInstance
- *
- * @param string $publicKey A URL encoded representation of the public key
- * @param array|Options $options Optional Arguments
- * @return PublicKeyInstance Newly created PublicKeyInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($publicKey, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'PublicKey' => $publicKey,
- 'FriendlyName' => $options['friendlyName'],
- 'AccountSid' => $options['accountSid'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new PublicKeyInstance($this->version, $payload);
- }
/**
* Constructs a PublicKeyContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Accounts\V1\Credential\PublicKeyContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the PublicKey resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): PublicKeyContext
{
- return new PublicKeyContext($this->version, $sid);
+ return new PublicKeyContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -167,8 +188,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Accounts.V1.PublicKeyList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/Credential/PublicKeyOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/Credential/PublicKeyOptions.php
index 8d10afe..c021fd6 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/Credential/PublicKeyOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/Credential/PublicKeyOptions.php
@@ -1,10 +1,16 @@
options['friendlyName'] = $friendlyName;
$this->options['accountSid'] = $accountSid;
}
@@ -51,10 +77,10 @@ public function __construct($friendlyName = Values::NONE, $accountSid = Values::
/**
* A descriptive string that you create to describe the resource. It can be up to 64 characters long.
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -63,11 +89,10 @@ public function setFriendlyName($friendlyName)
/**
* The SID of the Subaccount that this Credential should be associated with. Must be a valid Subaccount of the account issuing the request
*
- * @param string $accountSid The Subaccount this Credential should be
- * associated with.
+ * @param string $accountSid The SID of the Subaccount that this Credential should be associated with. Must be a valid Subaccount of the account issuing the request
* @return $this Fluent Builder
*/
- public function setAccountSid($accountSid)
+ public function setAccountSid(string $accountSid): self
{
$this->options['accountSid'] = $accountSid;
return $this;
@@ -78,35 +103,36 @@ public function setAccountSid($accountSid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Accounts.V1.CreatePublicKeyOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Accounts.V1.CreatePublicKeyOptions ' . $options . ']';
}
}
+
+
+
class UpdatePublicKeyOptions extends Options
-{
+ {
/**
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
*/
- public function __construct($friendlyName = Values::NONE)
- {
+ public function __construct(
+
+ string $friendlyName = Values::NONE
+
+ ) {
$this->options['friendlyName'] = $friendlyName;
}
/**
* A descriptive string that you create to describe the resource. It can be up to 64 characters long.
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -117,14 +143,10 @@ public function setFriendlyName($friendlyName)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Accounts.V1.UpdatePublicKeyOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Accounts.V1.UpdatePublicKeyOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/Credential/PublicKeyPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/Credential/PublicKeyPage.php
index 30dc18d..767a5d4 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/Credential/PublicKeyPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/Credential/PublicKeyPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return PublicKeyInstance \Twilio\Rest\Accounts\V1\Credential\PublicKeyInstance
+ */
+ public function buildInstance(array $payload): PublicKeyInstance
{
return new PublicKeyInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Accounts.V1.PublicKeyPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/CredentialInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/CredentialInstance.php
index 9b92004..54e5832 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/CredentialInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/CredentialInstance.php
@@ -2,32 +2,39 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Accounts
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Accounts\V1;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
-use Twilio\Values;
use Twilio\Version;
+
class CredentialInstance extends InstanceResource
{
/**
* Initialize the CredentialInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @return \Twilio\Rest\Accounts\V1\CredentialInstance
*/
public function __construct(Version $version, array $payload)
{
parent::__construct($version);
- $this->solution = array();
+ $this->solution = [];
}
/**
@@ -37,7 +44,7 @@ public function __construct(Version $version, array $payload)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -56,8 +63,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Accounts.V1.CredentialInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/CredentialList.php b/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/CredentialList.php
index 3d507d4..262c264 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/CredentialList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/CredentialList.php
@@ -2,66 +2,78 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Accounts
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Accounts\V1;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
+use Twilio\Version;
+use Twilio\InstanceContext;
use Twilio\Rest\Accounts\V1\Credential\AwsList;
use Twilio\Rest\Accounts\V1\Credential\PublicKeyList;
-use Twilio\Version;
+
/**
- * @property \Twilio\Rest\Accounts\V1\Credential\PublicKeyList $publicKey
- * @property \Twilio\Rest\Accounts\V1\Credential\AwsList $aws
+ * @property AwsList $aws
+ * @property PublicKeyList $publicKey
* @method \Twilio\Rest\Accounts\V1\Credential\PublicKeyContext publicKey(string $sid)
* @method \Twilio\Rest\Accounts\V1\Credential\AwsContext aws(string $sid)
*/
class CredentialList extends ListResource
-{
- protected $_publicKey = null;
+ {
protected $_aws = null;
+ protected $_publicKey = null;
/**
* Construct the CredentialList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Accounts\V1\CredentialList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
}
/**
- * Access the publicKey
+ * Access the aws
*/
- protected function getPublicKey()
+ protected function getAws(): AwsList
{
- if (!$this->_publicKey) {
- $this->_publicKey = new PublicKeyList($this->version);
+ if (!$this->_aws) {
+ $this->_aws = new AwsList(
+ $this->version
+ );
}
-
- return $this->_publicKey;
+ return $this->_aws;
}
/**
- * Access the aws
+ * Access the publicKey
*/
- protected function getAws()
+ protected function getPublicKey(): PublicKeyList
{
- if (!$this->_aws) {
- $this->_aws = new AwsList($this->version);
+ if (!$this->_publicKey) {
+ $this->_publicKey = new PublicKeyList(
+ $this->version
+ );
}
-
- return $this->_aws;
+ return $this->_publicKey;
}
/**
@@ -71,7 +83,7 @@ protected function getAws()
* @return \Twilio\ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -86,10 +98,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -104,8 +116,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Accounts.V1.CredentialList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/CredentialPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/CredentialPage.php
index bc93149..f53f6d2 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/CredentialPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Accounts/V1/CredentialPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return CredentialInstance \Twilio\Rest\Accounts\V1\CredentialInstance
+ */
+ public function buildInstance(array $payload): CredentialInstance
{
return new CredentialInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Accounts.V1.CredentialPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api.php b/vendor/twilio/sdk/src/Twilio/Rest/Api.php
index 90198b7..d5300b3 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api.php
@@ -1,508 +1,371 @@
baseUrl = 'https://api.twilio.com';
- }
-
- /**
- * @return \Twilio\Rest\Api\V2010 Version v2010 of api
- */
- protected function getV2010()
- {
- if (!$this->_v2010) {
- $this->_v2010 = new V2010($this);
- }
- return $this->_v2010;
- }
-
- /**
- * Magic getter to lazy load version
- *
- * @param string $name Version to return
- * @return \Twilio\Version The requested version
- * @throws TwilioException For unknown versions
- */
- public function __get($name)
- {
- $method = 'get' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return $this->$method();
- }
-
- throw new TwilioException('Unknown version ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $method = 'context' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return \call_user_func_array(array($this, $method), $arguments);
- }
-
- throw new TwilioException('Unknown context ' . $name);
- }
-
+class Api extends ApiBase {
/**
* @return \Twilio\Rest\Api\V2010\AccountContext Account provided as the
* authenticating account
*/
- protected function getAccount()
- {
+ protected function getAccount(): \Twilio\Rest\Api\V2010\AccountContext {
return $this->v2010->account;
}
- /**
- * @return \Twilio\Rest\Api\V2010\AccountList
- */
- protected function getAccounts()
- {
+ protected function getAccounts(): \Twilio\Rest\Api\V2010\AccountList {
return $this->v2010->accounts;
}
/**
* @param string $sid Fetch by unique Account Sid
- * @return \Twilio\Rest\Api\V2010\AccountContext
*/
- protected function contextAccounts($sid)
- {
+ protected function contextAccounts(string $sid): \Twilio\Rest\Api\V2010\AccountContext {
return $this->v2010->accounts($sid);
}
/**
- * @return \Twilio\Rest\Api\V2010\Account\AddressList
+ * @deprecated Use account->addresses instead.
*/
- protected function getAddresses()
- {
+ protected function getAddresses(): \Twilio\Rest\Api\V2010\Account\AddressList {
+ echo "addresses is deprecated. Use account->addresses instead.";
return $this->v2010->account->addresses;
}
/**
+ * @deprecated Use account->addresses(\$sid) instead.
* @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\AddressContext
*/
- protected function contextAddresses($sid)
- {
+ protected function contextAddresses(string $sid): \Twilio\Rest\Api\V2010\Account\AddressContext {
+ echo "addresses(\$sid) is deprecated. Use account->addresses(\$sid) instead.";
return $this->v2010->account->addresses($sid);
}
/**
- * @return \Twilio\Rest\Api\V2010\Account\ApplicationList
+ * @deprecated Use account->applications instead.
*/
- protected function getApplications()
- {
+ protected function getApplications(): \Twilio\Rest\Api\V2010\Account\ApplicationList {
+ echo "applications is deprecated. Use account->applications instead.";
return $this->v2010->account->applications;
}
/**
+ * @deprecated Use account->applications(\$sid) instead.
* @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\ApplicationContext
*/
- protected function contextApplications($sid)
- {
+ protected function contextApplications(string $sid): \Twilio\Rest\Api\V2010\Account\ApplicationContext {
+ echo "applications(\$sid) is deprecated. Use account->applications(\$sid) instead.";
return $this->v2010->account->applications($sid);
}
/**
- * @return \Twilio\Rest\Api\V2010\Account\AuthorizedConnectAppList
+ * @deprecated Use account->authorizedConnectApps instead.
*/
- protected function getAuthorizedConnectApps()
- {
+ protected function getAuthorizedConnectApps(): \Twilio\Rest\Api\V2010\Account\AuthorizedConnectAppList {
+ echo "authorizedConnectApps is deprecated. Use account->authorizedConnectApps instead.";
return $this->v2010->account->authorizedConnectApps;
}
/**
+ * @deprecated Use account->authorizedConnectApps(\$connectAppSid) instead.
* @param string $connectAppSid The SID of the Connect App to fetch
- * @return \Twilio\Rest\Api\V2010\Account\AuthorizedConnectAppContext
*/
- protected function contextAuthorizedConnectApps($connectAppSid)
- {
+ protected function contextAuthorizedConnectApps(string $connectAppSid): \Twilio\Rest\Api\V2010\Account\AuthorizedConnectAppContext {
+ echo "authorizedConnectApps(\$connectAppSid) is deprecated. Use account->authorizedConnectApps(\$connectAppSid) instead.";
return $this->v2010->account->authorizedConnectApps($connectAppSid);
}
/**
- * @return \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountryList
+ * @deprecated Use account->availablePhoneNumbers instead.
*/
- protected function getAvailablePhoneNumbers()
- {
+ protected function getAvailablePhoneNumbers(): \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountryList {
+ echo "availablePhoneNumbers is deprecated. Use account->availablePhoneNumbers instead.";
return $this->v2010->account->availablePhoneNumbers;
}
/**
+ * @deprecated Use account->availablePhoneNumbers(\$countryCode) instead.
* @param string $countryCode The ISO country code of the country to fetch
* available phone number information about
- * @return \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountryContext
*/
- protected function contextAvailablePhoneNumbers($countryCode)
- {
+ protected function contextAvailablePhoneNumbers(string $countryCode): \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountryContext {
+ echo "availablePhoneNumbers(\$countryCode) is deprecated. Use account->availablePhoneNumbers(\$countryCode) instead.";
return $this->v2010->account->availablePhoneNumbers($countryCode);
}
/**
- * @return \Twilio\Rest\Api\V2010\Account\BalanceList
+ * @deprecated Use account->balance instead.
*/
- protected function getBalance()
- {
+ protected function getBalance(): \Twilio\Rest\Api\V2010\Account\BalanceList {
+ echo "balance is deprecated. Use account->balance instead.";
return $this->v2010->account->balance;
}
/**
- * @return \Twilio\Rest\Api\V2010\Account\CallList
+ * @deprecated Use account->calls instead
*/
- protected function getCalls()
- {
+ protected function getCalls(): \Twilio\Rest\Api\V2010\Account\CallList {
+ echo "calls is deprecated. Use account->calls instead.";
return $this->v2010->account->calls;
}
/**
+ * @deprecated Use account->calls(\$sid) instead.
* @param string $sid The SID of the Call resource to fetch
- * @return \Twilio\Rest\Api\V2010\Account\CallContext
*/
- protected function contextCalls($sid)
- {
+ protected function contextCalls(string $sid): \Twilio\Rest\Api\V2010\Account\CallContext {
+ echo "calls(\$sid) is deprecated. Use account->calls(\$sid) instead.";
return $this->v2010->account->calls($sid);
}
/**
- * @return \Twilio\Rest\Api\V2010\Account\ConferenceList
+ * @deprecated Use account->conferences instead.
*/
- protected function getConferences()
- {
+ protected function getConferences(): \Twilio\Rest\Api\V2010\Account\ConferenceList {
+ echo "conferences is deprecated. Use account->conferences instead.";
return $this->v2010->account->conferences;
}
/**
+ * @deprecated Use account->conferences(\$sid) instead.
* @param string $sid The unique string that identifies this resource
- * @return \Twilio\Rest\Api\V2010\Account\ConferenceContext
*/
- protected function contextConferences($sid)
- {
+ protected function contextConferences(string $sid): \Twilio\Rest\Api\V2010\Account\ConferenceContext {
+ echo "conferences(\$sid) is deprecated. Use account->conferences(\$sid) instead.";
return $this->v2010->account->conferences($sid);
}
/**
- * @return \Twilio\Rest\Api\V2010\Account\ConnectAppList
+ * @deprecated Use account->connectApps instead.
*/
- protected function getConnectApps()
- {
+ protected function getConnectApps(): \Twilio\Rest\Api\V2010\Account\ConnectAppList {
+ echo "connectApps is deprecated. Use account->connectApps instead.";
return $this->v2010->account->connectApps;
}
/**
+ * @deprecated account->connectApps(\$sid)
* @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\ConnectAppContext
*/
- protected function contextConnectApps($sid)
- {
+ protected function contextConnectApps(string $sid): \Twilio\Rest\Api\V2010\Account\ConnectAppContext {
+ echo "connectApps(\$sid) is deprecated. Use account->connectApps(\$sid) instead.";
return $this->v2010->account->connectApps($sid);
}
/**
- * @return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumberList
+ * @deprecated Use account->incomingPhoneNumbers instead
*/
- protected function getIncomingPhoneNumbers()
- {
+ protected function getIncomingPhoneNumbers(): \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumberList {
+ echo "incomingPhoneNumbers is deprecated. Use account->incomingPhoneNumbers instead.";
return $this->v2010->account->incomingPhoneNumbers;
}
/**
+ * @deprecated Use account->incomingPhoneNumbers(\$sid) instead.
* @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumberContext
*/
- protected function contextIncomingPhoneNumbers($sid)
- {
+ protected function contextIncomingPhoneNumbers(string $sid): \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumberContext {
+ echo "incomingPhoneNumbers(\$sid) is deprecated. Use account->incomingPhoneNumbers(\$sid) instead.";
return $this->v2010->account->incomingPhoneNumbers($sid);
}
/**
- * @return \Twilio\Rest\Api\V2010\Account\KeyList
+ * @deprecated Use account->keys instead.
*/
- protected function getKeys()
- {
+ protected function getKeys(): \Twilio\Rest\Api\V2010\Account\KeyList {
+ echo "keys is deprecated. Use account->keys instead.";
return $this->v2010->account->keys;
}
/**
+ * @deprecated Use account->keys(\$sid) instead
* @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\KeyContext
*/
- protected function contextKeys($sid)
- {
+ protected function contextKeys(string $sid): \Twilio\Rest\Api\V2010\Account\KeyContext {
+ echo "keys(\$sid) is deprecated. Use account->keys(\$sid) instead.";
return $this->v2010->account->keys($sid);
}
/**
- * @return \Twilio\Rest\Api\V2010\Account\MessageList
+ * @deprecated Use account->messages instead.
*/
- protected function getMessages()
- {
+ protected function getMessages(): \Twilio\Rest\Api\V2010\Account\MessageList {
+ echo "messages is deprecated. Use account->messages instead.";
return $this->v2010->account->messages;
}
/**
+ * @deprecated Use account->messages(\$sid) instead.
* @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\MessageContext
*/
- protected function contextMessages($sid)
- {
+ protected function contextMessages(string $sid): \Twilio\Rest\Api\V2010\Account\MessageContext {
+ echo "amessages(\$sid) is deprecated. Use account->messages(\$sid) instead.";
return $this->v2010->account->messages($sid);
}
/**
- * @return \Twilio\Rest\Api\V2010\Account\NewKeyList
+ * @deprecated Use account->newKeys instead.
*/
- protected function getNewKeys()
- {
+ protected function getNewKeys(): \Twilio\Rest\Api\V2010\Account\NewKeyList {
+ echo "newKeys is deprecated. Use account->newKeys instead.";
return $this->v2010->account->newKeys;
}
/**
- * @return \Twilio\Rest\Api\V2010\Account\NewSigningKeyList
+ * @deprecated Use account->newSigningKeys instead.
*/
- protected function getNewSigningKeys()
- {
+ protected function getNewSigningKeys(): \Twilio\Rest\Api\V2010\Account\NewSigningKeyList {
+ echo "newSigningKeys is deprecated. Use account->newSigningKeys instead.";
return $this->v2010->account->newSigningKeys;
}
/**
- * @return \Twilio\Rest\Api\V2010\Account\NotificationList
+ * @deprecated Use account->notifications instead.
*/
- protected function getNotifications()
- {
+ protected function getNotifications(): \Twilio\Rest\Api\V2010\Account\NotificationList {
+ echo "notifications is deprecated. Use account->notifications instead.";
return $this->v2010->account->notifications;
}
/**
+ * @deprecated Use account->notifications(\$sid) instead.
* @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\NotificationContext
*/
- protected function contextNotifications($sid)
- {
+ protected function contextNotifications(string $sid): \Twilio\Rest\Api\V2010\Account\NotificationContext {
+ echo "notifications(\$sid) is deprecated. Use account->notifications(\$sid) instead.";
return $this->v2010->account->notifications($sid);
}
/**
- * @return \Twilio\Rest\Api\V2010\Account\OutgoingCallerIdList
+ * @deprecated Use account->outgoingCallerIds instead.
*/
- protected function getOutgoingCallerIds()
- {
+ protected function getOutgoingCallerIds(): \Twilio\Rest\Api\V2010\Account\OutgoingCallerIdList {
+ echo "outgoingCallerIds is deprecated. Use account->outgoingCallerIds instead.";
return $this->v2010->account->outgoingCallerIds;
}
/**
+ * @deprecated Use account->outgoingCallerIds(\$sid) instead.
* @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\OutgoingCallerIdContext
*/
- protected function contextOutgoingCallerIds($sid)
- {
+ protected function contextOutgoingCallerIds(string $sid): \Twilio\Rest\Api\V2010\Account\OutgoingCallerIdContext {
+ echo "outgoingCallerIds(\$sid) is deprecated. Use account->outgoingCallerIds(\$sid) instead.";
return $this->v2010->account->outgoingCallerIds($sid);
}
/**
- * @return \Twilio\Rest\Api\V2010\Account\QueueList
+ * @deprecated Use account->queues instead.
*/
- protected function getQueues()
- {
+ protected function getQueues(): \Twilio\Rest\Api\V2010\Account\QueueList {
+ echo "queues is deprecated. Use account->queues instead.";
return $this->v2010->account->queues;
}
/**
+ * @deprecated Use account->queues(\$sid) instead.
* @param string $sid The unique string that identifies this resource
- * @return \Twilio\Rest\Api\V2010\Account\QueueContext
*/
- protected function contextQueues($sid)
- {
+ protected function contextQueues(string $sid): \Twilio\Rest\Api\V2010\Account\QueueContext {
+ echo "queues(\$sid) is deprecated. Use account->queues(\$sid) instead.";
return $this->v2010->account->queues($sid);
}
/**
- * @return \Twilio\Rest\Api\V2010\Account\RecordingList
+ * @deprecated Use account->recordings instead.
*/
- protected function getRecordings()
- {
+ protected function getRecordings(): \Twilio\Rest\Api\V2010\Account\RecordingList {
+ echo "recordings is deprecated. Use account->recordings instead.";
return $this->v2010->account->recordings;
}
/**
+ * @deprecated Use account->recordings(\$sid) instead.
* @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\RecordingContext
*/
- protected function contextRecordings($sid)
- {
+ protected function contextRecordings(string $sid): \Twilio\Rest\Api\V2010\Account\RecordingContext {
+ echo "recordings(\$sid) is deprecated. Use account->recordings(\$sid) instead.";
return $this->v2010->account->recordings($sid);
}
/**
- * @return \Twilio\Rest\Api\V2010\Account\SigningKeyList
+ * @deprecated Use account->signingKeys instead.
*/
- protected function getSigningKeys()
- {
+ protected function getSigningKeys(): \Twilio\Rest\Api\V2010\Account\SigningKeyList {
+ echo "signingKeys is deprecated. Use account->signingKeys instead.";
return $this->v2010->account->signingKeys;
}
/**
+ * @deprecated Use account->signingKeys(\$sid) instead.
* @param string $sid The sid
- * @return \Twilio\Rest\Api\V2010\Account\SigningKeyContext
*/
- protected function contextSigningKeys($sid)
- {
+ protected function contextSigningKeys(string $sid): \Twilio\Rest\Api\V2010\Account\SigningKeyContext {
+ echo "signingKeys(\$sid) is deprecated. Use account->signingKeys(\$sid) instead.";
return $this->v2010->account->signingKeys($sid);
}
/**
- * @return \Twilio\Rest\Api\V2010\Account\SipList
+ * @deprecated Use account->sip instead.
*/
- protected function getSip()
- {
+ protected function getSip(): \Twilio\Rest\Api\V2010\Account\SipList {
+ echo "sip is deprecated. Use account->sip instead.";
return $this->v2010->account->sip;
}
/**
- * @return \Twilio\Rest\Api\V2010\Account\ShortCodeList
+ * @deprecated Use account->shortCodes instead.
*/
- protected function getShortCodes()
- {
+ protected function getShortCodes(): \Twilio\Rest\Api\V2010\Account\ShortCodeList {
+ echo "shortCodes is deprecated. Use account->shortCodes instead.";
return $this->v2010->account->shortCodes;
}
/**
+ * @deprecated Use account->shortCodes(\$sid) instead.
* @param string $sid The unique string that identifies this resource
- * @return \Twilio\Rest\Api\V2010\Account\ShortCodeContext
*/
- protected function contextShortCodes($sid)
- {
+ protected function contextShortCodes(string $sid): \Twilio\Rest\Api\V2010\Account\ShortCodeContext {
+ echo "shortCodes(\$sid) is deprecated. Use account->shortCodes(\$sid) instead.";
return $this->v2010->account->shortCodes($sid);
}
/**
- * @return \Twilio\Rest\Api\V2010\Account\TokenList
+ * @deprecated Use account->token instead.
*/
- protected function getTokens()
- {
+ protected function getTokens(): \Twilio\Rest\Api\V2010\Account\TokenList {
+ echo "tokens is deprecated. Use account->token instead.";
return $this->v2010->account->tokens;
}
/**
- * @return \Twilio\Rest\Api\V2010\Account\TranscriptionList
+ * @deprecated Use account->transcriptions instead.
*/
- protected function getTranscriptions()
- {
+ protected function getTranscriptions(): \Twilio\Rest\Api\V2010\Account\TranscriptionList {
+ echo "transcriptions is deprecated. Use account->transcriptions instead.";
return $this->v2010->account->transcriptions;
}
/**
+ * @deprecated Use account->transcriptions(\$sid) instead
* @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\TranscriptionContext
*/
- protected function contextTranscriptions($sid)
- {
+ protected function contextTranscriptions(string $sid): \Twilio\Rest\Api\V2010\Account\TranscriptionContext {
+ echo "transcriptions(\$sid) is deprecated. Use account->transcriptions(\$sid) instead.";
return $this->v2010->account->transcriptions($sid);
}
/**
- * @return \Twilio\Rest\Api\V2010\Account\UsageList
+ * @deprecated Use account->usage instead.
*/
- protected function getUsage()
- {
+ protected function getUsage(): \Twilio\Rest\Api\V2010\Account\UsageList {
+ echo "usage is deprecated. Use account->usage instead.";
return $this->v2010->account->usage;
}
/**
- * @return \Twilio\Rest\Api\V2010\Account\ValidationRequestList
+ * @deprecated Use account->validationRequests instead.
*/
- protected function getValidationRequests()
- {
+ protected function getValidationRequests(): \Twilio\Rest\Api\V2010\Account\ValidationRequestList {
+ echo "validationRequests is deprecated. Use account->validationRequests instead.";
return $this->v2010->account->validationRequests;
}
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Api]';
- }
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010.php
index 32e9a38..a600400 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010.php
@@ -1,49 +1,56 @@
version = '2010-04-01';
}
- /**
- * @return \Twilio\Rest\Api\V2010\AccountList
- */
- protected function getAccounts()
+ protected function getAccounts(): AccountList
{
if (!$this->_accounts) {
$this->_accounts = new AccountList($this);
@@ -115,10 +118,9 @@ protected function getAccounts()
}
/**
- * @return \Twilio\Rest\Api\V2010\AccountContext Account provided as the
- * authenticating account
+ * @return AccountContext Account provided as the authenticating account
*/
- protected function getAccount()
+ protected function getAccount(): AccountContext
{
if (!$this->_account) {
$this->_account = new AccountContext(
@@ -135,201 +137,129 @@ protected function getAccount()
* @param AccountContext|AccountInstance $account account to use as the primary
* account
*/
- public function setAccount($account)
+ public function setAccount($account): void
{
$this->_account = $account;
}
- /**
- * @return \Twilio\Rest\Api\V2010\Account\AddressList
- */
- protected function getAddresses()
+ protected function getRecordings(): \Twilio\Rest\Api\V2010\Account\RecordingList
{
- return $this->account->addresses;
+ return $this->account->recordings;
}
- /**
- * @return \Twilio\Rest\Api\V2010\Account\ApplicationList
- */
- protected function getApplications()
+ protected function getUsage(): \Twilio\Rest\Api\V2010\Account\UsageList
{
- return $this->account->applications;
+ return $this->account->usage;
}
- /**
- * @return \Twilio\Rest\Api\V2010\Account\AuthorizedConnectAppList
- */
- protected function getAuthorizedConnectApps()
+ protected function getMessages(): \Twilio\Rest\Api\V2010\Account\MessageList
{
- return $this->account->authorizedConnectApps;
+ return $this->account->messages;
}
- /**
- * @return \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountryList
- */
- protected function getAvailablePhoneNumbers()
+ protected function getKeys(): \Twilio\Rest\Api\V2010\Account\KeyList
{
- return $this->account->availablePhoneNumbers;
+ return $this->account->keys;
}
- /**
- * @return \Twilio\Rest\Api\V2010\Account\BalanceList
- */
- protected function getBalance()
+ protected function getNewKeys(): \Twilio\Rest\Api\V2010\Account\NewKeyList
{
- return $this->account->balance;
+ return $this->account->newKeys;
}
- /**
- * @return \Twilio\Rest\Api\V2010\Account\CallList
- */
- protected function getCalls()
+ protected function getApplications(): \Twilio\Rest\Api\V2010\Account\ApplicationList
{
- return $this->account->calls;
+ return $this->account->applications;
}
- /**
- * @return \Twilio\Rest\Api\V2010\Account\ConferenceList
- */
- protected function getConferences()
+ protected function getIncomingPhoneNumbers(): \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumberList
{
- return $this->account->conferences;
+ return $this->account->incomingPhoneNumbers;
}
- /**
- * @return \Twilio\Rest\Api\V2010\Account\ConnectAppList
- */
- protected function getConnectApps()
+ protected function getConferences(): \Twilio\Rest\Api\V2010\Account\ConferenceList
{
- return $this->account->connectApps;
+ return $this->account->conferences;
}
- /**
- * @return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumberList
- */
- protected function getIncomingPhoneNumbers()
+ protected function getCalls(): \Twilio\Rest\Api\V2010\Account\CallList
{
- return $this->account->incomingPhoneNumbers;
+ return $this->account->calls;
}
- /**
- * @return \Twilio\Rest\Api\V2010\Account\KeyList
- */
- protected function getKeys()
+ protected function getOutgoingCallerIds(): \Twilio\Rest\Api\V2010\Account\OutgoingCallerIdList
{
- return $this->account->keys;
+ return $this->account->outgoingCallerIds;
}
- /**
- * @return \Twilio\Rest\Api\V2010\Account\MessageList
- */
- protected function getMessages()
+ protected function getValidationRequests(): \Twilio\Rest\Api\V2010\Account\ValidationRequestList
{
- return $this->account->messages;
+ return $this->account->validationRequests;
}
- /**
- * @return \Twilio\Rest\Api\V2010\Account\NewKeyList
- */
- protected function getNewKeys()
+ protected function getTranscriptions(): \Twilio\Rest\Api\V2010\Account\TranscriptionList
{
- return $this->account->newKeys;
+ return $this->account->transcriptions;
}
- /**
- * @return \Twilio\Rest\Api\V2010\Account\NewSigningKeyList
- */
- protected function getNewSigningKeys()
+ protected function getConnectApps(): \Twilio\Rest\Api\V2010\Account\ConnectAppList
{
- return $this->account->newSigningKeys;
+ return $this->account->connectApps;
}
- /**
- * @return \Twilio\Rest\Api\V2010\Account\NotificationList
- */
- protected function getNotifications()
+ protected function getAuthorizedConnectApps(): \Twilio\Rest\Api\V2010\Account\AuthorizedConnectAppList
{
- return $this->account->notifications;
+ return $this->account->authorizedConnectApps;
}
- /**
- * @return \Twilio\Rest\Api\V2010\Account\OutgoingCallerIdList
- */
- protected function getOutgoingCallerIds()
+ protected function getTokens(): \Twilio\Rest\Api\V2010\Account\TokenList
{
- return $this->account->outgoingCallerIds;
+ return $this->account->tokens;
}
- /**
- * @return \Twilio\Rest\Api\V2010\Account\QueueList
- */
- protected function getQueues()
+ protected function getBalance(): \Twilio\Rest\Api\V2010\Account\BalanceList
{
- return $this->account->queues;
+ return $this->account->balance;
}
- /**
- * @return \Twilio\Rest\Api\V2010\Account\RecordingList
- */
- protected function getRecordings()
+ protected function getSip(): \Twilio\Rest\Api\V2010\Account\SipList
{
- return $this->account->recordings;
+ return $this->account->sip;
}
- /**
- * @return \Twilio\Rest\Api\V2010\Account\SigningKeyList
- */
- protected function getSigningKeys()
+ protected function getNotifications(): \Twilio\Rest\Api\V2010\Account\NotificationList
{
- return $this->account->signingKeys;
+ return $this->account->notifications;
}
- /**
- * @return \Twilio\Rest\Api\V2010\Account\SipList
- */
- protected function getSip()
+ protected function getAvailablePhoneNumbers(): \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountryList
{
- return $this->account->sip;
+ return $this->account->availablePhoneNumbers;
}
- /**
- * @return \Twilio\Rest\Api\V2010\Account\ShortCodeList
- */
- protected function getShortCodes()
+ protected function getAddresses(): \Twilio\Rest\Api\V2010\Account\AddressList
{
- return $this->account->shortCodes;
+ return $this->account->addresses;
}
- /**
- * @return \Twilio\Rest\Api\V2010\Account\TokenList
- */
- protected function getTokens()
+ protected function getQueues(): \Twilio\Rest\Api\V2010\Account\QueueList
{
- return $this->account->tokens;
+ return $this->account->queues;
}
- /**
- * @return \Twilio\Rest\Api\V2010\Account\TranscriptionList
- */
- protected function getTranscriptions()
+ protected function getShortCodes(): \Twilio\Rest\Api\V2010\Account\ShortCodeList
{
- return $this->account->transcriptions;
+ return $this->account->shortCodes;
}
- /**
- * @return \Twilio\Rest\Api\V2010\Account\UsageList
- */
- protected function getUsage()
+ protected function getSigningKeys(): \Twilio\Rest\Api\V2010\Account\SigningKeyList
{
- return $this->account->usage;
+ return $this->account->signingKeys;
}
- /**
- * @return \Twilio\Rest\Api\V2010\Account\ValidationRequestList
- */
- protected function getValidationRequests()
+ protected function getNewSigningKeys(): \Twilio\Rest\Api\V2010\Account\NewSigningKeyList
{
- return $this->account->validationRequests;
+ return $this->account->newSigningKeys;
}
/**
@@ -339,7 +269,7 @@ protected function getValidationRequests()
* @return \Twilio\ListResource The requested resource
* @throws TwilioException For unknown resource
*/
- public function __get($name)
+ public function __get(string $name)
{
$method = 'get' . \ucfirst($name);
if (\method_exists($this, $method)) {
@@ -354,10 +284,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -372,8 +302,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Address/DependentPhoneNumberInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Address/DependentPhoneNumberInstance.php
index 8c27989..d8aa82e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Address/DependentPhoneNumberInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Address/DependentPhoneNumberInstance.php
@@ -2,64 +2,72 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Address;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $friendlyName
- * @property string $phoneNumber
- * @property string $voiceUrl
- * @property string $voiceMethod
- * @property string $voiceFallbackMethod
- * @property string $voiceFallbackUrl
- * @property bool $voiceCallerIdLookup
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $smsFallbackMethod
- * @property string $smsFallbackUrl
- * @property string $smsMethod
- * @property string $smsUrl
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $friendlyName
+ * @property string|null $phoneNumber
+ * @property string|null $voiceUrl
+ * @property string|null $voiceMethod
+ * @property string|null $voiceFallbackMethod
+ * @property string|null $voiceFallbackUrl
+ * @property bool|null $voiceCallerIdLookup
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $smsFallbackMethod
+ * @property string|null $smsFallbackUrl
+ * @property string|null $smsMethod
+ * @property string|null $smsUrl
* @property string $addressRequirements
- * @property array $capabilities
- * @property string $statusCallback
- * @property string $statusCallbackMethod
- * @property string $apiVersion
- * @property string $smsApplicationSid
- * @property string $voiceApplicationSid
- * @property string $trunkSid
+ * @property array|null $capabilities
+ * @property string|null $statusCallback
+ * @property string|null $statusCallbackMethod
+ * @property string|null $apiVersion
+ * @property string|null $smsApplicationSid
+ * @property string|null $voiceApplicationSid
+ * @property string|null $trunkSid
* @property string $emergencyStatus
- * @property string $emergencyAddressSid
- * @property string $uri
+ * @property string|null $emergencyAddressSid
+ * @property string|null $uri
*/
class DependentPhoneNumberInstance extends InstanceResource
{
/**
* Initialize the DependentPhoneNumberInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $addressSid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\Address\DependentPhoneNumberInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the DependentPhoneNumber resources to read.
+ * @param string $addressSid The SID of the Address resource associated with the phone number.
*/
- public function __construct(Version $version, array $payload, $accountSid, $addressSid)
+ public function __construct(Version $version, array $payload, string $accountSid, string $addressSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
@@ -86,9 +94,9 @@ public function __construct(Version $version, array $payload, $accountSid, $addr
'emergencyStatus' => Values::array_get($payload, 'emergency_status'),
'emergencyAddressSid' => Values::array_get($payload, 'emergency_address_sid'),
'uri' => Values::array_get($payload, 'uri'),
- );
+ ];
- $this->solution = array('accountSid' => $accountSid, 'addressSid' => $addressSid,);
+ $this->solution = ['accountSid' => $accountSid, 'addressSid' => $addressSid, ];
}
/**
@@ -98,7 +106,7 @@ public function __construct(Version $version, array $payload, $accountSid, $addr
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -117,8 +125,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.DependentPhoneNumberInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Address/DependentPhoneNumberList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Address/DependentPhoneNumberList.php
index b519919..9640764 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Address/DependentPhoneNumberList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Address/DependentPhoneNumberList.php
@@ -2,40 +2,79 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\Address;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class DependentPhoneNumberList extends ListResource
-{
+ {
/**
* Construct the DependentPhoneNumberList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $addressSid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\Address\DependentPhoneNumberList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the DependentPhoneNumber resources to read.
+ * @param string $addressSid The SID of the Address resource associated with the phone number.
*/
- public function __construct(Version $version, $accountSid, $addressSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid,
+ string $addressSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'addressSid' => $addressSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ 'addressSid' =>
+ $addressSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Addresses/' . \rawurlencode($addressSid)
+ .'/DependentPhoneNumbers.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Addresses/' . \rawurlencode($addressSid) . '/DependentPhoneNumbers.json';
+ /**
+ * Reads DependentPhoneNumberInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return DependentPhoneNumberInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
- * Streams DependentPhoneNumberInstance records from the API as a generator
- * stream.
+ * Streams DependentPhoneNumberInstance records from the API as a generator stream.
* This operation lazily loads records as efficiently as possible until the
* limit
* is reached.
@@ -50,9 +89,9 @@ public function __construct(Version $version, $accountSid, $addressSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -61,26 +100,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads DependentPhoneNumberInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return DependentPhoneNumberInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of DependentPhoneNumberInstance records from the API.
* Request is executed immediately
@@ -88,34 +107,34 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of DependentPhoneNumberInstance
+ * @return DependentPhoneNumberPage Page of DependentPhoneNumberInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): DependentPhoneNumberPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new DependentPhoneNumberPage($this->version, $response, $this->solution);
}
/**
- * Retrieve a specific page of DependentPhoneNumberInstance records from the
- * API.
+ * Retrieve a specific page of DependentPhoneNumberInstance records from the API.
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of DependentPhoneNumberInstance
+ * @return DependentPhoneNumberPage Page of DependentPhoneNumberInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): DependentPhoneNumberPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -125,13 +144,14 @@ public function getPage($targetUrl)
return new DependentPhoneNumberPage($this->version, $response, $this->solution);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.DependentPhoneNumberList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Address/DependentPhoneNumberPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Address/DependentPhoneNumberPage.php
index 46a79c5..fb94a43 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Address/DependentPhoneNumberPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Address/DependentPhoneNumberPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return DependentPhoneNumberInstance \Twilio\Rest\Api\V2010\Account\Address\DependentPhoneNumberInstance
+ */
+ public function buildInstance(array $payload): DependentPhoneNumberInstance
{
- return new DependentPhoneNumberInstance(
- $this->version,
- $payload,
- $this->solution['accountSid'],
- $this->solution['addressSid']
- );
+ return new DependentPhoneNumberInstance($this->version, $payload, $this->solution['accountSid'], $this->solution['addressSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.DependentPhoneNumberPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AddressContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AddressContext.php
index 86d7979..52ed5c2 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AddressContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AddressContext.php
@@ -2,73 +2,90 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Api\V2010\Account\Address\DependentPhoneNumberList;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+use Twilio\Rest\Api\V2010\Account\Address\DependentPhoneNumberList;
+
/**
- * @property \Twilio\Rest\Api\V2010\Account\Address\DependentPhoneNumberList $dependentPhoneNumbers
+ * @property DependentPhoneNumberList $dependentPhoneNumbers
*/
class AddressContext extends InstanceContext
-{
- protected $_dependentPhoneNumbers = null;
+ {
+ protected $_dependentPhoneNumbers;
/**
* Initialize the AddressContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that is responsible for
- * this address
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\AddressContext
+ * @param Version $version Version that contains the resource
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will be responsible for the new Address resource.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Address resource to delete.
*/
- public function __construct(Version $version, $accountSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $accountSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'sid' => $sid,);
-
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Addresses/' . \rawurlencode($sid) . '.json';
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Addresses/' . \rawurlencode($sid)
+ .'.json';
}
/**
- * Deletes the AddressInstance
+ * Delete the AddressInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function delete(): bool
{
- return $this->version->delete('delete', $this->uri);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a AddressInstance
+ * Fetch the AddressInstance
*
* @return AddressInstance Fetched AddressInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): AddressInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new AddressInstance(
$this->version,
@@ -78,6 +95,7 @@ public function fetch()
);
}
+
/**
* Update the AddressInstance
*
@@ -85,27 +103,34 @@ public function fetch()
* @return AddressInstance Updated AddressInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): AddressInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'CustomerName' => $options['customerName'],
- 'Street' => $options['street'],
- 'City' => $options['city'],
- 'Region' => $options['region'],
- 'PostalCode' => $options['postalCode'],
- 'EmergencyEnabled' => Serialize::booleanToString($options['emergencyEnabled']),
- 'AutoCorrectAddress' => Serialize::booleanToString($options['autoCorrectAddress']),
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'CustomerName' =>
+ $options['customerName'],
+ 'Street' =>
+ $options['street'],
+ 'City' =>
+ $options['city'],
+ 'Region' =>
+ $options['region'],
+ 'PostalCode' =>
+ $options['postalCode'],
+ 'EmergencyEnabled' =>
+ Serialize::booleanToString($options['emergencyEnabled']),
+ 'AutoCorrectAddress' =>
+ Serialize::booleanToString($options['autoCorrectAddress']),
+ 'StreetSecondary' =>
+ $options['streetSecondary'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new AddressInstance(
$this->version,
@@ -115,12 +140,11 @@ public function update($options = array())
);
}
+
/**
* Access the dependentPhoneNumbers
- *
- * @return \Twilio\Rest\Api\V2010\Account\Address\DependentPhoneNumberList
*/
- protected function getDependentPhoneNumbers()
+ protected function getDependentPhoneNumbers(): DependentPhoneNumberList
{
if (!$this->_dependentPhoneNumbers) {
$this->_dependentPhoneNumbers = new DependentPhoneNumberList(
@@ -137,10 +161,10 @@ protected function getDependentPhoneNumbers()
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -155,10 +179,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -173,12 +197,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.AddressContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AddressInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AddressInstance.php
index be06b4e..fb52dbf 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AddressInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AddressInstance.php
@@ -2,57 +2,66 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Api\V2010\Account\Address\DependentPhoneNumberList;
+
/**
- * @property string $accountSid
- * @property string $city
- * @property string $customerName
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $friendlyName
- * @property string $isoCountry
- * @property string $postalCode
- * @property string $region
- * @property string $sid
- * @property string $street
- * @property string $uri
- * @property bool $emergencyEnabled
- * @property bool $validated
- * @property bool $verified
+ * @property string|null $accountSid
+ * @property string|null $city
+ * @property string|null $customerName
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $friendlyName
+ * @property string|null $isoCountry
+ * @property string|null $postalCode
+ * @property string|null $region
+ * @property string|null $sid
+ * @property string|null $street
+ * @property string|null $uri
+ * @property bool|null $emergencyEnabled
+ * @property bool|null $validated
+ * @property bool|null $verified
+ * @property string|null $streetSecondary
*/
class AddressInstance extends InstanceResource
{
- protected $_dependentPhoneNumbers = null;
+ protected $_dependentPhoneNumbers;
/**
* Initialize the AddressInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The SID of the Account that is responsible for the
- * resource
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\AddressInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will be responsible for the new Address resource.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Address resource to delete.
*/
- public function __construct(Version $version, array $payload, $accountSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $accountSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'city' => Values::array_get($payload, 'city'),
'customerName' => Values::array_get($payload, 'customer_name'),
@@ -68,19 +77,19 @@ public function __construct(Version $version, array $payload, $accountSid, $sid
'emergencyEnabled' => Values::array_get($payload, 'emergency_enabled'),
'validated' => Values::array_get($payload, 'validated'),
'verified' => Values::array_get($payload, 'verified'),
- );
+ 'streetSecondary' => Values::array_get($payload, 'street_secondary'),
+ ];
- $this->solution = array('accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Api\V2010\Account\AddressContext Context for this
- * AddressInstance
+ * @return AddressContext Context for this AddressInstance
*/
- protected function proxy()
+ protected function proxy(): AddressContext
{
if (!$this->context) {
$this->context = new AddressContext(
@@ -94,24 +103,26 @@ protected function proxy()
}
/**
- * Deletes the AddressInstance
+ * Delete the AddressInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function delete(): bool
{
+
return $this->proxy()->delete();
}
/**
- * Fetch a AddressInstance
+ * Fetch the AddressInstance
*
* @return AddressInstance Fetched AddressInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): AddressInstance
{
+
return $this->proxy()->fetch();
}
@@ -122,17 +133,16 @@ public function fetch()
* @return AddressInstance Updated AddressInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): AddressInstance
{
+
return $this->proxy()->update($options);
}
/**
* Access the dependentPhoneNumbers
- *
- * @return \Twilio\Rest\Api\V2010\Account\Address\DependentPhoneNumberList
*/
- protected function getDependentPhoneNumbers()
+ protected function getDependentPhoneNumbers(): DependentPhoneNumberList
{
return $this->proxy()->dependentPhoneNumbers;
}
@@ -144,7 +154,7 @@ protected function getDependentPhoneNumbers()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -163,12 +173,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.AddressInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AddressList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AddressList.php
index 2fbb4d5..a85f000 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AddressList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AddressList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account;
@@ -12,67 +19,108 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class AddressList extends ListResource
-{
+ {
/**
* Construct the AddressList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that is responsible for the
- * resource
- * @return \Twilio\Rest\Api\V2010\Account\AddressList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will be responsible for the new Address resource.
*/
- public function __construct(Version $version, $accountSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid,);
-
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Addresses.json';
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Addresses.json';
}
/**
- * Create a new AddressInstance
+ * Create the AddressInstance
*
- * @param string $customerName The name to associate with the new address
- * @param string $street The number and street address of the new address
- * @param string $city The city of the new address
- * @param string $region The state or region of the new address
- * @param string $postalCode The postal code of the new address
- * @param string $isoCountry The ISO country code of the new address
+ * @param string $customerName The name to associate with the new address.
+ * @param string $street The number and street address of the new address.
+ * @param string $city The city of the new address.
+ * @param string $region The state or region of the new address.
+ * @param string $postalCode The postal code of the new address.
+ * @param string $isoCountry The ISO country code of the new address.
* @param array|Options $options Optional Arguments
- * @return AddressInstance Newly created AddressInstance
+ * @return AddressInstance Created AddressInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($customerName, $street, $city, $region, $postalCode, $isoCountry, $options = array())
+ public function create(string $customerName, string $street, string $city, string $region, string $postalCode, string $isoCountry, array $options = []): AddressInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'CustomerName' => $customerName,
- 'Street' => $street,
- 'City' => $city,
- 'Region' => $region,
- 'PostalCode' => $postalCode,
- 'IsoCountry' => $isoCountry,
- 'FriendlyName' => $options['friendlyName'],
- 'EmergencyEnabled' => Serialize::booleanToString($options['emergencyEnabled']),
- 'AutoCorrectAddress' => Serialize::booleanToString($options['autoCorrectAddress']),
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'CustomerName' =>
+ $customerName,
+ 'Street' =>
+ $street,
+ 'City' =>
+ $city,
+ 'Region' =>
+ $region,
+ 'PostalCode' =>
+ $postalCode,
+ 'IsoCountry' =>
+ $isoCountry,
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'EmergencyEnabled' =>
+ Serialize::booleanToString($options['emergencyEnabled']),
+ 'AutoCorrectAddress' =>
+ Serialize::booleanToString($options['autoCorrectAddress']),
+ 'StreetSecondary' =>
+ $options['streetSecondary'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new AddressInstance(
+ $this->version,
+ $payload,
+ $this->solution['accountSid']
);
+ }
+
- return new AddressInstance($this->version, $payload, $this->solution['accountSid']);
+ /**
+ * Reads AddressInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return AddressInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -92,9 +140,9 @@ public function create($customerName, $street, $city, $region, $postalCode, $iso
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -103,54 +151,37 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads AddressInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return AddressInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of AddressInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of AddressInstance
+ * @return AddressPage Page of AddressInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): AddressPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'CustomerName' => $options['customerName'],
- 'FriendlyName' => $options['friendlyName'],
- 'IsoCountry' => $options['isoCountry'],
+
+ $params = Values::of([
+ 'CustomerName' =>
+ $options['customerName'],
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'IsoCountry' =>
+ $options['isoCountry'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new AddressPage($this->version, $response, $this->solution);
}
@@ -160,9 +191,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of AddressInstance
+ * @return AddressPage Page of AddressInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): AddressPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -172,15 +203,22 @@ public function getPage($targetUrl)
return new AddressPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a AddressContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\AddressContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the Address resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): AddressContext
{
- return new AddressContext($this->version, $this->solution['accountSid'], $sid);
+ return new AddressContext(
+ $this->version,
+ $this->solution['accountSid'],
+ $sid
+ );
}
/**
@@ -188,8 +226,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.AddressList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AddressOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AddressOptions.php
index 4c58ed9..dd27480 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AddressOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AddressOptions.php
@@ -1,10 +1,16 @@
options['friendlyName'] = $friendlyName;
$this->options['emergencyEnabled'] = $emergencyEnabled;
$this->options['autoCorrectAddress'] = $autoCorrectAddress;
+ $this->options['streetSecondary'] = $streetSecondary;
}
/**
* A descriptive string that you create to describe the new address. It can be up to 64 characters long.
*
- * @param string $friendlyName A string to describe the new resource
+ * @param string $friendlyName A descriptive string that you create to describe the new address. It can be up to 64 characters long.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -91,11 +145,10 @@ public function setFriendlyName($friendlyName)
/**
* Whether to enable emergency calling on the new address. Can be: `true` or `false`.
*
- * @param bool $emergencyEnabled Whether to enable emergency calling on the new
- * address
+ * @param bool $emergencyEnabled Whether to enable emergency calling on the new address. Can be: `true` or `false`.
* @return $this Fluent Builder
*/
- public function setEmergencyEnabled($emergencyEnabled)
+ public function setEmergencyEnabled(bool $emergencyEnabled): self
{
$this->options['emergencyEnabled'] = $emergencyEnabled;
return $this;
@@ -104,227 +157,250 @@ public function setEmergencyEnabled($emergencyEnabled)
/**
* Whether we should automatically correct the address. Can be: `true` or `false` and the default is `true`. If empty or `true`, we will correct the address you provide if necessary. If `false`, we won't alter the address you provide.
*
- * @param bool $autoCorrectAddress Whether we should automatically correct the
- * address
+ * @param bool $autoCorrectAddress Whether we should automatically correct the address. Can be: `true` or `false` and the default is `true`. If empty or `true`, we will correct the address you provide if necessary. If `false`, we won't alter the address you provide.
* @return $this Fluent Builder
*/
- public function setAutoCorrectAddress($autoCorrectAddress)
+ public function setAutoCorrectAddress(bool $autoCorrectAddress): self
{
$this->options['autoCorrectAddress'] = $autoCorrectAddress;
return $this;
}
+ /**
+ * The additional number and street address of the address.
+ *
+ * @param string $streetSecondary The additional number and street address of the address.
+ * @return $this Fluent Builder
+ */
+ public function setStreetSecondary(string $streetSecondary): self
+ {
+ $this->options['streetSecondary'] = $streetSecondary;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.CreateAddressOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.CreateAddressOptions ' . $options . ']';
}
}
-class UpdateAddressOptions extends Options
-{
+
+
+class ReadAddressOptions extends Options
+ {
/**
- * @param string $friendlyName A string to describe the resource
- * @param string $customerName The name to associate with the address
- * @param string $street The number and street address of the address
- * @param string $city The city of the address
- * @param string $region The state or region of the address
- * @param string $postalCode The postal code of the address
- * @param bool $emergencyEnabled Whether to enable emergency calling on the
- * address
- * @param bool $autoCorrectAddress Whether we should automatically correct the
- * address
+ * @param string $customerName The `customer_name` of the Address resources to read.
+ * @param string $friendlyName The string that identifies the Address resources to read.
+ * @param string $isoCountry The ISO country code of the Address resources to read.
*/
- public function __construct($friendlyName = Values::NONE, $customerName = Values::NONE, $street = Values::NONE, $city = Values::NONE, $region = Values::NONE, $postalCode = Values::NONE, $emergencyEnabled = Values::NONE, $autoCorrectAddress = Values::NONE)
- {
- $this->options['friendlyName'] = $friendlyName;
+ public function __construct(
+
+ string $customerName = Values::NONE,
+ string $friendlyName = Values::NONE,
+ string $isoCountry = Values::NONE
+
+ ) {
$this->options['customerName'] = $customerName;
- $this->options['street'] = $street;
- $this->options['city'] = $city;
- $this->options['region'] = $region;
- $this->options['postalCode'] = $postalCode;
- $this->options['emergencyEnabled'] = $emergencyEnabled;
- $this->options['autoCorrectAddress'] = $autoCorrectAddress;
+ $this->options['friendlyName'] = $friendlyName;
+ $this->options['isoCountry'] = $isoCountry;
}
/**
- * A descriptive string that you create to describe the address. It can be up to 64 characters long.
+ * The `customer_name` of the Address resources to read.
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $customerName The `customer_name` of the Address resources to read.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setCustomerName(string $customerName): self
{
- $this->options['friendlyName'] = $friendlyName;
+ $this->options['customerName'] = $customerName;
return $this;
}
/**
- * The name to associate with the address.
+ * The string that identifies the Address resources to read.
*
- * @param string $customerName The name to associate with the address
+ * @param string $friendlyName The string that identifies the Address resources to read.
* @return $this Fluent Builder
*/
- public function setCustomerName($customerName)
+ public function setFriendlyName(string $friendlyName): self
{
- $this->options['customerName'] = $customerName;
+ $this->options['friendlyName'] = $friendlyName;
return $this;
}
/**
- * The number and street address of the address.
+ * The ISO country code of the Address resources to read.
*
- * @param string $street The number and street address of the address
+ * @param string $isoCountry The ISO country code of the Address resources to read.
* @return $this Fluent Builder
*/
- public function setStreet($street)
+ public function setIsoCountry(string $isoCountry): self
{
- $this->options['street'] = $street;
+ $this->options['isoCountry'] = $isoCountry;
return $this;
}
/**
- * The city of the address.
+ * Provide a friendly representation
*
- * @param string $city The city of the address
- * @return $this Fluent Builder
+ * @return string Machine friendly representation
*/
- public function setCity($city)
+ public function __toString(): string
{
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.ReadAddressOptions ' . $options . ']';
+ }
+}
+
+class UpdateAddressOptions extends Options
+ {
+ /**
+ * @param string $friendlyName A descriptive string that you create to describe the address. It can be up to 64 characters long.
+ * @param string $customerName The name to associate with the address.
+ * @param string $street The number and street address of the address.
+ * @param string $city The city of the address.
+ * @param string $region The state or region of the address.
+ * @param string $postalCode The postal code of the address.
+ * @param bool $emergencyEnabled Whether to enable emergency calling on the address. Can be: `true` or `false`.
+ * @param bool $autoCorrectAddress Whether we should automatically correct the address. Can be: `true` or `false` and the default is `true`. If empty or `true`, we will correct the address you provide if necessary. If `false`, we won't alter the address you provide.
+ * @param string $streetSecondary The additional number and street address of the address.
+ */
+ public function __construct(
+
+ string $friendlyName = Values::NONE,
+ string $customerName = Values::NONE,
+ string $street = Values::NONE,
+ string $city = Values::NONE,
+ string $region = Values::NONE,
+ string $postalCode = Values::NONE,
+ bool $emergencyEnabled = Values::BOOL_NONE,
+ bool $autoCorrectAddress = Values::BOOL_NONE,
+ string $streetSecondary = Values::NONE
+
+ ) {
+ $this->options['friendlyName'] = $friendlyName;
+ $this->options['customerName'] = $customerName;
+ $this->options['street'] = $street;
$this->options['city'] = $city;
- return $this;
+ $this->options['region'] = $region;
+ $this->options['postalCode'] = $postalCode;
+ $this->options['emergencyEnabled'] = $emergencyEnabled;
+ $this->options['autoCorrectAddress'] = $autoCorrectAddress;
+ $this->options['streetSecondary'] = $streetSecondary;
}
/**
- * The state or region of the address.
+ * A descriptive string that you create to describe the address. It can be up to 64 characters long.
*
- * @param string $region The state or region of the address
+ * @param string $friendlyName A descriptive string that you create to describe the address. It can be up to 64 characters long.
* @return $this Fluent Builder
*/
- public function setRegion($region)
+ public function setFriendlyName(string $friendlyName): self
{
- $this->options['region'] = $region;
+ $this->options['friendlyName'] = $friendlyName;
return $this;
}
/**
- * The postal code of the address.
+ * The name to associate with the address.
*
- * @param string $postalCode The postal code of the address
+ * @param string $customerName The name to associate with the address.
* @return $this Fluent Builder
*/
- public function setPostalCode($postalCode)
+ public function setCustomerName(string $customerName): self
{
- $this->options['postalCode'] = $postalCode;
+ $this->options['customerName'] = $customerName;
return $this;
}
/**
- * Whether to enable emergency calling on the address. Can be: `true` or `false`.
+ * The number and street address of the address.
*
- * @param bool $emergencyEnabled Whether to enable emergency calling on the
- * address
+ * @param string $street The number and street address of the address.
* @return $this Fluent Builder
*/
- public function setEmergencyEnabled($emergencyEnabled)
+ public function setStreet(string $street): self
{
- $this->options['emergencyEnabled'] = $emergencyEnabled;
+ $this->options['street'] = $street;
return $this;
}
/**
- * Whether we should automatically correct the address. Can be: `true` or `false` and the default is `true`. If empty or `true`, we will correct the address you provide if necessary. If `false`, we won't alter the address you provide.
+ * The city of the address.
*
- * @param bool $autoCorrectAddress Whether we should automatically correct the
- * address
+ * @param string $city The city of the address.
* @return $this Fluent Builder
*/
- public function setAutoCorrectAddress($autoCorrectAddress)
+ public function setCity(string $city): self
{
- $this->options['autoCorrectAddress'] = $autoCorrectAddress;
+ $this->options['city'] = $city;
return $this;
}
/**
- * Provide a friendly representation
+ * The state or region of the address.
*
- * @return string Machine friendly representation
+ * @param string $region The state or region of the address.
+ * @return $this Fluent Builder
*/
- public function __toString()
+ public function setRegion(string $region): self
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.UpdateAddressOptions ' . \implode(' ', $options) . ']';
+ $this->options['region'] = $region;
+ return $this;
}
-}
-class ReadAddressOptions extends Options
-{
/**
- * @param string $customerName The `customer_name` of the Address resources to
- * read
- * @param string $friendlyName The string that identifies the Address resources
- * to read
- * @param string $isoCountry The ISO country code of the Address resources to
- * read
+ * The postal code of the address.
+ *
+ * @param string $postalCode The postal code of the address.
+ * @return $this Fluent Builder
*/
- public function __construct($customerName = Values::NONE, $friendlyName = Values::NONE, $isoCountry = Values::NONE)
+ public function setPostalCode(string $postalCode): self
{
- $this->options['customerName'] = $customerName;
- $this->options['friendlyName'] = $friendlyName;
- $this->options['isoCountry'] = $isoCountry;
+ $this->options['postalCode'] = $postalCode;
+ return $this;
}
/**
- * The `customer_name` of the Address resources to read.
+ * Whether to enable emergency calling on the address. Can be: `true` or `false`.
*
- * @param string $customerName The `customer_name` of the Address resources to
- * read
+ * @param bool $emergencyEnabled Whether to enable emergency calling on the address. Can be: `true` or `false`.
* @return $this Fluent Builder
*/
- public function setCustomerName($customerName)
+ public function setEmergencyEnabled(bool $emergencyEnabled): self
{
- $this->options['customerName'] = $customerName;
+ $this->options['emergencyEnabled'] = $emergencyEnabled;
return $this;
}
/**
- * The string that identifies the Address resources to read.
+ * Whether we should automatically correct the address. Can be: `true` or `false` and the default is `true`. If empty or `true`, we will correct the address you provide if necessary. If `false`, we won't alter the address you provide.
*
- * @param string $friendlyName The string that identifies the Address resources
- * to read
+ * @param bool $autoCorrectAddress Whether we should automatically correct the address. Can be: `true` or `false` and the default is `true`. If empty or `true`, we will correct the address you provide if necessary. If `false`, we won't alter the address you provide.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setAutoCorrectAddress(bool $autoCorrectAddress): self
{
- $this->options['friendlyName'] = $friendlyName;
+ $this->options['autoCorrectAddress'] = $autoCorrectAddress;
return $this;
}
/**
- * The ISO country code of the Address resources to read.
+ * The additional number and street address of the address.
*
- * @param string $isoCountry The ISO country code of the Address resources to
- * read
+ * @param string $streetSecondary The additional number and street address of the address.
* @return $this Fluent Builder
*/
- public function setIsoCountry($isoCountry)
+ public function setStreetSecondary(string $streetSecondary): self
{
- $this->options['isoCountry'] = $isoCountry;
+ $this->options['streetSecondary'] = $streetSecondary;
return $this;
}
@@ -333,14 +409,10 @@ public function setIsoCountry($isoCountry)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.ReadAddressOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.UpdateAddressOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AddressPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AddressPage.php
index e0e568b..050e7fd 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AddressPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AddressPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return AddressInstance \Twilio\Rest\Api\V2010\Account\AddressInstance
+ */
+ public function buildInstance(array $payload): AddressInstance
{
return new AddressInstance($this->version, $payload, $this->solution['accountSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.AddressPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ApplicationContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ApplicationContext.php
index e81b89a..b911a24 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ApplicationContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ApplicationContext.php
@@ -2,67 +2,83 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
class ApplicationContext extends InstanceContext
-{
+ {
/**
* Initialize the ApplicationContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * to fetch
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\ApplicationContext
+ * @param Version $version Version that contains the resource
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Application resource to delete.
*/
- public function __construct(Version $version, $accountSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $accountSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'sid' => $sid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Applications/' . \rawurlencode($sid) . '.json';
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Applications/' . \rawurlencode($sid)
+ .'.json';
}
/**
- * Deletes the ApplicationInstance
+ * Delete the ApplicationInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function delete(): bool
{
- return $this->version->delete('delete', $this->uri);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a ApplicationInstance
+ * Fetch the ApplicationInstance
*
* @return ApplicationInstance Fetched ApplicationInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): ApplicationInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new ApplicationInstance(
$this->version,
@@ -72,6 +88,7 @@ public function fetch()
);
}
+
/**
* Update the ApplicationInstance
*
@@ -79,34 +96,48 @@ public function fetch()
* @return ApplicationInstance Updated ApplicationInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ApplicationInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'ApiVersion' => $options['apiVersion'],
- 'VoiceUrl' => $options['voiceUrl'],
- 'VoiceMethod' => $options['voiceMethod'],
- 'VoiceFallbackUrl' => $options['voiceFallbackUrl'],
- 'VoiceFallbackMethod' => $options['voiceFallbackMethod'],
- 'StatusCallback' => $options['statusCallback'],
- 'StatusCallbackMethod' => $options['statusCallbackMethod'],
- 'VoiceCallerIdLookup' => Serialize::booleanToString($options['voiceCallerIdLookup']),
- 'SmsUrl' => $options['smsUrl'],
- 'SmsMethod' => $options['smsMethod'],
- 'SmsFallbackUrl' => $options['smsFallbackUrl'],
- 'SmsFallbackMethod' => $options['smsFallbackMethod'],
- 'SmsStatusCallback' => $options['smsStatusCallback'],
- 'MessageStatusCallback' => $options['messageStatusCallback'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'ApiVersion' =>
+ $options['apiVersion'],
+ 'VoiceUrl' =>
+ $options['voiceUrl'],
+ 'VoiceMethod' =>
+ $options['voiceMethod'],
+ 'VoiceFallbackUrl' =>
+ $options['voiceFallbackUrl'],
+ 'VoiceFallbackMethod' =>
+ $options['voiceFallbackMethod'],
+ 'StatusCallback' =>
+ $options['statusCallback'],
+ 'StatusCallbackMethod' =>
+ $options['statusCallbackMethod'],
+ 'VoiceCallerIdLookup' =>
+ Serialize::booleanToString($options['voiceCallerIdLookup']),
+ 'SmsUrl' =>
+ $options['smsUrl'],
+ 'SmsMethod' =>
+ $options['smsMethod'],
+ 'SmsFallbackUrl' =>
+ $options['smsFallbackUrl'],
+ 'SmsFallbackMethod' =>
+ $options['smsFallbackMethod'],
+ 'SmsStatusCallback' =>
+ $options['smsStatusCallback'],
+ 'MessageStatusCallback' =>
+ $options['messageStatusCallback'],
+ 'PublicApplicationConnectEnabled' =>
+ Serialize::booleanToString($options['publicApplicationConnectEnabled']),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new ApplicationInstance(
$this->version,
@@ -116,17 +147,18 @@ public function update($options = array())
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.ApplicationContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ApplicationInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ApplicationInstance.php
index fcd23e5..97cd3d1 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ApplicationInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ApplicationInstance.php
@@ -2,59 +2,68 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property string $apiVersion
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $friendlyName
- * @property string $messageStatusCallback
- * @property string $sid
- * @property string $smsFallbackMethod
- * @property string $smsFallbackUrl
- * @property string $smsMethod
- * @property string $smsStatusCallback
- * @property string $smsUrl
- * @property string $statusCallback
- * @property string $statusCallbackMethod
- * @property string $uri
- * @property bool $voiceCallerIdLookup
- * @property string $voiceFallbackMethod
- * @property string $voiceFallbackUrl
- * @property string $voiceMethod
- * @property string $voiceUrl
+ * @property string|null $accountSid
+ * @property string|null $apiVersion
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $friendlyName
+ * @property string|null $messageStatusCallback
+ * @property string|null $sid
+ * @property string|null $smsFallbackMethod
+ * @property string|null $smsFallbackUrl
+ * @property string|null $smsMethod
+ * @property string|null $smsStatusCallback
+ * @property string|null $smsUrl
+ * @property string|null $statusCallback
+ * @property string|null $statusCallbackMethod
+ * @property string|null $uri
+ * @property bool|null $voiceCallerIdLookup
+ * @property string|null $voiceFallbackMethod
+ * @property string|null $voiceFallbackUrl
+ * @property string|null $voiceMethod
+ * @property string|null $voiceUrl
+ * @property bool|null $publicApplicationConnectEnabled
*/
class ApplicationInstance extends InstanceResource
{
/**
* Initialize the ApplicationInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\ApplicationInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Application resource to delete.
*/
- public function __construct(Version $version, array $payload, $accountSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $accountSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'apiVersion' => Values::array_get($payload, 'api_version'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
@@ -75,19 +84,19 @@ public function __construct(Version $version, array $payload, $accountSid, $sid
'voiceFallbackUrl' => Values::array_get($payload, 'voice_fallback_url'),
'voiceMethod' => Values::array_get($payload, 'voice_method'),
'voiceUrl' => Values::array_get($payload, 'voice_url'),
- );
+ 'publicApplicationConnectEnabled' => Values::array_get($payload, 'public_application_connect_enabled'),
+ ];
- $this->solution = array('accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Api\V2010\Account\ApplicationContext Context for this
- * ApplicationInstance
+ * @return ApplicationContext Context for this ApplicationInstance
*/
- protected function proxy()
+ protected function proxy(): ApplicationContext
{
if (!$this->context) {
$this->context = new ApplicationContext(
@@ -101,24 +110,26 @@ protected function proxy()
}
/**
- * Deletes the ApplicationInstance
+ * Delete the ApplicationInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function delete(): bool
{
+
return $this->proxy()->delete();
}
/**
- * Fetch a ApplicationInstance
+ * Fetch the ApplicationInstance
*
* @return ApplicationInstance Fetched ApplicationInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): ApplicationInstance
{
+
return $this->proxy()->fetch();
}
@@ -129,8 +140,9 @@ public function fetch()
* @return ApplicationInstance Updated ApplicationInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ApplicationInstance
{
+
return $this->proxy()->update($options);
}
@@ -141,7 +153,7 @@ public function update($options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -160,12 +172,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.ApplicationInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ApplicationList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ApplicationList.php
index ee5d53a..f5a1ed8 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ApplicationList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ApplicationList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account;
@@ -12,66 +19,114 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class ApplicationList extends ListResource
-{
+ {
/**
* Construct the ApplicationList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * @return \Twilio\Rest\Api\V2010\Account\ApplicationList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
*/
- public function __construct(Version $version, $accountSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid,);
-
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Applications.json';
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Applications.json';
}
/**
- * Create a new ApplicationInstance
+ * Create the ApplicationInstance
*
* @param array|Options $options Optional Arguments
- * @return ApplicationInstance Newly created ApplicationInstance
+ * @return ApplicationInstance Created ApplicationInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($options = array())
+ public function create(array $options = []): ApplicationInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'ApiVersion' => $options['apiVersion'],
- 'VoiceUrl' => $options['voiceUrl'],
- 'VoiceMethod' => $options['voiceMethod'],
- 'VoiceFallbackUrl' => $options['voiceFallbackUrl'],
- 'VoiceFallbackMethod' => $options['voiceFallbackMethod'],
- 'StatusCallback' => $options['statusCallback'],
- 'StatusCallbackMethod' => $options['statusCallbackMethod'],
- 'VoiceCallerIdLookup' => Serialize::booleanToString($options['voiceCallerIdLookup']),
- 'SmsUrl' => $options['smsUrl'],
- 'SmsMethod' => $options['smsMethod'],
- 'SmsFallbackUrl' => $options['smsFallbackUrl'],
- 'SmsFallbackMethod' => $options['smsFallbackMethod'],
- 'SmsStatusCallback' => $options['smsStatusCallback'],
- 'MessageStatusCallback' => $options['messageStatusCallback'],
- 'FriendlyName' => $options['friendlyName'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'ApiVersion' =>
+ $options['apiVersion'],
+ 'VoiceUrl' =>
+ $options['voiceUrl'],
+ 'VoiceMethod' =>
+ $options['voiceMethod'],
+ 'VoiceFallbackUrl' =>
+ $options['voiceFallbackUrl'],
+ 'VoiceFallbackMethod' =>
+ $options['voiceFallbackMethod'],
+ 'StatusCallback' =>
+ $options['statusCallback'],
+ 'StatusCallbackMethod' =>
+ $options['statusCallbackMethod'],
+ 'VoiceCallerIdLookup' =>
+ Serialize::booleanToString($options['voiceCallerIdLookup']),
+ 'SmsUrl' =>
+ $options['smsUrl'],
+ 'SmsMethod' =>
+ $options['smsMethod'],
+ 'SmsFallbackUrl' =>
+ $options['smsFallbackUrl'],
+ 'SmsFallbackMethod' =>
+ $options['smsFallbackMethod'],
+ 'SmsStatusCallback' =>
+ $options['smsStatusCallback'],
+ 'MessageStatusCallback' =>
+ $options['messageStatusCallback'],
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'PublicApplicationConnectEnabled' =>
+ Serialize::booleanToString($options['publicApplicationConnectEnabled']),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new ApplicationInstance(
+ $this->version,
+ $payload,
+ $this->solution['accountSid']
);
+ }
+
- return new ApplicationInstance($this->version, $payload, $this->solution['accountSid']);
+ /**
+ * Reads ApplicationInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return ApplicationInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -91,9 +146,9 @@ public function create($options = array())
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -102,52 +157,33 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads ApplicationInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return ApplicationInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of ApplicationInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of ApplicationInstance
+ * @return ApplicationPage Page of ApplicationInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): ApplicationPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
+
+ $params = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new ApplicationPage($this->version, $response, $this->solution);
}
@@ -157,9 +193,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of ApplicationInstance
+ * @return ApplicationPage Page of ApplicationInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): ApplicationPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -169,15 +205,22 @@ public function getPage($targetUrl)
return new ApplicationPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a ApplicationContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\ApplicationContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the Application resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): ApplicationContext
{
- return new ApplicationContext($this->version, $this->solution['accountSid'], $sid);
+ return new ApplicationContext(
+ $this->version,
+ $this->solution['accountSid'],
+ $sid
+ );
}
/**
@@ -185,8 +228,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.ApplicationList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ApplicationOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ApplicationOptions.php
index 25f05e0..27418a6 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ApplicationOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ApplicationOptions.php
@@ -1,10 +1,16 @@
options['apiVersion'] = $apiVersion;
$this->options['voiceUrl'] = $voiceUrl;
$this->options['voiceMethod'] = $voiceMethod;
@@ -128,15 +214,16 @@ public function __construct($apiVersion = Values::NONE, $voiceUrl = Values::NONE
$this->options['smsStatusCallback'] = $smsStatusCallback;
$this->options['messageStatusCallback'] = $messageStatusCallback;
$this->options['friendlyName'] = $friendlyName;
+ $this->options['publicApplicationConnectEnabled'] = $publicApplicationConnectEnabled;
}
/**
* The API version to use to start a new TwiML session. Can be: `2010-04-01` or `2008-08-01`. The default value is the account's default API version.
*
- * @param string $apiVersion The API version to use to start a new TwiML session
+ * @param string $apiVersion The API version to use to start a new TwiML session. Can be: `2010-04-01` or `2008-08-01`. The default value is the account's default API version.
* @return $this Fluent Builder
*/
- public function setApiVersion($apiVersion)
+ public function setApiVersion(string $apiVersion): self
{
$this->options['apiVersion'] = $apiVersion;
return $this;
@@ -145,10 +232,10 @@ public function setApiVersion($apiVersion)
/**
* The URL we should call when the phone number assigned to this application receives a call.
*
- * @param string $voiceUrl The URL to call when the phone number receives a call
+ * @param string $voiceUrl The URL we should call when the phone number assigned to this application receives a call.
* @return $this Fluent Builder
*/
- public function setVoiceUrl($voiceUrl)
+ public function setVoiceUrl(string $voiceUrl): self
{
$this->options['voiceUrl'] = $voiceUrl;
return $this;
@@ -157,10 +244,10 @@ public function setVoiceUrl($voiceUrl)
/**
* The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`.
*
- * @param string $voiceMethod The HTTP method to use with the voice_url
+ * @param string $voiceMethod The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`.
* @return $this Fluent Builder
*/
- public function setVoiceMethod($voiceMethod)
+ public function setVoiceMethod(string $voiceMethod): self
{
$this->options['voiceMethod'] = $voiceMethod;
return $this;
@@ -169,10 +256,10 @@ public function setVoiceMethod($voiceMethod)
/**
* The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`.
*
- * @param string $voiceFallbackUrl The URL to call when a TwiML error occurs
+ * @param string $voiceFallbackUrl The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`.
* @return $this Fluent Builder
*/
- public function setVoiceFallbackUrl($voiceFallbackUrl)
+ public function setVoiceFallbackUrl(string $voiceFallbackUrl): self
{
$this->options['voiceFallbackUrl'] = $voiceFallbackUrl;
return $this;
@@ -181,11 +268,10 @@ public function setVoiceFallbackUrl($voiceFallbackUrl)
/**
* The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`.
*
- * @param string $voiceFallbackMethod The HTTP method to use with
- * voice_fallback_url
+ * @param string $voiceFallbackMethod The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`.
* @return $this Fluent Builder
*/
- public function setVoiceFallbackMethod($voiceFallbackMethod)
+ public function setVoiceFallbackMethod(string $voiceFallbackMethod): self
{
$this->options['voiceFallbackMethod'] = $voiceFallbackMethod;
return $this;
@@ -194,11 +280,10 @@ public function setVoiceFallbackMethod($voiceFallbackMethod)
/**
* The URL we should call using the `status_callback_method` to send status information to your application.
*
- * @param string $statusCallback The URL to send status information to your
- * application
+ * @param string $statusCallback The URL we should call using the `status_callback_method` to send status information to your application.
* @return $this Fluent Builder
*/
- public function setStatusCallback($statusCallback)
+ public function setStatusCallback(string $statusCallback): self
{
$this->options['statusCallback'] = $statusCallback;
return $this;
@@ -207,11 +292,10 @@ public function setStatusCallback($statusCallback)
/**
* The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST`.
*
- * @param string $statusCallbackMethod The HTTP method to use to call
- * status_callback
+ * @param string $statusCallbackMethod The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST`.
* @return $this Fluent Builder
*/
- public function setStatusCallbackMethod($statusCallbackMethod)
+ public function setStatusCallbackMethod(string $statusCallbackMethod): self
{
$this->options['statusCallbackMethod'] = $statusCallbackMethod;
return $this;
@@ -220,10 +304,10 @@ public function setStatusCallbackMethod($statusCallbackMethod)
/**
* Whether we should look up the caller's caller-ID name from the CNAM database (additional charges apply). Can be: `true` or `false`.
*
- * @param bool $voiceCallerIdLookup Whether to lookup the caller's name
+ * @param bool $voiceCallerIdLookup Whether we should look up the caller's caller-ID name from the CNAM database (additional charges apply). Can be: `true` or `false`.
* @return $this Fluent Builder
*/
- public function setVoiceCallerIdLookup($voiceCallerIdLookup)
+ public function setVoiceCallerIdLookup(bool $voiceCallerIdLookup): self
{
$this->options['voiceCallerIdLookup'] = $voiceCallerIdLookup;
return $this;
@@ -232,11 +316,10 @@ public function setVoiceCallerIdLookup($voiceCallerIdLookup)
/**
* The URL we should call when the phone number receives an incoming SMS message.
*
- * @param string $smsUrl The URL to call when the phone number receives an
- * incoming SMS message
+ * @param string $smsUrl The URL we should call when the phone number receives an incoming SMS message.
* @return $this Fluent Builder
*/
- public function setSmsUrl($smsUrl)
+ public function setSmsUrl(string $smsUrl): self
{
$this->options['smsUrl'] = $smsUrl;
return $this;
@@ -245,10 +328,10 @@ public function setSmsUrl($smsUrl)
/**
* The HTTP method we should use to call `sms_url`. Can be: `GET` or `POST`.
*
- * @param string $smsMethod The HTTP method to use with sms_url
+ * @param string $smsMethod The HTTP method we should use to call `sms_url`. Can be: `GET` or `POST`.
* @return $this Fluent Builder
*/
- public function setSmsMethod($smsMethod)
+ public function setSmsMethod(string $smsMethod): self
{
$this->options['smsMethod'] = $smsMethod;
return $this;
@@ -257,11 +340,10 @@ public function setSmsMethod($smsMethod)
/**
* The URL that we should call when an error occurs while retrieving or executing the TwiML from `sms_url`.
*
- * @param string $smsFallbackUrl The URL to call when an error occurs while
- * retrieving or executing the TwiML
+ * @param string $smsFallbackUrl The URL that we should call when an error occurs while retrieving or executing the TwiML from `sms_url`.
* @return $this Fluent Builder
*/
- public function setSmsFallbackUrl($smsFallbackUrl)
+ public function setSmsFallbackUrl(string $smsFallbackUrl): self
{
$this->options['smsFallbackUrl'] = $smsFallbackUrl;
return $this;
@@ -270,10 +352,10 @@ public function setSmsFallbackUrl($smsFallbackUrl)
/**
* The HTTP method we should use to call `sms_fallback_url`. Can be: `GET` or `POST`.
*
- * @param string $smsFallbackMethod The HTTP method to use with sms_fallback_url
+ * @param string $smsFallbackMethod The HTTP method we should use to call `sms_fallback_url`. Can be: `GET` or `POST`.
* @return $this Fluent Builder
*/
- public function setSmsFallbackMethod($smsFallbackMethod)
+ public function setSmsFallbackMethod(string $smsFallbackMethod): self
{
$this->options['smsFallbackMethod'] = $smsFallbackMethod;
return $this;
@@ -282,11 +364,10 @@ public function setSmsFallbackMethod($smsFallbackMethod)
/**
* The URL we should call using a POST method to send status information about SMS messages sent by the application.
*
- * @param string $smsStatusCallback The URL to send status information to your
- * application
+ * @param string $smsStatusCallback The URL we should call using a POST method to send status information about SMS messages sent by the application.
* @return $this Fluent Builder
*/
- public function setSmsStatusCallback($smsStatusCallback)
+ public function setSmsStatusCallback(string $smsStatusCallback): self
{
$this->options['smsStatusCallback'] = $smsStatusCallback;
return $this;
@@ -295,11 +376,10 @@ public function setSmsStatusCallback($smsStatusCallback)
/**
* The URL we should call using a POST method to send message status information to your application.
*
- * @param string $messageStatusCallback The URL to send message status
- * information to your application
+ * @param string $messageStatusCallback The URL we should call using a POST method to send message status information to your application.
* @return $this Fluent Builder
*/
- public function setMessageStatusCallback($messageStatusCallback)
+ public function setMessageStatusCallback(string $messageStatusCallback): self
{
$this->options['messageStatusCallback'] = $messageStatusCallback;
return $this;
@@ -308,51 +388,61 @@ public function setMessageStatusCallback($messageStatusCallback)
/**
* A descriptive string that you create to describe the new application. It can be up to 64 characters long.
*
- * @param string $friendlyName A string to describe the new resource
+ * @param string $friendlyName A descriptive string that you create to describe the new application. It can be up to 64 characters long.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
}
+ /**
+ * Whether to allow other Twilio accounts to dial this applicaton using Dial verb. Can be: `true` or `false`.
+ *
+ * @param bool $publicApplicationConnectEnabled Whether to allow other Twilio accounts to dial this applicaton using Dial verb. Can be: `true` or `false`.
+ * @return $this Fluent Builder
+ */
+ public function setPublicApplicationConnectEnabled(bool $publicApplicationConnectEnabled): self
+ {
+ $this->options['publicApplicationConnectEnabled'] = $publicApplicationConnectEnabled;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.CreateApplicationOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.CreateApplicationOptions ' . $options . ']';
}
}
+
+
class ReadApplicationOptions extends Options
-{
+ {
/**
- * @param string $friendlyName The string that identifies the Application
- * resources to read
+ * @param string $friendlyName The string that identifies the Application resources to read.
*/
- public function __construct($friendlyName = Values::NONE)
- {
+ public function __construct(
+
+ string $friendlyName = Values::NONE
+
+ ) {
$this->options['friendlyName'] = $friendlyName;
}
/**
* The string that identifies the Application resources to read.
*
- * @param string $friendlyName The string that identifies the Application
- * resources to read
+ * @param string $friendlyName The string that identifies the Application resources to read.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -363,46 +453,53 @@ public function setFriendlyName($friendlyName)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.ReadApplicationOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.ReadApplicationOptions ' . $options . ']';
}
}
class UpdateApplicationOptions extends Options
-{
- /**
- * @param string $friendlyName A string to describe the resource
- * @param string $apiVersion The API version to use to start a new TwiML session
- * @param string $voiceUrl The URL to call when the phone number receives a call
- * @param string $voiceMethod The HTTP method to use with the voice_url
- * @param string $voiceFallbackUrl The URL to call when a TwiML error occurs
- * @param string $voiceFallbackMethod The HTTP method to use with
- * voice_fallback_url
- * @param string $statusCallback The URL to send status information to your
- * application
- * @param string $statusCallbackMethod The HTTP method to use to call
- * status_callback
- * @param bool $voiceCallerIdLookup Whether to lookup the caller's name
- * @param string $smsUrl The URL to call when the phone number receives an
- * incoming SMS message
- * @param string $smsMethod The HTTP method to use with sms_url
- * @param string $smsFallbackUrl The URL to call when an error occurs while
- * retrieving or executing the TwiML
- * @param string $smsFallbackMethod The HTTP method to use with sms_fallback_url
- * @param string $smsStatusCallback The URL to send status information to your
- * application
- * @param string $messageStatusCallback The URL to send message status
- * information to your application
- */
- public function __construct($friendlyName = Values::NONE, $apiVersion = Values::NONE, $voiceUrl = Values::NONE, $voiceMethod = Values::NONE, $voiceFallbackUrl = Values::NONE, $voiceFallbackMethod = Values::NONE, $statusCallback = Values::NONE, $statusCallbackMethod = Values::NONE, $voiceCallerIdLookup = Values::NONE, $smsUrl = Values::NONE, $smsMethod = Values::NONE, $smsFallbackUrl = Values::NONE, $smsFallbackMethod = Values::NONE, $smsStatusCallback = Values::NONE, $messageStatusCallback = Values::NONE)
{
+ /**
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
+ * @param string $apiVersion The API version to use to start a new TwiML session. Can be: `2010-04-01` or `2008-08-01`. The default value is your account's default API version.
+ * @param string $voiceUrl The URL we should call when the phone number assigned to this application receives a call.
+ * @param string $voiceMethod The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`.
+ * @param string $voiceFallbackUrl The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`.
+ * @param string $voiceFallbackMethod The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`.
+ * @param string $statusCallback The URL we should call using the `status_callback_method` to send status information to your application.
+ * @param string $statusCallbackMethod The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST`.
+ * @param bool $voiceCallerIdLookup Whether we should look up the caller's caller-ID name from the CNAM database (additional charges apply). Can be: `true` or `false`.
+ * @param string $smsUrl The URL we should call when the phone number receives an incoming SMS message.
+ * @param string $smsMethod The HTTP method we should use to call `sms_url`. Can be: `GET` or `POST`.
+ * @param string $smsFallbackUrl The URL that we should call when an error occurs while retrieving or executing the TwiML from `sms_url`.
+ * @param string $smsFallbackMethod The HTTP method we should use to call `sms_fallback_url`. Can be: `GET` or `POST`.
+ * @param string $smsStatusCallback Same as message_status_callback: The URL we should call using a POST method to send status information about SMS messages sent by the application. Deprecated, included for backwards compatibility.
+ * @param string $messageStatusCallback The URL we should call using a POST method to send message status information to your application.
+ * @param bool $publicApplicationConnectEnabled Whether to allow other Twilio accounts to dial this applicaton using Dial verb. Can be: `true` or `false`.
+ */
+ public function __construct(
+
+ string $friendlyName = Values::NONE,
+ string $apiVersion = Values::NONE,
+ string $voiceUrl = Values::NONE,
+ string $voiceMethod = Values::NONE,
+ string $voiceFallbackUrl = Values::NONE,
+ string $voiceFallbackMethod = Values::NONE,
+ string $statusCallback = Values::NONE,
+ string $statusCallbackMethod = Values::NONE,
+ bool $voiceCallerIdLookup = Values::BOOL_NONE,
+ string $smsUrl = Values::NONE,
+ string $smsMethod = Values::NONE,
+ string $smsFallbackUrl = Values::NONE,
+ string $smsFallbackMethod = Values::NONE,
+ string $smsStatusCallback = Values::NONE,
+ string $messageStatusCallback = Values::NONE,
+ bool $publicApplicationConnectEnabled = Values::BOOL_NONE
+
+ ) {
$this->options['friendlyName'] = $friendlyName;
$this->options['apiVersion'] = $apiVersion;
$this->options['voiceUrl'] = $voiceUrl;
@@ -418,15 +515,16 @@ public function __construct($friendlyName = Values::NONE, $apiVersion = Values::
$this->options['smsFallbackMethod'] = $smsFallbackMethod;
$this->options['smsStatusCallback'] = $smsStatusCallback;
$this->options['messageStatusCallback'] = $messageStatusCallback;
+ $this->options['publicApplicationConnectEnabled'] = $publicApplicationConnectEnabled;
}
/**
* A descriptive string that you create to describe the resource. It can be up to 64 characters long.
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -435,10 +533,10 @@ public function setFriendlyName($friendlyName)
/**
* The API version to use to start a new TwiML session. Can be: `2010-04-01` or `2008-08-01`. The default value is your account's default API version.
*
- * @param string $apiVersion The API version to use to start a new TwiML session
+ * @param string $apiVersion The API version to use to start a new TwiML session. Can be: `2010-04-01` or `2008-08-01`. The default value is your account's default API version.
* @return $this Fluent Builder
*/
- public function setApiVersion($apiVersion)
+ public function setApiVersion(string $apiVersion): self
{
$this->options['apiVersion'] = $apiVersion;
return $this;
@@ -447,10 +545,10 @@ public function setApiVersion($apiVersion)
/**
* The URL we should call when the phone number assigned to this application receives a call.
*
- * @param string $voiceUrl The URL to call when the phone number receives a call
+ * @param string $voiceUrl The URL we should call when the phone number assigned to this application receives a call.
* @return $this Fluent Builder
*/
- public function setVoiceUrl($voiceUrl)
+ public function setVoiceUrl(string $voiceUrl): self
{
$this->options['voiceUrl'] = $voiceUrl;
return $this;
@@ -459,10 +557,10 @@ public function setVoiceUrl($voiceUrl)
/**
* The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`.
*
- * @param string $voiceMethod The HTTP method to use with the voice_url
+ * @param string $voiceMethod The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`.
* @return $this Fluent Builder
*/
- public function setVoiceMethod($voiceMethod)
+ public function setVoiceMethod(string $voiceMethod): self
{
$this->options['voiceMethod'] = $voiceMethod;
return $this;
@@ -471,10 +569,10 @@ public function setVoiceMethod($voiceMethod)
/**
* The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`.
*
- * @param string $voiceFallbackUrl The URL to call when a TwiML error occurs
+ * @param string $voiceFallbackUrl The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`.
* @return $this Fluent Builder
*/
- public function setVoiceFallbackUrl($voiceFallbackUrl)
+ public function setVoiceFallbackUrl(string $voiceFallbackUrl): self
{
$this->options['voiceFallbackUrl'] = $voiceFallbackUrl;
return $this;
@@ -483,11 +581,10 @@ public function setVoiceFallbackUrl($voiceFallbackUrl)
/**
* The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`.
*
- * @param string $voiceFallbackMethod The HTTP method to use with
- * voice_fallback_url
+ * @param string $voiceFallbackMethod The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`.
* @return $this Fluent Builder
*/
- public function setVoiceFallbackMethod($voiceFallbackMethod)
+ public function setVoiceFallbackMethod(string $voiceFallbackMethod): self
{
$this->options['voiceFallbackMethod'] = $voiceFallbackMethod;
return $this;
@@ -496,11 +593,10 @@ public function setVoiceFallbackMethod($voiceFallbackMethod)
/**
* The URL we should call using the `status_callback_method` to send status information to your application.
*
- * @param string $statusCallback The URL to send status information to your
- * application
+ * @param string $statusCallback The URL we should call using the `status_callback_method` to send status information to your application.
* @return $this Fluent Builder
*/
- public function setStatusCallback($statusCallback)
+ public function setStatusCallback(string $statusCallback): self
{
$this->options['statusCallback'] = $statusCallback;
return $this;
@@ -509,11 +605,10 @@ public function setStatusCallback($statusCallback)
/**
* The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST`.
*
- * @param string $statusCallbackMethod The HTTP method to use to call
- * status_callback
+ * @param string $statusCallbackMethod The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST`.
* @return $this Fluent Builder
*/
- public function setStatusCallbackMethod($statusCallbackMethod)
+ public function setStatusCallbackMethod(string $statusCallbackMethod): self
{
$this->options['statusCallbackMethod'] = $statusCallbackMethod;
return $this;
@@ -522,10 +617,10 @@ public function setStatusCallbackMethod($statusCallbackMethod)
/**
* Whether we should look up the caller's caller-ID name from the CNAM database (additional charges apply). Can be: `true` or `false`.
*
- * @param bool $voiceCallerIdLookup Whether to lookup the caller's name
+ * @param bool $voiceCallerIdLookup Whether we should look up the caller's caller-ID name from the CNAM database (additional charges apply). Can be: `true` or `false`.
* @return $this Fluent Builder
*/
- public function setVoiceCallerIdLookup($voiceCallerIdLookup)
+ public function setVoiceCallerIdLookup(bool $voiceCallerIdLookup): self
{
$this->options['voiceCallerIdLookup'] = $voiceCallerIdLookup;
return $this;
@@ -534,11 +629,10 @@ public function setVoiceCallerIdLookup($voiceCallerIdLookup)
/**
* The URL we should call when the phone number receives an incoming SMS message.
*
- * @param string $smsUrl The URL to call when the phone number receives an
- * incoming SMS message
+ * @param string $smsUrl The URL we should call when the phone number receives an incoming SMS message.
* @return $this Fluent Builder
*/
- public function setSmsUrl($smsUrl)
+ public function setSmsUrl(string $smsUrl): self
{
$this->options['smsUrl'] = $smsUrl;
return $this;
@@ -547,10 +641,10 @@ public function setSmsUrl($smsUrl)
/**
* The HTTP method we should use to call `sms_url`. Can be: `GET` or `POST`.
*
- * @param string $smsMethod The HTTP method to use with sms_url
+ * @param string $smsMethod The HTTP method we should use to call `sms_url`. Can be: `GET` or `POST`.
* @return $this Fluent Builder
*/
- public function setSmsMethod($smsMethod)
+ public function setSmsMethod(string $smsMethod): self
{
$this->options['smsMethod'] = $smsMethod;
return $this;
@@ -559,11 +653,10 @@ public function setSmsMethod($smsMethod)
/**
* The URL that we should call when an error occurs while retrieving or executing the TwiML from `sms_url`.
*
- * @param string $smsFallbackUrl The URL to call when an error occurs while
- * retrieving or executing the TwiML
+ * @param string $smsFallbackUrl The URL that we should call when an error occurs while retrieving or executing the TwiML from `sms_url`.
* @return $this Fluent Builder
*/
- public function setSmsFallbackUrl($smsFallbackUrl)
+ public function setSmsFallbackUrl(string $smsFallbackUrl): self
{
$this->options['smsFallbackUrl'] = $smsFallbackUrl;
return $this;
@@ -572,23 +665,22 @@ public function setSmsFallbackUrl($smsFallbackUrl)
/**
* The HTTP method we should use to call `sms_fallback_url`. Can be: `GET` or `POST`.
*
- * @param string $smsFallbackMethod The HTTP method to use with sms_fallback_url
+ * @param string $smsFallbackMethod The HTTP method we should use to call `sms_fallback_url`. Can be: `GET` or `POST`.
* @return $this Fluent Builder
*/
- public function setSmsFallbackMethod($smsFallbackMethod)
+ public function setSmsFallbackMethod(string $smsFallbackMethod): self
{
$this->options['smsFallbackMethod'] = $smsFallbackMethod;
return $this;
}
/**
- * The URL we should call using a POST method to send status information about SMS messages sent by the application.
+ * Same as message_status_callback: The URL we should call using a POST method to send status information about SMS messages sent by the application. Deprecated, included for backwards compatibility.
*
- * @param string $smsStatusCallback The URL to send status information to your
- * application
+ * @param string $smsStatusCallback Same as message_status_callback: The URL we should call using a POST method to send status information about SMS messages sent by the application. Deprecated, included for backwards compatibility.
* @return $this Fluent Builder
*/
- public function setSmsStatusCallback($smsStatusCallback)
+ public function setSmsStatusCallback(string $smsStatusCallback): self
{
$this->options['smsStatusCallback'] = $smsStatusCallback;
return $this;
@@ -597,29 +689,36 @@ public function setSmsStatusCallback($smsStatusCallback)
/**
* The URL we should call using a POST method to send message status information to your application.
*
- * @param string $messageStatusCallback The URL to send message status
- * information to your application
+ * @param string $messageStatusCallback The URL we should call using a POST method to send message status information to your application.
* @return $this Fluent Builder
*/
- public function setMessageStatusCallback($messageStatusCallback)
+ public function setMessageStatusCallback(string $messageStatusCallback): self
{
$this->options['messageStatusCallback'] = $messageStatusCallback;
return $this;
}
+ /**
+ * Whether to allow other Twilio accounts to dial this applicaton using Dial verb. Can be: `true` or `false`.
+ *
+ * @param bool $publicApplicationConnectEnabled Whether to allow other Twilio accounts to dial this applicaton using Dial verb. Can be: `true` or `false`.
+ * @return $this Fluent Builder
+ */
+ public function setPublicApplicationConnectEnabled(bool $publicApplicationConnectEnabled): self
+ {
+ $this->options['publicApplicationConnectEnabled'] = $publicApplicationConnectEnabled;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.UpdateApplicationOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.UpdateApplicationOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ApplicationPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ApplicationPage.php
index 542c2ba..fe4b13c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ApplicationPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ApplicationPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return ApplicationInstance \Twilio\Rest\Api\V2010\Account\ApplicationInstance
+ */
+ public function buildInstance(array $payload): ApplicationInstance
{
return new ApplicationInstance($this->version, $payload, $this->solution['accountSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.ApplicationPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AuthorizedConnectAppContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AuthorizedConnectAppContext.php
index 50c73c5..d0540fb 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AuthorizedConnectAppContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AuthorizedConnectAppContext.php
@@ -2,54 +2,67 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class AuthorizedConnectAppContext extends InstanceContext
-{
+ {
/**
* Initialize the AuthorizedConnectAppContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * to fetch
- * @param string $connectAppSid The SID of the Connect App to fetch
- * @return \Twilio\Rest\Api\V2010\Account\AuthorizedConnectAppContext
+ * @param Version $version Version that contains the resource
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the AuthorizedConnectApp resource to fetch.
+ * @param string $connectAppSid The SID of the Connect App to fetch.
*/
- public function __construct(Version $version, $accountSid, $connectAppSid)
- {
+ public function __construct(
+ Version $version,
+ $accountSid,
+ $connectAppSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'connectAppSid' => $connectAppSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+ 'connectAppSid' =>
+ $connectAppSid,
+ ];
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/AuthorizedConnectApps/' . \rawurlencode($connectAppSid) . '.json';
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/AuthorizedConnectApps/' . \rawurlencode($connectAppSid)
+ .'.json';
}
/**
- * Fetch a AuthorizedConnectAppInstance
+ * Fetch the AuthorizedConnectAppInstance
*
* @return AuthorizedConnectAppInstance Fetched AuthorizedConnectAppInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): AuthorizedConnectAppInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new AuthorizedConnectAppInstance(
$this->version,
@@ -59,17 +72,18 @@ public function fetch()
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.AuthorizedConnectAppContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AuthorizedConnectAppInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AuthorizedConnectAppInstance.php
index 4f6b5e9..b18632f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AuthorizedConnectAppInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AuthorizedConnectAppInstance.php
@@ -2,75 +2,73 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+
/**
- * @property string $accountSid
- * @property string $connectAppCompanyName
- * @property string $connectAppDescription
- * @property string $connectAppFriendlyName
- * @property string $connectAppHomepageUrl
- * @property string $connectAppSid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $permissions
- * @property string $uri
+ * @property string|null $accountSid
+ * @property string|null $connectAppCompanyName
+ * @property string|null $connectAppDescription
+ * @property string|null $connectAppFriendlyName
+ * @property string|null $connectAppHomepageUrl
+ * @property string|null $connectAppSid
+ * @property string[]|null $permissions
+ * @property string|null $uri
*/
class AuthorizedConnectAppInstance extends InstanceResource
{
/**
* Initialize the AuthorizedConnectAppInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $connectAppSid The SID of the Connect App to fetch
- * @return \Twilio\Rest\Api\V2010\Account\AuthorizedConnectAppInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the AuthorizedConnectApp resource to fetch.
+ * @param string $connectAppSid The SID of the Connect App to fetch.
*/
- public function __construct(Version $version, array $payload, $accountSid, $connectAppSid = null)
+ public function __construct(Version $version, array $payload, string $accountSid, string $connectAppSid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'connectAppCompanyName' => Values::array_get($payload, 'connect_app_company_name'),
'connectAppDescription' => Values::array_get($payload, 'connect_app_description'),
'connectAppFriendlyName' => Values::array_get($payload, 'connect_app_friendly_name'),
'connectAppHomepageUrl' => Values::array_get($payload, 'connect_app_homepage_url'),
'connectAppSid' => Values::array_get($payload, 'connect_app_sid'),
- 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'permissions' => Values::array_get($payload, 'permissions'),
'uri' => Values::array_get($payload, 'uri'),
- );
+ ];
- $this->solution = array(
- 'accountSid' => $accountSid,
- 'connectAppSid' => $connectAppSid ?: $this->properties['connectAppSid'],
- );
+ $this->solution = ['accountSid' => $accountSid, 'connectAppSid' => $connectAppSid ?: $this->properties['connectAppSid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Api\V2010\Account\AuthorizedConnectAppContext Context
- * for this
- * AuthorizedConnectAppInstance
+ * @return AuthorizedConnectAppContext Context for this AuthorizedConnectAppInstance
*/
- protected function proxy()
+ protected function proxy(): AuthorizedConnectAppContext
{
if (!$this->context) {
$this->context = new AuthorizedConnectAppContext(
@@ -84,13 +82,14 @@ protected function proxy()
}
/**
- * Fetch a AuthorizedConnectAppInstance
+ * Fetch the AuthorizedConnectAppInstance
*
* @return AuthorizedConnectAppInstance Fetched AuthorizedConnectAppInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): AuthorizedConnectAppInstance
{
+
return $this->proxy()->fetch();
}
@@ -101,7 +100,7 @@ public function fetch()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -120,12 +119,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.AuthorizedConnectAppInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AuthorizedConnectAppList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AuthorizedConnectAppList.php
index 318ba66..7d7be8f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AuthorizedConnectAppList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AuthorizedConnectAppList.php
@@ -2,39 +2,73 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class AuthorizedConnectAppList extends ListResource
-{
+ {
/**
* Construct the AuthorizedConnectAppList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * @return \Twilio\Rest\Api\V2010\Account\AuthorizedConnectAppList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the AuthorizedConnectApp resource to fetch.
*/
- public function __construct(Version $version, $accountSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/AuthorizedConnectApps.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/AuthorizedConnectApps.json';
+ /**
+ * Reads AuthorizedConnectAppInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return AuthorizedConnectAppInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
- * Streams AuthorizedConnectAppInstance records from the API as a generator
- * stream.
+ * Streams AuthorizedConnectAppInstance records from the API as a generator stream.
* This operation lazily loads records as efficiently as possible until the
* limit
* is reached.
@@ -49,9 +83,9 @@ public function __construct(Version $version, $accountSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -60,26 +94,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads AuthorizedConnectAppInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return AuthorizedConnectAppInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of AuthorizedConnectAppInstance records from the API.
* Request is executed immediately
@@ -87,34 +101,34 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of AuthorizedConnectAppInstance
+ * @return AuthorizedConnectAppPage Page of AuthorizedConnectAppInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): AuthorizedConnectAppPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new AuthorizedConnectAppPage($this->version, $response, $this->solution);
}
/**
- * Retrieve a specific page of AuthorizedConnectAppInstance records from the
- * API.
+ * Retrieve a specific page of AuthorizedConnectAppInstance records from the API.
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of AuthorizedConnectAppInstance
+ * @return AuthorizedConnectAppPage Page of AuthorizedConnectAppInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): AuthorizedConnectAppPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -124,13 +138,16 @@ public function getPage($targetUrl)
return new AuthorizedConnectAppPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a AuthorizedConnectAppContext
*
- * @param string $connectAppSid The SID of the Connect App to fetch
- * @return \Twilio\Rest\Api\V2010\Account\AuthorizedConnectAppContext
+ * @param string $connectAppSid The SID of the Connect App to fetch.
*/
- public function getContext($connectAppSid)
+ public function getContext(
+ string $connectAppSid
+
+ ): AuthorizedConnectAppContext
{
return new AuthorizedConnectAppContext(
$this->version,
@@ -144,8 +161,8 @@ public function getContext($connectAppSid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.AuthorizedConnectAppList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AuthorizedConnectAppPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AuthorizedConnectAppPage.php
index c692c8f..622d993 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AuthorizedConnectAppPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AuthorizedConnectAppPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return AuthorizedConnectAppInstance \Twilio\Rest\Api\V2010\Account\AuthorizedConnectAppInstance
+ */
+ public function buildInstance(array $payload): AuthorizedConnectAppInstance
{
return new AuthorizedConnectAppInstance($this->version, $payload, $this->solution['accountSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.AuthorizedConnectAppPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/LocalInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/LocalInstance.php
index 728a166..747b497 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/LocalInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/LocalInstance.php
@@ -2,50 +2,60 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Base\PhoneNumberCapabilities;
+
/**
- * @property string $friendlyName
- * @property string $phoneNumber
- * @property string $lata
- * @property string $locality
- * @property string $rateCenter
- * @property string $latitude
- * @property string $longitude
- * @property string $region
- * @property string $postalCode
- * @property string $isoCountry
- * @property string $addressRequirements
- * @property bool $beta
- * @property string $capabilities
+ * @property string|null $friendlyName
+ * @property string|null $phoneNumber
+ * @property string|null $lata
+ * @property string|null $locality
+ * @property string|null $rateCenter
+ * @property string|null $latitude
+ * @property string|null $longitude
+ * @property string|null $region
+ * @property string|null $postalCode
+ * @property string|null $isoCountry
+ * @property string|null $addressRequirements
+ * @property bool|null $beta
+ * @property PhoneNumberCapabilities|null $capabilities
*/
class LocalInstance extends InstanceResource
{
/**
* Initialize the LocalInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The account_sid
- * @param string $countryCode The ISO-3166-1 country code of the country.
- * @return \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\LocalInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources.
+ * @param string $countryCode The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers.
*/
- public function __construct(Version $version, array $payload, $accountSid, $countryCode)
+ public function __construct(Version $version, array $payload, string $accountSid, string $countryCode)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'friendlyName' => Values::array_get($payload, 'friendly_name'),
'phoneNumber' => Values::array_get($payload, 'phone_number'),
'lata' => Values::array_get($payload, 'lata'),
@@ -58,10 +68,10 @@ public function __construct(Version $version, array $payload, $accountSid, $coun
'isoCountry' => Values::array_get($payload, 'iso_country'),
'addressRequirements' => Values::array_get($payload, 'address_requirements'),
'beta' => Values::array_get($payload, 'beta'),
- 'capabilities' => Values::array_get($payload, 'capabilities'),
- );
+ 'capabilities' => Deserialize::phoneNumberCapabilities(Values::array_get($payload, 'capabilities')),
+ ];
- $this->solution = array('accountSid' => $accountSid, 'countryCode' => $countryCode,);
+ $this->solution = ['accountSid' => $accountSid, 'countryCode' => $countryCode, ];
}
/**
@@ -71,7 +81,7 @@ public function __construct(Version $version, array $payload, $accountSid, $coun
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -90,8 +100,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.LocalInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/LocalList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/LocalList.php
index 491b84e..4604bf0 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/LocalList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/LocalList.php
@@ -2,37 +2,78 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class LocalList extends ListResource
-{
+ {
/**
* Construct the LocalList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The account_sid
- * @param string $countryCode The ISO-3166-1 country code of the country.
- * @return \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\LocalList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources.
+ * @param string $countryCode The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers.
*/
- public function __construct(Version $version, $accountSid, $countryCode)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid,
+ string $countryCode
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'countryCode' => $countryCode,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ 'countryCode' =>
+ $countryCode,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/AvailablePhoneNumbers/' . \rawurlencode($countryCode)
+ .'/Local.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/AvailablePhoneNumbers/' . \rawurlencode($countryCode) . '/Local.json';
+ /**
+ * Reads LocalInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return LocalInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -52,9 +93,9 @@ public function __construct(Version $version, $accountSid, $countryCode)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -63,69 +104,67 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads LocalInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return LocalInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of LocalInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of LocalInstance
+ * @return LocalPage Page of LocalInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): LocalPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'AreaCode' => $options['areaCode'],
- 'Contains' => $options['contains'],
- 'SmsEnabled' => Serialize::booleanToString($options['smsEnabled']),
- 'MmsEnabled' => Serialize::booleanToString($options['mmsEnabled']),
- 'VoiceEnabled' => Serialize::booleanToString($options['voiceEnabled']),
- 'ExcludeAllAddressRequired' => Serialize::booleanToString($options['excludeAllAddressRequired']),
- 'ExcludeLocalAddressRequired' => Serialize::booleanToString($options['excludeLocalAddressRequired']),
- 'ExcludeForeignAddressRequired' => Serialize::booleanToString($options['excludeForeignAddressRequired']),
- 'Beta' => Serialize::booleanToString($options['beta']),
- 'NearNumber' => $options['nearNumber'],
- 'NearLatLong' => $options['nearLatLong'],
- 'Distance' => $options['distance'],
- 'InPostalCode' => $options['inPostalCode'],
- 'InRegion' => $options['inRegion'],
- 'InRateCenter' => $options['inRateCenter'],
- 'InLata' => $options['inLata'],
- 'InLocality' => $options['inLocality'],
- 'FaxEnabled' => Serialize::booleanToString($options['faxEnabled']),
+
+ $params = Values::of([
+ 'AreaCode' =>
+ $options['areaCode'],
+ 'Contains' =>
+ $options['contains'],
+ 'SmsEnabled' =>
+ Serialize::booleanToString($options['smsEnabled']),
+ 'MmsEnabled' =>
+ Serialize::booleanToString($options['mmsEnabled']),
+ 'VoiceEnabled' =>
+ Serialize::booleanToString($options['voiceEnabled']),
+ 'ExcludeAllAddressRequired' =>
+ Serialize::booleanToString($options['excludeAllAddressRequired']),
+ 'ExcludeLocalAddressRequired' =>
+ Serialize::booleanToString($options['excludeLocalAddressRequired']),
+ 'ExcludeForeignAddressRequired' =>
+ Serialize::booleanToString($options['excludeForeignAddressRequired']),
+ 'Beta' =>
+ Serialize::booleanToString($options['beta']),
+ 'NearNumber' =>
+ $options['nearNumber'],
+ 'NearLatLong' =>
+ $options['nearLatLong'],
+ 'Distance' =>
+ $options['distance'],
+ 'InPostalCode' =>
+ $options['inPostalCode'],
+ 'InRegion' =>
+ $options['inRegion'],
+ 'InRateCenter' =>
+ $options['inRateCenter'],
+ 'InLata' =>
+ $options['inLata'],
+ 'InLocality' =>
+ $options['inLocality'],
+ 'FaxEnabled' =>
+ Serialize::booleanToString($options['faxEnabled']),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new LocalPage($this->version, $response, $this->solution);
}
@@ -135,9 +174,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of LocalInstance
+ * @return LocalPage Page of LocalInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): LocalPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -147,13 +186,14 @@ public function getPage($targetUrl)
return new LocalPage($this->version, $response, $this->solution);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.LocalList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/LocalOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/LocalOptions.php
index 0d58431..29d9012 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/LocalOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/LocalOptions.php
@@ -1,10 +1,16 @@
options['areaCode'] = $areaCode;
$this->options['contains'] = $contains;
$this->options['smsEnabled'] = $smsEnabled;
@@ -112,22 +155,22 @@ public function __construct($areaCode = Values::NONE, $contains = Values::NONE,
/**
* The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada.
*
- * @param int $areaCode The area code of the phone numbers to read
+ * @param int $areaCode The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setAreaCode($areaCode)
+ public function setAreaCode(int $areaCode): self
{
$this->options['areaCode'] = $areaCode;
return $this;
}
/**
- * The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters.
+ * The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumberlocal-resource?code-sample=code-find-phone-numbers-by-number-pattern) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumberlocal-resource?code-sample=code-find-phone-numbers-by-character-pattern). If specified, this value must have at least two characters.
*
- * @param string $contains The pattern on which to match phone numbers
+ * @param string $contains The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumberlocal-resource?code-sample=code-find-phone-numbers-by-number-pattern) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumberlocal-resource?code-sample=code-find-phone-numbers-by-character-pattern). If specified, this value must have at least two characters.
* @return $this Fluent Builder
*/
- public function setContains($contains)
+ public function setContains(string $contains): self
{
$this->options['contains'] = $contains;
return $this;
@@ -136,10 +179,10 @@ public function setContains($contains)
/**
* Whether the phone numbers can receive text messages. Can be: `true` or `false`.
*
- * @param bool $smsEnabled Whether the phone numbers can receive text messages
+ * @param bool $smsEnabled Whether the phone numbers can receive text messages. Can be: `true` or `false`.
* @return $this Fluent Builder
*/
- public function setSmsEnabled($smsEnabled)
+ public function setSmsEnabled(bool $smsEnabled): self
{
$this->options['smsEnabled'] = $smsEnabled;
return $this;
@@ -148,10 +191,10 @@ public function setSmsEnabled($smsEnabled)
/**
* Whether the phone numbers can receive MMS messages. Can be: `true` or `false`.
*
- * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages
+ * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages. Can be: `true` or `false`.
* @return $this Fluent Builder
*/
- public function setMmsEnabled($mmsEnabled)
+ public function setMmsEnabled(bool $mmsEnabled): self
{
$this->options['mmsEnabled'] = $mmsEnabled;
return $this;
@@ -160,10 +203,10 @@ public function setMmsEnabled($mmsEnabled)
/**
* Whether the phone numbers can receive calls. Can be: `true` or `false`.
*
- * @param bool $voiceEnabled Whether the phone numbers can receive calls.
+ * @param bool $voiceEnabled Whether the phone numbers can receive calls. Can be: `true` or `false`.
* @return $this Fluent Builder
*/
- public function setVoiceEnabled($voiceEnabled)
+ public function setVoiceEnabled(bool $voiceEnabled): self
{
$this->options['voiceEnabled'] = $voiceEnabled;
return $this;
@@ -172,11 +215,10 @@ public function setVoiceEnabled($voiceEnabled)
/**
* Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
*
- * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that
- * require an Address
+ * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
* @return $this Fluent Builder
*/
- public function setExcludeAllAddressRequired($excludeAllAddressRequired)
+ public function setExcludeAllAddressRequired(bool $excludeAllAddressRequired): self
{
$this->options['excludeAllAddressRequired'] = $excludeAllAddressRequired;
return $this;
@@ -185,11 +227,10 @@ public function setExcludeAllAddressRequired($excludeAllAddressRequired)
/**
* Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
*
- * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers
- * that require a local address
+ * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
* @return $this Fluent Builder
*/
- public function setExcludeLocalAddressRequired($excludeLocalAddressRequired)
+ public function setExcludeLocalAddressRequired(bool $excludeLocalAddressRequired): self
{
$this->options['excludeLocalAddressRequired'] = $excludeLocalAddressRequired;
return $this;
@@ -198,11 +239,10 @@ public function setExcludeLocalAddressRequired($excludeLocalAddressRequired)
/**
* Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
*
- * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers
- * that require a foreign address
+ * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
* @return $this Fluent Builder
*/
- public function setExcludeForeignAddressRequired($excludeForeignAddressRequired)
+ public function setExcludeForeignAddressRequired(bool $excludeForeignAddressRequired): self
{
$this->options['excludeForeignAddressRequired'] = $excludeForeignAddressRequired;
return $this;
@@ -211,10 +251,10 @@ public function setExcludeForeignAddressRequired($excludeForeignAddressRequired)
/**
* Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
*
- * @param bool $beta Whether to read phone numbers new to the Twilio platform
+ * @param bool $beta Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
* @return $this Fluent Builder
*/
- public function setBeta($beta)
+ public function setBeta(bool $beta): self
{
$this->options['beta'] = $beta;
return $this;
@@ -223,11 +263,10 @@ public function setBeta($beta)
/**
* Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada.
*
- * @param string $nearNumber Given a phone number, find a geographically close
- * number within distance miles. (US/Canada only)
+ * @param string $nearNumber Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setNearNumber($nearNumber)
+ public function setNearNumber(string $nearNumber): self
{
$this->options['nearNumber'] = $nearNumber;
return $this;
@@ -236,12 +275,10 @@ public function setNearNumber($nearNumber)
/**
* Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada.
*
- * @param string $nearLatLong Given a latitude/longitude pair lat,long find
- * geographically close numbers within distance
- * miles. (US/Canada only)
+ * @param string $nearLatLong Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setNearLatLong($nearLatLong)
+ public function setNearLatLong(string $nearLatLong): self
{
$this->options['nearLatLong'] = $nearLatLong;
return $this;
@@ -250,11 +287,10 @@ public function setNearLatLong($nearLatLong)
/**
* The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada.
*
- * @param int $distance The search radius, in miles, for a near_ query.
- * (US/Canada only)
+ * @param int $distance The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setDistance($distance)
+ public function setDistance(int $distance): self
{
$this->options['distance'] = $distance;
return $this;
@@ -263,11 +299,10 @@ public function setDistance($distance)
/**
* Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada.
*
- * @param string $inPostalCode Limit results to a particular postal code.
- * (US/Canada only)
+ * @param string $inPostalCode Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setInPostalCode($inPostalCode)
+ public function setInPostalCode(string $inPostalCode): self
{
$this->options['inPostalCode'] = $inPostalCode;
return $this;
@@ -276,11 +311,10 @@ public function setInPostalCode($inPostalCode)
/**
* Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada.
*
- * @param string $inRegion Limit results to a particular region. (US/Canada
- * only)
+ * @param string $inRegion Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setInRegion($inRegion)
+ public function setInRegion(string $inRegion): self
{
$this->options['inRegion'] = $inRegion;
return $this;
@@ -289,12 +323,10 @@ public function setInRegion($inRegion)
/**
* Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada.
*
- * @param string $inRateCenter Limit results to a specific rate center, or
- * given a phone number search within the same rate
- * center as that number. (US/Canada only)
+ * @param string $inRateCenter Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setInRateCenter($inRateCenter)
+ public function setInRateCenter(string $inRateCenter): self
{
$this->options['inRateCenter'] = $inRateCenter;
return $this;
@@ -303,11 +335,10 @@ public function setInRateCenter($inRateCenter)
/**
* Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada.
*
- * @param string $inLata Limit results to a specific local access and transport
- * area. (US/Canada only)
+ * @param string $inLata Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setInLata($inLata)
+ public function setInLata(string $inLata): self
{
$this->options['inLata'] = $inLata;
return $this;
@@ -316,10 +347,10 @@ public function setInLata($inLata)
/**
* Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number.
*
- * @param string $inLocality Limit results to a particular locality
+ * @param string $inLocality Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number.
* @return $this Fluent Builder
*/
- public function setInLocality($inLocality)
+ public function setInLocality(string $inLocality): self
{
$this->options['inLocality'] = $inLocality;
return $this;
@@ -328,10 +359,10 @@ public function setInLocality($inLocality)
/**
* Whether the phone numbers can receive faxes. Can be: `true` or `false`.
*
- * @param bool $faxEnabled Whether the phone numbers can receive faxes
+ * @param bool $faxEnabled Whether the phone numbers can receive faxes. Can be: `true` or `false`.
* @return $this Fluent Builder
*/
- public function setFaxEnabled($faxEnabled)
+ public function setFaxEnabled(bool $faxEnabled): self
{
$this->options['faxEnabled'] = $faxEnabled;
return $this;
@@ -342,14 +373,10 @@ public function setFaxEnabled($faxEnabled)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.ReadLocalOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.ReadLocalOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/LocalPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/LocalPage.php
index d807727..6949a3f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/LocalPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/LocalPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return LocalInstance \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\LocalInstance
+ */
+ public function buildInstance(array $payload): LocalInstance
{
- return new LocalInstance(
- $this->version,
- $payload,
- $this->solution['accountSid'],
- $this->solution['countryCode']
- );
+ return new LocalInstance($this->version, $payload, $this->solution['accountSid'], $this->solution['countryCode']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.LocalPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MachineToMachineInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MachineToMachineInstance.php
index 79fc2b8..c6d1358 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MachineToMachineInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MachineToMachineInstance.php
@@ -2,50 +2,60 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Base\PhoneNumberCapabilities;
+
/**
- * @property string $friendlyName
- * @property string $phoneNumber
- * @property string $lata
- * @property string $locality
- * @property string $rateCenter
- * @property string $latitude
- * @property string $longitude
- * @property string $region
- * @property string $postalCode
- * @property string $isoCountry
- * @property string $addressRequirements
- * @property bool $beta
- * @property string $capabilities
+ * @property string|null $friendlyName
+ * @property string|null $phoneNumber
+ * @property string|null $lata
+ * @property string|null $locality
+ * @property string|null $rateCenter
+ * @property string|null $latitude
+ * @property string|null $longitude
+ * @property string|null $region
+ * @property string|null $postalCode
+ * @property string|null $isoCountry
+ * @property string|null $addressRequirements
+ * @property bool|null $beta
+ * @property PhoneNumberCapabilities|null $capabilities
*/
class MachineToMachineInstance extends InstanceResource
{
/**
* Initialize the MachineToMachineInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The account_sid
- * @param string $countryCode The ISO-3166-1 country code of the country.
- * @return \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\MachineToMachineInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources.
+ * @param string $countryCode The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers.
*/
- public function __construct(Version $version, array $payload, $accountSid, $countryCode)
+ public function __construct(Version $version, array $payload, string $accountSid, string $countryCode)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'friendlyName' => Values::array_get($payload, 'friendly_name'),
'phoneNumber' => Values::array_get($payload, 'phone_number'),
'lata' => Values::array_get($payload, 'lata'),
@@ -58,10 +68,10 @@ public function __construct(Version $version, array $payload, $accountSid, $coun
'isoCountry' => Values::array_get($payload, 'iso_country'),
'addressRequirements' => Values::array_get($payload, 'address_requirements'),
'beta' => Values::array_get($payload, 'beta'),
- 'capabilities' => Values::array_get($payload, 'capabilities'),
- );
+ 'capabilities' => Deserialize::phoneNumberCapabilities(Values::array_get($payload, 'capabilities')),
+ ];
- $this->solution = array('accountSid' => $accountSid, 'countryCode' => $countryCode,);
+ $this->solution = ['accountSid' => $accountSid, 'countryCode' => $countryCode, ];
}
/**
@@ -71,7 +81,7 @@ public function __construct(Version $version, array $payload, $accountSid, $coun
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -90,8 +100,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.MachineToMachineInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MachineToMachineList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MachineToMachineList.php
index e274d63..b037096 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MachineToMachineList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MachineToMachineList.php
@@ -2,37 +2,78 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class MachineToMachineList extends ListResource
-{
+ {
/**
* Construct the MachineToMachineList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The account_sid
- * @param string $countryCode The ISO-3166-1 country code of the country.
- * @return \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\MachineToMachineList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources.
+ * @param string $countryCode The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers.
*/
- public function __construct(Version $version, $accountSid, $countryCode)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid,
+ string $countryCode
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'countryCode' => $countryCode,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ 'countryCode' =>
+ $countryCode,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/AvailablePhoneNumbers/' . \rawurlencode($countryCode)
+ .'/MachineToMachine.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/AvailablePhoneNumbers/' . \rawurlencode($countryCode) . '/MachineToMachine.json';
+ /**
+ * Reads MachineToMachineInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return MachineToMachineInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -52,9 +93,9 @@ public function __construct(Version $version, $accountSid, $countryCode)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -63,69 +104,67 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads MachineToMachineInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return MachineToMachineInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of MachineToMachineInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of MachineToMachineInstance
+ * @return MachineToMachinePage Page of MachineToMachineInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): MachineToMachinePage
{
$options = new Values($options);
- $params = Values::of(array(
- 'AreaCode' => $options['areaCode'],
- 'Contains' => $options['contains'],
- 'SmsEnabled' => Serialize::booleanToString($options['smsEnabled']),
- 'MmsEnabled' => Serialize::booleanToString($options['mmsEnabled']),
- 'VoiceEnabled' => Serialize::booleanToString($options['voiceEnabled']),
- 'ExcludeAllAddressRequired' => Serialize::booleanToString($options['excludeAllAddressRequired']),
- 'ExcludeLocalAddressRequired' => Serialize::booleanToString($options['excludeLocalAddressRequired']),
- 'ExcludeForeignAddressRequired' => Serialize::booleanToString($options['excludeForeignAddressRequired']),
- 'Beta' => Serialize::booleanToString($options['beta']),
- 'NearNumber' => $options['nearNumber'],
- 'NearLatLong' => $options['nearLatLong'],
- 'Distance' => $options['distance'],
- 'InPostalCode' => $options['inPostalCode'],
- 'InRegion' => $options['inRegion'],
- 'InRateCenter' => $options['inRateCenter'],
- 'InLata' => $options['inLata'],
- 'InLocality' => $options['inLocality'],
- 'FaxEnabled' => Serialize::booleanToString($options['faxEnabled']),
+
+ $params = Values::of([
+ 'AreaCode' =>
+ $options['areaCode'],
+ 'Contains' =>
+ $options['contains'],
+ 'SmsEnabled' =>
+ Serialize::booleanToString($options['smsEnabled']),
+ 'MmsEnabled' =>
+ Serialize::booleanToString($options['mmsEnabled']),
+ 'VoiceEnabled' =>
+ Serialize::booleanToString($options['voiceEnabled']),
+ 'ExcludeAllAddressRequired' =>
+ Serialize::booleanToString($options['excludeAllAddressRequired']),
+ 'ExcludeLocalAddressRequired' =>
+ Serialize::booleanToString($options['excludeLocalAddressRequired']),
+ 'ExcludeForeignAddressRequired' =>
+ Serialize::booleanToString($options['excludeForeignAddressRequired']),
+ 'Beta' =>
+ Serialize::booleanToString($options['beta']),
+ 'NearNumber' =>
+ $options['nearNumber'],
+ 'NearLatLong' =>
+ $options['nearLatLong'],
+ 'Distance' =>
+ $options['distance'],
+ 'InPostalCode' =>
+ $options['inPostalCode'],
+ 'InRegion' =>
+ $options['inRegion'],
+ 'InRateCenter' =>
+ $options['inRateCenter'],
+ 'InLata' =>
+ $options['inLata'],
+ 'InLocality' =>
+ $options['inLocality'],
+ 'FaxEnabled' =>
+ Serialize::booleanToString($options['faxEnabled']),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new MachineToMachinePage($this->version, $response, $this->solution);
}
@@ -135,9 +174,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of MachineToMachineInstance
+ * @return MachineToMachinePage Page of MachineToMachineInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): MachineToMachinePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -147,13 +186,14 @@ public function getPage($targetUrl)
return new MachineToMachinePage($this->version, $response, $this->solution);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.MachineToMachineList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MachineToMachineOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MachineToMachineOptions.php
index af6f9b9..32188f2 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MachineToMachineOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MachineToMachineOptions.php
@@ -1,10 +1,16 @@
options['areaCode'] = $areaCode;
$this->options['contains'] = $contains;
$this->options['smsEnabled'] = $smsEnabled;
@@ -112,10 +155,10 @@ public function __construct($areaCode = Values::NONE, $contains = Values::NONE,
/**
* The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada.
*
- * @param int $areaCode The area code of the phone numbers to read
+ * @param int $areaCode The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setAreaCode($areaCode)
+ public function setAreaCode(int $areaCode): self
{
$this->options['areaCode'] = $areaCode;
return $this;
@@ -124,10 +167,10 @@ public function setAreaCode($areaCode)
/**
* The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters.
*
- * @param string $contains The pattern on which to match phone numbers
+ * @param string $contains The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters.
* @return $this Fluent Builder
*/
- public function setContains($contains)
+ public function setContains(string $contains): self
{
$this->options['contains'] = $contains;
return $this;
@@ -136,10 +179,10 @@ public function setContains($contains)
/**
* Whether the phone numbers can receive text messages. Can be: `true` or `false`.
*
- * @param bool $smsEnabled Whether the phone numbers can receive text messages
+ * @param bool $smsEnabled Whether the phone numbers can receive text messages. Can be: `true` or `false`.
* @return $this Fluent Builder
*/
- public function setSmsEnabled($smsEnabled)
+ public function setSmsEnabled(bool $smsEnabled): self
{
$this->options['smsEnabled'] = $smsEnabled;
return $this;
@@ -148,10 +191,10 @@ public function setSmsEnabled($smsEnabled)
/**
* Whether the phone numbers can receive MMS messages. Can be: `true` or `false`.
*
- * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages
+ * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages. Can be: `true` or `false`.
* @return $this Fluent Builder
*/
- public function setMmsEnabled($mmsEnabled)
+ public function setMmsEnabled(bool $mmsEnabled): self
{
$this->options['mmsEnabled'] = $mmsEnabled;
return $this;
@@ -160,10 +203,10 @@ public function setMmsEnabled($mmsEnabled)
/**
* Whether the phone numbers can receive calls. Can be: `true` or `false`.
*
- * @param bool $voiceEnabled Whether the phone numbers can receive calls.
+ * @param bool $voiceEnabled Whether the phone numbers can receive calls. Can be: `true` or `false`.
* @return $this Fluent Builder
*/
- public function setVoiceEnabled($voiceEnabled)
+ public function setVoiceEnabled(bool $voiceEnabled): self
{
$this->options['voiceEnabled'] = $voiceEnabled;
return $this;
@@ -172,11 +215,10 @@ public function setVoiceEnabled($voiceEnabled)
/**
* Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
*
- * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that
- * require an Address
+ * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
* @return $this Fluent Builder
*/
- public function setExcludeAllAddressRequired($excludeAllAddressRequired)
+ public function setExcludeAllAddressRequired(bool $excludeAllAddressRequired): self
{
$this->options['excludeAllAddressRequired'] = $excludeAllAddressRequired;
return $this;
@@ -185,11 +227,10 @@ public function setExcludeAllAddressRequired($excludeAllAddressRequired)
/**
* Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
*
- * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers
- * that require a local address
+ * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
* @return $this Fluent Builder
*/
- public function setExcludeLocalAddressRequired($excludeLocalAddressRequired)
+ public function setExcludeLocalAddressRequired(bool $excludeLocalAddressRequired): self
{
$this->options['excludeLocalAddressRequired'] = $excludeLocalAddressRequired;
return $this;
@@ -198,11 +239,10 @@ public function setExcludeLocalAddressRequired($excludeLocalAddressRequired)
/**
* Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
*
- * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers
- * that require a foreign address
+ * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
* @return $this Fluent Builder
*/
- public function setExcludeForeignAddressRequired($excludeForeignAddressRequired)
+ public function setExcludeForeignAddressRequired(bool $excludeForeignAddressRequired): self
{
$this->options['excludeForeignAddressRequired'] = $excludeForeignAddressRequired;
return $this;
@@ -211,10 +251,10 @@ public function setExcludeForeignAddressRequired($excludeForeignAddressRequired)
/**
* Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
*
- * @param bool $beta Whether to read phone numbers new to the Twilio platform
+ * @param bool $beta Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
* @return $this Fluent Builder
*/
- public function setBeta($beta)
+ public function setBeta(bool $beta): self
{
$this->options['beta'] = $beta;
return $this;
@@ -223,11 +263,10 @@ public function setBeta($beta)
/**
* Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada.
*
- * @param string $nearNumber Given a phone number, find a geographically close
- * number within distance miles. (US/Canada only)
+ * @param string $nearNumber Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setNearNumber($nearNumber)
+ public function setNearNumber(string $nearNumber): self
{
$this->options['nearNumber'] = $nearNumber;
return $this;
@@ -236,12 +275,10 @@ public function setNearNumber($nearNumber)
/**
* Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada.
*
- * @param string $nearLatLong Given a latitude/longitude pair lat,long find
- * geographically close numbers within distance
- * miles. (US/Canada only)
+ * @param string $nearLatLong Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setNearLatLong($nearLatLong)
+ public function setNearLatLong(string $nearLatLong): self
{
$this->options['nearLatLong'] = $nearLatLong;
return $this;
@@ -250,11 +287,10 @@ public function setNearLatLong($nearLatLong)
/**
* The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada.
*
- * @param int $distance The search radius, in miles, for a near_ query.
- * (US/Canada only)
+ * @param int $distance The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setDistance($distance)
+ public function setDistance(int $distance): self
{
$this->options['distance'] = $distance;
return $this;
@@ -263,11 +299,10 @@ public function setDistance($distance)
/**
* Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada.
*
- * @param string $inPostalCode Limit results to a particular postal code.
- * (US/Canada only)
+ * @param string $inPostalCode Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setInPostalCode($inPostalCode)
+ public function setInPostalCode(string $inPostalCode): self
{
$this->options['inPostalCode'] = $inPostalCode;
return $this;
@@ -276,11 +311,10 @@ public function setInPostalCode($inPostalCode)
/**
* Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada.
*
- * @param string $inRegion Limit results to a particular region. (US/Canada
- * only)
+ * @param string $inRegion Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setInRegion($inRegion)
+ public function setInRegion(string $inRegion): self
{
$this->options['inRegion'] = $inRegion;
return $this;
@@ -289,12 +323,10 @@ public function setInRegion($inRegion)
/**
* Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada.
*
- * @param string $inRateCenter Limit results to a specific rate center, or
- * given a phone number search within the same rate
- * center as that number. (US/Canada only)
+ * @param string $inRateCenter Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setInRateCenter($inRateCenter)
+ public function setInRateCenter(string $inRateCenter): self
{
$this->options['inRateCenter'] = $inRateCenter;
return $this;
@@ -303,11 +335,10 @@ public function setInRateCenter($inRateCenter)
/**
* Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada.
*
- * @param string $inLata Limit results to a specific local access and transport
- * area. (US/Canada only)
+ * @param string $inLata Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setInLata($inLata)
+ public function setInLata(string $inLata): self
{
$this->options['inLata'] = $inLata;
return $this;
@@ -316,10 +347,10 @@ public function setInLata($inLata)
/**
* Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number.
*
- * @param string $inLocality Limit results to a particular locality
+ * @param string $inLocality Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number.
* @return $this Fluent Builder
*/
- public function setInLocality($inLocality)
+ public function setInLocality(string $inLocality): self
{
$this->options['inLocality'] = $inLocality;
return $this;
@@ -328,10 +359,10 @@ public function setInLocality($inLocality)
/**
* Whether the phone numbers can receive faxes. Can be: `true` or `false`.
*
- * @param bool $faxEnabled Whether the phone numbers can receive faxes
+ * @param bool $faxEnabled Whether the phone numbers can receive faxes. Can be: `true` or `false`.
* @return $this Fluent Builder
*/
- public function setFaxEnabled($faxEnabled)
+ public function setFaxEnabled(bool $faxEnabled): self
{
$this->options['faxEnabled'] = $faxEnabled;
return $this;
@@ -342,14 +373,10 @@ public function setFaxEnabled($faxEnabled)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.ReadMachineToMachineOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.ReadMachineToMachineOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MachineToMachinePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MachineToMachinePage.php
index 051bbcc..4bbb72a 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MachineToMachinePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MachineToMachinePage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return MachineToMachineInstance \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\MachineToMachineInstance
+ */
+ public function buildInstance(array $payload): MachineToMachineInstance
{
- return new MachineToMachineInstance(
- $this->version,
- $payload,
- $this->solution['accountSid'],
- $this->solution['countryCode']
- );
+ return new MachineToMachineInstance($this->version, $payload, $this->solution['accountSid'], $this->solution['countryCode']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.MachineToMachinePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MobileInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MobileInstance.php
index f510236..ffc0d8f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MobileInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MobileInstance.php
@@ -2,50 +2,60 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Base\PhoneNumberCapabilities;
+
/**
- * @property string $friendlyName
- * @property string $phoneNumber
- * @property string $lata
- * @property string $locality
- * @property string $rateCenter
- * @property string $latitude
- * @property string $longitude
- * @property string $region
- * @property string $postalCode
- * @property string $isoCountry
- * @property string $addressRequirements
- * @property bool $beta
- * @property string $capabilities
+ * @property string|null $friendlyName
+ * @property string|null $phoneNumber
+ * @property string|null $lata
+ * @property string|null $locality
+ * @property string|null $rateCenter
+ * @property string|null $latitude
+ * @property string|null $longitude
+ * @property string|null $region
+ * @property string|null $postalCode
+ * @property string|null $isoCountry
+ * @property string|null $addressRequirements
+ * @property bool|null $beta
+ * @property PhoneNumberCapabilities|null $capabilities
*/
class MobileInstance extends InstanceResource
{
/**
* Initialize the MobileInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The account_sid
- * @param string $countryCode The ISO-3166-1 country code of the country.
- * @return \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\MobileInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources.
+ * @param string $countryCode The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers.
*/
- public function __construct(Version $version, array $payload, $accountSid, $countryCode)
+ public function __construct(Version $version, array $payload, string $accountSid, string $countryCode)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'friendlyName' => Values::array_get($payload, 'friendly_name'),
'phoneNumber' => Values::array_get($payload, 'phone_number'),
'lata' => Values::array_get($payload, 'lata'),
@@ -58,10 +68,10 @@ public function __construct(Version $version, array $payload, $accountSid, $coun
'isoCountry' => Values::array_get($payload, 'iso_country'),
'addressRequirements' => Values::array_get($payload, 'address_requirements'),
'beta' => Values::array_get($payload, 'beta'),
- 'capabilities' => Values::array_get($payload, 'capabilities'),
- );
+ 'capabilities' => Deserialize::phoneNumberCapabilities(Values::array_get($payload, 'capabilities')),
+ ];
- $this->solution = array('accountSid' => $accountSid, 'countryCode' => $countryCode,);
+ $this->solution = ['accountSid' => $accountSid, 'countryCode' => $countryCode, ];
}
/**
@@ -71,7 +81,7 @@ public function __construct(Version $version, array $payload, $accountSid, $coun
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -90,8 +100,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.MobileInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MobileList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MobileList.php
index 9edbf15..505fb94 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MobileList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MobileList.php
@@ -2,37 +2,78 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class MobileList extends ListResource
-{
+ {
/**
* Construct the MobileList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The account_sid
- * @param string $countryCode The ISO-3166-1 country code of the country.
- * @return \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\MobileList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources.
+ * @param string $countryCode The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers.
*/
- public function __construct(Version $version, $accountSid, $countryCode)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid,
+ string $countryCode
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'countryCode' => $countryCode,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ 'countryCode' =>
+ $countryCode,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/AvailablePhoneNumbers/' . \rawurlencode($countryCode)
+ .'/Mobile.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/AvailablePhoneNumbers/' . \rawurlencode($countryCode) . '/Mobile.json';
+ /**
+ * Reads MobileInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return MobileInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -52,9 +93,9 @@ public function __construct(Version $version, $accountSid, $countryCode)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -63,69 +104,67 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads MobileInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return MobileInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of MobileInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of MobileInstance
+ * @return MobilePage Page of MobileInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): MobilePage
{
$options = new Values($options);
- $params = Values::of(array(
- 'AreaCode' => $options['areaCode'],
- 'Contains' => $options['contains'],
- 'SmsEnabled' => Serialize::booleanToString($options['smsEnabled']),
- 'MmsEnabled' => Serialize::booleanToString($options['mmsEnabled']),
- 'VoiceEnabled' => Serialize::booleanToString($options['voiceEnabled']),
- 'ExcludeAllAddressRequired' => Serialize::booleanToString($options['excludeAllAddressRequired']),
- 'ExcludeLocalAddressRequired' => Serialize::booleanToString($options['excludeLocalAddressRequired']),
- 'ExcludeForeignAddressRequired' => Serialize::booleanToString($options['excludeForeignAddressRequired']),
- 'Beta' => Serialize::booleanToString($options['beta']),
- 'NearNumber' => $options['nearNumber'],
- 'NearLatLong' => $options['nearLatLong'],
- 'Distance' => $options['distance'],
- 'InPostalCode' => $options['inPostalCode'],
- 'InRegion' => $options['inRegion'],
- 'InRateCenter' => $options['inRateCenter'],
- 'InLata' => $options['inLata'],
- 'InLocality' => $options['inLocality'],
- 'FaxEnabled' => Serialize::booleanToString($options['faxEnabled']),
+
+ $params = Values::of([
+ 'AreaCode' =>
+ $options['areaCode'],
+ 'Contains' =>
+ $options['contains'],
+ 'SmsEnabled' =>
+ Serialize::booleanToString($options['smsEnabled']),
+ 'MmsEnabled' =>
+ Serialize::booleanToString($options['mmsEnabled']),
+ 'VoiceEnabled' =>
+ Serialize::booleanToString($options['voiceEnabled']),
+ 'ExcludeAllAddressRequired' =>
+ Serialize::booleanToString($options['excludeAllAddressRequired']),
+ 'ExcludeLocalAddressRequired' =>
+ Serialize::booleanToString($options['excludeLocalAddressRequired']),
+ 'ExcludeForeignAddressRequired' =>
+ Serialize::booleanToString($options['excludeForeignAddressRequired']),
+ 'Beta' =>
+ Serialize::booleanToString($options['beta']),
+ 'NearNumber' =>
+ $options['nearNumber'],
+ 'NearLatLong' =>
+ $options['nearLatLong'],
+ 'Distance' =>
+ $options['distance'],
+ 'InPostalCode' =>
+ $options['inPostalCode'],
+ 'InRegion' =>
+ $options['inRegion'],
+ 'InRateCenter' =>
+ $options['inRateCenter'],
+ 'InLata' =>
+ $options['inLata'],
+ 'InLocality' =>
+ $options['inLocality'],
+ 'FaxEnabled' =>
+ Serialize::booleanToString($options['faxEnabled']),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new MobilePage($this->version, $response, $this->solution);
}
@@ -135,9 +174,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of MobileInstance
+ * @return MobilePage Page of MobileInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): MobilePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -147,13 +186,14 @@ public function getPage($targetUrl)
return new MobilePage($this->version, $response, $this->solution);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.MobileList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MobileOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MobileOptions.php
index f579b81..f67e929 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MobileOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MobileOptions.php
@@ -1,10 +1,16 @@
options['areaCode'] = $areaCode;
$this->options['contains'] = $contains;
$this->options['smsEnabled'] = $smsEnabled;
@@ -112,10 +155,10 @@ public function __construct($areaCode = Values::NONE, $contains = Values::NONE,
/**
* The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada.
*
- * @param int $areaCode The area code of the phone numbers to read
+ * @param int $areaCode The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setAreaCode($areaCode)
+ public function setAreaCode(int $areaCode): self
{
$this->options['areaCode'] = $areaCode;
return $this;
@@ -124,10 +167,10 @@ public function setAreaCode($areaCode)
/**
* The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters.
*
- * @param string $contains The pattern on which to match phone numbers
+ * @param string $contains The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters.
* @return $this Fluent Builder
*/
- public function setContains($contains)
+ public function setContains(string $contains): self
{
$this->options['contains'] = $contains;
return $this;
@@ -136,10 +179,10 @@ public function setContains($contains)
/**
* Whether the phone numbers can receive text messages. Can be: `true` or `false`.
*
- * @param bool $smsEnabled Whether the phone numbers can receive text messages
+ * @param bool $smsEnabled Whether the phone numbers can receive text messages. Can be: `true` or `false`.
* @return $this Fluent Builder
*/
- public function setSmsEnabled($smsEnabled)
+ public function setSmsEnabled(bool $smsEnabled): self
{
$this->options['smsEnabled'] = $smsEnabled;
return $this;
@@ -148,10 +191,10 @@ public function setSmsEnabled($smsEnabled)
/**
* Whether the phone numbers can receive MMS messages. Can be: `true` or `false`.
*
- * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages
+ * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages. Can be: `true` or `false`.
* @return $this Fluent Builder
*/
- public function setMmsEnabled($mmsEnabled)
+ public function setMmsEnabled(bool $mmsEnabled): self
{
$this->options['mmsEnabled'] = $mmsEnabled;
return $this;
@@ -160,10 +203,10 @@ public function setMmsEnabled($mmsEnabled)
/**
* Whether the phone numbers can receive calls. Can be: `true` or `false`.
*
- * @param bool $voiceEnabled Whether the phone numbers can receive calls.
+ * @param bool $voiceEnabled Whether the phone numbers can receive calls. Can be: `true` or `false`.
* @return $this Fluent Builder
*/
- public function setVoiceEnabled($voiceEnabled)
+ public function setVoiceEnabled(bool $voiceEnabled): self
{
$this->options['voiceEnabled'] = $voiceEnabled;
return $this;
@@ -172,11 +215,10 @@ public function setVoiceEnabled($voiceEnabled)
/**
* Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
*
- * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that
- * require an Address
+ * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
* @return $this Fluent Builder
*/
- public function setExcludeAllAddressRequired($excludeAllAddressRequired)
+ public function setExcludeAllAddressRequired(bool $excludeAllAddressRequired): self
{
$this->options['excludeAllAddressRequired'] = $excludeAllAddressRequired;
return $this;
@@ -185,11 +227,10 @@ public function setExcludeAllAddressRequired($excludeAllAddressRequired)
/**
* Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
*
- * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers
- * that require a local address
+ * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
* @return $this Fluent Builder
*/
- public function setExcludeLocalAddressRequired($excludeLocalAddressRequired)
+ public function setExcludeLocalAddressRequired(bool $excludeLocalAddressRequired): self
{
$this->options['excludeLocalAddressRequired'] = $excludeLocalAddressRequired;
return $this;
@@ -198,11 +239,10 @@ public function setExcludeLocalAddressRequired($excludeLocalAddressRequired)
/**
* Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
*
- * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers
- * that require a foreign address
+ * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
* @return $this Fluent Builder
*/
- public function setExcludeForeignAddressRequired($excludeForeignAddressRequired)
+ public function setExcludeForeignAddressRequired(bool $excludeForeignAddressRequired): self
{
$this->options['excludeForeignAddressRequired'] = $excludeForeignAddressRequired;
return $this;
@@ -211,10 +251,10 @@ public function setExcludeForeignAddressRequired($excludeForeignAddressRequired)
/**
* Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
*
- * @param bool $beta Whether to read phone numbers new to the Twilio platform
+ * @param bool $beta Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
* @return $this Fluent Builder
*/
- public function setBeta($beta)
+ public function setBeta(bool $beta): self
{
$this->options['beta'] = $beta;
return $this;
@@ -223,11 +263,10 @@ public function setBeta($beta)
/**
* Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada.
*
- * @param string $nearNumber Given a phone number, find a geographically close
- * number within distance miles. (US/Canada only)
+ * @param string $nearNumber Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setNearNumber($nearNumber)
+ public function setNearNumber(string $nearNumber): self
{
$this->options['nearNumber'] = $nearNumber;
return $this;
@@ -236,12 +275,10 @@ public function setNearNumber($nearNumber)
/**
* Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada.
*
- * @param string $nearLatLong Given a latitude/longitude pair lat,long find
- * geographically close numbers within distance
- * miles. (US/Canada only)
+ * @param string $nearLatLong Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setNearLatLong($nearLatLong)
+ public function setNearLatLong(string $nearLatLong): self
{
$this->options['nearLatLong'] = $nearLatLong;
return $this;
@@ -250,11 +287,10 @@ public function setNearLatLong($nearLatLong)
/**
* The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada.
*
- * @param int $distance The search radius, in miles, for a near_ query.
- * (US/Canada only)
+ * @param int $distance The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setDistance($distance)
+ public function setDistance(int $distance): self
{
$this->options['distance'] = $distance;
return $this;
@@ -263,11 +299,10 @@ public function setDistance($distance)
/**
* Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada.
*
- * @param string $inPostalCode Limit results to a particular postal code.
- * (US/Canada only)
+ * @param string $inPostalCode Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setInPostalCode($inPostalCode)
+ public function setInPostalCode(string $inPostalCode): self
{
$this->options['inPostalCode'] = $inPostalCode;
return $this;
@@ -276,11 +311,10 @@ public function setInPostalCode($inPostalCode)
/**
* Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada.
*
- * @param string $inRegion Limit results to a particular region. (US/Canada
- * only)
+ * @param string $inRegion Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setInRegion($inRegion)
+ public function setInRegion(string $inRegion): self
{
$this->options['inRegion'] = $inRegion;
return $this;
@@ -289,12 +323,10 @@ public function setInRegion($inRegion)
/**
* Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada.
*
- * @param string $inRateCenter Limit results to a specific rate center, or
- * given a phone number search within the same rate
- * center as that number. (US/Canada only)
+ * @param string $inRateCenter Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setInRateCenter($inRateCenter)
+ public function setInRateCenter(string $inRateCenter): self
{
$this->options['inRateCenter'] = $inRateCenter;
return $this;
@@ -303,11 +335,10 @@ public function setInRateCenter($inRateCenter)
/**
* Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada.
*
- * @param string $inLata Limit results to a specific local access and transport
- * area. (US/Canada only)
+ * @param string $inLata Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setInLata($inLata)
+ public function setInLata(string $inLata): self
{
$this->options['inLata'] = $inLata;
return $this;
@@ -316,10 +347,10 @@ public function setInLata($inLata)
/**
* Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number.
*
- * @param string $inLocality Limit results to a particular locality
+ * @param string $inLocality Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number.
* @return $this Fluent Builder
*/
- public function setInLocality($inLocality)
+ public function setInLocality(string $inLocality): self
{
$this->options['inLocality'] = $inLocality;
return $this;
@@ -328,10 +359,10 @@ public function setInLocality($inLocality)
/**
* Whether the phone numbers can receive faxes. Can be: `true` or `false`.
*
- * @param bool $faxEnabled Whether the phone numbers can receive faxes
+ * @param bool $faxEnabled Whether the phone numbers can receive faxes. Can be: `true` or `false`.
* @return $this Fluent Builder
*/
- public function setFaxEnabled($faxEnabled)
+ public function setFaxEnabled(bool $faxEnabled): self
{
$this->options['faxEnabled'] = $faxEnabled;
return $this;
@@ -342,14 +373,10 @@ public function setFaxEnabled($faxEnabled)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.ReadMobileOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.ReadMobileOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MobilePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MobilePage.php
index e5f16a2..6b6101e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MobilePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MobilePage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return MobileInstance \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\MobileInstance
+ */
+ public function buildInstance(array $payload): MobileInstance
{
- return new MobileInstance(
- $this->version,
- $payload,
- $this->solution['accountSid'],
- $this->solution['countryCode']
- );
+ return new MobileInstance($this->version, $payload, $this->solution['accountSid'], $this->solution['countryCode']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.MobilePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/NationalInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/NationalInstance.php
index e6cb8de..102f490 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/NationalInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/NationalInstance.php
@@ -2,50 +2,60 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Base\PhoneNumberCapabilities;
+
/**
- * @property string $friendlyName
- * @property string $phoneNumber
- * @property string $lata
- * @property string $locality
- * @property string $rateCenter
- * @property string $latitude
- * @property string $longitude
- * @property string $region
- * @property string $postalCode
- * @property string $isoCountry
- * @property string $addressRequirements
- * @property bool $beta
- * @property string $capabilities
+ * @property string|null $friendlyName
+ * @property string|null $phoneNumber
+ * @property string|null $lata
+ * @property string|null $locality
+ * @property string|null $rateCenter
+ * @property string|null $latitude
+ * @property string|null $longitude
+ * @property string|null $region
+ * @property string|null $postalCode
+ * @property string|null $isoCountry
+ * @property string|null $addressRequirements
+ * @property bool|null $beta
+ * @property PhoneNumberCapabilities|null $capabilities
*/
class NationalInstance extends InstanceResource
{
/**
* Initialize the NationalInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The account_sid
- * @param string $countryCode The ISO-3166-1 country code of the country.
- * @return \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\NationalInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources.
+ * @param string $countryCode The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers.
*/
- public function __construct(Version $version, array $payload, $accountSid, $countryCode)
+ public function __construct(Version $version, array $payload, string $accountSid, string $countryCode)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'friendlyName' => Values::array_get($payload, 'friendly_name'),
'phoneNumber' => Values::array_get($payload, 'phone_number'),
'lata' => Values::array_get($payload, 'lata'),
@@ -58,10 +68,10 @@ public function __construct(Version $version, array $payload, $accountSid, $coun
'isoCountry' => Values::array_get($payload, 'iso_country'),
'addressRequirements' => Values::array_get($payload, 'address_requirements'),
'beta' => Values::array_get($payload, 'beta'),
- 'capabilities' => Values::array_get($payload, 'capabilities'),
- );
+ 'capabilities' => Deserialize::phoneNumberCapabilities(Values::array_get($payload, 'capabilities')),
+ ];
- $this->solution = array('accountSid' => $accountSid, 'countryCode' => $countryCode,);
+ $this->solution = ['accountSid' => $accountSid, 'countryCode' => $countryCode, ];
}
/**
@@ -71,7 +81,7 @@ public function __construct(Version $version, array $payload, $accountSid, $coun
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -90,8 +100,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.NationalInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/NationalList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/NationalList.php
index 60677e4..75e0ca4 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/NationalList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/NationalList.php
@@ -2,37 +2,78 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class NationalList extends ListResource
-{
+ {
/**
* Construct the NationalList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The account_sid
- * @param string $countryCode The ISO-3166-1 country code of the country.
- * @return \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\NationalList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources.
+ * @param string $countryCode The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers.
*/
- public function __construct(Version $version, $accountSid, $countryCode)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid,
+ string $countryCode
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'countryCode' => $countryCode,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ 'countryCode' =>
+ $countryCode,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/AvailablePhoneNumbers/' . \rawurlencode($countryCode)
+ .'/National.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/AvailablePhoneNumbers/' . \rawurlencode($countryCode) . '/National.json';
+ /**
+ * Reads NationalInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return NationalInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -52,9 +93,9 @@ public function __construct(Version $version, $accountSid, $countryCode)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -63,69 +104,67 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads NationalInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return NationalInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of NationalInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of NationalInstance
+ * @return NationalPage Page of NationalInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): NationalPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'AreaCode' => $options['areaCode'],
- 'Contains' => $options['contains'],
- 'SmsEnabled' => Serialize::booleanToString($options['smsEnabled']),
- 'MmsEnabled' => Serialize::booleanToString($options['mmsEnabled']),
- 'VoiceEnabled' => Serialize::booleanToString($options['voiceEnabled']),
- 'ExcludeAllAddressRequired' => Serialize::booleanToString($options['excludeAllAddressRequired']),
- 'ExcludeLocalAddressRequired' => Serialize::booleanToString($options['excludeLocalAddressRequired']),
- 'ExcludeForeignAddressRequired' => Serialize::booleanToString($options['excludeForeignAddressRequired']),
- 'Beta' => Serialize::booleanToString($options['beta']),
- 'NearNumber' => $options['nearNumber'],
- 'NearLatLong' => $options['nearLatLong'],
- 'Distance' => $options['distance'],
- 'InPostalCode' => $options['inPostalCode'],
- 'InRegion' => $options['inRegion'],
- 'InRateCenter' => $options['inRateCenter'],
- 'InLata' => $options['inLata'],
- 'InLocality' => $options['inLocality'],
- 'FaxEnabled' => Serialize::booleanToString($options['faxEnabled']),
+
+ $params = Values::of([
+ 'AreaCode' =>
+ $options['areaCode'],
+ 'Contains' =>
+ $options['contains'],
+ 'SmsEnabled' =>
+ Serialize::booleanToString($options['smsEnabled']),
+ 'MmsEnabled' =>
+ Serialize::booleanToString($options['mmsEnabled']),
+ 'VoiceEnabled' =>
+ Serialize::booleanToString($options['voiceEnabled']),
+ 'ExcludeAllAddressRequired' =>
+ Serialize::booleanToString($options['excludeAllAddressRequired']),
+ 'ExcludeLocalAddressRequired' =>
+ Serialize::booleanToString($options['excludeLocalAddressRequired']),
+ 'ExcludeForeignAddressRequired' =>
+ Serialize::booleanToString($options['excludeForeignAddressRequired']),
+ 'Beta' =>
+ Serialize::booleanToString($options['beta']),
+ 'NearNumber' =>
+ $options['nearNumber'],
+ 'NearLatLong' =>
+ $options['nearLatLong'],
+ 'Distance' =>
+ $options['distance'],
+ 'InPostalCode' =>
+ $options['inPostalCode'],
+ 'InRegion' =>
+ $options['inRegion'],
+ 'InRateCenter' =>
+ $options['inRateCenter'],
+ 'InLata' =>
+ $options['inLata'],
+ 'InLocality' =>
+ $options['inLocality'],
+ 'FaxEnabled' =>
+ Serialize::booleanToString($options['faxEnabled']),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new NationalPage($this->version, $response, $this->solution);
}
@@ -135,9 +174,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of NationalInstance
+ * @return NationalPage Page of NationalInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): NationalPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -147,13 +186,14 @@ public function getPage($targetUrl)
return new NationalPage($this->version, $response, $this->solution);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.NationalList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/NationalOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/NationalOptions.php
index ee0f1a7..556069d 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/NationalOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/NationalOptions.php
@@ -1,10 +1,16 @@
options['areaCode'] = $areaCode;
$this->options['contains'] = $contains;
$this->options['smsEnabled'] = $smsEnabled;
@@ -112,10 +155,10 @@ public function __construct($areaCode = Values::NONE, $contains = Values::NONE,
/**
* The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada.
*
- * @param int $areaCode The area code of the phone numbers to read
+ * @param int $areaCode The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setAreaCode($areaCode)
+ public function setAreaCode(int $areaCode): self
{
$this->options['areaCode'] = $areaCode;
return $this;
@@ -124,10 +167,10 @@ public function setAreaCode($areaCode)
/**
* The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters.
*
- * @param string $contains The pattern on which to match phone numbers
+ * @param string $contains The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters.
* @return $this Fluent Builder
*/
- public function setContains($contains)
+ public function setContains(string $contains): self
{
$this->options['contains'] = $contains;
return $this;
@@ -136,10 +179,10 @@ public function setContains($contains)
/**
* Whether the phone numbers can receive text messages. Can be: `true` or `false`.
*
- * @param bool $smsEnabled Whether the phone numbers can receive text messages
+ * @param bool $smsEnabled Whether the phone numbers can receive text messages. Can be: `true` or `false`.
* @return $this Fluent Builder
*/
- public function setSmsEnabled($smsEnabled)
+ public function setSmsEnabled(bool $smsEnabled): self
{
$this->options['smsEnabled'] = $smsEnabled;
return $this;
@@ -148,10 +191,10 @@ public function setSmsEnabled($smsEnabled)
/**
* Whether the phone numbers can receive MMS messages. Can be: `true` or `false`.
*
- * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages
+ * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages. Can be: `true` or `false`.
* @return $this Fluent Builder
*/
- public function setMmsEnabled($mmsEnabled)
+ public function setMmsEnabled(bool $mmsEnabled): self
{
$this->options['mmsEnabled'] = $mmsEnabled;
return $this;
@@ -160,10 +203,10 @@ public function setMmsEnabled($mmsEnabled)
/**
* Whether the phone numbers can receive calls. Can be: `true` or `false`.
*
- * @param bool $voiceEnabled Whether the phone numbers can receive calls.
+ * @param bool $voiceEnabled Whether the phone numbers can receive calls. Can be: `true` or `false`.
* @return $this Fluent Builder
*/
- public function setVoiceEnabled($voiceEnabled)
+ public function setVoiceEnabled(bool $voiceEnabled): self
{
$this->options['voiceEnabled'] = $voiceEnabled;
return $this;
@@ -172,11 +215,10 @@ public function setVoiceEnabled($voiceEnabled)
/**
* Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
*
- * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that
- * require an Address
+ * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
* @return $this Fluent Builder
*/
- public function setExcludeAllAddressRequired($excludeAllAddressRequired)
+ public function setExcludeAllAddressRequired(bool $excludeAllAddressRequired): self
{
$this->options['excludeAllAddressRequired'] = $excludeAllAddressRequired;
return $this;
@@ -185,11 +227,10 @@ public function setExcludeAllAddressRequired($excludeAllAddressRequired)
/**
* Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
*
- * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers
- * that require a local address
+ * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
* @return $this Fluent Builder
*/
- public function setExcludeLocalAddressRequired($excludeLocalAddressRequired)
+ public function setExcludeLocalAddressRequired(bool $excludeLocalAddressRequired): self
{
$this->options['excludeLocalAddressRequired'] = $excludeLocalAddressRequired;
return $this;
@@ -198,11 +239,10 @@ public function setExcludeLocalAddressRequired($excludeLocalAddressRequired)
/**
* Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
*
- * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers
- * that require a foreign address
+ * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
* @return $this Fluent Builder
*/
- public function setExcludeForeignAddressRequired($excludeForeignAddressRequired)
+ public function setExcludeForeignAddressRequired(bool $excludeForeignAddressRequired): self
{
$this->options['excludeForeignAddressRequired'] = $excludeForeignAddressRequired;
return $this;
@@ -211,10 +251,10 @@ public function setExcludeForeignAddressRequired($excludeForeignAddressRequired)
/**
* Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
*
- * @param bool $beta Whether to read phone numbers new to the Twilio platform
+ * @param bool $beta Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
* @return $this Fluent Builder
*/
- public function setBeta($beta)
+ public function setBeta(bool $beta): self
{
$this->options['beta'] = $beta;
return $this;
@@ -223,11 +263,10 @@ public function setBeta($beta)
/**
* Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada.
*
- * @param string $nearNumber Given a phone number, find a geographically close
- * number within distance miles. (US/Canada only)
+ * @param string $nearNumber Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setNearNumber($nearNumber)
+ public function setNearNumber(string $nearNumber): self
{
$this->options['nearNumber'] = $nearNumber;
return $this;
@@ -236,12 +275,10 @@ public function setNearNumber($nearNumber)
/**
* Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada.
*
- * @param string $nearLatLong Given a latitude/longitude pair lat,long find
- * geographically close numbers within distance
- * miles. (US/Canada only)
+ * @param string $nearLatLong Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setNearLatLong($nearLatLong)
+ public function setNearLatLong(string $nearLatLong): self
{
$this->options['nearLatLong'] = $nearLatLong;
return $this;
@@ -250,11 +287,10 @@ public function setNearLatLong($nearLatLong)
/**
* The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada.
*
- * @param int $distance The search radius, in miles, for a near_ query.
- * (US/Canada only)
+ * @param int $distance The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setDistance($distance)
+ public function setDistance(int $distance): self
{
$this->options['distance'] = $distance;
return $this;
@@ -263,11 +299,10 @@ public function setDistance($distance)
/**
* Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada.
*
- * @param string $inPostalCode Limit results to a particular postal code.
- * (US/Canada only)
+ * @param string $inPostalCode Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setInPostalCode($inPostalCode)
+ public function setInPostalCode(string $inPostalCode): self
{
$this->options['inPostalCode'] = $inPostalCode;
return $this;
@@ -276,11 +311,10 @@ public function setInPostalCode($inPostalCode)
/**
* Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada.
*
- * @param string $inRegion Limit results to a particular region. (US/Canada
- * only)
+ * @param string $inRegion Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setInRegion($inRegion)
+ public function setInRegion(string $inRegion): self
{
$this->options['inRegion'] = $inRegion;
return $this;
@@ -289,12 +323,10 @@ public function setInRegion($inRegion)
/**
* Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada.
*
- * @param string $inRateCenter Limit results to a specific rate center, or
- * given a phone number search within the same rate
- * center as that number. (US/Canada only)
+ * @param string $inRateCenter Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setInRateCenter($inRateCenter)
+ public function setInRateCenter(string $inRateCenter): self
{
$this->options['inRateCenter'] = $inRateCenter;
return $this;
@@ -303,11 +335,10 @@ public function setInRateCenter($inRateCenter)
/**
* Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada.
*
- * @param string $inLata Limit results to a specific local access and transport
- * area. (US/Canada only)
+ * @param string $inLata Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setInLata($inLata)
+ public function setInLata(string $inLata): self
{
$this->options['inLata'] = $inLata;
return $this;
@@ -316,10 +347,10 @@ public function setInLata($inLata)
/**
* Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number.
*
- * @param string $inLocality Limit results to a particular locality
+ * @param string $inLocality Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number.
* @return $this Fluent Builder
*/
- public function setInLocality($inLocality)
+ public function setInLocality(string $inLocality): self
{
$this->options['inLocality'] = $inLocality;
return $this;
@@ -328,10 +359,10 @@ public function setInLocality($inLocality)
/**
* Whether the phone numbers can receive faxes. Can be: `true` or `false`.
*
- * @param bool $faxEnabled Whether the phone numbers can receive faxes
+ * @param bool $faxEnabled Whether the phone numbers can receive faxes. Can be: `true` or `false`.
* @return $this Fluent Builder
*/
- public function setFaxEnabled($faxEnabled)
+ public function setFaxEnabled(bool $faxEnabled): self
{
$this->options['faxEnabled'] = $faxEnabled;
return $this;
@@ -342,14 +373,10 @@ public function setFaxEnabled($faxEnabled)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.ReadNationalOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.ReadNationalOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/NationalPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/NationalPage.php
index 7bc9b54..7c9cb66 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/NationalPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/NationalPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return NationalInstance \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\NationalInstance
+ */
+ public function buildInstance(array $payload): NationalInstance
{
- return new NationalInstance(
- $this->version,
- $payload,
- $this->solution['accountSid'],
- $this->solution['countryCode']
- );
+ return new NationalInstance($this->version, $payload, $this->solution['accountSid'], $this->solution['countryCode']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.NationalPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/SharedCostInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/SharedCostInstance.php
index bbe7f8e..b34b523 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/SharedCostInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/SharedCostInstance.php
@@ -2,50 +2,60 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Base\PhoneNumberCapabilities;
+
/**
- * @property string $friendlyName
- * @property string $phoneNumber
- * @property string $lata
- * @property string $locality
- * @property string $rateCenter
- * @property string $latitude
- * @property string $longitude
- * @property string $region
- * @property string $postalCode
- * @property string $isoCountry
- * @property string $addressRequirements
- * @property bool $beta
- * @property string $capabilities
+ * @property string|null $friendlyName
+ * @property string|null $phoneNumber
+ * @property string|null $lata
+ * @property string|null $locality
+ * @property string|null $rateCenter
+ * @property string|null $latitude
+ * @property string|null $longitude
+ * @property string|null $region
+ * @property string|null $postalCode
+ * @property string|null $isoCountry
+ * @property string|null $addressRequirements
+ * @property bool|null $beta
+ * @property PhoneNumberCapabilities|null $capabilities
*/
class SharedCostInstance extends InstanceResource
{
/**
* Initialize the SharedCostInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The account_sid
- * @param string $countryCode The ISO-3166-1 country code of the country.
- * @return \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\SharedCostInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources.
+ * @param string $countryCode The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers.
*/
- public function __construct(Version $version, array $payload, $accountSid, $countryCode)
+ public function __construct(Version $version, array $payload, string $accountSid, string $countryCode)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'friendlyName' => Values::array_get($payload, 'friendly_name'),
'phoneNumber' => Values::array_get($payload, 'phone_number'),
'lata' => Values::array_get($payload, 'lata'),
@@ -58,10 +68,10 @@ public function __construct(Version $version, array $payload, $accountSid, $coun
'isoCountry' => Values::array_get($payload, 'iso_country'),
'addressRequirements' => Values::array_get($payload, 'address_requirements'),
'beta' => Values::array_get($payload, 'beta'),
- 'capabilities' => Values::array_get($payload, 'capabilities'),
- );
+ 'capabilities' => Deserialize::phoneNumberCapabilities(Values::array_get($payload, 'capabilities')),
+ ];
- $this->solution = array('accountSid' => $accountSid, 'countryCode' => $countryCode,);
+ $this->solution = ['accountSid' => $accountSid, 'countryCode' => $countryCode, ];
}
/**
@@ -71,7 +81,7 @@ public function __construct(Version $version, array $payload, $accountSid, $coun
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -90,8 +100,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.SharedCostInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/SharedCostList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/SharedCostList.php
index 98677eb..e38ef87 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/SharedCostList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/SharedCostList.php
@@ -2,37 +2,78 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class SharedCostList extends ListResource
-{
+ {
/**
* Construct the SharedCostList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The account_sid
- * @param string $countryCode The ISO-3166-1 country code of the country.
- * @return \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\SharedCostList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources.
+ * @param string $countryCode The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers.
*/
- public function __construct(Version $version, $accountSid, $countryCode)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid,
+ string $countryCode
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'countryCode' => $countryCode,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ 'countryCode' =>
+ $countryCode,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/AvailablePhoneNumbers/' . \rawurlencode($countryCode)
+ .'/SharedCost.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/AvailablePhoneNumbers/' . \rawurlencode($countryCode) . '/SharedCost.json';
+ /**
+ * Reads SharedCostInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return SharedCostInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -52,9 +93,9 @@ public function __construct(Version $version, $accountSid, $countryCode)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -63,69 +104,67 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads SharedCostInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return SharedCostInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of SharedCostInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of SharedCostInstance
+ * @return SharedCostPage Page of SharedCostInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): SharedCostPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'AreaCode' => $options['areaCode'],
- 'Contains' => $options['contains'],
- 'SmsEnabled' => Serialize::booleanToString($options['smsEnabled']),
- 'MmsEnabled' => Serialize::booleanToString($options['mmsEnabled']),
- 'VoiceEnabled' => Serialize::booleanToString($options['voiceEnabled']),
- 'ExcludeAllAddressRequired' => Serialize::booleanToString($options['excludeAllAddressRequired']),
- 'ExcludeLocalAddressRequired' => Serialize::booleanToString($options['excludeLocalAddressRequired']),
- 'ExcludeForeignAddressRequired' => Serialize::booleanToString($options['excludeForeignAddressRequired']),
- 'Beta' => Serialize::booleanToString($options['beta']),
- 'NearNumber' => $options['nearNumber'],
- 'NearLatLong' => $options['nearLatLong'],
- 'Distance' => $options['distance'],
- 'InPostalCode' => $options['inPostalCode'],
- 'InRegion' => $options['inRegion'],
- 'InRateCenter' => $options['inRateCenter'],
- 'InLata' => $options['inLata'],
- 'InLocality' => $options['inLocality'],
- 'FaxEnabled' => Serialize::booleanToString($options['faxEnabled']),
+
+ $params = Values::of([
+ 'AreaCode' =>
+ $options['areaCode'],
+ 'Contains' =>
+ $options['contains'],
+ 'SmsEnabled' =>
+ Serialize::booleanToString($options['smsEnabled']),
+ 'MmsEnabled' =>
+ Serialize::booleanToString($options['mmsEnabled']),
+ 'VoiceEnabled' =>
+ Serialize::booleanToString($options['voiceEnabled']),
+ 'ExcludeAllAddressRequired' =>
+ Serialize::booleanToString($options['excludeAllAddressRequired']),
+ 'ExcludeLocalAddressRequired' =>
+ Serialize::booleanToString($options['excludeLocalAddressRequired']),
+ 'ExcludeForeignAddressRequired' =>
+ Serialize::booleanToString($options['excludeForeignAddressRequired']),
+ 'Beta' =>
+ Serialize::booleanToString($options['beta']),
+ 'NearNumber' =>
+ $options['nearNumber'],
+ 'NearLatLong' =>
+ $options['nearLatLong'],
+ 'Distance' =>
+ $options['distance'],
+ 'InPostalCode' =>
+ $options['inPostalCode'],
+ 'InRegion' =>
+ $options['inRegion'],
+ 'InRateCenter' =>
+ $options['inRateCenter'],
+ 'InLata' =>
+ $options['inLata'],
+ 'InLocality' =>
+ $options['inLocality'],
+ 'FaxEnabled' =>
+ Serialize::booleanToString($options['faxEnabled']),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new SharedCostPage($this->version, $response, $this->solution);
}
@@ -135,9 +174,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of SharedCostInstance
+ * @return SharedCostPage Page of SharedCostInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): SharedCostPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -147,13 +186,14 @@ public function getPage($targetUrl)
return new SharedCostPage($this->version, $response, $this->solution);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.SharedCostList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/SharedCostOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/SharedCostOptions.php
index 82970a6..98eaa2c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/SharedCostOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/SharedCostOptions.php
@@ -1,10 +1,16 @@
options['areaCode'] = $areaCode;
$this->options['contains'] = $contains;
$this->options['smsEnabled'] = $smsEnabled;
@@ -112,10 +155,10 @@ public function __construct($areaCode = Values::NONE, $contains = Values::NONE,
/**
* The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada.
*
- * @param int $areaCode The area code of the phone numbers to read
+ * @param int $areaCode The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setAreaCode($areaCode)
+ public function setAreaCode(int $areaCode): self
{
$this->options['areaCode'] = $areaCode;
return $this;
@@ -124,10 +167,10 @@ public function setAreaCode($areaCode)
/**
* The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters.
*
- * @param string $contains The pattern on which to match phone numbers
+ * @param string $contains The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters.
* @return $this Fluent Builder
*/
- public function setContains($contains)
+ public function setContains(string $contains): self
{
$this->options['contains'] = $contains;
return $this;
@@ -136,10 +179,10 @@ public function setContains($contains)
/**
* Whether the phone numbers can receive text messages. Can be: `true` or `false`.
*
- * @param bool $smsEnabled Whether the phone numbers can receive text messages
+ * @param bool $smsEnabled Whether the phone numbers can receive text messages. Can be: `true` or `false`.
* @return $this Fluent Builder
*/
- public function setSmsEnabled($smsEnabled)
+ public function setSmsEnabled(bool $smsEnabled): self
{
$this->options['smsEnabled'] = $smsEnabled;
return $this;
@@ -148,10 +191,10 @@ public function setSmsEnabled($smsEnabled)
/**
* Whether the phone numbers can receive MMS messages. Can be: `true` or `false`.
*
- * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages
+ * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages. Can be: `true` or `false`.
* @return $this Fluent Builder
*/
- public function setMmsEnabled($mmsEnabled)
+ public function setMmsEnabled(bool $mmsEnabled): self
{
$this->options['mmsEnabled'] = $mmsEnabled;
return $this;
@@ -160,10 +203,10 @@ public function setMmsEnabled($mmsEnabled)
/**
* Whether the phone numbers can receive calls. Can be: `true` or `false`.
*
- * @param bool $voiceEnabled Whether the phone numbers can receive calls.
+ * @param bool $voiceEnabled Whether the phone numbers can receive calls. Can be: `true` or `false`.
* @return $this Fluent Builder
*/
- public function setVoiceEnabled($voiceEnabled)
+ public function setVoiceEnabled(bool $voiceEnabled): self
{
$this->options['voiceEnabled'] = $voiceEnabled;
return $this;
@@ -172,11 +215,10 @@ public function setVoiceEnabled($voiceEnabled)
/**
* Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
*
- * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that
- * require an Address
+ * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
* @return $this Fluent Builder
*/
- public function setExcludeAllAddressRequired($excludeAllAddressRequired)
+ public function setExcludeAllAddressRequired(bool $excludeAllAddressRequired): self
{
$this->options['excludeAllAddressRequired'] = $excludeAllAddressRequired;
return $this;
@@ -185,11 +227,10 @@ public function setExcludeAllAddressRequired($excludeAllAddressRequired)
/**
* Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
*
- * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers
- * that require a local address
+ * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
* @return $this Fluent Builder
*/
- public function setExcludeLocalAddressRequired($excludeLocalAddressRequired)
+ public function setExcludeLocalAddressRequired(bool $excludeLocalAddressRequired): self
{
$this->options['excludeLocalAddressRequired'] = $excludeLocalAddressRequired;
return $this;
@@ -198,11 +239,10 @@ public function setExcludeLocalAddressRequired($excludeLocalAddressRequired)
/**
* Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
*
- * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers
- * that require a foreign address
+ * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
* @return $this Fluent Builder
*/
- public function setExcludeForeignAddressRequired($excludeForeignAddressRequired)
+ public function setExcludeForeignAddressRequired(bool $excludeForeignAddressRequired): self
{
$this->options['excludeForeignAddressRequired'] = $excludeForeignAddressRequired;
return $this;
@@ -211,10 +251,10 @@ public function setExcludeForeignAddressRequired($excludeForeignAddressRequired)
/**
* Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
*
- * @param bool $beta Whether to read phone numbers new to the Twilio platform
+ * @param bool $beta Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
* @return $this Fluent Builder
*/
- public function setBeta($beta)
+ public function setBeta(bool $beta): self
{
$this->options['beta'] = $beta;
return $this;
@@ -223,11 +263,10 @@ public function setBeta($beta)
/**
* Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada.
*
- * @param string $nearNumber Given a phone number, find a geographically close
- * number within distance miles. (US/Canada only)
+ * @param string $nearNumber Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setNearNumber($nearNumber)
+ public function setNearNumber(string $nearNumber): self
{
$this->options['nearNumber'] = $nearNumber;
return $this;
@@ -236,12 +275,10 @@ public function setNearNumber($nearNumber)
/**
* Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada.
*
- * @param string $nearLatLong Given a latitude/longitude pair lat,long find
- * geographically close numbers within distance
- * miles. (US/Canada only)
+ * @param string $nearLatLong Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setNearLatLong($nearLatLong)
+ public function setNearLatLong(string $nearLatLong): self
{
$this->options['nearLatLong'] = $nearLatLong;
return $this;
@@ -250,11 +287,10 @@ public function setNearLatLong($nearLatLong)
/**
* The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada.
*
- * @param int $distance The search radius, in miles, for a near_ query.
- * (US/Canada only)
+ * @param int $distance The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setDistance($distance)
+ public function setDistance(int $distance): self
{
$this->options['distance'] = $distance;
return $this;
@@ -263,11 +299,10 @@ public function setDistance($distance)
/**
* Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada.
*
- * @param string $inPostalCode Limit results to a particular postal code.
- * (US/Canada only)
+ * @param string $inPostalCode Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setInPostalCode($inPostalCode)
+ public function setInPostalCode(string $inPostalCode): self
{
$this->options['inPostalCode'] = $inPostalCode;
return $this;
@@ -276,11 +311,10 @@ public function setInPostalCode($inPostalCode)
/**
* Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada.
*
- * @param string $inRegion Limit results to a particular region. (US/Canada
- * only)
+ * @param string $inRegion Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setInRegion($inRegion)
+ public function setInRegion(string $inRegion): self
{
$this->options['inRegion'] = $inRegion;
return $this;
@@ -289,12 +323,10 @@ public function setInRegion($inRegion)
/**
* Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada.
*
- * @param string $inRateCenter Limit results to a specific rate center, or
- * given a phone number search within the same rate
- * center as that number. (US/Canada only)
+ * @param string $inRateCenter Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setInRateCenter($inRateCenter)
+ public function setInRateCenter(string $inRateCenter): self
{
$this->options['inRateCenter'] = $inRateCenter;
return $this;
@@ -303,11 +335,10 @@ public function setInRateCenter($inRateCenter)
/**
* Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada.
*
- * @param string $inLata Limit results to a specific local access and transport
- * area. (US/Canada only)
+ * @param string $inLata Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setInLata($inLata)
+ public function setInLata(string $inLata): self
{
$this->options['inLata'] = $inLata;
return $this;
@@ -316,10 +347,10 @@ public function setInLata($inLata)
/**
* Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number.
*
- * @param string $inLocality Limit results to a particular locality
+ * @param string $inLocality Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number.
* @return $this Fluent Builder
*/
- public function setInLocality($inLocality)
+ public function setInLocality(string $inLocality): self
{
$this->options['inLocality'] = $inLocality;
return $this;
@@ -328,10 +359,10 @@ public function setInLocality($inLocality)
/**
* Whether the phone numbers can receive faxes. Can be: `true` or `false`.
*
- * @param bool $faxEnabled Whether the phone numbers can receive faxes
+ * @param bool $faxEnabled Whether the phone numbers can receive faxes. Can be: `true` or `false`.
* @return $this Fluent Builder
*/
- public function setFaxEnabled($faxEnabled)
+ public function setFaxEnabled(bool $faxEnabled): self
{
$this->options['faxEnabled'] = $faxEnabled;
return $this;
@@ -342,14 +373,10 @@ public function setFaxEnabled($faxEnabled)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.ReadSharedCostOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.ReadSharedCostOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/SharedCostPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/SharedCostPage.php
index a3aa618..7ece222 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/SharedCostPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/SharedCostPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return SharedCostInstance \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\SharedCostInstance
+ */
+ public function buildInstance(array $payload): SharedCostInstance
{
- return new SharedCostInstance(
- $this->version,
- $payload,
- $this->solution['accountSid'],
- $this->solution['countryCode']
- );
+ return new SharedCostInstance($this->version, $payload, $this->solution['accountSid'], $this->solution['countryCode']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.SharedCostPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/TollFreeInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/TollFreeInstance.php
index ef19bc6..a3a7f13 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/TollFreeInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/TollFreeInstance.php
@@ -2,50 +2,60 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Base\PhoneNumberCapabilities;
+
/**
- * @property string $friendlyName
- * @property string $phoneNumber
- * @property string $lata
- * @property string $locality
- * @property string $rateCenter
- * @property string $latitude
- * @property string $longitude
- * @property string $region
- * @property string $postalCode
- * @property string $isoCountry
- * @property string $addressRequirements
- * @property bool $beta
- * @property string $capabilities
+ * @property string|null $friendlyName
+ * @property string|null $phoneNumber
+ * @property string|null $lata
+ * @property string|null $locality
+ * @property string|null $rateCenter
+ * @property string|null $latitude
+ * @property string|null $longitude
+ * @property string|null $region
+ * @property string|null $postalCode
+ * @property string|null $isoCountry
+ * @property string|null $addressRequirements
+ * @property bool|null $beta
+ * @property PhoneNumberCapabilities|null $capabilities
*/
class TollFreeInstance extends InstanceResource
{
/**
* Initialize the TollFreeInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The account_sid
- * @param string $countryCode The ISO-3166-1 country code of the country.
- * @return \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\TollFreeInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources.
+ * @param string $countryCode The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers.
*/
- public function __construct(Version $version, array $payload, $accountSid, $countryCode)
+ public function __construct(Version $version, array $payload, string $accountSid, string $countryCode)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'friendlyName' => Values::array_get($payload, 'friendly_name'),
'phoneNumber' => Values::array_get($payload, 'phone_number'),
'lata' => Values::array_get($payload, 'lata'),
@@ -58,10 +68,10 @@ public function __construct(Version $version, array $payload, $accountSid, $coun
'isoCountry' => Values::array_get($payload, 'iso_country'),
'addressRequirements' => Values::array_get($payload, 'address_requirements'),
'beta' => Values::array_get($payload, 'beta'),
- 'capabilities' => Values::array_get($payload, 'capabilities'),
- );
+ 'capabilities' => Deserialize::phoneNumberCapabilities(Values::array_get($payload, 'capabilities')),
+ ];
- $this->solution = array('accountSid' => $accountSid, 'countryCode' => $countryCode,);
+ $this->solution = ['accountSid' => $accountSid, 'countryCode' => $countryCode, ];
}
/**
@@ -71,7 +81,7 @@ public function __construct(Version $version, array $payload, $accountSid, $coun
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -90,8 +100,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.TollFreeInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/TollFreeList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/TollFreeList.php
index 0b236ae..ca60fe5 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/TollFreeList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/TollFreeList.php
@@ -2,37 +2,78 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class TollFreeList extends ListResource
-{
+ {
/**
* Construct the TollFreeList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The account_sid
- * @param string $countryCode The ISO-3166-1 country code of the country.
- * @return \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\TollFreeList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources.
+ * @param string $countryCode The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers.
*/
- public function __construct(Version $version, $accountSid, $countryCode)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid,
+ string $countryCode
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'countryCode' => $countryCode,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ 'countryCode' =>
+ $countryCode,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/AvailablePhoneNumbers/' . \rawurlencode($countryCode)
+ .'/TollFree.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/AvailablePhoneNumbers/' . \rawurlencode($countryCode) . '/TollFree.json';
+ /**
+ * Reads TollFreeInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return TollFreeInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -52,9 +93,9 @@ public function __construct(Version $version, $accountSid, $countryCode)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -63,69 +104,67 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads TollFreeInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return TollFreeInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of TollFreeInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of TollFreeInstance
+ * @return TollFreePage Page of TollFreeInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): TollFreePage
{
$options = new Values($options);
- $params = Values::of(array(
- 'AreaCode' => $options['areaCode'],
- 'Contains' => $options['contains'],
- 'SmsEnabled' => Serialize::booleanToString($options['smsEnabled']),
- 'MmsEnabled' => Serialize::booleanToString($options['mmsEnabled']),
- 'VoiceEnabled' => Serialize::booleanToString($options['voiceEnabled']),
- 'ExcludeAllAddressRequired' => Serialize::booleanToString($options['excludeAllAddressRequired']),
- 'ExcludeLocalAddressRequired' => Serialize::booleanToString($options['excludeLocalAddressRequired']),
- 'ExcludeForeignAddressRequired' => Serialize::booleanToString($options['excludeForeignAddressRequired']),
- 'Beta' => Serialize::booleanToString($options['beta']),
- 'NearNumber' => $options['nearNumber'],
- 'NearLatLong' => $options['nearLatLong'],
- 'Distance' => $options['distance'],
- 'InPostalCode' => $options['inPostalCode'],
- 'InRegion' => $options['inRegion'],
- 'InRateCenter' => $options['inRateCenter'],
- 'InLata' => $options['inLata'],
- 'InLocality' => $options['inLocality'],
- 'FaxEnabled' => Serialize::booleanToString($options['faxEnabled']),
+
+ $params = Values::of([
+ 'AreaCode' =>
+ $options['areaCode'],
+ 'Contains' =>
+ $options['contains'],
+ 'SmsEnabled' =>
+ Serialize::booleanToString($options['smsEnabled']),
+ 'MmsEnabled' =>
+ Serialize::booleanToString($options['mmsEnabled']),
+ 'VoiceEnabled' =>
+ Serialize::booleanToString($options['voiceEnabled']),
+ 'ExcludeAllAddressRequired' =>
+ Serialize::booleanToString($options['excludeAllAddressRequired']),
+ 'ExcludeLocalAddressRequired' =>
+ Serialize::booleanToString($options['excludeLocalAddressRequired']),
+ 'ExcludeForeignAddressRequired' =>
+ Serialize::booleanToString($options['excludeForeignAddressRequired']),
+ 'Beta' =>
+ Serialize::booleanToString($options['beta']),
+ 'NearNumber' =>
+ $options['nearNumber'],
+ 'NearLatLong' =>
+ $options['nearLatLong'],
+ 'Distance' =>
+ $options['distance'],
+ 'InPostalCode' =>
+ $options['inPostalCode'],
+ 'InRegion' =>
+ $options['inRegion'],
+ 'InRateCenter' =>
+ $options['inRateCenter'],
+ 'InLata' =>
+ $options['inLata'],
+ 'InLocality' =>
+ $options['inLocality'],
+ 'FaxEnabled' =>
+ Serialize::booleanToString($options['faxEnabled']),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new TollFreePage($this->version, $response, $this->solution);
}
@@ -135,9 +174,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of TollFreeInstance
+ * @return TollFreePage Page of TollFreeInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): TollFreePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -147,13 +186,14 @@ public function getPage($targetUrl)
return new TollFreePage($this->version, $response, $this->solution);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.TollFreeList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/TollFreeOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/TollFreeOptions.php
index 4b90e3e..004c193 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/TollFreeOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/TollFreeOptions.php
@@ -1,10 +1,16 @@
options['areaCode'] = $areaCode;
$this->options['contains'] = $contains;
$this->options['smsEnabled'] = $smsEnabled;
@@ -112,10 +155,10 @@ public function __construct($areaCode = Values::NONE, $contains = Values::NONE,
/**
* The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada.
*
- * @param int $areaCode The area code of the phone numbers to read
+ * @param int $areaCode The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setAreaCode($areaCode)
+ public function setAreaCode(int $areaCode): self
{
$this->options['areaCode'] = $areaCode;
return $this;
@@ -124,10 +167,10 @@ public function setAreaCode($areaCode)
/**
* The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters.
*
- * @param string $contains The pattern on which to match phone numbers
+ * @param string $contains The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters.
* @return $this Fluent Builder
*/
- public function setContains($contains)
+ public function setContains(string $contains): self
{
$this->options['contains'] = $contains;
return $this;
@@ -136,10 +179,10 @@ public function setContains($contains)
/**
* Whether the phone numbers can receive text messages. Can be: `true` or `false`.
*
- * @param bool $smsEnabled Whether the phone numbers can receive text messages
+ * @param bool $smsEnabled Whether the phone numbers can receive text messages. Can be: `true` or `false`.
* @return $this Fluent Builder
*/
- public function setSmsEnabled($smsEnabled)
+ public function setSmsEnabled(bool $smsEnabled): self
{
$this->options['smsEnabled'] = $smsEnabled;
return $this;
@@ -148,10 +191,10 @@ public function setSmsEnabled($smsEnabled)
/**
* Whether the phone numbers can receive MMS messages. Can be: `true` or `false`.
*
- * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages
+ * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages. Can be: `true` or `false`.
* @return $this Fluent Builder
*/
- public function setMmsEnabled($mmsEnabled)
+ public function setMmsEnabled(bool $mmsEnabled): self
{
$this->options['mmsEnabled'] = $mmsEnabled;
return $this;
@@ -160,10 +203,10 @@ public function setMmsEnabled($mmsEnabled)
/**
* Whether the phone numbers can receive calls. Can be: `true` or `false`.
*
- * @param bool $voiceEnabled Whether the phone numbers can receive calls.
+ * @param bool $voiceEnabled Whether the phone numbers can receive calls. Can be: `true` or `false`.
* @return $this Fluent Builder
*/
- public function setVoiceEnabled($voiceEnabled)
+ public function setVoiceEnabled(bool $voiceEnabled): self
{
$this->options['voiceEnabled'] = $voiceEnabled;
return $this;
@@ -172,11 +215,10 @@ public function setVoiceEnabled($voiceEnabled)
/**
* Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
*
- * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that
- * require an Address
+ * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
* @return $this Fluent Builder
*/
- public function setExcludeAllAddressRequired($excludeAllAddressRequired)
+ public function setExcludeAllAddressRequired(bool $excludeAllAddressRequired): self
{
$this->options['excludeAllAddressRequired'] = $excludeAllAddressRequired;
return $this;
@@ -185,11 +227,10 @@ public function setExcludeAllAddressRequired($excludeAllAddressRequired)
/**
* Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
*
- * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers
- * that require a local address
+ * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
* @return $this Fluent Builder
*/
- public function setExcludeLocalAddressRequired($excludeLocalAddressRequired)
+ public function setExcludeLocalAddressRequired(bool $excludeLocalAddressRequired): self
{
$this->options['excludeLocalAddressRequired'] = $excludeLocalAddressRequired;
return $this;
@@ -198,11 +239,10 @@ public function setExcludeLocalAddressRequired($excludeLocalAddressRequired)
/**
* Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
*
- * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers
- * that require a foreign address
+ * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
* @return $this Fluent Builder
*/
- public function setExcludeForeignAddressRequired($excludeForeignAddressRequired)
+ public function setExcludeForeignAddressRequired(bool $excludeForeignAddressRequired): self
{
$this->options['excludeForeignAddressRequired'] = $excludeForeignAddressRequired;
return $this;
@@ -211,10 +251,10 @@ public function setExcludeForeignAddressRequired($excludeForeignAddressRequired)
/**
* Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
*
- * @param bool $beta Whether to read phone numbers new to the Twilio platform
+ * @param bool $beta Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
* @return $this Fluent Builder
*/
- public function setBeta($beta)
+ public function setBeta(bool $beta): self
{
$this->options['beta'] = $beta;
return $this;
@@ -223,11 +263,10 @@ public function setBeta($beta)
/**
* Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada.
*
- * @param string $nearNumber Given a phone number, find a geographically close
- * number within distance miles. (US/Canada only)
+ * @param string $nearNumber Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setNearNumber($nearNumber)
+ public function setNearNumber(string $nearNumber): self
{
$this->options['nearNumber'] = $nearNumber;
return $this;
@@ -236,12 +275,10 @@ public function setNearNumber($nearNumber)
/**
* Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada.
*
- * @param string $nearLatLong Given a latitude/longitude pair lat,long find
- * geographically close numbers within distance
- * miles. (US/Canada only)
+ * @param string $nearLatLong Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setNearLatLong($nearLatLong)
+ public function setNearLatLong(string $nearLatLong): self
{
$this->options['nearLatLong'] = $nearLatLong;
return $this;
@@ -250,11 +287,10 @@ public function setNearLatLong($nearLatLong)
/**
* The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada.
*
- * @param int $distance The search radius, in miles, for a near_ query.
- * (US/Canada only)
+ * @param int $distance The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setDistance($distance)
+ public function setDistance(int $distance): self
{
$this->options['distance'] = $distance;
return $this;
@@ -263,11 +299,10 @@ public function setDistance($distance)
/**
* Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada.
*
- * @param string $inPostalCode Limit results to a particular postal code.
- * (US/Canada only)
+ * @param string $inPostalCode Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setInPostalCode($inPostalCode)
+ public function setInPostalCode(string $inPostalCode): self
{
$this->options['inPostalCode'] = $inPostalCode;
return $this;
@@ -276,11 +311,10 @@ public function setInPostalCode($inPostalCode)
/**
* Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada.
*
- * @param string $inRegion Limit results to a particular region. (US/Canada
- * only)
+ * @param string $inRegion Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setInRegion($inRegion)
+ public function setInRegion(string $inRegion): self
{
$this->options['inRegion'] = $inRegion;
return $this;
@@ -289,12 +323,10 @@ public function setInRegion($inRegion)
/**
* Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada.
*
- * @param string $inRateCenter Limit results to a specific rate center, or
- * given a phone number search within the same rate
- * center as that number. (US/Canada only)
+ * @param string $inRateCenter Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setInRateCenter($inRateCenter)
+ public function setInRateCenter(string $inRateCenter): self
{
$this->options['inRateCenter'] = $inRateCenter;
return $this;
@@ -303,11 +335,10 @@ public function setInRateCenter($inRateCenter)
/**
* Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada.
*
- * @param string $inLata Limit results to a specific local access and transport
- * area. (US/Canada only)
+ * @param string $inLata Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setInLata($inLata)
+ public function setInLata(string $inLata): self
{
$this->options['inLata'] = $inLata;
return $this;
@@ -316,10 +347,10 @@ public function setInLata($inLata)
/**
* Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number.
*
- * @param string $inLocality Limit results to a particular locality
+ * @param string $inLocality Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number.
* @return $this Fluent Builder
*/
- public function setInLocality($inLocality)
+ public function setInLocality(string $inLocality): self
{
$this->options['inLocality'] = $inLocality;
return $this;
@@ -328,10 +359,10 @@ public function setInLocality($inLocality)
/**
* Whether the phone numbers can receive faxes. Can be: `true` or `false`.
*
- * @param bool $faxEnabled Whether the phone numbers can receive faxes
+ * @param bool $faxEnabled Whether the phone numbers can receive faxes. Can be: `true` or `false`.
* @return $this Fluent Builder
*/
- public function setFaxEnabled($faxEnabled)
+ public function setFaxEnabled(bool $faxEnabled): self
{
$this->options['faxEnabled'] = $faxEnabled;
return $this;
@@ -342,14 +373,10 @@ public function setFaxEnabled($faxEnabled)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.ReadTollFreeOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.ReadTollFreeOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/TollFreePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/TollFreePage.php
index cfc43fd..9e48d66 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/TollFreePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/TollFreePage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return TollFreeInstance \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\TollFreeInstance
+ */
+ public function buildInstance(array $payload): TollFreeInstance
{
- return new TollFreeInstance(
- $this->version,
- $payload,
- $this->solution['accountSid'],
- $this->solution['countryCode']
- );
+ return new TollFreeInstance($this->version, $payload, $this->solution['accountSid'], $this->solution['countryCode']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.TollFreePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/VoipInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/VoipInstance.php
index 0311ce9..920d2df 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/VoipInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/VoipInstance.php
@@ -2,50 +2,60 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Base\PhoneNumberCapabilities;
+
/**
- * @property string $friendlyName
- * @property string $phoneNumber
- * @property string $lata
- * @property string $locality
- * @property string $rateCenter
- * @property string $latitude
- * @property string $longitude
- * @property string $region
- * @property string $postalCode
- * @property string $isoCountry
- * @property string $addressRequirements
- * @property bool $beta
- * @property string $capabilities
+ * @property string|null $friendlyName
+ * @property string|null $phoneNumber
+ * @property string|null $lata
+ * @property string|null $locality
+ * @property string|null $rateCenter
+ * @property string|null $latitude
+ * @property string|null $longitude
+ * @property string|null $region
+ * @property string|null $postalCode
+ * @property string|null $isoCountry
+ * @property string|null $addressRequirements
+ * @property bool|null $beta
+ * @property PhoneNumberCapabilities|null $capabilities
*/
class VoipInstance extends InstanceResource
{
/**
* Initialize the VoipInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The account_sid
- * @param string $countryCode The ISO-3166-1 country code of the country.
- * @return \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\VoipInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources.
+ * @param string $countryCode The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers.
*/
- public function __construct(Version $version, array $payload, $accountSid, $countryCode)
+ public function __construct(Version $version, array $payload, string $accountSid, string $countryCode)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'friendlyName' => Values::array_get($payload, 'friendly_name'),
'phoneNumber' => Values::array_get($payload, 'phone_number'),
'lata' => Values::array_get($payload, 'lata'),
@@ -58,10 +68,10 @@ public function __construct(Version $version, array $payload, $accountSid, $coun
'isoCountry' => Values::array_get($payload, 'iso_country'),
'addressRequirements' => Values::array_get($payload, 'address_requirements'),
'beta' => Values::array_get($payload, 'beta'),
- 'capabilities' => Values::array_get($payload, 'capabilities'),
- );
+ 'capabilities' => Deserialize::phoneNumberCapabilities(Values::array_get($payload, 'capabilities')),
+ ];
- $this->solution = array('accountSid' => $accountSid, 'countryCode' => $countryCode,);
+ $this->solution = ['accountSid' => $accountSid, 'countryCode' => $countryCode, ];
}
/**
@@ -71,7 +81,7 @@ public function __construct(Version $version, array $payload, $accountSid, $coun
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -90,8 +100,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.VoipInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/VoipList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/VoipList.php
index ea838d4..a2fafe3 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/VoipList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/VoipList.php
@@ -2,37 +2,78 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class VoipList extends ListResource
-{
+ {
/**
* Construct the VoipList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The account_sid
- * @param string $countryCode The ISO-3166-1 country code of the country.
- * @return \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\VoipList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the AvailablePhoneNumber resources.
+ * @param string $countryCode The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country from which to read phone numbers.
*/
- public function __construct(Version $version, $accountSid, $countryCode)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid,
+ string $countryCode
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'countryCode' => $countryCode,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ 'countryCode' =>
+ $countryCode,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/AvailablePhoneNumbers/' . \rawurlencode($countryCode)
+ .'/Voip.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/AvailablePhoneNumbers/' . \rawurlencode($countryCode) . '/Voip.json';
+ /**
+ * Reads VoipInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return VoipInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -52,9 +93,9 @@ public function __construct(Version $version, $accountSid, $countryCode)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -63,69 +104,67 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads VoipInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return VoipInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of VoipInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of VoipInstance
+ * @return VoipPage Page of VoipInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): VoipPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'AreaCode' => $options['areaCode'],
- 'Contains' => $options['contains'],
- 'SmsEnabled' => Serialize::booleanToString($options['smsEnabled']),
- 'MmsEnabled' => Serialize::booleanToString($options['mmsEnabled']),
- 'VoiceEnabled' => Serialize::booleanToString($options['voiceEnabled']),
- 'ExcludeAllAddressRequired' => Serialize::booleanToString($options['excludeAllAddressRequired']),
- 'ExcludeLocalAddressRequired' => Serialize::booleanToString($options['excludeLocalAddressRequired']),
- 'ExcludeForeignAddressRequired' => Serialize::booleanToString($options['excludeForeignAddressRequired']),
- 'Beta' => Serialize::booleanToString($options['beta']),
- 'NearNumber' => $options['nearNumber'],
- 'NearLatLong' => $options['nearLatLong'],
- 'Distance' => $options['distance'],
- 'InPostalCode' => $options['inPostalCode'],
- 'InRegion' => $options['inRegion'],
- 'InRateCenter' => $options['inRateCenter'],
- 'InLata' => $options['inLata'],
- 'InLocality' => $options['inLocality'],
- 'FaxEnabled' => Serialize::booleanToString($options['faxEnabled']),
+
+ $params = Values::of([
+ 'AreaCode' =>
+ $options['areaCode'],
+ 'Contains' =>
+ $options['contains'],
+ 'SmsEnabled' =>
+ Serialize::booleanToString($options['smsEnabled']),
+ 'MmsEnabled' =>
+ Serialize::booleanToString($options['mmsEnabled']),
+ 'VoiceEnabled' =>
+ Serialize::booleanToString($options['voiceEnabled']),
+ 'ExcludeAllAddressRequired' =>
+ Serialize::booleanToString($options['excludeAllAddressRequired']),
+ 'ExcludeLocalAddressRequired' =>
+ Serialize::booleanToString($options['excludeLocalAddressRequired']),
+ 'ExcludeForeignAddressRequired' =>
+ Serialize::booleanToString($options['excludeForeignAddressRequired']),
+ 'Beta' =>
+ Serialize::booleanToString($options['beta']),
+ 'NearNumber' =>
+ $options['nearNumber'],
+ 'NearLatLong' =>
+ $options['nearLatLong'],
+ 'Distance' =>
+ $options['distance'],
+ 'InPostalCode' =>
+ $options['inPostalCode'],
+ 'InRegion' =>
+ $options['inRegion'],
+ 'InRateCenter' =>
+ $options['inRateCenter'],
+ 'InLata' =>
+ $options['inLata'],
+ 'InLocality' =>
+ $options['inLocality'],
+ 'FaxEnabled' =>
+ Serialize::booleanToString($options['faxEnabled']),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new VoipPage($this->version, $response, $this->solution);
}
@@ -135,9 +174,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of VoipInstance
+ * @return VoipPage Page of VoipInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): VoipPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -147,13 +186,14 @@ public function getPage($targetUrl)
return new VoipPage($this->version, $response, $this->solution);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.VoipList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/VoipOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/VoipOptions.php
index b9440d0..3a16d38 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/VoipOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/VoipOptions.php
@@ -1,10 +1,16 @@
options['areaCode'] = $areaCode;
$this->options['contains'] = $contains;
$this->options['smsEnabled'] = $smsEnabled;
@@ -112,10 +155,10 @@ public function __construct($areaCode = Values::NONE, $contains = Values::NONE,
/**
* The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada.
*
- * @param int $areaCode The area code of the phone numbers to read
+ * @param int $areaCode The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setAreaCode($areaCode)
+ public function setAreaCode(int $areaCode): self
{
$this->options['areaCode'] = $areaCode;
return $this;
@@ -124,10 +167,10 @@ public function setAreaCode($areaCode)
/**
* The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters.
*
- * @param string $contains The pattern on which to match phone numbers
+ * @param string $contains The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-2) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumber-resource#local-get-basic-example-3). If specified, this value must have at least two characters.
* @return $this Fluent Builder
*/
- public function setContains($contains)
+ public function setContains(string $contains): self
{
$this->options['contains'] = $contains;
return $this;
@@ -136,10 +179,10 @@ public function setContains($contains)
/**
* Whether the phone numbers can receive text messages. Can be: `true` or `false`.
*
- * @param bool $smsEnabled Whether the phone numbers can receive text messages
+ * @param bool $smsEnabled Whether the phone numbers can receive text messages. Can be: `true` or `false`.
* @return $this Fluent Builder
*/
- public function setSmsEnabled($smsEnabled)
+ public function setSmsEnabled(bool $smsEnabled): self
{
$this->options['smsEnabled'] = $smsEnabled;
return $this;
@@ -148,10 +191,10 @@ public function setSmsEnabled($smsEnabled)
/**
* Whether the phone numbers can receive MMS messages. Can be: `true` or `false`.
*
- * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages
+ * @param bool $mmsEnabled Whether the phone numbers can receive MMS messages. Can be: `true` or `false`.
* @return $this Fluent Builder
*/
- public function setMmsEnabled($mmsEnabled)
+ public function setMmsEnabled(bool $mmsEnabled): self
{
$this->options['mmsEnabled'] = $mmsEnabled;
return $this;
@@ -160,10 +203,10 @@ public function setMmsEnabled($mmsEnabled)
/**
* Whether the phone numbers can receive calls. Can be: `true` or `false`.
*
- * @param bool $voiceEnabled Whether the phone numbers can receive calls.
+ * @param bool $voiceEnabled Whether the phone numbers can receive calls. Can be: `true` or `false`.
* @return $this Fluent Builder
*/
- public function setVoiceEnabled($voiceEnabled)
+ public function setVoiceEnabled(bool $voiceEnabled): self
{
$this->options['voiceEnabled'] = $voiceEnabled;
return $this;
@@ -172,11 +215,10 @@ public function setVoiceEnabled($voiceEnabled)
/**
* Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
*
- * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that
- * require an Address
+ * @param bool $excludeAllAddressRequired Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
* @return $this Fluent Builder
*/
- public function setExcludeAllAddressRequired($excludeAllAddressRequired)
+ public function setExcludeAllAddressRequired(bool $excludeAllAddressRequired): self
{
$this->options['excludeAllAddressRequired'] = $excludeAllAddressRequired;
return $this;
@@ -185,11 +227,10 @@ public function setExcludeAllAddressRequired($excludeAllAddressRequired)
/**
* Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
*
- * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers
- * that require a local address
+ * @param bool $excludeLocalAddressRequired Whether to exclude phone numbers that require a local [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
* @return $this Fluent Builder
*/
- public function setExcludeLocalAddressRequired($excludeLocalAddressRequired)
+ public function setExcludeLocalAddressRequired(bool $excludeLocalAddressRequired): self
{
$this->options['excludeLocalAddressRequired'] = $excludeLocalAddressRequired;
return $this;
@@ -198,11 +239,10 @@ public function setExcludeLocalAddressRequired($excludeLocalAddressRequired)
/**
* Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
*
- * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers
- * that require a foreign address
+ * @param bool $excludeForeignAddressRequired Whether to exclude phone numbers that require a foreign [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`.
* @return $this Fluent Builder
*/
- public function setExcludeForeignAddressRequired($excludeForeignAddressRequired)
+ public function setExcludeForeignAddressRequired(bool $excludeForeignAddressRequired): self
{
$this->options['excludeForeignAddressRequired'] = $excludeForeignAddressRequired;
return $this;
@@ -211,10 +251,10 @@ public function setExcludeForeignAddressRequired($excludeForeignAddressRequired)
/**
* Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
*
- * @param bool $beta Whether to read phone numbers new to the Twilio platform
+ * @param bool $beta Whether to read phone numbers that are new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
* @return $this Fluent Builder
*/
- public function setBeta($beta)
+ public function setBeta(bool $beta): self
{
$this->options['beta'] = $beta;
return $this;
@@ -223,11 +263,10 @@ public function setBeta($beta)
/**
* Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada.
*
- * @param string $nearNumber Given a phone number, find a geographically close
- * number within distance miles. (US/Canada only)
+ * @param string $nearNumber Given a phone number, find a geographically close number within `distance` miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setNearNumber($nearNumber)
+ public function setNearNumber(string $nearNumber): self
{
$this->options['nearNumber'] = $nearNumber;
return $this;
@@ -236,12 +275,10 @@ public function setNearNumber($nearNumber)
/**
* Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada.
*
- * @param string $nearLatLong Given a latitude/longitude pair lat,long find
- * geographically close numbers within distance
- * miles. (US/Canada only)
+ * @param string $nearLatLong Given a latitude/longitude pair `lat,long` find geographically close numbers within `distance` miles. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setNearLatLong($nearLatLong)
+ public function setNearLatLong(string $nearLatLong): self
{
$this->options['nearLatLong'] = $nearLatLong;
return $this;
@@ -250,11 +287,10 @@ public function setNearLatLong($nearLatLong)
/**
* The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada.
*
- * @param int $distance The search radius, in miles, for a near_ query.
- * (US/Canada only)
+ * @param int $distance The search radius, in miles, for a `near_` query. Can be up to `500` and the default is `25`. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setDistance($distance)
+ public function setDistance(int $distance): self
{
$this->options['distance'] = $distance;
return $this;
@@ -263,11 +299,10 @@ public function setDistance($distance)
/**
* Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada.
*
- * @param string $inPostalCode Limit results to a particular postal code.
- * (US/Canada only)
+ * @param string $inPostalCode Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setInPostalCode($inPostalCode)
+ public function setInPostalCode(string $inPostalCode): self
{
$this->options['inPostalCode'] = $inPostalCode;
return $this;
@@ -276,11 +311,10 @@ public function setInPostalCode($inPostalCode)
/**
* Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada.
*
- * @param string $inRegion Limit results to a particular region. (US/Canada
- * only)
+ * @param string $inRegion Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setInRegion($inRegion)
+ public function setInRegion(string $inRegion): self
{
$this->options['inRegion'] = $inRegion;
return $this;
@@ -289,12 +323,10 @@ public function setInRegion($inRegion)
/**
* Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada.
*
- * @param string $inRateCenter Limit results to a specific rate center, or
- * given a phone number search within the same rate
- * center as that number. (US/Canada only)
+ * @param string $inRateCenter Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires `in_lata` to be set as well. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setInRateCenter($inRateCenter)
+ public function setInRateCenter(string $inRateCenter): self
{
$this->options['inRateCenter'] = $inRateCenter;
return $this;
@@ -303,11 +335,10 @@ public function setInRateCenter($inRateCenter)
/**
* Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada.
*
- * @param string $inLata Limit results to a specific local access and transport
- * area. (US/Canada only)
+ * @param string $inLata Limit results to a specific local access and transport area ([LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area)). Given a phone number, search within the same [LATA](https://en.wikipedia.org/wiki/Local_access_and_transport_area) as that number. Applies to only phone numbers in the US and Canada.
* @return $this Fluent Builder
*/
- public function setInLata($inLata)
+ public function setInLata(string $inLata): self
{
$this->options['inLata'] = $inLata;
return $this;
@@ -316,10 +347,10 @@ public function setInLata($inLata)
/**
* Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number.
*
- * @param string $inLocality Limit results to a particular locality
+ * @param string $inLocality Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number.
* @return $this Fluent Builder
*/
- public function setInLocality($inLocality)
+ public function setInLocality(string $inLocality): self
{
$this->options['inLocality'] = $inLocality;
return $this;
@@ -328,10 +359,10 @@ public function setInLocality($inLocality)
/**
* Whether the phone numbers can receive faxes. Can be: `true` or `false`.
*
- * @param bool $faxEnabled Whether the phone numbers can receive faxes
+ * @param bool $faxEnabled Whether the phone numbers can receive faxes. Can be: `true` or `false`.
* @return $this Fluent Builder
*/
- public function setFaxEnabled($faxEnabled)
+ public function setFaxEnabled(bool $faxEnabled): self
{
$this->options['faxEnabled'] = $faxEnabled;
return $this;
@@ -342,14 +373,10 @@ public function setFaxEnabled($faxEnabled)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.ReadVoipOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.ReadVoipOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/VoipPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/VoipPage.php
index 0a373e5..9c1c772 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/VoipPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/VoipPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return VoipInstance \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\VoipInstance
+ */
+ public function buildInstance(array $payload): VoipInstance
{
- return new VoipInstance(
- $this->version,
- $payload,
- $this->solution['accountSid'],
- $this->solution['countryCode']
- );
+ return new VoipInstance($this->version, $payload, $this->solution['accountSid'], $this->solution['countryCode']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.VoipPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountryContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountryContext.php
index 558cc8d..6545b90 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountryContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountryContext.php
@@ -2,80 +2,92 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account;
use Twilio\Exceptions\TwilioException;
+use Twilio\ListResource;
+use Twilio\Values;
+use Twilio\Version;
use Twilio\InstanceContext;
-use Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\LocalList;
-use Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\MachineToMachineList;
-use Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\MobileList;
+use Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\VoipList;
use Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\NationalList;
-use Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\SharedCostList;
+use Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\MobileList;
+use Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\MachineToMachineList;
use Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\TollFreeList;
-use Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\VoipList;
-use Twilio\Values;
-use Twilio\Version;
+use Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\SharedCostList;
+use Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\LocalList;
+
/**
- * @property \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\LocalList $local
- * @property \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\TollFreeList $tollFree
- * @property \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\MobileList $mobile
- * @property \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\NationalList $national
- * @property \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\VoipList $voip
- * @property \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\SharedCostList $sharedCost
- * @property \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\MachineToMachineList $machineToMachine
+ * @property VoipList $voip
+ * @property NationalList $national
+ * @property MobileList $mobile
+ * @property MachineToMachineList $machineToMachine
+ * @property TollFreeList $tollFree
+ * @property SharedCostList $sharedCost
+ * @property LocalList $local
*/
class AvailablePhoneNumberCountryContext extends InstanceContext
-{
- protected $_local = null;
- protected $_tollFree = null;
- protected $_mobile = null;
- protected $_national = null;
- protected $_voip = null;
- protected $_sharedCost = null;
- protected $_machineToMachine = null;
+ {
+ protected $_voip;
+ protected $_national;
+ protected $_mobile;
+ protected $_machineToMachine;
+ protected $_tollFree;
+ protected $_sharedCost;
+ protected $_local;
/**
* Initialize the AvailablePhoneNumberCountryContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account requesting the available
- * phone number Country resource
- * @param string $countryCode The ISO country code of the country to fetch
- * available phone number information about
- * @return \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountryContext
+ * @param Version $version Version that contains the resource
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the available phone number Country resource.
+ * @param string $countryCode The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country to fetch available phone number information about.
*/
- public function __construct(Version $version, $accountSid, $countryCode)
- {
+ public function __construct(
+ Version $version,
+ $accountSid,
+ $countryCode
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'countryCode' => $countryCode,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+ 'countryCode' =>
+ $countryCode,
+ ];
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/AvailablePhoneNumbers/' . \rawurlencode($countryCode) . '.json';
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/AvailablePhoneNumbers/' . \rawurlencode($countryCode)
+ .'.json';
}
/**
- * Fetch a AvailablePhoneNumberCountryInstance
+ * Fetch the AvailablePhoneNumberCountryInstance
*
- * @return AvailablePhoneNumberCountryInstance Fetched
- * AvailablePhoneNumberCountryInstance
+ * @return AvailablePhoneNumberCountryInstance Fetched AvailablePhoneNumberCountryInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): AvailablePhoneNumberCountryInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new AvailablePhoneNumberCountryInstance(
$this->version,
@@ -85,48 +97,43 @@ public function fetch()
);
}
+
/**
- * Access the local
- *
- * @return \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\LocalList
+ * Access the voip
*/
- protected function getLocal()
+ protected function getVoip(): VoipList
{
- if (!$this->_local) {
- $this->_local = new LocalList(
+ if (!$this->_voip) {
+ $this->_voip = new VoipList(
$this->version,
$this->solution['accountSid'],
$this->solution['countryCode']
);
}
- return $this->_local;
+ return $this->_voip;
}
/**
- * Access the tollFree
- *
- * @return \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\TollFreeList
+ * Access the national
*/
- protected function getTollFree()
+ protected function getNational(): NationalList
{
- if (!$this->_tollFree) {
- $this->_tollFree = new TollFreeList(
+ if (!$this->_national) {
+ $this->_national = new NationalList(
$this->version,
$this->solution['accountSid'],
$this->solution['countryCode']
);
}
- return $this->_tollFree;
+ return $this->_national;
}
/**
* Access the mobile
- *
- * @return \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\MobileList
*/
- protected function getMobile()
+ protected function getMobile(): MobileList
{
if (!$this->_mobile) {
$this->_mobile = new MobileList(
@@ -140,47 +147,41 @@ protected function getMobile()
}
/**
- * Access the national
- *
- * @return \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\NationalList
+ * Access the machineToMachine
*/
- protected function getNational()
+ protected function getMachineToMachine(): MachineToMachineList
{
- if (!$this->_national) {
- $this->_national = new NationalList(
+ if (!$this->_machineToMachine) {
+ $this->_machineToMachine = new MachineToMachineList(
$this->version,
$this->solution['accountSid'],
$this->solution['countryCode']
);
}
- return $this->_national;
+ return $this->_machineToMachine;
}
/**
- * Access the voip
- *
- * @return \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\VoipList
+ * Access the tollFree
*/
- protected function getVoip()
+ protected function getTollFree(): TollFreeList
{
- if (!$this->_voip) {
- $this->_voip = new VoipList(
+ if (!$this->_tollFree) {
+ $this->_tollFree = new TollFreeList(
$this->version,
$this->solution['accountSid'],
$this->solution['countryCode']
);
}
- return $this->_voip;
+ return $this->_tollFree;
}
/**
* Access the sharedCost
- *
- * @return \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\SharedCostList
*/
- protected function getSharedCost()
+ protected function getSharedCost(): SharedCostList
{
if (!$this->_sharedCost) {
$this->_sharedCost = new SharedCostList(
@@ -194,31 +195,29 @@ protected function getSharedCost()
}
/**
- * Access the machineToMachine
- *
- * @return \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\MachineToMachineList
+ * Access the local
*/
- protected function getMachineToMachine()
+ protected function getLocal(): LocalList
{
- if (!$this->_machineToMachine) {
- $this->_machineToMachine = new MachineToMachineList(
+ if (!$this->_local) {
+ $this->_local = new LocalList(
$this->version,
$this->solution['accountSid'],
$this->solution['countryCode']
);
}
- return $this->_machineToMachine;
+ return $this->_local;
}
/**
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -233,10 +232,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -251,12 +250,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.AvailablePhoneNumberCountryContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountryInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountryInstance.php
index 54a926a..7015726 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountryInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountryInstance.php
@@ -2,72 +2,82 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\VoipList;
+use Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\NationalList;
+use Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\MobileList;
+use Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\MachineToMachineList;
+use Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\TollFreeList;
+use Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\SharedCostList;
+use Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\LocalList;
+
/**
- * @property string $countryCode
- * @property string $country
- * @property string $uri
- * @property bool $beta
- * @property array $subresourceUris
+ * @property string|null $countryCode
+ * @property string|null $country
+ * @property string|null $uri
+ * @property bool|null $beta
+ * @property array|null $subresourceUris
*/
class AvailablePhoneNumberCountryInstance extends InstanceResource
{
- protected $_local = null;
- protected $_tollFree = null;
- protected $_mobile = null;
- protected $_national = null;
- protected $_voip = null;
- protected $_sharedCost = null;
- protected $_machineToMachine = null;
+ protected $_voip;
+ protected $_national;
+ protected $_mobile;
+ protected $_machineToMachine;
+ protected $_tollFree;
+ protected $_sharedCost;
+ protected $_local;
/**
* Initialize the AvailablePhoneNumberCountryInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid A 34 character string that uniquely identifies
- * this resource.
- * @param string $countryCode The ISO country code of the country to fetch
- * available phone number information about
- * @return \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountryInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the available phone number Country resource.
+ * @param string $countryCode The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country to fetch available phone number information about.
*/
- public function __construct(Version $version, array $payload, $accountSid, $countryCode = null)
+ public function __construct(Version $version, array $payload, string $accountSid, string $countryCode = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'countryCode' => Values::array_get($payload, 'country_code'),
'country' => Values::array_get($payload, 'country'),
'uri' => Values::array_get($payload, 'uri'),
'beta' => Values::array_get($payload, 'beta'),
'subresourceUris' => Values::array_get($payload, 'subresource_uris'),
- );
+ ];
- $this->solution = array(
- 'accountSid' => $accountSid,
- 'countryCode' => $countryCode ?: $this->properties['countryCode'],
- );
+ $this->solution = ['accountSid' => $accountSid, 'countryCode' => $countryCode ?: $this->properties['countryCode'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountryContext Context for this AvailablePhoneNumberCountryInstance
+ * @return AvailablePhoneNumberCountryContext Context for this AvailablePhoneNumberCountryInstance
*/
- protected function proxy()
+ protected function proxy(): AvailablePhoneNumberCountryContext
{
if (!$this->context) {
$this->context = new AvailablePhoneNumberCountryContext(
@@ -81,85 +91,71 @@ protected function proxy()
}
/**
- * Fetch a AvailablePhoneNumberCountryInstance
+ * Fetch the AvailablePhoneNumberCountryInstance
*
- * @return AvailablePhoneNumberCountryInstance Fetched
- * AvailablePhoneNumberCountryInstance
+ * @return AvailablePhoneNumberCountryInstance Fetched AvailablePhoneNumberCountryInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): AvailablePhoneNumberCountryInstance
{
+
return $this->proxy()->fetch();
}
/**
- * Access the local
- *
- * @return \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\LocalList
+ * Access the voip
*/
- protected function getLocal()
+ protected function getVoip(): VoipList
{
- return $this->proxy()->local;
+ return $this->proxy()->voip;
}
/**
- * Access the tollFree
- *
- * @return \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\TollFreeList
+ * Access the national
*/
- protected function getTollFree()
+ protected function getNational(): NationalList
{
- return $this->proxy()->tollFree;
+ return $this->proxy()->national;
}
/**
* Access the mobile
- *
- * @return \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\MobileList
*/
- protected function getMobile()
+ protected function getMobile(): MobileList
{
return $this->proxy()->mobile;
}
/**
- * Access the national
- *
- * @return \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\NationalList
+ * Access the machineToMachine
*/
- protected function getNational()
+ protected function getMachineToMachine(): MachineToMachineList
{
- return $this->proxy()->national;
+ return $this->proxy()->machineToMachine;
}
/**
- * Access the voip
- *
- * @return \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\VoipList
+ * Access the tollFree
*/
- protected function getVoip()
+ protected function getTollFree(): TollFreeList
{
- return $this->proxy()->voip;
+ return $this->proxy()->tollFree;
}
/**
* Access the sharedCost
- *
- * @return \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\SharedCostList
*/
- protected function getSharedCost()
+ protected function getSharedCost(): SharedCostList
{
return $this->proxy()->sharedCost;
}
/**
- * Access the machineToMachine
- *
- * @return \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountry\MachineToMachineList
+ * Access the local
*/
- protected function getMachineToMachine()
+ protected function getLocal(): LocalList
{
- return $this->proxy()->machineToMachine;
+ return $this->proxy()->local;
}
/**
@@ -169,7 +165,7 @@ protected function getMachineToMachine()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -188,12 +184,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.AvailablePhoneNumberCountryInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountryList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountryList.php
index 7694300..74128c9 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountryList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountryList.php
@@ -2,40 +2,73 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class AvailablePhoneNumberCountryList extends ListResource
-{
+ {
/**
* Construct the AvailablePhoneNumberCountryList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid A 34 character string that uniquely identifies
- * this resource.
- * @return \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountryList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) requesting the available phone number Country resource.
*/
- public function __construct(Version $version, $accountSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/AvailablePhoneNumbers.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/AvailablePhoneNumbers.json';
+ /**
+ * Reads AvailablePhoneNumberCountryInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return AvailablePhoneNumberCountryInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
- * Streams AvailablePhoneNumberCountryInstance records from the API as a
- * generator stream.
+ * Streams AvailablePhoneNumberCountryInstance records from the API as a generator stream.
* This operation lazily loads records as efficiently as possible until the
* limit
* is reached.
@@ -50,9 +83,9 @@ public function __construct(Version $version, $accountSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -62,61 +95,40 @@ public function stream($limit = null, $pageSize = null)
}
/**
- * Reads AvailablePhoneNumberCountryInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return AvailablePhoneNumberCountryInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
- /**
- * Retrieve a single page of AvailablePhoneNumberCountryInstance records from
- * the API.
+ * Retrieve a single page of AvailablePhoneNumberCountryInstance records from the API.
* Request is executed immediately
*
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of AvailablePhoneNumberCountryInstance
+ * @return AvailablePhoneNumberCountryPage Page of AvailablePhoneNumberCountryInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): AvailablePhoneNumberCountryPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new AvailablePhoneNumberCountryPage($this->version, $response, $this->solution);
}
/**
- * Retrieve a specific page of AvailablePhoneNumberCountryInstance records from
- * the API.
+ * Retrieve a specific page of AvailablePhoneNumberCountryInstance records from the API.
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of AvailablePhoneNumberCountryInstance
+ * @return AvailablePhoneNumberCountryPage Page of AvailablePhoneNumberCountryInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): AvailablePhoneNumberCountryPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -126,14 +138,16 @@ public function getPage($targetUrl)
return new AvailablePhoneNumberCountryPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a AvailablePhoneNumberCountryContext
*
- * @param string $countryCode The ISO country code of the country to fetch
- * available phone number information about
- * @return \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountryContext
+ * @param string $countryCode The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country to fetch available phone number information about.
*/
- public function getContext($countryCode)
+ public function getContext(
+ string $countryCode
+
+ ): AvailablePhoneNumberCountryContext
{
return new AvailablePhoneNumberCountryContext(
$this->version,
@@ -147,8 +161,8 @@ public function getContext($countryCode)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.AvailablePhoneNumberCountryList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountryPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountryPage.php
index 702c1ff..e67104e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountryPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountryPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return AvailablePhoneNumberCountryInstance \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountryInstance
+ */
+ public function buildInstance(array $payload): AvailablePhoneNumberCountryInstance
{
- return new AvailablePhoneNumberCountryInstance(
- $this->version,
- $payload,
- $this->solution['accountSid']
- );
+ return new AvailablePhoneNumberCountryInstance($this->version, $payload, $this->solution['accountSid']);
}
/**
@@ -35,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.AvailablePhoneNumberCountryPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/BalanceInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/BalanceInstance.php
index 1e87693..d16e0d6 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/BalanceInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/BalanceInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account;
use Twilio\Exceptions\TwilioException;
@@ -14,33 +22,33 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * @property string $accountSid
- * @property string $balance
- * @property string $currency
+ * @property string|null $accountSid
+ * @property string|null $balance
+ * @property string|null $currency
*/
class BalanceInstance extends InstanceResource
{
/**
* Initialize the BalanceInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid Account Sid.
- * @return \Twilio\Rest\Api\V2010\Account\BalanceInstance
+ * @param string $accountSid The unique SID identifier of the Account.
*/
- public function __construct(Version $version, array $payload, $accountSid)
+ public function __construct(Version $version, array $payload, string $accountSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'balance' => Values::array_get($payload, 'balance'),
'currency' => Values::array_get($payload, 'currency'),
- );
+ ];
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = ['accountSid' => $accountSid, ];
}
/**
@@ -50,7 +58,7 @@ public function __construct(Version $version, array $payload, $accountSid)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -69,8 +77,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.BalanceInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/BalanceList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/BalanceList.php
index b195d3e..6a3473d 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/BalanceList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/BalanceList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account;
@@ -14,51 +21,59 @@
use Twilio\Values;
use Twilio\Version;
+
class BalanceList extends ListResource
-{
+ {
/**
* Construct the BalanceList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid Account Sid.
- * @return \Twilio\Rest\Api\V2010\Account\BalanceList
+ * @param string $accountSid The unique SID identifier of the Account.
*/
- public function __construct(Version $version, $accountSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ ];
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Balance.json';
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Balance.json';
}
/**
- * Fetch a BalanceInstance
+ * Fetch the BalanceInstance
*
* @return BalanceInstance Fetched BalanceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): BalanceInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
- return new BalanceInstance($this->version, $payload, $this->solution['accountSid']);
+ return new BalanceInstance(
+ $this->version,
+ $payload,
+ $this->solution['accountSid']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.BalanceList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/BalancePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/BalancePage.php
index 9b942f2..23e2b1d 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/BalancePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/BalancePage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return BalanceInstance \Twilio\Rest\Api\V2010\Account\BalanceInstance
+ */
+ public function buildInstance(array $payload): BalanceInstance
{
return new BalanceInstance($this->version, $payload, $this->solution['accountSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.BalancePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackContext.php
deleted file mode 100644
index f56dc09..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackContext.php
+++ /dev/null
@@ -1,144 +0,0 @@
-solution = array('accountSid' => $accountSid, 'callSid' => $callSid,);
-
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/' . \rawurlencode($callSid) . '/Feedback.json';
- }
-
- /**
- * Create a new FeedbackInstance
- *
- * @param int $qualityScore The call quality expressed as an integer from 1 to 5
- * @param array|Options $options Optional Arguments
- * @return FeedbackInstance Newly created FeedbackInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($qualityScore, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'QualityScore' => $qualityScore,
- 'Issue' => Serialize::map($options['issue'], function ($e) {
- return $e;
- }),
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new FeedbackInstance(
- $this->version,
- $payload,
- $this->solution['accountSid'],
- $this->solution['callSid']
- );
- }
-
- /**
- * Fetch a FeedbackInstance
- *
- * @return FeedbackInstance Fetched FeedbackInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new FeedbackInstance(
- $this->version,
- $payload,
- $this->solution['accountSid'],
- $this->solution['callSid']
- );
- }
-
- /**
- * Update the FeedbackInstance
- *
- * @param int $qualityScore The call quality expressed as an integer from 1 to 5
- * @param array|Options $options Optional Arguments
- * @return FeedbackInstance Updated FeedbackInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($qualityScore, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'QualityScore' => $qualityScore,
- 'Issue' => Serialize::map($options['issue'], function ($e) {
- return $e;
- }),
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new FeedbackInstance(
- $this->version,
- $payload,
- $this->solution['accountSid'],
- $this->solution['callSid']
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Api.V2010.FeedbackContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackInstance.php
deleted file mode 100644
index 7e7afc1..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackInstance.php
+++ /dev/null
@@ -1,146 +0,0 @@
-properties = array(
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- 'issues' => Values::array_get($payload, 'issues'),
- 'qualityScore' => Values::array_get($payload, 'quality_score'),
- 'sid' => Values::array_get($payload, 'sid'),
- );
-
- $this->solution = array('accountSid' => $accountSid, 'callSid' => $callSid,);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Api\V2010\Account\Call\FeedbackContext Context for this
- * FeedbackInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new FeedbackContext(
- $this->version,
- $this->solution['accountSid'],
- $this->solution['callSid']
- );
- }
-
- return $this->context;
- }
-
- /**
- * Create a new FeedbackInstance
- *
- * @param int $qualityScore The call quality expressed as an integer from 1 to 5
- * @param array|Options $options Optional Arguments
- * @return FeedbackInstance Newly created FeedbackInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($qualityScore, $options = array())
- {
- return $this->proxy()->create($qualityScore, $options);
- }
-
- /**
- * Fetch a FeedbackInstance
- *
- * @return FeedbackInstance Fetched FeedbackInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Update the FeedbackInstance
- *
- * @param int $qualityScore The call quality expressed as an integer from 1 to 5
- * @param array|Options $options Optional Arguments
- * @return FeedbackInstance Updated FeedbackInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($qualityScore, $options = array())
- {
- return $this->proxy()->update($qualityScore, $options);
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Api.V2010.FeedbackInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackList.php
deleted file mode 100644
index 5818661..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackList.php
+++ /dev/null
@@ -1,56 +0,0 @@
-solution = array('accountSid' => $accountSid, 'callSid' => $callSid,);
- }
-
- /**
- * Constructs a FeedbackContext
- *
- * @return \Twilio\Rest\Api\V2010\Account\Call\FeedbackContext
- */
- public function getContext()
- {
- return new FeedbackContext(
- $this->version,
- $this->solution['accountSid'],
- $this->solution['callSid']
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Api.V2010.FeedbackList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackOptions.php
deleted file mode 100644
index 0cbe0f4..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackOptions.php
+++ /dev/null
@@ -1,112 +0,0 @@
-options['issue'] = $issue;
- }
-
- /**
- * A list of one or more issues experienced during the call. Issues can be: `imperfect-audio`, `dropped-call`, `incorrect-caller-id`, `post-dial-delay`, `digits-not-captured`, `audio-latency`, `unsolicited-call`, or `one-way-audio`.
- *
- * @param string $issue Issues experienced during the call
- * @return $this Fluent Builder
- */
- public function setIssue($issue)
- {
- $this->options['issue'] = $issue;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.CreateFeedbackOptions ' . \implode(' ', $options) . ']';
- }
-}
-
-class UpdateFeedbackOptions extends Options
-{
- /**
- * @param string $issue Issues experienced during the call
- */
- public function __construct($issue = Values::NONE)
- {
- $this->options['issue'] = $issue;
- }
-
- /**
- * One or more issues experienced during the call. The issues can be: `imperfect-audio`, `dropped-call`, `incorrect-caller-id`, `post-dial-delay`, `digits-not-captured`, `audio-latency`, `unsolicited-call`, or `one-way-audio`.
- *
- * @param string $issue Issues experienced during the call
- * @return $this Fluent Builder
- */
- public function setIssue($issue)
- {
- $this->options['issue'] = $issue;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.UpdateFeedbackOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackPage.php
deleted file mode 100644
index 28e0d3e..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackPage.php
+++ /dev/null
@@ -1,43 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new FeedbackInstance(
- $this->version,
- $payload,
- $this->solution['accountSid'],
- $this->solution['callSid']
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Api.V2010.FeedbackPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackSummaryContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackSummaryContext.php
deleted file mode 100644
index 03eb725..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackSummaryContext.php
+++ /dev/null
@@ -1,86 +0,0 @@
-solution = array('accountSid' => $accountSid, 'sid' => $sid,);
-
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/FeedbackSummary/' . \rawurlencode($sid) . '.json';
- }
-
- /**
- * Fetch a FeedbackSummaryInstance
- *
- * @return FeedbackSummaryInstance Fetched FeedbackSummaryInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new FeedbackSummaryInstance(
- $this->version,
- $payload,
- $this->solution['accountSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Deletes the FeedbackSummaryInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Api.V2010.FeedbackSummaryContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackSummaryInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackSummaryInstance.php
deleted file mode 100644
index e51e4c3..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackSummaryInstance.php
+++ /dev/null
@@ -1,148 +0,0 @@
-properties = array(
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'callCount' => Values::array_get($payload, 'call_count'),
- 'callFeedbackCount' => Values::array_get($payload, 'call_feedback_count'),
- 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- 'endDate' => Deserialize::dateTime(Values::array_get($payload, 'end_date')),
- 'includeSubaccounts' => Values::array_get($payload, 'include_subaccounts'),
- 'issues' => Values::array_get($payload, 'issues'),
- 'qualityScoreAverage' => Values::array_get($payload, 'quality_score_average'),
- 'qualityScoreMedian' => Values::array_get($payload, 'quality_score_median'),
- 'qualityScoreStandardDeviation' => Values::array_get($payload, 'quality_score_standard_deviation'),
- 'sid' => Values::array_get($payload, 'sid'),
- 'startDate' => Deserialize::dateTime(Values::array_get($payload, 'start_date')),
- 'status' => Values::array_get($payload, 'status'),
- );
-
- $this->solution = array('accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'],);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Api\V2010\Account\Call\FeedbackSummaryContext Context
- * for this
- * FeedbackSummaryInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new FeedbackSummaryContext(
- $this->version,
- $this->solution['accountSid'],
- $this->solution['sid']
- );
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a FeedbackSummaryInstance
- *
- * @return FeedbackSummaryInstance Fetched FeedbackSummaryInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Deletes the FeedbackSummaryInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->proxy()->delete();
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Api.V2010.FeedbackSummaryInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackSummaryList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackSummaryList.php
deleted file mode 100644
index abb0598..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackSummaryList.php
+++ /dev/null
@@ -1,90 +0,0 @@
-solution = array('accountSid' => $accountSid,);
-
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/FeedbackSummary.json';
- }
-
- /**
- * Create a new FeedbackSummaryInstance
- *
- * @param \DateTime $startDate Only include feedback given on or after this date
- * @param \DateTime $endDate Only include feedback given on or before this date
- * @param array|Options $options Optional Arguments
- * @return FeedbackSummaryInstance Newly created FeedbackSummaryInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($startDate, $endDate, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'StartDate' => Serialize::iso8601Date($startDate),
- 'EndDate' => Serialize::iso8601Date($endDate),
- 'IncludeSubaccounts' => Serialize::booleanToString($options['includeSubaccounts']),
- 'StatusCallback' => $options['statusCallback'],
- 'StatusCallbackMethod' => $options['statusCallbackMethod'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new FeedbackSummaryInstance($this->version, $payload, $this->solution['accountSid']);
- }
-
- /**
- * Constructs a FeedbackSummaryContext
- *
- * @param string $sid A string that uniquely identifies this feedback summary
- * resource
- * @return \Twilio\Rest\Api\V2010\Account\Call\FeedbackSummaryContext
- */
- public function getContext($sid)
- {
- return new FeedbackSummaryContext($this->version, $this->solution['accountSid'], $sid);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Api.V2010.FeedbackSummaryList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackSummaryOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackSummaryOptions.php
deleted file mode 100644
index c57300b..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackSummaryOptions.php
+++ /dev/null
@@ -1,103 +0,0 @@
-options['includeSubaccounts'] = $includeSubaccounts;
- $this->options['statusCallback'] = $statusCallback;
- $this->options['statusCallbackMethod'] = $statusCallbackMethod;
- }
-
- /**
- * Whether to also include Feedback resources from all subaccounts. `true` includes feedback from all subaccounts and `false`, the default, includes feedback from only the specified account.
- *
- * @param bool $includeSubaccounts `true` includes feedback from the specified
- * account and its subaccounts
- * @return $this Fluent Builder
- */
- public function setIncludeSubaccounts($includeSubaccounts)
- {
- $this->options['includeSubaccounts'] = $includeSubaccounts;
- return $this;
- }
-
- /**
- * The URL that we will request when the feedback summary is complete.
- *
- * @param string $statusCallback The URL that we will request when the feedback
- * summary is complete
- * @return $this Fluent Builder
- */
- public function setStatusCallback($statusCallback)
- {
- $this->options['statusCallback'] = $statusCallback;
- return $this;
- }
-
- /**
- * The HTTP method (`GET` or `POST`) we use to make the request to the `StatusCallback` URL.
- *
- * @param string $statusCallbackMethod The HTTP method we use to make requests
- * to the StatusCallback URL
- * @return $this Fluent Builder
- */
- public function setStatusCallbackMethod($statusCallbackMethod)
- {
- $this->options['statusCallbackMethod'] = $statusCallbackMethod;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.CreateFeedbackSummaryOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackSummaryPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackSummaryPage.php
deleted file mode 100644
index 85e009c..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/FeedbackSummaryPage.php
+++ /dev/null
@@ -1,38 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new FeedbackSummaryInstance($this->version, $payload, $this->solution['accountSid']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Api.V2010.FeedbackSummaryPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/NotificationContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/NotificationContext.php
index 27f73c8..a651336 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/NotificationContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/NotificationContext.php
@@ -2,55 +2,72 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Call;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class NotificationContext extends InstanceContext
-{
+ {
/**
* Initialize the NotificationContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * to fetch
- * @param string $callSid The Call SID of the resource to fetch
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\Call\NotificationContext
+ * @param Version $version Version that contains the resource
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Call Notification resource to fetch.
+ * @param string $callSid The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the Call Notification resource to fetch.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Call Notification resource to fetch.
*/
- public function __construct(Version $version, $accountSid, $callSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $accountSid,
+ $callSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'callSid' => $callSid, 'sid' => $sid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+ 'callSid' =>
+ $callSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/' . \rawurlencode($callSid) . '/Notifications/' . \rawurlencode($sid) . '.json';
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Calls/' . \rawurlencode($callSid)
+ .'/Notifications/' . \rawurlencode($sid)
+ .'.json';
}
/**
- * Fetch a NotificationInstance
+ * Fetch the NotificationInstance
*
* @return NotificationInstance Fetched NotificationInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): NotificationInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new NotificationInstance(
$this->version,
@@ -61,17 +78,18 @@ public function fetch()
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.NotificationContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/NotificationInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/NotificationInstance.php
index 4111c0e..ddbf0f7 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/NotificationInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/NotificationInstance.php
@@ -2,56 +2,64 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Call;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property string $apiVersion
- * @property string $callSid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $errorCode
- * @property string $log
- * @property \DateTime $messageDate
- * @property string $messageText
- * @property string $moreInfo
- * @property string $requestMethod
- * @property string $requestUrl
- * @property string $requestVariables
- * @property string $responseBody
- * @property string $responseHeaders
- * @property string $sid
- * @property string $uri
+ * @property string|null $accountSid
+ * @property string|null $apiVersion
+ * @property string|null $callSid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $errorCode
+ * @property string|null $log
+ * @property \DateTime|null $messageDate
+ * @property string|null $messageText
+ * @property string|null $moreInfo
+ * @property string|null $requestMethod
+ * @property string|null $requestUrl
+ * @property string|null $requestVariables
+ * @property string|null $responseBody
+ * @property string|null $responseHeaders
+ * @property string|null $sid
+ * @property string|null $uri
*/
class NotificationInstance extends InstanceResource
{
/**
* Initialize the NotificationInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $callSid The SID of the Call the resource is associated with
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\Call\NotificationInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Call Notification resource to fetch.
+ * @param string $callSid The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the Call Notification resource to fetch.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Call Notification resource to fetch.
*/
- public function __construct(Version $version, array $payload, $accountSid, $callSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $accountSid, string $callSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'apiVersion' => Values::array_get($payload, 'api_version'),
'callSid' => Values::array_get($payload, 'call_sid'),
@@ -69,24 +77,18 @@ public function __construct(Version $version, array $payload, $accountSid, $call
'responseHeaders' => Values::array_get($payload, 'response_headers'),
'sid' => Values::array_get($payload, 'sid'),
'uri' => Values::array_get($payload, 'uri'),
- );
+ ];
- $this->solution = array(
- 'accountSid' => $accountSid,
- 'callSid' => $callSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['accountSid' => $accountSid, 'callSid' => $callSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Api\V2010\Account\Call\NotificationContext Context for
- * this
- * NotificationInstance
+ * @return NotificationContext Context for this NotificationInstance
*/
- protected function proxy()
+ protected function proxy(): NotificationContext
{
if (!$this->context) {
$this->context = new NotificationContext(
@@ -101,13 +103,14 @@ protected function proxy()
}
/**
- * Fetch a NotificationInstance
+ * Fetch the NotificationInstance
*
* @return NotificationInstance Fetched NotificationInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): NotificationInstance
{
+
return $this->proxy()->fetch();
}
@@ -118,7 +121,7 @@ public function fetch()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -137,12 +140,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.NotificationInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/NotificationList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/NotificationList.php
index 0babd33..9cb02b8 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/NotificationList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/NotificationList.php
@@ -2,37 +2,78 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\Call;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class NotificationList extends ListResource
-{
+ {
/**
* Construct the NotificationList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $callSid The SID of the Call the resource is associated with
- * @return \Twilio\Rest\Api\V2010\Account\Call\NotificationList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Call Notification resource to fetch.
+ * @param string $callSid The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the Call Notification resource to fetch.
*/
- public function __construct(Version $version, $accountSid, $callSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid,
+ string $callSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'callSid' => $callSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ 'callSid' =>
+ $callSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Calls/' . \rawurlencode($callSid)
+ .'/Notifications.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/' . \rawurlencode($callSid) . '/Notifications.json';
+ /**
+ * Reads NotificationInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return NotificationInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -52,9 +93,9 @@ public function __construct(Version $version, $accountSid, $callSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -63,55 +104,39 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads NotificationInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return NotificationInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of NotificationInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of NotificationInstance
+ * @return NotificationPage Page of NotificationInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): NotificationPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Log' => $options['log'],
- 'MessageDate<' => Serialize::iso8601Date($options['messageDateBefore']),
- 'MessageDate' => Serialize::iso8601Date($options['messageDate']),
- 'MessageDate>' => Serialize::iso8601Date($options['messageDateAfter']),
+
+ $params = Values::of([
+ 'Log' =>
+ $options['log'],
+ 'MessageDate<' =>
+ Serialize::iso8601Date($options['messageDateBefore']),
+ 'MessageDate' =>
+ Serialize::iso8601Date($options['messageDate']),
+ 'MessageDate>' =>
+ Serialize::iso8601Date($options['messageDateAfter']),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new NotificationPage($this->version, $response, $this->solution);
}
@@ -121,9 +146,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of NotificationInstance
+ * @return NotificationPage Page of NotificationInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): NotificationPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -133,13 +158,16 @@ public function getPage($targetUrl)
return new NotificationPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a NotificationContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\Call\NotificationContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the Call Notification resource to fetch.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): NotificationContext
{
return new NotificationContext(
$this->version,
@@ -154,8 +182,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.NotificationList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/NotificationOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/NotificationOptions.php
index 82c059f..5b873e8 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/NotificationOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/NotificationOptions.php
@@ -1,10 +1,16 @@
=YYYY-MM-DD` for messages logged at or after midnight on a date.
+ * @param string $messageDate Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date.
+ * @param string $messageDateAfter Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date.
* @return ReadNotificationOptions Options builder
*/
- public static function read($log = Values::NONE, $messageDateBefore = Values::NONE, $messageDate = Values::NONE, $messageDateAfter = Values::NONE)
+ public static function read(
+
+ int $log = Values::INT_NONE,
+ string $messageDateBefore = null,
+ string $messageDate = null,
+ string $messageDateAfter = null
+
+ ): ReadNotificationOptions
{
- return new ReadNotificationOptions($log, $messageDateBefore, $messageDate, $messageDateAfter);
+ return new ReadNotificationOptions(
+ $log,
+ $messageDateBefore,
+ $messageDate,
+ $messageDateAfter
+ );
}
+
}
+
class ReadNotificationOptions extends Options
-{
+ {
/**
- * @param int $log Filter by log level
- * @param string $messageDateBefore Filter by date
- * @param string $messageDate Filter by date
- * @param string $messageDateAfter Filter by date
+ * @param int $log Only read notifications of the specified log level. Can be: `0` to read only ERROR notifications or `1` to read only WARNING notifications. By default, all notifications are read.
+ * @param string $messageDateBefore Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date.
+ * @param string $messageDate Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date.
+ * @param string $messageDateAfter Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date.
*/
- public function __construct($log = Values::NONE, $messageDateBefore = Values::NONE, $messageDate = Values::NONE, $messageDateAfter = Values::NONE)
- {
+ public function __construct(
+
+ int $log = Values::INT_NONE,
+ string $messageDateBefore = null,
+ string $messageDate = null,
+ string $messageDateAfter = null
+
+ ) {
$this->options['log'] = $log;
$this->options['messageDateBefore'] = $messageDateBefore;
$this->options['messageDate'] = $messageDate;
@@ -46,10 +73,10 @@ public function __construct($log = Values::NONE, $messageDateBefore = Values::NO
/**
* Only read notifications of the specified log level. Can be: `0` to read only ERROR notifications or `1` to read only WARNING notifications. By default, all notifications are read.
*
- * @param int $log Filter by log level
+ * @param int $log Only read notifications of the specified log level. Can be: `0` to read only ERROR notifications or `1` to read only WARNING notifications. By default, all notifications are read.
* @return $this Fluent Builder
*/
- public function setLog($log)
+ public function setLog(int $log): self
{
$this->options['log'] = $log;
return $this;
@@ -58,10 +85,10 @@ public function setLog($log)
/**
* Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date.
*
- * @param string $messageDateBefore Filter by date
+ * @param string $messageDateBefore Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date.
* @return $this Fluent Builder
*/
- public function setMessageDateBefore($messageDateBefore)
+ public function setMessageDateBefore(string $messageDateBefore): self
{
$this->options['messageDateBefore'] = $messageDateBefore;
return $this;
@@ -70,10 +97,10 @@ public function setMessageDateBefore($messageDateBefore)
/**
* Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date.
*
- * @param string $messageDate Filter by date
+ * @param string $messageDate Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date.
* @return $this Fluent Builder
*/
- public function setMessageDate($messageDate)
+ public function setMessageDate(string $messageDate): self
{
$this->options['messageDate'] = $messageDate;
return $this;
@@ -82,10 +109,10 @@ public function setMessageDate($messageDate)
/**
* Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date.
*
- * @param string $messageDateAfter Filter by date
+ * @param string $messageDateAfter Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date.
* @return $this Fluent Builder
*/
- public function setMessageDateAfter($messageDateAfter)
+ public function setMessageDateAfter(string $messageDateAfter): self
{
$this->options['messageDateAfter'] = $messageDateAfter;
return $this;
@@ -96,14 +123,10 @@ public function setMessageDateAfter($messageDateAfter)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.ReadNotificationOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.ReadNotificationOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/NotificationPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/NotificationPage.php
index 776db45..96183d1 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/NotificationPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/NotificationPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return NotificationInstance \Twilio\Rest\Api\V2010\Account\Call\NotificationInstance
+ */
+ public function buildInstance(array $payload): NotificationInstance
{
- return new NotificationInstance(
- $this->version,
- $payload,
- $this->solution['accountSid'],
- $this->solution['callSid']
- );
+ return new NotificationInstance($this->version, $payload, $this->solution['accountSid'], $this->solution['callSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.NotificationPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/PaymentContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/PaymentContext.php
index 4d853d1..7c319e2 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/PaymentContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/PaymentContext.php
@@ -2,73 +2,89 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Call;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
class PaymentContext extends InstanceContext
-{
+ {
/**
* Initialize the PaymentContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that will update the
- * resource
- * @param string $callSid The SID of the call that will create the resource.
- * @param string $sid The SID of Payments session
- * @return \Twilio\Rest\Api\V2010\Account\Call\PaymentContext
+ * @param Version $version Version that contains the resource
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
+ * @param string $callSid The SID of the call that will create the resource. Call leg associated with this sid is expected to provide payment information thru DTMF.
+ * @param string $sid The SID of Payments session that needs to be updated.
*/
- public function __construct(Version $version, $accountSid, $callSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $accountSid,
+ $callSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'callSid' => $callSid, 'sid' => $sid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+ 'callSid' =>
+ $callSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/' . \rawurlencode($callSid) . '/Payments/' . \rawurlencode($sid) . '.json';
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Calls/' . \rawurlencode($callSid)
+ .'/Payments/' . \rawurlencode($sid)
+ .'.json';
}
/**
* Update the PaymentInstance
*
- * @param string $idempotencyKey A unique token for each payment session that
- * should be provided to maintain idempotency of
- * the session.
- * @param string $statusCallback The URL we should call to send status of
- * payment session.
+ * @param string $idempotencyKey A unique token that will be used to ensure that multiple API calls with the same information do not result in multiple transactions. This should be a unique string value per API call and can be a randomly generated.
+ * @param string $statusCallback Provide an absolute or relative URL to receive status updates regarding your Pay session. Read more about the [Update](https://www.twilio.com/docs/voice/api/payment-resource#statuscallback-update) and [Complete/Cancel](https://www.twilio.com/docs/voice/api/payment-resource#statuscallback-cancelcomplete) POST requests.
* @param array|Options $options Optional Arguments
* @return PaymentInstance Updated PaymentInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($idempotencyKey, $statusCallback, $options = array())
+ public function update(string $idempotencyKey, string $statusCallback, array $options = []): PaymentInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'IdempotencyKey' => $idempotencyKey,
- 'StatusCallback' => $statusCallback,
- 'Capture' => $options['capture'],
- 'Status' => $options['status'],
- ));
+ $data = Values::of([
+ 'IdempotencyKey' =>
+ $idempotencyKey,
+ 'StatusCallback' =>
+ $statusCallback,
+ 'Capture' =>
+ $options['capture'],
+ 'Status' =>
+ $options['status'],
+ ]);
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new PaymentInstance(
$this->version,
@@ -79,17 +95,18 @@ public function update($idempotencyKey, $statusCallback, $options = array())
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.PaymentContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/PaymentInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/PaymentInstance.php
index d594a9b..5d0c00e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/PaymentInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/PaymentInstance.php
@@ -2,72 +2,72 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Call;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property string $accountSid
- * @property string $callSid
- * @property string $sid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $uri
+ * @property string|null $accountSid
+ * @property string|null $callSid
+ * @property string|null $sid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $uri
*/
class PaymentInstance extends InstanceResource
{
/**
* Initialize the PaymentInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The SID of the Account that created the Payments
- * resource.
- * @param string $callSid The SID of the Call the resource is associated with.
- * @param string $sid The SID of Payments session
- * @return \Twilio\Rest\Api\V2010\Account\Call\PaymentInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
+ * @param string $callSid The SID of the call that will create the resource. Call leg associated with this sid is expected to provide payment information thru DTMF.
+ * @param string $sid The SID of Payments session that needs to be updated.
*/
- public function __construct(Version $version, array $payload, $accountSid, $callSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $accountSid, string $callSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'callSid' => Values::array_get($payload, 'call_sid'),
'sid' => Values::array_get($payload, 'sid'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'uri' => Values::array_get($payload, 'uri'),
- );
+ ];
- $this->solution = array(
- 'accountSid' => $accountSid,
- 'callSid' => $callSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['accountSid' => $accountSid, 'callSid' => $callSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Api\V2010\Account\Call\PaymentContext Context for this
- * PaymentInstance
+ * @return PaymentContext Context for this PaymentInstance
*/
- protected function proxy()
+ protected function proxy(): PaymentContext
{
if (!$this->context) {
$this->context = new PaymentContext(
@@ -84,17 +84,15 @@ protected function proxy()
/**
* Update the PaymentInstance
*
- * @param string $idempotencyKey A unique token for each payment session that
- * should be provided to maintain idempotency of
- * the session.
- * @param string $statusCallback The URL we should call to send status of
- * payment session.
+ * @param string $idempotencyKey A unique token that will be used to ensure that multiple API calls with the same information do not result in multiple transactions. This should be a unique string value per API call and can be a randomly generated.
+ * @param string $statusCallback Provide an absolute or relative URL to receive status updates regarding your Pay session. Read more about the [Update](https://www.twilio.com/docs/voice/api/payment-resource#statuscallback-update) and [Complete/Cancel](https://www.twilio.com/docs/voice/api/payment-resource#statuscallback-cancelcomplete) POST requests.
* @param array|Options $options Optional Arguments
* @return PaymentInstance Updated PaymentInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($idempotencyKey, $statusCallback, $options = array())
+ public function update(string $idempotencyKey, string $statusCallback, array $options = []): PaymentInstance
{
+
return $this->proxy()->update($idempotencyKey, $statusCallback, $options);
}
@@ -105,7 +103,7 @@ public function update($idempotencyKey, $statusCallback, $options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -124,12 +122,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.PaymentInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/PaymentList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/PaymentList.php
index 424078d..3d0aeb7 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/PaymentList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/PaymentList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\Call;
@@ -12,75 +19,93 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
class PaymentList extends ListResource
-{
+ {
/**
* Construct the PaymentList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the Payments
- * resource.
- * @param string $callSid The SID of the Call the resource is associated with.
- * @return \Twilio\Rest\Api\V2010\Account\Call\PaymentList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
+ * @param string $callSid The SID of the call that will create the resource. Call leg associated with this sid is expected to provide payment information thru DTMF.
*/
- public function __construct(Version $version, $accountSid, $callSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid,
+ string $callSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'callSid' => $callSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ 'callSid' =>
+ $callSid,
+
+ ];
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/' . \rawurlencode($callSid) . '/Payments.json';
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Calls/' . \rawurlencode($callSid)
+ .'/Payments.json';
}
/**
- * Create a new PaymentInstance
+ * Create the PaymentInstance
*
- * @param string $idempotencyKey A unique token for each payment session that
- * should be provided to maintain idempotency of
- * the session.
- * @param string $statusCallback The URL we should call to send status of
- * payment session.
+ * @param string $idempotencyKey A unique token that will be used to ensure that multiple API calls with the same information do not result in multiple transactions. This should be a unique string value per API call and can be a randomly generated.
+ * @param string $statusCallback Provide an absolute or relative URL to receive status updates regarding your Pay session. Read more about the [expected StatusCallback values](https://www.twilio.com/docs/voice/api/payment-resource#statuscallback)
* @param array|Options $options Optional Arguments
- * @return PaymentInstance Newly created PaymentInstance
+ * @return PaymentInstance Created PaymentInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($idempotencyKey, $statusCallback, $options = array())
+ public function create(string $idempotencyKey, string $statusCallback, array $options = []): PaymentInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'IdempotencyKey' => $idempotencyKey,
- 'StatusCallback' => $statusCallback,
- 'BankAccountType' => $options['bankAccountType'],
- 'ChargeAmount' => $options['chargeAmount'],
- 'Currency' => $options['currency'],
- 'Description' => $options['description'],
- 'Input' => $options['input'],
- 'MinPostalCodeLength' => $options['minPostalCodeLength'],
- 'Parameter' => Serialize::jsonObject($options['parameter']),
- 'PaymentConnector' => $options['paymentConnector'],
- 'PaymentMethod' => $options['paymentMethod'],
- 'PostalCode' => Serialize::booleanToString($options['postalCode']),
- 'SecurityCode' => Serialize::booleanToString($options['securityCode']),
- 'Timeout' => $options['timeout'],
- 'TokenType' => $options['tokenType'],
- 'ValidCardTypes' => $options['validCardTypes'],
- ));
+ $data = Values::of([
+ 'IdempotencyKey' =>
+ $idempotencyKey,
+ 'StatusCallback' =>
+ $statusCallback,
+ 'BankAccountType' =>
+ $options['bankAccountType'],
+ 'ChargeAmount' =>
+ $options['chargeAmount'],
+ 'Currency' =>
+ $options['currency'],
+ 'Description' =>
+ $options['description'],
+ 'Input' =>
+ $options['input'],
+ 'MinPostalCodeLength' =>
+ $options['minPostalCodeLength'],
+ 'Parameter' =>
+ Serialize::jsonObject($options['parameter']),
+ 'PaymentConnector' =>
+ $options['paymentConnector'],
+ 'PaymentMethod' =>
+ $options['paymentMethod'],
+ 'PostalCode' =>
+ Serialize::booleanToString($options['postalCode']),
+ 'SecurityCode' =>
+ Serialize::booleanToString($options['securityCode']),
+ 'Timeout' =>
+ $options['timeout'],
+ 'TokenType' =>
+ $options['tokenType'],
+ 'ValidCardTypes' =>
+ $options['validCardTypes'],
+ ]);
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
return new PaymentInstance(
$this->version,
@@ -90,13 +115,16 @@ public function create($idempotencyKey, $statusCallback, $options = array())
);
}
+
/**
* Constructs a PaymentContext
*
- * @param string $sid The SID of Payments session
- * @return \Twilio\Rest\Api\V2010\Account\Call\PaymentContext
+ * @param string $sid The SID of Payments session that needs to be updated.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): PaymentContext
{
return new PaymentContext(
$this->version,
@@ -111,8 +139,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.PaymentList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/PaymentOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/PaymentOptions.php
index 6808c49..93279b5 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/PaymentOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/PaymentOptions.php
@@ -1,10 +1,16 @@
Connector. [Read more](https://www.twilio.com/console/voice/pay-connectors).
+ * @param string $paymentConnector This is the unique name corresponding to the Pay Connector installed in the Twilio Add-ons. Learn more about [ Connectors](https://www.twilio.com/console/voice/pay-connectors). The default value is `Default`.
+ * @param string $paymentMethod
+ * @param bool $postalCode Indicates whether the credit card postal code (zip code) is a required piece of payment information that must be provided by the caller. The default is `true`.
+ * @param bool $securityCode Indicates whether the credit card security code is a required piece of payment information that must be provided by the caller. The default is `true`.
+ * @param int $timeout The number of seconds that should wait for the caller to press a digit between each subsequent digit, after the first one, before moving on to validate the digits captured. The default is `5`, maximum is `600`.
+ * @param string $tokenType
+ * @param string $validCardTypes Credit card types separated by space that Pay should accept. The default value is `visa mastercard amex`
* @return CreatePaymentOptions Options builder
*/
- public static function create($bankAccountType = Values::NONE, $chargeAmount = Values::NONE, $currency = Values::NONE, $description = Values::NONE, $input = Values::NONE, $minPostalCodeLength = Values::NONE, $parameter = Values::NONE, $paymentConnector = Values::NONE, $paymentMethod = Values::NONE, $postalCode = Values::NONE, $securityCode = Values::NONE, $timeout = Values::NONE, $tokenType = Values::NONE, $validCardTypes = Values::NONE)
+ public static function create(
+
+ string $bankAccountType = Values::NONE,
+ string $chargeAmount = Values::NONE,
+ string $currency = Values::NONE,
+ string $description = Values::NONE,
+ string $input = Values::NONE,
+ int $minPostalCodeLength = Values::INT_NONE,
+ array $parameter = Values::ARRAY_NONE,
+ string $paymentConnector = Values::NONE,
+ string $paymentMethod = Values::NONE,
+ bool $postalCode = Values::BOOL_NONE,
+ bool $securityCode = Values::BOOL_NONE,
+ int $timeout = Values::INT_NONE,
+ string $tokenType = Values::NONE,
+ string $validCardTypes = Values::NONE
+
+ ): CreatePaymentOptions
{
- return new CreatePaymentOptions($bankAccountType, $chargeAmount, $currency, $description, $input, $minPostalCodeLength, $parameter, $paymentConnector, $paymentMethod, $postalCode, $securityCode, $timeout, $tokenType, $validCardTypes);
+ return new CreatePaymentOptions(
+ $bankAccountType,
+ $chargeAmount,
+ $currency,
+ $description,
+ $input,
+ $minPostalCodeLength,
+ $parameter,
+ $paymentConnector,
+ $paymentMethod,
+ $postalCode,
+ $securityCode,
+ $timeout,
+ $tokenType,
+ $validCardTypes
+ );
}
/**
- * @param string $capture Specific payment source information to expect.
- * @param string $status Instruction to complete or cancel the transaction.
+ * @param string $capture
+ * @param string $status
* @return UpdatePaymentOptions Options builder
*/
- public static function update($capture = Values::NONE, $status = Values::NONE)
+ public static function update(
+
+ string $capture = Values::NONE,
+ string $status = Values::NONE
+
+ ): UpdatePaymentOptions
{
- return new UpdatePaymentOptions($capture, $status);
+ return new UpdatePaymentOptions(
+ $capture,
+ $status
+ );
}
+
}
class CreatePaymentOptions extends Options
-{
+ {
/**
- * @param string $bankAccountType If Payment source is ACH, type of bank
- * account.
- * @param string $chargeAmount If this field is present and greater than `0.0`
- * payment source will be charged.
- * @param string $currency Currency `charge_amount` is in.
- * @param string $description Decription of the charge.
- * @param string $input Kind of medium customer would enter payment source
- * information in.
- * @param int $minPostalCodeLength If postal code is expected, minimum length
- * of the postal code.
- * @param array $parameter Additonal data to be sent over to payment provider.
- * @param string $paymentConnector Payment connector that you would like Twilio
- * to use for processing payments.
- * @param string $paymentMethod Payment source type.
- * @param bool $postalCode Whether to expect postal code during payment source
- * data gathering.
- * @param bool $securityCode Whether to expect security code during payment
- * source data gathering.
- * @param int $timeout The number of seconds that we should allow customer to
- * enter payment information
- * @param string $tokenType If tokenization of payment source is desired, this
- * represents type of token.
- * @param string $validCardTypes List of card types accepted with each card
- * types separated by space.
+ * @param string $bankAccountType
+ * @param string $chargeAmount A positive decimal value less than 1,000,000 to charge against the credit card or bank account. Default currency can be overwritten with `currency` field. Leave blank or set to 0 to tokenize.
+ * @param string $currency The currency of the `charge_amount`, formatted as [ISO 4127](http://www.iso.org/iso/home/standards/currency_codes.htm) format. The default value is `USD` and all values allowed from the Pay Connector are accepted.
+ * @param string $description The description can be used to provide more details regarding the transaction. This information is submitted along with the payment details to the Payment Connector which are then posted on the transactions.
+ * @param string $input A list of inputs that should be accepted. Currently only `dtmf` is supported. All digits captured during a pay session are redacted from the logs.
+ * @param int $minPostalCodeLength A positive integer that is used to validate the length of the `PostalCode` inputted by the user. User must enter this many digits.
+ * @param array $parameter A single-level JSON object used to pass custom parameters to payment processors. (Required for ACH payments). The information that has to be included here depends on the Connector. [Read more](https://www.twilio.com/console/voice/pay-connectors).
+ * @param string $paymentConnector This is the unique name corresponding to the Pay Connector installed in the Twilio Add-ons. Learn more about [ Connectors](https://www.twilio.com/console/voice/pay-connectors). The default value is `Default`.
+ * @param string $paymentMethod
+ * @param bool $postalCode Indicates whether the credit card postal code (zip code) is a required piece of payment information that must be provided by the caller. The default is `true`.
+ * @param bool $securityCode Indicates whether the credit card security code is a required piece of payment information that must be provided by the caller. The default is `true`.
+ * @param int $timeout The number of seconds that should wait for the caller to press a digit between each subsequent digit, after the first one, before moving on to validate the digits captured. The default is `5`, maximum is `600`.
+ * @param string $tokenType
+ * @param string $validCardTypes Credit card types separated by space that Pay should accept. The default value is `visa mastercard amex`
*/
- public function __construct($bankAccountType = Values::NONE, $chargeAmount = Values::NONE, $currency = Values::NONE, $description = Values::NONE, $input = Values::NONE, $minPostalCodeLength = Values::NONE, $parameter = Values::NONE, $paymentConnector = Values::NONE, $paymentMethod = Values::NONE, $postalCode = Values::NONE, $securityCode = Values::NONE, $timeout = Values::NONE, $tokenType = Values::NONE, $validCardTypes = Values::NONE)
- {
+ public function __construct(
+
+ string $bankAccountType = Values::NONE,
+ string $chargeAmount = Values::NONE,
+ string $currency = Values::NONE,
+ string $description = Values::NONE,
+ string $input = Values::NONE,
+ int $minPostalCodeLength = Values::INT_NONE,
+ array $parameter = Values::ARRAY_NONE,
+ string $paymentConnector = Values::NONE,
+ string $paymentMethod = Values::NONE,
+ bool $postalCode = Values::BOOL_NONE,
+ bool $securityCode = Values::BOOL_NONE,
+ int $timeout = Values::INT_NONE,
+ string $tokenType = Values::NONE,
+ string $validCardTypes = Values::NONE
+
+ ) {
$this->options['bankAccountType'] = $bankAccountType;
$this->options['chargeAmount'] = $chargeAmount;
$this->options['currency'] = $currency;
@@ -107,178 +147,162 @@ public function __construct($bankAccountType = Values::NONE, $chargeAmount = Val
}
/**
- * If Payment source is ACH, type of bank account. Can be: `consumer-checking`, `consumer-savings`, `commercial-checking`. The default value is `consumer-checking`.
- *
- * @param string $bankAccountType If Payment source is ACH, type of bank
- * account.
+ * @param string $bankAccountType
* @return $this Fluent Builder
*/
- public function setBankAccountType($bankAccountType)
+ public function setBankAccountType(string $bankAccountType): self
{
$this->options['bankAccountType'] = $bankAccountType;
return $this;
}
/**
- * If this field is present and greater than `0.0` payment source will be charged. Otherwise payment source will be tokenized.
+ * A positive decimal value less than 1,000,000 to charge against the credit card or bank account. Default currency can be overwritten with `currency` field. Leave blank or set to 0 to tokenize.
*
- * @param string $chargeAmount If this field is present and greater than `0.0`
- * payment source will be charged.
+ * @param string $chargeAmount A positive decimal value less than 1,000,000 to charge against the credit card or bank account. Default currency can be overwritten with `currency` field. Leave blank or set to 0 to tokenize.
* @return $this Fluent Builder
*/
- public function setChargeAmount($chargeAmount)
+ public function setChargeAmount(string $chargeAmount): self
{
$this->options['chargeAmount'] = $chargeAmount;
return $this;
}
/**
- * Currency `charge_amount` is in. It's format should be as specified in [ISO 4127](http://www.iso.org/iso/home/standards/currency_codes.htm) format. The default value is `USD`.
+ * The currency of the `charge_amount`, formatted as [ISO 4127](http://www.iso.org/iso/home/standards/currency_codes.htm) format. The default value is `USD` and all values allowed from the Pay Connector are accepted.
*
- * @param string $currency Currency `charge_amount` is in.
+ * @param string $currency The currency of the `charge_amount`, formatted as [ISO 4127](http://www.iso.org/iso/home/standards/currency_codes.htm) format. The default value is `USD` and all values allowed from the Pay Connector are accepted.
* @return $this Fluent Builder
*/
- public function setCurrency($currency)
+ public function setCurrency(string $currency): self
{
$this->options['currency'] = $currency;
return $this;
}
/**
- * Decription of the charge.
+ * The description can be used to provide more details regarding the transaction. This information is submitted along with the payment details to the Payment Connector which are then posted on the transactions.
*
- * @param string $description Decription of the charge.
+ * @param string $description The description can be used to provide more details regarding the transaction. This information is submitted along with the payment details to the Payment Connector which are then posted on the transactions.
* @return $this Fluent Builder
*/
- public function setDescription($description)
+ public function setDescription(string $description): self
{
$this->options['description'] = $description;
return $this;
}
/**
- * Kind of medium customer would enter payment source information in. Currently only 'DTMF' is supported, which means customer would use keypad of their phone to enter card number etc.
+ * A list of inputs that should be accepted. Currently only `dtmf` is supported. All digits captured during a pay session are redacted from the logs.
*
- * @param string $input Kind of medium customer would enter payment source
- * information in.
+ * @param string $input A list of inputs that should be accepted. Currently only `dtmf` is supported. All digits captured during a pay session are redacted from the logs.
* @return $this Fluent Builder
*/
- public function setInput($input)
+ public function setInput(string $input): self
{
$this->options['input'] = $input;
return $this;
}
/**
- * If postal code is expected, minimum length of the postal code. When user enters postal code, this value will be used to validate.
+ * A positive integer that is used to validate the length of the `PostalCode` inputted by the user. User must enter this many digits.
*
- * @param int $minPostalCodeLength If postal code is expected, minimum length
- * of the postal code.
+ * @param int $minPostalCodeLength A positive integer that is used to validate the length of the `PostalCode` inputted by the user. User must enter this many digits.
* @return $this Fluent Builder
*/
- public function setMinPostalCodeLength($minPostalCodeLength)
+ public function setMinPostalCodeLength(int $minPostalCodeLength): self
{
$this->options['minPostalCodeLength'] = $minPostalCodeLength;
return $this;
}
/**
- * Additonal data to be sent over to payment provider. It has to be a JSON string with only one level object. This parameter can be used to send information such as customer name, phone number etc. Refer to specific payment provider's documentation in Twilio console for supported names/values/format.
+ * A single-level JSON object used to pass custom parameters to payment processors. (Required for ACH payments). The information that has to be included here depends on the Connector. [Read more](https://www.twilio.com/console/voice/pay-connectors).
*
- * @param array $parameter Additonal data to be sent over to payment provider.
+ * @param array $parameter A single-level JSON object used to pass custom parameters to payment processors. (Required for ACH payments). The information that has to be included here depends on the Connector. [Read more](https://www.twilio.com/console/voice/pay-connectors).
* @return $this Fluent Builder
*/
- public function setParameter($parameter)
+ public function setParameter(array $parameter): self
{
$this->options['parameter'] = $parameter;
return $this;
}
/**
- * Payment connector that you would like Twilio to use for processing payments. The default value is `Default`, which means you need to have at least one payment connector configured in Twilio with name 'Default'. If not you must provide connector configuration name here.
+ * This is the unique name corresponding to the Pay Connector installed in the Twilio Add-ons. Learn more about [ Connectors](https://www.twilio.com/console/voice/pay-connectors). The default value is `Default`.
*
- * @param string $paymentConnector Payment connector that you would like Twilio
- * to use for processing payments.
+ * @param string $paymentConnector This is the unique name corresponding to the Pay Connector installed in the Twilio Add-ons. Learn more about [ Connectors](https://www.twilio.com/console/voice/pay-connectors). The default value is `Default`.
* @return $this Fluent Builder
*/
- public function setPaymentConnector($paymentConnector)
+ public function setPaymentConnector(string $paymentConnector): self
{
$this->options['paymentConnector'] = $paymentConnector;
return $this;
}
/**
- * Payment source type. Can be: `credit-card`, `ach-debit`. The default value is `credit-card`.
- *
- * @param string $paymentMethod Payment source type.
+ * @param string $paymentMethod
* @return $this Fluent Builder
*/
- public function setPaymentMethod($paymentMethod)
+ public function setPaymentMethod(string $paymentMethod): self
{
$this->options['paymentMethod'] = $paymentMethod;
return $this;
}
/**
- * Whether to expect postal code during payment source data gathering. Can be: `true`, `false`. The default value is `true`.
+ * Indicates whether the credit card postal code (zip code) is a required piece of payment information that must be provided by the caller. The default is `true`.
*
- * @param bool $postalCode Whether to expect postal code during payment source
- * data gathering.
+ * @param bool $postalCode Indicates whether the credit card postal code (zip code) is a required piece of payment information that must be provided by the caller. The default is `true`.
* @return $this Fluent Builder
*/
- public function setPostalCode($postalCode)
+ public function setPostalCode(bool $postalCode): self
{
$this->options['postalCode'] = $postalCode;
return $this;
}
/**
- * Whether to expect security code during payment source data gathering. Can be: `true`, `false`. The default value is `true`.
+ * Indicates whether the credit card security code is a required piece of payment information that must be provided by the caller. The default is `true`.
*
- * @param bool $securityCode Whether to expect security code during payment
- * source data gathering.
+ * @param bool $securityCode Indicates whether the credit card security code is a required piece of payment information that must be provided by the caller. The default is `true`.
* @return $this Fluent Builder
*/
- public function setSecurityCode($securityCode)
+ public function setSecurityCode(bool $securityCode): self
{
$this->options['securityCode'] = $securityCode;
return $this;
}
/**
- * The number of seconds that we should allow customer to enter payment information. Can be an integer between `5` and `600`, inclusive. The default value is `5`.
+ * The number of seconds that should wait for the caller to press a digit between each subsequent digit, after the first one, before moving on to validate the digits captured. The default is `5`, maximum is `600`.
*
- * @param int $timeout The number of seconds that we should allow customer to
- * enter payment information
+ * @param int $timeout The number of seconds that should wait for the caller to press a digit between each subsequent digit, after the first one, before moving on to validate the digits captured. The default is `5`, maximum is `600`.
* @return $this Fluent Builder
*/
- public function setTimeout($timeout)
+ public function setTimeout(int $timeout): self
{
$this->options['timeout'] = $timeout;
return $this;
}
/**
- * If tokenization of payment source is desired, this represents type of token. Can be: `one-time`, `reusable`. The default value is `reusable`.
- *
- * @param string $tokenType If tokenization of payment source is desired, this
- * represents type of token.
+ * @param string $tokenType
* @return $this Fluent Builder
*/
- public function setTokenType($tokenType)
+ public function setTokenType(string $tokenType): self
{
$this->options['tokenType'] = $tokenType;
return $this;
}
/**
- * List of card types accepted with each card types separated by space. Can be: `visa`,`nmastercard`,`amex`,`maestro`,`discover`,`optima`,`jcb`,`diners-club`,`enroute`. The default value is `visa mastercard amex`.
+ * Credit card types separated by space that Pay should accept. The default value is `visa mastercard amex`
*
- * @param string $validCardTypes List of card types accepted with each card
- * types separated by space.
+ * @param string $validCardTypes Credit card types separated by space that Pay should accept. The default value is `visa mastercard amex`
* @return $this Fluent Builder
*/
- public function setValidCardTypes($validCardTypes)
+ public function setValidCardTypes(string $validCardTypes): self
{
$this->options['validCardTypes'] = $validCardTypes;
return $this;
@@ -289,49 +313,44 @@ public function setValidCardTypes($validCardTypes)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.CreatePaymentOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.CreatePaymentOptions ' . $options . ']';
}
}
class UpdatePaymentOptions extends Options
-{
+ {
/**
- * @param string $capture Specific payment source information to expect.
- * @param string $status Instruction to complete or cancel the transaction.
+ * @param string $capture
+ * @param string $status
*/
- public function __construct($capture = Values::NONE, $status = Values::NONE)
- {
+ public function __construct(
+
+ string $capture = Values::NONE,
+ string $status = Values::NONE
+
+ ) {
$this->options['capture'] = $capture;
$this->options['status'] = $status;
}
/**
- * Specific payment source information to expect. Can be: `payment-card-number`,`expiration-date`,`security-code`,`postal-code`,`bank-routing-number`,`bank-account-number`.
- *
- * @param string $capture Specific payment source information to expect.
+ * @param string $capture
* @return $this Fluent Builder
*/
- public function setCapture($capture)
+ public function setCapture(string $capture): self
{
$this->options['capture'] = $capture;
return $this;
}
/**
- * Instruction to complete or cancel the transaction. Can be: `complete`, `cancel.`
- *
- * @param string $status Instruction to complete or cancel the transaction.
+ * @param string $status
* @return $this Fluent Builder
*/
- public function setStatus($status)
+ public function setStatus(string $status): self
{
$this->options['status'] = $status;
return $this;
@@ -342,14 +361,10 @@ public function setStatus($status)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.UpdatePaymentOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.UpdatePaymentOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/PaymentPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/PaymentPage.php
index a779538..3c7f0a2 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/PaymentPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/PaymentPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return PaymentInstance \Twilio\Rest\Api\V2010\Account\Call\PaymentInstance
+ */
+ public function buildInstance(array $payload): PaymentInstance
{
- return new PaymentInstance(
- $this->version,
- $payload,
- $this->solution['accountSid'],
- $this->solution['callSid']
- );
+ return new PaymentInstance($this->version, $payload, $this->solution['accountSid'], $this->solution['callSid']);
}
/**
@@ -39,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.PaymentPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/RecordingContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/RecordingContext.php
index 50b4de1..b1df68c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/RecordingContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/RecordingContext.php
@@ -2,61 +2,87 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Call;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class RecordingContext extends InstanceContext
-{
+ {
/**
* Initialize the RecordingContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * to fetch
- * @param string $callSid The Call SID of the resource to fetch
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\Call\RecordingContext
+ * @param Version $version Version that contains the resource
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
+ * @param string $callSid The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) to associate the resource with.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Recording resource to delete.
*/
- public function __construct(Version $version, $accountSid, $callSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $accountSid,
+ $callSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'callSid' => $callSid, 'sid' => $sid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+ 'callSid' =>
+ $callSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/' . \rawurlencode($callSid) . '/Recordings/' . \rawurlencode($sid) . '.json';
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Calls/' . \rawurlencode($callSid)
+ .'/Recordings/' . \rawurlencode($sid)
+ .'.json';
}
/**
- * Update the RecordingInstance
+ * Delete the RecordingInstance
*
- * @param string $status The new status of the recording
- * @param array|Options $options Optional Arguments
- * @return RecordingInstance Updated RecordingInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($status, $options = array())
+ public function delete(): bool
{
- $options = new Values($options);
- $data = Values::of(array('Status' => $status, 'PauseBehavior' => $options['pauseBehavior'],));
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
+ }
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+
+ /**
+ * Fetch the RecordingInstance
+ *
+ * @return RecordingInstance Fetched RecordingInstance
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function fetch(): RecordingInstance
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new RecordingInstance(
$this->version,
@@ -67,21 +93,29 @@ public function update($status, $options = array())
);
}
+
/**
- * Fetch a RecordingInstance
+ * Update the RecordingInstance
*
- * @return RecordingInstance Fetched RecordingInstance
+ * @param string $status
+ * @param array|Options $options Optional Arguments
+ * @return RecordingInstance Updated RecordingInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function update(string $status, array $options = []): RecordingInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $options = new Values($options);
+
+ $data = Values::of([
+ 'Status' =>
+ $status,
+ 'PauseBehavior' =>
+ $options['pauseBehavior'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new RecordingInstance(
$this->version,
@@ -92,28 +126,18 @@ public function fetch()
);
}
- /**
- * Deletes the RecordingInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.RecordingContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/RecordingInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/RecordingInstance.php
index 82c386f..64c8440 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/RecordingInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/RecordingInstance.php
@@ -2,57 +2,66 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Call;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property string $apiVersion
- * @property string $callSid
- * @property string $conferenceSid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property \DateTime $startTime
- * @property string $duration
- * @property string $sid
- * @property string $price
- * @property string $uri
- * @property array $encryptionDetails
- * @property string $priceUnit
+ * @property string|null $accountSid
+ * @property string|null $apiVersion
+ * @property string|null $callSid
+ * @property string|null $conferenceSid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property \DateTime|null $startTime
+ * @property string|null $duration
+ * @property string|null $sid
+ * @property string|null $price
+ * @property string|null $uri
+ * @property array|null $encryptionDetails
+ * @property string|null $priceUnit
* @property string $status
* @property int $channels
* @property string $source
- * @property int $errorCode
+ * @property int|null $errorCode
+ * @property string|null $track
*/
class RecordingInstance extends InstanceResource
{
/**
* Initialize the RecordingInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $callSid The SID of the Call the resource is associated with
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\Call\RecordingInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
+ * @param string $callSid The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) to associate the resource with.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Recording resource to delete.
*/
- public function __construct(Version $version, array $payload, $accountSid, $callSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $accountSid, string $callSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'apiVersion' => Values::array_get($payload, 'api_version'),
'callSid' => Values::array_get($payload, 'call_sid'),
@@ -70,24 +79,19 @@ public function __construct(Version $version, array $payload, $accountSid, $call
'channels' => Values::array_get($payload, 'channels'),
'source' => Values::array_get($payload, 'source'),
'errorCode' => Values::array_get($payload, 'error_code'),
- );
+ 'track' => Values::array_get($payload, 'track'),
+ ];
- $this->solution = array(
- 'accountSid' => $accountSid,
- 'callSid' => $callSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['accountSid' => $accountSid, 'callSid' => $callSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Api\V2010\Account\Call\RecordingContext Context for
- * this
- * RecordingInstance
+ * @return RecordingContext Context for this RecordingInstance
*/
- protected function proxy()
+ protected function proxy(): RecordingContext
{
if (!$this->context) {
$this->context = new RecordingContext(
@@ -102,38 +106,41 @@ protected function proxy()
}
/**
- * Update the RecordingInstance
+ * Delete the RecordingInstance
*
- * @param string $status The new status of the recording
- * @param array|Options $options Optional Arguments
- * @return RecordingInstance Updated RecordingInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($status, $options = array())
+ public function delete(): bool
{
- return $this->proxy()->update($status, $options);
+
+ return $this->proxy()->delete();
}
/**
- * Fetch a RecordingInstance
+ * Fetch the RecordingInstance
*
* @return RecordingInstance Fetched RecordingInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): RecordingInstance
{
+
return $this->proxy()->fetch();
}
/**
- * Deletes the RecordingInstance
+ * Update the RecordingInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param string $status
+ * @param array|Options $options Optional Arguments
+ * @return RecordingInstance Updated RecordingInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(string $status, array $options = []): RecordingInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->update($status, $options);
}
/**
@@ -143,7 +150,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -162,12 +169,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.RecordingInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/RecordingList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/RecordingList.php
index af3ab61..f4b93c3 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/RecordingList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/RecordingList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\Call;
@@ -12,57 +19,72 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class RecordingList extends ListResource
-{
+ {
/**
* Construct the RecordingList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $callSid The SID of the Call the resource is associated with
- * @return \Twilio\Rest\Api\V2010\Account\Call\RecordingList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
+ * @param string $callSid The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) to associate the resource with.
*/
- public function __construct(Version $version, $accountSid, $callSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid,
+ string $callSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'callSid' => $callSid,);
-
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/' . \rawurlencode($callSid) . '/Recordings.json';
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ 'callSid' =>
+ $callSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Calls/' . \rawurlencode($callSid)
+ .'/Recordings.json';
}
/**
- * Create a new RecordingInstance
+ * Create the RecordingInstance
*
* @param array|Options $options Optional Arguments
- * @return RecordingInstance Newly created RecordingInstance
+ * @return RecordingInstance Created RecordingInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($options = array())
+ public function create(array $options = []): RecordingInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'RecordingStatusCallbackEvent' => Serialize::map($options['recordingStatusCallbackEvent'], function ($e) {
- return $e;
- }),
- 'RecordingStatusCallback' => $options['recordingStatusCallback'],
- 'RecordingStatusCallbackMethod' => $options['recordingStatusCallbackMethod'],
- 'Trim' => $options['trim'],
- 'RecordingChannels' => $options['recordingChannels'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'RecordingStatusCallbackEvent' =>
+ Serialize::map($options['recordingStatusCallbackEvent'], function ($e) { return $e; }),
+ 'RecordingStatusCallback' =>
+ $options['recordingStatusCallback'],
+ 'RecordingStatusCallbackMethod' =>
+ $options['recordingStatusCallbackMethod'],
+ 'Trim' =>
+ $options['trim'],
+ 'RecordingChannels' =>
+ $options['recordingChannels'],
+ 'RecordingTrack' =>
+ $options['recordingTrack'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
return new RecordingInstance(
$this->version,
@@ -72,82 +94,87 @@ public function create($options = array())
);
}
+
/**
- * Streams RecordingInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Reads RecordingInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
+ * @param int $limit Upper limit for the number of records to return. read()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
+ * page_size is defined but a limit is defined, read()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return RecordingInstance[] Array of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($options, $limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
- * Reads RecordingInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
+ * Streams RecordingInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
+ * @param int $limit Upper limit for the number of records to return. stream()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
+ * page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return RecordingInstance[] Array of results
+ * @return Stream stream of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
/**
* Retrieve a single page of RecordingInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of RecordingInstance
+ * @return RecordingPage Page of RecordingInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): RecordingPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'DateCreated<' => Serialize::iso8601Date($options['dateCreatedBefore']),
- 'DateCreated' => Serialize::iso8601Date($options['dateCreated']),
- 'DateCreated>' => Serialize::iso8601Date($options['dateCreatedAfter']),
+
+ $params = Values::of([
+ 'DateCreated<' =>
+ Serialize::iso8601Date($options['dateCreatedBefore']),
+ 'DateCreated' =>
+ Serialize::iso8601Date($options['dateCreated']),
+ 'DateCreated>' =>
+ Serialize::iso8601Date($options['dateCreatedAfter']),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new RecordingPage($this->version, $response, $this->solution);
}
@@ -157,9 +184,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of RecordingInstance
+ * @return RecordingPage Page of RecordingInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): RecordingPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -169,13 +196,16 @@ public function getPage($targetUrl)
return new RecordingPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a RecordingContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\Call\RecordingContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the Recording resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): RecordingContext
{
return new RecordingContext(
$this->version,
@@ -190,8 +220,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.RecordingList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/RecordingOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/RecordingOptions.php
index 9b14e0f..3977278 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/RecordingOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/RecordingOptions.php
@@ -1,10 +1,16 @@
=YYYY-MM-DD` returns recordings generated at or after midnight on a date.
+ * @param string $dateCreated The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date.
+ * @param string $dateCreatedAfter The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date.
+ * @return ReadRecordingOptions Options builder
*/
- public static function update($pauseBehavior = Values::NONE)
+ public static function read(
+
+ string $dateCreatedBefore = null,
+ string $dateCreated = null,
+ string $dateCreatedAfter = null
+
+ ): ReadRecordingOptions
{
- return new UpdateRecordingOptions($pauseBehavior);
+ return new ReadRecordingOptions(
+ $dateCreatedBefore,
+ $dateCreated,
+ $dateCreatedAfter
+ );
}
/**
- * @param string $dateCreatedBefore The `YYYY-MM-DD` value of the resources to
- * read
- * @param string $dateCreated The `YYYY-MM-DD` value of the resources to read
- * @param string $dateCreatedAfter The `YYYY-MM-DD` value of the resources to
- * read
- * @return ReadRecordingOptions Options builder
+ * @param string $pauseBehavior Whether to record during a pause. Can be: `skip` or `silence` and the default is `silence`. `skip` does not record during the pause period, while `silence` will replace the actual audio of the call with silence during the pause period. This parameter only applies when setting `status` is set to `paused`.
+ * @return UpdateRecordingOptions Options builder
*/
- public static function read($dateCreatedBefore = Values::NONE, $dateCreated = Values::NONE, $dateCreatedAfter = Values::NONE)
+ public static function update(
+
+ string $pauseBehavior = Values::NONE
+
+ ): UpdateRecordingOptions
{
- return new ReadRecordingOptions($dateCreatedBefore, $dateCreated, $dateCreatedAfter);
+ return new UpdateRecordingOptions(
+ $pauseBehavior
+ );
}
+
}
class CreateRecordingOptions extends Options
-{
+ {
/**
- * @param string $recordingStatusCallbackEvent The recording status changes
- * that should generate a callback
- * @param string $recordingStatusCallback The callback URL on each selected
- * recording event
- * @param string $recordingStatusCallbackMethod The HTTP method we should use
- * to call
- * `recording_status_callback`
- * @param string $trim Whether to trim the silence in the recording
- * @param string $recordingChannels The number of channels that the output
- * recording will be configured with
+ * @param string[] $recordingStatusCallbackEvent The recording status events on which we should call the `recording_status_callback` URL. Can be: `in-progress`, `completed` and `absent` and the default is `completed`. Separate multiple event values with a space.
+ * @param string $recordingStatusCallback The URL we should call using the `recording_status_callback_method` on each recording event specified in `recording_status_callback_event`. For more information, see [RecordingStatusCallback parameters](https://www.twilio.com/docs/voice/api/recording#recordingstatuscallback).
+ * @param string $recordingStatusCallbackMethod The HTTP method we should use to call `recording_status_callback`. Can be: `GET` or `POST` and the default is `POST`.
+ * @param string $trim Whether to trim any leading and trailing silence in the recording. Can be: `trim-silence` or `do-not-trim` and the default is `do-not-trim`. `trim-silence` trims the silence from the beginning and end of the recording and `do-not-trim` does not.
+ * @param string $recordingChannels The number of channels used in the recording. Can be: `mono` or `dual` and the default is `mono`. `mono` records all parties of the call into one channel. `dual` records each party of a 2-party call into separate channels.
+ * @param string $recordingTrack The audio track to record for the call. Can be: `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the audio that is received by Twilio. `outbound` records the audio that is generated from Twilio. `both` records the audio that is received and generated by Twilio.
*/
- public function __construct($recordingStatusCallbackEvent = Values::NONE, $recordingStatusCallback = Values::NONE, $recordingStatusCallbackMethod = Values::NONE, $trim = Values::NONE, $recordingChannels = Values::NONE)
- {
+ public function __construct(
+
+ array $recordingStatusCallbackEvent = Values::ARRAY_NONE,
+ string $recordingStatusCallback = Values::NONE,
+ string $recordingStatusCallbackMethod = Values::NONE,
+ string $trim = Values::NONE,
+ string $recordingChannels = Values::NONE,
+ string $recordingTrack = Values::NONE
+
+ ) {
$this->options['recordingStatusCallbackEvent'] = $recordingStatusCallbackEvent;
$this->options['recordingStatusCallback'] = $recordingStatusCallback;
$this->options['recordingStatusCallbackMethod'] = $recordingStatusCallbackMethod;
$this->options['trim'] = $trim;
$this->options['recordingChannels'] = $recordingChannels;
+ $this->options['recordingTrack'] = $recordingTrack;
}
/**
* The recording status events on which we should call the `recording_status_callback` URL. Can be: `in-progress`, `completed` and `absent` and the default is `completed`. Separate multiple event values with a space.
*
- * @param string $recordingStatusCallbackEvent The recording status changes
- * that should generate a callback
+ * @param string[] $recordingStatusCallbackEvent The recording status events on which we should call the `recording_status_callback` URL. Can be: `in-progress`, `completed` and `absent` and the default is `completed`. Separate multiple event values with a space.
* @return $this Fluent Builder
*/
- public function setRecordingStatusCallbackEvent($recordingStatusCallbackEvent)
+ public function setRecordingStatusCallbackEvent(array $recordingStatusCallbackEvent): self
{
$this->options['recordingStatusCallbackEvent'] = $recordingStatusCallbackEvent;
return $this;
@@ -95,11 +133,10 @@ public function setRecordingStatusCallbackEvent($recordingStatusCallbackEvent)
/**
* The URL we should call using the `recording_status_callback_method` on each recording event specified in `recording_status_callback_event`. For more information, see [RecordingStatusCallback parameters](https://www.twilio.com/docs/voice/api/recording#recordingstatuscallback).
*
- * @param string $recordingStatusCallback The callback URL on each selected
- * recording event
+ * @param string $recordingStatusCallback The URL we should call using the `recording_status_callback_method` on each recording event specified in `recording_status_callback_event`. For more information, see [RecordingStatusCallback parameters](https://www.twilio.com/docs/voice/api/recording#recordingstatuscallback).
* @return $this Fluent Builder
*/
- public function setRecordingStatusCallback($recordingStatusCallback)
+ public function setRecordingStatusCallback(string $recordingStatusCallback): self
{
$this->options['recordingStatusCallback'] = $recordingStatusCallback;
return $this;
@@ -108,12 +145,10 @@ public function setRecordingStatusCallback($recordingStatusCallback)
/**
* The HTTP method we should use to call `recording_status_callback`. Can be: `GET` or `POST` and the default is `POST`.
*
- * @param string $recordingStatusCallbackMethod The HTTP method we should use
- * to call
- * `recording_status_callback`
+ * @param string $recordingStatusCallbackMethod The HTTP method we should use to call `recording_status_callback`. Can be: `GET` or `POST` and the default is `POST`.
* @return $this Fluent Builder
*/
- public function setRecordingStatusCallbackMethod($recordingStatusCallbackMethod)
+ public function setRecordingStatusCallbackMethod(string $recordingStatusCallbackMethod): self
{
$this->options['recordingStatusCallbackMethod'] = $recordingStatusCallbackMethod;
return $this;
@@ -122,10 +157,10 @@ public function setRecordingStatusCallbackMethod($recordingStatusCallbackMethod)
/**
* Whether to trim any leading and trailing silence in the recording. Can be: `trim-silence` or `do-not-trim` and the default is `do-not-trim`. `trim-silence` trims the silence from the beginning and end of the recording and `do-not-trim` does not.
*
- * @param string $trim Whether to trim the silence in the recording
+ * @param string $trim Whether to trim any leading and trailing silence in the recording. Can be: `trim-silence` or `do-not-trim` and the default is `do-not-trim`. `trim-silence` trims the silence from the beginning and end of the recording and `do-not-trim` does not.
* @return $this Fluent Builder
*/
- public function setTrim($trim)
+ public function setTrim(string $trim): self
{
$this->options['trim'] = $trim;
return $this;
@@ -134,54 +169,24 @@ public function setTrim($trim)
/**
* The number of channels used in the recording. Can be: `mono` or `dual` and the default is `mono`. `mono` records all parties of the call into one channel. `dual` records each party of a 2-party call into separate channels.
*
- * @param string $recordingChannels The number of channels that the output
- * recording will be configured with
+ * @param string $recordingChannels The number of channels used in the recording. Can be: `mono` or `dual` and the default is `mono`. `mono` records all parties of the call into one channel. `dual` records each party of a 2-party call into separate channels.
* @return $this Fluent Builder
*/
- public function setRecordingChannels($recordingChannels)
+ public function setRecordingChannels(string $recordingChannels): self
{
$this->options['recordingChannels'] = $recordingChannels;
return $this;
}
/**
- * Provide a friendly representation
+ * The audio track to record for the call. Can be: `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the audio that is received by Twilio. `outbound` records the audio that is generated from Twilio. `both` records the audio that is received and generated by Twilio.
*
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.CreateRecordingOptions ' . \implode(' ', $options) . ']';
- }
-}
-
-class UpdateRecordingOptions extends Options
-{
- /**
- * @param string $pauseBehavior Whether to record or not during the pause
- * period.
- */
- public function __construct($pauseBehavior = Values::NONE)
- {
- $this->options['pauseBehavior'] = $pauseBehavior;
- }
-
- /**
- * Whether to record during a pause. Can be: `skip` or `silence` and the default is `silence`. `skip` does not record during the pause period, while `silence` will replace the actual audio of the call with silence during the pause period. This parameter only applies when setting `status` is set to `paused`.
- *
- * @param string $pauseBehavior Whether to record or not during the pause
- * period.
+ * @param string $recordingTrack The audio track to record for the call. Can be: `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the audio that is received by Twilio. `outbound` records the audio that is generated from Twilio. `both` records the audio that is received and generated by Twilio.
* @return $this Fluent Builder
*/
- public function setPauseBehavior($pauseBehavior)
+ public function setRecordingTrack(string $recordingTrack): self
{
- $this->options['pauseBehavior'] = $pauseBehavior;
+ $this->options['recordingTrack'] = $recordingTrack;
return $this;
}
@@ -190,29 +195,29 @@ public function setPauseBehavior($pauseBehavior)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.UpdateRecordingOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.CreateRecordingOptions ' . $options . ']';
}
}
+
+
class ReadRecordingOptions extends Options
-{
+ {
/**
- * @param string $dateCreatedBefore The `YYYY-MM-DD` value of the resources to
- * read
- * @param string $dateCreated The `YYYY-MM-DD` value of the resources to read
- * @param string $dateCreatedAfter The `YYYY-MM-DD` value of the resources to
- * read
+ * @param string $dateCreatedBefore The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date.
+ * @param string $dateCreated The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date.
+ * @param string $dateCreatedAfter The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date.
*/
- public function __construct($dateCreatedBefore = Values::NONE, $dateCreated = Values::NONE, $dateCreatedAfter = Values::NONE)
- {
+ public function __construct(
+
+ string $dateCreatedBefore = null,
+ string $dateCreated = null,
+ string $dateCreatedAfter = null
+
+ ) {
$this->options['dateCreatedBefore'] = $dateCreatedBefore;
$this->options['dateCreated'] = $dateCreated;
$this->options['dateCreatedAfter'] = $dateCreatedAfter;
@@ -221,11 +226,10 @@ public function __construct($dateCreatedBefore = Values::NONE, $dateCreated = Va
/**
* The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date.
*
- * @param string $dateCreatedBefore The `YYYY-MM-DD` value of the resources to
- * read
+ * @param string $dateCreatedBefore The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date.
* @return $this Fluent Builder
*/
- public function setDateCreatedBefore($dateCreatedBefore)
+ public function setDateCreatedBefore(string $dateCreatedBefore): self
{
$this->options['dateCreatedBefore'] = $dateCreatedBefore;
return $this;
@@ -234,10 +238,10 @@ public function setDateCreatedBefore($dateCreatedBefore)
/**
* The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date.
*
- * @param string $dateCreated The `YYYY-MM-DD` value of the resources to read
+ * @param string $dateCreated The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date.
* @return $this Fluent Builder
*/
- public function setDateCreated($dateCreated)
+ public function setDateCreated(string $dateCreated): self
{
$this->options['dateCreated'] = $dateCreated;
return $this;
@@ -246,11 +250,10 @@ public function setDateCreated($dateCreated)
/**
* The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date.
*
- * @param string $dateCreatedAfter The `YYYY-MM-DD` value of the resources to
- * read
+ * @param string $dateCreatedAfter The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date.
* @return $this Fluent Builder
*/
- public function setDateCreatedAfter($dateCreatedAfter)
+ public function setDateCreatedAfter(string $dateCreatedAfter): self
{
$this->options['dateCreatedAfter'] = $dateCreatedAfter;
return $this;
@@ -261,14 +264,47 @@ public function setDateCreatedAfter($dateCreatedAfter)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
+ {
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.ReadRecordingOptions ' . $options . ']';
+ }
+}
+
+class UpdateRecordingOptions extends Options
+ {
+ /**
+ * @param string $pauseBehavior Whether to record during a pause. Can be: `skip` or `silence` and the default is `silence`. `skip` does not record during the pause period, while `silence` will replace the actual audio of the call with silence during the pause period. This parameter only applies when setting `status` is set to `paused`.
+ */
+ public function __construct(
+
+ string $pauseBehavior = Values::NONE
+
+ ) {
+ $this->options['pauseBehavior'] = $pauseBehavior;
+ }
+
+ /**
+ * Whether to record during a pause. Can be: `skip` or `silence` and the default is `silence`. `skip` does not record during the pause period, while `silence` will replace the actual audio of the call with silence during the pause period. This parameter only applies when setting `status` is set to `paused`.
+ *
+ * @param string $pauseBehavior Whether to record during a pause. Can be: `skip` or `silence` and the default is `silence`. `skip` does not record during the pause period, while `silence` will replace the actual audio of the call with silence during the pause period. This parameter only applies when setting `status` is set to `paused`.
+ * @return $this Fluent Builder
+ */
+ public function setPauseBehavior(string $pauseBehavior): self
+ {
+ $this->options['pauseBehavior'] = $pauseBehavior;
+ return $this;
+ }
+
+ /**
+ * Provide a friendly representation
+ *
+ * @return string Machine friendly representation
+ */
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.ReadRecordingOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.UpdateRecordingOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/RecordingPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/RecordingPage.php
index 2c121d7..178cfaa 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/RecordingPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Call/RecordingPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return RecordingInstance \Twilio\Rest\Api\V2010\Account\Call\RecordingInstance
+ */
+ public function buildInstance(array $payload): RecordingInstance
{
- return new RecordingInstance(
- $this->version,
- $payload,
- $this->solution['accountSid'],
- $this->solution['callSid']
- );
+ return new RecordingInstance($this->version, $payload, $this->solution['accountSid'], $this->solution['callSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.RecordingPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/CallContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/CallContext.php
index 96aa34b..f4c0d75 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/CallContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/CallContext.php
@@ -2,85 +2,120 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Api\V2010\Account\Call\FeedbackList;
-use Twilio\Rest\Api\V2010\Account\Call\NotificationList;
-use Twilio\Rest\Api\V2010\Account\Call\PaymentList;
-use Twilio\Rest\Api\V2010\Account\Call\RecordingList;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Api\V2010\Account\Call\TranscriptionList;
+use Twilio\Rest\Api\V2010\Account\Call\RecordingList;
+use Twilio\Rest\Api\V2010\Account\Call\UserDefinedMessageSubscriptionList;
+use Twilio\Rest\Api\V2010\Account\Call\EventList;
+use Twilio\Rest\Api\V2010\Account\Call\NotificationList;
+use Twilio\Rest\Api\V2010\Account\Call\UserDefinedMessageList;
+use Twilio\Rest\Api\V2010\Account\Call\SiprecList;
+use Twilio\Rest\Api\V2010\Account\Call\StreamList;
+use Twilio\Rest\Api\V2010\Account\Call\PaymentList;
+
/**
- * @property \Twilio\Rest\Api\V2010\Account\Call\RecordingList $recordings
- * @property \Twilio\Rest\Api\V2010\Account\Call\NotificationList $notifications
- * @property \Twilio\Rest\Api\V2010\Account\Call\FeedbackList $feedback
- * @property \Twilio\Rest\Api\V2010\Account\Call\PaymentList $payments
+ * @property TranscriptionList $transcriptions
+ * @property RecordingList $recordings
+ * @property UserDefinedMessageSubscriptionList $userDefinedMessageSubscriptions
+ * @property EventList $events
+ * @property NotificationList $notifications
+ * @property UserDefinedMessageList $userDefinedMessages
+ * @property SiprecList $siprec
+ * @property StreamList $streams
+ * @property PaymentList $payments
+ * @method \Twilio\Rest\Api\V2010\Account\Call\TranscriptionContext transcriptions(string $sid)
+ * @method \Twilio\Rest\Api\V2010\Account\Call\SiprecContext siprec(string $sid)
+ * @method \Twilio\Rest\Api\V2010\Account\Call\UserDefinedMessageSubscriptionContext userDefinedMessageSubscriptions(string $sid)
+ * @method \Twilio\Rest\Api\V2010\Account\Call\PaymentContext payments(string $sid)
* @method \Twilio\Rest\Api\V2010\Account\Call\RecordingContext recordings(string $sid)
* @method \Twilio\Rest\Api\V2010\Account\Call\NotificationContext notifications(string $sid)
- * @method \Twilio\Rest\Api\V2010\Account\Call\FeedbackContext feedback()
- * @method \Twilio\Rest\Api\V2010\Account\Call\PaymentContext payments(string $sid)
+ * @method \Twilio\Rest\Api\V2010\Account\Call\StreamContext streams(string $sid)
*/
class CallContext extends InstanceContext
-{
- protected $_recordings = null;
- protected $_notifications = null;
- protected $_feedback = null;
- protected $_payments = null;
+ {
+ protected $_transcriptions;
+ protected $_recordings;
+ protected $_userDefinedMessageSubscriptions;
+ protected $_events;
+ protected $_notifications;
+ protected $_userDefinedMessages;
+ protected $_siprec;
+ protected $_streams;
+ protected $_payments;
/**
* Initialize the CallContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the
- * resource(s) to fetch
- * @param string $sid The SID of the Call resource to fetch
- * @return \Twilio\Rest\Api\V2010\Account\CallContext
+ * @param Version $version Version that contains the resource
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
+ * @param string $sid The Twilio-provided Call SID that uniquely identifies the Call resource to delete
*/
- public function __construct(Version $version, $accountSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $accountSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'sid' => $sid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls/' . \rawurlencode($sid) . '.json';
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Calls/' . \rawurlencode($sid)
+ .'.json';
}
/**
- * Deletes the CallInstance
+ * Delete the CallInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function delete(): bool
{
- return $this->version->delete('delete', $this->uri);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a CallInstance
+ * Fetch the CallInstance
*
* @return CallInstance Fetched CallInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): CallInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new CallInstance(
$this->version,
@@ -90,6 +125,7 @@ public function fetch()
);
}
+
/**
* Update the CallInstance
*
@@ -97,27 +133,34 @@ public function fetch()
* @return CallInstance Updated CallInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): CallInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'Url' => $options['url'],
- 'Method' => $options['method'],
- 'Status' => $options['status'],
- 'FallbackUrl' => $options['fallbackUrl'],
- 'FallbackMethod' => $options['fallbackMethod'],
- 'StatusCallback' => $options['statusCallback'],
- 'StatusCallbackMethod' => $options['statusCallbackMethod'],
- 'Twiml' => $options['twiml'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'Url' =>
+ $options['url'],
+ 'Method' =>
+ $options['method'],
+ 'Status' =>
+ $options['status'],
+ 'FallbackUrl' =>
+ $options['fallbackUrl'],
+ 'FallbackMethod' =>
+ $options['fallbackMethod'],
+ 'StatusCallback' =>
+ $options['statusCallback'],
+ 'StatusCallbackMethod' =>
+ $options['statusCallbackMethod'],
+ 'Twiml' =>
+ $options['twiml'],
+ 'TimeLimit' =>
+ $options['timeLimit'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new CallInstance(
$this->version,
@@ -127,12 +170,27 @@ public function update($options = array())
);
}
+
+ /**
+ * Access the transcriptions
+ */
+ protected function getTranscriptions(): TranscriptionList
+ {
+ if (!$this->_transcriptions) {
+ $this->_transcriptions = new TranscriptionList(
+ $this->version,
+ $this->solution['accountSid'],
+ $this->solution['sid']
+ );
+ }
+
+ return $this->_transcriptions;
+ }
+
/**
* Access the recordings
- *
- * @return \Twilio\Rest\Api\V2010\Account\Call\RecordingList
*/
- protected function getRecordings()
+ protected function getRecordings(): RecordingList
{
if (!$this->_recordings) {
$this->_recordings = new RecordingList(
@@ -145,12 +203,42 @@ protected function getRecordings()
return $this->_recordings;
}
+ /**
+ * Access the userDefinedMessageSubscriptions
+ */
+ protected function getUserDefinedMessageSubscriptions(): UserDefinedMessageSubscriptionList
+ {
+ if (!$this->_userDefinedMessageSubscriptions) {
+ $this->_userDefinedMessageSubscriptions = new UserDefinedMessageSubscriptionList(
+ $this->version,
+ $this->solution['accountSid'],
+ $this->solution['sid']
+ );
+ }
+
+ return $this->_userDefinedMessageSubscriptions;
+ }
+
+ /**
+ * Access the events
+ */
+ protected function getEvents(): EventList
+ {
+ if (!$this->_events) {
+ $this->_events = new EventList(
+ $this->version,
+ $this->solution['accountSid'],
+ $this->solution['sid']
+ );
+ }
+
+ return $this->_events;
+ }
+
/**
* Access the notifications
- *
- * @return \Twilio\Rest\Api\V2010\Account\Call\NotificationList
*/
- protected function getNotifications()
+ protected function getNotifications(): NotificationList
{
if (!$this->_notifications) {
$this->_notifications = new NotificationList(
@@ -164,29 +252,57 @@ protected function getNotifications()
}
/**
- * Access the feedback
- *
- * @return \Twilio\Rest\Api\V2010\Account\Call\FeedbackList
+ * Access the userDefinedMessages
+ */
+ protected function getUserDefinedMessages(): UserDefinedMessageList
+ {
+ if (!$this->_userDefinedMessages) {
+ $this->_userDefinedMessages = new UserDefinedMessageList(
+ $this->version,
+ $this->solution['accountSid'],
+ $this->solution['sid']
+ );
+ }
+
+ return $this->_userDefinedMessages;
+ }
+
+ /**
+ * Access the siprec
+ */
+ protected function getSiprec(): SiprecList
+ {
+ if (!$this->_siprec) {
+ $this->_siprec = new SiprecList(
+ $this->version,
+ $this->solution['accountSid'],
+ $this->solution['sid']
+ );
+ }
+
+ return $this->_siprec;
+ }
+
+ /**
+ * Access the streams
*/
- protected function getFeedback()
+ protected function getStreams(): StreamList
{
- if (!$this->_feedback) {
- $this->_feedback = new FeedbackList(
+ if (!$this->_streams) {
+ $this->_streams = new StreamList(
$this->version,
$this->solution['accountSid'],
$this->solution['sid']
);
}
- return $this->_feedback;
+ return $this->_streams;
}
/**
* Access the payments
- *
- * @return \Twilio\Rest\Api\V2010\Account\Call\PaymentList
*/
- protected function getPayments()
+ protected function getPayments(): PaymentList
{
if (!$this->_payments) {
$this->_payments = new PaymentList(
@@ -203,10 +319,10 @@ protected function getPayments()
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -221,10 +337,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -239,12 +355,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.CallContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/CallInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/CallInstance.php
index c7d4db1..307b69c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/CallInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/CallInstance.php
@@ -2,107 +2,130 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Api\V2010\Account\Call\TranscriptionList;
+use Twilio\Rest\Api\V2010\Account\Call\RecordingList;
+use Twilio\Rest\Api\V2010\Account\Call\UserDefinedMessageSubscriptionList;
+use Twilio\Rest\Api\V2010\Account\Call\EventList;
+use Twilio\Rest\Api\V2010\Account\Call\NotificationList;
+use Twilio\Rest\Api\V2010\Account\Call\UserDefinedMessageList;
+use Twilio\Rest\Api\V2010\Account\Call\SiprecList;
+use Twilio\Rest\Api\V2010\Account\Call\StreamList;
+use Twilio\Rest\Api\V2010\Account\Call\PaymentList;
+
/**
- * @property string $accountSid
- * @property string $annotation
- * @property string $answeredBy
- * @property string $apiVersion
- * @property string $callerName
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $direction
- * @property string $duration
- * @property \DateTime $endTime
- * @property string $forwardedFrom
- * @property string $from
- * @property string $fromFormatted
- * @property string $groupSid
- * @property string $parentCallSid
- * @property string $phoneNumberSid
- * @property string $price
- * @property string $priceUnit
- * @property string $sid
- * @property \DateTime $startTime
+ * @property string|null $sid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $parentCallSid
+ * @property string|null $accountSid
+ * @property string|null $to
+ * @property string|null $toFormatted
+ * @property string|null $from
+ * @property string|null $fromFormatted
+ * @property string|null $phoneNumberSid
* @property string $status
- * @property array $subresourceUris
- * @property string $to
- * @property string $toFormatted
- * @property string $uri
+ * @property \DateTime|null $startTime
+ * @property \DateTime|null $endTime
+ * @property string|null $duration
+ * @property string|null $price
+ * @property string|null $priceUnit
+ * @property string|null $direction
+ * @property string|null $answeredBy
+ * @property string|null $apiVersion
+ * @property string|null $forwardedFrom
+ * @property string|null $groupSid
+ * @property string|null $callerName
+ * @property string|null $queueTime
+ * @property string|null $trunkSid
+ * @property string|null $uri
+ * @property array|null $subresourceUris
*/
class CallInstance extends InstanceResource
{
- protected $_recordings = null;
- protected $_notifications = null;
- protected $_feedback = null;
- protected $_payments = null;
+ protected $_transcriptions;
+ protected $_recordings;
+ protected $_userDefinedMessageSubscriptions;
+ protected $_events;
+ protected $_notifications;
+ protected $_userDefinedMessages;
+ protected $_siprec;
+ protected $_streams;
+ protected $_payments;
/**
* Initialize the CallInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The SID of the Account that created this resource
- * @param string $sid The SID of the Call resource to fetch
- * @return \Twilio\Rest\Api\V2010\Account\CallInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
+ * @param string $sid The Twilio-provided Call SID that uniquely identifies the Call resource to delete
*/
- public function __construct(Version $version, array $payload, $accountSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $accountSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'annotation' => Values::array_get($payload, 'annotation'),
- 'answeredBy' => Values::array_get($payload, 'answered_by'),
- 'apiVersion' => Values::array_get($payload, 'api_version'),
- 'callerName' => Values::array_get($payload, 'caller_name'),
+ $this->properties = [
+ 'sid' => Values::array_get($payload, 'sid'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- 'direction' => Values::array_get($payload, 'direction'),
- 'duration' => Values::array_get($payload, 'duration'),
- 'endTime' => Deserialize::dateTime(Values::array_get($payload, 'end_time')),
- 'forwardedFrom' => Values::array_get($payload, 'forwarded_from'),
+ 'parentCallSid' => Values::array_get($payload, 'parent_call_sid'),
+ 'accountSid' => Values::array_get($payload, 'account_sid'),
+ 'to' => Values::array_get($payload, 'to'),
+ 'toFormatted' => Values::array_get($payload, 'to_formatted'),
'from' => Values::array_get($payload, 'from'),
'fromFormatted' => Values::array_get($payload, 'from_formatted'),
- 'groupSid' => Values::array_get($payload, 'group_sid'),
- 'parentCallSid' => Values::array_get($payload, 'parent_call_sid'),
'phoneNumberSid' => Values::array_get($payload, 'phone_number_sid'),
+ 'status' => Values::array_get($payload, 'status'),
+ 'startTime' => Deserialize::dateTime(Values::array_get($payload, 'start_time')),
+ 'endTime' => Deserialize::dateTime(Values::array_get($payload, 'end_time')),
+ 'duration' => Values::array_get($payload, 'duration'),
'price' => Values::array_get($payload, 'price'),
'priceUnit' => Values::array_get($payload, 'price_unit'),
- 'sid' => Values::array_get($payload, 'sid'),
- 'startTime' => Deserialize::dateTime(Values::array_get($payload, 'start_time')),
- 'status' => Values::array_get($payload, 'status'),
- 'subresourceUris' => Values::array_get($payload, 'subresource_uris'),
- 'to' => Values::array_get($payload, 'to'),
- 'toFormatted' => Values::array_get($payload, 'to_formatted'),
+ 'direction' => Values::array_get($payload, 'direction'),
+ 'answeredBy' => Values::array_get($payload, 'answered_by'),
+ 'apiVersion' => Values::array_get($payload, 'api_version'),
+ 'forwardedFrom' => Values::array_get($payload, 'forwarded_from'),
+ 'groupSid' => Values::array_get($payload, 'group_sid'),
+ 'callerName' => Values::array_get($payload, 'caller_name'),
+ 'queueTime' => Values::array_get($payload, 'queue_time'),
+ 'trunkSid' => Values::array_get($payload, 'trunk_sid'),
'uri' => Values::array_get($payload, 'uri'),
- );
+ 'subresourceUris' => Values::array_get($payload, 'subresource_uris'),
+ ];
- $this->solution = array('accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Api\V2010\Account\CallContext Context for this
- * CallInstance
+ * @return CallContext Context for this CallInstance
*/
- protected function proxy()
+ protected function proxy(): CallContext
{
if (!$this->context) {
$this->context = new CallContext(
@@ -116,24 +139,26 @@ protected function proxy()
}
/**
- * Deletes the CallInstance
+ * Delete the CallInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function delete(): bool
{
+
return $this->proxy()->delete();
}
/**
- * Fetch a CallInstance
+ * Fetch the CallInstance
*
* @return CallInstance Fetched CallInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): CallInstance
{
+
return $this->proxy()->fetch();
}
@@ -144,47 +169,80 @@ public function fetch()
* @return CallInstance Updated CallInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): CallInstance
{
+
return $this->proxy()->update($options);
}
+ /**
+ * Access the transcriptions
+ */
+ protected function getTranscriptions(): TranscriptionList
+ {
+ return $this->proxy()->transcriptions;
+ }
+
/**
* Access the recordings
- *
- * @return \Twilio\Rest\Api\V2010\Account\Call\RecordingList
*/
- protected function getRecordings()
+ protected function getRecordings(): RecordingList
{
return $this->proxy()->recordings;
}
+ /**
+ * Access the userDefinedMessageSubscriptions
+ */
+ protected function getUserDefinedMessageSubscriptions(): UserDefinedMessageSubscriptionList
+ {
+ return $this->proxy()->userDefinedMessageSubscriptions;
+ }
+
+ /**
+ * Access the events
+ */
+ protected function getEvents(): EventList
+ {
+ return $this->proxy()->events;
+ }
+
/**
* Access the notifications
- *
- * @return \Twilio\Rest\Api\V2010\Account\Call\NotificationList
*/
- protected function getNotifications()
+ protected function getNotifications(): NotificationList
{
return $this->proxy()->notifications;
}
/**
- * Access the feedback
- *
- * @return \Twilio\Rest\Api\V2010\Account\Call\FeedbackList
+ * Access the userDefinedMessages
*/
- protected function getFeedback()
+ protected function getUserDefinedMessages(): UserDefinedMessageList
{
- return $this->proxy()->feedback;
+ return $this->proxy()->userDefinedMessages;
+ }
+
+ /**
+ * Access the siprec
+ */
+ protected function getSiprec(): SiprecList
+ {
+ return $this->proxy()->siprec;
+ }
+
+ /**
+ * Access the streams
+ */
+ protected function getStreams(): StreamList
+ {
+ return $this->proxy()->streams;
}
/**
* Access the payments
- *
- * @return \Twilio\Rest\Api\V2010\Account\Call\PaymentList
*/
- protected function getPayments()
+ protected function getPayments(): PaymentList
{
return $this->proxy()->payments;
}
@@ -196,7 +254,7 @@ protected function getPayments()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -215,12 +273,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.CallInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/CallList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/CallList.php
index f0b308e..3092def 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/CallList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/CallList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account;
@@ -12,92 +19,154 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Api\V2010\Account\Call\FeedbackSummaryList;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
-/**
- * @property \Twilio\Rest\Api\V2010\Account\Call\FeedbackSummaryList $feedbackSummaries
- * @method \Twilio\Rest\Api\V2010\Account\Call\FeedbackSummaryContext feedbackSummaries(string $sid)
- */
-class CallList extends ListResource
-{
- protected $_feedbackSummaries = null;
+class CallList extends ListResource
+ {
/**
* Construct the CallList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created this resource
- * @return \Twilio\Rest\Api\V2010\Account\CallList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
*/
- public function __construct(Version $version, $accountSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ ];
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Calls.json';
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Calls.json';
}
/**
- * Create a new CallInstance
+ * Create the CallInstance
*
- * @param string $to Phone number, SIP address, or client identifier to call
- * @param string $from Twilio number from which to originate the call
+ * @param string $to The phone number, SIP address, or client identifier to call.
+ * @param string $from The phone number or client identifier to use as the caller id. If using a phone number, it must be a Twilio number or a Verified [outgoing caller id](https://www.twilio.com/docs/voice/api/outgoing-caller-ids) for your account. If the `to` parameter is a phone number, `From` must also be a phone number.
* @param array|Options $options Optional Arguments
- * @return CallInstance Newly created CallInstance
+ * @return CallInstance Created CallInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($to, $from, $options = array())
+ public function create(string $to, string $from, array $options = []): CallInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'To' => $to,
- 'From' => $from,
- 'Url' => $options['url'],
- 'Twiml' => $options['twiml'],
- 'ApplicationSid' => $options['applicationSid'],
- 'Method' => $options['method'],
- 'FallbackUrl' => $options['fallbackUrl'],
- 'FallbackMethod' => $options['fallbackMethod'],
- 'StatusCallback' => $options['statusCallback'],
- 'StatusCallbackEvent' => Serialize::map($options['statusCallbackEvent'], function ($e) {
- return $e;
- }),
- 'StatusCallbackMethod' => $options['statusCallbackMethod'],
- 'SendDigits' => $options['sendDigits'],
- 'Timeout' => $options['timeout'],
- 'Record' => Serialize::booleanToString($options['record']),
- 'RecordingChannels' => $options['recordingChannels'],
- 'RecordingStatusCallback' => $options['recordingStatusCallback'],
- 'RecordingStatusCallbackMethod' => $options['recordingStatusCallbackMethod'],
- 'SipAuthUsername' => $options['sipAuthUsername'],
- 'SipAuthPassword' => $options['sipAuthPassword'],
- 'MachineDetection' => $options['machineDetection'],
- 'MachineDetectionTimeout' => $options['machineDetectionTimeout'],
- 'RecordingStatusCallbackEvent' => Serialize::map($options['recordingStatusCallbackEvent'], function ($e) {
- return $e;
- }),
- 'Trim' => $options['trim'],
- 'CallerId' => $options['callerId'],
- 'MachineDetectionSpeechThreshold' => $options['machineDetectionSpeechThreshold'],
- 'MachineDetectionSpeechEndThreshold' => $options['machineDetectionSpeechEndThreshold'],
- 'MachineDetectionSilenceTimeout' => $options['machineDetectionSilenceTimeout'],
- 'Byoc' => $options['byoc'],
- ));
+ $data = Values::of([
+ 'To' =>
+ $to,
+ 'From' =>
+ $from,
+ 'Method' =>
+ $options['method'],
+ 'FallbackUrl' =>
+ $options['fallbackUrl'],
+ 'FallbackMethod' =>
+ $options['fallbackMethod'],
+ 'StatusCallback' =>
+ $options['statusCallback'],
+ 'StatusCallbackEvent' =>
+ Serialize::map($options['statusCallbackEvent'], function ($e) { return $e; }),
+ 'StatusCallbackMethod' =>
+ $options['statusCallbackMethod'],
+ 'SendDigits' =>
+ $options['sendDigits'],
+ 'Timeout' =>
+ $options['timeout'],
+ 'Record' =>
+ Serialize::booleanToString($options['record']),
+ 'RecordingChannels' =>
+ $options['recordingChannels'],
+ 'RecordingStatusCallback' =>
+ $options['recordingStatusCallback'],
+ 'RecordingStatusCallbackMethod' =>
+ $options['recordingStatusCallbackMethod'],
+ 'SipAuthUsername' =>
+ $options['sipAuthUsername'],
+ 'SipAuthPassword' =>
+ $options['sipAuthPassword'],
+ 'MachineDetection' =>
+ $options['machineDetection'],
+ 'MachineDetectionTimeout' =>
+ $options['machineDetectionTimeout'],
+ 'RecordingStatusCallbackEvent' =>
+ Serialize::map($options['recordingStatusCallbackEvent'], function ($e) { return $e; }),
+ 'Trim' =>
+ $options['trim'],
+ 'CallerId' =>
+ $options['callerId'],
+ 'MachineDetectionSpeechThreshold' =>
+ $options['machineDetectionSpeechThreshold'],
+ 'MachineDetectionSpeechEndThreshold' =>
+ $options['machineDetectionSpeechEndThreshold'],
+ 'MachineDetectionSilenceTimeout' =>
+ $options['machineDetectionSilenceTimeout'],
+ 'AsyncAmd' =>
+ $options['asyncAmd'],
+ 'AsyncAmdStatusCallback' =>
+ $options['asyncAmdStatusCallback'],
+ 'AsyncAmdStatusCallbackMethod' =>
+ $options['asyncAmdStatusCallbackMethod'],
+ 'Byoc' =>
+ $options['byoc'],
+ 'CallReason' =>
+ $options['callReason'],
+ 'CallToken' =>
+ $options['callToken'],
+ 'RecordingTrack' =>
+ $options['recordingTrack'],
+ 'TimeLimit' =>
+ $options['timeLimit'],
+ 'Url' =>
+ $options['url'],
+ 'Twiml' =>
+ $options['twiml'],
+ 'ApplicationSid' =>
+ $options['applicationSid'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ return new CallInstance(
+ $this->version,
+ $payload,
+ $this->solution['accountSid']
);
+ }
+
- return new CallInstance($this->version, $payload, $this->solution['accountSid']);
+ /**
+ * Reads CallInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return CallInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -117,9 +186,9 @@ public function create($to, $from, $options = array())
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -128,61 +197,51 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads CallInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return CallInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of CallInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of CallInstance
+ * @return CallPage Page of CallInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): CallPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'To' => $options['to'],
- 'From' => $options['from'],
- 'ParentCallSid' => $options['parentCallSid'],
- 'Status' => $options['status'],
- 'StartTime<' => Serialize::iso8601DateTime($options['startTimeBefore']),
- 'StartTime' => Serialize::iso8601DateTime($options['startTime']),
- 'StartTime>' => Serialize::iso8601DateTime($options['startTimeAfter']),
- 'EndTime<' => Serialize::iso8601DateTime($options['endTimeBefore']),
- 'EndTime' => Serialize::iso8601DateTime($options['endTime']),
- 'EndTime>' => Serialize::iso8601DateTime($options['endTimeAfter']),
+
+ $params = Values::of([
+ 'To' =>
+ $options['to'],
+ 'From' =>
+ $options['from'],
+ 'ParentCallSid' =>
+ $options['parentCallSid'],
+ 'Status' =>
+ $options['status'],
+ 'StartTime<' =>
+ Serialize::iso8601DateTime($options['startTimeBefore']),
+ 'StartTime' =>
+ Serialize::iso8601DateTime($options['startTime']),
+ 'StartTime>' =>
+ Serialize::iso8601DateTime($options['startTimeAfter']),
+ 'EndTime<' =>
+ Serialize::iso8601DateTime($options['endTimeBefore']),
+ 'EndTime' =>
+ Serialize::iso8601DateTime($options['endTime']),
+ 'EndTime>' =>
+ Serialize::iso8601DateTime($options['endTimeAfter']),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new CallPage($this->version, $response, $this->solution);
}
@@ -192,9 +251,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of CallInstance
+ * @return CallPage Page of CallInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): CallPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -204,62 +263,22 @@ public function getPage($targetUrl)
return new CallPage($this->version, $response, $this->solution);
}
- /**
- * Access the feedbackSummaries
- */
- protected function getFeedbackSummaries()
- {
- if (!$this->_feedbackSummaries) {
- $this->_feedbackSummaries = new FeedbackSummaryList($this->version, $this->solution['accountSid']);
- }
-
- return $this->_feedbackSummaries;
- }
/**
* Constructs a CallContext
*
- * @param string $sid The SID of the Call resource to fetch
- * @return \Twilio\Rest\Api\V2010\Account\CallContext
- */
- public function getContext($sid)
- {
- return new CallContext($this->version, $this->solution['accountSid'], $sid);
- }
-
- /**
- * Magic getter to lazy load subresources
- *
- * @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
- * @throws TwilioException For unknown subresources
+ * @param string $sid The Twilio-provided Call SID that uniquely identifies the Call resource to delete
*/
- public function __get($name)
+ public function getContext(
+ string $sid
+
+ ): CallContext
{
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown subresource ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $property = $this->$name;
- if (\method_exists($property, 'getContext')) {
- return \call_user_func_array(array($property, 'getContext'), $arguments);
- }
-
- throw new TwilioException('Resource does not have a context');
+ return new CallContext(
+ $this->version,
+ $this->solution['accountSid'],
+ $sid
+ );
}
/**
@@ -267,8 +286,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.CallList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/CallOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/CallOptions.php
index 74eca67..3be856a 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/CallOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/CallOptions.php
@@ -1,10 +1,16 @@
=YYYY-MM-DD` to read calls that started on or after midnight of this date.
+ * @param string $startTime Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
+ * @param string $startTimeAfter Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
+ * @param string $endTimeBefore Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
+ * @param string $endTime Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
+ * @param string $endTimeAfter Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
* @return ReadCallOptions Options builder
*/
- public static function read($to = Values::NONE, $from = Values::NONE, $parentCallSid = Values::NONE, $status = Values::NONE, $startTimeBefore = Values::NONE, $startTime = Values::NONE, $startTimeAfter = Values::NONE, $endTimeBefore = Values::NONE, $endTime = Values::NONE, $endTimeAfter = Values::NONE)
+ public static function read(
+
+ string $to = Values::NONE,
+ string $from = Values::NONE,
+ string $parentCallSid = Values::NONE,
+ string $status = Values::NONE,
+ string $startTimeBefore = null,
+ string $startTime = null,
+ string $startTimeAfter = null,
+ string $endTimeBefore = null,
+ string $endTime = null,
+ string $endTimeAfter = null
+
+ ): ReadCallOptions
{
- return new ReadCallOptions($to, $from, $parentCallSid, $status, $startTimeBefore, $startTime, $startTimeAfter, $endTimeBefore, $endTime, $endTimeAfter);
+ return new ReadCallOptions(
+ $to,
+ $from,
+ $parentCallSid,
+ $status,
+ $startTimeBefore,
+ $startTime,
+ $startTimeAfter,
+ $endTimeBefore,
+ $endTime,
+ $endTimeAfter
+ );
}
/**
- * @param string $url The absolute URL that returns TwiML for this call
- * @param string $method HTTP method to use to fetch TwiML
- * @param string $status The new status to update the call with.
- * @param string $fallbackUrl Fallback URL in case of error
- * @param string $fallbackMethod HTTP Method to use with fallback_url
- * @param string $statusCallback The URL we should call to send status
- * information to your application
- * @param string $statusCallbackMethod HTTP Method to use to call
- * status_callback
- * @param string $twiml TwiML instructions for the call
+ * @param string $url The absolute URL that returns the TwiML instructions for the call. We will call this URL using the `method` when the call connects. For more information, see the [Url Parameter](https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter) section in [Making Calls](https://www.twilio.com/docs/voice/make-calls).
+ * @param string $method The HTTP method we should use when calling the `url`. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored.
+ * @param string $status
+ * @param string $fallbackUrl The URL that we call using the `fallback_method` if an error occurs when requesting or executing the TwiML at `url`. If an `application_sid` parameter is present, this parameter is ignored.
+ * @param string $fallbackMethod The HTTP method that we should use to request the `fallback_url`. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored.
+ * @param string $statusCallback The URL we should call using the `status_callback_method` to send status information to your application. If no `status_callback_event` is specified, we will send the `completed` status. If an `application_sid` parameter is present, this parameter is ignored. URLs must contain a valid hostname (underscores are not permitted).
+ * @param string $statusCallbackMethod The HTTP method we should use when requesting the `status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored.
+ * @param string $twiml TwiML instructions for the call Twilio will use without fetching Twiml from url. Twiml and url parameters are mutually exclusive
+ * @param int $timeLimit The maximum duration of the call in seconds. Constraints depend on account and configuration.
* @return UpdateCallOptions Options builder
*/
- public static function update($url = Values::NONE, $method = Values::NONE, $status = Values::NONE, $fallbackUrl = Values::NONE, $fallbackMethod = Values::NONE, $statusCallback = Values::NONE, $statusCallbackMethod = Values::NONE, $twiml = Values::NONE)
+ public static function update(
+
+ string $url = Values::NONE,
+ string $method = Values::NONE,
+ string $status = Values::NONE,
+ string $fallbackUrl = Values::NONE,
+ string $fallbackMethod = Values::NONE,
+ string $statusCallback = Values::NONE,
+ string $statusCallbackMethod = Values::NONE,
+ string $twiml = Values::NONE,
+ int $timeLimit = Values::INT_NONE
+
+ ): UpdateCallOptions
{
- return new UpdateCallOptions($url, $method, $status, $fallbackUrl, $fallbackMethod, $statusCallback, $statusCallbackMethod, $twiml);
+ return new UpdateCallOptions(
+ $url,
+ $method,
+ $status,
+ $fallbackUrl,
+ $fallbackMethod,
+ $statusCallback,
+ $statusCallbackMethod,
+ $twiml,
+ $timeLimit
+ );
}
+
}
class CreateCallOptions extends Options
-{
- /**
- * @param string $url The absolute URL that returns TwiML for this call
- * @param string $twiml TwiML instructions for the call
- * @param string $applicationSid The SID of the Application resource that will
- * handle the call
- * @param string $method HTTP method to use to fetch TwiML
- * @param string $fallbackUrl Fallback URL in case of error
- * @param string $fallbackMethod HTTP Method to use with fallback_url
- * @param string $statusCallback The URL we should call to send status
- * information to your application
- * @param string $statusCallbackEvent The call progress events that we send to
- * the `status_callback` URL.
- * @param string $statusCallbackMethod HTTP Method to use with status_callback
- * @param string $sendDigits The digits to dial after connecting to the number
- * @param int $timeout Number of seconds to wait for an answer
- * @param bool $record Whether to record the call
- * @param string $recordingChannels The number of channels in the final
- * recording
- * @param string $recordingStatusCallback The URL that we call when the
- * recording is available to be accessed
- * @param string $recordingStatusCallbackMethod The HTTP method we should use
- * when calling the
- * `recording_status_callback` URL
- * @param string $sipAuthUsername The username used to authenticate the caller
- * making a SIP call
- * @param string $sipAuthPassword The password required to authenticate the
- * user account specified in `sip_auth_username`.
- * @param string $machineDetection Enable machine detection or end of greeting
- * detection
- * @param int $machineDetectionTimeout Number of seconds to wait for machine
- * detection
- * @param string $recordingStatusCallbackEvent The recording status events that
- * will trigger calls to the URL
- * specified in
- * `recording_status_callback`
- * @param string $trim Set this parameter to control trimming of silence on the
- * recording.
- * @param string $callerId The phone number, SIP address, or Client identifier
- * that made this call. Phone numbers are in E.164
- * format (e.g., +16175551212). SIP addresses are
- * formatted as `name@company.com`.
- * @param int $machineDetectionSpeechThreshold Number of milliseconds for
- * measuring stick for the length
- * of the speech activity
- * @param int $machineDetectionSpeechEndThreshold Number of milliseconds of
- * silence after speech activity
- * @param int $machineDetectionSilenceTimeout Number of milliseconds of initial
- * silence
- * @param string $byoc BYOC trunk SID (Beta)
- */
- public function __construct($url = Values::NONE, $twiml = Values::NONE, $applicationSid = Values::NONE, $method = Values::NONE, $fallbackUrl = Values::NONE, $fallbackMethod = Values::NONE, $statusCallback = Values::NONE, $statusCallbackEvent = Values::NONE, $statusCallbackMethod = Values::NONE, $sendDigits = Values::NONE, $timeout = Values::NONE, $record = Values::NONE, $recordingChannels = Values::NONE, $recordingStatusCallback = Values::NONE, $recordingStatusCallbackMethod = Values::NONE, $sipAuthUsername = Values::NONE, $sipAuthPassword = Values::NONE, $machineDetection = Values::NONE, $machineDetectionTimeout = Values::NONE, $recordingStatusCallbackEvent = Values::NONE, $trim = Values::NONE, $callerId = Values::NONE, $machineDetectionSpeechThreshold = Values::NONE, $machineDetectionSpeechEndThreshold = Values::NONE, $machineDetectionSilenceTimeout = Values::NONE, $byoc = Values::NONE)
{
+ /**
+ * @param string $url The absolute URL that returns the TwiML instructions for the call. We will call this URL using the `method` when the call connects. For more information, see the [Url Parameter](https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter) section in [Making Calls](https://www.twilio.com/docs/voice/make-calls).
+ * @param string $twiml TwiML instructions for the call Twilio will use without fetching Twiml from url parameter. If both `twiml` and `url` are provided then `twiml` parameter will be ignored. Max 4000 characters.
+ * @param string $applicationSid The SID of the Application resource that will handle the call, if the call will be handled by an application.
+ * @param string $method The HTTP method we should use when calling the `url` parameter's value. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored.
+ * @param string $fallbackUrl The URL that we call using the `fallback_method` if an error occurs when requesting or executing the TwiML at `url`. If an `application_sid` parameter is present, this parameter is ignored.
+ * @param string $fallbackMethod The HTTP method that we should use to request the `fallback_url`. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored.
+ * @param string $statusCallback The URL we should call using the `status_callback_method` to send status information to your application. If no `status_callback_event` is specified, we will send the `completed` status. If an `application_sid` parameter is present, this parameter is ignored. URLs must contain a valid hostname (underscores are not permitted).
+ * @param string[] $statusCallbackEvent The call progress events that we will send to the `status_callback` URL. Can be: `initiated`, `ringing`, `answered`, and `completed`. If no event is specified, we send the `completed` status. If you want to receive multiple events, specify each one in a separate `status_callback_event` parameter. See the code sample for [monitoring call progress](https://www.twilio.com/docs/voice/api/call-resource?code-sample=code-create-a-call-resource-and-specify-a-statuscallbackevent&code-sdk-version=json). If an `application_sid` is present, this parameter is ignored.
+ * @param string $statusCallbackMethod The HTTP method we should use when calling the `status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored.
+ * @param string $sendDigits A string of keys to dial after connecting to the number, maximum of 32 digits. Valid digits in the string include: any digit (`0`-`9`), '`#`', '`*`' and '`w`', to insert a half second pause. For example, if you connected to a company phone number and wanted to pause for one second, and then dial extension 1234 followed by the pound key, the value of this parameter would be `ww1234#`. Remember to URL-encode this string, since the '`#`' character has special meaning in a URL. If both `SendDigits` and `MachineDetection` parameters are provided, then `MachineDetection` will be ignored.
+ * @param int $timeout The integer number of seconds that we should allow the phone to ring before assuming there is no answer. The default is `60` seconds and the maximum is `600` seconds. For some call flows, we will add a 5-second buffer to the timeout value you provide. For this reason, a timeout value of 10 seconds could result in an actual timeout closer to 15 seconds. You can set this to a short time, such as `15` seconds, to hang up before reaching an answering machine or voicemail.
+ * @param bool $record Whether to record the call. Can be `true` to record the phone call, or `false` to not. The default is `false`. The `recording_url` is sent to the `status_callback` URL.
+ * @param string $recordingChannels The number of channels in the final recording. Can be: `mono` or `dual`. The default is `mono`. `mono` records both legs of the call in a single channel of the recording file. `dual` records each leg to a separate channel of the recording file. The first channel of a dual-channel recording contains the parent call and the second channel contains the child call.
+ * @param string $recordingStatusCallback The URL that we call when the recording is available to be accessed.
+ * @param string $recordingStatusCallbackMethod The HTTP method we should use when calling the `recording_status_callback` URL. Can be: `GET` or `POST` and the default is `POST`.
+ * @param string $sipAuthUsername The username used to authenticate the caller making a SIP call.
+ * @param string $sipAuthPassword The password required to authenticate the user account specified in `sip_auth_username`.
+ * @param string $machineDetection Whether to detect if a human, answering machine, or fax has picked up the call. Can be: `Enable` or `DetectMessageEnd`. Use `Enable` if you would like us to return `AnsweredBy` as soon as the called party is identified. Use `DetectMessageEnd`, if you would like to leave a message on an answering machine. If `send_digits` is provided, this parameter is ignored. For more information, see [Answering Machine Detection](https://www.twilio.com/docs/voice/answering-machine-detection).
+ * @param int $machineDetectionTimeout The number of seconds that we should attempt to detect an answering machine before timing out and sending a voice request with `AnsweredBy` of `unknown`. The default timeout is 30 seconds.
+ * @param string[] $recordingStatusCallbackEvent The recording status events that will trigger calls to the URL specified in `recording_status_callback`. Can be: `in-progress`, `completed` and `absent`. Defaults to `completed`. Separate multiple values with a space.
+ * @param string $trim Whether to trim any leading and trailing silence from the recording. Can be: `trim-silence` or `do-not-trim` and the default is `trim-silence`.
+ * @param string $callerId The phone number, SIP address, or Client identifier that made this call. Phone numbers are in [E.164 format](https://wwnw.twilio.com/docs/glossary/what-e164) (e.g., +16175551212). SIP addresses are formatted as `name@company.com`.
+ * @param int $machineDetectionSpeechThreshold The number of milliseconds that is used as the measuring stick for the length of the speech activity, where durations lower than this value will be interpreted as a human and longer than this value as a machine. Possible Values: 1000-6000. Default: 2400.
+ * @param int $machineDetectionSpeechEndThreshold The number of milliseconds of silence after speech activity at which point the speech activity is considered complete. Possible Values: 500-5000. Default: 1200.
+ * @param int $machineDetectionSilenceTimeout The number of milliseconds of initial silence after which an `unknown` AnsweredBy result will be returned. Possible Values: 2000-10000. Default: 5000.
+ * @param string $asyncAmd Select whether to perform answering machine detection in the background. Default, blocks the execution of the call until Answering Machine Detection is completed. Can be: `true` or `false`.
+ * @param string $asyncAmdStatusCallback The URL that we should call using the `async_amd_status_callback_method` to notify customer application whether the call was answered by human, machine or fax.
+ * @param string $asyncAmdStatusCallbackMethod The HTTP method we should use when calling the `async_amd_status_callback` URL. Can be: `GET` or `POST` and the default is `POST`.
+ * @param string $byoc The SID of a BYOC (Bring Your Own Carrier) trunk to route this call with. Note that `byoc` is only meaningful when `to` is a phone number; it will otherwise be ignored. (Beta)
+ * @param string $callReason The Reason for the outgoing call. Use it to specify the purpose of the call that is presented on the called party's phone. (Branded Calls Beta)
+ * @param string $callToken A token string needed to invoke a forwarded call. A call_token is generated when an incoming call is received on a Twilio number. Pass an incoming call's call_token value to a forwarded call via the call_token parameter when creating a new call. A forwarded call should bear the same CallerID of the original incoming call.
+ * @param string $recordingTrack The audio track to record for the call. Can be: `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the audio that is received by Twilio. `outbound` records the audio that is generated from Twilio. `both` records the audio that is received and generated by Twilio.
+ * @param int $timeLimit The maximum duration of the call in seconds. Constraints depend on account and configuration.
+ */
+ public function __construct(
+
+ string $url = Values::NONE,
+ string $twiml = Values::NONE,
+ string $applicationSid = Values::NONE,
+ string $method = Values::NONE,
+ string $fallbackUrl = Values::NONE,
+ string $fallbackMethod = Values::NONE,
+ string $statusCallback = Values::NONE,
+ array $statusCallbackEvent = Values::ARRAY_NONE,
+ string $statusCallbackMethod = Values::NONE,
+ string $sendDigits = Values::NONE,
+ int $timeout = Values::INT_NONE,
+ bool $record = Values::BOOL_NONE,
+ string $recordingChannels = Values::NONE,
+ string $recordingStatusCallback = Values::NONE,
+ string $recordingStatusCallbackMethod = Values::NONE,
+ string $sipAuthUsername = Values::NONE,
+ string $sipAuthPassword = Values::NONE,
+ string $machineDetection = Values::NONE,
+ int $machineDetectionTimeout = Values::INT_NONE,
+ array $recordingStatusCallbackEvent = Values::ARRAY_NONE,
+ string $trim = Values::NONE,
+ string $callerId = Values::NONE,
+ int $machineDetectionSpeechThreshold = Values::INT_NONE,
+ int $machineDetectionSpeechEndThreshold = Values::INT_NONE,
+ int $machineDetectionSilenceTimeout = Values::INT_NONE,
+ string $asyncAmd = Values::NONE,
+ string $asyncAmdStatusCallback = Values::NONE,
+ string $asyncAmdStatusCallbackMethod = Values::NONE,
+ string $byoc = Values::NONE,
+ string $callReason = Values::NONE,
+ string $callToken = Values::NONE,
+ string $recordingTrack = Values::NONE,
+ int $timeLimit = Values::INT_NONE
+
+ ) {
$this->options['url'] = $url;
$this->options['twiml'] = $twiml;
$this->options['applicationSid'] = $applicationSid;
@@ -186,28 +315,35 @@ public function __construct($url = Values::NONE, $twiml = Values::NONE, $applica
$this->options['machineDetectionSpeechThreshold'] = $machineDetectionSpeechThreshold;
$this->options['machineDetectionSpeechEndThreshold'] = $machineDetectionSpeechEndThreshold;
$this->options['machineDetectionSilenceTimeout'] = $machineDetectionSilenceTimeout;
+ $this->options['asyncAmd'] = $asyncAmd;
+ $this->options['asyncAmdStatusCallback'] = $asyncAmdStatusCallback;
+ $this->options['asyncAmdStatusCallbackMethod'] = $asyncAmdStatusCallbackMethod;
$this->options['byoc'] = $byoc;
+ $this->options['callReason'] = $callReason;
+ $this->options['callToken'] = $callToken;
+ $this->options['recordingTrack'] = $recordingTrack;
+ $this->options['timeLimit'] = $timeLimit;
}
/**
* The absolute URL that returns the TwiML instructions for the call. We will call this URL using the `method` when the call connects. For more information, see the [Url Parameter](https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter) section in [Making Calls](https://www.twilio.com/docs/voice/make-calls).
*
- * @param string $url The absolute URL that returns TwiML for this call
+ * @param string $url The absolute URL that returns the TwiML instructions for the call. We will call this URL using the `method` when the call connects. For more information, see the [Url Parameter](https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter) section in [Making Calls](https://www.twilio.com/docs/voice/make-calls).
* @return $this Fluent Builder
*/
- public function setUrl($url)
+ public function setUrl(string $url): self
{
$this->options['url'] = $url;
return $this;
}
/**
- * TwiML instructions for the call Twilio will use without fetching Twiml from url parameter. If both `twiml` and `url` are provided then `twiml` parameter will be ignored.
+ * TwiML instructions for the call Twilio will use without fetching Twiml from url parameter. If both `twiml` and `url` are provided then `twiml` parameter will be ignored. Max 4000 characters.
*
- * @param string $twiml TwiML instructions for the call
+ * @param string $twiml TwiML instructions for the call Twilio will use without fetching Twiml from url parameter. If both `twiml` and `url` are provided then `twiml` parameter will be ignored. Max 4000 characters.
* @return $this Fluent Builder
*/
- public function setTwiml($twiml)
+ public function setTwiml(string $twiml): self
{
$this->options['twiml'] = $twiml;
return $this;
@@ -216,11 +352,10 @@ public function setTwiml($twiml)
/**
* The SID of the Application resource that will handle the call, if the call will be handled by an application.
*
- * @param string $applicationSid The SID of the Application resource that will
- * handle the call
+ * @param string $applicationSid The SID of the Application resource that will handle the call, if the call will be handled by an application.
* @return $this Fluent Builder
*/
- public function setApplicationSid($applicationSid)
+ public function setApplicationSid(string $applicationSid): self
{
$this->options['applicationSid'] = $applicationSid;
return $this;
@@ -229,10 +364,10 @@ public function setApplicationSid($applicationSid)
/**
* The HTTP method we should use when calling the `url` parameter's value. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored.
*
- * @param string $method HTTP method to use to fetch TwiML
+ * @param string $method The HTTP method we should use when calling the `url` parameter's value. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored.
* @return $this Fluent Builder
*/
- public function setMethod($method)
+ public function setMethod(string $method): self
{
$this->options['method'] = $method;
return $this;
@@ -241,10 +376,10 @@ public function setMethod($method)
/**
* The URL that we call using the `fallback_method` if an error occurs when requesting or executing the TwiML at `url`. If an `application_sid` parameter is present, this parameter is ignored.
*
- * @param string $fallbackUrl Fallback URL in case of error
+ * @param string $fallbackUrl The URL that we call using the `fallback_method` if an error occurs when requesting or executing the TwiML at `url`. If an `application_sid` parameter is present, this parameter is ignored.
* @return $this Fluent Builder
*/
- public function setFallbackUrl($fallbackUrl)
+ public function setFallbackUrl(string $fallbackUrl): self
{
$this->options['fallbackUrl'] = $fallbackUrl;
return $this;
@@ -253,10 +388,10 @@ public function setFallbackUrl($fallbackUrl)
/**
* The HTTP method that we should use to request the `fallback_url`. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored.
*
- * @param string $fallbackMethod HTTP Method to use with fallback_url
+ * @param string $fallbackMethod The HTTP method that we should use to request the `fallback_url`. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored.
* @return $this Fluent Builder
*/
- public function setFallbackMethod($fallbackMethod)
+ public function setFallbackMethod(string $fallbackMethod): self
{
$this->options['fallbackMethod'] = $fallbackMethod;
return $this;
@@ -265,11 +400,10 @@ public function setFallbackMethod($fallbackMethod)
/**
* The URL we should call using the `status_callback_method` to send status information to your application. If no `status_callback_event` is specified, we will send the `completed` status. If an `application_sid` parameter is present, this parameter is ignored. URLs must contain a valid hostname (underscores are not permitted).
*
- * @param string $statusCallback The URL we should call to send status
- * information to your application
+ * @param string $statusCallback The URL we should call using the `status_callback_method` to send status information to your application. If no `status_callback_event` is specified, we will send the `completed` status. If an `application_sid` parameter is present, this parameter is ignored. URLs must contain a valid hostname (underscores are not permitted).
* @return $this Fluent Builder
*/
- public function setStatusCallback($statusCallback)
+ public function setStatusCallback(string $statusCallback): self
{
$this->options['statusCallback'] = $statusCallback;
return $this;
@@ -278,11 +412,10 @@ public function setStatusCallback($statusCallback)
/**
* The call progress events that we will send to the `status_callback` URL. Can be: `initiated`, `ringing`, `answered`, and `completed`. If no event is specified, we send the `completed` status. If you want to receive multiple events, specify each one in a separate `status_callback_event` parameter. See the code sample for [monitoring call progress](https://www.twilio.com/docs/voice/api/call-resource?code-sample=code-create-a-call-resource-and-specify-a-statuscallbackevent&code-sdk-version=json). If an `application_sid` is present, this parameter is ignored.
*
- * @param string $statusCallbackEvent The call progress events that we send to
- * the `status_callback` URL.
+ * @param string[] $statusCallbackEvent The call progress events that we will send to the `status_callback` URL. Can be: `initiated`, `ringing`, `answered`, and `completed`. If no event is specified, we send the `completed` status. If you want to receive multiple events, specify each one in a separate `status_callback_event` parameter. See the code sample for [monitoring call progress](https://www.twilio.com/docs/voice/api/call-resource?code-sample=code-create-a-call-resource-and-specify-a-statuscallbackevent&code-sdk-version=json). If an `application_sid` is present, this parameter is ignored.
* @return $this Fluent Builder
*/
- public function setStatusCallbackEvent($statusCallbackEvent)
+ public function setStatusCallbackEvent(array $statusCallbackEvent): self
{
$this->options['statusCallbackEvent'] = $statusCallbackEvent;
return $this;
@@ -291,10 +424,10 @@ public function setStatusCallbackEvent($statusCallbackEvent)
/**
* The HTTP method we should use when calling the `status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored.
*
- * @param string $statusCallbackMethod HTTP Method to use with status_callback
+ * @param string $statusCallbackMethod The HTTP method we should use when calling the `status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored.
* @return $this Fluent Builder
*/
- public function setStatusCallbackMethod($statusCallbackMethod)
+ public function setStatusCallbackMethod(string $statusCallbackMethod): self
{
$this->options['statusCallbackMethod'] = $statusCallbackMethod;
return $this;
@@ -303,10 +436,10 @@ public function setStatusCallbackMethod($statusCallbackMethod)
/**
* A string of keys to dial after connecting to the number, maximum of 32 digits. Valid digits in the string include: any digit (`0`-`9`), '`#`', '`*`' and '`w`', to insert a half second pause. For example, if you connected to a company phone number and wanted to pause for one second, and then dial extension 1234 followed by the pound key, the value of this parameter would be `ww1234#`. Remember to URL-encode this string, since the '`#`' character has special meaning in a URL. If both `SendDigits` and `MachineDetection` parameters are provided, then `MachineDetection` will be ignored.
*
- * @param string $sendDigits The digits to dial after connecting to the number
+ * @param string $sendDigits A string of keys to dial after connecting to the number, maximum of 32 digits. Valid digits in the string include: any digit (`0`-`9`), '`#`', '`*`' and '`w`', to insert a half second pause. For example, if you connected to a company phone number and wanted to pause for one second, and then dial extension 1234 followed by the pound key, the value of this parameter would be `ww1234#`. Remember to URL-encode this string, since the '`#`' character has special meaning in a URL. If both `SendDigits` and `MachineDetection` parameters are provided, then `MachineDetection` will be ignored.
* @return $this Fluent Builder
*/
- public function setSendDigits($sendDigits)
+ public function setSendDigits(string $sendDigits): self
{
$this->options['sendDigits'] = $sendDigits;
return $this;
@@ -315,10 +448,10 @@ public function setSendDigits($sendDigits)
/**
* The integer number of seconds that we should allow the phone to ring before assuming there is no answer. The default is `60` seconds and the maximum is `600` seconds. For some call flows, we will add a 5-second buffer to the timeout value you provide. For this reason, a timeout value of 10 seconds could result in an actual timeout closer to 15 seconds. You can set this to a short time, such as `15` seconds, to hang up before reaching an answering machine or voicemail.
*
- * @param int $timeout Number of seconds to wait for an answer
+ * @param int $timeout The integer number of seconds that we should allow the phone to ring before assuming there is no answer. The default is `60` seconds and the maximum is `600` seconds. For some call flows, we will add a 5-second buffer to the timeout value you provide. For this reason, a timeout value of 10 seconds could result in an actual timeout closer to 15 seconds. You can set this to a short time, such as `15` seconds, to hang up before reaching an answering machine or voicemail.
* @return $this Fluent Builder
*/
- public function setTimeout($timeout)
+ public function setTimeout(int $timeout): self
{
$this->options['timeout'] = $timeout;
return $this;
@@ -327,10 +460,10 @@ public function setTimeout($timeout)
/**
* Whether to record the call. Can be `true` to record the phone call, or `false` to not. The default is `false`. The `recording_url` is sent to the `status_callback` URL.
*
- * @param bool $record Whether to record the call
+ * @param bool $record Whether to record the call. Can be `true` to record the phone call, or `false` to not. The default is `false`. The `recording_url` is sent to the `status_callback` URL.
* @return $this Fluent Builder
*/
- public function setRecord($record)
+ public function setRecord(bool $record): self
{
$this->options['record'] = $record;
return $this;
@@ -339,11 +472,10 @@ public function setRecord($record)
/**
* The number of channels in the final recording. Can be: `mono` or `dual`. The default is `mono`. `mono` records both legs of the call in a single channel of the recording file. `dual` records each leg to a separate channel of the recording file. The first channel of a dual-channel recording contains the parent call and the second channel contains the child call.
*
- * @param string $recordingChannels The number of channels in the final
- * recording
+ * @param string $recordingChannels The number of channels in the final recording. Can be: `mono` or `dual`. The default is `mono`. `mono` records both legs of the call in a single channel of the recording file. `dual` records each leg to a separate channel of the recording file. The first channel of a dual-channel recording contains the parent call and the second channel contains the child call.
* @return $this Fluent Builder
*/
- public function setRecordingChannels($recordingChannels)
+ public function setRecordingChannels(string $recordingChannels): self
{
$this->options['recordingChannels'] = $recordingChannels;
return $this;
@@ -352,11 +484,10 @@ public function setRecordingChannels($recordingChannels)
/**
* The URL that we call when the recording is available to be accessed.
*
- * @param string $recordingStatusCallback The URL that we call when the
- * recording is available to be accessed
+ * @param string $recordingStatusCallback The URL that we call when the recording is available to be accessed.
* @return $this Fluent Builder
*/
- public function setRecordingStatusCallback($recordingStatusCallback)
+ public function setRecordingStatusCallback(string $recordingStatusCallback): self
{
$this->options['recordingStatusCallback'] = $recordingStatusCallback;
return $this;
@@ -365,12 +496,10 @@ public function setRecordingStatusCallback($recordingStatusCallback)
/**
* The HTTP method we should use when calling the `recording_status_callback` URL. Can be: `GET` or `POST` and the default is `POST`.
*
- * @param string $recordingStatusCallbackMethod The HTTP method we should use
- * when calling the
- * `recording_status_callback` URL
+ * @param string $recordingStatusCallbackMethod The HTTP method we should use when calling the `recording_status_callback` URL. Can be: `GET` or `POST` and the default is `POST`.
* @return $this Fluent Builder
*/
- public function setRecordingStatusCallbackMethod($recordingStatusCallbackMethod)
+ public function setRecordingStatusCallbackMethod(string $recordingStatusCallbackMethod): self
{
$this->options['recordingStatusCallbackMethod'] = $recordingStatusCallbackMethod;
return $this;
@@ -379,11 +508,10 @@ public function setRecordingStatusCallbackMethod($recordingStatusCallbackMethod)
/**
* The username used to authenticate the caller making a SIP call.
*
- * @param string $sipAuthUsername The username used to authenticate the caller
- * making a SIP call
+ * @param string $sipAuthUsername The username used to authenticate the caller making a SIP call.
* @return $this Fluent Builder
*/
- public function setSipAuthUsername($sipAuthUsername)
+ public function setSipAuthUsername(string $sipAuthUsername): self
{
$this->options['sipAuthUsername'] = $sipAuthUsername;
return $this;
@@ -392,11 +520,10 @@ public function setSipAuthUsername($sipAuthUsername)
/**
* The password required to authenticate the user account specified in `sip_auth_username`.
*
- * @param string $sipAuthPassword The password required to authenticate the
- * user account specified in `sip_auth_username`.
+ * @param string $sipAuthPassword The password required to authenticate the user account specified in `sip_auth_username`.
* @return $this Fluent Builder
*/
- public function setSipAuthPassword($sipAuthPassword)
+ public function setSipAuthPassword(string $sipAuthPassword): self
{
$this->options['sipAuthPassword'] = $sipAuthPassword;
return $this;
@@ -405,11 +532,10 @@ public function setSipAuthPassword($sipAuthPassword)
/**
* Whether to detect if a human, answering machine, or fax has picked up the call. Can be: `Enable` or `DetectMessageEnd`. Use `Enable` if you would like us to return `AnsweredBy` as soon as the called party is identified. Use `DetectMessageEnd`, if you would like to leave a message on an answering machine. If `send_digits` is provided, this parameter is ignored. For more information, see [Answering Machine Detection](https://www.twilio.com/docs/voice/answering-machine-detection).
*
- * @param string $machineDetection Enable machine detection or end of greeting
- * detection
+ * @param string $machineDetection Whether to detect if a human, answering machine, or fax has picked up the call. Can be: `Enable` or `DetectMessageEnd`. Use `Enable` if you would like us to return `AnsweredBy` as soon as the called party is identified. Use `DetectMessageEnd`, if you would like to leave a message on an answering machine. If `send_digits` is provided, this parameter is ignored. For more information, see [Answering Machine Detection](https://www.twilio.com/docs/voice/answering-machine-detection).
* @return $this Fluent Builder
*/
- public function setMachineDetection($machineDetection)
+ public function setMachineDetection(string $machineDetection): self
{
$this->options['machineDetection'] = $machineDetection;
return $this;
@@ -418,11 +544,10 @@ public function setMachineDetection($machineDetection)
/**
* The number of seconds that we should attempt to detect an answering machine before timing out and sending a voice request with `AnsweredBy` of `unknown`. The default timeout is 30 seconds.
*
- * @param int $machineDetectionTimeout Number of seconds to wait for machine
- * detection
+ * @param int $machineDetectionTimeout The number of seconds that we should attempt to detect an answering machine before timing out and sending a voice request with `AnsweredBy` of `unknown`. The default timeout is 30 seconds.
* @return $this Fluent Builder
*/
- public function setMachineDetectionTimeout($machineDetectionTimeout)
+ public function setMachineDetectionTimeout(int $machineDetectionTimeout): self
{
$this->options['machineDetectionTimeout'] = $machineDetectionTimeout;
return $this;
@@ -431,13 +556,10 @@ public function setMachineDetectionTimeout($machineDetectionTimeout)
/**
* The recording status events that will trigger calls to the URL specified in `recording_status_callback`. Can be: `in-progress`, `completed` and `absent`. Defaults to `completed`. Separate multiple values with a space.
*
- * @param string $recordingStatusCallbackEvent The recording status events that
- * will trigger calls to the URL
- * specified in
- * `recording_status_callback`
+ * @param string[] $recordingStatusCallbackEvent The recording status events that will trigger calls to the URL specified in `recording_status_callback`. Can be: `in-progress`, `completed` and `absent`. Defaults to `completed`. Separate multiple values with a space.
* @return $this Fluent Builder
*/
- public function setRecordingStatusCallbackEvent($recordingStatusCallbackEvent)
+ public function setRecordingStatusCallbackEvent(array $recordingStatusCallbackEvent): self
{
$this->options['recordingStatusCallbackEvent'] = $recordingStatusCallbackEvent;
return $this;
@@ -446,11 +568,10 @@ public function setRecordingStatusCallbackEvent($recordingStatusCallbackEvent)
/**
* Whether to trim any leading and trailing silence from the recording. Can be: `trim-silence` or `do-not-trim` and the default is `trim-silence`.
*
- * @param string $trim Set this parameter to control trimming of silence on the
- * recording.
+ * @param string $trim Whether to trim any leading and trailing silence from the recording. Can be: `trim-silence` or `do-not-trim` and the default is `trim-silence`.
* @return $this Fluent Builder
*/
- public function setTrim($trim)
+ public function setTrim(string $trim): self
{
$this->options['trim'] = $trim;
return $this;
@@ -459,13 +580,10 @@ public function setTrim($trim)
/**
* The phone number, SIP address, or Client identifier that made this call. Phone numbers are in [E.164 format](https://wwnw.twilio.com/docs/glossary/what-e164) (e.g., +16175551212). SIP addresses are formatted as `name@company.com`.
*
- * @param string $callerId The phone number, SIP address, or Client identifier
- * that made this call. Phone numbers are in E.164
- * format (e.g., +16175551212). SIP addresses are
- * formatted as `name@company.com`.
+ * @param string $callerId The phone number, SIP address, or Client identifier that made this call. Phone numbers are in [E.164 format](https://wwnw.twilio.com/docs/glossary/what-e164) (e.g., +16175551212). SIP addresses are formatted as `name@company.com`.
* @return $this Fluent Builder
*/
- public function setCallerId($callerId)
+ public function setCallerId(string $callerId): self
{
$this->options['callerId'] = $callerId;
return $this;
@@ -474,12 +592,10 @@ public function setCallerId($callerId)
/**
* The number of milliseconds that is used as the measuring stick for the length of the speech activity, where durations lower than this value will be interpreted as a human and longer than this value as a machine. Possible Values: 1000-6000. Default: 2400.
*
- * @param int $machineDetectionSpeechThreshold Number of milliseconds for
- * measuring stick for the length
- * of the speech activity
+ * @param int $machineDetectionSpeechThreshold The number of milliseconds that is used as the measuring stick for the length of the speech activity, where durations lower than this value will be interpreted as a human and longer than this value as a machine. Possible Values: 1000-6000. Default: 2400.
* @return $this Fluent Builder
*/
- public function setMachineDetectionSpeechThreshold($machineDetectionSpeechThreshold)
+ public function setMachineDetectionSpeechThreshold(int $machineDetectionSpeechThreshold): self
{
$this->options['machineDetectionSpeechThreshold'] = $machineDetectionSpeechThreshold;
return $this;
@@ -488,11 +604,10 @@ public function setMachineDetectionSpeechThreshold($machineDetectionSpeechThresh
/**
* The number of milliseconds of silence after speech activity at which point the speech activity is considered complete. Possible Values: 500-5000. Default: 1200.
*
- * @param int $machineDetectionSpeechEndThreshold Number of milliseconds of
- * silence after speech activity
+ * @param int $machineDetectionSpeechEndThreshold The number of milliseconds of silence after speech activity at which point the speech activity is considered complete. Possible Values: 500-5000. Default: 1200.
* @return $this Fluent Builder
*/
- public function setMachineDetectionSpeechEndThreshold($machineDetectionSpeechEndThreshold)
+ public function setMachineDetectionSpeechEndThreshold(int $machineDetectionSpeechEndThreshold): self
{
$this->options['machineDetectionSpeechEndThreshold'] = $machineDetectionSpeechEndThreshold;
return $this;
@@ -501,61 +616,153 @@ public function setMachineDetectionSpeechEndThreshold($machineDetectionSpeechEnd
/**
* The number of milliseconds of initial silence after which an `unknown` AnsweredBy result will be returned. Possible Values: 2000-10000. Default: 5000.
*
- * @param int $machineDetectionSilenceTimeout Number of milliseconds of initial
- * silence
+ * @param int $machineDetectionSilenceTimeout The number of milliseconds of initial silence after which an `unknown` AnsweredBy result will be returned. Possible Values: 2000-10000. Default: 5000.
* @return $this Fluent Builder
*/
- public function setMachineDetectionSilenceTimeout($machineDetectionSilenceTimeout)
+ public function setMachineDetectionSilenceTimeout(int $machineDetectionSilenceTimeout): self
{
$this->options['machineDetectionSilenceTimeout'] = $machineDetectionSilenceTimeout;
return $this;
}
+ /**
+ * Select whether to perform answering machine detection in the background. Default, blocks the execution of the call until Answering Machine Detection is completed. Can be: `true` or `false`.
+ *
+ * @param string $asyncAmd Select whether to perform answering machine detection in the background. Default, blocks the execution of the call until Answering Machine Detection is completed. Can be: `true` or `false`.
+ * @return $this Fluent Builder
+ */
+ public function setAsyncAmd(string $asyncAmd): self
+ {
+ $this->options['asyncAmd'] = $asyncAmd;
+ return $this;
+ }
+
+ /**
+ * The URL that we should call using the `async_amd_status_callback_method` to notify customer application whether the call was answered by human, machine or fax.
+ *
+ * @param string $asyncAmdStatusCallback The URL that we should call using the `async_amd_status_callback_method` to notify customer application whether the call was answered by human, machine or fax.
+ * @return $this Fluent Builder
+ */
+ public function setAsyncAmdStatusCallback(string $asyncAmdStatusCallback): self
+ {
+ $this->options['asyncAmdStatusCallback'] = $asyncAmdStatusCallback;
+ return $this;
+ }
+
+ /**
+ * The HTTP method we should use when calling the `async_amd_status_callback` URL. Can be: `GET` or `POST` and the default is `POST`.
+ *
+ * @param string $asyncAmdStatusCallbackMethod The HTTP method we should use when calling the `async_amd_status_callback` URL. Can be: `GET` or `POST` and the default is `POST`.
+ * @return $this Fluent Builder
+ */
+ public function setAsyncAmdStatusCallbackMethod(string $asyncAmdStatusCallbackMethod): self
+ {
+ $this->options['asyncAmdStatusCallbackMethod'] = $asyncAmdStatusCallbackMethod;
+ return $this;
+ }
+
/**
* The SID of a BYOC (Bring Your Own Carrier) trunk to route this call with. Note that `byoc` is only meaningful when `to` is a phone number; it will otherwise be ignored. (Beta)
*
- * @param string $byoc BYOC trunk SID (Beta)
+ * @param string $byoc The SID of a BYOC (Bring Your Own Carrier) trunk to route this call with. Note that `byoc` is only meaningful when `to` is a phone number; it will otherwise be ignored. (Beta)
* @return $this Fluent Builder
*/
- public function setByoc($byoc)
+ public function setByoc(string $byoc): self
{
$this->options['byoc'] = $byoc;
return $this;
}
+ /**
+ * The Reason for the outgoing call. Use it to specify the purpose of the call that is presented on the called party's phone. (Branded Calls Beta)
+ *
+ * @param string $callReason The Reason for the outgoing call. Use it to specify the purpose of the call that is presented on the called party's phone. (Branded Calls Beta)
+ * @return $this Fluent Builder
+ */
+ public function setCallReason(string $callReason): self
+ {
+ $this->options['callReason'] = $callReason;
+ return $this;
+ }
+
+ /**
+ * A token string needed to invoke a forwarded call. A call_token is generated when an incoming call is received on a Twilio number. Pass an incoming call's call_token value to a forwarded call via the call_token parameter when creating a new call. A forwarded call should bear the same CallerID of the original incoming call.
+ *
+ * @param string $callToken A token string needed to invoke a forwarded call. A call_token is generated when an incoming call is received on a Twilio number. Pass an incoming call's call_token value to a forwarded call via the call_token parameter when creating a new call. A forwarded call should bear the same CallerID of the original incoming call.
+ * @return $this Fluent Builder
+ */
+ public function setCallToken(string $callToken): self
+ {
+ $this->options['callToken'] = $callToken;
+ return $this;
+ }
+
+ /**
+ * The audio track to record for the call. Can be: `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the audio that is received by Twilio. `outbound` records the audio that is generated from Twilio. `both` records the audio that is received and generated by Twilio.
+ *
+ * @param string $recordingTrack The audio track to record for the call. Can be: `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the audio that is received by Twilio. `outbound` records the audio that is generated from Twilio. `both` records the audio that is received and generated by Twilio.
+ * @return $this Fluent Builder
+ */
+ public function setRecordingTrack(string $recordingTrack): self
+ {
+ $this->options['recordingTrack'] = $recordingTrack;
+ return $this;
+ }
+
+ /**
+ * The maximum duration of the call in seconds. Constraints depend on account and configuration.
+ *
+ * @param int $timeLimit The maximum duration of the call in seconds. Constraints depend on account and configuration.
+ * @return $this Fluent Builder
+ */
+ public function setTimeLimit(int $timeLimit): self
+ {
+ $this->options['timeLimit'] = $timeLimit;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.CreateCallOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.CreateCallOptions ' . $options . ']';
}
}
+
+
class ReadCallOptions extends Options
-{
+ {
/**
- * @param string $to Phone number or Client identifier of calls to include
- * @param string $from Phone number or Client identifier to filter `from` on
- * @param string $parentCallSid Parent call SID to filter on
- * @param string $status The status of the resources to read
- * @param string $startTimeBefore Only include calls that started on this date
- * @param string $startTime Only include calls that started on this date
- * @param string $startTimeAfter Only include calls that started on this date
- * @param string $endTimeBefore Only include calls that ended on this date
- * @param string $endTime Only include calls that ended on this date
- * @param string $endTimeAfter Only include calls that ended on this date
+ * @param string $to Only show calls made to this phone number, SIP address, Client identifier or SIM SID.
+ * @param string $from Only include calls from this phone number, SIP address, Client identifier or SIM SID.
+ * @param string $parentCallSid Only include calls spawned by calls with this SID.
+ * @param string $status The status of the calls to include. Can be: `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy`, or `no-answer`.
+ * @param string $startTimeBefore Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
+ * @param string $startTime Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
+ * @param string $startTimeAfter Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
+ * @param string $endTimeBefore Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
+ * @param string $endTime Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
+ * @param string $endTimeAfter Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
*/
- public function __construct($to = Values::NONE, $from = Values::NONE, $parentCallSid = Values::NONE, $status = Values::NONE, $startTimeBefore = Values::NONE, $startTime = Values::NONE, $startTimeAfter = Values::NONE, $endTimeBefore = Values::NONE, $endTime = Values::NONE, $endTimeAfter = Values::NONE)
- {
+ public function __construct(
+
+ string $to = Values::NONE,
+ string $from = Values::NONE,
+ string $parentCallSid = Values::NONE,
+ string $status = Values::NONE,
+ string $startTimeBefore = null,
+ string $startTime = null,
+ string $startTimeAfter = null,
+ string $endTimeBefore = null,
+ string $endTime = null,
+ string $endTimeAfter = null
+
+ ) {
$this->options['to'] = $to;
$this->options['from'] = $from;
$this->options['parentCallSid'] = $parentCallSid;
@@ -571,10 +778,10 @@ public function __construct($to = Values::NONE, $from = Values::NONE, $parentCal
/**
* Only show calls made to this phone number, SIP address, Client identifier or SIM SID.
*
- * @param string $to Phone number or Client identifier of calls to include
+ * @param string $to Only show calls made to this phone number, SIP address, Client identifier or SIM SID.
* @return $this Fluent Builder
*/
- public function setTo($to)
+ public function setTo(string $to): self
{
$this->options['to'] = $to;
return $this;
@@ -583,10 +790,10 @@ public function setTo($to)
/**
* Only include calls from this phone number, SIP address, Client identifier or SIM SID.
*
- * @param string $from Phone number or Client identifier to filter `from` on
+ * @param string $from Only include calls from this phone number, SIP address, Client identifier or SIM SID.
* @return $this Fluent Builder
*/
- public function setFrom($from)
+ public function setFrom(string $from): self
{
$this->options['from'] = $from;
return $this;
@@ -595,10 +802,10 @@ public function setFrom($from)
/**
* Only include calls spawned by calls with this SID.
*
- * @param string $parentCallSid Parent call SID to filter on
+ * @param string $parentCallSid Only include calls spawned by calls with this SID.
* @return $this Fluent Builder
*/
- public function setParentCallSid($parentCallSid)
+ public function setParentCallSid(string $parentCallSid): self
{
$this->options['parentCallSid'] = $parentCallSid;
return $this;
@@ -607,82 +814,82 @@ public function setParentCallSid($parentCallSid)
/**
* The status of the calls to include. Can be: `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy`, or `no-answer`.
*
- * @param string $status The status of the resources to read
+ * @param string $status The status of the calls to include. Can be: `queued`, `ringing`, `in-progress`, `canceled`, `completed`, `failed`, `busy`, or `no-answer`.
* @return $this Fluent Builder
*/
- public function setStatus($status)
+ public function setStatus(string $status): self
{
$this->options['status'] = $status;
return $this;
}
/**
- * Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
+ * Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
*
- * @param string $startTimeBefore Only include calls that started on this date
+ * @param string $startTimeBefore Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
* @return $this Fluent Builder
*/
- public function setStartTimeBefore($startTimeBefore)
+ public function setStartTimeBefore(string $startTimeBefore): self
{
$this->options['startTimeBefore'] = $startTimeBefore;
return $this;
}
/**
- * Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
+ * Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
*
- * @param string $startTime Only include calls that started on this date
+ * @param string $startTime Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
* @return $this Fluent Builder
*/
- public function setStartTime($startTime)
+ public function setStartTime(string $startTime): self
{
$this->options['startTime'] = $startTime;
return $this;
}
/**
- * Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
+ * Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
*
- * @param string $startTimeAfter Only include calls that started on this date
+ * @param string $startTimeAfter Only include calls that started on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that started on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read calls that started on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read calls that started on or after midnight of this date.
* @return $this Fluent Builder
*/
- public function setStartTimeAfter($startTimeAfter)
+ public function setStartTimeAfter(string $startTimeAfter): self
{
$this->options['startTimeAfter'] = $startTimeAfter;
return $this;
}
/**
- * Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
+ * Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
*
- * @param string $endTimeBefore Only include calls that ended on this date
+ * @param string $endTimeBefore Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
* @return $this Fluent Builder
*/
- public function setEndTimeBefore($endTimeBefore)
+ public function setEndTimeBefore(string $endTimeBefore): self
{
$this->options['endTimeBefore'] = $endTimeBefore;
return $this;
}
/**
- * Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
+ * Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
*
- * @param string $endTime Only include calls that ended on this date
+ * @param string $endTime Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
* @return $this Fluent Builder
*/
- public function setEndTime($endTime)
+ public function setEndTime(string $endTime): self
{
$this->options['endTime'] = $endTime;
return $this;
}
/**
- * Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
+ * Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
*
- * @param string $endTimeAfter Only include calls that ended on this date
+ * @param string $endTimeAfter Only include calls that ended on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only calls that ended on this date. You can also specify an inequality, such as `EndTime<=YYYY-MM-DD`, to read calls that ended on or before midnight of this date, and `EndTime>=YYYY-MM-DD` to read calls that ended on or after midnight of this date.
* @return $this Fluent Builder
*/
- public function setEndTimeAfter($endTimeAfter)
+ public function setEndTimeAfter(string $endTimeAfter): self
{
$this->options['endTimeAfter'] = $endTimeAfter;
return $this;
@@ -693,34 +900,39 @@ public function setEndTimeAfter($endTimeAfter)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.ReadCallOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.ReadCallOptions ' . $options . ']';
}
}
class UpdateCallOptions extends Options
-{
+ {
/**
- * @param string $url The absolute URL that returns TwiML for this call
- * @param string $method HTTP method to use to fetch TwiML
- * @param string $status The new status to update the call with.
- * @param string $fallbackUrl Fallback URL in case of error
- * @param string $fallbackMethod HTTP Method to use with fallback_url
- * @param string $statusCallback The URL we should call to send status
- * information to your application
- * @param string $statusCallbackMethod HTTP Method to use to call
- * status_callback
- * @param string $twiml TwiML instructions for the call
+ * @param string $url The absolute URL that returns the TwiML instructions for the call. We will call this URL using the `method` when the call connects. For more information, see the [Url Parameter](https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter) section in [Making Calls](https://www.twilio.com/docs/voice/make-calls).
+ * @param string $method The HTTP method we should use when calling the `url`. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored.
+ * @param string $status
+ * @param string $fallbackUrl The URL that we call using the `fallback_method` if an error occurs when requesting or executing the TwiML at `url`. If an `application_sid` parameter is present, this parameter is ignored.
+ * @param string $fallbackMethod The HTTP method that we should use to request the `fallback_url`. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored.
+ * @param string $statusCallback The URL we should call using the `status_callback_method` to send status information to your application. If no `status_callback_event` is specified, we will send the `completed` status. If an `application_sid` parameter is present, this parameter is ignored. URLs must contain a valid hostname (underscores are not permitted).
+ * @param string $statusCallbackMethod The HTTP method we should use when requesting the `status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored.
+ * @param string $twiml TwiML instructions for the call Twilio will use without fetching Twiml from url. Twiml and url parameters are mutually exclusive
+ * @param int $timeLimit The maximum duration of the call in seconds. Constraints depend on account and configuration.
*/
- public function __construct($url = Values::NONE, $method = Values::NONE, $status = Values::NONE, $fallbackUrl = Values::NONE, $fallbackMethod = Values::NONE, $statusCallback = Values::NONE, $statusCallbackMethod = Values::NONE, $twiml = Values::NONE)
- {
+ public function __construct(
+
+ string $url = Values::NONE,
+ string $method = Values::NONE,
+ string $status = Values::NONE,
+ string $fallbackUrl = Values::NONE,
+ string $fallbackMethod = Values::NONE,
+ string $statusCallback = Values::NONE,
+ string $statusCallbackMethod = Values::NONE,
+ string $twiml = Values::NONE,
+ int $timeLimit = Values::INT_NONE
+
+ ) {
$this->options['url'] = $url;
$this->options['method'] = $method;
$this->options['status'] = $status;
@@ -729,15 +941,16 @@ public function __construct($url = Values::NONE, $method = Values::NONE, $status
$this->options['statusCallback'] = $statusCallback;
$this->options['statusCallbackMethod'] = $statusCallbackMethod;
$this->options['twiml'] = $twiml;
+ $this->options['timeLimit'] = $timeLimit;
}
/**
* The absolute URL that returns the TwiML instructions for the call. We will call this URL using the `method` when the call connects. For more information, see the [Url Parameter](https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter) section in [Making Calls](https://www.twilio.com/docs/voice/make-calls).
*
- * @param string $url The absolute URL that returns TwiML for this call
+ * @param string $url The absolute URL that returns the TwiML instructions for the call. We will call this URL using the `method` when the call connects. For more information, see the [Url Parameter](https://www.twilio.com/docs/voice/make-calls#specify-a-url-parameter) section in [Making Calls](https://www.twilio.com/docs/voice/make-calls).
* @return $this Fluent Builder
*/
- public function setUrl($url)
+ public function setUrl(string $url): self
{
$this->options['url'] = $url;
return $this;
@@ -746,22 +959,20 @@ public function setUrl($url)
/**
* The HTTP method we should use when calling the `url`. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored.
*
- * @param string $method HTTP method to use to fetch TwiML
+ * @param string $method The HTTP method we should use when calling the `url`. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored.
* @return $this Fluent Builder
*/
- public function setMethod($method)
+ public function setMethod(string $method): self
{
$this->options['method'] = $method;
return $this;
}
/**
- * The new status of the resource. Can be: `canceled` or `completed`. Specifying `canceled` will attempt to hang up calls that are queued or ringing; however, it will not affect calls already in progress. Specifying `completed` will attempt to hang up a call even if it's already in progress.
- *
- * @param string $status The new status to update the call with.
+ * @param string $status
* @return $this Fluent Builder
*/
- public function setStatus($status)
+ public function setStatus(string $status): self
{
$this->options['status'] = $status;
return $this;
@@ -770,10 +981,10 @@ public function setStatus($status)
/**
* The URL that we call using the `fallback_method` if an error occurs when requesting or executing the TwiML at `url`. If an `application_sid` parameter is present, this parameter is ignored.
*
- * @param string $fallbackUrl Fallback URL in case of error
+ * @param string $fallbackUrl The URL that we call using the `fallback_method` if an error occurs when requesting or executing the TwiML at `url`. If an `application_sid` parameter is present, this parameter is ignored.
* @return $this Fluent Builder
*/
- public function setFallbackUrl($fallbackUrl)
+ public function setFallbackUrl(string $fallbackUrl): self
{
$this->options['fallbackUrl'] = $fallbackUrl;
return $this;
@@ -782,10 +993,10 @@ public function setFallbackUrl($fallbackUrl)
/**
* The HTTP method that we should use to request the `fallback_url`. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored.
*
- * @param string $fallbackMethod HTTP Method to use with fallback_url
+ * @param string $fallbackMethod The HTTP method that we should use to request the `fallback_url`. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored.
* @return $this Fluent Builder
*/
- public function setFallbackMethod($fallbackMethod)
+ public function setFallbackMethod(string $fallbackMethod): self
{
$this->options['fallbackMethod'] = $fallbackMethod;
return $this;
@@ -794,11 +1005,10 @@ public function setFallbackMethod($fallbackMethod)
/**
* The URL we should call using the `status_callback_method` to send status information to your application. If no `status_callback_event` is specified, we will send the `completed` status. If an `application_sid` parameter is present, this parameter is ignored. URLs must contain a valid hostname (underscores are not permitted).
*
- * @param string $statusCallback The URL we should call to send status
- * information to your application
+ * @param string $statusCallback The URL we should call using the `status_callback_method` to send status information to your application. If no `status_callback_event` is specified, we will send the `completed` status. If an `application_sid` parameter is present, this parameter is ignored. URLs must contain a valid hostname (underscores are not permitted).
* @return $this Fluent Builder
*/
- public function setStatusCallback($statusCallback)
+ public function setStatusCallback(string $statusCallback): self
{
$this->options['statusCallback'] = $statusCallback;
return $this;
@@ -807,11 +1017,10 @@ public function setStatusCallback($statusCallback)
/**
* The HTTP method we should use when requesting the `status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored.
*
- * @param string $statusCallbackMethod HTTP Method to use to call
- * status_callback
+ * @param string $statusCallbackMethod The HTTP method we should use when requesting the `status_callback` URL. Can be: `GET` or `POST` and the default is `POST`. If an `application_sid` parameter is present, this parameter is ignored.
* @return $this Fluent Builder
*/
- public function setStatusCallbackMethod($statusCallbackMethod)
+ public function setStatusCallbackMethod(string $statusCallbackMethod): self
{
$this->options['statusCallbackMethod'] = $statusCallbackMethod;
return $this;
@@ -820,28 +1029,36 @@ public function setStatusCallbackMethod($statusCallbackMethod)
/**
* TwiML instructions for the call Twilio will use without fetching Twiml from url. Twiml and url parameters are mutually exclusive
*
- * @param string $twiml TwiML instructions for the call
+ * @param string $twiml TwiML instructions for the call Twilio will use without fetching Twiml from url. Twiml and url parameters are mutually exclusive
* @return $this Fluent Builder
*/
- public function setTwiml($twiml)
+ public function setTwiml(string $twiml): self
{
$this->options['twiml'] = $twiml;
return $this;
}
+ /**
+ * The maximum duration of the call in seconds. Constraints depend on account and configuration.
+ *
+ * @param int $timeLimit The maximum duration of the call in seconds. Constraints depend on account and configuration.
+ * @return $this Fluent Builder
+ */
+ public function setTimeLimit(int $timeLimit): self
+ {
+ $this->options['timeLimit'] = $timeLimit;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.UpdateCallOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.UpdateCallOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/CallPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/CallPage.php
index 4513fdc..d278c56 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/CallPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/CallPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return CallInstance \Twilio\Rest\Api\V2010\Account\CallInstance
+ */
+ public function buildInstance(array $payload): CallInstance
{
return new CallInstance($this->version, $payload, $this->solution['accountSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.CallPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Conference/ParticipantContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Conference/ParticipantContext.php
index 8a2a6d0..93593d4 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Conference/ParticipantContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Conference/ParticipantContext.php
@@ -2,62 +2,88 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Conference;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
class ParticipantContext extends InstanceContext
-{
+ {
/**
* Initialize the ParticipantContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * to fetch
- * @param string $conferenceSid The SID of the conference with the participant
- * to fetch
- * @param string $callSid The Call SID of the resource to fetch
- * @return \Twilio\Rest\Api\V2010\Account\Conference\ParticipantContext
+ * @param Version $version Version that contains the resource
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
+ * @param string $conferenceSid The SID of the participant's conference.
+ * @param string $callSid The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID or label of the participant to delete. Non URL safe characters in a label must be percent encoded, for example, a space character is represented as %20.
*/
- public function __construct(Version $version, $accountSid, $conferenceSid, $callSid)
- {
+ public function __construct(
+ Version $version,
+ $accountSid,
+ $conferenceSid,
+ $callSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array(
- 'accountSid' => $accountSid,
- 'conferenceSid' => $conferenceSid,
- 'callSid' => $callSid,
- );
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+ 'conferenceSid' =>
+ $conferenceSid,
+ 'callSid' =>
+ $callSid,
+ ];
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Conferences/' . \rawurlencode($conferenceSid) . '/Participants/' . \rawurlencode($callSid) . '.json';
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Conferences/' . \rawurlencode($conferenceSid)
+ .'/Participants/' . \rawurlencode($callSid)
+ .'.json';
}
/**
- * Fetch a ParticipantInstance
+ * Delete the ParticipantInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
+ }
+
+
+ /**
+ * Fetch the ParticipantInstance
*
* @return ParticipantInstance Fetched ParticipantInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): ParticipantInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new ParticipantInstance(
$this->version,
@@ -68,6 +94,7 @@ public function fetch()
);
}
+
/**
* Update the ParticipantInstance
*
@@ -75,31 +102,40 @@ public function fetch()
* @return ParticipantInstance Updated ParticipantInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ParticipantInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'Muted' => Serialize::booleanToString($options['muted']),
- 'Hold' => Serialize::booleanToString($options['hold']),
- 'HoldUrl' => $options['holdUrl'],
- 'HoldMethod' => $options['holdMethod'],
- 'AnnounceUrl' => $options['announceUrl'],
- 'AnnounceMethod' => $options['announceMethod'],
- 'WaitUrl' => $options['waitUrl'],
- 'WaitMethod' => $options['waitMethod'],
- 'BeepOnExit' => Serialize::booleanToString($options['beepOnExit']),
- 'EndConferenceOnExit' => Serialize::booleanToString($options['endConferenceOnExit']),
- 'Coaching' => Serialize::booleanToString($options['coaching']),
- 'CallSidToCoach' => $options['callSidToCoach'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'Muted' =>
+ Serialize::booleanToString($options['muted']),
+ 'Hold' =>
+ Serialize::booleanToString($options['hold']),
+ 'HoldUrl' =>
+ $options['holdUrl'],
+ 'HoldMethod' =>
+ $options['holdMethod'],
+ 'AnnounceUrl' =>
+ $options['announceUrl'],
+ 'AnnounceMethod' =>
+ $options['announceMethod'],
+ 'WaitUrl' =>
+ $options['waitUrl'],
+ 'WaitMethod' =>
+ $options['waitMethod'],
+ 'BeepOnExit' =>
+ Serialize::booleanToString($options['beepOnExit']),
+ 'EndConferenceOnExit' =>
+ Serialize::booleanToString($options['endConferenceOnExit']),
+ 'Coaching' =>
+ Serialize::booleanToString($options['coaching']),
+ 'CallSidToCoach' =>
+ $options['callSidToCoach'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new ParticipantInstance(
$this->version,
@@ -110,28 +146,18 @@ public function update($options = array())
);
}
- /**
- * Deletes the ParticipantInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.ParticipantContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Conference/ParticipantInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Conference/ParticipantInstance.php
index 2eceaad..5227bfc 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Conference/ParticipantInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Conference/ParticipantInstance.php
@@ -2,55 +2,66 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Conference;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property string $callSid
- * @property string $callSidToCoach
- * @property bool $coaching
- * @property string $conferenceSid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property bool $endConferenceOnExit
- * @property bool $muted
- * @property bool $hold
- * @property bool $startConferenceOnEnter
+ * @property string|null $accountSid
+ * @property string|null $callSid
+ * @property string|null $label
+ * @property string|null $callSidToCoach
+ * @property bool|null $coaching
+ * @property string|null $conferenceSid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property bool|null $endConferenceOnExit
+ * @property bool|null $muted
+ * @property bool|null $hold
+ * @property bool|null $startConferenceOnEnter
* @property string $status
- * @property string $uri
+ * @property string|null $queueTime
+ * @property string|null $uri
*/
class ParticipantInstance extends InstanceResource
{
/**
* Initialize the ParticipantInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $conferenceSid The SID of the conference the participant is in
- * @param string $callSid The Call SID of the resource to fetch
- * @return \Twilio\Rest\Api\V2010\Account\Conference\ParticipantInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
+ * @param string $conferenceSid The SID of the participant's conference.
+ * @param string $callSid The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID or label of the participant to delete. Non URL safe characters in a label must be percent encoded, for example, a space character is represented as %20.
*/
- public function __construct(Version $version, array $payload, $accountSid, $conferenceSid, $callSid = null)
+ public function __construct(Version $version, array $payload, string $accountSid, string $conferenceSid, string $callSid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'callSid' => Values::array_get($payload, 'call_sid'),
+ 'label' => Values::array_get($payload, 'label'),
'callSidToCoach' => Values::array_get($payload, 'call_sid_to_coach'),
'coaching' => Values::array_get($payload, 'coaching'),
'conferenceSid' => Values::array_get($payload, 'conference_sid'),
@@ -61,26 +72,20 @@ public function __construct(Version $version, array $payload, $accountSid, $conf
'hold' => Values::array_get($payload, 'hold'),
'startConferenceOnEnter' => Values::array_get($payload, 'start_conference_on_enter'),
'status' => Values::array_get($payload, 'status'),
+ 'queueTime' => Values::array_get($payload, 'queue_time'),
'uri' => Values::array_get($payload, 'uri'),
- );
+ ];
- $this->solution = array(
- 'accountSid' => $accountSid,
- 'conferenceSid' => $conferenceSid,
- 'callSid' => $callSid ?: $this->properties['callSid'],
- );
+ $this->solution = ['accountSid' => $accountSid, 'conferenceSid' => $conferenceSid, 'callSid' => $callSid ?: $this->properties['callSid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Api\V2010\Account\Conference\ParticipantContext Context
- * for
- * this
- * ParticipantInstance
+ * @return ParticipantContext Context for this ParticipantInstance
*/
- protected function proxy()
+ protected function proxy(): ParticipantContext
{
if (!$this->context) {
$this->context = new ParticipantContext(
@@ -95,37 +100,40 @@ protected function proxy()
}
/**
- * Fetch a ParticipantInstance
+ * Delete the ParticipantInstance
*
- * @return ParticipantInstance Fetched ParticipantInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Update the ParticipantInstance
+ * Fetch the ParticipantInstance
*
- * @param array|Options $options Optional Arguments
- * @return ParticipantInstance Updated ParticipantInstance
+ * @return ParticipantInstance Fetched ParticipantInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): ParticipantInstance
{
- return $this->proxy()->update($options);
+
+ return $this->proxy()->fetch();
}
/**
- * Deletes the ParticipantInstance
+ * Update the ParticipantInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return ParticipantInstance Updated ParticipantInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): ParticipantInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->update($options);
}
/**
@@ -135,7 +143,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -154,12 +162,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.ParticipantInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Conference/ParticipantList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Conference/ParticipantList.php
index e5d9761..0b579a4 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Conference/ParticipantList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Conference/ParticipantList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\Conference;
@@ -12,93 +19,158 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class ParticipantList extends ListResource
-{
+ {
/**
* Construct the ParticipantList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $conferenceSid The SID of the conference the participant is in
- * @return \Twilio\Rest\Api\V2010\Account\Conference\ParticipantList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
+ * @param string $conferenceSid The SID of the participant's conference.
*/
- public function __construct(Version $version, $accountSid, $conferenceSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid,
+ string $conferenceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'conferenceSid' => $conferenceSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ 'conferenceSid' =>
+ $conferenceSid,
+
+ ];
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Conferences/' . \rawurlencode($conferenceSid) . '/Participants.json';
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Conferences/' . \rawurlencode($conferenceSid)
+ .'/Participants.json';
}
/**
- * Create a new ParticipantInstance
+ * Create the ParticipantInstance
*
- * @param string $from The `from` phone number used to invite a participant
- * @param string $to The number, client id, or sip address of the new
- * participant
+ * @param string $from The phone number, Client identifier, or username portion of SIP address that made this call. Phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., +16175551212). Client identifiers are formatted `client:name`. If using a phone number, it must be a Twilio number or a Verified [outgoing caller id](https://www.twilio.com/docs/voice/api/outgoing-caller-ids) for your account. If the `to` parameter is a phone number, `from` must also be a phone number. If `to` is sip address, this value of `from` should be a username portion to be used to populate the P-Asserted-Identity header that is passed to the SIP endpoint.
+ * @param string $to The phone number, SIP address, or Client identifier that received this call. Phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., +16175551212). SIP addresses are formatted as `sip:name@company.com`. Client identifiers are formatted `client:name`. [Custom parameters](https://www.twilio.com/docs/voice/api/conference-participant-resource#custom-parameters) may also be specified.
* @param array|Options $options Optional Arguments
- * @return ParticipantInstance Newly created ParticipantInstance
+ * @return ParticipantInstance Created ParticipantInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($from, $to, $options = array())
+ public function create(string $from, string $to, array $options = []): ParticipantInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'From' => $from,
- 'To' => $to,
- 'StatusCallback' => $options['statusCallback'],
- 'StatusCallbackMethod' => $options['statusCallbackMethod'],
- 'StatusCallbackEvent' => Serialize::map($options['statusCallbackEvent'], function ($e) {
- return $e;
- }),
- 'Timeout' => $options['timeout'],
- 'Record' => Serialize::booleanToString($options['record']),
- 'Muted' => Serialize::booleanToString($options['muted']),
- 'Beep' => $options['beep'],
- 'StartConferenceOnEnter' => Serialize::booleanToString($options['startConferenceOnEnter']),
- 'EndConferenceOnExit' => Serialize::booleanToString($options['endConferenceOnExit']),
- 'WaitUrl' => $options['waitUrl'],
- 'WaitMethod' => $options['waitMethod'],
- 'EarlyMedia' => Serialize::booleanToString($options['earlyMedia']),
- 'MaxParticipants' => $options['maxParticipants'],
- 'ConferenceRecord' => $options['conferenceRecord'],
- 'ConferenceTrim' => $options['conferenceTrim'],
- 'ConferenceStatusCallback' => $options['conferenceStatusCallback'],
- 'ConferenceStatusCallbackMethod' => $options['conferenceStatusCallbackMethod'],
- 'ConferenceStatusCallbackEvent' => Serialize::map($options['conferenceStatusCallbackEvent'], function ($e) {
- return $e;
- }),
- 'RecordingChannels' => $options['recordingChannels'],
- 'RecordingStatusCallback' => $options['recordingStatusCallback'],
- 'RecordingStatusCallbackMethod' => $options['recordingStatusCallbackMethod'],
- 'SipAuthUsername' => $options['sipAuthUsername'],
- 'SipAuthPassword' => $options['sipAuthPassword'],
- 'Region' => $options['region'],
- 'ConferenceRecordingStatusCallback' => $options['conferenceRecordingStatusCallback'],
- 'ConferenceRecordingStatusCallbackMethod' => $options['conferenceRecordingStatusCallbackMethod'],
- 'RecordingStatusCallbackEvent' => Serialize::map($options['recordingStatusCallbackEvent'], function ($e) {
- return $e;
- }),
- 'ConferenceRecordingStatusCallbackEvent' => Serialize::map($options['conferenceRecordingStatusCallbackEvent'], function ($e) {
- return $e;
- }),
- 'Coaching' => Serialize::booleanToString($options['coaching']),
- 'CallSidToCoach' => $options['callSidToCoach'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'From' =>
+ $from,
+ 'To' =>
+ $to,
+ 'StatusCallback' =>
+ $options['statusCallback'],
+ 'StatusCallbackMethod' =>
+ $options['statusCallbackMethod'],
+ 'StatusCallbackEvent' =>
+ Serialize::map($options['statusCallbackEvent'], function ($e) { return $e; }),
+ 'Label' =>
+ $options['label'],
+ 'Timeout' =>
+ $options['timeout'],
+ 'Record' =>
+ Serialize::booleanToString($options['record']),
+ 'Muted' =>
+ Serialize::booleanToString($options['muted']),
+ 'Beep' =>
+ $options['beep'],
+ 'StartConferenceOnEnter' =>
+ Serialize::booleanToString($options['startConferenceOnEnter']),
+ 'EndConferenceOnExit' =>
+ Serialize::booleanToString($options['endConferenceOnExit']),
+ 'WaitUrl' =>
+ $options['waitUrl'],
+ 'WaitMethod' =>
+ $options['waitMethod'],
+ 'EarlyMedia' =>
+ Serialize::booleanToString($options['earlyMedia']),
+ 'MaxParticipants' =>
+ $options['maxParticipants'],
+ 'ConferenceRecord' =>
+ $options['conferenceRecord'],
+ 'ConferenceTrim' =>
+ $options['conferenceTrim'],
+ 'ConferenceStatusCallback' =>
+ $options['conferenceStatusCallback'],
+ 'ConferenceStatusCallbackMethod' =>
+ $options['conferenceStatusCallbackMethod'],
+ 'ConferenceStatusCallbackEvent' =>
+ Serialize::map($options['conferenceStatusCallbackEvent'], function ($e) { return $e; }),
+ 'RecordingChannels' =>
+ $options['recordingChannels'],
+ 'RecordingStatusCallback' =>
+ $options['recordingStatusCallback'],
+ 'RecordingStatusCallbackMethod' =>
+ $options['recordingStatusCallbackMethod'],
+ 'SipAuthUsername' =>
+ $options['sipAuthUsername'],
+ 'SipAuthPassword' =>
+ $options['sipAuthPassword'],
+ 'Region' =>
+ $options['region'],
+ 'ConferenceRecordingStatusCallback' =>
+ $options['conferenceRecordingStatusCallback'],
+ 'ConferenceRecordingStatusCallbackMethod' =>
+ $options['conferenceRecordingStatusCallbackMethod'],
+ 'RecordingStatusCallbackEvent' =>
+ Serialize::map($options['recordingStatusCallbackEvent'], function ($e) { return $e; }),
+ 'ConferenceRecordingStatusCallbackEvent' =>
+ Serialize::map($options['conferenceRecordingStatusCallbackEvent'], function ($e) { return $e; }),
+ 'Coaching' =>
+ Serialize::booleanToString($options['coaching']),
+ 'CallSidToCoach' =>
+ $options['callSidToCoach'],
+ 'JitterBufferSize' =>
+ $options['jitterBufferSize'],
+ 'Byoc' =>
+ $options['byoc'],
+ 'CallerId' =>
+ $options['callerId'],
+ 'CallReason' =>
+ $options['callReason'],
+ 'RecordingTrack' =>
+ $options['recordingTrack'],
+ 'TimeLimit' =>
+ $options['timeLimit'],
+ 'MachineDetection' =>
+ $options['machineDetection'],
+ 'MachineDetectionTimeout' =>
+ $options['machineDetectionTimeout'],
+ 'MachineDetectionSpeechThreshold' =>
+ $options['machineDetectionSpeechThreshold'],
+ 'MachineDetectionSpeechEndThreshold' =>
+ $options['machineDetectionSpeechEndThreshold'],
+ 'MachineDetectionSilenceTimeout' =>
+ $options['machineDetectionSilenceTimeout'],
+ 'AmdStatusCallback' =>
+ $options['amdStatusCallback'],
+ 'AmdStatusCallbackMethod' =>
+ $options['amdStatusCallbackMethod'],
+ 'Trim' =>
+ $options['trim'],
+ 'CallToken' =>
+ $options['callToken'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
return new ParticipantInstance(
$this->version,
@@ -108,82 +180,87 @@ public function create($from, $to, $options = array())
);
}
+
/**
- * Streams ParticipantInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Reads ParticipantInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
+ * @param int $limit Upper limit for the number of records to return. read()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
+ * page_size is defined but a limit is defined, read()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return ParticipantInstance[] Array of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($options, $limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
- * Reads ParticipantInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
+ * Streams ParticipantInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
+ * @param int $limit Upper limit for the number of records to return. stream()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
+ * page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return ParticipantInstance[] Array of results
+ * @return Stream stream of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
/**
* Retrieve a single page of ParticipantInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of ParticipantInstance
+ * @return ParticipantPage Page of ParticipantInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): ParticipantPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Muted' => Serialize::booleanToString($options['muted']),
- 'Hold' => Serialize::booleanToString($options['hold']),
- 'Coaching' => Serialize::booleanToString($options['coaching']),
+
+ $params = Values::of([
+ 'Muted' =>
+ Serialize::booleanToString($options['muted']),
+ 'Hold' =>
+ Serialize::booleanToString($options['hold']),
+ 'Coaching' =>
+ Serialize::booleanToString($options['coaching']),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new ParticipantPage($this->version, $response, $this->solution);
}
@@ -193,9 +270,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of ParticipantInstance
+ * @return ParticipantPage Page of ParticipantInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): ParticipantPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -205,13 +282,16 @@ public function getPage($targetUrl)
return new ParticipantPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a ParticipantContext
*
- * @param string $callSid The Call SID of the resource to fetch
- * @return \Twilio\Rest\Api\V2010\Account\Conference\ParticipantContext
+ * @param string $callSid The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID or label of the participant to delete. Non URL safe characters in a label must be percent encoded, for example, a space character is represented as %20.
*/
- public function getContext($callSid)
+ public function getContext(
+ string $callSid
+
+ ): ParticipantContext
{
return new ParticipantContext(
$this->version,
@@ -226,8 +306,8 @@ public function getContext($callSid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.ParticipantList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Conference/ParticipantOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Conference/ParticipantOptions.php
index cdfd8d7..5e38866 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Conference/ParticipantOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Conference/ParticipantOptions.php
@@ -1,10 +1,16 @@
`, ``, ``, or `` verbs.
+ * @param string $holdMethod The HTTP method we should use to call `hold_url`. Can be: `GET` or `POST` and the default is `GET`.
+ * @param string $announceUrl The URL we call using the `announce_method` for an announcement to the participant. The URL may return an MP3 file, a WAV file, or a TwiML document that contains ``, ``, ``, or `` verbs.
+ * @param string $announceMethod The HTTP method we should use to call `announce_url`. Can be: `GET` or `POST` and defaults to `POST`.
+ * @param string $waitUrl The URL we call using the `wait_method` for the music to play while participants are waiting for the conference to start. The URL may return an MP3 file, a WAV file, or a TwiML document that contains ``, ``, ``, or `` verbs. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic).
+ * @param string $waitMethod The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file.
+ * @param bool $beepOnExit Whether to play a notification beep to the conference when the participant exits. Can be: `true` or `false`.
+ * @param bool $endConferenceOnExit Whether to end the conference when the participant leaves. Can be: `true` or `false` and defaults to `false`.
+ * @param bool $coaching Whether the participant is coaching another call. Can be: `true` or `false`. If not present, defaults to `false` unless `call_sid_to_coach` is defined. If `true`, `call_sid_to_coach` must be defined.
+ * @param string $callSidToCoach The SID of the participant who is being `coached`. The participant being coached is the only participant who can hear the participant who is `coaching`.
+ * @return UpdateParticipantOptions Options builder
+ */
+ public static function update(
+
+ bool $muted = Values::BOOL_NONE,
+ bool $hold = Values::BOOL_NONE,
+ string $holdUrl = Values::NONE,
+ string $holdMethod = Values::NONE,
+ string $announceUrl = Values::NONE,
+ string $announceMethod = Values::NONE,
+ string $waitUrl = Values::NONE,
+ string $waitMethod = Values::NONE,
+ bool $beepOnExit = Values::BOOL_NONE,
+ bool $endConferenceOnExit = Values::BOOL_NONE,
+ bool $coaching = Values::BOOL_NONE,
+ string $callSidToCoach = Values::NONE
+
+ ): UpdateParticipantOptions
{
+ return new UpdateParticipantOptions(
+ $muted,
+ $hold,
+ $holdUrl,
+ $holdMethod,
+ $announceUrl,
+ $announceMethod,
+ $waitUrl,
+ $waitMethod,
+ $beepOnExit,
+ $endConferenceOnExit,
+ $coaching,
+ $callSidToCoach
+ );
+ }
+
+}
+
+class CreateParticipantOptions extends Options
+ {
+ /**
+ * @param string $statusCallback The URL we should call using the `status_callback_method` to send status information to your application.
+ * @param string $statusCallbackMethod The HTTP method we should use to call `status_callback`. Can be: `GET` and `POST` and defaults to `POST`.
+ * @param string[] $statusCallbackEvent The conference state changes that should generate a call to `status_callback`. Can be: `initiated`, `ringing`, `answered`, and `completed`. Separate multiple values with a space. The default value is `completed`.
+ * @param string $label A label for this participant. If one is supplied, it may subsequently be used to fetch, update or delete the participant.
+ * @param int $timeout The number of seconds that we should allow the phone to ring before assuming there is no answer. Can be an integer between `5` and `600`, inclusive. The default value is `60`. We always add a 5-second timeout buffer to outgoing calls, so value of 10 would result in an actual timeout that was closer to 15 seconds.
+ * @param bool $record Whether to record the participant and their conferences, including the time between conferences. Can be `true` or `false` and the default is `false`.
+ * @param bool $muted Whether the agent is muted in the conference. Can be `true` or `false` and the default is `false`.
+ * @param string $beep Whether to play a notification beep to the conference when the participant joins. Can be: `true`, `false`, `onEnter`, or `onExit`. The default value is `true`.
+ * @param bool $startConferenceOnEnter Whether to start the conference when the participant joins, if it has not already started. Can be: `true` or `false` and the default is `true`. If `false` and the conference has not started, the participant is muted and hears background music until another participant starts the conference.
+ * @param bool $endConferenceOnExit Whether to end the conference when the participant leaves. Can be: `true` or `false` and defaults to `false`.
+ * @param string $waitUrl The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic).
+ * @param string $waitMethod The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file.
+ * @param bool $earlyMedia Whether to allow an agent to hear the state of the outbound call, including ringing or disconnect messages. Can be: `true` or `false` and defaults to `true`.
+ * @param int $maxParticipants The maximum number of participants in the conference. Can be a positive integer from `2` to `250`. The default value is `250`.
+ * @param string $conferenceRecord Whether to record the conference the participant is joining. Can be: `true`, `false`, `record-from-start`, and `do-not-record`. The default value is `false`.
+ * @param string $conferenceTrim Whether to trim leading and trailing silence from the conference recording. Can be: `trim-silence` or `do-not-trim` and defaults to `trim-silence`.
+ * @param string $conferenceStatusCallback The URL we should call using the `conference_status_callback_method` when the conference events in `conference_status_callback_event` occur. Only the value set by the first participant to join the conference is used. Subsequent `conference_status_callback` values are ignored.
+ * @param string $conferenceStatusCallbackMethod The HTTP method we should use to call `conference_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
+ * @param string[] $conferenceStatusCallbackEvent The conference state changes that should generate a call to `conference_status_callback`. Can be: `start`, `end`, `join`, `leave`, `mute`, `hold`, `modify`, `speaker`, and `announcement`. Separate multiple values with a space. Defaults to `start end`.
+ * @param string $recordingChannels The recording channels for the final recording. Can be: `mono` or `dual` and the default is `mono`.
+ * @param string $recordingStatusCallback The URL that we should call using the `recording_status_callback_method` when the recording status changes.
+ * @param string $recordingStatusCallbackMethod The HTTP method we should use when we call `recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
+ * @param string $sipAuthUsername The SIP username used for authentication.
+ * @param string $sipAuthPassword The SIP password for authentication.
+ * @param string $region The [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls) where we should mix the recorded audio. Can be:`us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, or `jp1`.
+ * @param string $conferenceRecordingStatusCallback The URL we should call using the `conference_recording_status_callback_method` when the conference recording is available.
+ * @param string $conferenceRecordingStatusCallbackMethod The HTTP method we should use to call `conference_recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
+ * @param string[] $recordingStatusCallbackEvent The recording state changes that should generate a call to `recording_status_callback`. Can be: `started`, `in-progress`, `paused`, `resumed`, `stopped`, `completed`, `failed`, and `absent`. Separate multiple values with a space, ex: `'in-progress completed failed'`.
+ * @param string[] $conferenceRecordingStatusCallbackEvent The conference recording state changes that generate a call to `conference_recording_status_callback`. Can be: `in-progress`, `completed`, `failed`, and `absent`. Separate multiple values with a space, ex: `'in-progress completed failed'`
+ * @param bool $coaching Whether the participant is coaching another call. Can be: `true` or `false`. If not present, defaults to `false` unless `call_sid_to_coach` is defined. If `true`, `call_sid_to_coach` must be defined.
+ * @param string $callSidToCoach The SID of the participant who is being `coached`. The participant being coached is the only participant who can hear the participant who is `coaching`.
+ * @param string $jitterBufferSize Jitter buffer size for the connecting participant. Twilio will use this setting to apply Jitter Buffer before participant's audio is mixed into the conference. Can be: `off`, `small`, `medium`, and `large`. Default to `large`.
+ * @param string $byoc The SID of a BYOC (Bring Your Own Carrier) trunk to route this call with. Note that `byoc` is only meaningful when `to` is a phone number; it will otherwise be ignored. (Beta)
+ * @param string $callerId The phone number, Client identifier, or username portion of SIP address that made this call. Phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., +16175551212). Client identifiers are formatted `client:name`. If using a phone number, it must be a Twilio number or a Verified [outgoing caller id](https://www.twilio.com/docs/voice/api/outgoing-caller-ids) for your account. If the `to` parameter is a phone number, `callerId` must also be a phone number. If `to` is sip address, this value of `callerId` should be a username portion to be used to populate the From header that is passed to the SIP endpoint.
+ * @param string $callReason The Reason for the outgoing call. Use it to specify the purpose of the call that is presented on the called party's phone. (Branded Calls Beta)
+ * @param string $recordingTrack The audio track to record for the call. Can be: `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the audio that is received by Twilio. `outbound` records the audio that is sent from Twilio. `both` records the audio that is received and sent by Twilio.
+ * @param int $timeLimit The maximum duration of the call in seconds. Constraints depend on account and configuration.
+ * @param string $machineDetection Whether to detect if a human, answering machine, or fax has picked up the call. Can be: `Enable` or `DetectMessageEnd`. Use `Enable` if you would like us to return `AnsweredBy` as soon as the called party is identified. Use `DetectMessageEnd`, if you would like to leave a message on an answering machine. For more information, see [Answering Machine Detection](https://www.twilio.com/docs/voice/answering-machine-detection).
+ * @param int $machineDetectionTimeout The number of seconds that we should attempt to detect an answering machine before timing out and sending a voice request with `AnsweredBy` of `unknown`. The default timeout is 30 seconds.
+ * @param int $machineDetectionSpeechThreshold The number of milliseconds that is used as the measuring stick for the length of the speech activity, where durations lower than this value will be interpreted as a human and longer than this value as a machine. Possible Values: 1000-6000. Default: 2400.
+ * @param int $machineDetectionSpeechEndThreshold The number of milliseconds of silence after speech activity at which point the speech activity is considered complete. Possible Values: 500-5000. Default: 1200.
+ * @param int $machineDetectionSilenceTimeout The number of milliseconds of initial silence after which an `unknown` AnsweredBy result will be returned. Possible Values: 2000-10000. Default: 5000.
+ * @param string $amdStatusCallback The URL that we should call using the `amd_status_callback_method` to notify customer application whether the call was answered by human, machine or fax.
+ * @param string $amdStatusCallbackMethod The HTTP method we should use when calling the `amd_status_callback` URL. Can be: `GET` or `POST` and the default is `POST`.
+ * @param string $trim Whether to trim any leading and trailing silence from the participant recording. Can be: `trim-silence` or `do-not-trim` and the default is `trim-silence`.
+ * @param string $callToken A token string needed to invoke a forwarded call. A call_token is generated when an incoming call is received on a Twilio number. Pass an incoming call's call_token value to a forwarded call via the call_token parameter when creating a new call. A forwarded call should bear the same CallerID of the original incoming call.
+ */
+ public function __construct(
+
+ string $statusCallback = Values::NONE,
+ string $statusCallbackMethod = Values::NONE,
+ array $statusCallbackEvent = Values::ARRAY_NONE,
+ string $label = Values::NONE,
+ int $timeout = Values::INT_NONE,
+ bool $record = Values::BOOL_NONE,
+ bool $muted = Values::BOOL_NONE,
+ string $beep = Values::NONE,
+ bool $startConferenceOnEnter = Values::BOOL_NONE,
+ bool $endConferenceOnExit = Values::BOOL_NONE,
+ string $waitUrl = Values::NONE,
+ string $waitMethod = Values::NONE,
+ bool $earlyMedia = Values::BOOL_NONE,
+ int $maxParticipants = Values::INT_NONE,
+ string $conferenceRecord = Values::NONE,
+ string $conferenceTrim = Values::NONE,
+ string $conferenceStatusCallback = Values::NONE,
+ string $conferenceStatusCallbackMethod = Values::NONE,
+ array $conferenceStatusCallbackEvent = Values::ARRAY_NONE,
+ string $recordingChannels = Values::NONE,
+ string $recordingStatusCallback = Values::NONE,
+ string $recordingStatusCallbackMethod = Values::NONE,
+ string $sipAuthUsername = Values::NONE,
+ string $sipAuthPassword = Values::NONE,
+ string $region = Values::NONE,
+ string $conferenceRecordingStatusCallback = Values::NONE,
+ string $conferenceRecordingStatusCallbackMethod = Values::NONE,
+ array $recordingStatusCallbackEvent = Values::ARRAY_NONE,
+ array $conferenceRecordingStatusCallbackEvent = Values::ARRAY_NONE,
+ bool $coaching = Values::BOOL_NONE,
+ string $callSidToCoach = Values::NONE,
+ string $jitterBufferSize = Values::NONE,
+ string $byoc = Values::NONE,
+ string $callerId = Values::NONE,
+ string $callReason = Values::NONE,
+ string $recordingTrack = Values::NONE,
+ int $timeLimit = Values::INT_NONE,
+ string $machineDetection = Values::NONE,
+ int $machineDetectionTimeout = Values::INT_NONE,
+ int $machineDetectionSpeechThreshold = Values::INT_NONE,
+ int $machineDetectionSpeechEndThreshold = Values::INT_NONE,
+ int $machineDetectionSilenceTimeout = Values::INT_NONE,
+ string $amdStatusCallback = Values::NONE,
+ string $amdStatusCallbackMethod = Values::NONE,
+ string $trim = Values::NONE,
+ string $callToken = Values::NONE
+
+ ) {
+ $this->options['statusCallback'] = $statusCallback;
+ $this->options['statusCallbackMethod'] = $statusCallbackMethod;
+ $this->options['statusCallbackEvent'] = $statusCallbackEvent;
+ $this->options['label'] = $label;
+ $this->options['timeout'] = $timeout;
+ $this->options['record'] = $record;
$this->options['muted'] = $muted;
- $this->options['hold'] = $hold;
- $this->options['holdUrl'] = $holdUrl;
- $this->options['holdMethod'] = $holdMethod;
- $this->options['announceUrl'] = $announceUrl;
- $this->options['announceMethod'] = $announceMethod;
+ $this->options['beep'] = $beep;
+ $this->options['startConferenceOnEnter'] = $startConferenceOnEnter;
+ $this->options['endConferenceOnExit'] = $endConferenceOnExit;
$this->options['waitUrl'] = $waitUrl;
$this->options['waitMethod'] = $waitMethod;
- $this->options['beepOnExit'] = $beepOnExit;
- $this->options['endConferenceOnExit'] = $endConferenceOnExit;
+ $this->options['earlyMedia'] = $earlyMedia;
+ $this->options['maxParticipants'] = $maxParticipants;
+ $this->options['conferenceRecord'] = $conferenceRecord;
+ $this->options['conferenceTrim'] = $conferenceTrim;
+ $this->options['conferenceStatusCallback'] = $conferenceStatusCallback;
+ $this->options['conferenceStatusCallbackMethod'] = $conferenceStatusCallbackMethod;
+ $this->options['conferenceStatusCallbackEvent'] = $conferenceStatusCallbackEvent;
+ $this->options['recordingChannels'] = $recordingChannels;
+ $this->options['recordingStatusCallback'] = $recordingStatusCallback;
+ $this->options['recordingStatusCallbackMethod'] = $recordingStatusCallbackMethod;
+ $this->options['sipAuthUsername'] = $sipAuthUsername;
+ $this->options['sipAuthPassword'] = $sipAuthPassword;
+ $this->options['region'] = $region;
+ $this->options['conferenceRecordingStatusCallback'] = $conferenceRecordingStatusCallback;
+ $this->options['conferenceRecordingStatusCallbackMethod'] = $conferenceRecordingStatusCallbackMethod;
+ $this->options['recordingStatusCallbackEvent'] = $recordingStatusCallbackEvent;
+ $this->options['conferenceRecordingStatusCallbackEvent'] = $conferenceRecordingStatusCallbackEvent;
$this->options['coaching'] = $coaching;
$this->options['callSidToCoach'] = $callSidToCoach;
+ $this->options['jitterBufferSize'] = $jitterBufferSize;
+ $this->options['byoc'] = $byoc;
+ $this->options['callerId'] = $callerId;
+ $this->options['callReason'] = $callReason;
+ $this->options['recordingTrack'] = $recordingTrack;
+ $this->options['timeLimit'] = $timeLimit;
+ $this->options['machineDetection'] = $machineDetection;
+ $this->options['machineDetectionTimeout'] = $machineDetectionTimeout;
+ $this->options['machineDetectionSpeechThreshold'] = $machineDetectionSpeechThreshold;
+ $this->options['machineDetectionSpeechEndThreshold'] = $machineDetectionSpeechEndThreshold;
+ $this->options['machineDetectionSilenceTimeout'] = $machineDetectionSilenceTimeout;
+ $this->options['amdStatusCallback'] = $amdStatusCallback;
+ $this->options['amdStatusCallbackMethod'] = $amdStatusCallbackMethod;
+ $this->options['trim'] = $trim;
+ $this->options['callToken'] = $callToken;
}
/**
- * Whether the participant should be muted. Can be `true` or `false`. `true` will mute the participant, and `false` will un-mute them. Anything value other than `true` or `false` is interpreted as `false`.
+ * The URL we should call using the `status_callback_method` to send status information to your application.
*
- * @param bool $muted Whether the participant should be muted
+ * @param string $statusCallback The URL we should call using the `status_callback_method` to send status information to your application.
* @return $this Fluent Builder
*/
- public function setMuted($muted)
+ public function setStatusCallback(string $statusCallback): self
{
- $this->options['muted'] = $muted;
+ $this->options['statusCallback'] = $statusCallback;
return $this;
}
/**
- * Whether the participant should be on hold. Can be: `true` or `false`. `true` puts the participant on hold, and `false` lets them rejoin the conference.
+ * The HTTP method we should use to call `status_callback`. Can be: `GET` and `POST` and defaults to `POST`.
*
- * @param bool $hold Whether the participant should be on hold
+ * @param string $statusCallbackMethod The HTTP method we should use to call `status_callback`. Can be: `GET` and `POST` and defaults to `POST`.
* @return $this Fluent Builder
*/
- public function setHold($hold)
+ public function setStatusCallbackMethod(string $statusCallbackMethod): self
{
- $this->options['hold'] = $hold;
+ $this->options['statusCallbackMethod'] = $statusCallbackMethod;
return $this;
}
/**
- * The URL we call using the `hold_method` for music that plays when the participant is on hold. The URL may return an MP3 file, a WAV file, or a TwiML document that contains the ``, `` or `` commands.
+ * The conference state changes that should generate a call to `status_callback`. Can be: `initiated`, `ringing`, `answered`, and `completed`. Separate multiple values with a space. The default value is `completed`.
*
- * @param string $holdUrl The URL we call using the `hold_method` for music
- * that plays when the participant is on hold
+ * @param string[] $statusCallbackEvent The conference state changes that should generate a call to `status_callback`. Can be: `initiated`, `ringing`, `answered`, and `completed`. Separate multiple values with a space. The default value is `completed`.
* @return $this Fluent Builder
*/
- public function setHoldUrl($holdUrl)
+ public function setStatusCallbackEvent(array $statusCallbackEvent): self
{
- $this->options['holdUrl'] = $holdUrl;
+ $this->options['statusCallbackEvent'] = $statusCallbackEvent;
return $this;
}
/**
- * The HTTP method we should use to call `hold_url`. Can be: `GET` or `POST` and the default is `GET`.
+ * A label for this participant. If one is supplied, it may subsequently be used to fetch, update or delete the participant.
*
- * @param string $holdMethod The HTTP method we should use to call hold_url
+ * @param string $label A label for this participant. If one is supplied, it may subsequently be used to fetch, update or delete the participant.
* @return $this Fluent Builder
*/
- public function setHoldMethod($holdMethod)
+ public function setLabel(string $label): self
{
- $this->options['holdMethod'] = $holdMethod;
+ $this->options['label'] = $label;
return $this;
}
/**
- * The URL we call using the `announce_method` for an announcement to the participant. The URL must return an MP3 file, a WAV file, or a TwiML document that contains `` or `` commands.
+ * The number of seconds that we should allow the phone to ring before assuming there is no answer. Can be an integer between `5` and `600`, inclusive. The default value is `60`. We always add a 5-second timeout buffer to outgoing calls, so value of 10 would result in an actual timeout that was closer to 15 seconds.
*
- * @param string $announceUrl The URL we call using the `announce_method` for
- * an announcement to the participant
+ * @param int $timeout The number of seconds that we should allow the phone to ring before assuming there is no answer. Can be an integer between `5` and `600`, inclusive. The default value is `60`. We always add a 5-second timeout buffer to outgoing calls, so value of 10 would result in an actual timeout that was closer to 15 seconds.
* @return $this Fluent Builder
*/
- public function setAnnounceUrl($announceUrl)
+ public function setTimeout(int $timeout): self
{
- $this->options['announceUrl'] = $announceUrl;
+ $this->options['timeout'] = $timeout;
return $this;
}
/**
- * The HTTP method we should use to call `announce_url`. Can be: `GET` or `POST` and defaults to `POST`.
+ * Whether to record the participant and their conferences, including the time between conferences. Can be `true` or `false` and the default is `false`.
*
- * @param string $announceMethod The HTTP method we should use to call
- * announce_url
+ * @param bool $record Whether to record the participant and their conferences, including the time between conferences. Can be `true` or `false` and the default is `false`.
* @return $this Fluent Builder
*/
- public function setAnnounceMethod($announceMethod)
+ public function setRecord(bool $record): self
{
- $this->options['announceMethod'] = $announceMethod;
+ $this->options['record'] = $record;
return $this;
}
/**
- * The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic).
+ * Whether the agent is muted in the conference. Can be `true` or `false` and the default is `false`.
*
- * @param string $waitUrl URL that hosts pre-conference hold music
+ * @param bool $muted Whether the agent is muted in the conference. Can be `true` or `false` and the default is `false`.
* @return $this Fluent Builder
*/
- public function setWaitUrl($waitUrl)
+ public function setMuted(bool $muted): self
{
- $this->options['waitUrl'] = $waitUrl;
+ $this->options['muted'] = $muted;
return $this;
}
/**
- * The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file.
+ * Whether to play a notification beep to the conference when the participant joins. Can be: `true`, `false`, `onEnter`, or `onExit`. The default value is `true`.
*
- * @param string $waitMethod The HTTP method we should use to call `wait_url`
+ * @param string $beep Whether to play a notification beep to the conference when the participant joins. Can be: `true`, `false`, `onEnter`, or `onExit`. The default value is `true`.
* @return $this Fluent Builder
*/
- public function setWaitMethod($waitMethod)
+ public function setBeep(string $beep): self
{
- $this->options['waitMethod'] = $waitMethod;
+ $this->options['beep'] = $beep;
return $this;
}
/**
- * Whether to play a notification beep to the conference when the participant exits. Can be: `true` or `false`.
+ * Whether to start the conference when the participant joins, if it has not already started. Can be: `true` or `false` and the default is `true`. If `false` and the conference has not started, the participant is muted and hears background music until another participant starts the conference.
*
- * @param bool $beepOnExit Whether to play a notification beep to the
- * conference when the participant exit
+ * @param bool $startConferenceOnEnter Whether to start the conference when the participant joins, if it has not already started. Can be: `true` or `false` and the default is `true`. If `false` and the conference has not started, the participant is muted and hears background music until another participant starts the conference.
* @return $this Fluent Builder
*/
- public function setBeepOnExit($beepOnExit)
+ public function setStartConferenceOnEnter(bool $startConferenceOnEnter): self
{
- $this->options['beepOnExit'] = $beepOnExit;
+ $this->options['startConferenceOnEnter'] = $startConferenceOnEnter;
return $this;
}
/**
* Whether to end the conference when the participant leaves. Can be: `true` or `false` and defaults to `false`.
*
- * @param bool $endConferenceOnExit Whether to end the conference when the
- * participant leaves
+ * @param bool $endConferenceOnExit Whether to end the conference when the participant leaves. Can be: `true` or `false` and defaults to `false`.
* @return $this Fluent Builder
*/
- public function setEndConferenceOnExit($endConferenceOnExit)
+ public function setEndConferenceOnExit(bool $endConferenceOnExit): self
{
$this->options['endConferenceOnExit'] = $endConferenceOnExit;
return $this;
}
/**
- * Whether the participant is coaching another call. Can be: `true` or `false`. If not present, defaults to `false` unless `call_sid_to_coach` is defined. If `true`, `call_sid_to_coach` must be defined.
+ * The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic).
*
- * @param bool $coaching Indicates if the participant changed to coach
+ * @param string $waitUrl The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic).
* @return $this Fluent Builder
*/
- public function setCoaching($coaching)
+ public function setWaitUrl(string $waitUrl): self
{
- $this->options['coaching'] = $coaching;
+ $this->options['waitUrl'] = $waitUrl;
return $this;
}
/**
- * The SID of the participant who is being `coached`. The participant being coached is the only participant who can hear the participant who is `coaching`.
+ * The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file.
*
- * @param string $callSidToCoach The SID of the participant who is being
- * `coached`
+ * @param string $waitMethod The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file.
* @return $this Fluent Builder
*/
- public function setCallSidToCoach($callSidToCoach)
+ public function setWaitMethod(string $waitMethod): self
{
- $this->options['callSidToCoach'] = $callSidToCoach;
+ $this->options['waitMethod'] = $waitMethod;
return $this;
}
/**
- * Provide a friendly representation
+ * Whether to allow an agent to hear the state of the outbound call, including ringing or disconnect messages. Can be: `true` or `false` and defaults to `true`.
*
- * @return string Machine friendly representation
+ * @param bool $earlyMedia Whether to allow an agent to hear the state of the outbound call, including ringing or disconnect messages. Can be: `true` or `false` and defaults to `true`.
+ * @return $this Fluent Builder
*/
- public function __toString()
+ public function setEarlyMedia(bool $earlyMedia): self
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.UpdateParticipantOptions ' . \implode(' ', $options) . ']';
+ $this->options['earlyMedia'] = $earlyMedia;
+ return $this;
}
-}
-class CreateParticipantOptions extends Options
-{
/**
- * @param string $statusCallback The URL we should call to send status
- * information to your application
- * @param string $statusCallbackMethod The HTTP method we should use to call
- * `status_callback`
- * @param string $statusCallbackEvent Set state change events that will trigger
- * a callback
- * @param int $timeout he number of seconds that we should wait for an answer
- * @param bool $record Whether to record the participant and their conferences
- * @param bool $muted Whether to mute the agent
- * @param string $beep Whether to play a notification beep to the conference
- * when the participant joins
- * @param bool $startConferenceOnEnter Whether the conference starts when the
- * participant joins the conference
- * @param bool $endConferenceOnExit Whether to end the conference when the
- * participant leaves
- * @param string $waitUrl URL that hosts pre-conference hold music
- * @param string $waitMethod The HTTP method we should use to call `wait_url`
- * @param bool $earlyMedia Whether agents can hear the state of the outbound
- * call
- * @param int $maxParticipants The maximum number of agent conference
- * participants
- * @param string $conferenceRecord Whether to record the conference the
- * participant is joining
- * @param string $conferenceTrim Whether to trim leading and trailing silence
- * from your recorded conference audio files
- * @param string $conferenceStatusCallback The callback URL for conference
- * events
- * @param string $conferenceStatusCallbackMethod HTTP method for requesting
- * `conference_status_callback`
- * URL
- * @param string $conferenceStatusCallbackEvent The conference state changes
- * that should generate a call to
- * `conference_status_callback`
- * @param string $recordingChannels Specify `mono` or `dual` recording channels
- * @param string $recordingStatusCallback The URL that we should call using the
- * `recording_status_callback_method`
- * when the recording status changes
- * @param string $recordingStatusCallbackMethod The HTTP method we should use
- * when we call
- * `recording_status_callback`
- * @param string $sipAuthUsername The SIP username used for authentication
- * @param string $sipAuthPassword The SIP password for authentication
- * @param string $region The region where we should mix the conference audio
- * @param string $conferenceRecordingStatusCallback The URL we should call
- * using the
- * `conference_recording_status_callback_method` when the conference recording is available
- * @param string $conferenceRecordingStatusCallbackMethod The HTTP method we
- * should use to call
- * `conference_recording_status_callback`
- * @param string $recordingStatusCallbackEvent The recording state changes that
- * should generate a call to
- * `recording_status_callback`
- * @param string $conferenceRecordingStatusCallbackEvent The conference
- * recording state
- * changes that should
- * generate a call to
- * `conference_recording_status_callback`
- * @param bool $coaching Indicates if the participant changed to coach
- * @param string $callSidToCoach The SID of the participant who is being
- * `coached`
- */
- public function __construct($statusCallback = Values::NONE, $statusCallbackMethod = Values::NONE, $statusCallbackEvent = Values::NONE, $timeout = Values::NONE, $record = Values::NONE, $muted = Values::NONE, $beep = Values::NONE, $startConferenceOnEnter = Values::NONE, $endConferenceOnExit = Values::NONE, $waitUrl = Values::NONE, $waitMethod = Values::NONE, $earlyMedia = Values::NONE, $maxParticipants = Values::NONE, $conferenceRecord = Values::NONE, $conferenceTrim = Values::NONE, $conferenceStatusCallback = Values::NONE, $conferenceStatusCallbackMethod = Values::NONE, $conferenceStatusCallbackEvent = Values::NONE, $recordingChannels = Values::NONE, $recordingStatusCallback = Values::NONE, $recordingStatusCallbackMethod = Values::NONE, $sipAuthUsername = Values::NONE, $sipAuthPassword = Values::NONE, $region = Values::NONE, $conferenceRecordingStatusCallback = Values::NONE, $conferenceRecordingStatusCallbackMethod = Values::NONE, $recordingStatusCallbackEvent = Values::NONE, $conferenceRecordingStatusCallbackEvent = Values::NONE, $coaching = Values::NONE, $callSidToCoach = Values::NONE)
+ * The maximum number of participants in the conference. Can be a positive integer from `2` to `250`. The default value is `250`.
+ *
+ * @param int $maxParticipants The maximum number of participants in the conference. Can be a positive integer from `2` to `250`. The default value is `250`.
+ * @return $this Fluent Builder
+ */
+ public function setMaxParticipants(int $maxParticipants): self
{
- $this->options['statusCallback'] = $statusCallback;
- $this->options['statusCallbackMethod'] = $statusCallbackMethod;
- $this->options['statusCallbackEvent'] = $statusCallbackEvent;
- $this->options['timeout'] = $timeout;
- $this->options['record'] = $record;
- $this->options['muted'] = $muted;
- $this->options['beep'] = $beep;
- $this->options['startConferenceOnEnter'] = $startConferenceOnEnter;
- $this->options['endConferenceOnExit'] = $endConferenceOnExit;
- $this->options['waitUrl'] = $waitUrl;
- $this->options['waitMethod'] = $waitMethod;
- $this->options['earlyMedia'] = $earlyMedia;
$this->options['maxParticipants'] = $maxParticipants;
+ return $this;
+ }
+
+ /**
+ * Whether to record the conference the participant is joining. Can be: `true`, `false`, `record-from-start`, and `do-not-record`. The default value is `false`.
+ *
+ * @param string $conferenceRecord Whether to record the conference the participant is joining. Can be: `true`, `false`, `record-from-start`, and `do-not-record`. The default value is `false`.
+ * @return $this Fluent Builder
+ */
+ public function setConferenceRecord(string $conferenceRecord): self
+ {
$this->options['conferenceRecord'] = $conferenceRecord;
+ return $this;
+ }
+
+ /**
+ * Whether to trim leading and trailing silence from the conference recording. Can be: `trim-silence` or `do-not-trim` and defaults to `trim-silence`.
+ *
+ * @param string $conferenceTrim Whether to trim leading and trailing silence from the conference recording. Can be: `trim-silence` or `do-not-trim` and defaults to `trim-silence`.
+ * @return $this Fluent Builder
+ */
+ public function setConferenceTrim(string $conferenceTrim): self
+ {
$this->options['conferenceTrim'] = $conferenceTrim;
- $this->options['conferenceStatusCallback'] = $conferenceStatusCallback;
- $this->options['conferenceStatusCallbackMethod'] = $conferenceStatusCallbackMethod;
- $this->options['conferenceStatusCallbackEvent'] = $conferenceStatusCallbackEvent;
- $this->options['recordingChannels'] = $recordingChannels;
- $this->options['recordingStatusCallback'] = $recordingStatusCallback;
- $this->options['recordingStatusCallbackMethod'] = $recordingStatusCallbackMethod;
- $this->options['sipAuthUsername'] = $sipAuthUsername;
- $this->options['sipAuthPassword'] = $sipAuthPassword;
- $this->options['region'] = $region;
- $this->options['conferenceRecordingStatusCallback'] = $conferenceRecordingStatusCallback;
- $this->options['conferenceRecordingStatusCallbackMethod'] = $conferenceRecordingStatusCallbackMethod;
- $this->options['recordingStatusCallbackEvent'] = $recordingStatusCallbackEvent;
- $this->options['conferenceRecordingStatusCallbackEvent'] = $conferenceRecordingStatusCallbackEvent;
- $this->options['coaching'] = $coaching;
- $this->options['callSidToCoach'] = $callSidToCoach;
+ return $this;
}
/**
- * The URL we should call using the `status_callback_method` to send status information to your application.
+ * The URL we should call using the `conference_status_callback_method` when the conference events in `conference_status_callback_event` occur. Only the value set by the first participant to join the conference is used. Subsequent `conference_status_callback` values are ignored.
*
- * @param string $statusCallback The URL we should call to send status
- * information to your application
+ * @param string $conferenceStatusCallback The URL we should call using the `conference_status_callback_method` when the conference events in `conference_status_callback_event` occur. Only the value set by the first participant to join the conference is used. Subsequent `conference_status_callback` values are ignored.
* @return $this Fluent Builder
*/
- public function setStatusCallback($statusCallback)
+ public function setConferenceStatusCallback(string $conferenceStatusCallback): self
{
- $this->options['statusCallback'] = $statusCallback;
+ $this->options['conferenceStatusCallback'] = $conferenceStatusCallback;
return $this;
}
/**
- * The HTTP method we should use to call `status_callback`. Can be: `GET` and `POST` and defaults to `POST`.
+ * The HTTP method we should use to call `conference_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
*
- * @param string $statusCallbackMethod The HTTP method we should use to call
- * `status_callback`
+ * @param string $conferenceStatusCallbackMethod The HTTP method we should use to call `conference_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
* @return $this Fluent Builder
*/
- public function setStatusCallbackMethod($statusCallbackMethod)
+ public function setConferenceStatusCallbackMethod(string $conferenceStatusCallbackMethod): self
{
- $this->options['statusCallbackMethod'] = $statusCallbackMethod;
+ $this->options['conferenceStatusCallbackMethod'] = $conferenceStatusCallbackMethod;
return $this;
}
/**
- * The conference state changes that should generate a call to `status_callback`. Can be: `initiated`, `ringing`, `answered`, and `completed`. Separate multiple values with a space. The default value is `completed`.
+ * The conference state changes that should generate a call to `conference_status_callback`. Can be: `start`, `end`, `join`, `leave`, `mute`, `hold`, `modify`, `speaker`, and `announcement`. Separate multiple values with a space. Defaults to `start end`.
*
- * @param string $statusCallbackEvent Set state change events that will trigger
- * a callback
+ * @param string[] $conferenceStatusCallbackEvent The conference state changes that should generate a call to `conference_status_callback`. Can be: `start`, `end`, `join`, `leave`, `mute`, `hold`, `modify`, `speaker`, and `announcement`. Separate multiple values with a space. Defaults to `start end`.
* @return $this Fluent Builder
*/
- public function setStatusCallbackEvent($statusCallbackEvent)
+ public function setConferenceStatusCallbackEvent(array $conferenceStatusCallbackEvent): self
{
- $this->options['statusCallbackEvent'] = $statusCallbackEvent;
+ $this->options['conferenceStatusCallbackEvent'] = $conferenceStatusCallbackEvent;
return $this;
}
/**
- * The number of seconds that we should allow the phone to ring before assuming there is no answer. Can be an integer between `5` and `600`, inclusive. The default value is `60`. We always add a 5-second timeout buffer to outgoing calls, so value of 10 would result in an actual timeout that was closer to 15 seconds.
+ * The recording channels for the final recording. Can be: `mono` or `dual` and the default is `mono`.
*
- * @param int $timeout he number of seconds that we should wait for an answer
+ * @param string $recordingChannels The recording channels for the final recording. Can be: `mono` or `dual` and the default is `mono`.
* @return $this Fluent Builder
*/
- public function setTimeout($timeout)
+ public function setRecordingChannels(string $recordingChannels): self
{
- $this->options['timeout'] = $timeout;
+ $this->options['recordingChannels'] = $recordingChannels;
return $this;
}
/**
- * Whether to record the participant and their conferences, including the time between conferences. Can be `true` or `false` and the default is `false`.
+ * The URL that we should call using the `recording_status_callback_method` when the recording status changes.
*
- * @param bool $record Whether to record the participant and their conferences
+ * @param string $recordingStatusCallback The URL that we should call using the `recording_status_callback_method` when the recording status changes.
* @return $this Fluent Builder
*/
- public function setRecord($record)
+ public function setRecordingStatusCallback(string $recordingStatusCallback): self
{
- $this->options['record'] = $record;
+ $this->options['recordingStatusCallback'] = $recordingStatusCallback;
return $this;
}
/**
- * Whether the agent is muted in the conference. Can be `true` or `false` and the default is `false`.
+ * The HTTP method we should use when we call `recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
*
- * @param bool $muted Whether to mute the agent
+ * @param string $recordingStatusCallbackMethod The HTTP method we should use when we call `recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
* @return $this Fluent Builder
*/
- public function setMuted($muted)
+ public function setRecordingStatusCallbackMethod(string $recordingStatusCallbackMethod): self
{
- $this->options['muted'] = $muted;
+ $this->options['recordingStatusCallbackMethod'] = $recordingStatusCallbackMethod;
return $this;
}
/**
- * Whether to play a notification beep to the conference when the participant joins. Can be: `true`, `false`, `onEnter`, or `onExit`. The default value is `true`.
+ * The SIP username used for authentication.
*
- * @param string $beep Whether to play a notification beep to the conference
- * when the participant joins
+ * @param string $sipAuthUsername The SIP username used for authentication.
* @return $this Fluent Builder
*/
- public function setBeep($beep)
+ public function setSipAuthUsername(string $sipAuthUsername): self
{
- $this->options['beep'] = $beep;
+ $this->options['sipAuthUsername'] = $sipAuthUsername;
return $this;
}
/**
- * Whether to start the conference when the participant joins, if it has not already started. Can be: `true` or `false` and the default is `true`. If `false` and the conference has not started, the participant is muted and hears background music until another participant starts the conference.
+ * The SIP password for authentication.
*
- * @param bool $startConferenceOnEnter Whether the conference starts when the
- * participant joins the conference
+ * @param string $sipAuthPassword The SIP password for authentication.
* @return $this Fluent Builder
*/
- public function setStartConferenceOnEnter($startConferenceOnEnter)
+ public function setSipAuthPassword(string $sipAuthPassword): self
{
- $this->options['startConferenceOnEnter'] = $startConferenceOnEnter;
+ $this->options['sipAuthPassword'] = $sipAuthPassword;
return $this;
}
/**
- * Whether to end the conference when the participant leaves. Can be: `true` or `false` and defaults to `false`.
+ * The [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls) where we should mix the recorded audio. Can be:`us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, or `jp1`.
*
- * @param bool $endConferenceOnExit Whether to end the conference when the
- * participant leaves
+ * @param string $region The [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls) where we should mix the recorded audio. Can be:`us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, or `jp1`.
* @return $this Fluent Builder
*/
- public function setEndConferenceOnExit($endConferenceOnExit)
+ public function setRegion(string $region): self
{
- $this->options['endConferenceOnExit'] = $endConferenceOnExit;
+ $this->options['region'] = $region;
return $this;
}
/**
- * The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic).
+ * The URL we should call using the `conference_recording_status_callback_method` when the conference recording is available.
*
- * @param string $waitUrl URL that hosts pre-conference hold music
+ * @param string $conferenceRecordingStatusCallback The URL we should call using the `conference_recording_status_callback_method` when the conference recording is available.
* @return $this Fluent Builder
*/
- public function setWaitUrl($waitUrl)
+ public function setConferenceRecordingStatusCallback(string $conferenceRecordingStatusCallback): self
{
- $this->options['waitUrl'] = $waitUrl;
+ $this->options['conferenceRecordingStatusCallback'] = $conferenceRecordingStatusCallback;
return $this;
}
/**
- * The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file.
+ * The HTTP method we should use to call `conference_recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
*
- * @param string $waitMethod The HTTP method we should use to call `wait_url`
+ * @param string $conferenceRecordingStatusCallbackMethod The HTTP method we should use to call `conference_recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
* @return $this Fluent Builder
*/
- public function setWaitMethod($waitMethod)
+ public function setConferenceRecordingStatusCallbackMethod(string $conferenceRecordingStatusCallbackMethod): self
{
- $this->options['waitMethod'] = $waitMethod;
+ $this->options['conferenceRecordingStatusCallbackMethod'] = $conferenceRecordingStatusCallbackMethod;
return $this;
}
/**
- * Whether to allow an agent to hear the state of the outbound call, including ringing or disconnect messages. Can be: `true` or `false` and defaults to `true`.
+ * The recording state changes that should generate a call to `recording_status_callback`. Can be: `started`, `in-progress`, `paused`, `resumed`, `stopped`, `completed`, `failed`, and `absent`. Separate multiple values with a space, ex: `'in-progress completed failed'`.
*
- * @param bool $earlyMedia Whether agents can hear the state of the outbound
- * call
+ * @param string[] $recordingStatusCallbackEvent The recording state changes that should generate a call to `recording_status_callback`. Can be: `started`, `in-progress`, `paused`, `resumed`, `stopped`, `completed`, `failed`, and `absent`. Separate multiple values with a space, ex: `'in-progress completed failed'`.
* @return $this Fluent Builder
*/
- public function setEarlyMedia($earlyMedia)
+ public function setRecordingStatusCallbackEvent(array $recordingStatusCallbackEvent): self
{
- $this->options['earlyMedia'] = $earlyMedia;
+ $this->options['recordingStatusCallbackEvent'] = $recordingStatusCallbackEvent;
return $this;
}
/**
- * The maximum number of participants in the conference. Can be a positive integer from `2` to `250`. The default value is `250`.
+ * The conference recording state changes that generate a call to `conference_recording_status_callback`. Can be: `in-progress`, `completed`, `failed`, and `absent`. Separate multiple values with a space, ex: `'in-progress completed failed'`
*
- * @param int $maxParticipants The maximum number of agent conference
- * participants
+ * @param string[] $conferenceRecordingStatusCallbackEvent The conference recording state changes that generate a call to `conference_recording_status_callback`. Can be: `in-progress`, `completed`, `failed`, and `absent`. Separate multiple values with a space, ex: `'in-progress completed failed'`
* @return $this Fluent Builder
*/
- public function setMaxParticipants($maxParticipants)
+ public function setConferenceRecordingStatusCallbackEvent(array $conferenceRecordingStatusCallbackEvent): self
{
- $this->options['maxParticipants'] = $maxParticipants;
+ $this->options['conferenceRecordingStatusCallbackEvent'] = $conferenceRecordingStatusCallbackEvent;
return $this;
}
/**
- * Whether to record the conference the participant is joining. Can be: `true`, `false`, `record-from-start`, and `do-not-record`. The default value is `false`.
+ * Whether the participant is coaching another call. Can be: `true` or `false`. If not present, defaults to `false` unless `call_sid_to_coach` is defined. If `true`, `call_sid_to_coach` must be defined.
*
- * @param string $conferenceRecord Whether to record the conference the
- * participant is joining
+ * @param bool $coaching Whether the participant is coaching another call. Can be: `true` or `false`. If not present, defaults to `false` unless `call_sid_to_coach` is defined. If `true`, `call_sid_to_coach` must be defined.
* @return $this Fluent Builder
*/
- public function setConferenceRecord($conferenceRecord)
+ public function setCoaching(bool $coaching): self
{
- $this->options['conferenceRecord'] = $conferenceRecord;
+ $this->options['coaching'] = $coaching;
return $this;
}
/**
- * Whether to trim leading and trailing silence from your recorded conference audio files. Can be: `trim-silence` or `do-not-trim` and defaults to `trim-silence`.
+ * The SID of the participant who is being `coached`. The participant being coached is the only participant who can hear the participant who is `coaching`.
*
- * @param string $conferenceTrim Whether to trim leading and trailing silence
- * from your recorded conference audio files
+ * @param string $callSidToCoach The SID of the participant who is being `coached`. The participant being coached is the only participant who can hear the participant who is `coaching`.
* @return $this Fluent Builder
*/
- public function setConferenceTrim($conferenceTrim)
+ public function setCallSidToCoach(string $callSidToCoach): self
{
- $this->options['conferenceTrim'] = $conferenceTrim;
+ $this->options['callSidToCoach'] = $callSidToCoach;
return $this;
}
/**
- * The URL we should call using the `conference_status_callback_method` when the conference events in `conference_status_callback_event` occur. Only the value set by the first participant to join the conference is used. Subsequent `conference_status_callback` values are ignored.
+ * Jitter buffer size for the connecting participant. Twilio will use this setting to apply Jitter Buffer before participant's audio is mixed into the conference. Can be: `off`, `small`, `medium`, and `large`. Default to `large`.
*
- * @param string $conferenceStatusCallback The callback URL for conference
- * events
+ * @param string $jitterBufferSize Jitter buffer size for the connecting participant. Twilio will use this setting to apply Jitter Buffer before participant's audio is mixed into the conference. Can be: `off`, `small`, `medium`, and `large`. Default to `large`.
* @return $this Fluent Builder
*/
- public function setConferenceStatusCallback($conferenceStatusCallback)
+ public function setJitterBufferSize(string $jitterBufferSize): self
{
- $this->options['conferenceStatusCallback'] = $conferenceStatusCallback;
+ $this->options['jitterBufferSize'] = $jitterBufferSize;
return $this;
}
/**
- * The HTTP method we should use to call `conference_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
+ * The SID of a BYOC (Bring Your Own Carrier) trunk to route this call with. Note that `byoc` is only meaningful when `to` is a phone number; it will otherwise be ignored. (Beta)
*
- * @param string $conferenceStatusCallbackMethod HTTP method for requesting
- * `conference_status_callback`
- * URL
+ * @param string $byoc The SID of a BYOC (Bring Your Own Carrier) trunk to route this call with. Note that `byoc` is only meaningful when `to` is a phone number; it will otherwise be ignored. (Beta)
* @return $this Fluent Builder
*/
- public function setConferenceStatusCallbackMethod($conferenceStatusCallbackMethod)
+ public function setByoc(string $byoc): self
{
- $this->options['conferenceStatusCallbackMethod'] = $conferenceStatusCallbackMethod;
+ $this->options['byoc'] = $byoc;
return $this;
}
/**
- * The conference state changes that should generate a call to `conference_status_callback`. Can be: `start`, `end`, `join`, `leave`, `mute`, `hold`, and `speaker`. Separate multiple values with a space. Defaults to `start end`.
+ * The phone number, Client identifier, or username portion of SIP address that made this call. Phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., +16175551212). Client identifiers are formatted `client:name`. If using a phone number, it must be a Twilio number or a Verified [outgoing caller id](https://www.twilio.com/docs/voice/api/outgoing-caller-ids) for your account. If the `to` parameter is a phone number, `callerId` must also be a phone number. If `to` is sip address, this value of `callerId` should be a username portion to be used to populate the From header that is passed to the SIP endpoint.
*
- * @param string $conferenceStatusCallbackEvent The conference state changes
- * that should generate a call to
- * `conference_status_callback`
+ * @param string $callerId The phone number, Client identifier, or username portion of SIP address that made this call. Phone numbers are in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (e.g., +16175551212). Client identifiers are formatted `client:name`. If using a phone number, it must be a Twilio number or a Verified [outgoing caller id](https://www.twilio.com/docs/voice/api/outgoing-caller-ids) for your account. If the `to` parameter is a phone number, `callerId` must also be a phone number. If `to` is sip address, this value of `callerId` should be a username portion to be used to populate the From header that is passed to the SIP endpoint.
* @return $this Fluent Builder
*/
- public function setConferenceStatusCallbackEvent($conferenceStatusCallbackEvent)
+ public function setCallerId(string $callerId): self
{
- $this->options['conferenceStatusCallbackEvent'] = $conferenceStatusCallbackEvent;
+ $this->options['callerId'] = $callerId;
return $this;
}
/**
- * The recording channels for the final recording. Can be: `mono` or `dual` and the default is `mono`.
+ * The Reason for the outgoing call. Use it to specify the purpose of the call that is presented on the called party's phone. (Branded Calls Beta)
*
- * @param string $recordingChannels Specify `mono` or `dual` recording channels
+ * @param string $callReason The Reason for the outgoing call. Use it to specify the purpose of the call that is presented on the called party's phone. (Branded Calls Beta)
* @return $this Fluent Builder
*/
- public function setRecordingChannels($recordingChannels)
+ public function setCallReason(string $callReason): self
{
- $this->options['recordingChannels'] = $recordingChannels;
+ $this->options['callReason'] = $callReason;
return $this;
}
/**
- * The URL that we should call using the `recording_status_callback_method` when the recording status changes.
+ * The audio track to record for the call. Can be: `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the audio that is received by Twilio. `outbound` records the audio that is sent from Twilio. `both` records the audio that is received and sent by Twilio.
*
- * @param string $recordingStatusCallback The URL that we should call using the
- * `recording_status_callback_method`
- * when the recording status changes
+ * @param string $recordingTrack The audio track to record for the call. Can be: `inbound`, `outbound` or `both`. The default is `both`. `inbound` records the audio that is received by Twilio. `outbound` records the audio that is sent from Twilio. `both` records the audio that is received and sent by Twilio.
* @return $this Fluent Builder
*/
- public function setRecordingStatusCallback($recordingStatusCallback)
+ public function setRecordingTrack(string $recordingTrack): self
{
- $this->options['recordingStatusCallback'] = $recordingStatusCallback;
+ $this->options['recordingTrack'] = $recordingTrack;
return $this;
}
/**
- * The HTTP method we should use when we call `recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
+ * The maximum duration of the call in seconds. Constraints depend on account and configuration.
*
- * @param string $recordingStatusCallbackMethod The HTTP method we should use
- * when we call
- * `recording_status_callback`
+ * @param int $timeLimit The maximum duration of the call in seconds. Constraints depend on account and configuration.
* @return $this Fluent Builder
*/
- public function setRecordingStatusCallbackMethod($recordingStatusCallbackMethod)
+ public function setTimeLimit(int $timeLimit): self
{
- $this->options['recordingStatusCallbackMethod'] = $recordingStatusCallbackMethod;
+ $this->options['timeLimit'] = $timeLimit;
return $this;
}
/**
- * The SIP username used for authentication.
+ * Whether to detect if a human, answering machine, or fax has picked up the call. Can be: `Enable` or `DetectMessageEnd`. Use `Enable` if you would like us to return `AnsweredBy` as soon as the called party is identified. Use `DetectMessageEnd`, if you would like to leave a message on an answering machine. For more information, see [Answering Machine Detection](https://www.twilio.com/docs/voice/answering-machine-detection).
*
- * @param string $sipAuthUsername The SIP username used for authentication
+ * @param string $machineDetection Whether to detect if a human, answering machine, or fax has picked up the call. Can be: `Enable` or `DetectMessageEnd`. Use `Enable` if you would like us to return `AnsweredBy` as soon as the called party is identified. Use `DetectMessageEnd`, if you would like to leave a message on an answering machine. For more information, see [Answering Machine Detection](https://www.twilio.com/docs/voice/answering-machine-detection).
* @return $this Fluent Builder
*/
- public function setSipAuthUsername($sipAuthUsername)
+ public function setMachineDetection(string $machineDetection): self
{
- $this->options['sipAuthUsername'] = $sipAuthUsername;
+ $this->options['machineDetection'] = $machineDetection;
return $this;
}
/**
- * The SIP password for authentication.
+ * The number of seconds that we should attempt to detect an answering machine before timing out and sending a voice request with `AnsweredBy` of `unknown`. The default timeout is 30 seconds.
*
- * @param string $sipAuthPassword The SIP password for authentication
+ * @param int $machineDetectionTimeout The number of seconds that we should attempt to detect an answering machine before timing out and sending a voice request with `AnsweredBy` of `unknown`. The default timeout is 30 seconds.
* @return $this Fluent Builder
*/
- public function setSipAuthPassword($sipAuthPassword)
+ public function setMachineDetectionTimeout(int $machineDetectionTimeout): self
{
- $this->options['sipAuthPassword'] = $sipAuthPassword;
+ $this->options['machineDetectionTimeout'] = $machineDetectionTimeout;
return $this;
}
/**
- * The [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls) where we should mix the recorded audio. Can be:`us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, or `jp1`.
+ * The number of milliseconds that is used as the measuring stick for the length of the speech activity, where durations lower than this value will be interpreted as a human and longer than this value as a machine. Possible Values: 1000-6000. Default: 2400.
*
- * @param string $region The region where we should mix the conference audio
+ * @param int $machineDetectionSpeechThreshold The number of milliseconds that is used as the measuring stick for the length of the speech activity, where durations lower than this value will be interpreted as a human and longer than this value as a machine. Possible Values: 1000-6000. Default: 2400.
* @return $this Fluent Builder
*/
- public function setRegion($region)
+ public function setMachineDetectionSpeechThreshold(int $machineDetectionSpeechThreshold): self
{
- $this->options['region'] = $region;
+ $this->options['machineDetectionSpeechThreshold'] = $machineDetectionSpeechThreshold;
return $this;
}
/**
- * The URL we should call using the `conference_recording_status_callback_method` when the conference recording is available.
+ * The number of milliseconds of silence after speech activity at which point the speech activity is considered complete. Possible Values: 500-5000. Default: 1200.
*
- * @param string $conferenceRecordingStatusCallback The URL we should call
- * using the
- * `conference_recording_status_callback_method` when the conference recording is available
+ * @param int $machineDetectionSpeechEndThreshold The number of milliseconds of silence after speech activity at which point the speech activity is considered complete. Possible Values: 500-5000. Default: 1200.
* @return $this Fluent Builder
*/
- public function setConferenceRecordingStatusCallback($conferenceRecordingStatusCallback)
+ public function setMachineDetectionSpeechEndThreshold(int $machineDetectionSpeechEndThreshold): self
{
- $this->options['conferenceRecordingStatusCallback'] = $conferenceRecordingStatusCallback;
+ $this->options['machineDetectionSpeechEndThreshold'] = $machineDetectionSpeechEndThreshold;
return $this;
}
/**
- * The HTTP method we should use to call `conference_recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
+ * The number of milliseconds of initial silence after which an `unknown` AnsweredBy result will be returned. Possible Values: 2000-10000. Default: 5000.
*
- * @param string $conferenceRecordingStatusCallbackMethod The HTTP method we
- * should use to call
- * `conference_recording_status_callback`
+ * @param int $machineDetectionSilenceTimeout The number of milliseconds of initial silence after which an `unknown` AnsweredBy result will be returned. Possible Values: 2000-10000. Default: 5000.
* @return $this Fluent Builder
*/
- public function setConferenceRecordingStatusCallbackMethod($conferenceRecordingStatusCallbackMethod)
+ public function setMachineDetectionSilenceTimeout(int $machineDetectionSilenceTimeout): self
{
- $this->options['conferenceRecordingStatusCallbackMethod'] = $conferenceRecordingStatusCallbackMethod;
+ $this->options['machineDetectionSilenceTimeout'] = $machineDetectionSilenceTimeout;
return $this;
}
/**
- * The recording state changes that should generate a call to `recording_status_callback`. Can be: `in-progress`, `completed`, and `failed`. Separate multiple values with a space. The default value is `in-progress completed failed`.
+ * The URL that we should call using the `amd_status_callback_method` to notify customer application whether the call was answered by human, machine or fax.
*
- * @param string $recordingStatusCallbackEvent The recording state changes that
- * should generate a call to
- * `recording_status_callback`
+ * @param string $amdStatusCallback The URL that we should call using the `amd_status_callback_method` to notify customer application whether the call was answered by human, machine or fax.
* @return $this Fluent Builder
*/
- public function setRecordingStatusCallbackEvent($recordingStatusCallbackEvent)
+ public function setAmdStatusCallback(string $amdStatusCallback): self
{
- $this->options['recordingStatusCallbackEvent'] = $recordingStatusCallbackEvent;
+ $this->options['amdStatusCallback'] = $amdStatusCallback;
return $this;
}
/**
- * The conference recording state changes that generate a call to `conference_recording_status_callback`. Can be: `in-progress`, `completed`, and `failed`. Separate multiple values with a space. The default value is `in-progress completed failed`.
+ * The HTTP method we should use when calling the `amd_status_callback` URL. Can be: `GET` or `POST` and the default is `POST`.
*
- * @param string $conferenceRecordingStatusCallbackEvent The conference
- * recording state
- * changes that should
- * generate a call to
- * `conference_recording_status_callback`
+ * @param string $amdStatusCallbackMethod The HTTP method we should use when calling the `amd_status_callback` URL. Can be: `GET` or `POST` and the default is `POST`.
* @return $this Fluent Builder
*/
- public function setConferenceRecordingStatusCallbackEvent($conferenceRecordingStatusCallbackEvent)
+ public function setAmdStatusCallbackMethod(string $amdStatusCallbackMethod): self
{
- $this->options['conferenceRecordingStatusCallbackEvent'] = $conferenceRecordingStatusCallbackEvent;
+ $this->options['amdStatusCallbackMethod'] = $amdStatusCallbackMethod;
return $this;
}
/**
- * Whether the participant is coaching another call. Can be: `true` or `false`. If not present, defaults to `false` unless `call_sid_to_coach` is defined. If `true`, `call_sid_to_coach` must be defined.
+ * Whether to trim any leading and trailing silence from the participant recording. Can be: `trim-silence` or `do-not-trim` and the default is `trim-silence`.
*
- * @param bool $coaching Indicates if the participant changed to coach
+ * @param string $trim Whether to trim any leading and trailing silence from the participant recording. Can be: `trim-silence` or `do-not-trim` and the default is `trim-silence`.
* @return $this Fluent Builder
*/
- public function setCoaching($coaching)
+ public function setTrim(string $trim): self
{
- $this->options['coaching'] = $coaching;
+ $this->options['trim'] = $trim;
return $this;
}
/**
- * The SID of the participant who is being `coached`. The participant being coached is the only participant who can hear the participant who is `coaching`.
+ * A token string needed to invoke a forwarded call. A call_token is generated when an incoming call is received on a Twilio number. Pass an incoming call's call_token value to a forwarded call via the call_token parameter when creating a new call. A forwarded call should bear the same CallerID of the original incoming call.
*
- * @param string $callSidToCoach The SID of the participant who is being
- * `coached`
+ * @param string $callToken A token string needed to invoke a forwarded call. A call_token is generated when an incoming call is received on a Twilio number. Pass an incoming call's call_token value to a forwarded call via the call_token parameter when creating a new call. A forwarded call should bear the same CallerID of the original incoming call.
* @return $this Fluent Builder
*/
- public function setCallSidToCoach($callSidToCoach)
+ public function setCallToken(string $callToken): self
{
- $this->options['callSidToCoach'] = $callSidToCoach;
+ $this->options['callToken'] = $callToken;
return $this;
}
@@ -819,28 +948,29 @@ public function setCallSidToCoach($callSidToCoach)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.CreateParticipantOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.CreateParticipantOptions ' . $options . ']';
}
}
+
+
class ReadParticipantOptions extends Options
-{
+ {
/**
- * @param bool $muted Whether to return only participants that are muted
- * @param bool $hold Whether to return only participants that are on hold
- * @param bool $coaching Whether to return only participants who are coaching
- * another call
+ * @param bool $muted Whether to return only participants that are muted. Can be: `true` or `false`.
+ * @param bool $hold Whether to return only participants that are on hold. Can be: `true` or `false`.
+ * @param bool $coaching Whether to return only participants who are coaching another call. Can be: `true` or `false`.
*/
- public function __construct($muted = Values::NONE, $hold = Values::NONE, $coaching = Values::NONE)
- {
+ public function __construct(
+
+ bool $muted = Values::BOOL_NONE,
+ bool $hold = Values::BOOL_NONE,
+ bool $coaching = Values::BOOL_NONE
+
+ ) {
$this->options['muted'] = $muted;
$this->options['hold'] = $hold;
$this->options['coaching'] = $coaching;
@@ -849,10 +979,10 @@ public function __construct($muted = Values::NONE, $hold = Values::NONE, $coachi
/**
* Whether to return only participants that are muted. Can be: `true` or `false`.
*
- * @param bool $muted Whether to return only participants that are muted
+ * @param bool $muted Whether to return only participants that are muted. Can be: `true` or `false`.
* @return $this Fluent Builder
*/
- public function setMuted($muted)
+ public function setMuted(bool $muted): self
{
$this->options['muted'] = $muted;
return $this;
@@ -861,10 +991,10 @@ public function setMuted($muted)
/**
* Whether to return only participants that are on hold. Can be: `true` or `false`.
*
- * @param bool $hold Whether to return only participants that are on hold
+ * @param bool $hold Whether to return only participants that are on hold. Can be: `true` or `false`.
* @return $this Fluent Builder
*/
- public function setHold($hold)
+ public function setHold(bool $hold): self
{
$this->options['hold'] = $hold;
return $this;
@@ -873,29 +1003,226 @@ public function setHold($hold)
/**
* Whether to return only participants who are coaching another call. Can be: `true` or `false`.
*
- * @param bool $coaching Whether to return only participants who are coaching
- * another call
+ * @param bool $coaching Whether to return only participants who are coaching another call. Can be: `true` or `false`.
+ * @return $this Fluent Builder
+ */
+ public function setCoaching(bool $coaching): self
+ {
+ $this->options['coaching'] = $coaching;
+ return $this;
+ }
+
+ /**
+ * Provide a friendly representation
+ *
+ * @return string Machine friendly representation
+ */
+ public function __toString(): string
+ {
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.ReadParticipantOptions ' . $options . ']';
+ }
+}
+
+class UpdateParticipantOptions extends Options
+ {
+ /**
+ * @param bool $muted Whether the participant should be muted. Can be `true` or `false`. `true` will mute the participant, and `false` will un-mute them. Anything value other than `true` or `false` is interpreted as `false`.
+ * @param bool $hold Whether the participant should be on hold. Can be: `true` or `false`. `true` puts the participant on hold, and `false` lets them rejoin the conference.
+ * @param string $holdUrl The URL we call using the `hold_method` for music that plays when the participant is on hold. The URL may return an MP3 file, a WAV file, or a TwiML document that contains ``, ``, ``, or `` verbs.
+ * @param string $holdMethod The HTTP method we should use to call `hold_url`. Can be: `GET` or `POST` and the default is `GET`.
+ * @param string $announceUrl The URL we call using the `announce_method` for an announcement to the participant. The URL may return an MP3 file, a WAV file, or a TwiML document that contains ``, ``, ``, or `` verbs.
+ * @param string $announceMethod The HTTP method we should use to call `announce_url`. Can be: `GET` or `POST` and defaults to `POST`.
+ * @param string $waitUrl The URL we call using the `wait_method` for the music to play while participants are waiting for the conference to start. The URL may return an MP3 file, a WAV file, or a TwiML document that contains ``, ``, ``, or `` verbs. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic).
+ * @param string $waitMethod The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file.
+ * @param bool $beepOnExit Whether to play a notification beep to the conference when the participant exits. Can be: `true` or `false`.
+ * @param bool $endConferenceOnExit Whether to end the conference when the participant leaves. Can be: `true` or `false` and defaults to `false`.
+ * @param bool $coaching Whether the participant is coaching another call. Can be: `true` or `false`. If not present, defaults to `false` unless `call_sid_to_coach` is defined. If `true`, `call_sid_to_coach` must be defined.
+ * @param string $callSidToCoach The SID of the participant who is being `coached`. The participant being coached is the only participant who can hear the participant who is `coaching`.
+ */
+ public function __construct(
+
+ bool $muted = Values::BOOL_NONE,
+ bool $hold = Values::BOOL_NONE,
+ string $holdUrl = Values::NONE,
+ string $holdMethod = Values::NONE,
+ string $announceUrl = Values::NONE,
+ string $announceMethod = Values::NONE,
+ string $waitUrl = Values::NONE,
+ string $waitMethod = Values::NONE,
+ bool $beepOnExit = Values::BOOL_NONE,
+ bool $endConferenceOnExit = Values::BOOL_NONE,
+ bool $coaching = Values::BOOL_NONE,
+ string $callSidToCoach = Values::NONE
+
+ ) {
+ $this->options['muted'] = $muted;
+ $this->options['hold'] = $hold;
+ $this->options['holdUrl'] = $holdUrl;
+ $this->options['holdMethod'] = $holdMethod;
+ $this->options['announceUrl'] = $announceUrl;
+ $this->options['announceMethod'] = $announceMethod;
+ $this->options['waitUrl'] = $waitUrl;
+ $this->options['waitMethod'] = $waitMethod;
+ $this->options['beepOnExit'] = $beepOnExit;
+ $this->options['endConferenceOnExit'] = $endConferenceOnExit;
+ $this->options['coaching'] = $coaching;
+ $this->options['callSidToCoach'] = $callSidToCoach;
+ }
+
+ /**
+ * Whether the participant should be muted. Can be `true` or `false`. `true` will mute the participant, and `false` will un-mute them. Anything value other than `true` or `false` is interpreted as `false`.
+ *
+ * @param bool $muted Whether the participant should be muted. Can be `true` or `false`. `true` will mute the participant, and `false` will un-mute them. Anything value other than `true` or `false` is interpreted as `false`.
+ * @return $this Fluent Builder
+ */
+ public function setMuted(bool $muted): self
+ {
+ $this->options['muted'] = $muted;
+ return $this;
+ }
+
+ /**
+ * Whether the participant should be on hold. Can be: `true` or `false`. `true` puts the participant on hold, and `false` lets them rejoin the conference.
+ *
+ * @param bool $hold Whether the participant should be on hold. Can be: `true` or `false`. `true` puts the participant on hold, and `false` lets them rejoin the conference.
+ * @return $this Fluent Builder
+ */
+ public function setHold(bool $hold): self
+ {
+ $this->options['hold'] = $hold;
+ return $this;
+ }
+
+ /**
+ * The URL we call using the `hold_method` for music that plays when the participant is on hold. The URL may return an MP3 file, a WAV file, or a TwiML document that contains ``, ``, ``, or `` verbs.
+ *
+ * @param string $holdUrl The URL we call using the `hold_method` for music that plays when the participant is on hold. The URL may return an MP3 file, a WAV file, or a TwiML document that contains ``, ``, ``, or `` verbs.
* @return $this Fluent Builder
*/
- public function setCoaching($coaching)
+ public function setHoldUrl(string $holdUrl): self
+ {
+ $this->options['holdUrl'] = $holdUrl;
+ return $this;
+ }
+
+ /**
+ * The HTTP method we should use to call `hold_url`. Can be: `GET` or `POST` and the default is `GET`.
+ *
+ * @param string $holdMethod The HTTP method we should use to call `hold_url`. Can be: `GET` or `POST` and the default is `GET`.
+ * @return $this Fluent Builder
+ */
+ public function setHoldMethod(string $holdMethod): self
+ {
+ $this->options['holdMethod'] = $holdMethod;
+ return $this;
+ }
+
+ /**
+ * The URL we call using the `announce_method` for an announcement to the participant. The URL may return an MP3 file, a WAV file, or a TwiML document that contains ``, ``, ``, or `` verbs.
+ *
+ * @param string $announceUrl The URL we call using the `announce_method` for an announcement to the participant. The URL may return an MP3 file, a WAV file, or a TwiML document that contains ``, ``, ``, or `` verbs.
+ * @return $this Fluent Builder
+ */
+ public function setAnnounceUrl(string $announceUrl): self
+ {
+ $this->options['announceUrl'] = $announceUrl;
+ return $this;
+ }
+
+ /**
+ * The HTTP method we should use to call `announce_url`. Can be: `GET` or `POST` and defaults to `POST`.
+ *
+ * @param string $announceMethod The HTTP method we should use to call `announce_url`. Can be: `GET` or `POST` and defaults to `POST`.
+ * @return $this Fluent Builder
+ */
+ public function setAnnounceMethod(string $announceMethod): self
+ {
+ $this->options['announceMethod'] = $announceMethod;
+ return $this;
+ }
+
+ /**
+ * The URL we call using the `wait_method` for the music to play while participants are waiting for the conference to start. The URL may return an MP3 file, a WAV file, or a TwiML document that contains ``, ``, ``, or `` verbs. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic).
+ *
+ * @param string $waitUrl The URL we call using the `wait_method` for the music to play while participants are waiting for the conference to start. The URL may return an MP3 file, a WAV file, or a TwiML document that contains ``, ``, ``, or `` verbs. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic).
+ * @return $this Fluent Builder
+ */
+ public function setWaitUrl(string $waitUrl): self
+ {
+ $this->options['waitUrl'] = $waitUrl;
+ return $this;
+ }
+
+ /**
+ * The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file.
+ *
+ * @param string $waitMethod The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file.
+ * @return $this Fluent Builder
+ */
+ public function setWaitMethod(string $waitMethod): self
+ {
+ $this->options['waitMethod'] = $waitMethod;
+ return $this;
+ }
+
+ /**
+ * Whether to play a notification beep to the conference when the participant exits. Can be: `true` or `false`.
+ *
+ * @param bool $beepOnExit Whether to play a notification beep to the conference when the participant exits. Can be: `true` or `false`.
+ * @return $this Fluent Builder
+ */
+ public function setBeepOnExit(bool $beepOnExit): self
+ {
+ $this->options['beepOnExit'] = $beepOnExit;
+ return $this;
+ }
+
+ /**
+ * Whether to end the conference when the participant leaves. Can be: `true` or `false` and defaults to `false`.
+ *
+ * @param bool $endConferenceOnExit Whether to end the conference when the participant leaves. Can be: `true` or `false` and defaults to `false`.
+ * @return $this Fluent Builder
+ */
+ public function setEndConferenceOnExit(bool $endConferenceOnExit): self
+ {
+ $this->options['endConferenceOnExit'] = $endConferenceOnExit;
+ return $this;
+ }
+
+ /**
+ * Whether the participant is coaching another call. Can be: `true` or `false`. If not present, defaults to `false` unless `call_sid_to_coach` is defined. If `true`, `call_sid_to_coach` must be defined.
+ *
+ * @param bool $coaching Whether the participant is coaching another call. Can be: `true` or `false`. If not present, defaults to `false` unless `call_sid_to_coach` is defined. If `true`, `call_sid_to_coach` must be defined.
+ * @return $this Fluent Builder
+ */
+ public function setCoaching(bool $coaching): self
{
$this->options['coaching'] = $coaching;
return $this;
}
+ /**
+ * The SID of the participant who is being `coached`. The participant being coached is the only participant who can hear the participant who is `coaching`.
+ *
+ * @param string $callSidToCoach The SID of the participant who is being `coached`. The participant being coached is the only participant who can hear the participant who is `coaching`.
+ * @return $this Fluent Builder
+ */
+ public function setCallSidToCoach(string $callSidToCoach): self
+ {
+ $this->options['callSidToCoach'] = $callSidToCoach;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.ReadParticipantOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.UpdateParticipantOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Conference/ParticipantPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Conference/ParticipantPage.php
index 083d848..84513da 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Conference/ParticipantPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Conference/ParticipantPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return ParticipantInstance \Twilio\Rest\Api\V2010\Account\Conference\ParticipantInstance
+ */
+ public function buildInstance(array $payload): ParticipantInstance
{
- return new ParticipantInstance(
- $this->version,
- $payload,
- $this->solution['accountSid'],
- $this->solution['conferenceSid']
- );
+ return new ParticipantInstance($this->version, $payload, $this->solution['accountSid'], $this->solution['conferenceSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.ParticipantPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Conference/RecordingContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Conference/RecordingContext.php
index 69d7244..b39cff9 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Conference/RecordingContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Conference/RecordingContext.php
@@ -2,65 +2,87 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Conference;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class RecordingContext extends InstanceContext
-{
+ {
/**
* Initialize the RecordingContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * to fetch
- * @param string $conferenceSid Fetch by unique Conference SID for the recording
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\Conference\RecordingContext
+ * @param Version $version Version that contains the resource
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Conference Recording resources to delete.
+ * @param string $conferenceSid The Conference SID that identifies the conference associated with the recording to delete.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Conference Recording resource to delete.
*/
- public function __construct(Version $version, $accountSid, $conferenceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $accountSid,
+ $conferenceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array(
- 'accountSid' => $accountSid,
- 'conferenceSid' => $conferenceSid,
- 'sid' => $sid,
- );
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+ 'conferenceSid' =>
+ $conferenceSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Conferences/' . \rawurlencode($conferenceSid) . '/Recordings/' . \rawurlencode($sid) . '.json';
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Conferences/' . \rawurlencode($conferenceSid)
+ .'/Recordings/' . \rawurlencode($sid)
+ .'.json';
}
/**
- * Update the RecordingInstance
+ * Delete the RecordingInstance
*
- * @param string $status The new status of the recording
- * @param array|Options $options Optional Arguments
- * @return RecordingInstance Updated RecordingInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($status, $options = array())
+ public function delete(): bool
{
- $options = new Values($options);
- $data = Values::of(array('Status' => $status, 'PauseBehavior' => $options['pauseBehavior'],));
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
+ }
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+
+ /**
+ * Fetch the RecordingInstance
+ *
+ * @return RecordingInstance Fetched RecordingInstance
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function fetch(): RecordingInstance
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new RecordingInstance(
$this->version,
@@ -71,21 +93,29 @@ public function update($status, $options = array())
);
}
+
/**
- * Fetch a RecordingInstance
+ * Update the RecordingInstance
*
- * @return RecordingInstance Fetched RecordingInstance
+ * @param string $status
+ * @param array|Options $options Optional Arguments
+ * @return RecordingInstance Updated RecordingInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function update(string $status, array $options = []): RecordingInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $options = new Values($options);
+
+ $data = Values::of([
+ 'Status' =>
+ $status,
+ 'PauseBehavior' =>
+ $options['pauseBehavior'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new RecordingInstance(
$this->version,
@@ -96,28 +126,18 @@ public function fetch()
);
}
- /**
- * Deletes the RecordingInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.RecordingContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Conference/RecordingInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Conference/RecordingInstance.php
index 61ec7d1..1fc0fcc 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Conference/RecordingInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Conference/RecordingInstance.php
@@ -2,58 +2,65 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Conference;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property string $apiVersion
- * @property string $callSid
- * @property string $conferenceSid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property \DateTime $startTime
- * @property string $duration
- * @property string $sid
- * @property string $price
- * @property string $priceUnit
+ * @property string|null $accountSid
+ * @property string|null $apiVersion
+ * @property string|null $callSid
+ * @property string|null $conferenceSid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property \DateTime|null $startTime
+ * @property string|null $duration
+ * @property string|null $sid
+ * @property string|null $price
+ * @property string|null $priceUnit
* @property string $status
* @property int $channels
* @property string $source
- * @property int $errorCode
- * @property array $encryptionDetails
- * @property string $uri
+ * @property int|null $errorCode
+ * @property array|null $encryptionDetails
+ * @property string|null $uri
*/
class RecordingInstance extends InstanceResource
{
/**
* Initialize the RecordingInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $conferenceSid The Conference SID that identifies the
- * conference associated with the recording
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\Conference\RecordingInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Conference Recording resources to delete.
+ * @param string $conferenceSid The Conference SID that identifies the conference associated with the recording to delete.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Conference Recording resource to delete.
*/
- public function __construct(Version $version, array $payload, $accountSid, $conferenceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $accountSid, string $conferenceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'apiVersion' => Values::array_get($payload, 'api_version'),
'callSid' => Values::array_get($payload, 'call_sid'),
@@ -71,24 +78,18 @@ public function __construct(Version $version, array $payload, $accountSid, $conf
'errorCode' => Values::array_get($payload, 'error_code'),
'encryptionDetails' => Values::array_get($payload, 'encryption_details'),
'uri' => Values::array_get($payload, 'uri'),
- );
+ ];
- $this->solution = array(
- 'accountSid' => $accountSid,
- 'conferenceSid' => $conferenceSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['accountSid' => $accountSid, 'conferenceSid' => $conferenceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Api\V2010\Account\Conference\RecordingContext Context
- * for this
- * RecordingInstance
+ * @return RecordingContext Context for this RecordingInstance
*/
- protected function proxy()
+ protected function proxy(): RecordingContext
{
if (!$this->context) {
$this->context = new RecordingContext(
@@ -103,38 +104,41 @@ protected function proxy()
}
/**
- * Update the RecordingInstance
+ * Delete the RecordingInstance
*
- * @param string $status The new status of the recording
- * @param array|Options $options Optional Arguments
- * @return RecordingInstance Updated RecordingInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($status, $options = array())
+ public function delete(): bool
{
- return $this->proxy()->update($status, $options);
+
+ return $this->proxy()->delete();
}
/**
- * Fetch a RecordingInstance
+ * Fetch the RecordingInstance
*
* @return RecordingInstance Fetched RecordingInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): RecordingInstance
{
+
return $this->proxy()->fetch();
}
/**
- * Deletes the RecordingInstance
+ * Update the RecordingInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param string $status
+ * @param array|Options $options Optional Arguments
+ * @return RecordingInstance Updated RecordingInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(string $status, array $options = []): RecordingInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->update($status, $options);
}
/**
@@ -144,7 +148,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -163,12 +167,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.RecordingInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Conference/RecordingList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Conference/RecordingList.php
index b6b344c..dd9d1b4 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Conference/RecordingList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Conference/RecordingList.php
@@ -2,38 +2,78 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\Conference;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class RecordingList extends ListResource
-{
+ {
/**
* Construct the RecordingList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $conferenceSid The Conference SID that identifies the
- * conference associated with the recording
- * @return \Twilio\Rest\Api\V2010\Account\Conference\RecordingList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Conference Recording resources to delete.
+ * @param string $conferenceSid The Conference SID that identifies the conference associated with the recording to delete.
*/
- public function __construct(Version $version, $accountSid, $conferenceSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid,
+ string $conferenceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'conferenceSid' => $conferenceSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ 'conferenceSid' =>
+ $conferenceSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Conferences/' . \rawurlencode($conferenceSid)
+ .'/Recordings.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Conferences/' . \rawurlencode($conferenceSid) . '/Recordings.json';
+ /**
+ * Reads RecordingInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return RecordingInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -53,9 +93,9 @@ public function __construct(Version $version, $accountSid, $conferenceSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -64,54 +104,37 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads RecordingInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return RecordingInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of RecordingInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of RecordingInstance
+ * @return RecordingPage Page of RecordingInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): RecordingPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'DateCreated<' => Serialize::iso8601Date($options['dateCreatedBefore']),
- 'DateCreated' => Serialize::iso8601Date($options['dateCreated']),
- 'DateCreated>' => Serialize::iso8601Date($options['dateCreatedAfter']),
+
+ $params = Values::of([
+ 'DateCreated<' =>
+ Serialize::iso8601Date($options['dateCreatedBefore']),
+ 'DateCreated' =>
+ Serialize::iso8601Date($options['dateCreated']),
+ 'DateCreated>' =>
+ Serialize::iso8601Date($options['dateCreatedAfter']),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new RecordingPage($this->version, $response, $this->solution);
}
@@ -121,9 +144,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of RecordingInstance
+ * @return RecordingPage Page of RecordingInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): RecordingPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -133,13 +156,16 @@ public function getPage($targetUrl)
return new RecordingPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a RecordingContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\Conference\RecordingContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the Conference Recording resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): RecordingContext
{
return new RecordingContext(
$this->version,
@@ -154,8 +180,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.RecordingList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Conference/RecordingOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Conference/RecordingOptions.php
index 5bddb6d..19922d4 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Conference/RecordingOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Conference/RecordingOptions.php
@@ -1,10 +1,16 @@
=YYYY-MM-DD` returns recordings generated at or after midnight on a date.
+ * @param string $dateCreated The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date.
+ * @param string $dateCreatedAfter The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date.
* @return ReadRecordingOptions Options builder
*/
- public static function read($dateCreatedBefore = Values::NONE, $dateCreated = Values::NONE, $dateCreatedAfter = Values::NONE)
- {
- return new ReadRecordingOptions($dateCreatedBefore, $dateCreated, $dateCreatedAfter);
- }
-}
+ public static function read(
+
+ string $dateCreatedBefore = null,
+ string $dateCreated = null,
+ string $dateCreatedAfter = null
-class UpdateRecordingOptions extends Options
-{
- /**
- * @param string $pauseBehavior Whether to record during a pause
- */
- public function __construct($pauseBehavior = Values::NONE)
+ ): ReadRecordingOptions
{
- $this->options['pauseBehavior'] = $pauseBehavior;
+ return new ReadRecordingOptions(
+ $dateCreatedBefore,
+ $dateCreated,
+ $dateCreatedAfter
+ );
}
/**
- * Whether to record during a pause. Can be: `skip` or `silence` and the default is `silence`. `skip` does not record during the pause period, while `silence` will replace the actual audio of the call with silence during the pause period. This parameter only applies when setting `status` is set to `paused`.
- *
- * @param string $pauseBehavior Whether to record during a pause
- * @return $this Fluent Builder
+ * @param string $pauseBehavior Whether to record during a pause. Can be: `skip` or `silence` and the default is `silence`. `skip` does not record during the pause period, while `silence` will replace the actual audio of the call with silence during the pause period. This parameter only applies when setting `status` is set to `paused`.
+ * @return UpdateRecordingOptions Options builder
*/
- public function setPauseBehavior($pauseBehavior)
- {
- $this->options['pauseBehavior'] = $pauseBehavior;
- return $this;
- }
+ public static function update(
+
+ string $pauseBehavior = Values::NONE
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
+ ): UpdateRecordingOptions
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.UpdateRecordingOptions ' . \implode(' ', $options) . ']';
+ return new UpdateRecordingOptions(
+ $pauseBehavior
+ );
}
+
}
+
+
class ReadRecordingOptions extends Options
-{
+ {
/**
- * @param string $dateCreatedBefore The `YYYY-MM-DD` value of the resources to
- * read
- * @param string $dateCreated The `YYYY-MM-DD` value of the resources to read
- * @param string $dateCreatedAfter The `YYYY-MM-DD` value of the resources to
- * read
+ * @param string $dateCreatedBefore The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date.
+ * @param string $dateCreated The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date.
+ * @param string $dateCreatedAfter The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date.
*/
- public function __construct($dateCreatedBefore = Values::NONE, $dateCreated = Values::NONE, $dateCreatedAfter = Values::NONE)
- {
+ public function __construct(
+
+ string $dateCreatedBefore = null,
+ string $dateCreated = null,
+ string $dateCreatedAfter = null
+
+ ) {
$this->options['dateCreatedBefore'] = $dateCreatedBefore;
$this->options['dateCreated'] = $dateCreated;
$this->options['dateCreatedAfter'] = $dateCreatedAfter;
@@ -95,11 +84,10 @@ public function __construct($dateCreatedBefore = Values::NONE, $dateCreated = Va
/**
* The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date.
*
- * @param string $dateCreatedBefore The `YYYY-MM-DD` value of the resources to
- * read
+ * @param string $dateCreatedBefore The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date.
* @return $this Fluent Builder
*/
- public function setDateCreatedBefore($dateCreatedBefore)
+ public function setDateCreatedBefore(string $dateCreatedBefore): self
{
$this->options['dateCreatedBefore'] = $dateCreatedBefore;
return $this;
@@ -108,10 +96,10 @@ public function setDateCreatedBefore($dateCreatedBefore)
/**
* The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date.
*
- * @param string $dateCreated The `YYYY-MM-DD` value of the resources to read
+ * @param string $dateCreated The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date.
* @return $this Fluent Builder
*/
- public function setDateCreated($dateCreated)
+ public function setDateCreated(string $dateCreated): self
{
$this->options['dateCreated'] = $dateCreated;
return $this;
@@ -120,11 +108,10 @@ public function setDateCreated($dateCreated)
/**
* The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date.
*
- * @param string $dateCreatedAfter The `YYYY-MM-DD` value of the resources to
- * read
+ * @param string $dateCreatedAfter The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. You can also specify inequality: `DateCreated<=YYYY-MM-DD` will return recordings generated at or before midnight on a given date, and `DateCreated>=YYYY-MM-DD` returns recordings generated at or after midnight on a date.
* @return $this Fluent Builder
*/
- public function setDateCreatedAfter($dateCreatedAfter)
+ public function setDateCreatedAfter(string $dateCreatedAfter): self
{
$this->options['dateCreatedAfter'] = $dateCreatedAfter;
return $this;
@@ -135,14 +122,47 @@ public function setDateCreatedAfter($dateCreatedAfter)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
+ {
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.ReadRecordingOptions ' . $options . ']';
+ }
+}
+
+class UpdateRecordingOptions extends Options
+ {
+ /**
+ * @param string $pauseBehavior Whether to record during a pause. Can be: `skip` or `silence` and the default is `silence`. `skip` does not record during the pause period, while `silence` will replace the actual audio of the call with silence during the pause period. This parameter only applies when setting `status` is set to `paused`.
+ */
+ public function __construct(
+
+ string $pauseBehavior = Values::NONE
+
+ ) {
+ $this->options['pauseBehavior'] = $pauseBehavior;
+ }
+
+ /**
+ * Whether to record during a pause. Can be: `skip` or `silence` and the default is `silence`. `skip` does not record during the pause period, while `silence` will replace the actual audio of the call with silence during the pause period. This parameter only applies when setting `status` is set to `paused`.
+ *
+ * @param string $pauseBehavior Whether to record during a pause. Can be: `skip` or `silence` and the default is `silence`. `skip` does not record during the pause period, while `silence` will replace the actual audio of the call with silence during the pause period. This parameter only applies when setting `status` is set to `paused`.
+ * @return $this Fluent Builder
+ */
+ public function setPauseBehavior(string $pauseBehavior): self
+ {
+ $this->options['pauseBehavior'] = $pauseBehavior;
+ return $this;
+ }
+
+ /**
+ * Provide a friendly representation
+ *
+ * @return string Machine friendly representation
+ */
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.ReadRecordingOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.UpdateRecordingOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Conference/RecordingPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Conference/RecordingPage.php
index 983529b..9128fa4 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Conference/RecordingPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Conference/RecordingPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return RecordingInstance \Twilio\Rest\Api\V2010\Account\Conference\RecordingInstance
+ */
+ public function buildInstance(array $payload): RecordingInstance
{
- return new RecordingInstance(
- $this->version,
- $payload,
- $this->solution['accountSid'],
- $this->solution['conferenceSid']
- );
+ return new RecordingInstance($this->version, $payload, $this->solution['accountSid'], $this->solution['conferenceSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.RecordingPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ConferenceContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ConferenceContext.php
index c3f059e..47faa7f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ConferenceContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ConferenceContext.php
@@ -2,66 +2,80 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Api\V2010\Account\Conference\ParticipantList;
-use Twilio\Rest\Api\V2010\Account\Conference\RecordingList;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Api\V2010\Account\Conference\ParticipantList;
+use Twilio\Rest\Api\V2010\Account\Conference\RecordingList;
+
/**
- * @property \Twilio\Rest\Api\V2010\Account\Conference\ParticipantList $participants
- * @property \Twilio\Rest\Api\V2010\Account\Conference\RecordingList $recordings
- * @method \Twilio\Rest\Api\V2010\Account\Conference\ParticipantContext participants(string $callSid)
+ * @property ParticipantList $participants
+ * @property RecordingList $recordings
* @method \Twilio\Rest\Api\V2010\Account\Conference\RecordingContext recordings(string $sid)
+ * @method \Twilio\Rest\Api\V2010\Account\Conference\ParticipantContext participants(string $callSid)
*/
class ConferenceContext extends InstanceContext
-{
- protected $_participants = null;
- protected $_recordings = null;
+ {
+ protected $_participants;
+ protected $_recordings;
/**
* Initialize the ConferenceContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the
- * resource(s) to fetch
- * @param string $sid The unique string that identifies this resource
- * @return \Twilio\Rest\Api\V2010\Account\ConferenceContext
+ * @param Version $version Version that contains the resource
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Conference resource(s) to fetch.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Conference resource to fetch
*/
- public function __construct(Version $version, $accountSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $accountSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'sid' => $sid,);
-
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Conferences/' . \rawurlencode($sid) . '.json';
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Conferences/' . \rawurlencode($sid)
+ .'.json';
}
/**
- * Fetch a ConferenceInstance
+ * Fetch the ConferenceInstance
*
* @return ConferenceInstance Fetched ConferenceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): ConferenceInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new ConferenceInstance(
$this->version,
@@ -71,6 +85,7 @@ public function fetch()
);
}
+
/**
* Update the ConferenceInstance
*
@@ -78,22 +93,22 @@ public function fetch()
* @return ConferenceInstance Updated ConferenceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ConferenceInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'Status' => $options['status'],
- 'AnnounceUrl' => $options['announceUrl'],
- 'AnnounceMethod' => $options['announceMethod'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'Status' =>
+ $options['status'],
+ 'AnnounceUrl' =>
+ $options['announceUrl'],
+ 'AnnounceMethod' =>
+ $options['announceMethod'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new ConferenceInstance(
$this->version,
@@ -103,12 +118,11 @@ public function update($options = array())
);
}
+
/**
* Access the participants
- *
- * @return \Twilio\Rest\Api\V2010\Account\Conference\ParticipantList
*/
- protected function getParticipants()
+ protected function getParticipants(): ParticipantList
{
if (!$this->_participants) {
$this->_participants = new ParticipantList(
@@ -123,10 +137,8 @@ protected function getParticipants()
/**
* Access the recordings
- *
- * @return \Twilio\Rest\Api\V2010\Account\Conference\RecordingList
*/
- protected function getRecordings()
+ protected function getRecordings(): RecordingList
{
if (!$this->_recordings) {
$this->_recordings = new RecordingList(
@@ -143,10 +155,10 @@ protected function getRecordings()
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -161,10 +173,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -179,12 +191,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.ConferenceContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ConferenceInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ConferenceInstance.php
index 83b6e98..19743a6 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ConferenceInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ConferenceInstance.php
@@ -2,52 +2,64 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Api\V2010\Account\Conference\ParticipantList;
+use Twilio\Rest\Api\V2010\Account\Conference\RecordingList;
+
/**
- * @property string $accountSid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $apiVersion
- * @property string $friendlyName
- * @property string $region
- * @property string $sid
+ * @property string|null $accountSid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $apiVersion
+ * @property string|null $friendlyName
+ * @property string|null $region
+ * @property string|null $sid
* @property string $status
- * @property string $uri
- * @property array $subresourceUris
+ * @property string|null $uri
+ * @property array|null $subresourceUris
+ * @property string $reasonConferenceEnded
+ * @property string|null $callSidEndingConference
*/
class ConferenceInstance extends InstanceResource
{
- protected $_participants = null;
- protected $_recordings = null;
+ protected $_participants;
+ protected $_recordings;
/**
* Initialize the ConferenceInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The SID of the Account that created this resource
- * @param string $sid The unique string that identifies this resource
- * @return \Twilio\Rest\Api\V2010\Account\ConferenceInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Conference resource(s) to fetch.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Conference resource to fetch
*/
- public function __construct(Version $version, array $payload, $accountSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $accountSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
@@ -58,19 +70,20 @@ public function __construct(Version $version, array $payload, $accountSid, $sid
'status' => Values::array_get($payload, 'status'),
'uri' => Values::array_get($payload, 'uri'),
'subresourceUris' => Values::array_get($payload, 'subresource_uris'),
- );
+ 'reasonConferenceEnded' => Values::array_get($payload, 'reason_conference_ended'),
+ 'callSidEndingConference' => Values::array_get($payload, 'call_sid_ending_conference'),
+ ];
- $this->solution = array('accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Api\V2010\Account\ConferenceContext Context for this
- * ConferenceInstance
+ * @return ConferenceContext Context for this ConferenceInstance
*/
- protected function proxy()
+ protected function proxy(): ConferenceContext
{
if (!$this->context) {
$this->context = new ConferenceContext(
@@ -84,13 +97,14 @@ protected function proxy()
}
/**
- * Fetch a ConferenceInstance
+ * Fetch the ConferenceInstance
*
* @return ConferenceInstance Fetched ConferenceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): ConferenceInstance
{
+
return $this->proxy()->fetch();
}
@@ -101,27 +115,24 @@ public function fetch()
* @return ConferenceInstance Updated ConferenceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ConferenceInstance
{
+
return $this->proxy()->update($options);
}
/**
* Access the participants
- *
- * @return \Twilio\Rest\Api\V2010\Account\Conference\ParticipantList
*/
- protected function getParticipants()
+ protected function getParticipants(): ParticipantList
{
return $this->proxy()->participants;
}
/**
* Access the recordings
- *
- * @return \Twilio\Rest\Api\V2010\Account\Conference\RecordingList
*/
- protected function getRecordings()
+ protected function getRecordings(): RecordingList
{
return $this->proxy()->recordings;
}
@@ -133,7 +144,7 @@ protected function getRecordings()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -152,12 +163,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.ConferenceInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ConferenceList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ConferenceList.php
index 3419aa6..5113512 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ConferenceList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ConferenceList.php
@@ -2,36 +2,72 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class ConferenceList extends ListResource
-{
+ {
/**
* Construct the ConferenceList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created this resource
- * @return \Twilio\Rest\Api\V2010\Account\ConferenceList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Conference resource(s) to fetch.
*/
- public function __construct(Version $version, $accountSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Conferences.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Conferences.json';
+ /**
+ * Reads ConferenceInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return ConferenceInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -51,9 +87,9 @@ public function __construct(Version $version, $accountSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -62,59 +98,47 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads ConferenceInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return ConferenceInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of ConferenceInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of ConferenceInstance
+ * @return ConferencePage Page of ConferenceInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): ConferencePage
{
$options = new Values($options);
- $params = Values::of(array(
- 'DateCreated<' => Serialize::iso8601Date($options['dateCreatedBefore']),
- 'DateCreated' => Serialize::iso8601Date($options['dateCreated']),
- 'DateCreated>' => Serialize::iso8601Date($options['dateCreatedAfter']),
- 'DateUpdated<' => Serialize::iso8601Date($options['dateUpdatedBefore']),
- 'DateUpdated' => Serialize::iso8601Date($options['dateUpdated']),
- 'DateUpdated>' => Serialize::iso8601Date($options['dateUpdatedAfter']),
- 'FriendlyName' => $options['friendlyName'],
- 'Status' => $options['status'],
+
+ $params = Values::of([
+ 'DateCreated<' =>
+ Serialize::iso8601Date($options['dateCreatedBefore']),
+ 'DateCreated' =>
+ Serialize::iso8601Date($options['dateCreated']),
+ 'DateCreated>' =>
+ Serialize::iso8601Date($options['dateCreatedAfter']),
+ 'DateUpdated<' =>
+ Serialize::iso8601Date($options['dateUpdatedBefore']),
+ 'DateUpdated' =>
+ Serialize::iso8601Date($options['dateUpdated']),
+ 'DateUpdated>' =>
+ Serialize::iso8601Date($options['dateUpdatedAfter']),
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'Status' =>
+ $options['status'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new ConferencePage($this->version, $response, $this->solution);
}
@@ -124,9 +148,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of ConferenceInstance
+ * @return ConferencePage Page of ConferenceInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): ConferencePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -136,15 +160,22 @@ public function getPage($targetUrl)
return new ConferencePage($this->version, $response, $this->solution);
}
+
/**
* Constructs a ConferenceContext
*
- * @param string $sid The unique string that identifies this resource
- * @return \Twilio\Rest\Api\V2010\Account\ConferenceContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the Conference resource to fetch
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): ConferenceContext
{
- return new ConferenceContext($this->version, $this->solution['accountSid'], $sid);
+ return new ConferenceContext(
+ $this->version,
+ $this->solution['accountSid'],
+ $sid
+ );
}
/**
@@ -152,8 +183,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.ConferenceList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ConferenceOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ConferenceOptions.php
index 7b542c0..88bbc26 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ConferenceOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ConferenceOptions.php
@@ -1,10 +1,16 @@
=YYYY-MM-DD` to read conferences that were created on or after midnight of this date.
+ * @param string $dateCreated Only include conferences that were created on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only conferences that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read conferences that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read conferences that were created on or after midnight of this date.
+ * @param string $dateCreatedAfter Only include conferences that were created on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only conferences that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read conferences that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read conferences that were created on or after midnight of this date.
+ * @param string $dateUpdatedBefore Only include conferences that were last updated on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only conferences that were last updated on this date. You can also specify an inequality, such as `DateUpdated<=YYYY-MM-DD`, to read conferences that were last updated on or before midnight of this date, and `DateUpdated>=YYYY-MM-DD` to read conferences that were last updated on or after midnight of this date.
+ * @param string $dateUpdated Only include conferences that were last updated on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only conferences that were last updated on this date. You can also specify an inequality, such as `DateUpdated<=YYYY-MM-DD`, to read conferences that were last updated on or before midnight of this date, and `DateUpdated>=YYYY-MM-DD` to read conferences that were last updated on or after midnight of this date.
+ * @param string $dateUpdatedAfter Only include conferences that were last updated on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only conferences that were last updated on this date. You can also specify an inequality, such as `DateUpdated<=YYYY-MM-DD`, to read conferences that were last updated on or before midnight of this date, and `DateUpdated>=YYYY-MM-DD` to read conferences that were last updated on or after midnight of this date.
+ * @param string $friendlyName The string that identifies the Conference resources to read.
+ * @param string $status The status of the resources to read. Can be: `init`, `in-progress`, or `completed`.
* @return ReadConferenceOptions Options builder
*/
- public static function read($dateCreatedBefore = Values::NONE, $dateCreated = Values::NONE, $dateCreatedAfter = Values::NONE, $dateUpdatedBefore = Values::NONE, $dateUpdated = Values::NONE, $dateUpdatedAfter = Values::NONE, $friendlyName = Values::NONE, $status = Values::NONE)
+ public static function read(
+
+ string $dateCreatedBefore = null,
+ string $dateCreated = null,
+ string $dateCreatedAfter = null,
+ string $dateUpdatedBefore = null,
+ string $dateUpdated = null,
+ string $dateUpdatedAfter = null,
+ string $friendlyName = Values::NONE,
+ string $status = Values::NONE
+
+ ): ReadConferenceOptions
{
- return new ReadConferenceOptions($dateCreatedBefore, $dateCreated, $dateCreatedAfter, $dateUpdatedBefore, $dateUpdated, $dateUpdatedAfter, $friendlyName, $status);
+ return new ReadConferenceOptions(
+ $dateCreatedBefore,
+ $dateCreated,
+ $dateCreatedAfter,
+ $dateUpdatedBefore,
+ $dateUpdated,
+ $dateUpdatedAfter,
+ $friendlyName,
+ $status
+ );
}
/**
- * @param string $status The new status of the resource
- * @param string $announceUrl The URL we should call to announce something into
- * the conference
- * @param string $announceMethod he HTTP method used to call announce_url
+ * @param string $status
+ * @param string $announceUrl The URL we should call to announce something into the conference. The URL may return an MP3 file, a WAV file, or a TwiML document that contains ``, ``, ``, or `` verbs.
+ * @param string $announceMethod The HTTP method used to call `announce_url`. Can be: `GET` or `POST` and the default is `POST`
* @return UpdateConferenceOptions Options builder
*/
- public static function update($status = Values::NONE, $announceUrl = Values::NONE, $announceMethod = Values::NONE)
+ public static function update(
+
+ string $status = Values::NONE,
+ string $announceUrl = Values::NONE,
+ string $announceMethod = Values::NONE
+
+ ): UpdateConferenceOptions
{
- return new UpdateConferenceOptions($status, $announceUrl, $announceMethod);
+ return new UpdateConferenceOptions(
+ $status,
+ $announceUrl,
+ $announceMethod
+ );
}
+
}
+
class ReadConferenceOptions extends Options
-{
+ {
/**
- * @param string $dateCreatedBefore The `YYYY-MM-DD` value of the resources to
- * read
- * @param string $dateCreated The `YYYY-MM-DD` value of the resources to read
- * @param string $dateCreatedAfter The `YYYY-MM-DD` value of the resources to
- * read
- * @param string $dateUpdatedBefore The `YYYY-MM-DD` value of the resources to
- * read
- * @param string $dateUpdated The `YYYY-MM-DD` value of the resources to read
- * @param string $dateUpdatedAfter The `YYYY-MM-DD` value of the resources to
- * read
- * @param string $friendlyName The string that identifies the Conference
- * resources to read
- * @param string $status The status of the resources to read
+ * @param string $dateCreatedBefore Only include conferences that were created on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only conferences that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read conferences that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read conferences that were created on or after midnight of this date.
+ * @param string $dateCreated Only include conferences that were created on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only conferences that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read conferences that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read conferences that were created on or after midnight of this date.
+ * @param string $dateCreatedAfter Only include conferences that were created on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only conferences that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read conferences that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read conferences that were created on or after midnight of this date.
+ * @param string $dateUpdatedBefore Only include conferences that were last updated on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only conferences that were last updated on this date. You can also specify an inequality, such as `DateUpdated<=YYYY-MM-DD`, to read conferences that were last updated on or before midnight of this date, and `DateUpdated>=YYYY-MM-DD` to read conferences that were last updated on or after midnight of this date.
+ * @param string $dateUpdated Only include conferences that were last updated on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only conferences that were last updated on this date. You can also specify an inequality, such as `DateUpdated<=YYYY-MM-DD`, to read conferences that were last updated on or before midnight of this date, and `DateUpdated>=YYYY-MM-DD` to read conferences that were last updated on or after midnight of this date.
+ * @param string $dateUpdatedAfter Only include conferences that were last updated on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only conferences that were last updated on this date. You can also specify an inequality, such as `DateUpdated<=YYYY-MM-DD`, to read conferences that were last updated on or before midnight of this date, and `DateUpdated>=YYYY-MM-DD` to read conferences that were last updated on or after midnight of this date.
+ * @param string $friendlyName The string that identifies the Conference resources to read.
+ * @param string $status The status of the resources to read. Can be: `init`, `in-progress`, or `completed`.
*/
- public function __construct($dateCreatedBefore = Values::NONE, $dateCreated = Values::NONE, $dateCreatedAfter = Values::NONE, $dateUpdatedBefore = Values::NONE, $dateUpdated = Values::NONE, $dateUpdatedAfter = Values::NONE, $friendlyName = Values::NONE, $status = Values::NONE)
- {
+ public function __construct(
+
+ string $dateCreatedBefore = null,
+ string $dateCreated = null,
+ string $dateCreatedAfter = null,
+ string $dateUpdatedBefore = null,
+ string $dateUpdated = null,
+ string $dateUpdatedAfter = null,
+ string $friendlyName = Values::NONE,
+ string $status = Values::NONE
+
+ ) {
$this->options['dateCreatedBefore'] = $dateCreatedBefore;
$this->options['dateCreated'] = $dateCreated;
$this->options['dateCreatedAfter'] = $dateCreatedAfter;
@@ -78,76 +116,72 @@ public function __construct($dateCreatedBefore = Values::NONE, $dateCreated = Va
}
/**
- * The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`.
+ * Only include conferences that were created on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only conferences that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read conferences that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read conferences that were created on or after midnight of this date.
*
- * @param string $dateCreatedBefore The `YYYY-MM-DD` value of the resources to
- * read
+ * @param string $dateCreatedBefore Only include conferences that were created on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only conferences that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read conferences that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read conferences that were created on or after midnight of this date.
* @return $this Fluent Builder
*/
- public function setDateCreatedBefore($dateCreatedBefore)
+ public function setDateCreatedBefore(string $dateCreatedBefore): self
{
$this->options['dateCreatedBefore'] = $dateCreatedBefore;
return $this;
}
/**
- * The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`.
+ * Only include conferences that were created on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only conferences that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read conferences that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read conferences that were created on or after midnight of this date.
*
- * @param string $dateCreated The `YYYY-MM-DD` value of the resources to read
+ * @param string $dateCreated Only include conferences that were created on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only conferences that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read conferences that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read conferences that were created on or after midnight of this date.
* @return $this Fluent Builder
*/
- public function setDateCreated($dateCreated)
+ public function setDateCreated(string $dateCreated): self
{
$this->options['dateCreated'] = $dateCreated;
return $this;
}
/**
- * The `date_created` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that started on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that started on or after midnight on a date, use `>=YYYY-MM-DD`.
+ * Only include conferences that were created on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only conferences that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read conferences that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read conferences that were created on or after midnight of this date.
*
- * @param string $dateCreatedAfter The `YYYY-MM-DD` value of the resources to
- * read
+ * @param string $dateCreatedAfter Only include conferences that were created on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only conferences that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read conferences that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read conferences that were created on or after midnight of this date.
* @return $this Fluent Builder
*/
- public function setDateCreatedAfter($dateCreatedAfter)
+ public function setDateCreatedAfter(string $dateCreatedAfter): self
{
$this->options['dateCreatedAfter'] = $dateCreatedAfter;
return $this;
}
/**
- * The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`.
+ * Only include conferences that were last updated on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only conferences that were last updated on this date. You can also specify an inequality, such as `DateUpdated<=YYYY-MM-DD`, to read conferences that were last updated on or before midnight of this date, and `DateUpdated>=YYYY-MM-DD` to read conferences that were last updated on or after midnight of this date.
*
- * @param string $dateUpdatedBefore The `YYYY-MM-DD` value of the resources to
- * read
+ * @param string $dateUpdatedBefore Only include conferences that were last updated on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only conferences that were last updated on this date. You can also specify an inequality, such as `DateUpdated<=YYYY-MM-DD`, to read conferences that were last updated on or before midnight of this date, and `DateUpdated>=YYYY-MM-DD` to read conferences that were last updated on or after midnight of this date.
* @return $this Fluent Builder
*/
- public function setDateUpdatedBefore($dateUpdatedBefore)
+ public function setDateUpdatedBefore(string $dateUpdatedBefore): self
{
$this->options['dateUpdatedBefore'] = $dateUpdatedBefore;
return $this;
}
/**
- * The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`.
+ * Only include conferences that were last updated on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only conferences that were last updated on this date. You can also specify an inequality, such as `DateUpdated<=YYYY-MM-DD`, to read conferences that were last updated on or before midnight of this date, and `DateUpdated>=YYYY-MM-DD` to read conferences that were last updated on or after midnight of this date.
*
- * @param string $dateUpdated The `YYYY-MM-DD` value of the resources to read
+ * @param string $dateUpdated Only include conferences that were last updated on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only conferences that were last updated on this date. You can also specify an inequality, such as `DateUpdated<=YYYY-MM-DD`, to read conferences that were last updated on or before midnight of this date, and `DateUpdated>=YYYY-MM-DD` to read conferences that were last updated on or after midnight of this date.
* @return $this Fluent Builder
*/
- public function setDateUpdated($dateUpdated)
+ public function setDateUpdated(string $dateUpdated): self
{
$this->options['dateUpdated'] = $dateUpdated;
return $this;
}
/**
- * The `date_updated` value, specified as `YYYY-MM-DD`, of the resources to read. To read conferences that were last updated on or before midnight on a date, use `<=YYYY-MM-DD`, and to specify conferences that were last updated on or after midnight on a given date, use `>=YYYY-MM-DD`.
+ * Only include conferences that were last updated on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only conferences that were last updated on this date. You can also specify an inequality, such as `DateUpdated<=YYYY-MM-DD`, to read conferences that were last updated on or before midnight of this date, and `DateUpdated>=YYYY-MM-DD` to read conferences that were last updated on or after midnight of this date.
*
- * @param string $dateUpdatedAfter The `YYYY-MM-DD` value of the resources to
- * read
+ * @param string $dateUpdatedAfter Only include conferences that were last updated on this date. Specify a date as `YYYY-MM-DD` in UTC, for example: `2009-07-06`, to read only conferences that were last updated on this date. You can also specify an inequality, such as `DateUpdated<=YYYY-MM-DD`, to read conferences that were last updated on or before midnight of this date, and `DateUpdated>=YYYY-MM-DD` to read conferences that were last updated on or after midnight of this date.
* @return $this Fluent Builder
*/
- public function setDateUpdatedAfter($dateUpdatedAfter)
+ public function setDateUpdatedAfter(string $dateUpdatedAfter): self
{
$this->options['dateUpdatedAfter'] = $dateUpdatedAfter;
return $this;
@@ -156,11 +190,10 @@ public function setDateUpdatedAfter($dateUpdatedAfter)
/**
* The string that identifies the Conference resources to read.
*
- * @param string $friendlyName The string that identifies the Conference
- * resources to read
+ * @param string $friendlyName The string that identifies the Conference resources to read.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -169,10 +202,10 @@ public function setFriendlyName($friendlyName)
/**
* The status of the resources to read. Can be: `init`, `in-progress`, or `completed`.
*
- * @param string $status The status of the resources to read
+ * @param string $status The status of the resources to read. Can be: `init`, `in-progress`, or `completed`.
* @return $this Fluent Builder
*/
- public function setStatus($status)
+ public function setStatus(string $status): self
{
$this->options['status'] = $status;
return $this;
@@ -183,53 +216,49 @@ public function setStatus($status)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.ReadConferenceOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.ReadConferenceOptions ' . $options . ']';
}
}
class UpdateConferenceOptions extends Options
-{
+ {
/**
- * @param string $status The new status of the resource
- * @param string $announceUrl The URL we should call to announce something into
- * the conference
- * @param string $announceMethod he HTTP method used to call announce_url
+ * @param string $status
+ * @param string $announceUrl The URL we should call to announce something into the conference. The URL may return an MP3 file, a WAV file, or a TwiML document that contains ``, ``, ``, or `` verbs.
+ * @param string $announceMethod The HTTP method used to call `announce_url`. Can be: `GET` or `POST` and the default is `POST`
*/
- public function __construct($status = Values::NONE, $announceUrl = Values::NONE, $announceMethod = Values::NONE)
- {
+ public function __construct(
+
+ string $status = Values::NONE,
+ string $announceUrl = Values::NONE,
+ string $announceMethod = Values::NONE
+
+ ) {
$this->options['status'] = $status;
$this->options['announceUrl'] = $announceUrl;
$this->options['announceMethod'] = $announceMethod;
}
/**
- * The new status of the resource. Can be: Can be: `init`, `in-progress`, or `completed`. Specifying `completed` will end the conference and hang up all participants
- *
- * @param string $status The new status of the resource
+ * @param string $status
* @return $this Fluent Builder
*/
- public function setStatus($status)
+ public function setStatus(string $status): self
{
$this->options['status'] = $status;
return $this;
}
/**
- * The URL we should call to announce something into the conference. The URL can return an MP3, a WAV, or a TwiML document with `` or ``.
+ * The URL we should call to announce something into the conference. The URL may return an MP3 file, a WAV file, or a TwiML document that contains ``, ``, ``, or `` verbs.
*
- * @param string $announceUrl The URL we should call to announce something into
- * the conference
+ * @param string $announceUrl The URL we should call to announce something into the conference. The URL may return an MP3 file, a WAV file, or a TwiML document that contains ``, ``, ``, or `` verbs.
* @return $this Fluent Builder
*/
- public function setAnnounceUrl($announceUrl)
+ public function setAnnounceUrl(string $announceUrl): self
{
$this->options['announceUrl'] = $announceUrl;
return $this;
@@ -238,10 +267,10 @@ public function setAnnounceUrl($announceUrl)
/**
* The HTTP method used to call `announce_url`. Can be: `GET` or `POST` and the default is `POST`
*
- * @param string $announceMethod he HTTP method used to call announce_url
+ * @param string $announceMethod The HTTP method used to call `announce_url`. Can be: `GET` or `POST` and the default is `POST`
* @return $this Fluent Builder
*/
- public function setAnnounceMethod($announceMethod)
+ public function setAnnounceMethod(string $announceMethod): self
{
$this->options['announceMethod'] = $announceMethod;
return $this;
@@ -252,14 +281,10 @@ public function setAnnounceMethod($announceMethod)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.UpdateConferenceOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.UpdateConferenceOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ConferencePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ConferencePage.php
index 2c8f222..184cf96 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ConferencePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ConferencePage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return ConferenceInstance \Twilio\Rest\Api\V2010\Account\ConferenceInstance
+ */
+ public function buildInstance(array $payload): ConferenceInstance
{
return new ConferenceInstance($this->version, $payload, $this->solution['accountSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.ConferencePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ConnectAppContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ConnectAppContext.php
index 88724d1..af30b78 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ConnectAppContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ConnectAppContext.php
@@ -2,56 +2,82 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class ConnectAppContext extends InstanceContext
-{
+ {
/**
* Initialize the ConnectAppContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * to fetch
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\ConnectAppContext
+ * @param Version $version Version that contains the resource
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ConnectApp resource to fetch.
+ * @param string $sid The Twilio-provided string that uniquely identifies the ConnectApp resource to fetch.
*/
- public function __construct(Version $version, $accountSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $accountSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'sid' => $sid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/ConnectApps/' . \rawurlencode($sid)
+ .'.json';
+ }
+
+ /**
+ * Delete the ConnectAppInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/ConnectApps/' . \rawurlencode($sid) . '.json';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a ConnectAppInstance
+ * Fetch the ConnectAppInstance
*
* @return ConnectAppInstance Fetched ConnectAppInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): ConnectAppInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new ConnectAppInstance(
$this->version,
@@ -61,6 +87,7 @@ public function fetch()
);
}
+
/**
* Update the ConnectAppInstance
*
@@ -68,29 +95,32 @@ public function fetch()
* @return ConnectAppInstance Updated ConnectAppInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ConnectAppInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'AuthorizeRedirectUrl' => $options['authorizeRedirectUrl'],
- 'CompanyName' => $options['companyName'],
- 'DeauthorizeCallbackMethod' => $options['deauthorizeCallbackMethod'],
- 'DeauthorizeCallbackUrl' => $options['deauthorizeCallbackUrl'],
- 'Description' => $options['description'],
- 'FriendlyName' => $options['friendlyName'],
- 'HomepageUrl' => $options['homepageUrl'],
- 'Permissions' => Serialize::map($options['permissions'], function ($e) {
- return $e;
- }),
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'AuthorizeRedirectUrl' =>
+ $options['authorizeRedirectUrl'],
+ 'CompanyName' =>
+ $options['companyName'],
+ 'DeauthorizeCallbackMethod' =>
+ $options['deauthorizeCallbackMethod'],
+ 'DeauthorizeCallbackUrl' =>
+ $options['deauthorizeCallbackUrl'],
+ 'Description' =>
+ $options['description'],
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'HomepageUrl' =>
+ $options['homepageUrl'],
+ 'Permissions' =>
+ $options['permissions'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new ConnectAppInstance(
$this->version,
@@ -100,28 +130,18 @@ public function update($options = array())
);
}
- /**
- * Deletes the ConnectAppInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.ConnectAppContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ConnectAppInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ConnectAppInstance.php
index 5507092..2386538 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ConnectAppInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ConnectAppInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account;
use Twilio\Exceptions\TwilioException;
@@ -15,36 +23,36 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * @property string $accountSid
- * @property string $authorizeRedirectUrl
- * @property string $companyName
- * @property string $deauthorizeCallbackMethod
- * @property string $deauthorizeCallbackUrl
- * @property string $description
- * @property string $friendlyName
- * @property string $homepageUrl
- * @property string $permissions
- * @property string $sid
- * @property string $uri
+ * @property string|null $accountSid
+ * @property string|null $authorizeRedirectUrl
+ * @property string|null $companyName
+ * @property string|null $deauthorizeCallbackMethod
+ * @property string|null $deauthorizeCallbackUrl
+ * @property string|null $description
+ * @property string|null $friendlyName
+ * @property string|null $homepageUrl
+ * @property string[]|null $permissions
+ * @property string|null $sid
+ * @property string|null $uri
*/
class ConnectAppInstance extends InstanceResource
{
/**
* Initialize the ConnectAppInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\ConnectAppInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ConnectApp resource to fetch.
+ * @param string $sid The Twilio-provided string that uniquely identifies the ConnectApp resource to fetch.
*/
- public function __construct(Version $version, array $payload, $accountSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $accountSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'authorizeRedirectUrl' => Values::array_get($payload, 'authorize_redirect_url'),
'companyName' => Values::array_get($payload, 'company_name'),
@@ -56,19 +64,18 @@ public function __construct(Version $version, array $payload, $accountSid, $sid
'permissions' => Values::array_get($payload, 'permissions'),
'sid' => Values::array_get($payload, 'sid'),
'uri' => Values::array_get($payload, 'uri'),
- );
+ ];
- $this->solution = array('accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Api\V2010\Account\ConnectAppContext Context for this
- * ConnectAppInstance
+ * @return ConnectAppContext Context for this ConnectAppInstance
*/
- protected function proxy()
+ protected function proxy(): ConnectAppContext
{
if (!$this->context) {
$this->context = new ConnectAppContext(
@@ -82,37 +89,40 @@ protected function proxy()
}
/**
- * Fetch a ConnectAppInstance
+ * Delete the ConnectAppInstance
*
- * @return ConnectAppInstance Fetched ConnectAppInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Update the ConnectAppInstance
+ * Fetch the ConnectAppInstance
*
- * @param array|Options $options Optional Arguments
- * @return ConnectAppInstance Updated ConnectAppInstance
+ * @return ConnectAppInstance Fetched ConnectAppInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): ConnectAppInstance
{
- return $this->proxy()->update($options);
+
+ return $this->proxy()->fetch();
}
/**
- * Deletes the ConnectAppInstance
+ * Update the ConnectAppInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return ConnectAppInstance Updated ConnectAppInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): ConnectAppInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->update($options);
}
/**
@@ -122,7 +132,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -141,12 +151,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.ConnectAppInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ConnectAppList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ConnectAppList.php
index 3254fe2..8208489 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ConnectAppList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ConnectAppList.php
@@ -2,34 +2,69 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class ConnectAppList extends ListResource
-{
+ {
/**
* Construct the ConnectAppList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * @return \Twilio\Rest\Api\V2010\Account\ConnectAppList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ConnectApp resource to fetch.
*/
- public function __construct(Version $version, $accountSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/ConnectApps.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/ConnectApps.json';
+ /**
+ * Reads ConnectAppInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return ConnectAppInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -48,9 +83,9 @@ public function __construct(Version $version, $accountSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -59,26 +94,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads ConnectAppInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return ConnectAppInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of ConnectAppInstance records from the API.
* Request is executed immediately
@@ -86,21 +101,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of ConnectAppInstance
+ * @return ConnectAppPage Page of ConnectAppInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): ConnectAppPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new ConnectAppPage($this->version, $response, $this->solution);
}
@@ -110,9 +126,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of ConnectAppInstance
+ * @return ConnectAppPage Page of ConnectAppInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): ConnectAppPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -122,15 +138,22 @@ public function getPage($targetUrl)
return new ConnectAppPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a ConnectAppContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\ConnectAppContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the ConnectApp resource to fetch.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): ConnectAppContext
{
- return new ConnectAppContext($this->version, $this->solution['accountSid'], $sid);
+ return new ConnectAppContext(
+ $this->version,
+ $this->solution['accountSid'],
+ $sid
+ );
}
/**
@@ -138,8 +161,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.ConnectAppList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ConnectAppOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ConnectAppOptions.php
index b305378..3a6f7a4 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ConnectAppOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ConnectAppOptions.php
@@ -1,10 +1,16 @@
options['authorizeRedirectUrl'] = $authorizeRedirectUrl;
$this->options['companyName'] = $companyName;
$this->options['deauthorizeCallbackMethod'] = $deauthorizeCallbackMethod;
@@ -68,11 +101,10 @@ public function __construct($authorizeRedirectUrl = Values::NONE, $companyName =
/**
* The URL to redirect the user to after we authenticate the user and obtain authorization to access the Connect App.
*
- * @param string $authorizeRedirectUrl The URL to redirect the user to after
- * authorization
+ * @param string $authorizeRedirectUrl The URL to redirect the user to after we authenticate the user and obtain authorization to access the Connect App.
* @return $this Fluent Builder
*/
- public function setAuthorizeRedirectUrl($authorizeRedirectUrl)
+ public function setAuthorizeRedirectUrl(string $authorizeRedirectUrl): self
{
$this->options['authorizeRedirectUrl'] = $authorizeRedirectUrl;
return $this;
@@ -81,10 +113,10 @@ public function setAuthorizeRedirectUrl($authorizeRedirectUrl)
/**
* The company name to set for the Connect App.
*
- * @param string $companyName The company name to set for the Connect App
+ * @param string $companyName The company name to set for the Connect App.
* @return $this Fluent Builder
*/
- public function setCompanyName($companyName)
+ public function setCompanyName(string $companyName): self
{
$this->options['companyName'] = $companyName;
return $this;
@@ -93,11 +125,10 @@ public function setCompanyName($companyName)
/**
* The HTTP method to use when calling `deauthorize_callback_url`.
*
- * @param string $deauthorizeCallbackMethod The HTTP method to use when calling
- * deauthorize_callback_url
+ * @param string $deauthorizeCallbackMethod The HTTP method to use when calling `deauthorize_callback_url`.
* @return $this Fluent Builder
*/
- public function setDeauthorizeCallbackMethod($deauthorizeCallbackMethod)
+ public function setDeauthorizeCallbackMethod(string $deauthorizeCallbackMethod): self
{
$this->options['deauthorizeCallbackMethod'] = $deauthorizeCallbackMethod;
return $this;
@@ -106,11 +137,10 @@ public function setDeauthorizeCallbackMethod($deauthorizeCallbackMethod)
/**
* The URL to call using the `deauthorize_callback_method` to de-authorize the Connect App.
*
- * @param string $deauthorizeCallbackUrl The URL to call to de-authorize the
- * Connect App
+ * @param string $deauthorizeCallbackUrl The URL to call using the `deauthorize_callback_method` to de-authorize the Connect App.
* @return $this Fluent Builder
*/
- public function setDeauthorizeCallbackUrl($deauthorizeCallbackUrl)
+ public function setDeauthorizeCallbackUrl(string $deauthorizeCallbackUrl): self
{
$this->options['deauthorizeCallbackUrl'] = $deauthorizeCallbackUrl;
return $this;
@@ -119,10 +149,10 @@ public function setDeauthorizeCallbackUrl($deauthorizeCallbackUrl)
/**
* A description of the Connect App.
*
- * @param string $description A description of the Connect App
+ * @param string $description A description of the Connect App.
* @return $this Fluent Builder
*/
- public function setDescription($description)
+ public function setDescription(string $description): self
{
$this->options['description'] = $description;
return $this;
@@ -131,10 +161,10 @@ public function setDescription($description)
/**
* A descriptive string that you create to describe the resource. It can be up to 64 characters long.
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -143,11 +173,10 @@ public function setFriendlyName($friendlyName)
/**
* A public URL where users can obtain more information about this Connect App.
*
- * @param string $homepageUrl A public URL where users can obtain more
- * information
+ * @param string $homepageUrl A public URL where users can obtain more information about this Connect App.
* @return $this Fluent Builder
*/
- public function setHomepageUrl($homepageUrl)
+ public function setHomepageUrl(string $homepageUrl): self
{
$this->options['homepageUrl'] = $homepageUrl;
return $this;
@@ -156,11 +185,10 @@ public function setHomepageUrl($homepageUrl)
/**
* A comma-separated list of the permissions you will request from the users of this ConnectApp. Can include: `get-all` and `post-all`.
*
- * @param string $permissions The set of permissions that your ConnectApp will
- * request
+ * @param string $permissions A comma-separated list of the permissions you will request from the users of this ConnectApp. Can include: `get-all` and `post-all`.
* @return $this Fluent Builder
*/
- public function setPermissions($permissions)
+ public function setPermissions(array $permissions): self
{
$this->options['permissions'] = $permissions;
return $this;
@@ -171,14 +199,10 @@ public function setPermissions($permissions)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.UpdateConnectAppOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.UpdateConnectAppOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ConnectAppPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ConnectAppPage.php
index 43d471c..b99005d 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ConnectAppPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ConnectAppPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return ConnectAppInstance \Twilio\Rest\Api\V2010\Account\ConnectAppInstance
+ */
+ public function buildInstance(array $payload): ConnectAppInstance
{
return new ConnectAppInstance($this->version, $payload, $this->solution['accountSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.ConnectAppPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionContext.php
index e0f55b0..75478f4 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionContext.php
@@ -2,66 +2,77 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOn;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
class AssignedAddOnExtensionContext extends InstanceContext
-{
+ {
/**
* Initialize the AssignedAddOnExtensionContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * to fetch
- * @param string $resourceSid The SID of the Phone Number to which the Add-on
- * is assigned
- * @param string $assignedAddOnSid The SID that uniquely identifies the
- * assigned Add-on installation
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOn\AssignedAddOnExtensionContext
+ * @param Version $version Version that contains the resource
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resource to fetch.
+ * @param string $resourceSid The SID of the Phone Number to which the Add-on is assigned.
+ * @param string $assignedAddOnSid The SID that uniquely identifies the assigned Add-on installation.
+ * @param string $sid The Twilio-provided string that uniquely identifies the resource to fetch.
*/
- public function __construct(Version $version, $accountSid, $resourceSid, $assignedAddOnSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $accountSid,
+ $resourceSid,
+ $assignedAddOnSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array(
- 'accountSid' => $accountSid,
- 'resourceSid' => $resourceSid,
- 'assignedAddOnSid' => $assignedAddOnSid,
- 'sid' => $sid,
- );
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+ 'resourceSid' =>
+ $resourceSid,
+ 'assignedAddOnSid' =>
+ $assignedAddOnSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/IncomingPhoneNumbers/' . \rawurlencode($resourceSid) . '/AssignedAddOns/' . \rawurlencode($assignedAddOnSid) . '/Extensions/' . \rawurlencode($sid) . '.json';
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/IncomingPhoneNumbers/' . \rawurlencode($resourceSid)
+ .'/AssignedAddOns/' . \rawurlencode($assignedAddOnSid)
+ .'/Extensions/' . \rawurlencode($sid)
+ .'.json';
}
/**
- * Fetch a AssignedAddOnExtensionInstance
+ * Fetch the AssignedAddOnExtensionInstance
*
* @return AssignedAddOnExtensionInstance Fetched AssignedAddOnExtensionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): AssignedAddOnExtensionInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new AssignedAddOnExtensionInstance(
$this->version,
@@ -73,17 +84,18 @@ public function fetch()
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.AssignedAddOnExtensionContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionInstance.php
index fe9b603..2f64423 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOn;
use Twilio\Exceptions\TwilioException;
@@ -14,40 +22,36 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property string $sid
- * @property string $accountSid
- * @property string $resourceSid
- * @property string $assignedAddOnSid
- * @property string $friendlyName
- * @property string $productName
- * @property string $uniqueName
- * @property string $uri
- * @property bool $enabled
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $resourceSid
+ * @property string|null $assignedAddOnSid
+ * @property string|null $friendlyName
+ * @property string|null $productName
+ * @property string|null $uniqueName
+ * @property string|null $uri
+ * @property bool|null $enabled
*/
class AssignedAddOnExtensionInstance extends InstanceResource
{
/**
* Initialize the AssignedAddOnExtensionInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $resourceSid The SID of the Phone Number to which the Add-on
- * is assigned
- * @param string $assignedAddOnSid The SID that uniquely identifies the
- * assigned Add-on installation
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOn\AssignedAddOnExtensionInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resource to fetch.
+ * @param string $resourceSid The SID of the Phone Number to which the Add-on is assigned.
+ * @param string $assignedAddOnSid The SID that uniquely identifies the assigned Add-on installation.
+ * @param string $sid The Twilio-provided string that uniquely identifies the resource to fetch.
*/
- public function __construct(Version $version, array $payload, $accountSid, $resourceSid, $assignedAddOnSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $accountSid, string $resourceSid, string $assignedAddOnSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'resourceSid' => Values::array_get($payload, 'resource_sid'),
@@ -57,24 +61,18 @@ public function __construct(Version $version, array $payload, $accountSid, $reso
'uniqueName' => Values::array_get($payload, 'unique_name'),
'uri' => Values::array_get($payload, 'uri'),
'enabled' => Values::array_get($payload, 'enabled'),
- );
-
- $this->solution = array(
- 'accountSid' => $accountSid,
- 'resourceSid' => $resourceSid,
- 'assignedAddOnSid' => $assignedAddOnSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ ];
+
+ $this->solution = ['accountSid' => $accountSid, 'resourceSid' => $resourceSid, 'assignedAddOnSid' => $assignedAddOnSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOn\AssignedAddOnExtensionContext Context for this
- * AssignedAddOnExtensionInstance
+ * @return AssignedAddOnExtensionContext Context for this AssignedAddOnExtensionInstance
*/
- protected function proxy()
+ protected function proxy(): AssignedAddOnExtensionContext
{
if (!$this->context) {
$this->context = new AssignedAddOnExtensionContext(
@@ -90,13 +88,14 @@ protected function proxy()
}
/**
- * Fetch a AssignedAddOnExtensionInstance
+ * Fetch the AssignedAddOnExtensionInstance
*
* @return AssignedAddOnExtensionInstance Fetched AssignedAddOnExtensionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): AssignedAddOnExtensionInstance
{
+
return $this->proxy()->fetch();
}
@@ -107,7 +106,7 @@ public function fetch()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -126,12 +125,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.AssignedAddOnExtensionInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionList.php
index 1f9ff8d..c17333b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionList.php
@@ -2,50 +2,85 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOn;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
+
class AssignedAddOnExtensionList extends ListResource
-{
+ {
/**
* Construct the AssignedAddOnExtensionList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $resourceSid The SID of the Phone Number to which the Add-on
- * is assigned
- * @param string $assignedAddOnSid The SID that uniquely identifies the
- * assigned Add-on installation
- * @return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOn\AssignedAddOnExtensionList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the resource to fetch.
+ * @param string $resourceSid The SID of the Phone Number to which the Add-on is assigned.
+ * @param string $assignedAddOnSid The SID that uniquely identifies the assigned Add-on installation.
*/
- public function __construct(Version $version, $accountSid, $resourceSid, $assignedAddOnSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid,
+ string $resourceSid,
+ string $assignedAddOnSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array(
- 'accountSid' => $accountSid,
- 'resourceSid' => $resourceSid,
- 'assignedAddOnSid' => $assignedAddOnSid,
- );
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ 'resourceSid' =>
+ $resourceSid,
+
+ 'assignedAddOnSid' =>
+ $assignedAddOnSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/IncomingPhoneNumbers/' . \rawurlencode($resourceSid)
+ .'/AssignedAddOns/' . \rawurlencode($assignedAddOnSid)
+ .'/Extensions.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/IncomingPhoneNumbers/' . \rawurlencode($resourceSid) . '/AssignedAddOns/' . \rawurlencode($assignedAddOnSid) . '/Extensions.json';
+ /**
+ * Reads AssignedAddOnExtensionInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return AssignedAddOnExtensionInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
- * Streams AssignedAddOnExtensionInstance records from the API as a generator
- * stream.
+ * Streams AssignedAddOnExtensionInstance records from the API as a generator stream.
* This operation lazily loads records as efficiently as possible until the
* limit
* is reached.
@@ -60,9 +95,9 @@ public function __construct(Version $version, $accountSid, $resourceSid, $assign
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -72,61 +107,40 @@ public function stream($limit = null, $pageSize = null)
}
/**
- * Reads AssignedAddOnExtensionInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return AssignedAddOnExtensionInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
- /**
- * Retrieve a single page of AssignedAddOnExtensionInstance records from the
- * API.
+ * Retrieve a single page of AssignedAddOnExtensionInstance records from the API.
* Request is executed immediately
*
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of AssignedAddOnExtensionInstance
+ * @return AssignedAddOnExtensionPage Page of AssignedAddOnExtensionInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): AssignedAddOnExtensionPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new AssignedAddOnExtensionPage($this->version, $response, $this->solution);
}
/**
- * Retrieve a specific page of AssignedAddOnExtensionInstance records from the
- * API.
+ * Retrieve a specific page of AssignedAddOnExtensionInstance records from the API.
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of AssignedAddOnExtensionInstance
+ * @return AssignedAddOnExtensionPage Page of AssignedAddOnExtensionInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): AssignedAddOnExtensionPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -136,13 +150,16 @@ public function getPage($targetUrl)
return new AssignedAddOnExtensionPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a AssignedAddOnExtensionContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOn\AssignedAddOnExtensionContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the resource to fetch.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): AssignedAddOnExtensionContext
{
return new AssignedAddOnExtensionContext(
$this->version,
@@ -158,8 +175,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.AssignedAddOnExtensionList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionPage.php
index b3703a7..ac97a19 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOn/AssignedAddOnExtensionPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return AssignedAddOnExtensionInstance \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOn\AssignedAddOnExtensionInstance
+ */
+ public function buildInstance(array $payload): AssignedAddOnExtensionInstance
{
- return new AssignedAddOnExtensionInstance(
- $this->version,
- $payload,
- $this->solution['accountSid'],
- $this->solution['resourceSid'],
- $this->solution['assignedAddOnSid']
- );
+ return new AssignedAddOnExtensionInstance($this->version, $payload, $this->solution['accountSid'], $this->solution['resourceSid'], $this->solution['assignedAddOnSid']);
}
/**
@@ -40,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.AssignedAddOnExtensionPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnContext.php
index 38a02e9..eabf69d 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnContext.php
@@ -2,65 +2,94 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
-use Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOn\AssignedAddOnExtensionList;
+use Twilio\ListResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOn\AssignedAddOnExtensionList;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOn\AssignedAddOnExtensionList $extensions
+ * @property AssignedAddOnExtensionList $extensions
* @method \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOn\AssignedAddOnExtensionContext extensions(string $sid)
*/
class AssignedAddOnContext extends InstanceContext
-{
- protected $_extensions = null;
+ {
+ protected $_extensions;
/**
* Initialize the AssignedAddOnContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * to fetch
- * @param string $resourceSid The SID of the Phone Number that installed this
- * Add-on
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOnContext
+ * @param Version $version Version that contains the resource
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
+ * @param string $resourceSid The SID of the Phone Number to assign the Add-on.
+ * @param string $sid The Twilio-provided string that uniquely identifies the resource to delete.
*/
- public function __construct(Version $version, $accountSid, $resourceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $accountSid,
+ $resourceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'resourceSid' => $resourceSid, 'sid' => $sid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+ 'resourceSid' =>
+ $resourceSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/IncomingPhoneNumbers/' . \rawurlencode($resourceSid)
+ .'/AssignedAddOns/' . \rawurlencode($sid)
+ .'.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/IncomingPhoneNumbers/' . \rawurlencode($resourceSid) . '/AssignedAddOns/' . \rawurlencode($sid) . '.json';
+ /**
+ * Delete the AssignedAddOnInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a AssignedAddOnInstance
+ * Fetch the AssignedAddOnInstance
*
* @return AssignedAddOnInstance Fetched AssignedAddOnInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): AssignedAddOnInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new AssignedAddOnInstance(
$this->version,
@@ -71,23 +100,11 @@ public function fetch()
);
}
- /**
- * Deletes the AssignedAddOnInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Access the extensions
- *
- * @return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOn\AssignedAddOnExtensionList
*/
- protected function getExtensions()
+ protected function getExtensions(): AssignedAddOnExtensionList
{
if (!$this->_extensions) {
$this->_extensions = new AssignedAddOnExtensionList(
@@ -105,10 +122,10 @@ protected function getExtensions()
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -123,10 +140,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -141,12 +158,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.AssignedAddOnContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnInstance.php
index d4ce55a..b3a4ee6 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnInstance.php
@@ -2,55 +2,61 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOn\AssignedAddOnExtensionList;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property string $sid
- * @property string $accountSid
- * @property string $resourceSid
- * @property string $friendlyName
- * @property string $description
- * @property array $configuration
- * @property string $uniqueName
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $uri
- * @property array $subresourceUris
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $resourceSid
+ * @property string|null $friendlyName
+ * @property string|null $description
+ * @property array|null $configuration
+ * @property string|null $uniqueName
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $uri
+ * @property array|null $subresourceUris
*/
class AssignedAddOnInstance extends InstanceResource
{
- protected $_extensions = null;
+ protected $_extensions;
/**
* Initialize the AssignedAddOnInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $resourceSid The SID of the Phone Number that installed this
- * Add-on
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOnInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
+ * @param string $resourceSid The SID of the Phone Number to assign the Add-on.
+ * @param string $sid The Twilio-provided string that uniquely identifies the resource to delete.
*/
- public function __construct(Version $version, array $payload, $accountSid, $resourceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $accountSid, string $resourceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'resourceSid' => Values::array_get($payload, 'resource_sid'),
@@ -62,23 +68,18 @@ public function __construct(Version $version, array $payload, $accountSid, $reso
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'uri' => Values::array_get($payload, 'uri'),
'subresourceUris' => Values::array_get($payload, 'subresource_uris'),
- );
+ ];
- $this->solution = array(
- 'accountSid' => $accountSid,
- 'resourceSid' => $resourceSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['accountSid' => $accountSid, 'resourceSid' => $resourceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOnContext Context for this
- * AssignedAddOnInstance
+ * @return AssignedAddOnContext Context for this AssignedAddOnInstance
*/
- protected function proxy()
+ protected function proxy(): AssignedAddOnContext
{
if (!$this->context) {
$this->context = new AssignedAddOnContext(
@@ -93,33 +94,33 @@ protected function proxy()
}
/**
- * Fetch a AssignedAddOnInstance
+ * Delete the AssignedAddOnInstance
*
- * @return AssignedAddOnInstance Fetched AssignedAddOnInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the AssignedAddOnInstance
+ * Fetch the AssignedAddOnInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return AssignedAddOnInstance Fetched AssignedAddOnInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): AssignedAddOnInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
* Access the extensions
- *
- * @return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOn\AssignedAddOnExtensionList
*/
- protected function getExtensions()
+ protected function getExtensions(): AssignedAddOnExtensionList
{
return $this->proxy()->extensions;
}
@@ -131,7 +132,7 @@ protected function getExtensions()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -150,12 +151,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.AssignedAddOnInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnList.php
index 5e97434..b1505a1 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnList.php
@@ -2,69 +2,85 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
+
class AssignedAddOnList extends ListResource
-{
+ {
/**
* Construct the AssignedAddOnList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $resourceSid The SID of the Phone Number that installed this
- * Add-on
- * @return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOnList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
+ * @param string $resourceSid The SID of the Phone Number to assign the Add-on.
*/
- public function __construct(Version $version, $accountSid, $resourceSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid,
+ string $resourceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'resourceSid' => $resourceSid,);
-
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/IncomingPhoneNumbers/' . \rawurlencode($resourceSid) . '/AssignedAddOns.json';
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ 'resourceSid' =>
+ $resourceSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/IncomingPhoneNumbers/' . \rawurlencode($resourceSid)
+ .'/AssignedAddOns.json';
}
/**
- * Streams AssignedAddOnInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the AssignedAddOnInstance
*
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @param string $installedAddOnSid The SID that identifies the Add-on installation.
+ * @return AssignedAddOnInstance Created AssignedAddOnInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($limit = null, $pageSize = null)
+ public function create(string $installedAddOnSid): AssignedAddOnInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($limits['pageSize']);
+ $data = Values::of([
+ 'InstalledAddOnSid' =>
+ $installedAddOnSid,
+ ]);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new AssignedAddOnInstance(
+ $this->version,
+ $payload,
+ $this->solution['accountSid'],
+ $this->solution['resourceSid']
+ );
}
+
/**
* Reads AssignedAddOnInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -80,11 +96,38 @@ public function stream($limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return AssignedAddOnInstance[] Array of results
*/
- public function read($limit = null, $pageSize = null)
+ public function read(int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($limit, $pageSize), false);
}
+ /**
+ * Streams AssignedAddOnInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of AssignedAddOnInstance records from the API.
* Request is executed immediately
@@ -92,21 +135,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of AssignedAddOnInstance
+ * @return AssignedAddOnPage Page of AssignedAddOnInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): AssignedAddOnPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new AssignedAddOnPage($this->version, $response, $this->solution);
}
@@ -116,9 +160,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of AssignedAddOnInstance
+ * @return AssignedAddOnPage Page of AssignedAddOnInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): AssignedAddOnPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -128,40 +172,16 @@ public function getPage($targetUrl)
return new AssignedAddOnPage($this->version, $response, $this->solution);
}
- /**
- * Create a new AssignedAddOnInstance
- *
- * @param string $installedAddOnSid The SID that identifies the Add-on
- * installation
- * @return AssignedAddOnInstance Newly created AssignedAddOnInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($installedAddOnSid)
- {
- $data = Values::of(array('InstalledAddOnSid' => $installedAddOnSid,));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new AssignedAddOnInstance(
- $this->version,
- $payload,
- $this->solution['accountSid'],
- $this->solution['resourceSid']
- );
- }
/**
* Constructs a AssignedAddOnContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOnContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): AssignedAddOnContext
{
return new AssignedAddOnContext(
$this->version,
@@ -176,8 +196,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.AssignedAddOnList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnPage.php
index 7eb9a8d..79c6c89 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/AssignedAddOnPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return AssignedAddOnInstance \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOnInstance
+ */
+ public function buildInstance(array $payload): AssignedAddOnInstance
{
- return new AssignedAddOnInstance(
- $this->version,
- $payload,
- $this->solution['accountSid'],
- $this->solution['resourceSid']
- );
+ return new AssignedAddOnInstance($this->version, $payload, $this->solution['accountSid'], $this->solution['resourceSid']);
}
/**
@@ -39,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.AssignedAddOnPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/LocalInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/LocalInstance.php
index 9e986f3..b2051cd 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/LocalInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/LocalInstance.php
@@ -2,74 +2,86 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Base\PhoneNumberCapabilities;
+
/**
- * @property string $accountSid
- * @property string $addressSid
+ * @property string|null $accountSid
+ * @property string|null $addressSid
* @property string $addressRequirements
- * @property string $apiVersion
- * @property bool $beta
- * @property string $capabilities
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $friendlyName
- * @property string $identitySid
- * @property string $phoneNumber
- * @property string $origin
- * @property string $sid
- * @property string $smsApplicationSid
- * @property string $smsFallbackMethod
- * @property string $smsFallbackUrl
- * @property string $smsMethod
- * @property string $smsUrl
- * @property string $statusCallback
- * @property string $statusCallbackMethod
- * @property string $trunkSid
- * @property string $uri
- * @property string $voiceApplicationSid
- * @property bool $voiceCallerIdLookup
- * @property string $voiceFallbackMethod
- * @property string $voiceFallbackUrl
- * @property string $voiceMethod
- * @property string $voiceUrl
+ * @property string|null $apiVersion
+ * @property bool|null $beta
+ * @property PhoneNumberCapabilities|null $capabilities
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $friendlyName
+ * @property string|null $identitySid
+ * @property string|null $phoneNumber
+ * @property string|null $origin
+ * @property string|null $sid
+ * @property string|null $smsApplicationSid
+ * @property string|null $smsFallbackMethod
+ * @property string|null $smsFallbackUrl
+ * @property string|null $smsMethod
+ * @property string|null $smsUrl
+ * @property string|null $statusCallback
+ * @property string|null $statusCallbackMethod
+ * @property string|null $trunkSid
+ * @property string|null $uri
+ * @property string $voiceReceiveMode
+ * @property string|null $voiceApplicationSid
+ * @property bool|null $voiceCallerIdLookup
+ * @property string|null $voiceFallbackMethod
+ * @property string|null $voiceFallbackUrl
+ * @property string|null $voiceMethod
+ * @property string|null $voiceUrl
* @property string $emergencyStatus
- * @property string $emergencyAddressSid
- * @property string $bundleSid
+ * @property string|null $emergencyAddressSid
+ * @property string $emergencyAddressStatus
+ * @property string|null $bundleSid
+ * @property string|null $status
*/
class LocalInstance extends InstanceResource
{
/**
* Initialize the LocalInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The SID of the Account that created the resource
- * @return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\LocalInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
*/
- public function __construct(Version $version, array $payload, $accountSid)
+ public function __construct(Version $version, array $payload, string $accountSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'addressSid' => Values::array_get($payload, 'address_sid'),
'addressRequirements' => Values::array_get($payload, 'address_requirements'),
'apiVersion' => Values::array_get($payload, 'api_version'),
'beta' => Values::array_get($payload, 'beta'),
- 'capabilities' => Values::array_get($payload, 'capabilities'),
+ 'capabilities' => Deserialize::phoneNumberCapabilities(Values::array_get($payload, 'capabilities')),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
@@ -86,6 +98,7 @@ public function __construct(Version $version, array $payload, $accountSid)
'statusCallbackMethod' => Values::array_get($payload, 'status_callback_method'),
'trunkSid' => Values::array_get($payload, 'trunk_sid'),
'uri' => Values::array_get($payload, 'uri'),
+ 'voiceReceiveMode' => Values::array_get($payload, 'voice_receive_mode'),
'voiceApplicationSid' => Values::array_get($payload, 'voice_application_sid'),
'voiceCallerIdLookup' => Values::array_get($payload, 'voice_caller_id_lookup'),
'voiceFallbackMethod' => Values::array_get($payload, 'voice_fallback_method'),
@@ -94,10 +107,12 @@ public function __construct(Version $version, array $payload, $accountSid)
'voiceUrl' => Values::array_get($payload, 'voice_url'),
'emergencyStatus' => Values::array_get($payload, 'emergency_status'),
'emergencyAddressSid' => Values::array_get($payload, 'emergency_address_sid'),
+ 'emergencyAddressStatus' => Values::array_get($payload, 'emergency_address_status'),
'bundleSid' => Values::array_get($payload, 'bundle_sid'),
- );
+ 'status' => Values::array_get($payload, 'status'),
+ ];
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = ['accountSid' => $accountSid, ];
}
/**
@@ -107,7 +122,7 @@ public function __construct(Version $version, array $payload, $accountSid)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -126,8 +141,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.LocalInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/LocalList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/LocalList.php
index f0b0d89..3d59ae3 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/LocalList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/LocalList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber;
@@ -12,57 +19,110 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class LocalList extends ListResource
-{
+ {
/**
* Construct the LocalList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * @return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\LocalList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
*/
- public function __construct(Version $version, $accountSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid,);
-
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/IncomingPhoneNumbers/Local.json';
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/IncomingPhoneNumbers/Local.json';
}
/**
- * Streams LocalInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the LocalInstance
*
+ * @param string $phoneNumber The phone number to purchase specified in [E.164](https://www.twilio.com/docs/glossary/what-e164) format. E.164 phone numbers consist of a + followed by the country code and subscriber number without punctuation characters. For example, +14155551234.
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return LocalInstance Created LocalInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function create(string $phoneNumber, array $options = []): LocalInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($options, $limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'PhoneNumber' =>
+ $phoneNumber,
+ 'ApiVersion' =>
+ $options['apiVersion'],
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'SmsApplicationSid' =>
+ $options['smsApplicationSid'],
+ 'SmsFallbackMethod' =>
+ $options['smsFallbackMethod'],
+ 'SmsFallbackUrl' =>
+ $options['smsFallbackUrl'],
+ 'SmsMethod' =>
+ $options['smsMethod'],
+ 'SmsUrl' =>
+ $options['smsUrl'],
+ 'StatusCallback' =>
+ $options['statusCallback'],
+ 'StatusCallbackMethod' =>
+ $options['statusCallbackMethod'],
+ 'VoiceApplicationSid' =>
+ $options['voiceApplicationSid'],
+ 'VoiceCallerIdLookup' =>
+ Serialize::booleanToString($options['voiceCallerIdLookup']),
+ 'VoiceFallbackMethod' =>
+ $options['voiceFallbackMethod'],
+ 'VoiceFallbackUrl' =>
+ $options['voiceFallbackUrl'],
+ 'VoiceMethod' =>
+ $options['voiceMethod'],
+ 'VoiceUrl' =>
+ $options['voiceUrl'],
+ 'IdentitySid' =>
+ $options['identitySid'],
+ 'AddressSid' =>
+ $options['addressSid'],
+ 'EmergencyStatus' =>
+ $options['emergencyStatus'],
+ 'EmergencyAddressSid' =>
+ $options['emergencyAddressSid'],
+ 'TrunkSid' =>
+ $options['trunkSid'],
+ 'VoiceReceiveMode' =>
+ $options['voiceReceiveMode'],
+ 'BundleSid' =>
+ $options['bundleSid'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new LocalInstance(
+ $this->version,
+ $payload,
+ $this->solution['accountSid']
+ );
}
+
/**
* Reads LocalInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -79,39 +139,72 @@ public function stream($options = array(), $limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return LocalInstance[] Array of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
+ /**
+ * Streams LocalInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of LocalInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of LocalInstance
+ * @return LocalPage Page of LocalInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): LocalPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Beta' => Serialize::booleanToString($options['beta']),
- 'FriendlyName' => $options['friendlyName'],
- 'PhoneNumber' => $options['phoneNumber'],
- 'Origin' => $options['origin'],
+
+ $params = Values::of([
+ 'Beta' =>
+ Serialize::booleanToString($options['beta']),
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'PhoneNumber' =>
+ $options['phoneNumber'],
+ 'Origin' =>
+ $options['origin'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new LocalPage($this->version, $response, $this->solution);
}
@@ -121,9 +214,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of LocalInstance
+ * @return LocalPage Page of LocalInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): LocalPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -133,61 +226,14 @@ public function getPage($targetUrl)
return new LocalPage($this->version, $response, $this->solution);
}
- /**
- * Create a new LocalInstance
- *
- * @param string $phoneNumber The phone number to purchase in E.164 format
- * @param array|Options $options Optional Arguments
- * @return LocalInstance Newly created LocalInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($phoneNumber, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'PhoneNumber' => $phoneNumber,
- 'ApiVersion' => $options['apiVersion'],
- 'FriendlyName' => $options['friendlyName'],
- 'SmsApplicationSid' => $options['smsApplicationSid'],
- 'SmsFallbackMethod' => $options['smsFallbackMethod'],
- 'SmsFallbackUrl' => $options['smsFallbackUrl'],
- 'SmsMethod' => $options['smsMethod'],
- 'SmsUrl' => $options['smsUrl'],
- 'StatusCallback' => $options['statusCallback'],
- 'StatusCallbackMethod' => $options['statusCallbackMethod'],
- 'VoiceApplicationSid' => $options['voiceApplicationSid'],
- 'VoiceCallerIdLookup' => Serialize::booleanToString($options['voiceCallerIdLookup']),
- 'VoiceFallbackMethod' => $options['voiceFallbackMethod'],
- 'VoiceFallbackUrl' => $options['voiceFallbackUrl'],
- 'VoiceMethod' => $options['voiceMethod'],
- 'VoiceUrl' => $options['voiceUrl'],
- 'IdentitySid' => $options['identitySid'],
- 'AddressSid' => $options['addressSid'],
- 'EmergencyStatus' => $options['emergencyStatus'],
- 'EmergencyAddressSid' => $options['emergencyAddressSid'],
- 'TrunkSid' => $options['trunkSid'],
- 'VoiceReceiveMode' => $options['voiceReceiveMode'],
- 'BundleSid' => $options['bundleSid'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new LocalInstance($this->version, $payload, $this->solution['accountSid']);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.LocalList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/LocalOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/LocalOptions.php
index d7ece2c..8ac638a 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/LocalOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/LocalOptions.php
@@ -1,10 +1,16 @@
options['beta'] = $beta;
- $this->options['friendlyName'] = $friendlyName;
- $this->options['phoneNumber'] = $phoneNumber;
- $this->options['origin'] = $origin;
- }
-
- /**
- * Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
- *
- * @param bool $beta Whether to include new phone numbers
- * @return $this Fluent Builder
- */
- public function setBeta($beta)
- {
- $this->options['beta'] = $beta;
- return $this;
- }
-
- /**
- * A string that identifies the resources to read.
- *
- * @param string $friendlyName A string that identifies the resources to read
- * @return $this Fluent Builder
- */
- public function setFriendlyName($friendlyName)
- {
- $this->options['friendlyName'] = $friendlyName;
- return $this;
- }
-
- /**
- * The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit.
- *
- * @param string $phoneNumber The phone numbers of the resources to read
- * @return $this Fluent Builder
+ public static function create(
+
+ string $apiVersion = Values::NONE,
+ string $friendlyName = Values::NONE,
+ string $smsApplicationSid = Values::NONE,
+ string $smsFallbackMethod = Values::NONE,
+ string $smsFallbackUrl = Values::NONE,
+ string $smsMethod = Values::NONE,
+ string $smsUrl = Values::NONE,
+ string $statusCallback = Values::NONE,
+ string $statusCallbackMethod = Values::NONE,
+ string $voiceApplicationSid = Values::NONE,
+ bool $voiceCallerIdLookup = Values::BOOL_NONE,
+ string $voiceFallbackMethod = Values::NONE,
+ string $voiceFallbackUrl = Values::NONE,
+ string $voiceMethod = Values::NONE,
+ string $voiceUrl = Values::NONE,
+ string $identitySid = Values::NONE,
+ string $addressSid = Values::NONE,
+ string $emergencyStatus = Values::NONE,
+ string $emergencyAddressSid = Values::NONE,
+ string $trunkSid = Values::NONE,
+ string $voiceReceiveMode = Values::NONE,
+ string $bundleSid = Values::NONE
+
+ ): CreateLocalOptions
+ {
+ return new CreateLocalOptions(
+ $apiVersion,
+ $friendlyName,
+ $smsApplicationSid,
+ $smsFallbackMethod,
+ $smsFallbackUrl,
+ $smsMethod,
+ $smsUrl,
+ $statusCallback,
+ $statusCallbackMethod,
+ $voiceApplicationSid,
+ $voiceCallerIdLookup,
+ $voiceFallbackMethod,
+ $voiceFallbackUrl,
+ $voiceMethod,
+ $voiceUrl,
+ $identitySid,
+ $addressSid,
+ $emergencyStatus,
+ $emergencyAddressSid,
+ $trunkSid,
+ $voiceReceiveMode,
+ $bundleSid
+ );
+ }
+
+ /**
+ * @param bool $beta Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
+ * @param string $friendlyName A string that identifies the resources to read.
+ * @param string $phoneNumber The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit.
+ * @param string $origin Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included.
+ * @return ReadLocalOptions Options builder
*/
- public function setPhoneNumber($phoneNumber)
- {
- $this->options['phoneNumber'] = $phoneNumber;
- return $this;
- }
+ public static function read(
+
+ bool $beta = Values::BOOL_NONE,
+ string $friendlyName = Values::NONE,
+ string $phoneNumber = Values::NONE,
+ string $origin = Values::NONE
- /**
- * Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included.
- *
- * @param string $origin Include phone numbers based on their origin. By
- * default, phone numbers of all origin are included.
- * @return $this Fluent Builder
- */
- public function setOrigin($origin)
+ ): ReadLocalOptions
{
- $this->options['origin'] = $origin;
- return $this;
+ return new ReadLocalOptions(
+ $beta,
+ $friendlyName,
+ $phoneNumber,
+ $origin
+ );
}
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.ReadLocalOptions ' . \implode(' ', $options) . ']';
- }
}
class CreateLocalOptions extends Options
-{
- /**
- * @param string $apiVersion The API version to use for incoming calls made to
- * the new phone number
- * @param string $friendlyName A string to describe the new phone number
- * @param string $smsApplicationSid The SID of the application to handle SMS
- * messages
- * @param string $smsFallbackMethod The HTTP method we use to call
- * status_callback
- * @param string $smsFallbackUrl The URL we call when an error occurs while
- * executing TwiML
- * @param string $smsMethod The HTTP method to use with sms url
- * @param string $smsUrl The URL we should call when the new phone number
- * receives an incoming SMS message
- * @param string $statusCallback The URL we should call to send status
- * information to your application
- * @param string $statusCallbackMethod HTTP method we should use to call
- * status_callback
- * @param string $voiceApplicationSid The SID of the application to handle the
- * new phone number
- * @param bool $voiceCallerIdLookup Whether to lookup the caller's name
- * @param string $voiceFallbackMethod The HTTP method used with
- * voice_fallback_url
- * @param string $voiceFallbackUrl The URL we will call when an error occurs in
- * TwiML
- * @param string $voiceMethod The HTTP method used with the voice_url
- * @param string $voiceUrl The URL we should call when the phone number
- * receives a call
- * @param string $identitySid The SID of the Identity resource to associate
- * with the new phone number
- * @param string $addressSid The SID of the Address resource associated with
- * the phone number
- * @param string $emergencyStatus Status determining whether the new phone
- * number is enabled for emergency calling
- * @param string $emergencyAddressSid The emergency address configuration to
- * use for emergency calling
- * @param string $trunkSid SID of the trunk to handle calls to the new phone
- * number
- * @param string $voiceReceiveMode Incoming call type: fax or voice
- * @param string $bundleSid The SID of the Bundle resource associated with
- * number
- */
- public function __construct($apiVersion = Values::NONE, $friendlyName = Values::NONE, $smsApplicationSid = Values::NONE, $smsFallbackMethod = Values::NONE, $smsFallbackUrl = Values::NONE, $smsMethod = Values::NONE, $smsUrl = Values::NONE, $statusCallback = Values::NONE, $statusCallbackMethod = Values::NONE, $voiceApplicationSid = Values::NONE, $voiceCallerIdLookup = Values::NONE, $voiceFallbackMethod = Values::NONE, $voiceFallbackUrl = Values::NONE, $voiceMethod = Values::NONE, $voiceUrl = Values::NONE, $identitySid = Values::NONE, $addressSid = Values::NONE, $emergencyStatus = Values::NONE, $emergencyAddressSid = Values::NONE, $trunkSid = Values::NONE, $voiceReceiveMode = Values::NONE, $bundleSid = Values::NONE)
{
+ /**
+ * @param string $apiVersion The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`.
+ * @param string $friendlyName A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, this is a formatted version of the phone number.
+ * @param string $smsApplicationSid The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application.
+ * @param string $smsFallbackMethod The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
+ * @param string $smsFallbackUrl The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`.
+ * @param string $smsMethod The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`.
+ * @param string $smsUrl The URL we should call when the new phone number receives an incoming SMS message.
+ * @param string $statusCallback The URL we should call using the `status_callback_method` to send status information to your application.
+ * @param string $statusCallbackMethod The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
+ * @param string $voiceApplicationSid The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa.
+ * @param bool $voiceCallerIdLookup Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`.
+ * @param string $voiceFallbackMethod The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
+ * @param string $voiceFallbackUrl The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`.
+ * @param string $voiceMethod The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`.
+ * @param string $voiceUrl The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set.
+ * @param string $identitySid The SID of the Identity resource that we should associate with the new phone number. Some regions require an identity to meet local regulations.
+ * @param string $addressSid The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations.
+ * @param string $emergencyStatus
+ * @param string $emergencyAddressSid The SID of the emergency address configuration to use for emergency calling from the new phone number.
+ * @param string $trunkSid The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa.
+ * @param string $voiceReceiveMode
+ * @param string $bundleSid The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations.
+ */
+ public function __construct(
+
+ string $apiVersion = Values::NONE,
+ string $friendlyName = Values::NONE,
+ string $smsApplicationSid = Values::NONE,
+ string $smsFallbackMethod = Values::NONE,
+ string $smsFallbackUrl = Values::NONE,
+ string $smsMethod = Values::NONE,
+ string $smsUrl = Values::NONE,
+ string $statusCallback = Values::NONE,
+ string $statusCallbackMethod = Values::NONE,
+ string $voiceApplicationSid = Values::NONE,
+ bool $voiceCallerIdLookup = Values::BOOL_NONE,
+ string $voiceFallbackMethod = Values::NONE,
+ string $voiceFallbackUrl = Values::NONE,
+ string $voiceMethod = Values::NONE,
+ string $voiceUrl = Values::NONE,
+ string $identitySid = Values::NONE,
+ string $addressSid = Values::NONE,
+ string $emergencyStatus = Values::NONE,
+ string $emergencyAddressSid = Values::NONE,
+ string $trunkSid = Values::NONE,
+ string $voiceReceiveMode = Values::NONE,
+ string $bundleSid = Values::NONE
+
+ ) {
$this->options['apiVersion'] = $apiVersion;
$this->options['friendlyName'] = $friendlyName;
$this->options['smsApplicationSid'] = $smsApplicationSid;
@@ -230,11 +203,10 @@ public function __construct($apiVersion = Values::NONE, $friendlyName = Values::
/**
* The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`.
*
- * @param string $apiVersion The API version to use for incoming calls made to
- * the new phone number
+ * @param string $apiVersion The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`.
* @return $this Fluent Builder
*/
- public function setApiVersion($apiVersion)
+ public function setApiVersion(string $apiVersion): self
{
$this->options['apiVersion'] = $apiVersion;
return $this;
@@ -243,10 +215,10 @@ public function setApiVersion($apiVersion)
/**
* A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, this is a formatted version of the phone number.
*
- * @param string $friendlyName A string to describe the new phone number
+ * @param string $friendlyName A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, this is a formatted version of the phone number.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -255,11 +227,10 @@ public function setFriendlyName($friendlyName)
/**
* The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application.
*
- * @param string $smsApplicationSid The SID of the application to handle SMS
- * messages
+ * @param string $smsApplicationSid The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application.
* @return $this Fluent Builder
*/
- public function setSmsApplicationSid($smsApplicationSid)
+ public function setSmsApplicationSid(string $smsApplicationSid): self
{
$this->options['smsApplicationSid'] = $smsApplicationSid;
return $this;
@@ -268,11 +239,10 @@ public function setSmsApplicationSid($smsApplicationSid)
/**
* The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
*
- * @param string $smsFallbackMethod The HTTP method we use to call
- * status_callback
+ * @param string $smsFallbackMethod The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
* @return $this Fluent Builder
*/
- public function setSmsFallbackMethod($smsFallbackMethod)
+ public function setSmsFallbackMethod(string $smsFallbackMethod): self
{
$this->options['smsFallbackMethod'] = $smsFallbackMethod;
return $this;
@@ -281,11 +251,10 @@ public function setSmsFallbackMethod($smsFallbackMethod)
/**
* The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`.
*
- * @param string $smsFallbackUrl The URL we call when an error occurs while
- * executing TwiML
+ * @param string $smsFallbackUrl The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`.
* @return $this Fluent Builder
*/
- public function setSmsFallbackUrl($smsFallbackUrl)
+ public function setSmsFallbackUrl(string $smsFallbackUrl): self
{
$this->options['smsFallbackUrl'] = $smsFallbackUrl;
return $this;
@@ -294,10 +263,10 @@ public function setSmsFallbackUrl($smsFallbackUrl)
/**
* The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`.
*
- * @param string $smsMethod The HTTP method to use with sms url
+ * @param string $smsMethod The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`.
* @return $this Fluent Builder
*/
- public function setSmsMethod($smsMethod)
+ public function setSmsMethod(string $smsMethod): self
{
$this->options['smsMethod'] = $smsMethod;
return $this;
@@ -306,11 +275,10 @@ public function setSmsMethod($smsMethod)
/**
* The URL we should call when the new phone number receives an incoming SMS message.
*
- * @param string $smsUrl The URL we should call when the new phone number
- * receives an incoming SMS message
+ * @param string $smsUrl The URL we should call when the new phone number receives an incoming SMS message.
* @return $this Fluent Builder
*/
- public function setSmsUrl($smsUrl)
+ public function setSmsUrl(string $smsUrl): self
{
$this->options['smsUrl'] = $smsUrl;
return $this;
@@ -319,11 +287,10 @@ public function setSmsUrl($smsUrl)
/**
* The URL we should call using the `status_callback_method` to send status information to your application.
*
- * @param string $statusCallback The URL we should call to send status
- * information to your application
+ * @param string $statusCallback The URL we should call using the `status_callback_method` to send status information to your application.
* @return $this Fluent Builder
*/
- public function setStatusCallback($statusCallback)
+ public function setStatusCallback(string $statusCallback): self
{
$this->options['statusCallback'] = $statusCallback;
return $this;
@@ -332,11 +299,10 @@ public function setStatusCallback($statusCallback)
/**
* The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
*
- * @param string $statusCallbackMethod HTTP method we should use to call
- * status_callback
+ * @param string $statusCallbackMethod The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
* @return $this Fluent Builder
*/
- public function setStatusCallbackMethod($statusCallbackMethod)
+ public function setStatusCallbackMethod(string $statusCallbackMethod): self
{
$this->options['statusCallbackMethod'] = $statusCallbackMethod;
return $this;
@@ -345,11 +311,10 @@ public function setStatusCallbackMethod($statusCallbackMethod)
/**
* The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa.
*
- * @param string $voiceApplicationSid The SID of the application to handle the
- * new phone number
+ * @param string $voiceApplicationSid The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa.
* @return $this Fluent Builder
*/
- public function setVoiceApplicationSid($voiceApplicationSid)
+ public function setVoiceApplicationSid(string $voiceApplicationSid): self
{
$this->options['voiceApplicationSid'] = $voiceApplicationSid;
return $this;
@@ -358,10 +323,10 @@ public function setVoiceApplicationSid($voiceApplicationSid)
/**
* Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`.
*
- * @param bool $voiceCallerIdLookup Whether to lookup the caller's name
+ * @param bool $voiceCallerIdLookup Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`.
* @return $this Fluent Builder
*/
- public function setVoiceCallerIdLookup($voiceCallerIdLookup)
+ public function setVoiceCallerIdLookup(bool $voiceCallerIdLookup): self
{
$this->options['voiceCallerIdLookup'] = $voiceCallerIdLookup;
return $this;
@@ -370,11 +335,10 @@ public function setVoiceCallerIdLookup($voiceCallerIdLookup)
/**
* The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
*
- * @param string $voiceFallbackMethod The HTTP method used with
- * voice_fallback_url
+ * @param string $voiceFallbackMethod The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
* @return $this Fluent Builder
*/
- public function setVoiceFallbackMethod($voiceFallbackMethod)
+ public function setVoiceFallbackMethod(string $voiceFallbackMethod): self
{
$this->options['voiceFallbackMethod'] = $voiceFallbackMethod;
return $this;
@@ -383,11 +347,10 @@ public function setVoiceFallbackMethod($voiceFallbackMethod)
/**
* The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`.
*
- * @param string $voiceFallbackUrl The URL we will call when an error occurs in
- * TwiML
+ * @param string $voiceFallbackUrl The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`.
* @return $this Fluent Builder
*/
- public function setVoiceFallbackUrl($voiceFallbackUrl)
+ public function setVoiceFallbackUrl(string $voiceFallbackUrl): self
{
$this->options['voiceFallbackUrl'] = $voiceFallbackUrl;
return $this;
@@ -396,10 +359,10 @@ public function setVoiceFallbackUrl($voiceFallbackUrl)
/**
* The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`.
*
- * @param string $voiceMethod The HTTP method used with the voice_url
+ * @param string $voiceMethod The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`.
* @return $this Fluent Builder
*/
- public function setVoiceMethod($voiceMethod)
+ public function setVoiceMethod(string $voiceMethod): self
{
$this->options['voiceMethod'] = $voiceMethod;
return $this;
@@ -408,11 +371,10 @@ public function setVoiceMethod($voiceMethod)
/**
* The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set.
*
- * @param string $voiceUrl The URL we should call when the phone number
- * receives a call
+ * @param string $voiceUrl The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set.
* @return $this Fluent Builder
*/
- public function setVoiceUrl($voiceUrl)
+ public function setVoiceUrl(string $voiceUrl): self
{
$this->options['voiceUrl'] = $voiceUrl;
return $this;
@@ -421,11 +383,10 @@ public function setVoiceUrl($voiceUrl)
/**
* The SID of the Identity resource that we should associate with the new phone number. Some regions require an identity to meet local regulations.
*
- * @param string $identitySid The SID of the Identity resource to associate
- * with the new phone number
+ * @param string $identitySid The SID of the Identity resource that we should associate with the new phone number. Some regions require an identity to meet local regulations.
* @return $this Fluent Builder
*/
- public function setIdentitySid($identitySid)
+ public function setIdentitySid(string $identitySid): self
{
$this->options['identitySid'] = $identitySid;
return $this;
@@ -434,24 +395,20 @@ public function setIdentitySid($identitySid)
/**
* The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations.
*
- * @param string $addressSid The SID of the Address resource associated with
- * the phone number
+ * @param string $addressSid The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations.
* @return $this Fluent Builder
*/
- public function setAddressSid($addressSid)
+ public function setAddressSid(string $addressSid): self
{
$this->options['addressSid'] = $addressSid;
return $this;
}
/**
- * The configuration status parameter that determines whether the new phone number is enabled for emergency calling.
- *
- * @param string $emergencyStatus Status determining whether the new phone
- * number is enabled for emergency calling
+ * @param string $emergencyStatus
* @return $this Fluent Builder
*/
- public function setEmergencyStatus($emergencyStatus)
+ public function setEmergencyStatus(string $emergencyStatus): self
{
$this->options['emergencyStatus'] = $emergencyStatus;
return $this;
@@ -460,11 +417,10 @@ public function setEmergencyStatus($emergencyStatus)
/**
* The SID of the emergency address configuration to use for emergency calling from the new phone number.
*
- * @param string $emergencyAddressSid The emergency address configuration to
- * use for emergency calling
+ * @param string $emergencyAddressSid The SID of the emergency address configuration to use for emergency calling from the new phone number.
* @return $this Fluent Builder
*/
- public function setEmergencyAddressSid($emergencyAddressSid)
+ public function setEmergencyAddressSid(string $emergencyAddressSid): self
{
$this->options['emergencyAddressSid'] = $emergencyAddressSid;
return $this;
@@ -473,23 +429,20 @@ public function setEmergencyAddressSid($emergencyAddressSid)
/**
* The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa.
*
- * @param string $trunkSid SID of the trunk to handle calls to the new phone
- * number
+ * @param string $trunkSid The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa.
* @return $this Fluent Builder
*/
- public function setTrunkSid($trunkSid)
+ public function setTrunkSid(string $trunkSid): self
{
$this->options['trunkSid'] = $trunkSid;
return $this;
}
/**
- * The configuration parameter for the new phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`.
- *
- * @param string $voiceReceiveMode Incoming call type: fax or voice
+ * @param string $voiceReceiveMode
* @return $this Fluent Builder
*/
- public function setVoiceReceiveMode($voiceReceiveMode)
+ public function setVoiceReceiveMode(string $voiceReceiveMode): self
{
$this->options['voiceReceiveMode'] = $voiceReceiveMode;
return $this;
@@ -498,11 +451,10 @@ public function setVoiceReceiveMode($voiceReceiveMode)
/**
* The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations.
*
- * @param string $bundleSid The SID of the Bundle resource associated with
- * number
+ * @param string $bundleSid The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations.
* @return $this Fluent Builder
*/
- public function setBundleSid($bundleSid)
+ public function setBundleSid(string $bundleSid): self
{
$this->options['bundleSid'] = $bundleSid;
return $this;
@@ -513,14 +465,92 @@ public function setBundleSid($bundleSid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
+ {
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.CreateLocalOptions ' . $options . ']';
+ }
+}
+
+class ReadLocalOptions extends Options
+ {
+ /**
+ * @param bool $beta Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
+ * @param string $friendlyName A string that identifies the resources to read.
+ * @param string $phoneNumber The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit.
+ * @param string $origin Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included.
+ */
+ public function __construct(
+
+ bool $beta = Values::BOOL_NONE,
+ string $friendlyName = Values::NONE,
+ string $phoneNumber = Values::NONE,
+ string $origin = Values::NONE
+
+ ) {
+ $this->options['beta'] = $beta;
+ $this->options['friendlyName'] = $friendlyName;
+ $this->options['phoneNumber'] = $phoneNumber;
+ $this->options['origin'] = $origin;
+ }
+
+ /**
+ * Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
+ *
+ * @param bool $beta Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
+ * @return $this Fluent Builder
+ */
+ public function setBeta(bool $beta): self
+ {
+ $this->options['beta'] = $beta;
+ return $this;
+ }
+
+ /**
+ * A string that identifies the resources to read.
+ *
+ * @param string $friendlyName A string that identifies the resources to read.
+ * @return $this Fluent Builder
+ */
+ public function setFriendlyName(string $friendlyName): self
+ {
+ $this->options['friendlyName'] = $friendlyName;
+ return $this;
+ }
+
+ /**
+ * The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit.
+ *
+ * @param string $phoneNumber The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit.
+ * @return $this Fluent Builder
+ */
+ public function setPhoneNumber(string $phoneNumber): self
+ {
+ $this->options['phoneNumber'] = $phoneNumber;
+ return $this;
+ }
+
+ /**
+ * Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included.
+ *
+ * @param string $origin Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included.
+ * @return $this Fluent Builder
+ */
+ public function setOrigin(string $origin): self
+ {
+ $this->options['origin'] = $origin;
+ return $this;
+ }
+
+ /**
+ * Provide a friendly representation
+ *
+ * @return string Machine friendly representation
+ */
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.CreateLocalOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.ReadLocalOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/LocalPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/LocalPage.php
index 0278ebf..29ecbb4 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/LocalPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/LocalPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return LocalInstance \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\LocalInstance
+ */
+ public function buildInstance(array $payload): LocalInstance
{
return new LocalInstance($this->version, $payload, $this->solution['accountSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.LocalPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/MobileInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/MobileInstance.php
index 7fb1121..4b369b9 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/MobileInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/MobileInstance.php
@@ -2,74 +2,86 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Base\PhoneNumberCapabilities;
+
/**
- * @property string $accountSid
- * @property string $addressSid
+ * @property string|null $accountSid
+ * @property string|null $addressSid
* @property string $addressRequirements
- * @property string $apiVersion
- * @property bool $beta
- * @property string $capabilities
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $friendlyName
- * @property string $identitySid
- * @property string $phoneNumber
- * @property string $origin
- * @property string $sid
- * @property string $smsApplicationSid
- * @property string $smsFallbackMethod
- * @property string $smsFallbackUrl
- * @property string $smsMethod
- * @property string $smsUrl
- * @property string $statusCallback
- * @property string $statusCallbackMethod
- * @property string $trunkSid
- * @property string $uri
- * @property string $voiceApplicationSid
- * @property bool $voiceCallerIdLookup
- * @property string $voiceFallbackMethod
- * @property string $voiceFallbackUrl
- * @property string $voiceMethod
- * @property string $voiceUrl
+ * @property string|null $apiVersion
+ * @property bool|null $beta
+ * @property PhoneNumberCapabilities|null $capabilities
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $friendlyName
+ * @property string|null $identitySid
+ * @property string|null $phoneNumber
+ * @property string|null $origin
+ * @property string|null $sid
+ * @property string|null $smsApplicationSid
+ * @property string|null $smsFallbackMethod
+ * @property string|null $smsFallbackUrl
+ * @property string|null $smsMethod
+ * @property string|null $smsUrl
+ * @property string|null $statusCallback
+ * @property string|null $statusCallbackMethod
+ * @property string|null $trunkSid
+ * @property string|null $uri
+ * @property string $voiceReceiveMode
+ * @property string|null $voiceApplicationSid
+ * @property bool|null $voiceCallerIdLookup
+ * @property string|null $voiceFallbackMethod
+ * @property string|null $voiceFallbackUrl
+ * @property string|null $voiceMethod
+ * @property string|null $voiceUrl
* @property string $emergencyStatus
- * @property string $emergencyAddressSid
- * @property string $bundleSid
+ * @property string|null $emergencyAddressSid
+ * @property string $emergencyAddressStatus
+ * @property string|null $bundleSid
+ * @property string|null $status
*/
class MobileInstance extends InstanceResource
{
/**
* Initialize the MobileInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The SID of the Account that created the resource
- * @return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\MobileInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
*/
- public function __construct(Version $version, array $payload, $accountSid)
+ public function __construct(Version $version, array $payload, string $accountSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'addressSid' => Values::array_get($payload, 'address_sid'),
'addressRequirements' => Values::array_get($payload, 'address_requirements'),
'apiVersion' => Values::array_get($payload, 'api_version'),
'beta' => Values::array_get($payload, 'beta'),
- 'capabilities' => Values::array_get($payload, 'capabilities'),
+ 'capabilities' => Deserialize::phoneNumberCapabilities(Values::array_get($payload, 'capabilities')),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
@@ -86,6 +98,7 @@ public function __construct(Version $version, array $payload, $accountSid)
'statusCallbackMethod' => Values::array_get($payload, 'status_callback_method'),
'trunkSid' => Values::array_get($payload, 'trunk_sid'),
'uri' => Values::array_get($payload, 'uri'),
+ 'voiceReceiveMode' => Values::array_get($payload, 'voice_receive_mode'),
'voiceApplicationSid' => Values::array_get($payload, 'voice_application_sid'),
'voiceCallerIdLookup' => Values::array_get($payload, 'voice_caller_id_lookup'),
'voiceFallbackMethod' => Values::array_get($payload, 'voice_fallback_method'),
@@ -94,10 +107,12 @@ public function __construct(Version $version, array $payload, $accountSid)
'voiceUrl' => Values::array_get($payload, 'voice_url'),
'emergencyStatus' => Values::array_get($payload, 'emergency_status'),
'emergencyAddressSid' => Values::array_get($payload, 'emergency_address_sid'),
+ 'emergencyAddressStatus' => Values::array_get($payload, 'emergency_address_status'),
'bundleSid' => Values::array_get($payload, 'bundle_sid'),
- );
+ 'status' => Values::array_get($payload, 'status'),
+ ];
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = ['accountSid' => $accountSid, ];
}
/**
@@ -107,7 +122,7 @@ public function __construct(Version $version, array $payload, $accountSid)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -126,8 +141,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.MobileInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/MobileList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/MobileList.php
index f2ff7a2..d5746d3 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/MobileList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/MobileList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber;
@@ -12,57 +19,110 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class MobileList extends ListResource
-{
+ {
/**
* Construct the MobileList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * @return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\MobileList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
*/
- public function __construct(Version $version, $accountSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid,);
-
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/IncomingPhoneNumbers/Mobile.json';
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/IncomingPhoneNumbers/Mobile.json';
}
/**
- * Streams MobileInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the MobileInstance
*
+ * @param string $phoneNumber The phone number to purchase specified in [E.164](https://www.twilio.com/docs/glossary/what-e164) format. E.164 phone numbers consist of a + followed by the country code and subscriber number without punctuation characters. For example, +14155551234.
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return MobileInstance Created MobileInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function create(string $phoneNumber, array $options = []): MobileInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($options, $limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'PhoneNumber' =>
+ $phoneNumber,
+ 'ApiVersion' =>
+ $options['apiVersion'],
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'SmsApplicationSid' =>
+ $options['smsApplicationSid'],
+ 'SmsFallbackMethod' =>
+ $options['smsFallbackMethod'],
+ 'SmsFallbackUrl' =>
+ $options['smsFallbackUrl'],
+ 'SmsMethod' =>
+ $options['smsMethod'],
+ 'SmsUrl' =>
+ $options['smsUrl'],
+ 'StatusCallback' =>
+ $options['statusCallback'],
+ 'StatusCallbackMethod' =>
+ $options['statusCallbackMethod'],
+ 'VoiceApplicationSid' =>
+ $options['voiceApplicationSid'],
+ 'VoiceCallerIdLookup' =>
+ Serialize::booleanToString($options['voiceCallerIdLookup']),
+ 'VoiceFallbackMethod' =>
+ $options['voiceFallbackMethod'],
+ 'VoiceFallbackUrl' =>
+ $options['voiceFallbackUrl'],
+ 'VoiceMethod' =>
+ $options['voiceMethod'],
+ 'VoiceUrl' =>
+ $options['voiceUrl'],
+ 'IdentitySid' =>
+ $options['identitySid'],
+ 'AddressSid' =>
+ $options['addressSid'],
+ 'EmergencyStatus' =>
+ $options['emergencyStatus'],
+ 'EmergencyAddressSid' =>
+ $options['emergencyAddressSid'],
+ 'TrunkSid' =>
+ $options['trunkSid'],
+ 'VoiceReceiveMode' =>
+ $options['voiceReceiveMode'],
+ 'BundleSid' =>
+ $options['bundleSid'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new MobileInstance(
+ $this->version,
+ $payload,
+ $this->solution['accountSid']
+ );
}
+
/**
* Reads MobileInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -79,39 +139,72 @@ public function stream($options = array(), $limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return MobileInstance[] Array of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
+ /**
+ * Streams MobileInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of MobileInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of MobileInstance
+ * @return MobilePage Page of MobileInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): MobilePage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Beta' => Serialize::booleanToString($options['beta']),
- 'FriendlyName' => $options['friendlyName'],
- 'PhoneNumber' => $options['phoneNumber'],
- 'Origin' => $options['origin'],
+
+ $params = Values::of([
+ 'Beta' =>
+ Serialize::booleanToString($options['beta']),
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'PhoneNumber' =>
+ $options['phoneNumber'],
+ 'Origin' =>
+ $options['origin'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new MobilePage($this->version, $response, $this->solution);
}
@@ -121,9 +214,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of MobileInstance
+ * @return MobilePage Page of MobileInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): MobilePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -133,61 +226,14 @@ public function getPage($targetUrl)
return new MobilePage($this->version, $response, $this->solution);
}
- /**
- * Create a new MobileInstance
- *
- * @param string $phoneNumber The phone number to purchase in E.164 format
- * @param array|Options $options Optional Arguments
- * @return MobileInstance Newly created MobileInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($phoneNumber, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'PhoneNumber' => $phoneNumber,
- 'ApiVersion' => $options['apiVersion'],
- 'FriendlyName' => $options['friendlyName'],
- 'SmsApplicationSid' => $options['smsApplicationSid'],
- 'SmsFallbackMethod' => $options['smsFallbackMethod'],
- 'SmsFallbackUrl' => $options['smsFallbackUrl'],
- 'SmsMethod' => $options['smsMethod'],
- 'SmsUrl' => $options['smsUrl'],
- 'StatusCallback' => $options['statusCallback'],
- 'StatusCallbackMethod' => $options['statusCallbackMethod'],
- 'VoiceApplicationSid' => $options['voiceApplicationSid'],
- 'VoiceCallerIdLookup' => Serialize::booleanToString($options['voiceCallerIdLookup']),
- 'VoiceFallbackMethod' => $options['voiceFallbackMethod'],
- 'VoiceFallbackUrl' => $options['voiceFallbackUrl'],
- 'VoiceMethod' => $options['voiceMethod'],
- 'VoiceUrl' => $options['voiceUrl'],
- 'IdentitySid' => $options['identitySid'],
- 'AddressSid' => $options['addressSid'],
- 'EmergencyStatus' => $options['emergencyStatus'],
- 'EmergencyAddressSid' => $options['emergencyAddressSid'],
- 'TrunkSid' => $options['trunkSid'],
- 'VoiceReceiveMode' => $options['voiceReceiveMode'],
- 'BundleSid' => $options['bundleSid'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new MobileInstance($this->version, $payload, $this->solution['accountSid']);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.MobileList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/MobileOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/MobileOptions.php
index 62a4913..fbdae7b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/MobileOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/MobileOptions.php
@@ -1,10 +1,16 @@
options['beta'] = $beta;
- $this->options['friendlyName'] = $friendlyName;
- $this->options['phoneNumber'] = $phoneNumber;
- $this->options['origin'] = $origin;
- }
-
- /**
- * Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
- *
- * @param bool $beta Whether to include new phone numbers
- * @return $this Fluent Builder
- */
- public function setBeta($beta)
- {
- $this->options['beta'] = $beta;
- return $this;
- }
-
- /**
- * A string that identifies the resources to read.
- *
- * @param string $friendlyName A string that identifies the resources to read
- * @return $this Fluent Builder
- */
- public function setFriendlyName($friendlyName)
- {
- $this->options['friendlyName'] = $friendlyName;
- return $this;
- }
-
- /**
- * The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit.
- *
- * @param string $phoneNumber The phone numbers of the resources to read
- * @return $this Fluent Builder
+ public static function create(
+
+ string $apiVersion = Values::NONE,
+ string $friendlyName = Values::NONE,
+ string $smsApplicationSid = Values::NONE,
+ string $smsFallbackMethod = Values::NONE,
+ string $smsFallbackUrl = Values::NONE,
+ string $smsMethod = Values::NONE,
+ string $smsUrl = Values::NONE,
+ string $statusCallback = Values::NONE,
+ string $statusCallbackMethod = Values::NONE,
+ string $voiceApplicationSid = Values::NONE,
+ bool $voiceCallerIdLookup = Values::BOOL_NONE,
+ string $voiceFallbackMethod = Values::NONE,
+ string $voiceFallbackUrl = Values::NONE,
+ string $voiceMethod = Values::NONE,
+ string $voiceUrl = Values::NONE,
+ string $identitySid = Values::NONE,
+ string $addressSid = Values::NONE,
+ string $emergencyStatus = Values::NONE,
+ string $emergencyAddressSid = Values::NONE,
+ string $trunkSid = Values::NONE,
+ string $voiceReceiveMode = Values::NONE,
+ string $bundleSid = Values::NONE
+
+ ): CreateMobileOptions
+ {
+ return new CreateMobileOptions(
+ $apiVersion,
+ $friendlyName,
+ $smsApplicationSid,
+ $smsFallbackMethod,
+ $smsFallbackUrl,
+ $smsMethod,
+ $smsUrl,
+ $statusCallback,
+ $statusCallbackMethod,
+ $voiceApplicationSid,
+ $voiceCallerIdLookup,
+ $voiceFallbackMethod,
+ $voiceFallbackUrl,
+ $voiceMethod,
+ $voiceUrl,
+ $identitySid,
+ $addressSid,
+ $emergencyStatus,
+ $emergencyAddressSid,
+ $trunkSid,
+ $voiceReceiveMode,
+ $bundleSid
+ );
+ }
+
+ /**
+ * @param bool $beta Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
+ * @param string $friendlyName A string that identifies the resources to read.
+ * @param string $phoneNumber The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit.
+ * @param string $origin Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included.
+ * @return ReadMobileOptions Options builder
*/
- public function setPhoneNumber($phoneNumber)
- {
- $this->options['phoneNumber'] = $phoneNumber;
- return $this;
- }
+ public static function read(
+
+ bool $beta = Values::BOOL_NONE,
+ string $friendlyName = Values::NONE,
+ string $phoneNumber = Values::NONE,
+ string $origin = Values::NONE
- /**
- * Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included.
- *
- * @param string $origin Include phone numbers based on their origin. By
- * default, phone numbers of all origin are included.
- * @return $this Fluent Builder
- */
- public function setOrigin($origin)
+ ): ReadMobileOptions
{
- $this->options['origin'] = $origin;
- return $this;
+ return new ReadMobileOptions(
+ $beta,
+ $friendlyName,
+ $phoneNumber,
+ $origin
+ );
}
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.ReadMobileOptions ' . \implode(' ', $options) . ']';
- }
}
class CreateMobileOptions extends Options
-{
- /**
- * @param string $apiVersion The API version to use for incoming calls made to
- * the new phone number
- * @param string $friendlyName A string to describe the new phone number
- * @param string $smsApplicationSid The SID of the application to handle SMS
- * messages
- * @param string $smsFallbackMethod HTTP method used with sms_fallback_url
- * @param string $smsFallbackUrl The URL we call when an error occurs while
- * executing TwiML
- * @param string $smsMethod The HTTP method to use with sms url
- * @param string $smsUrl The URL we should call when the new phone number
- * receives an incoming SMS message
- * @param string $statusCallback The URL we should call to send status
- * information to your application
- * @param string $statusCallbackMethod The HTTP method we should use to call
- * status_callback
- * @param string $voiceApplicationSid The SID of the application to handle the
- * new phone number
- * @param bool $voiceCallerIdLookup Whether to lookup the caller's name
- * @param string $voiceFallbackMethod The HTTP method used with
- * voice_fallback_url
- * @param string $voiceFallbackUrl The URL we will call when an error occurs in
- * TwiML
- * @param string $voiceMethod The HTTP method used with the voice_url
- * @param string $voiceUrl The URL we should call when the phone number
- * receives a call
- * @param string $identitySid The SID of the Identity resource to associate
- * with the new phone number
- * @param string $addressSid The SID of the Address resource associated with
- * the phone number
- * @param string $emergencyStatus Status determining whether the new phone
- * number is enabled for emergency calling
- * @param string $emergencyAddressSid The emergency address configuration to
- * use for emergency calling
- * @param string $trunkSid SID of the trunk to handle calls to the new phone
- * number
- * @param string $voiceReceiveMode Incoming call type: fax or voice
- * @param string $bundleSid The SID of the Bundle resource associated with
- * number
- */
- public function __construct($apiVersion = Values::NONE, $friendlyName = Values::NONE, $smsApplicationSid = Values::NONE, $smsFallbackMethod = Values::NONE, $smsFallbackUrl = Values::NONE, $smsMethod = Values::NONE, $smsUrl = Values::NONE, $statusCallback = Values::NONE, $statusCallbackMethod = Values::NONE, $voiceApplicationSid = Values::NONE, $voiceCallerIdLookup = Values::NONE, $voiceFallbackMethod = Values::NONE, $voiceFallbackUrl = Values::NONE, $voiceMethod = Values::NONE, $voiceUrl = Values::NONE, $identitySid = Values::NONE, $addressSid = Values::NONE, $emergencyStatus = Values::NONE, $emergencyAddressSid = Values::NONE, $trunkSid = Values::NONE, $voiceReceiveMode = Values::NONE, $bundleSid = Values::NONE)
{
+ /**
+ * @param string $apiVersion The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`.
+ * @param string $friendlyName A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, the is a formatted version of the phone number.
+ * @param string $smsApplicationSid The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those of the application.
+ * @param string $smsFallbackMethod The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
+ * @param string $smsFallbackUrl The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`.
+ * @param string $smsMethod The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`.
+ * @param string $smsUrl The URL we should call when the new phone number receives an incoming SMS message.
+ * @param string $statusCallback The URL we should call using the `status_callback_method` to send status information to your application.
+ * @param string $statusCallbackMethod The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
+ * @param string $voiceApplicationSid The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa.
+ * @param bool $voiceCallerIdLookup Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`.
+ * @param string $voiceFallbackMethod The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
+ * @param string $voiceFallbackUrl The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`.
+ * @param string $voiceMethod The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`.
+ * @param string $voiceUrl The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set.
+ * @param string $identitySid The SID of the Identity resource that we should associate with the new phone number. Some regions require an identity to meet local regulations.
+ * @param string $addressSid The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations.
+ * @param string $emergencyStatus
+ * @param string $emergencyAddressSid The SID of the emergency address configuration to use for emergency calling from the new phone number.
+ * @param string $trunkSid The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa.
+ * @param string $voiceReceiveMode
+ * @param string $bundleSid The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations.
+ */
+ public function __construct(
+
+ string $apiVersion = Values::NONE,
+ string $friendlyName = Values::NONE,
+ string $smsApplicationSid = Values::NONE,
+ string $smsFallbackMethod = Values::NONE,
+ string $smsFallbackUrl = Values::NONE,
+ string $smsMethod = Values::NONE,
+ string $smsUrl = Values::NONE,
+ string $statusCallback = Values::NONE,
+ string $statusCallbackMethod = Values::NONE,
+ string $voiceApplicationSid = Values::NONE,
+ bool $voiceCallerIdLookup = Values::BOOL_NONE,
+ string $voiceFallbackMethod = Values::NONE,
+ string $voiceFallbackUrl = Values::NONE,
+ string $voiceMethod = Values::NONE,
+ string $voiceUrl = Values::NONE,
+ string $identitySid = Values::NONE,
+ string $addressSid = Values::NONE,
+ string $emergencyStatus = Values::NONE,
+ string $emergencyAddressSid = Values::NONE,
+ string $trunkSid = Values::NONE,
+ string $voiceReceiveMode = Values::NONE,
+ string $bundleSid = Values::NONE
+
+ ) {
$this->options['apiVersion'] = $apiVersion;
$this->options['friendlyName'] = $friendlyName;
$this->options['smsApplicationSid'] = $smsApplicationSid;
@@ -228,11 +203,10 @@ public function __construct($apiVersion = Values::NONE, $friendlyName = Values::
/**
* The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`.
*
- * @param string $apiVersion The API version to use for incoming calls made to
- * the new phone number
+ * @param string $apiVersion The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`.
* @return $this Fluent Builder
*/
- public function setApiVersion($apiVersion)
+ public function setApiVersion(string $apiVersion): self
{
$this->options['apiVersion'] = $apiVersion;
return $this;
@@ -241,10 +215,10 @@ public function setApiVersion($apiVersion)
/**
* A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, the is a formatted version of the phone number.
*
- * @param string $friendlyName A string to describe the new phone number
+ * @param string $friendlyName A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, the is a formatted version of the phone number.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -253,11 +227,10 @@ public function setFriendlyName($friendlyName)
/**
* The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those of the application.
*
- * @param string $smsApplicationSid The SID of the application to handle SMS
- * messages
+ * @param string $smsApplicationSid The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those of the application.
* @return $this Fluent Builder
*/
- public function setSmsApplicationSid($smsApplicationSid)
+ public function setSmsApplicationSid(string $smsApplicationSid): self
{
$this->options['smsApplicationSid'] = $smsApplicationSid;
return $this;
@@ -266,10 +239,10 @@ public function setSmsApplicationSid($smsApplicationSid)
/**
* The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
*
- * @param string $smsFallbackMethod HTTP method used with sms_fallback_url
+ * @param string $smsFallbackMethod The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
* @return $this Fluent Builder
*/
- public function setSmsFallbackMethod($smsFallbackMethod)
+ public function setSmsFallbackMethod(string $smsFallbackMethod): self
{
$this->options['smsFallbackMethod'] = $smsFallbackMethod;
return $this;
@@ -278,11 +251,10 @@ public function setSmsFallbackMethod($smsFallbackMethod)
/**
* The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`.
*
- * @param string $smsFallbackUrl The URL we call when an error occurs while
- * executing TwiML
+ * @param string $smsFallbackUrl The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`.
* @return $this Fluent Builder
*/
- public function setSmsFallbackUrl($smsFallbackUrl)
+ public function setSmsFallbackUrl(string $smsFallbackUrl): self
{
$this->options['smsFallbackUrl'] = $smsFallbackUrl;
return $this;
@@ -291,10 +263,10 @@ public function setSmsFallbackUrl($smsFallbackUrl)
/**
* The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`.
*
- * @param string $smsMethod The HTTP method to use with sms url
+ * @param string $smsMethod The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`.
* @return $this Fluent Builder
*/
- public function setSmsMethod($smsMethod)
+ public function setSmsMethod(string $smsMethod): self
{
$this->options['smsMethod'] = $smsMethod;
return $this;
@@ -303,11 +275,10 @@ public function setSmsMethod($smsMethod)
/**
* The URL we should call when the new phone number receives an incoming SMS message.
*
- * @param string $smsUrl The URL we should call when the new phone number
- * receives an incoming SMS message
+ * @param string $smsUrl The URL we should call when the new phone number receives an incoming SMS message.
* @return $this Fluent Builder
*/
- public function setSmsUrl($smsUrl)
+ public function setSmsUrl(string $smsUrl): self
{
$this->options['smsUrl'] = $smsUrl;
return $this;
@@ -316,11 +287,10 @@ public function setSmsUrl($smsUrl)
/**
* The URL we should call using the `status_callback_method` to send status information to your application.
*
- * @param string $statusCallback The URL we should call to send status
- * information to your application
+ * @param string $statusCallback The URL we should call using the `status_callback_method` to send status information to your application.
* @return $this Fluent Builder
*/
- public function setStatusCallback($statusCallback)
+ public function setStatusCallback(string $statusCallback): self
{
$this->options['statusCallback'] = $statusCallback;
return $this;
@@ -329,11 +299,10 @@ public function setStatusCallback($statusCallback)
/**
* The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
*
- * @param string $statusCallbackMethod The HTTP method we should use to call
- * status_callback
+ * @param string $statusCallbackMethod The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
* @return $this Fluent Builder
*/
- public function setStatusCallbackMethod($statusCallbackMethod)
+ public function setStatusCallbackMethod(string $statusCallbackMethod): self
{
$this->options['statusCallbackMethod'] = $statusCallbackMethod;
return $this;
@@ -342,11 +311,10 @@ public function setStatusCallbackMethod($statusCallbackMethod)
/**
* The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa.
*
- * @param string $voiceApplicationSid The SID of the application to handle the
- * new phone number
+ * @param string $voiceApplicationSid The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa.
* @return $this Fluent Builder
*/
- public function setVoiceApplicationSid($voiceApplicationSid)
+ public function setVoiceApplicationSid(string $voiceApplicationSid): self
{
$this->options['voiceApplicationSid'] = $voiceApplicationSid;
return $this;
@@ -355,10 +323,10 @@ public function setVoiceApplicationSid($voiceApplicationSid)
/**
* Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`.
*
- * @param bool $voiceCallerIdLookup Whether to lookup the caller's name
+ * @param bool $voiceCallerIdLookup Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`.
* @return $this Fluent Builder
*/
- public function setVoiceCallerIdLookup($voiceCallerIdLookup)
+ public function setVoiceCallerIdLookup(bool $voiceCallerIdLookup): self
{
$this->options['voiceCallerIdLookup'] = $voiceCallerIdLookup;
return $this;
@@ -367,11 +335,10 @@ public function setVoiceCallerIdLookup($voiceCallerIdLookup)
/**
* The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
*
- * @param string $voiceFallbackMethod The HTTP method used with
- * voice_fallback_url
+ * @param string $voiceFallbackMethod The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
* @return $this Fluent Builder
*/
- public function setVoiceFallbackMethod($voiceFallbackMethod)
+ public function setVoiceFallbackMethod(string $voiceFallbackMethod): self
{
$this->options['voiceFallbackMethod'] = $voiceFallbackMethod;
return $this;
@@ -380,11 +347,10 @@ public function setVoiceFallbackMethod($voiceFallbackMethod)
/**
* The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`.
*
- * @param string $voiceFallbackUrl The URL we will call when an error occurs in
- * TwiML
+ * @param string $voiceFallbackUrl The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`.
* @return $this Fluent Builder
*/
- public function setVoiceFallbackUrl($voiceFallbackUrl)
+ public function setVoiceFallbackUrl(string $voiceFallbackUrl): self
{
$this->options['voiceFallbackUrl'] = $voiceFallbackUrl;
return $this;
@@ -393,10 +359,10 @@ public function setVoiceFallbackUrl($voiceFallbackUrl)
/**
* The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`.
*
- * @param string $voiceMethod The HTTP method used with the voice_url
+ * @param string $voiceMethod The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`.
* @return $this Fluent Builder
*/
- public function setVoiceMethod($voiceMethod)
+ public function setVoiceMethod(string $voiceMethod): self
{
$this->options['voiceMethod'] = $voiceMethod;
return $this;
@@ -405,11 +371,10 @@ public function setVoiceMethod($voiceMethod)
/**
* The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set.
*
- * @param string $voiceUrl The URL we should call when the phone number
- * receives a call
+ * @param string $voiceUrl The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set.
* @return $this Fluent Builder
*/
- public function setVoiceUrl($voiceUrl)
+ public function setVoiceUrl(string $voiceUrl): self
{
$this->options['voiceUrl'] = $voiceUrl;
return $this;
@@ -418,11 +383,10 @@ public function setVoiceUrl($voiceUrl)
/**
* The SID of the Identity resource that we should associate with the new phone number. Some regions require an identity to meet local regulations.
*
- * @param string $identitySid The SID of the Identity resource to associate
- * with the new phone number
+ * @param string $identitySid The SID of the Identity resource that we should associate with the new phone number. Some regions require an identity to meet local regulations.
* @return $this Fluent Builder
*/
- public function setIdentitySid($identitySid)
+ public function setIdentitySid(string $identitySid): self
{
$this->options['identitySid'] = $identitySid;
return $this;
@@ -431,24 +395,20 @@ public function setIdentitySid($identitySid)
/**
* The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations.
*
- * @param string $addressSid The SID of the Address resource associated with
- * the phone number
+ * @param string $addressSid The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations.
* @return $this Fluent Builder
*/
- public function setAddressSid($addressSid)
+ public function setAddressSid(string $addressSid): self
{
$this->options['addressSid'] = $addressSid;
return $this;
}
/**
- * The configuration status parameter that determines whether the new phone number is enabled for emergency calling.
- *
- * @param string $emergencyStatus Status determining whether the new phone
- * number is enabled for emergency calling
+ * @param string $emergencyStatus
* @return $this Fluent Builder
*/
- public function setEmergencyStatus($emergencyStatus)
+ public function setEmergencyStatus(string $emergencyStatus): self
{
$this->options['emergencyStatus'] = $emergencyStatus;
return $this;
@@ -457,11 +417,10 @@ public function setEmergencyStatus($emergencyStatus)
/**
* The SID of the emergency address configuration to use for emergency calling from the new phone number.
*
- * @param string $emergencyAddressSid The emergency address configuration to
- * use for emergency calling
+ * @param string $emergencyAddressSid The SID of the emergency address configuration to use for emergency calling from the new phone number.
* @return $this Fluent Builder
*/
- public function setEmergencyAddressSid($emergencyAddressSid)
+ public function setEmergencyAddressSid(string $emergencyAddressSid): self
{
$this->options['emergencyAddressSid'] = $emergencyAddressSid;
return $this;
@@ -470,23 +429,20 @@ public function setEmergencyAddressSid($emergencyAddressSid)
/**
* The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa.
*
- * @param string $trunkSid SID of the trunk to handle calls to the new phone
- * number
+ * @param string $trunkSid The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa.
* @return $this Fluent Builder
*/
- public function setTrunkSid($trunkSid)
+ public function setTrunkSid(string $trunkSid): self
{
$this->options['trunkSid'] = $trunkSid;
return $this;
}
/**
- * The configuration parameter for the new phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`.
- *
- * @param string $voiceReceiveMode Incoming call type: fax or voice
+ * @param string $voiceReceiveMode
* @return $this Fluent Builder
*/
- public function setVoiceReceiveMode($voiceReceiveMode)
+ public function setVoiceReceiveMode(string $voiceReceiveMode): self
{
$this->options['voiceReceiveMode'] = $voiceReceiveMode;
return $this;
@@ -495,11 +451,10 @@ public function setVoiceReceiveMode($voiceReceiveMode)
/**
* The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations.
*
- * @param string $bundleSid The SID of the Bundle resource associated with
- * number
+ * @param string $bundleSid The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations.
* @return $this Fluent Builder
*/
- public function setBundleSid($bundleSid)
+ public function setBundleSid(string $bundleSid): self
{
$this->options['bundleSid'] = $bundleSid;
return $this;
@@ -510,14 +465,92 @@ public function setBundleSid($bundleSid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
+ {
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.CreateMobileOptions ' . $options . ']';
+ }
+}
+
+class ReadMobileOptions extends Options
+ {
+ /**
+ * @param bool $beta Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
+ * @param string $friendlyName A string that identifies the resources to read.
+ * @param string $phoneNumber The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit.
+ * @param string $origin Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included.
+ */
+ public function __construct(
+
+ bool $beta = Values::BOOL_NONE,
+ string $friendlyName = Values::NONE,
+ string $phoneNumber = Values::NONE,
+ string $origin = Values::NONE
+
+ ) {
+ $this->options['beta'] = $beta;
+ $this->options['friendlyName'] = $friendlyName;
+ $this->options['phoneNumber'] = $phoneNumber;
+ $this->options['origin'] = $origin;
+ }
+
+ /**
+ * Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
+ *
+ * @param bool $beta Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
+ * @return $this Fluent Builder
+ */
+ public function setBeta(bool $beta): self
+ {
+ $this->options['beta'] = $beta;
+ return $this;
+ }
+
+ /**
+ * A string that identifies the resources to read.
+ *
+ * @param string $friendlyName A string that identifies the resources to read.
+ * @return $this Fluent Builder
+ */
+ public function setFriendlyName(string $friendlyName): self
+ {
+ $this->options['friendlyName'] = $friendlyName;
+ return $this;
+ }
+
+ /**
+ * The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit.
+ *
+ * @param string $phoneNumber The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit.
+ * @return $this Fluent Builder
+ */
+ public function setPhoneNumber(string $phoneNumber): self
+ {
+ $this->options['phoneNumber'] = $phoneNumber;
+ return $this;
+ }
+
+ /**
+ * Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included.
+ *
+ * @param string $origin Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included.
+ * @return $this Fluent Builder
+ */
+ public function setOrigin(string $origin): self
+ {
+ $this->options['origin'] = $origin;
+ return $this;
+ }
+
+ /**
+ * Provide a friendly representation
+ *
+ * @return string Machine friendly representation
+ */
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.CreateMobileOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.ReadMobileOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/MobilePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/MobilePage.php
index 3619365..7bf4812 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/MobilePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/MobilePage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return MobileInstance \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\MobileInstance
+ */
+ public function buildInstance(array $payload): MobileInstance
{
return new MobileInstance($this->version, $payload, $this->solution['accountSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.MobilePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/TollFreeInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/TollFreeInstance.php
index 3f6785f..f4f80aa 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/TollFreeInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/TollFreeInstance.php
@@ -2,74 +2,86 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Base\PhoneNumberCapabilities;
+
/**
- * @property string $accountSid
- * @property string $addressSid
+ * @property string|null $accountSid
+ * @property string|null $addressSid
* @property string $addressRequirements
- * @property string $apiVersion
- * @property bool $beta
- * @property string $capabilities
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $friendlyName
- * @property string $identitySid
- * @property string $phoneNumber
- * @property string $origin
- * @property string $sid
- * @property string $smsApplicationSid
- * @property string $smsFallbackMethod
- * @property string $smsFallbackUrl
- * @property string $smsMethod
- * @property string $smsUrl
- * @property string $statusCallback
- * @property string $statusCallbackMethod
- * @property string $trunkSid
- * @property string $uri
- * @property string $voiceApplicationSid
- * @property bool $voiceCallerIdLookup
- * @property string $voiceFallbackMethod
- * @property string $voiceFallbackUrl
- * @property string $voiceMethod
- * @property string $voiceUrl
+ * @property string|null $apiVersion
+ * @property bool|null $beta
+ * @property PhoneNumberCapabilities|null $capabilities
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $friendlyName
+ * @property string|null $identitySid
+ * @property string|null $phoneNumber
+ * @property string|null $origin
+ * @property string|null $sid
+ * @property string|null $smsApplicationSid
+ * @property string|null $smsFallbackMethod
+ * @property string|null $smsFallbackUrl
+ * @property string|null $smsMethod
+ * @property string|null $smsUrl
+ * @property string|null $statusCallback
+ * @property string|null $statusCallbackMethod
+ * @property string|null $trunkSid
+ * @property string|null $uri
+ * @property string $voiceReceiveMode
+ * @property string|null $voiceApplicationSid
+ * @property bool|null $voiceCallerIdLookup
+ * @property string|null $voiceFallbackMethod
+ * @property string|null $voiceFallbackUrl
+ * @property string|null $voiceMethod
+ * @property string|null $voiceUrl
* @property string $emergencyStatus
- * @property string $emergencyAddressSid
- * @property string $bundleSid
+ * @property string|null $emergencyAddressSid
+ * @property string $emergencyAddressStatus
+ * @property string|null $bundleSid
+ * @property string|null $status
*/
class TollFreeInstance extends InstanceResource
{
/**
* Initialize the TollFreeInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The SID of the Account that created the resource
- * @return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\TollFreeInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
*/
- public function __construct(Version $version, array $payload, $accountSid)
+ public function __construct(Version $version, array $payload, string $accountSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'addressSid' => Values::array_get($payload, 'address_sid'),
'addressRequirements' => Values::array_get($payload, 'address_requirements'),
'apiVersion' => Values::array_get($payload, 'api_version'),
'beta' => Values::array_get($payload, 'beta'),
- 'capabilities' => Values::array_get($payload, 'capabilities'),
+ 'capabilities' => Deserialize::phoneNumberCapabilities(Values::array_get($payload, 'capabilities')),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
@@ -86,6 +98,7 @@ public function __construct(Version $version, array $payload, $accountSid)
'statusCallbackMethod' => Values::array_get($payload, 'status_callback_method'),
'trunkSid' => Values::array_get($payload, 'trunk_sid'),
'uri' => Values::array_get($payload, 'uri'),
+ 'voiceReceiveMode' => Values::array_get($payload, 'voice_receive_mode'),
'voiceApplicationSid' => Values::array_get($payload, 'voice_application_sid'),
'voiceCallerIdLookup' => Values::array_get($payload, 'voice_caller_id_lookup'),
'voiceFallbackMethod' => Values::array_get($payload, 'voice_fallback_method'),
@@ -94,10 +107,12 @@ public function __construct(Version $version, array $payload, $accountSid)
'voiceUrl' => Values::array_get($payload, 'voice_url'),
'emergencyStatus' => Values::array_get($payload, 'emergency_status'),
'emergencyAddressSid' => Values::array_get($payload, 'emergency_address_sid'),
+ 'emergencyAddressStatus' => Values::array_get($payload, 'emergency_address_status'),
'bundleSid' => Values::array_get($payload, 'bundle_sid'),
- );
+ 'status' => Values::array_get($payload, 'status'),
+ ];
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = ['accountSid' => $accountSid, ];
}
/**
@@ -107,7 +122,7 @@ public function __construct(Version $version, array $payload, $accountSid)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -126,8 +141,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.TollFreeInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/TollFreeList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/TollFreeList.php
index aedc701..6e09325 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/TollFreeList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/TollFreeList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber;
@@ -12,57 +19,110 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class TollFreeList extends ListResource
-{
+ {
/**
* Construct the TollFreeList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * @return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\TollFreeList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
*/
- public function __construct(Version $version, $accountSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid,);
-
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/IncomingPhoneNumbers/TollFree.json';
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/IncomingPhoneNumbers/TollFree.json';
}
/**
- * Streams TollFreeInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the TollFreeInstance
*
+ * @param string $phoneNumber The phone number to purchase specified in [E.164](https://www.twilio.com/docs/glossary/what-e164) format. E.164 phone numbers consist of a + followed by the country code and subscriber number without punctuation characters. For example, +14155551234.
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return TollFreeInstance Created TollFreeInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function create(string $phoneNumber, array $options = []): TollFreeInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($options, $limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'PhoneNumber' =>
+ $phoneNumber,
+ 'ApiVersion' =>
+ $options['apiVersion'],
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'SmsApplicationSid' =>
+ $options['smsApplicationSid'],
+ 'SmsFallbackMethod' =>
+ $options['smsFallbackMethod'],
+ 'SmsFallbackUrl' =>
+ $options['smsFallbackUrl'],
+ 'SmsMethod' =>
+ $options['smsMethod'],
+ 'SmsUrl' =>
+ $options['smsUrl'],
+ 'StatusCallback' =>
+ $options['statusCallback'],
+ 'StatusCallbackMethod' =>
+ $options['statusCallbackMethod'],
+ 'VoiceApplicationSid' =>
+ $options['voiceApplicationSid'],
+ 'VoiceCallerIdLookup' =>
+ Serialize::booleanToString($options['voiceCallerIdLookup']),
+ 'VoiceFallbackMethod' =>
+ $options['voiceFallbackMethod'],
+ 'VoiceFallbackUrl' =>
+ $options['voiceFallbackUrl'],
+ 'VoiceMethod' =>
+ $options['voiceMethod'],
+ 'VoiceUrl' =>
+ $options['voiceUrl'],
+ 'IdentitySid' =>
+ $options['identitySid'],
+ 'AddressSid' =>
+ $options['addressSid'],
+ 'EmergencyStatus' =>
+ $options['emergencyStatus'],
+ 'EmergencyAddressSid' =>
+ $options['emergencyAddressSid'],
+ 'TrunkSid' =>
+ $options['trunkSid'],
+ 'VoiceReceiveMode' =>
+ $options['voiceReceiveMode'],
+ 'BundleSid' =>
+ $options['bundleSid'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new TollFreeInstance(
+ $this->version,
+ $payload,
+ $this->solution['accountSid']
+ );
}
+
/**
* Reads TollFreeInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -79,39 +139,72 @@ public function stream($options = array(), $limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return TollFreeInstance[] Array of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
+ /**
+ * Streams TollFreeInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of TollFreeInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of TollFreeInstance
+ * @return TollFreePage Page of TollFreeInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): TollFreePage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Beta' => Serialize::booleanToString($options['beta']),
- 'FriendlyName' => $options['friendlyName'],
- 'PhoneNumber' => $options['phoneNumber'],
- 'Origin' => $options['origin'],
+
+ $params = Values::of([
+ 'Beta' =>
+ Serialize::booleanToString($options['beta']),
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'PhoneNumber' =>
+ $options['phoneNumber'],
+ 'Origin' =>
+ $options['origin'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new TollFreePage($this->version, $response, $this->solution);
}
@@ -121,9 +214,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of TollFreeInstance
+ * @return TollFreePage Page of TollFreeInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): TollFreePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -133,61 +226,14 @@ public function getPage($targetUrl)
return new TollFreePage($this->version, $response, $this->solution);
}
- /**
- * Create a new TollFreeInstance
- *
- * @param string $phoneNumber The phone number to purchase in E.164 format
- * @param array|Options $options Optional Arguments
- * @return TollFreeInstance Newly created TollFreeInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($phoneNumber, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'PhoneNumber' => $phoneNumber,
- 'ApiVersion' => $options['apiVersion'],
- 'FriendlyName' => $options['friendlyName'],
- 'SmsApplicationSid' => $options['smsApplicationSid'],
- 'SmsFallbackMethod' => $options['smsFallbackMethod'],
- 'SmsFallbackUrl' => $options['smsFallbackUrl'],
- 'SmsMethod' => $options['smsMethod'],
- 'SmsUrl' => $options['smsUrl'],
- 'StatusCallback' => $options['statusCallback'],
- 'StatusCallbackMethod' => $options['statusCallbackMethod'],
- 'VoiceApplicationSid' => $options['voiceApplicationSid'],
- 'VoiceCallerIdLookup' => Serialize::booleanToString($options['voiceCallerIdLookup']),
- 'VoiceFallbackMethod' => $options['voiceFallbackMethod'],
- 'VoiceFallbackUrl' => $options['voiceFallbackUrl'],
- 'VoiceMethod' => $options['voiceMethod'],
- 'VoiceUrl' => $options['voiceUrl'],
- 'IdentitySid' => $options['identitySid'],
- 'AddressSid' => $options['addressSid'],
- 'EmergencyStatus' => $options['emergencyStatus'],
- 'EmergencyAddressSid' => $options['emergencyAddressSid'],
- 'TrunkSid' => $options['trunkSid'],
- 'VoiceReceiveMode' => $options['voiceReceiveMode'],
- 'BundleSid' => $options['bundleSid'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new TollFreeInstance($this->version, $payload, $this->solution['accountSid']);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.TollFreeList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/TollFreeOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/TollFreeOptions.php
index 2bc9ac0..2f363e2 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/TollFreeOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/TollFreeOptions.php
@@ -1,10 +1,16 @@
options['beta'] = $beta;
- $this->options['friendlyName'] = $friendlyName;
- $this->options['phoneNumber'] = $phoneNumber;
- $this->options['origin'] = $origin;
- }
-
- /**
- * Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
- *
- * @param bool $beta Whether to include new phone numbers
- * @return $this Fluent Builder
- */
- public function setBeta($beta)
- {
- $this->options['beta'] = $beta;
- return $this;
- }
-
- /**
- * A string that identifies the resources to read.
- *
- * @param string $friendlyName A string that identifies the resources to read
- * @return $this Fluent Builder
- */
- public function setFriendlyName($friendlyName)
- {
- $this->options['friendlyName'] = $friendlyName;
- return $this;
- }
-
- /**
- * The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit.
- *
- * @param string $phoneNumber The phone numbers of the resources to read
- * @return $this Fluent Builder
+ public static function create(
+
+ string $apiVersion = Values::NONE,
+ string $friendlyName = Values::NONE,
+ string $smsApplicationSid = Values::NONE,
+ string $smsFallbackMethod = Values::NONE,
+ string $smsFallbackUrl = Values::NONE,
+ string $smsMethod = Values::NONE,
+ string $smsUrl = Values::NONE,
+ string $statusCallback = Values::NONE,
+ string $statusCallbackMethod = Values::NONE,
+ string $voiceApplicationSid = Values::NONE,
+ bool $voiceCallerIdLookup = Values::BOOL_NONE,
+ string $voiceFallbackMethod = Values::NONE,
+ string $voiceFallbackUrl = Values::NONE,
+ string $voiceMethod = Values::NONE,
+ string $voiceUrl = Values::NONE,
+ string $identitySid = Values::NONE,
+ string $addressSid = Values::NONE,
+ string $emergencyStatus = Values::NONE,
+ string $emergencyAddressSid = Values::NONE,
+ string $trunkSid = Values::NONE,
+ string $voiceReceiveMode = Values::NONE,
+ string $bundleSid = Values::NONE
+
+ ): CreateTollFreeOptions
+ {
+ return new CreateTollFreeOptions(
+ $apiVersion,
+ $friendlyName,
+ $smsApplicationSid,
+ $smsFallbackMethod,
+ $smsFallbackUrl,
+ $smsMethod,
+ $smsUrl,
+ $statusCallback,
+ $statusCallbackMethod,
+ $voiceApplicationSid,
+ $voiceCallerIdLookup,
+ $voiceFallbackMethod,
+ $voiceFallbackUrl,
+ $voiceMethod,
+ $voiceUrl,
+ $identitySid,
+ $addressSid,
+ $emergencyStatus,
+ $emergencyAddressSid,
+ $trunkSid,
+ $voiceReceiveMode,
+ $bundleSid
+ );
+ }
+
+ /**
+ * @param bool $beta Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
+ * @param string $friendlyName A string that identifies the resources to read.
+ * @param string $phoneNumber The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit.
+ * @param string $origin Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included.
+ * @return ReadTollFreeOptions Options builder
*/
- public function setPhoneNumber($phoneNumber)
- {
- $this->options['phoneNumber'] = $phoneNumber;
- return $this;
- }
+ public static function read(
+
+ bool $beta = Values::BOOL_NONE,
+ string $friendlyName = Values::NONE,
+ string $phoneNumber = Values::NONE,
+ string $origin = Values::NONE
- /**
- * Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included.
- *
- * @param string $origin Include phone numbers based on their origin. By
- * default, phone numbers of all origin are included.
- * @return $this Fluent Builder
- */
- public function setOrigin($origin)
+ ): ReadTollFreeOptions
{
- $this->options['origin'] = $origin;
- return $this;
+ return new ReadTollFreeOptions(
+ $beta,
+ $friendlyName,
+ $phoneNumber,
+ $origin
+ );
}
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.ReadTollFreeOptions ' . \implode(' ', $options) . ']';
- }
}
class CreateTollFreeOptions extends Options
-{
- /**
- * @param string $apiVersion The API version to use for incoming calls made to
- * the new phone number
- * @param string $friendlyName A string to describe the new phone number
- * @param string $smsApplicationSid The SID of the application to handle SMS
- * messages
- * @param string $smsFallbackMethod HTTP method used with sms_fallback_url
- * @param string $smsFallbackUrl The URL we call when an error occurs while
- * executing TwiML
- * @param string $smsMethod The HTTP method to use with sms_url
- * @param string $smsUrl The URL we should call when the new phone number
- * receives an incoming SMS message
- * @param string $statusCallback The URL to send status information to your
- * application
- * @param string $statusCallbackMethod The HTTP method we should use to call
- * status_callback
- * @param string $voiceApplicationSid The SID of the application to handle the
- * new phone number
- * @param bool $voiceCallerIdLookup Whether to lookup the caller's name
- * @param string $voiceFallbackMethod The HTTP method used with
- * voice_fallback_url
- * @param string $voiceFallbackUrl The URL we will call when an error occurs in
- * TwiML
- * @param string $voiceMethod The HTTP method used with the voice_url
- * @param string $voiceUrl The URL we should call when the phone number
- * receives a call
- * @param string $identitySid The SID of the Identity resource to associate
- * with the new phone number
- * @param string $addressSid The SID of the Address resource associated with
- * the phone number
- * @param string $emergencyStatus Status determining whether the new phone
- * number is enabled for emergency calling
- * @param string $emergencyAddressSid The emergency address configuration to
- * use for emergency calling
- * @param string $trunkSid SID of the trunk to handle calls to the new phone
- * number
- * @param string $voiceReceiveMode Incoming call type: fax or voice
- * @param string $bundleSid The SID of the Bundle resource associated with
- * number
- */
- public function __construct($apiVersion = Values::NONE, $friendlyName = Values::NONE, $smsApplicationSid = Values::NONE, $smsFallbackMethod = Values::NONE, $smsFallbackUrl = Values::NONE, $smsMethod = Values::NONE, $smsUrl = Values::NONE, $statusCallback = Values::NONE, $statusCallbackMethod = Values::NONE, $voiceApplicationSid = Values::NONE, $voiceCallerIdLookup = Values::NONE, $voiceFallbackMethod = Values::NONE, $voiceFallbackUrl = Values::NONE, $voiceMethod = Values::NONE, $voiceUrl = Values::NONE, $identitySid = Values::NONE, $addressSid = Values::NONE, $emergencyStatus = Values::NONE, $emergencyAddressSid = Values::NONE, $trunkSid = Values::NONE, $voiceReceiveMode = Values::NONE, $bundleSid = Values::NONE)
{
+ /**
+ * @param string $apiVersion The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`.
+ * @param string $friendlyName A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, this is a formatted version of the phone number.
+ * @param string $smsApplicationSid The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all `sms_*_url` values and use those of the application.
+ * @param string $smsFallbackMethod The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
+ * @param string $smsFallbackUrl The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`.
+ * @param string $smsMethod The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`.
+ * @param string $smsUrl The URL we should call when the new phone number receives an incoming SMS message.
+ * @param string $statusCallback The URL we should call using the `status_callback_method` to send status information to your application.
+ * @param string $statusCallbackMethod The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
+ * @param string $voiceApplicationSid The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa.
+ * @param bool $voiceCallerIdLookup Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`.
+ * @param string $voiceFallbackMethod The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
+ * @param string $voiceFallbackUrl The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`.
+ * @param string $voiceMethod The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`.
+ * @param string $voiceUrl The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set.
+ * @param string $identitySid The SID of the Identity resource that we should associate with the new phone number. Some regions require an Identity to meet local regulations.
+ * @param string $addressSid The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations.
+ * @param string $emergencyStatus
+ * @param string $emergencyAddressSid The SID of the emergency address configuration to use for emergency calling from the new phone number.
+ * @param string $trunkSid The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa.
+ * @param string $voiceReceiveMode
+ * @param string $bundleSid The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations.
+ */
+ public function __construct(
+
+ string $apiVersion = Values::NONE,
+ string $friendlyName = Values::NONE,
+ string $smsApplicationSid = Values::NONE,
+ string $smsFallbackMethod = Values::NONE,
+ string $smsFallbackUrl = Values::NONE,
+ string $smsMethod = Values::NONE,
+ string $smsUrl = Values::NONE,
+ string $statusCallback = Values::NONE,
+ string $statusCallbackMethod = Values::NONE,
+ string $voiceApplicationSid = Values::NONE,
+ bool $voiceCallerIdLookup = Values::BOOL_NONE,
+ string $voiceFallbackMethod = Values::NONE,
+ string $voiceFallbackUrl = Values::NONE,
+ string $voiceMethod = Values::NONE,
+ string $voiceUrl = Values::NONE,
+ string $identitySid = Values::NONE,
+ string $addressSid = Values::NONE,
+ string $emergencyStatus = Values::NONE,
+ string $emergencyAddressSid = Values::NONE,
+ string $trunkSid = Values::NONE,
+ string $voiceReceiveMode = Values::NONE,
+ string $bundleSid = Values::NONE
+
+ ) {
$this->options['apiVersion'] = $apiVersion;
$this->options['friendlyName'] = $friendlyName;
$this->options['smsApplicationSid'] = $smsApplicationSid;
@@ -228,11 +203,10 @@ public function __construct($apiVersion = Values::NONE, $friendlyName = Values::
/**
* The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`.
*
- * @param string $apiVersion The API version to use for incoming calls made to
- * the new phone number
+ * @param string $apiVersion The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`.
* @return $this Fluent Builder
*/
- public function setApiVersion($apiVersion)
+ public function setApiVersion(string $apiVersion): self
{
$this->options['apiVersion'] = $apiVersion;
return $this;
@@ -241,10 +215,10 @@ public function setApiVersion($apiVersion)
/**
* A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, this is a formatted version of the phone number.
*
- * @param string $friendlyName A string to describe the new phone number
+ * @param string $friendlyName A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, this is a formatted version of the phone number.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -253,11 +227,10 @@ public function setFriendlyName($friendlyName)
/**
* The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all `sms_*_url` values and use those of the application.
*
- * @param string $smsApplicationSid The SID of the application to handle SMS
- * messages
+ * @param string $smsApplicationSid The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all `sms_*_url` values and use those of the application.
* @return $this Fluent Builder
*/
- public function setSmsApplicationSid($smsApplicationSid)
+ public function setSmsApplicationSid(string $smsApplicationSid): self
{
$this->options['smsApplicationSid'] = $smsApplicationSid;
return $this;
@@ -266,10 +239,10 @@ public function setSmsApplicationSid($smsApplicationSid)
/**
* The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
*
- * @param string $smsFallbackMethod HTTP method used with sms_fallback_url
+ * @param string $smsFallbackMethod The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
* @return $this Fluent Builder
*/
- public function setSmsFallbackMethod($smsFallbackMethod)
+ public function setSmsFallbackMethod(string $smsFallbackMethod): self
{
$this->options['smsFallbackMethod'] = $smsFallbackMethod;
return $this;
@@ -278,11 +251,10 @@ public function setSmsFallbackMethod($smsFallbackMethod)
/**
* The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`.
*
- * @param string $smsFallbackUrl The URL we call when an error occurs while
- * executing TwiML
+ * @param string $smsFallbackUrl The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`.
* @return $this Fluent Builder
*/
- public function setSmsFallbackUrl($smsFallbackUrl)
+ public function setSmsFallbackUrl(string $smsFallbackUrl): self
{
$this->options['smsFallbackUrl'] = $smsFallbackUrl;
return $this;
@@ -291,10 +263,10 @@ public function setSmsFallbackUrl($smsFallbackUrl)
/**
* The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`.
*
- * @param string $smsMethod The HTTP method to use with sms_url
+ * @param string $smsMethod The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`.
* @return $this Fluent Builder
*/
- public function setSmsMethod($smsMethod)
+ public function setSmsMethod(string $smsMethod): self
{
$this->options['smsMethod'] = $smsMethod;
return $this;
@@ -303,11 +275,10 @@ public function setSmsMethod($smsMethod)
/**
* The URL we should call when the new phone number receives an incoming SMS message.
*
- * @param string $smsUrl The URL we should call when the new phone number
- * receives an incoming SMS message
+ * @param string $smsUrl The URL we should call when the new phone number receives an incoming SMS message.
* @return $this Fluent Builder
*/
- public function setSmsUrl($smsUrl)
+ public function setSmsUrl(string $smsUrl): self
{
$this->options['smsUrl'] = $smsUrl;
return $this;
@@ -316,11 +287,10 @@ public function setSmsUrl($smsUrl)
/**
* The URL we should call using the `status_callback_method` to send status information to your application.
*
- * @param string $statusCallback The URL to send status information to your
- * application
+ * @param string $statusCallback The URL we should call using the `status_callback_method` to send status information to your application.
* @return $this Fluent Builder
*/
- public function setStatusCallback($statusCallback)
+ public function setStatusCallback(string $statusCallback): self
{
$this->options['statusCallback'] = $statusCallback;
return $this;
@@ -329,11 +299,10 @@ public function setStatusCallback($statusCallback)
/**
* The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
*
- * @param string $statusCallbackMethod The HTTP method we should use to call
- * status_callback
+ * @param string $statusCallbackMethod The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
* @return $this Fluent Builder
*/
- public function setStatusCallbackMethod($statusCallbackMethod)
+ public function setStatusCallbackMethod(string $statusCallbackMethod): self
{
$this->options['statusCallbackMethod'] = $statusCallbackMethod;
return $this;
@@ -342,11 +311,10 @@ public function setStatusCallbackMethod($statusCallbackMethod)
/**
* The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa.
*
- * @param string $voiceApplicationSid The SID of the application to handle the
- * new phone number
+ * @param string $voiceApplicationSid The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa.
* @return $this Fluent Builder
*/
- public function setVoiceApplicationSid($voiceApplicationSid)
+ public function setVoiceApplicationSid(string $voiceApplicationSid): self
{
$this->options['voiceApplicationSid'] = $voiceApplicationSid;
return $this;
@@ -355,10 +323,10 @@ public function setVoiceApplicationSid($voiceApplicationSid)
/**
* Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`.
*
- * @param bool $voiceCallerIdLookup Whether to lookup the caller's name
+ * @param bool $voiceCallerIdLookup Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`.
* @return $this Fluent Builder
*/
- public function setVoiceCallerIdLookup($voiceCallerIdLookup)
+ public function setVoiceCallerIdLookup(bool $voiceCallerIdLookup): self
{
$this->options['voiceCallerIdLookup'] = $voiceCallerIdLookup;
return $this;
@@ -367,11 +335,10 @@ public function setVoiceCallerIdLookup($voiceCallerIdLookup)
/**
* The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
*
- * @param string $voiceFallbackMethod The HTTP method used with
- * voice_fallback_url
+ * @param string $voiceFallbackMethod The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
* @return $this Fluent Builder
*/
- public function setVoiceFallbackMethod($voiceFallbackMethod)
+ public function setVoiceFallbackMethod(string $voiceFallbackMethod): self
{
$this->options['voiceFallbackMethod'] = $voiceFallbackMethod;
return $this;
@@ -380,11 +347,10 @@ public function setVoiceFallbackMethod($voiceFallbackMethod)
/**
* The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`.
*
- * @param string $voiceFallbackUrl The URL we will call when an error occurs in
- * TwiML
+ * @param string $voiceFallbackUrl The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`.
* @return $this Fluent Builder
*/
- public function setVoiceFallbackUrl($voiceFallbackUrl)
+ public function setVoiceFallbackUrl(string $voiceFallbackUrl): self
{
$this->options['voiceFallbackUrl'] = $voiceFallbackUrl;
return $this;
@@ -393,10 +359,10 @@ public function setVoiceFallbackUrl($voiceFallbackUrl)
/**
* The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`.
*
- * @param string $voiceMethod The HTTP method used with the voice_url
+ * @param string $voiceMethod The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`.
* @return $this Fluent Builder
*/
- public function setVoiceMethod($voiceMethod)
+ public function setVoiceMethod(string $voiceMethod): self
{
$this->options['voiceMethod'] = $voiceMethod;
return $this;
@@ -405,11 +371,10 @@ public function setVoiceMethod($voiceMethod)
/**
* The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set.
*
- * @param string $voiceUrl The URL we should call when the phone number
- * receives a call
+ * @param string $voiceUrl The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set.
* @return $this Fluent Builder
*/
- public function setVoiceUrl($voiceUrl)
+ public function setVoiceUrl(string $voiceUrl): self
{
$this->options['voiceUrl'] = $voiceUrl;
return $this;
@@ -418,11 +383,10 @@ public function setVoiceUrl($voiceUrl)
/**
* The SID of the Identity resource that we should associate with the new phone number. Some regions require an Identity to meet local regulations.
*
- * @param string $identitySid The SID of the Identity resource to associate
- * with the new phone number
+ * @param string $identitySid The SID of the Identity resource that we should associate with the new phone number. Some regions require an Identity to meet local regulations.
* @return $this Fluent Builder
*/
- public function setIdentitySid($identitySid)
+ public function setIdentitySid(string $identitySid): self
{
$this->options['identitySid'] = $identitySid;
return $this;
@@ -431,24 +395,20 @@ public function setIdentitySid($identitySid)
/**
* The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations.
*
- * @param string $addressSid The SID of the Address resource associated with
- * the phone number
+ * @param string $addressSid The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations.
* @return $this Fluent Builder
*/
- public function setAddressSid($addressSid)
+ public function setAddressSid(string $addressSid): self
{
$this->options['addressSid'] = $addressSid;
return $this;
}
/**
- * The configuration status parameter that determines whether the new phone number is enabled for emergency calling.
- *
- * @param string $emergencyStatus Status determining whether the new phone
- * number is enabled for emergency calling
+ * @param string $emergencyStatus
* @return $this Fluent Builder
*/
- public function setEmergencyStatus($emergencyStatus)
+ public function setEmergencyStatus(string $emergencyStatus): self
{
$this->options['emergencyStatus'] = $emergencyStatus;
return $this;
@@ -457,11 +417,10 @@ public function setEmergencyStatus($emergencyStatus)
/**
* The SID of the emergency address configuration to use for emergency calling from the new phone number.
*
- * @param string $emergencyAddressSid The emergency address configuration to
- * use for emergency calling
+ * @param string $emergencyAddressSid The SID of the emergency address configuration to use for emergency calling from the new phone number.
* @return $this Fluent Builder
*/
- public function setEmergencyAddressSid($emergencyAddressSid)
+ public function setEmergencyAddressSid(string $emergencyAddressSid): self
{
$this->options['emergencyAddressSid'] = $emergencyAddressSid;
return $this;
@@ -470,23 +429,20 @@ public function setEmergencyAddressSid($emergencyAddressSid)
/**
* The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa.
*
- * @param string $trunkSid SID of the trunk to handle calls to the new phone
- * number
+ * @param string $trunkSid The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa.
* @return $this Fluent Builder
*/
- public function setTrunkSid($trunkSid)
+ public function setTrunkSid(string $trunkSid): self
{
$this->options['trunkSid'] = $trunkSid;
return $this;
}
/**
- * The configuration parameter for the new phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`.
- *
- * @param string $voiceReceiveMode Incoming call type: fax or voice
+ * @param string $voiceReceiveMode
* @return $this Fluent Builder
*/
- public function setVoiceReceiveMode($voiceReceiveMode)
+ public function setVoiceReceiveMode(string $voiceReceiveMode): self
{
$this->options['voiceReceiveMode'] = $voiceReceiveMode;
return $this;
@@ -495,11 +451,10 @@ public function setVoiceReceiveMode($voiceReceiveMode)
/**
* The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations.
*
- * @param string $bundleSid The SID of the Bundle resource associated with
- * number
+ * @param string $bundleSid The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations.
* @return $this Fluent Builder
*/
- public function setBundleSid($bundleSid)
+ public function setBundleSid(string $bundleSid): self
{
$this->options['bundleSid'] = $bundleSid;
return $this;
@@ -510,14 +465,92 @@ public function setBundleSid($bundleSid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
+ {
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.CreateTollFreeOptions ' . $options . ']';
+ }
+}
+
+class ReadTollFreeOptions extends Options
+ {
+ /**
+ * @param bool $beta Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
+ * @param string $friendlyName A string that identifies the resources to read.
+ * @param string $phoneNumber The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit.
+ * @param string $origin Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included.
+ */
+ public function __construct(
+
+ bool $beta = Values::BOOL_NONE,
+ string $friendlyName = Values::NONE,
+ string $phoneNumber = Values::NONE,
+ string $origin = Values::NONE
+
+ ) {
+ $this->options['beta'] = $beta;
+ $this->options['friendlyName'] = $friendlyName;
+ $this->options['phoneNumber'] = $phoneNumber;
+ $this->options['origin'] = $origin;
+ }
+
+ /**
+ * Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
+ *
+ * @param bool $beta Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
+ * @return $this Fluent Builder
+ */
+ public function setBeta(bool $beta): self
+ {
+ $this->options['beta'] = $beta;
+ return $this;
+ }
+
+ /**
+ * A string that identifies the resources to read.
+ *
+ * @param string $friendlyName A string that identifies the resources to read.
+ * @return $this Fluent Builder
+ */
+ public function setFriendlyName(string $friendlyName): self
+ {
+ $this->options['friendlyName'] = $friendlyName;
+ return $this;
+ }
+
+ /**
+ * The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit.
+ *
+ * @param string $phoneNumber The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit.
+ * @return $this Fluent Builder
+ */
+ public function setPhoneNumber(string $phoneNumber): self
+ {
+ $this->options['phoneNumber'] = $phoneNumber;
+ return $this;
+ }
+
+ /**
+ * Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included.
+ *
+ * @param string $origin Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included.
+ * @return $this Fluent Builder
+ */
+ public function setOrigin(string $origin): self
+ {
+ $this->options['origin'] = $origin;
+ return $this;
+ }
+
+ /**
+ * Provide a friendly representation
+ *
+ * @return string Machine friendly representation
+ */
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.CreateTollFreeOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.ReadTollFreeOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/TollFreePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/TollFreePage.php
index 162ec04..d7aa9e6 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/TollFreePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumber/TollFreePage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return TollFreeInstance \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\TollFreeInstance
+ */
+ public function buildInstance(array $payload): TollFreeInstance
{
return new TollFreeInstance($this->version, $payload, $this->solution['accountSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.TollFreePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumberContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumberContext.php
index 7573576..1999294 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumberContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumberContext.php
@@ -2,91 +2,91 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOnList;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+use Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOnList;
+
/**
- * @property \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOnList $assignedAddOns
+ * @property AssignedAddOnList $assignedAddOns
* @method \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOnContext assignedAddOns(string $sid)
*/
class IncomingPhoneNumberContext extends InstanceContext
-{
- protected $_assignedAddOns = null;
+ {
+ protected $_assignedAddOns;
/**
* Initialize the IncomingPhoneNumberContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * to fetch
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumberContext
+ * @param Version $version Version that contains the resource
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
+ * @param string $sid The Twilio-provided string that uniquely identifies the IncomingPhoneNumber resource to delete.
*/
- public function __construct(Version $version, $accountSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $accountSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'sid' => $sid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/IncomingPhoneNumbers/' . \rawurlencode($sid)
+ .'.json';
+ }
+
+ /**
+ * Delete the IncomingPhoneNumberInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/IncomingPhoneNumbers/' . \rawurlencode($sid) . '.json';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Update the IncomingPhoneNumberInstance
+ * Fetch the IncomingPhoneNumberInstance
*
- * @param array|Options $options Optional Arguments
- * @return IncomingPhoneNumberInstance Updated IncomingPhoneNumberInstance
+ * @return IncomingPhoneNumberInstance Fetched IncomingPhoneNumberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): IncomingPhoneNumberInstance
{
- $options = new Values($options);
- $data = Values::of(array(
- 'AccountSid' => $options['accountSid'],
- 'ApiVersion' => $options['apiVersion'],
- 'FriendlyName' => $options['friendlyName'],
- 'SmsApplicationSid' => $options['smsApplicationSid'],
- 'SmsFallbackMethod' => $options['smsFallbackMethod'],
- 'SmsFallbackUrl' => $options['smsFallbackUrl'],
- 'SmsMethod' => $options['smsMethod'],
- 'SmsUrl' => $options['smsUrl'],
- 'StatusCallback' => $options['statusCallback'],
- 'StatusCallbackMethod' => $options['statusCallbackMethod'],
- 'VoiceApplicationSid' => $options['voiceApplicationSid'],
- 'VoiceCallerIdLookup' => Serialize::booleanToString($options['voiceCallerIdLookup']),
- 'VoiceFallbackMethod' => $options['voiceFallbackMethod'],
- 'VoiceFallbackUrl' => $options['voiceFallbackUrl'],
- 'VoiceMethod' => $options['voiceMethod'],
- 'VoiceUrl' => $options['voiceUrl'],
- 'EmergencyStatus' => $options['emergencyStatus'],
- 'EmergencyAddressSid' => $options['emergencyAddressSid'],
- 'TrunkSid' => $options['trunkSid'],
- 'VoiceReceiveMode' => $options['voiceReceiveMode'],
- 'IdentitySid' => $options['identitySid'],
- 'AddressSid' => $options['addressSid'],
- 'BundleSid' => $options['bundleSid'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new IncomingPhoneNumberInstance(
$this->version,
@@ -96,21 +96,70 @@ public function update($options = array())
);
}
+
/**
- * Fetch a IncomingPhoneNumberInstance
+ * Update the IncomingPhoneNumberInstance
*
- * @return IncomingPhoneNumberInstance Fetched IncomingPhoneNumberInstance
+ * @param array|Options $options Optional Arguments
+ * @return IncomingPhoneNumberInstance Updated IncomingPhoneNumberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function update(array $options = []): IncomingPhoneNumberInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $options = new Values($options);
+
+ $data = Values::of([
+ 'AccountSid' =>
+ $options['accountSid'],
+ 'ApiVersion' =>
+ $options['apiVersion'],
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'SmsApplicationSid' =>
+ $options['smsApplicationSid'],
+ 'SmsFallbackMethod' =>
+ $options['smsFallbackMethod'],
+ 'SmsFallbackUrl' =>
+ $options['smsFallbackUrl'],
+ 'SmsMethod' =>
+ $options['smsMethod'],
+ 'SmsUrl' =>
+ $options['smsUrl'],
+ 'StatusCallback' =>
+ $options['statusCallback'],
+ 'StatusCallbackMethod' =>
+ $options['statusCallbackMethod'],
+ 'VoiceApplicationSid' =>
+ $options['voiceApplicationSid'],
+ 'VoiceCallerIdLookup' =>
+ Serialize::booleanToString($options['voiceCallerIdLookup']),
+ 'VoiceFallbackMethod' =>
+ $options['voiceFallbackMethod'],
+ 'VoiceFallbackUrl' =>
+ $options['voiceFallbackUrl'],
+ 'VoiceMethod' =>
+ $options['voiceMethod'],
+ 'VoiceUrl' =>
+ $options['voiceUrl'],
+ 'EmergencyStatus' =>
+ $options['emergencyStatus'],
+ 'EmergencyAddressSid' =>
+ $options['emergencyAddressSid'],
+ 'TrunkSid' =>
+ $options['trunkSid'],
+ 'VoiceReceiveMode' =>
+ $options['voiceReceiveMode'],
+ 'IdentitySid' =>
+ $options['identitySid'],
+ 'AddressSid' =>
+ $options['addressSid'],
+ 'BundleSid' =>
+ $options['bundleSid'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new IncomingPhoneNumberInstance(
$this->version,
@@ -120,23 +169,11 @@ public function fetch()
);
}
- /**
- * Deletes the IncomingPhoneNumberInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Access the assignedAddOns
- *
- * @return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOnList
*/
- protected function getAssignedAddOns()
+ protected function getAssignedAddOns(): AssignedAddOnList
{
if (!$this->_assignedAddOns) {
$this->_assignedAddOns = new AssignedAddOnList(
@@ -153,10 +190,10 @@ protected function getAssignedAddOns()
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -171,10 +208,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -189,12 +226,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.IncomingPhoneNumberContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumberInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumberInstance.php
index 45201f5..bdf4aaa 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumberInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumberInstance.php
@@ -2,78 +2,91 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Base\PhoneNumberCapabilities;
+use Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOnList;
+
/**
- * @property string $accountSid
- * @property string $addressSid
+ * @property string|null $accountSid
+ * @property string|null $addressSid
* @property string $addressRequirements
- * @property string $apiVersion
- * @property bool $beta
- * @property string $capabilities
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $friendlyName
- * @property string $identitySid
- * @property string $phoneNumber
- * @property string $origin
- * @property string $sid
- * @property string $smsApplicationSid
- * @property string $smsFallbackMethod
- * @property string $smsFallbackUrl
- * @property string $smsMethod
- * @property string $smsUrl
- * @property string $statusCallback
- * @property string $statusCallbackMethod
- * @property string $trunkSid
- * @property string $uri
- * @property string $voiceApplicationSid
- * @property bool $voiceCallerIdLookup
- * @property string $voiceFallbackMethod
- * @property string $voiceFallbackUrl
- * @property string $voiceMethod
- * @property string $voiceUrl
+ * @property string|null $apiVersion
+ * @property bool|null $beta
+ * @property PhoneNumberCapabilities|null $capabilities
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $friendlyName
+ * @property string|null $identitySid
+ * @property string|null $phoneNumber
+ * @property string|null $origin
+ * @property string|null $sid
+ * @property string|null $smsApplicationSid
+ * @property string|null $smsFallbackMethod
+ * @property string|null $smsFallbackUrl
+ * @property string|null $smsMethod
+ * @property string|null $smsUrl
+ * @property string|null $statusCallback
+ * @property string|null $statusCallbackMethod
+ * @property string|null $trunkSid
+ * @property string|null $uri
+ * @property string $voiceReceiveMode
+ * @property string|null $voiceApplicationSid
+ * @property bool|null $voiceCallerIdLookup
+ * @property string|null $voiceFallbackMethod
+ * @property string|null $voiceFallbackUrl
+ * @property string|null $voiceMethod
+ * @property string|null $voiceUrl
* @property string $emergencyStatus
- * @property string $emergencyAddressSid
- * @property string $bundleSid
+ * @property string|null $emergencyAddressSid
+ * @property string $emergencyAddressStatus
+ * @property string|null $bundleSid
+ * @property string|null $status
*/
class IncomingPhoneNumberInstance extends InstanceResource
{
- protected $_assignedAddOns = null;
+ protected $_assignedAddOns;
/**
* Initialize the IncomingPhoneNumberInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumberInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
+ * @param string $sid The Twilio-provided string that uniquely identifies the IncomingPhoneNumber resource to delete.
*/
- public function __construct(Version $version, array $payload, $accountSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $accountSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'addressSid' => Values::array_get($payload, 'address_sid'),
'addressRequirements' => Values::array_get($payload, 'address_requirements'),
'apiVersion' => Values::array_get($payload, 'api_version'),
'beta' => Values::array_get($payload, 'beta'),
- 'capabilities' => Values::array_get($payload, 'capabilities'),
+ 'capabilities' => Deserialize::phoneNumberCapabilities(Values::array_get($payload, 'capabilities')),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
@@ -90,6 +103,7 @@ public function __construct(Version $version, array $payload, $accountSid, $sid
'statusCallbackMethod' => Values::array_get($payload, 'status_callback_method'),
'trunkSid' => Values::array_get($payload, 'trunk_sid'),
'uri' => Values::array_get($payload, 'uri'),
+ 'voiceReceiveMode' => Values::array_get($payload, 'voice_receive_mode'),
'voiceApplicationSid' => Values::array_get($payload, 'voice_application_sid'),
'voiceCallerIdLookup' => Values::array_get($payload, 'voice_caller_id_lookup'),
'voiceFallbackMethod' => Values::array_get($payload, 'voice_fallback_method'),
@@ -98,21 +112,21 @@ public function __construct(Version $version, array $payload, $accountSid, $sid
'voiceUrl' => Values::array_get($payload, 'voice_url'),
'emergencyStatus' => Values::array_get($payload, 'emergency_status'),
'emergencyAddressSid' => Values::array_get($payload, 'emergency_address_sid'),
+ 'emergencyAddressStatus' => Values::array_get($payload, 'emergency_address_status'),
'bundleSid' => Values::array_get($payload, 'bundle_sid'),
- );
+ 'status' => Values::array_get($payload, 'status'),
+ ];
- $this->solution = array('accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumberContext Context
- * for this
- * IncomingPhoneNumberInstance
+ * @return IncomingPhoneNumberContext Context for this IncomingPhoneNumberInstance
*/
- protected function proxy()
+ protected function proxy(): IncomingPhoneNumberContext
{
if (!$this->context) {
$this->context = new IncomingPhoneNumberContext(
@@ -126,45 +140,46 @@ protected function proxy()
}
/**
- * Update the IncomingPhoneNumberInstance
+ * Delete the IncomingPhoneNumberInstance
*
- * @param array|Options $options Optional Arguments
- * @return IncomingPhoneNumberInstance Updated IncomingPhoneNumberInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function delete(): bool
{
- return $this->proxy()->update($options);
+
+ return $this->proxy()->delete();
}
/**
- * Fetch a IncomingPhoneNumberInstance
+ * Fetch the IncomingPhoneNumberInstance
*
* @return IncomingPhoneNumberInstance Fetched IncomingPhoneNumberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): IncomingPhoneNumberInstance
{
+
return $this->proxy()->fetch();
}
/**
- * Deletes the IncomingPhoneNumberInstance
+ * Update the IncomingPhoneNumberInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return IncomingPhoneNumberInstance Updated IncomingPhoneNumberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): IncomingPhoneNumberInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->update($options);
}
/**
* Access the assignedAddOns
- *
- * @return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\AssignedAddOnList
*/
- protected function getAssignedAddOns()
+ protected function getAssignedAddOns(): AssignedAddOnList
{
return $this->proxy()->assignedAddOns;
}
@@ -176,7 +191,7 @@ protected function getAssignedAddOns()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -195,12 +210,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.IncomingPhoneNumberInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumberList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumberList.php
index 43c812e..5d75b18 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumberList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumberList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account;
@@ -12,70 +19,124 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\LocalList;
-use Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\MobileList;
-use Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\TollFreeList;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+use Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\TollFreeList;
+use Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\LocalList;
+use Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\MobileList;
+
/**
- * @property \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\LocalList $local
- * @property \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\MobileList $mobile
- * @property \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumber\TollFreeList $tollFree
+ * @property TollFreeList $tollFree
+ * @property LocalList $local
+ * @property MobileList $mobile
*/
class IncomingPhoneNumberList extends ListResource
-{
+ {
+ protected $_tollFree = null;
protected $_local = null;
protected $_mobile = null;
- protected $_tollFree = null;
/**
* Construct the IncomingPhoneNumberList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * @return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumberList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
*/
- public function __construct(Version $version, $accountSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid,);
-
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/IncomingPhoneNumbers.json';
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/IncomingPhoneNumbers.json';
}
/**
- * Streams IncomingPhoneNumberInstance records from the API as a generator
- * stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the IncomingPhoneNumberInstance
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return IncomingPhoneNumberInstance Created IncomingPhoneNumberInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function create(array $options = []): IncomingPhoneNumberInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($options, $limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'ApiVersion' =>
+ $options['apiVersion'],
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'SmsApplicationSid' =>
+ $options['smsApplicationSid'],
+ 'SmsFallbackMethod' =>
+ $options['smsFallbackMethod'],
+ 'SmsFallbackUrl' =>
+ $options['smsFallbackUrl'],
+ 'SmsMethod' =>
+ $options['smsMethod'],
+ 'SmsUrl' =>
+ $options['smsUrl'],
+ 'StatusCallback' =>
+ $options['statusCallback'],
+ 'StatusCallbackMethod' =>
+ $options['statusCallbackMethod'],
+ 'VoiceApplicationSid' =>
+ $options['voiceApplicationSid'],
+ 'VoiceCallerIdLookup' =>
+ Serialize::booleanToString($options['voiceCallerIdLookup']),
+ 'VoiceFallbackMethod' =>
+ $options['voiceFallbackMethod'],
+ 'VoiceFallbackUrl' =>
+ $options['voiceFallbackUrl'],
+ 'VoiceMethod' =>
+ $options['voiceMethod'],
+ 'VoiceUrl' =>
+ $options['voiceUrl'],
+ 'EmergencyStatus' =>
+ $options['emergencyStatus'],
+ 'EmergencyAddressSid' =>
+ $options['emergencyAddressSid'],
+ 'TrunkSid' =>
+ $options['trunkSid'],
+ 'IdentitySid' =>
+ $options['identitySid'],
+ 'AddressSid' =>
+ $options['addressSid'],
+ 'VoiceReceiveMode' =>
+ $options['voiceReceiveMode'],
+ 'BundleSid' =>
+ $options['bundleSid'],
+ 'PhoneNumber' =>
+ $options['phoneNumber'],
+ 'AreaCode' =>
+ $options['areaCode'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new IncomingPhoneNumberInstance(
+ $this->version,
+ $payload,
+ $this->solution['accountSid']
+ );
}
+
/**
* Reads IncomingPhoneNumberInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -92,39 +153,72 @@ public function stream($options = array(), $limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return IncomingPhoneNumberInstance[] Array of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
+ /**
+ * Streams IncomingPhoneNumberInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of IncomingPhoneNumberInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of IncomingPhoneNumberInstance
+ * @return IncomingPhoneNumberPage Page of IncomingPhoneNumberInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): IncomingPhoneNumberPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Beta' => Serialize::booleanToString($options['beta']),
- 'FriendlyName' => $options['friendlyName'],
- 'PhoneNumber' => $options['phoneNumber'],
- 'Origin' => $options['origin'],
+
+ $params = Values::of([
+ 'Beta' =>
+ Serialize::booleanToString($options['beta']),
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'PhoneNumber' =>
+ $options['phoneNumber'],
+ 'Origin' =>
+ $options['origin'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new IncomingPhoneNumberPage($this->version, $response, $this->solution);
}
@@ -134,9 +228,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of IncomingPhoneNumberInstance
+ * @return IncomingPhoneNumberPage Page of IncomingPhoneNumberInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): IncomingPhoneNumberPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -146,101 +240,66 @@ public function getPage($targetUrl)
return new IncomingPhoneNumberPage($this->version, $response, $this->solution);
}
+
/**
- * Create a new IncomingPhoneNumberInstance
+ * Constructs a IncomingPhoneNumberContext
*
- * @param array|Options $options Optional Arguments
- * @return IncomingPhoneNumberInstance Newly created IncomingPhoneNumberInstance
- * @throws TwilioException When an HTTP error occurs.
+ * @param string $sid The Twilio-provided string that uniquely identifies the IncomingPhoneNumber resource to delete.
*/
- public function create($options = array())
+ public function getContext(
+ string $sid
+
+ ): IncomingPhoneNumberContext
{
- $options = new Values($options);
-
- $data = Values::of(array(
- 'PhoneNumber' => $options['phoneNumber'],
- 'AreaCode' => $options['areaCode'],
- 'ApiVersion' => $options['apiVersion'],
- 'FriendlyName' => $options['friendlyName'],
- 'SmsApplicationSid' => $options['smsApplicationSid'],
- 'SmsFallbackMethod' => $options['smsFallbackMethod'],
- 'SmsFallbackUrl' => $options['smsFallbackUrl'],
- 'SmsMethod' => $options['smsMethod'],
- 'SmsUrl' => $options['smsUrl'],
- 'StatusCallback' => $options['statusCallback'],
- 'StatusCallbackMethod' => $options['statusCallbackMethod'],
- 'VoiceApplicationSid' => $options['voiceApplicationSid'],
- 'VoiceCallerIdLookup' => Serialize::booleanToString($options['voiceCallerIdLookup']),
- 'VoiceFallbackMethod' => $options['voiceFallbackMethod'],
- 'VoiceFallbackUrl' => $options['voiceFallbackUrl'],
- 'VoiceMethod' => $options['voiceMethod'],
- 'VoiceUrl' => $options['voiceUrl'],
- 'EmergencyStatus' => $options['emergencyStatus'],
- 'EmergencyAddressSid' => $options['emergencyAddressSid'],
- 'TrunkSid' => $options['trunkSid'],
- 'IdentitySid' => $options['identitySid'],
- 'AddressSid' => $options['addressSid'],
- 'VoiceReceiveMode' => $options['voiceReceiveMode'],
- 'BundleSid' => $options['bundleSid'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ return new IncomingPhoneNumberContext(
+ $this->version,
+ $this->solution['accountSid'],
+ $sid
);
+ }
- return new IncomingPhoneNumberInstance($this->version, $payload, $this->solution['accountSid']);
+ /**
+ * Access the tollFree
+ */
+ protected function getTollFree(): TollFreeList
+ {
+ if (!$this->_tollFree) {
+ $this->_tollFree = new TollFreeList(
+ $this->version,
+ $this->solution['accountSid']
+ );
+ }
+ return $this->_tollFree;
}
/**
* Access the local
*/
- protected function getLocal()
+ protected function getLocal(): LocalList
{
if (!$this->_local) {
- $this->_local = new LocalList($this->version, $this->solution['accountSid']);
+ $this->_local = new LocalList(
+ $this->version,
+ $this->solution['accountSid']
+ );
}
-
return $this->_local;
}
/**
* Access the mobile
*/
- protected function getMobile()
+ protected function getMobile(): MobileList
{
if (!$this->_mobile) {
- $this->_mobile = new MobileList($this->version, $this->solution['accountSid']);
+ $this->_mobile = new MobileList(
+ $this->version,
+ $this->solution['accountSid']
+ );
}
-
return $this->_mobile;
}
- /**
- * Access the tollFree
- */
- protected function getTollFree()
- {
- if (!$this->_tollFree) {
- $this->_tollFree = new TollFreeList($this->version, $this->solution['accountSid']);
- }
-
- return $this->_tollFree;
- }
-
- /**
- * Constructs a IncomingPhoneNumberContext
- *
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumberContext
- */
- public function getContext($sid)
- {
- return new IncomingPhoneNumberContext($this->version, $this->solution['accountSid'], $sid);
- }
-
/**
* Magic getter to lazy load subresources
*
@@ -248,7 +307,7 @@ public function getContext($sid)
* @return \Twilio\ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -263,10 +322,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -281,8 +340,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.IncomingPhoneNumberList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumberOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumberOptions.php
index beeb420..eda5d8f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumberOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumberOptions.php
@@ -1,10 +1,16 @@
options['accountSid'] = $accountSid;
+ /**
+ * @param string $phoneNumber The phone number to purchase specified in [E.164](https://www.twilio.com/docs/glossary/what-e164) format. E.164 phone numbers consist of a + followed by the country code and subscriber number without punctuation characters. For example, +14155551234.
+ * @param string $areaCode The desired area code for your new incoming phone number. Can be any three-digit, US or Canada area code. We will provision an available phone number within this area code for you. **You must provide an `area_code` or a `phone_number`.** (US and Canada only).
+ * @param string $apiVersion The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`.
+ * @param string $friendlyName A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, this is a formatted version of the new phone number.
+ * @param string $smsApplicationSid The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application.
+ * @param string $smsFallbackMethod The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
+ * @param string $smsFallbackUrl The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`.
+ * @param string $smsMethod The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`.
+ * @param string $smsUrl The URL we should call when the new phone number receives an incoming SMS message.
+ * @param string $statusCallback The URL we should call using the `status_callback_method` to send status information to your application.
+ * @param string $statusCallbackMethod The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
+ * @param string $voiceApplicationSid The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa.
+ * @param bool $voiceCallerIdLookup Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`.
+ * @param string $voiceFallbackMethod The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
+ * @param string $voiceFallbackUrl The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`.
+ * @param string $voiceMethod The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`.
+ * @param string $voiceUrl The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set.
+ * @param string $emergencyStatus
+ * @param string $emergencyAddressSid The SID of the emergency address configuration to use for emergency calling from the new phone number.
+ * @param string $trunkSid The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa.
+ * @param string $identitySid The SID of the Identity resource that we should associate with the new phone number. Some regions require an identity to meet local regulations.
+ * @param string $addressSid The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations.
+ * @param string $voiceReceiveMode
+ * @param string $bundleSid The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations.
+ */
+ public function __construct(
+
+ string $phoneNumber = Values::NONE,
+ string $areaCode = Values::NONE,
+ string $apiVersion = Values::NONE,
+ string $friendlyName = Values::NONE,
+ string $smsApplicationSid = Values::NONE,
+ string $smsFallbackMethod = Values::NONE,
+ string $smsFallbackUrl = Values::NONE,
+ string $smsMethod = Values::NONE,
+ string $smsUrl = Values::NONE,
+ string $statusCallback = Values::NONE,
+ string $statusCallbackMethod = Values::NONE,
+ string $voiceApplicationSid = Values::NONE,
+ bool $voiceCallerIdLookup = Values::BOOL_NONE,
+ string $voiceFallbackMethod = Values::NONE,
+ string $voiceFallbackUrl = Values::NONE,
+ string $voiceMethod = Values::NONE,
+ string $voiceUrl = Values::NONE,
+ string $emergencyStatus = Values::NONE,
+ string $emergencyAddressSid = Values::NONE,
+ string $trunkSid = Values::NONE,
+ string $identitySid = Values::NONE,
+ string $addressSid = Values::NONE,
+ string $voiceReceiveMode = Values::NONE,
+ string $bundleSid = Values::NONE
+
+ ) {
+ $this->options['phoneNumber'] = $phoneNumber;
+ $this->options['areaCode'] = $areaCode;
$this->options['apiVersion'] = $apiVersion;
$this->options['friendlyName'] = $friendlyName;
$this->options['smsApplicationSid'] = $smsApplicationSid;
@@ -189,58 +289,67 @@ public function __construct($accountSid = Values::NONE, $apiVersion = Values::NO
$this->options['emergencyStatus'] = $emergencyStatus;
$this->options['emergencyAddressSid'] = $emergencyAddressSid;
$this->options['trunkSid'] = $trunkSid;
- $this->options['voiceReceiveMode'] = $voiceReceiveMode;
$this->options['identitySid'] = $identitySid;
$this->options['addressSid'] = $addressSid;
+ $this->options['voiceReceiveMode'] = $voiceReceiveMode;
$this->options['bundleSid'] = $bundleSid;
}
/**
- * The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IncomingPhoneNumber resource to update. For more information, see [Exchanging Numbers Between Subaccounts](https://www.twilio.com/docs/iam/api/subaccounts#exchanging-numbers).
+ * The phone number to purchase specified in [E.164](https://www.twilio.com/docs/glossary/what-e164) format. E.164 phone numbers consist of a + followed by the country code and subscriber number without punctuation characters. For example, +14155551234.
*
- * @param string $accountSid The SID of the Account that created the resource
- * to update
+ * @param string $phoneNumber The phone number to purchase specified in [E.164](https://www.twilio.com/docs/glossary/what-e164) format. E.164 phone numbers consist of a + followed by the country code and subscriber number without punctuation characters. For example, +14155551234.
* @return $this Fluent Builder
*/
- public function setAccountSid($accountSid)
+ public function setPhoneNumber(string $phoneNumber): self
{
- $this->options['accountSid'] = $accountSid;
+ $this->options['phoneNumber'] = $phoneNumber;
return $this;
}
/**
- * The API version to use for incoming calls made to the phone number. The default is `2010-04-01`.
+ * The desired area code for your new incoming phone number. Can be any three-digit, US or Canada area code. We will provision an available phone number within this area code for you. **You must provide an `area_code` or a `phone_number`.** (US and Canada only).
*
- * @param string $apiVersion The API version to use for incoming calls made to
- * the phone number
+ * @param string $areaCode The desired area code for your new incoming phone number. Can be any three-digit, US or Canada area code. We will provision an available phone number within this area code for you. **You must provide an `area_code` or a `phone_number`.** (US and Canada only).
* @return $this Fluent Builder
*/
- public function setApiVersion($apiVersion)
+ public function setAreaCode(string $areaCode): self
+ {
+ $this->options['areaCode'] = $areaCode;
+ return $this;
+ }
+
+ /**
+ * The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`.
+ *
+ * @param string $apiVersion The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`.
+ * @return $this Fluent Builder
+ */
+ public function setApiVersion(string $apiVersion): self
{
$this->options['apiVersion'] = $apiVersion;
return $this;
}
/**
- * A descriptive string that you created to describe this phone number. It can be up to 64 characters long. By default, this is a formatted version of the phone number.
+ * A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, this is a formatted version of the new phone number.
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, this is a formatted version of the new phone number.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
}
/**
- * The SID of the application that should handle SMS messages sent to the number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application.
+ * The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application.
*
- * @param string $smsApplicationSid Unique string that identifies the
- * application
+ * @param string $smsApplicationSid The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application.
* @return $this Fluent Builder
*/
- public function setSmsApplicationSid($smsApplicationSid)
+ public function setSmsApplicationSid(string $smsApplicationSid): self
{
$this->options['smsApplicationSid'] = $smsApplicationSid;
return $this;
@@ -249,10 +358,10 @@ public function setSmsApplicationSid($smsApplicationSid)
/**
* The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
*
- * @param string $smsFallbackMethod HTTP method used with sms_fallback_url
+ * @param string $smsFallbackMethod The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
* @return $this Fluent Builder
*/
- public function setSmsFallbackMethod($smsFallbackMethod)
+ public function setSmsFallbackMethod(string $smsFallbackMethod): self
{
$this->options['smsFallbackMethod'] = $smsFallbackMethod;
return $this;
@@ -261,11 +370,10 @@ public function setSmsFallbackMethod($smsFallbackMethod)
/**
* The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`.
*
- * @param string $smsFallbackUrl The URL we call when an error occurs while
- * executing TwiML
+ * @param string $smsFallbackUrl The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`.
* @return $this Fluent Builder
*/
- public function setSmsFallbackUrl($smsFallbackUrl)
+ public function setSmsFallbackUrl(string $smsFallbackUrl): self
{
$this->options['smsFallbackUrl'] = $smsFallbackUrl;
return $this;
@@ -274,23 +382,22 @@ public function setSmsFallbackUrl($smsFallbackUrl)
/**
* The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`.
*
- * @param string $smsMethod The HTTP method to use with sms_url
+ * @param string $smsMethod The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`.
* @return $this Fluent Builder
*/
- public function setSmsMethod($smsMethod)
+ public function setSmsMethod(string $smsMethod): self
{
$this->options['smsMethod'] = $smsMethod;
return $this;
}
/**
- * The URL we should call when the phone number receives an incoming SMS message.
+ * The URL we should call when the new phone number receives an incoming SMS message.
*
- * @param string $smsUrl The URL we should call when the phone number receives
- * an incoming SMS message
+ * @param string $smsUrl The URL we should call when the new phone number receives an incoming SMS message.
* @return $this Fluent Builder
*/
- public function setSmsUrl($smsUrl)
+ public function setSmsUrl(string $smsUrl): self
{
$this->options['smsUrl'] = $smsUrl;
return $this;
@@ -299,11 +406,10 @@ public function setSmsUrl($smsUrl)
/**
* The URL we should call using the `status_callback_method` to send status information to your application.
*
- * @param string $statusCallback The URL we should call to send status
- * information to your application
+ * @param string $statusCallback The URL we should call using the `status_callback_method` to send status information to your application.
* @return $this Fluent Builder
*/
- public function setStatusCallback($statusCallback)
+ public function setStatusCallback(string $statusCallback): self
{
$this->options['statusCallback'] = $statusCallback;
return $this;
@@ -312,24 +418,22 @@ public function setStatusCallback($statusCallback)
/**
* The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
*
- * @param string $statusCallbackMethod The HTTP method we should use to call
- * status_callback
+ * @param string $statusCallbackMethod The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
* @return $this Fluent Builder
*/
- public function setStatusCallbackMethod($statusCallbackMethod)
+ public function setStatusCallbackMethod(string $statusCallbackMethod): self
{
$this->options['statusCallbackMethod'] = $statusCallbackMethod;
return $this;
}
/**
- * The SID of the application we should use to handle phone calls to the phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa.
+ * The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa.
*
- * @param string $voiceApplicationSid The SID of the application to handle the
- * phone number
+ * @param string $voiceApplicationSid The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa.
* @return $this Fluent Builder
*/
- public function setVoiceApplicationSid($voiceApplicationSid)
+ public function setVoiceApplicationSid(string $voiceApplicationSid): self
{
$this->options['voiceApplicationSid'] = $voiceApplicationSid;
return $this;
@@ -338,10 +442,10 @@ public function setVoiceApplicationSid($voiceApplicationSid)
/**
* Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`.
*
- * @param bool $voiceCallerIdLookup Whether to lookup the caller's name
+ * @param bool $voiceCallerIdLookup Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`.
* @return $this Fluent Builder
*/
- public function setVoiceCallerIdLookup($voiceCallerIdLookup)
+ public function setVoiceCallerIdLookup(bool $voiceCallerIdLookup): self
{
$this->options['voiceCallerIdLookup'] = $voiceCallerIdLookup;
return $this;
@@ -350,10 +454,10 @@ public function setVoiceCallerIdLookup($voiceCallerIdLookup)
/**
* The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
*
- * @param string $voiceFallbackMethod The HTTP method used with fallback_url
+ * @param string $voiceFallbackMethod The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
* @return $this Fluent Builder
*/
- public function setVoiceFallbackMethod($voiceFallbackMethod)
+ public function setVoiceFallbackMethod(string $voiceFallbackMethod): self
{
$this->options['voiceFallbackMethod'] = $voiceFallbackMethod;
return $this;
@@ -362,11 +466,10 @@ public function setVoiceFallbackMethod($voiceFallbackMethod)
/**
* The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`.
*
- * @param string $voiceFallbackUrl The URL we will call when an error occurs in
- * TwiML
+ * @param string $voiceFallbackUrl The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`.
* @return $this Fluent Builder
*/
- public function setVoiceFallbackUrl($voiceFallbackUrl)
+ public function setVoiceFallbackUrl(string $voiceFallbackUrl): self
{
$this->options['voiceFallbackUrl'] = $voiceFallbackUrl;
return $this;
@@ -375,113 +478,102 @@ public function setVoiceFallbackUrl($voiceFallbackUrl)
/**
* The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`.
*
- * @param string $voiceMethod The HTTP method used with the voice_url
+ * @param string $voiceMethod The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`.
* @return $this Fluent Builder
*/
- public function setVoiceMethod($voiceMethod)
+ public function setVoiceMethod(string $voiceMethod): self
{
$this->options['voiceMethod'] = $voiceMethod;
return $this;
}
/**
- * The URL that we should call to answer a call to the phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set.
+ * The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set.
*
- * @param string $voiceUrl The URL we should call when the phone number
- * receives a call
+ * @param string $voiceUrl The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set.
* @return $this Fluent Builder
*/
- public function setVoiceUrl($voiceUrl)
+ public function setVoiceUrl(string $voiceUrl): self
{
$this->options['voiceUrl'] = $voiceUrl;
return $this;
}
/**
- * The configuration status parameter that determines whether the phone number is enabled for emergency calling.
- *
- * @param string $emergencyStatus Whether the phone number is enabled for
- * emergency calling
+ * @param string $emergencyStatus
* @return $this Fluent Builder
*/
- public function setEmergencyStatus($emergencyStatus)
+ public function setEmergencyStatus(string $emergencyStatus): self
{
$this->options['emergencyStatus'] = $emergencyStatus;
return $this;
}
/**
- * The SID of the emergency address configuration to use for emergency calling from this phone number.
+ * The SID of the emergency address configuration to use for emergency calling from the new phone number.
*
- * @param string $emergencyAddressSid The emergency address configuration to
- * use for emergency calling
+ * @param string $emergencyAddressSid The SID of the emergency address configuration to use for emergency calling from the new phone number.
* @return $this Fluent Builder
*/
- public function setEmergencyAddressSid($emergencyAddressSid)
+ public function setEmergencyAddressSid(string $emergencyAddressSid): self
{
$this->options['emergencyAddressSid'] = $emergencyAddressSid;
return $this;
}
/**
- * The SID of the Trunk we should use to handle phone calls to the phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa.
+ * The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa.
*
- * @param string $trunkSid SID of the trunk to handle phone calls to the phone
- * number
+ * @param string $trunkSid The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa.
* @return $this Fluent Builder
*/
- public function setTrunkSid($trunkSid)
+ public function setTrunkSid(string $trunkSid): self
{
$this->options['trunkSid'] = $trunkSid;
return $this;
}
/**
- * The configuration parameter for the phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`.
+ * The SID of the Identity resource that we should associate with the new phone number. Some regions require an identity to meet local regulations.
*
- * @param string $voiceReceiveMode Incoming call type: fax or voice
+ * @param string $identitySid The SID of the Identity resource that we should associate with the new phone number. Some regions require an identity to meet local regulations.
* @return $this Fluent Builder
*/
- public function setVoiceReceiveMode($voiceReceiveMode)
+ public function setIdentitySid(string $identitySid): self
{
- $this->options['voiceReceiveMode'] = $voiceReceiveMode;
+ $this->options['identitySid'] = $identitySid;
return $this;
}
/**
- * The SID of the Identity resource that we should associate with the phone number. Some regions require an identity to meet local regulations.
+ * The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations.
*
- * @param string $identitySid Unique string that identifies the identity
- * associated with number
+ * @param string $addressSid The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations.
* @return $this Fluent Builder
*/
- public function setIdentitySid($identitySid)
+ public function setAddressSid(string $addressSid): self
{
- $this->options['identitySid'] = $identitySid;
+ $this->options['addressSid'] = $addressSid;
return $this;
}
/**
- * The SID of the Address resource we should associate with the phone number. Some regions require addresses to meet local regulations.
- *
- * @param string $addressSid The SID of the Address resource associated with
- * the phone number
+ * @param string $voiceReceiveMode
* @return $this Fluent Builder
*/
- public function setAddressSid($addressSid)
+ public function setVoiceReceiveMode(string $voiceReceiveMode): self
{
- $this->options['addressSid'] = $addressSid;
+ $this->options['voiceReceiveMode'] = $voiceReceiveMode;
return $this;
}
/**
* The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations.
*
- * @param string $bundleSid The SID of the Bundle resource associated with
- * number
+ * @param string $bundleSid The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations.
* @return $this Fluent Builder
*/
- public function setBundleSid($bundleSid)
+ public function setBundleSid(string $bundleSid): self
{
$this->options['bundleSid'] = $bundleSid;
return $this;
@@ -492,31 +584,31 @@ public function setBundleSid($bundleSid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.UpdateIncomingPhoneNumberOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.CreateIncomingPhoneNumberOptions ' . $options . ']';
}
}
+
+
class ReadIncomingPhoneNumberOptions extends Options
-{
+ {
/**
- * @param bool $beta Whether to include new phone numbers
- * @param string $friendlyName A string that identifies the IncomingPhoneNumber
- * resources to read
- * @param string $phoneNumber The phone numbers of the IncomingPhoneNumber
- * resources to read
- * @param string $origin Include phone numbers based on their origin. By
- * default, phone numbers of all origin are included.
+ * @param bool $beta Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
+ * @param string $friendlyName A string that identifies the IncomingPhoneNumber resources to read.
+ * @param string $phoneNumber The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit.
+ * @param string $origin Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included.
*/
- public function __construct($beta = Values::NONE, $friendlyName = Values::NONE, $phoneNumber = Values::NONE, $origin = Values::NONE)
- {
+ public function __construct(
+
+ bool $beta = Values::BOOL_NONE,
+ string $friendlyName = Values::NONE,
+ string $phoneNumber = Values::NONE,
+ string $origin = Values::NONE
+
+ ) {
$this->options['beta'] = $beta;
$this->options['friendlyName'] = $friendlyName;
$this->options['phoneNumber'] = $phoneNumber;
@@ -526,10 +618,10 @@ public function __construct($beta = Values::NONE, $friendlyName = Values::NONE,
/**
* Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
*
- * @param bool $beta Whether to include new phone numbers
+ * @param bool $beta Whether to include phone numbers new to the Twilio platform. Can be: `true` or `false` and the default is `true`.
* @return $this Fluent Builder
*/
- public function setBeta($beta)
+ public function setBeta(bool $beta): self
{
$this->options['beta'] = $beta;
return $this;
@@ -538,11 +630,10 @@ public function setBeta($beta)
/**
* A string that identifies the IncomingPhoneNumber resources to read.
*
- * @param string $friendlyName A string that identifies the IncomingPhoneNumber
- * resources to read
+ * @param string $friendlyName A string that identifies the IncomingPhoneNumber resources to read.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -551,11 +642,10 @@ public function setFriendlyName($friendlyName)
/**
* The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit.
*
- * @param string $phoneNumber The phone numbers of the IncomingPhoneNumber
- * resources to read
+ * @param string $phoneNumber The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit.
* @return $this Fluent Builder
*/
- public function setPhoneNumber($phoneNumber)
+ public function setPhoneNumber(string $phoneNumber): self
{
$this->options['phoneNumber'] = $phoneNumber;
return $this;
@@ -564,11 +654,10 @@ public function setPhoneNumber($phoneNumber)
/**
* Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included.
*
- * @param string $origin Include phone numbers based on their origin. By
- * default, phone numbers of all origin are included.
+ * @param string $origin Whether to include phone numbers based on their origin. Can be: `twilio` or `hosted`. By default, phone numbers of all origin are included.
* @return $this Fluent Builder
*/
- public function setOrigin($origin)
+ public function setOrigin(string $origin): self
{
$this->options['origin'] = $origin;
return $this;
@@ -579,66 +668,68 @@ public function setOrigin($origin)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.ReadIncomingPhoneNumberOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.ReadIncomingPhoneNumberOptions ' . $options . ']';
}
}
-class CreateIncomingPhoneNumberOptions extends Options
-{
- /**
- * @param string $phoneNumber The phone number to purchase in E.164 format
- * @param string $areaCode The desired area code for the new phone number
- * @param string $apiVersion The API version to use for incoming calls made to
- * the new phone number
- * @param string $friendlyName A string to describe the new phone number
- * @param string $smsApplicationSid The SID of the application to handle SMS
- * messages
- * @param string $smsFallbackMethod HTTP method used with sms_fallback_url
- * @param string $smsFallbackUrl The URL we call when an error occurs while
- * executing TwiML
- * @param string $smsMethod The HTTP method to use with sms url
- * @param string $smsUrl The URL we should call when the new phone number
- * receives an incoming SMS message
- * @param string $statusCallback The URL we should call to send status
- * information to your application
- * @param string $statusCallbackMethod HTTP method we should use to call
- * status_callback
- * @param string $voiceApplicationSid The SID of the application to handle the
- * new phone number
- * @param bool $voiceCallerIdLookup Whether to lookup the caller's name
- * @param string $voiceFallbackMethod The HTTP method used with
- * voice_fallback_url
- * @param string $voiceFallbackUrl The URL we will call when an error occurs in
- * TwiML
- * @param string $voiceMethod The HTTP method used with the voice_url
- * @param string $voiceUrl The URL we should call when the phone number
- * receives a call
- * @param string $emergencyStatus Status determining whether the new phone
- * number is enabled for emergency calling
- * @param string $emergencyAddressSid The emergency address configuration to
- * use for emergency calling
- * @param string $trunkSid SID of the trunk to handle calls to the new phone
- * number
- * @param string $identitySid The SID of the Identity resource to associate
- * with the new phone number
- * @param string $addressSid The SID of the Address resource associated with
- * the phone number
- * @param string $voiceReceiveMode Incoming call type: fax or voice
- * @param string $bundleSid The SID of the Bundle resource associated with
- * number
- */
- public function __construct($phoneNumber = Values::NONE, $areaCode = Values::NONE, $apiVersion = Values::NONE, $friendlyName = Values::NONE, $smsApplicationSid = Values::NONE, $smsFallbackMethod = Values::NONE, $smsFallbackUrl = Values::NONE, $smsMethod = Values::NONE, $smsUrl = Values::NONE, $statusCallback = Values::NONE, $statusCallbackMethod = Values::NONE, $voiceApplicationSid = Values::NONE, $voiceCallerIdLookup = Values::NONE, $voiceFallbackMethod = Values::NONE, $voiceFallbackUrl = Values::NONE, $voiceMethod = Values::NONE, $voiceUrl = Values::NONE, $emergencyStatus = Values::NONE, $emergencyAddressSid = Values::NONE, $trunkSid = Values::NONE, $identitySid = Values::NONE, $addressSid = Values::NONE, $voiceReceiveMode = Values::NONE, $bundleSid = Values::NONE)
+class UpdateIncomingPhoneNumberOptions extends Options
{
- $this->options['phoneNumber'] = $phoneNumber;
- $this->options['areaCode'] = $areaCode;
+ /**
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IncomingPhoneNumber resource to update. For more information, see [Exchanging Numbers Between Subaccounts](https://www.twilio.com/docs/iam/api/subaccounts#exchanging-numbers).
+ * @param string $apiVersion The API version to use for incoming calls made to the phone number. The default is `2010-04-01`.
+ * @param string $friendlyName A descriptive string that you created to describe this phone number. It can be up to 64 characters long. By default, this is a formatted version of the phone number.
+ * @param string $smsApplicationSid The SID of the application that should handle SMS messages sent to the number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application.
+ * @param string $smsFallbackMethod The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
+ * @param string $smsFallbackUrl The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`.
+ * @param string $smsMethod The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`.
+ * @param string $smsUrl The URL we should call when the phone number receives an incoming SMS message.
+ * @param string $statusCallback The URL we should call using the `status_callback_method` to send status information to your application.
+ * @param string $statusCallbackMethod The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
+ * @param string $voiceApplicationSid The SID of the application we should use to handle phone calls to the phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa.
+ * @param bool $voiceCallerIdLookup Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`.
+ * @param string $voiceFallbackMethod The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
+ * @param string $voiceFallbackUrl The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`.
+ * @param string $voiceMethod The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`.
+ * @param string $voiceUrl The URL that we should call to answer a call to the phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set.
+ * @param string $emergencyStatus
+ * @param string $emergencyAddressSid The SID of the emergency address configuration to use for emergency calling from this phone number.
+ * @param string $trunkSid The SID of the Trunk we should use to handle phone calls to the phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa.
+ * @param string $voiceReceiveMode
+ * @param string $identitySid The SID of the Identity resource that we should associate with the phone number. Some regions require an identity to meet local regulations.
+ * @param string $addressSid The SID of the Address resource we should associate with the phone number. Some regions require addresses to meet local regulations.
+ * @param string $bundleSid The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations.
+ */
+ public function __construct(
+
+ string $accountSid = Values::NONE,
+ string $apiVersion = Values::NONE,
+ string $friendlyName = Values::NONE,
+ string $smsApplicationSid = Values::NONE,
+ string $smsFallbackMethod = Values::NONE,
+ string $smsFallbackUrl = Values::NONE,
+ string $smsMethod = Values::NONE,
+ string $smsUrl = Values::NONE,
+ string $statusCallback = Values::NONE,
+ string $statusCallbackMethod = Values::NONE,
+ string $voiceApplicationSid = Values::NONE,
+ bool $voiceCallerIdLookup = Values::BOOL_NONE,
+ string $voiceFallbackMethod = Values::NONE,
+ string $voiceFallbackUrl = Values::NONE,
+ string $voiceMethod = Values::NONE,
+ string $voiceUrl = Values::NONE,
+ string $emergencyStatus = Values::NONE,
+ string $emergencyAddressSid = Values::NONE,
+ string $trunkSid = Values::NONE,
+ string $voiceReceiveMode = Values::NONE,
+ string $identitySid = Values::NONE,
+ string $addressSid = Values::NONE,
+ string $bundleSid = Values::NONE
+
+ ) {
+ $this->options['accountSid'] = $accountSid;
$this->options['apiVersion'] = $apiVersion;
$this->options['friendlyName'] = $friendlyName;
$this->options['smsApplicationSid'] = $smsApplicationSid;
@@ -657,69 +748,55 @@ public function __construct($phoneNumber = Values::NONE, $areaCode = Values::NON
$this->options['emergencyStatus'] = $emergencyStatus;
$this->options['emergencyAddressSid'] = $emergencyAddressSid;
$this->options['trunkSid'] = $trunkSid;
+ $this->options['voiceReceiveMode'] = $voiceReceiveMode;
$this->options['identitySid'] = $identitySid;
$this->options['addressSid'] = $addressSid;
- $this->options['voiceReceiveMode'] = $voiceReceiveMode;
$this->options['bundleSid'] = $bundleSid;
}
/**
- * The phone number to purchase specified in [E.164](https://www.twilio.com/docs/glossary/what-e164) format. E.164 phone numbers consist of a + followed by the country code and subscriber number without punctuation characters. For example, +14155551234.
- *
- * @param string $phoneNumber The phone number to purchase in E.164 format
- * @return $this Fluent Builder
- */
- public function setPhoneNumber($phoneNumber)
- {
- $this->options['phoneNumber'] = $phoneNumber;
- return $this;
- }
-
- /**
- * The desired area code for your new incoming phone number. Can be any three-digit, US or Canada area code. We will provision an available phone number within this area code for you. **You must provide an `area_code` or a `phone_number`.** (US and Canada only).
+ * The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IncomingPhoneNumber resource to update. For more information, see [Exchanging Numbers Between Subaccounts](https://www.twilio.com/docs/iam/api/subaccounts#exchanging-numbers).
*
- * @param string $areaCode The desired area code for the new phone number
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the IncomingPhoneNumber resource to update. For more information, see [Exchanging Numbers Between Subaccounts](https://www.twilio.com/docs/iam/api/subaccounts#exchanging-numbers).
* @return $this Fluent Builder
*/
- public function setAreaCode($areaCode)
+ public function setAccountSid(string $accountSid): self
{
- $this->options['areaCode'] = $areaCode;
+ $this->options['accountSid'] = $accountSid;
return $this;
}
/**
- * The API version to use for incoming calls made to the new phone number. The default is `2010-04-01`.
+ * The API version to use for incoming calls made to the phone number. The default is `2010-04-01`.
*
- * @param string $apiVersion The API version to use for incoming calls made to
- * the new phone number
+ * @param string $apiVersion The API version to use for incoming calls made to the phone number. The default is `2010-04-01`.
* @return $this Fluent Builder
*/
- public function setApiVersion($apiVersion)
+ public function setApiVersion(string $apiVersion): self
{
$this->options['apiVersion'] = $apiVersion;
return $this;
}
/**
- * A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, this is a formatted version of the new phone number.
+ * A descriptive string that you created to describe this phone number. It can be up to 64 characters long. By default, this is a formatted version of the phone number.
*
- * @param string $friendlyName A string to describe the new phone number
+ * @param string $friendlyName A descriptive string that you created to describe this phone number. It can be up to 64 characters long. By default, this is a formatted version of the phone number.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
}
/**
- * The SID of the application that should handle SMS messages sent to the new phone number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application.
+ * The SID of the application that should handle SMS messages sent to the number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application.
*
- * @param string $smsApplicationSid The SID of the application to handle SMS
- * messages
+ * @param string $smsApplicationSid The SID of the application that should handle SMS messages sent to the number. If an `sms_application_sid` is present, we ignore all of the `sms_*_url` urls and use those set on the application.
* @return $this Fluent Builder
*/
- public function setSmsApplicationSid($smsApplicationSid)
+ public function setSmsApplicationSid(string $smsApplicationSid): self
{
$this->options['smsApplicationSid'] = $smsApplicationSid;
return $this;
@@ -728,10 +805,10 @@ public function setSmsApplicationSid($smsApplicationSid)
/**
* The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
*
- * @param string $smsFallbackMethod HTTP method used with sms_fallback_url
+ * @param string $smsFallbackMethod The HTTP method that we should use to call `sms_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
* @return $this Fluent Builder
*/
- public function setSmsFallbackMethod($smsFallbackMethod)
+ public function setSmsFallbackMethod(string $smsFallbackMethod): self
{
$this->options['smsFallbackMethod'] = $smsFallbackMethod;
return $this;
@@ -740,11 +817,10 @@ public function setSmsFallbackMethod($smsFallbackMethod)
/**
* The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`.
*
- * @param string $smsFallbackUrl The URL we call when an error occurs while
- * executing TwiML
+ * @param string $smsFallbackUrl The URL that we should call when an error occurs while requesting or executing the TwiML defined by `sms_url`.
* @return $this Fluent Builder
*/
- public function setSmsFallbackUrl($smsFallbackUrl)
+ public function setSmsFallbackUrl(string $smsFallbackUrl): self
{
$this->options['smsFallbackUrl'] = $smsFallbackUrl;
return $this;
@@ -753,23 +829,22 @@ public function setSmsFallbackUrl($smsFallbackUrl)
/**
* The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`.
*
- * @param string $smsMethod The HTTP method to use with sms url
+ * @param string $smsMethod The HTTP method that we should use to call `sms_url`. Can be: `GET` or `POST` and defaults to `POST`.
* @return $this Fluent Builder
*/
- public function setSmsMethod($smsMethod)
+ public function setSmsMethod(string $smsMethod): self
{
$this->options['smsMethod'] = $smsMethod;
return $this;
}
/**
- * The URL we should call when the new phone number receives an incoming SMS message.
+ * The URL we should call when the phone number receives an incoming SMS message.
*
- * @param string $smsUrl The URL we should call when the new phone number
- * receives an incoming SMS message
+ * @param string $smsUrl The URL we should call when the phone number receives an incoming SMS message.
* @return $this Fluent Builder
*/
- public function setSmsUrl($smsUrl)
+ public function setSmsUrl(string $smsUrl): self
{
$this->options['smsUrl'] = $smsUrl;
return $this;
@@ -778,11 +853,10 @@ public function setSmsUrl($smsUrl)
/**
* The URL we should call using the `status_callback_method` to send status information to your application.
*
- * @param string $statusCallback The URL we should call to send status
- * information to your application
+ * @param string $statusCallback The URL we should call using the `status_callback_method` to send status information to your application.
* @return $this Fluent Builder
*/
- public function setStatusCallback($statusCallback)
+ public function setStatusCallback(string $statusCallback): self
{
$this->options['statusCallback'] = $statusCallback;
return $this;
@@ -791,24 +865,22 @@ public function setStatusCallback($statusCallback)
/**
* The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
*
- * @param string $statusCallbackMethod HTTP method we should use to call
- * status_callback
+ * @param string $statusCallbackMethod The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
* @return $this Fluent Builder
*/
- public function setStatusCallbackMethod($statusCallbackMethod)
+ public function setStatusCallbackMethod(string $statusCallbackMethod): self
{
$this->options['statusCallbackMethod'] = $statusCallbackMethod;
return $this;
}
/**
- * The SID of the application we should use to handle calls to the new phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa.
+ * The SID of the application we should use to handle phone calls to the phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa.
*
- * @param string $voiceApplicationSid The SID of the application to handle the
- * new phone number
+ * @param string $voiceApplicationSid The SID of the application we should use to handle phone calls to the phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use only those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa.
* @return $this Fluent Builder
*/
- public function setVoiceApplicationSid($voiceApplicationSid)
+ public function setVoiceApplicationSid(string $voiceApplicationSid): self
{
$this->options['voiceApplicationSid'] = $voiceApplicationSid;
return $this;
@@ -817,10 +889,10 @@ public function setVoiceApplicationSid($voiceApplicationSid)
/**
* Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`.
*
- * @param bool $voiceCallerIdLookup Whether to lookup the caller's name
+ * @param bool $voiceCallerIdLookup Whether to lookup the caller's name from the CNAM database and post it to your app. Can be: `true` or `false` and defaults to `false`.
* @return $this Fluent Builder
*/
- public function setVoiceCallerIdLookup($voiceCallerIdLookup)
+ public function setVoiceCallerIdLookup(bool $voiceCallerIdLookup): self
{
$this->options['voiceCallerIdLookup'] = $voiceCallerIdLookup;
return $this;
@@ -829,11 +901,10 @@ public function setVoiceCallerIdLookup($voiceCallerIdLookup)
/**
* The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
*
- * @param string $voiceFallbackMethod The HTTP method used with
- * voice_fallback_url
+ * @param string $voiceFallbackMethod The HTTP method that we should use to call `voice_fallback_url`. Can be: `GET` or `POST` and defaults to `POST`.
* @return $this Fluent Builder
*/
- public function setVoiceFallbackMethod($voiceFallbackMethod)
+ public function setVoiceFallbackMethod(string $voiceFallbackMethod): self
{
$this->options['voiceFallbackMethod'] = $voiceFallbackMethod;
return $this;
@@ -842,11 +913,10 @@ public function setVoiceFallbackMethod($voiceFallbackMethod)
/**
* The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`.
*
- * @param string $voiceFallbackUrl The URL we will call when an error occurs in
- * TwiML
+ * @param string $voiceFallbackUrl The URL that we should call when an error occurs retrieving or executing the TwiML requested by `url`.
* @return $this Fluent Builder
*/
- public function setVoiceFallbackUrl($voiceFallbackUrl)
+ public function setVoiceFallbackUrl(string $voiceFallbackUrl): self
{
$this->options['voiceFallbackUrl'] = $voiceFallbackUrl;
return $this;
@@ -855,113 +925,102 @@ public function setVoiceFallbackUrl($voiceFallbackUrl)
/**
* The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`.
*
- * @param string $voiceMethod The HTTP method used with the voice_url
+ * @param string $voiceMethod The HTTP method that we should use to call `voice_url`. Can be: `GET` or `POST` and defaults to `POST`.
* @return $this Fluent Builder
*/
- public function setVoiceMethod($voiceMethod)
+ public function setVoiceMethod(string $voiceMethod): self
{
$this->options['voiceMethod'] = $voiceMethod;
return $this;
}
/**
- * The URL that we should call to answer a call to the new phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set.
+ * The URL that we should call to answer a call to the phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set.
*
- * @param string $voiceUrl The URL we should call when the phone number
- * receives a call
+ * @param string $voiceUrl The URL that we should call to answer a call to the phone number. The `voice_url` will not be called if a `voice_application_sid` or a `trunk_sid` is set.
* @return $this Fluent Builder
*/
- public function setVoiceUrl($voiceUrl)
+ public function setVoiceUrl(string $voiceUrl): self
{
$this->options['voiceUrl'] = $voiceUrl;
return $this;
}
/**
- * The configuration status parameter that determines whether the new phone number is enabled for emergency calling.
- *
- * @param string $emergencyStatus Status determining whether the new phone
- * number is enabled for emergency calling
+ * @param string $emergencyStatus
* @return $this Fluent Builder
*/
- public function setEmergencyStatus($emergencyStatus)
+ public function setEmergencyStatus(string $emergencyStatus): self
{
$this->options['emergencyStatus'] = $emergencyStatus;
return $this;
}
/**
- * The SID of the emergency address configuration to use for emergency calling from the new phone number.
+ * The SID of the emergency address configuration to use for emergency calling from this phone number.
*
- * @param string $emergencyAddressSid The emergency address configuration to
- * use for emergency calling
+ * @param string $emergencyAddressSid The SID of the emergency address configuration to use for emergency calling from this phone number.
* @return $this Fluent Builder
*/
- public function setEmergencyAddressSid($emergencyAddressSid)
+ public function setEmergencyAddressSid(string $emergencyAddressSid): self
{
$this->options['emergencyAddressSid'] = $emergencyAddressSid;
return $this;
}
/**
- * The SID of the Trunk we should use to handle calls to the new phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa.
+ * The SID of the Trunk we should use to handle phone calls to the phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa.
*
- * @param string $trunkSid SID of the trunk to handle calls to the new phone
- * number
+ * @param string $trunkSid The SID of the Trunk we should use to handle phone calls to the phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use only those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa.
* @return $this Fluent Builder
*/
- public function setTrunkSid($trunkSid)
+ public function setTrunkSid(string $trunkSid): self
{
$this->options['trunkSid'] = $trunkSid;
return $this;
}
/**
- * The SID of the Identity resource that we should associate with the new phone number. Some regions require an identity to meet local regulations.
- *
- * @param string $identitySid The SID of the Identity resource to associate
- * with the new phone number
+ * @param string $voiceReceiveMode
* @return $this Fluent Builder
*/
- public function setIdentitySid($identitySid)
+ public function setVoiceReceiveMode(string $voiceReceiveMode): self
{
- $this->options['identitySid'] = $identitySid;
+ $this->options['voiceReceiveMode'] = $voiceReceiveMode;
return $this;
}
/**
- * The SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations.
+ * The SID of the Identity resource that we should associate with the phone number. Some regions require an identity to meet local regulations.
*
- * @param string $addressSid The SID of the Address resource associated with
- * the phone number
+ * @param string $identitySid The SID of the Identity resource that we should associate with the phone number. Some regions require an identity to meet local regulations.
* @return $this Fluent Builder
*/
- public function setAddressSid($addressSid)
+ public function setIdentitySid(string $identitySid): self
{
- $this->options['addressSid'] = $addressSid;
+ $this->options['identitySid'] = $identitySid;
return $this;
}
/**
- * The configuration parameter for the new phone number to receive incoming voice calls or faxes. Can be: `fax` or `voice` and defaults to `voice`.
+ * The SID of the Address resource we should associate with the phone number. Some regions require addresses to meet local regulations.
*
- * @param string $voiceReceiveMode Incoming call type: fax or voice
+ * @param string $addressSid The SID of the Address resource we should associate with the phone number. Some regions require addresses to meet local regulations.
* @return $this Fluent Builder
*/
- public function setVoiceReceiveMode($voiceReceiveMode)
+ public function setAddressSid(string $addressSid): self
{
- $this->options['voiceReceiveMode'] = $voiceReceiveMode;
+ $this->options['addressSid'] = $addressSid;
return $this;
}
/**
* The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations.
*
- * @param string $bundleSid The SID of the Bundle resource associated with
- * number
+ * @param string $bundleSid The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations.
* @return $this Fluent Builder
*/
- public function setBundleSid($bundleSid)
+ public function setBundleSid(string $bundleSid): self
{
$this->options['bundleSid'] = $bundleSid;
return $this;
@@ -972,14 +1031,10 @@ public function setBundleSid($bundleSid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.CreateIncomingPhoneNumberOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.UpdateIncomingPhoneNumberOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumberPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumberPage.php
index 0b16ed8..361c9c9 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumberPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/IncomingPhoneNumberPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return IncomingPhoneNumberInstance \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumberInstance
+ */
+ public function buildInstance(array $payload): IncomingPhoneNumberInstance
{
return new IncomingPhoneNumberInstance($this->version, $payload, $this->solution['accountSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.IncomingPhoneNumberPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/KeyContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/KeyContext.php
index d158faa..be6cf1f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/KeyContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/KeyContext.php
@@ -2,55 +2,82 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class KeyContext extends InstanceContext
-{
+ {
/**
* Initialize the KeyContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * to fetch
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\KeyContext
+ * @param Version $version Version that contains the resource
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Key resources to delete.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Key resource to delete.
*/
- public function __construct(Version $version, $accountSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $accountSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'sid' => $sid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Keys/' . \rawurlencode($sid) . '.json';
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Keys/' . \rawurlencode($sid)
+ .'.json';
}
/**
- * Fetch a KeyInstance
+ * Delete the KeyInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
+ }
+
+
+ /**
+ * Fetch the KeyInstance
*
* @return KeyInstance Fetched KeyInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): KeyInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new KeyInstance(
$this->version,
@@ -60,6 +87,7 @@ public function fetch()
);
}
+
/**
* Update the KeyInstance
*
@@ -67,18 +95,18 @@ public function fetch()
* @return KeyInstance Updated KeyInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): KeyInstance
{
+
$options = new Values($options);
- $data = Values::of(array('FriendlyName' => $options['friendlyName'],));
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ ]);
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new KeyInstance(
$this->version,
@@ -88,28 +116,18 @@ public function update($options = array())
);
}
- /**
- * Deletes the KeyInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.KeyContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/KeyInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/KeyInstance.php
index 8816e07..eb3789e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/KeyInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/KeyInstance.php
@@ -2,61 +2,67 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $friendlyName
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
+ * @property string|null $sid
+ * @property string|null $friendlyName
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
*/
class KeyInstance extends InstanceResource
{
/**
* Initialize the KeyInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid A 34 character string that uniquely identifies
- * this resource.
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\KeyInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Key resources to delete.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Key resource to delete.
*/
- public function __construct(Version $version, array $payload, $accountSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $accountSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- );
+ ];
- $this->solution = array('accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Api\V2010\Account\KeyContext Context for this
- * KeyInstance
+ * @return KeyContext Context for this KeyInstance
*/
- protected function proxy()
+ protected function proxy(): KeyContext
{
if (!$this->context) {
$this->context = new KeyContext(
@@ -70,37 +76,40 @@ protected function proxy()
}
/**
- * Fetch a KeyInstance
+ * Delete the KeyInstance
*
- * @return KeyInstance Fetched KeyInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Update the KeyInstance
+ * Fetch the KeyInstance
*
- * @param array|Options $options Optional Arguments
- * @return KeyInstance Updated KeyInstance
+ * @return KeyInstance Fetched KeyInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): KeyInstance
{
- return $this->proxy()->update($options);
+
+ return $this->proxy()->fetch();
}
/**
- * Deletes the KeyInstance
+ * Update the KeyInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return KeyInstance Updated KeyInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): KeyInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->update($options);
}
/**
@@ -110,7 +119,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -129,12 +138,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.KeyInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/KeyList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/KeyList.php
index bb2afff..f2e0985 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/KeyList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/KeyList.php
@@ -2,35 +2,69 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class KeyList extends ListResource
-{
+ {
/**
* Construct the KeyList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid A 34 character string that uniquely identifies
- * this resource.
- * @return \Twilio\Rest\Api\V2010\Account\KeyList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Key resources to delete.
*/
- public function __construct(Version $version, $accountSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Keys.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Keys.json';
+ /**
+ * Reads KeyInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return KeyInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -49,9 +83,9 @@ public function __construct(Version $version, $accountSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -60,26 +94,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads KeyInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return KeyInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of KeyInstance records from the API.
* Request is executed immediately
@@ -87,21 +101,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of KeyInstance
+ * @return KeyPage Page of KeyInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): KeyPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new KeyPage($this->version, $response, $this->solution);
}
@@ -111,9 +126,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of KeyInstance
+ * @return KeyPage Page of KeyInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): KeyPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -123,15 +138,22 @@ public function getPage($targetUrl)
return new KeyPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a KeyContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\KeyContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the Key resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): KeyContext
{
- return new KeyContext($this->version, $this->solution['accountSid'], $sid);
+ return new KeyContext(
+ $this->version,
+ $this->solution['accountSid'],
+ $sid
+ );
}
/**
@@ -139,8 +161,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.KeyList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/KeyOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/KeyOptions.php
index 5e24d61..da5a74f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/KeyOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/KeyOptions.php
@@ -1,10 +1,16 @@
options['friendlyName'] = $friendlyName;
}
/**
* A descriptive string that you create to describe the resource. It can be up to 64 characters long.
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -51,14 +73,10 @@ public function setFriendlyName($friendlyName)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.UpdateKeyOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.UpdateKeyOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/KeyPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/KeyPage.php
index 04057b3..ee893ae 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/KeyPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/KeyPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return KeyInstance \Twilio\Rest\Api\V2010\Account\KeyInstance
+ */
+ public function buildInstance(array $payload): KeyInstance
{
return new KeyInstance($this->version, $payload, $this->solution['accountSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.KeyPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Message/FeedbackInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Message/FeedbackInstance.php
index 2f1961a..868bedb 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Message/FeedbackInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Message/FeedbackInstance.php
@@ -2,54 +2,61 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Message;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property string $messageSid
+ * @property string|null $accountSid
+ * @property string|null $messageSid
* @property string $outcome
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $uri
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $uri
*/
class FeedbackInstance extends InstanceResource
{
/**
* Initialize the FeedbackInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $messageSid The SID of the Message resource for which the
- * feedback was provided
- * @return \Twilio\Rest\Api\V2010\Account\Message\FeedbackInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) associated with the Message resource for which to create MessageFeedback.
+ * @param string $messageSid The SID of the Message resource for which to create MessageFeedback.
*/
- public function __construct(Version $version, array $payload, $accountSid, $messageSid)
+ public function __construct(Version $version, array $payload, string $accountSid, string $messageSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'messageSid' => Values::array_get($payload, 'message_sid'),
'outcome' => Values::array_get($payload, 'outcome'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'uri' => Values::array_get($payload, 'uri'),
- );
+ ];
- $this->solution = array('accountSid' => $accountSid, 'messageSid' => $messageSid,);
+ $this->solution = ['accountSid' => $accountSid, 'messageSid' => $messageSid, ];
}
/**
@@ -59,7 +66,7 @@ public function __construct(Version $version, array $payload, $accountSid, $mess
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -78,8 +85,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.FeedbackInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Message/FeedbackList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Message/FeedbackList.php
index d481c48..6518eda 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Message/FeedbackList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Message/FeedbackList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\Message;
@@ -15,46 +22,57 @@
use Twilio\Values;
use Twilio\Version;
+
class FeedbackList extends ListResource
-{
+ {
/**
* Construct the FeedbackList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $messageSid The SID of the Message resource for which the
- * feedback was provided
- * @return \Twilio\Rest\Api\V2010\Account\Message\FeedbackList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) associated with the Message resource for which to create MessageFeedback.
+ * @param string $messageSid The SID of the Message resource for which to create MessageFeedback.
*/
- public function __construct(Version $version, $accountSid, $messageSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid,
+ string $messageSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'messageSid' => $messageSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ 'messageSid' =>
+ $messageSid,
+
+ ];
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Messages/' . \rawurlencode($messageSid) . '/Feedback.json';
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Messages/' . \rawurlencode($messageSid)
+ .'/Feedback.json';
}
/**
- * Create a new FeedbackInstance
+ * Create the FeedbackInstance
*
* @param array|Options $options Optional Arguments
- * @return FeedbackInstance Newly created FeedbackInstance
+ * @return FeedbackInstance Created FeedbackInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($options = array())
+ public function create(array $options = []): FeedbackInstance
{
+
$options = new Values($options);
- $data = Values::of(array('Outcome' => $options['outcome'],));
+ $data = Values::of([
+ 'Outcome' =>
+ $options['outcome'],
+ ]);
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
return new FeedbackInstance(
$this->version,
@@ -64,13 +82,14 @@ public function create($options = array())
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.FeedbackList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Message/FeedbackOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Message/FeedbackOptions.php
index 9cec8b5..96d92c7 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Message/FeedbackOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Message/FeedbackOptions.php
@@ -1,10 +1,16 @@
options['outcome'] = $outcome;
}
/**
- * Whether the feedback has arrived. Can be: `unconfirmed` or `confirmed`. If `provide_feedback`=`true` in [the initial HTTP POST](https://www.twilio.com/docs/sms/api/message-resource#create-a-message-resource), the initial value of this property is `unconfirmed`. After the message arrives, update the value to `confirmed`.
- *
- * @param string $outcome Whether the feedback has arrived
+ * @param string $outcome
* @return $this Fluent Builder
*/
- public function setOutcome($outcome)
+ public function setOutcome(string $outcome): self
{
$this->options['outcome'] = $outcome;
return $this;
@@ -51,14 +65,10 @@ public function setOutcome($outcome)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.CreateFeedbackOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.CreateFeedbackOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Message/FeedbackPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Message/FeedbackPage.php
index 013719f..36db577 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Message/FeedbackPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Message/FeedbackPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return FeedbackInstance \Twilio\Rest\Api\V2010\Account\Message\FeedbackInstance
+ */
+ public function buildInstance(array $payload): FeedbackInstance
{
- return new FeedbackInstance(
- $this->version,
- $payload,
- $this->solution['accountSid'],
- $this->solution['messageSid']
- );
+ return new FeedbackInstance($this->version, $payload, $this->solution['accountSid'], $this->solution['messageSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.FeedbackPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Message/MediaContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Message/MediaContext.php
index 9b52518..32ef982 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Message/MediaContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Message/MediaContext.php
@@ -2,67 +2,86 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Message;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class MediaContext extends InstanceContext
-{
+ {
/**
* Initialize the MediaContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the
- * resource(s) to fetch
- * @param string $messageSid The SID of the Message resource that this Media
- * resource belongs to
- * @param string $sid The unique string that identifies this resource
- * @return \Twilio\Rest\Api\V2010\Account\Message\MediaContext
+ * @param Version $version Version that contains the resource
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that is associated with the Media resource.
+ * @param string $messageSid The SID of the Message resource that is associated with the Media resource.
+ * @param string $sid The unique identifier of the to-be-deleted Media resource.
*/
- public function __construct(Version $version, $accountSid, $messageSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $accountSid,
+ $messageSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'messageSid' => $messageSid, 'sid' => $sid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+ 'messageSid' =>
+ $messageSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Messages/' . \rawurlencode($messageSid) . '/Media/' . \rawurlencode($sid) . '.json';
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Messages/' . \rawurlencode($messageSid)
+ .'/Media/' . \rawurlencode($sid)
+ .'.json';
}
/**
- * Deletes the MediaInstance
+ * Delete the MediaInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function delete(): bool
{
- return $this->version->delete('delete', $this->uri);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a MediaInstance
+ * Fetch the MediaInstance
*
* @return MediaInstance Fetched MediaInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): MediaInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new MediaInstance(
$this->version,
@@ -73,17 +92,18 @@ public function fetch()
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.MediaContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Message/MediaInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Message/MediaInstance.php
index 5e1e508..8a0d886 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Message/MediaInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Message/MediaInstance.php
@@ -2,46 +2,54 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Message;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property string $contentType
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $parentSid
- * @property string $sid
- * @property string $uri
+ * @property string|null $accountSid
+ * @property string|null $contentType
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $parentSid
+ * @property string|null $sid
+ * @property string|null $uri
*/
class MediaInstance extends InstanceResource
{
/**
* Initialize the MediaInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The SID of the Account that created this resource
- * @param string $messageSid The unique string that identifies the resource
- * @param string $sid The unique string that identifies this resource
- * @return \Twilio\Rest\Api\V2010\Account\Message\MediaInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that is associated with the Media resource.
+ * @param string $messageSid The SID of the Message resource that is associated with the Media resource.
+ * @param string $sid The unique identifier of the to-be-deleted Media resource.
*/
- public function __construct(Version $version, array $payload, $accountSid, $messageSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $accountSid, string $messageSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'contentType' => Values::array_get($payload, 'content_type'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
@@ -49,23 +57,18 @@ public function __construct(Version $version, array $payload, $accountSid, $mess
'parentSid' => Values::array_get($payload, 'parent_sid'),
'sid' => Values::array_get($payload, 'sid'),
'uri' => Values::array_get($payload, 'uri'),
- );
+ ];
- $this->solution = array(
- 'accountSid' => $accountSid,
- 'messageSid' => $messageSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['accountSid' => $accountSid, 'messageSid' => $messageSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Api\V2010\Account\Message\MediaContext Context for this
- * MediaInstance
+ * @return MediaContext Context for this MediaInstance
*/
- protected function proxy()
+ protected function proxy(): MediaContext
{
if (!$this->context) {
$this->context = new MediaContext(
@@ -80,24 +83,26 @@ protected function proxy()
}
/**
- * Deletes the MediaInstance
+ * Delete the MediaInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function delete(): bool
{
+
return $this->proxy()->delete();
}
/**
- * Fetch a MediaInstance
+ * Fetch the MediaInstance
*
* @return MediaInstance Fetched MediaInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): MediaInstance
{
+
return $this->proxy()->fetch();
}
@@ -108,7 +113,7 @@ public function fetch()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -127,12 +132,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.MediaInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Message/MediaList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Message/MediaList.php
index fe8b407..cba493b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Message/MediaList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Message/MediaList.php
@@ -2,37 +2,78 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\Message;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class MediaList extends ListResource
-{
+ {
/**
* Construct the MediaList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created this resource
- * @param string $messageSid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\Message\MediaList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that is associated with the Media resource.
+ * @param string $messageSid The SID of the Message resource that is associated with the Media resource.
*/
- public function __construct(Version $version, $accountSid, $messageSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid,
+ string $messageSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'messageSid' => $messageSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ 'messageSid' =>
+ $messageSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Messages/' . \rawurlencode($messageSid)
+ .'/Media.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Messages/' . \rawurlencode($messageSid) . '/Media.json';
+ /**
+ * Reads MediaInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return MediaInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -52,9 +93,9 @@ public function __construct(Version $version, $accountSid, $messageSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -63,54 +104,37 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads MediaInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return MediaInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of MediaInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of MediaInstance
+ * @return MediaPage Page of MediaInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): MediaPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'DateCreated<' => Serialize::iso8601DateTime($options['dateCreatedBefore']),
- 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']),
- 'DateCreated>' => Serialize::iso8601DateTime($options['dateCreatedAfter']),
+
+ $params = Values::of([
+ 'DateCreated<' =>
+ Serialize::iso8601DateTime($options['dateCreatedBefore']),
+ 'DateCreated' =>
+ Serialize::iso8601DateTime($options['dateCreated']),
+ 'DateCreated>' =>
+ Serialize::iso8601DateTime($options['dateCreatedAfter']),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new MediaPage($this->version, $response, $this->solution);
}
@@ -120,9 +144,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of MediaInstance
+ * @return MediaPage Page of MediaInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): MediaPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -132,13 +156,16 @@ public function getPage($targetUrl)
return new MediaPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a MediaContext
*
- * @param string $sid The unique string that identifies this resource
- * @return \Twilio\Rest\Api\V2010\Account\Message\MediaContext
+ * @param string $sid The unique identifier of the to-be-deleted Media resource.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): MediaContext
{
return new MediaContext(
$this->version,
@@ -153,8 +180,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.MediaList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Message/MediaOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Message/MediaOptions.php
index 458b50f..d1fc7da 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Message/MediaOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Message/MediaOptions.php
@@ -1,10 +1,16 @@
=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
+ * @param string $dateCreated Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
+ * @param string $dateCreatedAfter Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
* @return ReadMediaOptions Options builder
*/
- public static function read($dateCreatedBefore = Values::NONE, $dateCreated = Values::NONE, $dateCreatedAfter = Values::NONE)
+ public static function read(
+
+ string $dateCreatedBefore = null,
+ string $dateCreated = null,
+ string $dateCreatedAfter = null
+
+ ): ReadMediaOptions
{
- return new ReadMediaOptions($dateCreatedBefore, $dateCreated, $dateCreatedAfter);
+ return new ReadMediaOptions(
+ $dateCreatedBefore,
+ $dateCreated,
+ $dateCreatedAfter
+ );
}
+
}
+
+
class ReadMediaOptions extends Options
-{
+ {
/**
- * @param string $dateCreatedBefore Only include media that was created on this
- * date
- * @param string $dateCreated Only include media that was created on this date
- * @param string $dateCreatedAfter Only include media that was created on this
- * date
+ * @param string $dateCreatedBefore Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
+ * @param string $dateCreated Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
+ * @param string $dateCreatedAfter Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
*/
- public function __construct($dateCreatedBefore = Values::NONE, $dateCreated = Values::NONE, $dateCreatedAfter = Values::NONE)
- {
+ public function __construct(
+
+ string $dateCreatedBefore = null,
+ string $dateCreated = null,
+ string $dateCreatedAfter = null
+
+ ) {
$this->options['dateCreatedBefore'] = $dateCreatedBefore;
$this->options['dateCreated'] = $dateCreated;
$this->options['dateCreatedAfter'] = $dateCreatedAfter;
}
/**
- * Only include media that was created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read media that was created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read media that was created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read media that was created on or after midnight of this date.
+ * Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
*
- * @param string $dateCreatedBefore Only include media that was created on this
- * date
+ * @param string $dateCreatedBefore Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
* @return $this Fluent Builder
*/
- public function setDateCreatedBefore($dateCreatedBefore)
+ public function setDateCreatedBefore(string $dateCreatedBefore): self
{
$this->options['dateCreatedBefore'] = $dateCreatedBefore;
return $this;
}
/**
- * Only include media that was created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read media that was created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read media that was created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read media that was created on or after midnight of this date.
+ * Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
*
- * @param string $dateCreated Only include media that was created on this date
+ * @param string $dateCreated Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
* @return $this Fluent Builder
*/
- public function setDateCreated($dateCreated)
+ public function setDateCreated(string $dateCreated): self
{
$this->options['dateCreated'] = $dateCreated;
return $this;
}
/**
- * Only include media that was created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read media that was created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read media that was created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read media that was created on or after midnight of this date.
+ * Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
*
- * @param string $dateCreatedAfter Only include media that was created on this
- * date
+ * @param string $dateCreatedAfter Only include Media resources that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read Media that were created on this date. You can also specify an inequality, such as `StartTime<=YYYY-MM-DD`, to read Media that were created on or before midnight of this date, and `StartTime>=YYYY-MM-DD` to read Media that were created on or after midnight of this date.
* @return $this Fluent Builder
*/
- public function setDateCreatedAfter($dateCreatedAfter)
+ public function setDateCreatedAfter(string $dateCreatedAfter): self
{
$this->options['dateCreatedAfter'] = $dateCreatedAfter;
return $this;
@@ -87,14 +107,10 @@ public function setDateCreatedAfter($dateCreatedAfter)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.ReadMediaOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.ReadMediaOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Message/MediaPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Message/MediaPage.php
index 962f871..74a121b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Message/MediaPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Message/MediaPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return MediaInstance \Twilio\Rest\Api\V2010\Account\Message\MediaInstance
+ */
+ public function buildInstance(array $payload): MediaInstance
{
- return new MediaInstance(
- $this->version,
- $payload,
- $this->solution['accountSid'],
- $this->solution['messageSid']
- );
+ return new MediaInstance($this->version, $payload, $this->solution['accountSid'], $this->solution['messageSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.MediaPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/MessageContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/MessageContext.php
index 6eb4de7..f65c1a6 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/MessageContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/MessageContext.php
@@ -2,75 +2,93 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account;
use Twilio\Exceptions\TwilioException;
+use Twilio\ListResource;
+use Twilio\Options;
+use Twilio\Values;
+use Twilio\Version;
use Twilio\InstanceContext;
use Twilio\Rest\Api\V2010\Account\Message\FeedbackList;
use Twilio\Rest\Api\V2010\Account\Message\MediaList;
-use Twilio\Values;
-use Twilio\Version;
+
/**
- * @property \Twilio\Rest\Api\V2010\Account\Message\MediaList $media
- * @property \Twilio\Rest\Api\V2010\Account\Message\FeedbackList $feedback
+ * @property FeedbackList $feedback
+ * @property MediaList $media
* @method \Twilio\Rest\Api\V2010\Account\Message\MediaContext media(string $sid)
*/
class MessageContext extends InstanceContext
-{
- protected $_media = null;
- protected $_feedback = null;
+ {
+ protected $_feedback;
+ protected $_media;
/**
* Initialize the MessageContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * to fetch
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\MessageContext
+ * @param Version $version Version that contains the resource
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) creating the Message resource.
+ * @param string $sid The SID of the Message resource you wish to delete
*/
- public function __construct(Version $version, $accountSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $accountSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'sid' => $sid,);
-
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Messages/' . \rawurlencode($sid) . '.json';
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Messages/' . \rawurlencode($sid)
+ .'.json';
}
/**
- * Deletes the MessageInstance
+ * Delete the MessageInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function delete(): bool
{
- return $this->version->delete('delete', $this->uri);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a MessageInstance
+ * Fetch the MessageInstance
*
* @return MessageInstance Fetched MessageInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): MessageInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new MessageInstance(
$this->version,
@@ -80,23 +98,28 @@ public function fetch()
);
}
+
/**
* Update the MessageInstance
*
- * @param string $body The text of the message you want to send
+ * @param array|Options $options Optional Arguments
* @return MessageInstance Updated MessageInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($body)
+ public function update(array $options = []): MessageInstance
{
- $data = Values::of(array('Body' => $body,));
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $options = new Values($options);
+
+ $data = Values::of([
+ 'Body' =>
+ $options['body'],
+ 'Status' =>
+ $options['status'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new MessageInstance(
$this->version,
@@ -106,50 +129,47 @@ public function update($body)
);
}
+
/**
- * Access the media
- *
- * @return \Twilio\Rest\Api\V2010\Account\Message\MediaList
+ * Access the feedback
*/
- protected function getMedia()
+ protected function getFeedback(): FeedbackList
{
- if (!$this->_media) {
- $this->_media = new MediaList(
+ if (!$this->_feedback) {
+ $this->_feedback = new FeedbackList(
$this->version,
$this->solution['accountSid'],
$this->solution['sid']
);
}
- return $this->_media;
+ return $this->_feedback;
}
/**
- * Access the feedback
- *
- * @return \Twilio\Rest\Api\V2010\Account\Message\FeedbackList
+ * Access the media
*/
- protected function getFeedback()
+ protected function getMedia(): MediaList
{
- if (!$this->_feedback) {
- $this->_feedback = new FeedbackList(
+ if (!$this->_media) {
+ $this->_media = new MediaList(
$this->version,
$this->solution['accountSid'],
$this->solution['sid']
);
}
- return $this->_feedback;
+ return $this->_media;
}
/**
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -164,10 +184,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -182,12 +202,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.MessageContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/MessageInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/MessageInstance.php
index 401f249..6e4c601 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/MessageInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/MessageInstance.php
@@ -2,94 +2,104 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
+use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Api\V2010\Account\Message\FeedbackList;
+use Twilio\Rest\Api\V2010\Account\Message\MediaList;
+
/**
- * @property string $accountSid
- * @property string $apiVersion
- * @property string $body
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property \DateTime $dateSent
+ * @property string|null $body
+ * @property string|null $numSegments
* @property string $direction
- * @property int $errorCode
- * @property string $errorMessage
- * @property string $from
- * @property string $messagingServiceSid
- * @property string $numMedia
- * @property string $numSegments
- * @property string $price
- * @property string $priceUnit
- * @property string $sid
+ * @property string|null $from
+ * @property string|null $to
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $price
+ * @property string|null $errorMessage
+ * @property string|null $uri
+ * @property string|null $accountSid
+ * @property string|null $numMedia
* @property string $status
- * @property array $subresourceUris
- * @property string $to
- * @property string $uri
+ * @property string|null $messagingServiceSid
+ * @property string|null $sid
+ * @property \DateTime|null $dateSent
+ * @property \DateTime|null $dateCreated
+ * @property int|null $errorCode
+ * @property string|null $priceUnit
+ * @property string|null $apiVersion
+ * @property array|null $subresourceUris
*/
class MessageInstance extends InstanceResource
{
- protected $_media = null;
- protected $_feedback = null;
+ protected $_feedback;
+ protected $_media;
/**
* Initialize the MessageInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\MessageInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) creating the Message resource.
+ * @param string $sid The SID of the Message resource you wish to delete
*/
- public function __construct(Version $version, array $payload, $accountSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $accountSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'apiVersion' => Values::array_get($payload, 'api_version'),
+ $this->properties = [
'body' => Values::array_get($payload, 'body'),
- 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- 'dateSent' => Deserialize::dateTime(Values::array_get($payload, 'date_sent')),
+ 'numSegments' => Values::array_get($payload, 'num_segments'),
'direction' => Values::array_get($payload, 'direction'),
- 'errorCode' => Values::array_get($payload, 'error_code'),
- 'errorMessage' => Values::array_get($payload, 'error_message'),
'from' => Values::array_get($payload, 'from'),
- 'messagingServiceSid' => Values::array_get($payload, 'messaging_service_sid'),
- 'numMedia' => Values::array_get($payload, 'num_media'),
- 'numSegments' => Values::array_get($payload, 'num_segments'),
+ 'to' => Values::array_get($payload, 'to'),
+ 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'price' => Values::array_get($payload, 'price'),
- 'priceUnit' => Values::array_get($payload, 'price_unit'),
- 'sid' => Values::array_get($payload, 'sid'),
+ 'errorMessage' => Values::array_get($payload, 'error_message'),
+ 'uri' => Values::array_get($payload, 'uri'),
+ 'accountSid' => Values::array_get($payload, 'account_sid'),
+ 'numMedia' => Values::array_get($payload, 'num_media'),
'status' => Values::array_get($payload, 'status'),
+ 'messagingServiceSid' => Values::array_get($payload, 'messaging_service_sid'),
+ 'sid' => Values::array_get($payload, 'sid'),
+ 'dateSent' => Deserialize::dateTime(Values::array_get($payload, 'date_sent')),
+ 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
+ 'errorCode' => Values::array_get($payload, 'error_code'),
+ 'priceUnit' => Values::array_get($payload, 'price_unit'),
+ 'apiVersion' => Values::array_get($payload, 'api_version'),
'subresourceUris' => Values::array_get($payload, 'subresource_uris'),
- 'to' => Values::array_get($payload, 'to'),
- 'uri' => Values::array_get($payload, 'uri'),
- );
+ ];
- $this->solution = array('accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Api\V2010\Account\MessageContext Context for this
- * MessageInstance
+ * @return MessageContext Context for this MessageInstance
*/
- protected function proxy()
+ protected function proxy(): MessageContext
{
if (!$this->context) {
$this->context = new MessageContext(
@@ -103,57 +113,56 @@ protected function proxy()
}
/**
- * Deletes the MessageInstance
+ * Delete the MessageInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function delete(): bool
{
+
return $this->proxy()->delete();
}
/**
- * Fetch a MessageInstance
+ * Fetch the MessageInstance
*
* @return MessageInstance Fetched MessageInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): MessageInstance
{
+
return $this->proxy()->fetch();
}
/**
* Update the MessageInstance
*
- * @param string $body The text of the message you want to send
+ * @param array|Options $options Optional Arguments
* @return MessageInstance Updated MessageInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($body)
+ public function update(array $options = []): MessageInstance
{
- return $this->proxy()->update($body);
+
+ return $this->proxy()->update($options);
}
/**
- * Access the media
- *
- * @return \Twilio\Rest\Api\V2010\Account\Message\MediaList
+ * Access the feedback
*/
- protected function getMedia()
+ protected function getFeedback(): FeedbackList
{
- return $this->proxy()->media;
+ return $this->proxy()->feedback;
}
/**
- * Access the feedback
- *
- * @return \Twilio\Rest\Api\V2010\Account\Message\FeedbackList
+ * Access the media
*/
- protected function getFeedback()
+ protected function getMedia(): MediaList
{
- return $this->proxy()->feedback;
+ return $this->proxy()->media;
}
/**
@@ -163,7 +172,7 @@ protected function getFeedback()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -182,12 +191,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.MessageInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/MessageList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/MessageList.php
index 4d35919..b4b0980 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/MessageList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/MessageList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account;
@@ -12,71 +19,129 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class MessageList extends ListResource
-{
+ {
/**
* Construct the MessageList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * @return \Twilio\Rest\Api\V2010\Account\MessageList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) creating the Message resource.
*/
- public function __construct(Version $version, $accountSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ ];
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Messages.json';
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Messages.json';
}
/**
- * Create a new MessageInstance
+ * Create the MessageInstance
*
- * @param string $to The destination phone number
+ * @param string $to The recipient's phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format (for SMS/MMS) or [channel address](https://www.twilio.com/docs/messaging/channels), e.g. `whatsapp:+15552229999`.
* @param array|Options $options Optional Arguments
- * @return MessageInstance Newly created MessageInstance
+ * @return MessageInstance Created MessageInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($to, $options = array())
+ public function create(string $to, array $options = []): MessageInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'To' => $to,
- 'From' => $options['from'],
- 'MessagingServiceSid' => $options['messagingServiceSid'],
- 'Body' => $options['body'],
- 'MediaUrl' => Serialize::map($options['mediaUrl'], function ($e) {
- return $e;
- }),
- 'StatusCallback' => $options['statusCallback'],
- 'ApplicationSid' => $options['applicationSid'],
- 'MaxPrice' => $options['maxPrice'],
- 'ProvideFeedback' => Serialize::booleanToString($options['provideFeedback']),
- 'ValidityPeriod' => $options['validityPeriod'],
- 'ForceDelivery' => Serialize::booleanToString($options['forceDelivery']),
- 'ContentRetention' => $options['contentRetention'],
- 'AddressRetention' => $options['addressRetention'],
- 'SmartEncoded' => Serialize::booleanToString($options['smartEncoded']),
- 'PersistentAction' => Serialize::map($options['persistentAction'], function ($e) {
- return $e;
- }),
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'To' =>
+ $to,
+ 'StatusCallback' =>
+ $options['statusCallback'],
+ 'ApplicationSid' =>
+ $options['applicationSid'],
+ 'MaxPrice' =>
+ $options['maxPrice'],
+ 'ProvideFeedback' =>
+ Serialize::booleanToString($options['provideFeedback']),
+ 'Attempt' =>
+ $options['attempt'],
+ 'ValidityPeriod' =>
+ $options['validityPeriod'],
+ 'ForceDelivery' =>
+ Serialize::booleanToString($options['forceDelivery']),
+ 'ContentRetention' =>
+ $options['contentRetention'],
+ 'AddressRetention' =>
+ $options['addressRetention'],
+ 'SmartEncoded' =>
+ Serialize::booleanToString($options['smartEncoded']),
+ 'PersistentAction' =>
+ Serialize::map($options['persistentAction'], function ($e) { return $e; }),
+ 'ShortenUrls' =>
+ Serialize::booleanToString($options['shortenUrls']),
+ 'ScheduleType' =>
+ $options['scheduleType'],
+ 'SendAt' =>
+ Serialize::iso8601DateTime($options['sendAt']),
+ 'SendAsMms' =>
+ Serialize::booleanToString($options['sendAsMms']),
+ 'ContentVariables' =>
+ $options['contentVariables'],
+ 'RiskCheck' =>
+ $options['riskCheck'],
+ 'From' =>
+ $options['from'],
+ 'MessagingServiceSid' =>
+ $options['messagingServiceSid'],
+ 'Body' =>
+ $options['body'],
+ 'MediaUrl' =>
+ Serialize::map($options['mediaUrl'], function ($e) { return $e; }),
+ 'ContentSid' =>
+ $options['contentSid'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new MessageInstance(
+ $this->version,
+ $payload,
+ $this->solution['accountSid']
);
+ }
- return new MessageInstance($this->version, $payload, $this->solution['accountSid']);
+
+ /**
+ * Reads MessageInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return MessageInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -96,9 +161,9 @@ public function create($to, $options = array())
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -107,56 +172,41 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads MessageInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return MessageInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of MessageInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of MessageInstance
+ * @return MessagePage Page of MessageInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): MessagePage
{
$options = new Values($options);
- $params = Values::of(array(
- 'To' => $options['to'],
- 'From' => $options['from'],
- 'DateSent<' => Serialize::iso8601DateTime($options['dateSentBefore']),
- 'DateSent' => Serialize::iso8601DateTime($options['dateSent']),
- 'DateSent>' => Serialize::iso8601DateTime($options['dateSentAfter']),
+
+ $params = Values::of([
+ 'To' =>
+ $options['to'],
+ 'From' =>
+ $options['from'],
+ 'DateSent<' =>
+ Serialize::iso8601DateTime($options['dateSentBefore']),
+ 'DateSent' =>
+ Serialize::iso8601DateTime($options['dateSent']),
+ 'DateSent>' =>
+ Serialize::iso8601DateTime($options['dateSentAfter']),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new MessagePage($this->version, $response, $this->solution);
}
@@ -166,9 +216,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of MessageInstance
+ * @return MessagePage Page of MessageInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): MessagePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -178,15 +228,22 @@ public function getPage($targetUrl)
return new MessagePage($this->version, $response, $this->solution);
}
+
/**
* Constructs a MessageContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\MessageContext
+ * @param string $sid The SID of the Message resource you wish to delete
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): MessageContext
{
- return new MessageContext($this->version, $this->solution['accountSid'], $sid);
+ return new MessageContext(
+ $this->version,
+ $this->solution['accountSid'],
+ $sid
+ );
}
/**
@@ -194,8 +251,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.MessageList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/MessageOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/MessageOptions.php
index 1ed9d37..0f68786 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/MessageOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/MessageOptions.php
@@ -1,10 +1,16 @@
=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
+ * @param string $dateSent Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
+ * @param string $dateSentAfter Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
* @return ReadMessageOptions Options builder
*/
- public static function read($to = Values::NONE, $from = Values::NONE, $dateSentBefore = Values::NONE, $dateSent = Values::NONE, $dateSentAfter = Values::NONE)
+ public static function read(
+
+ string $to = Values::NONE,
+ string $from = Values::NONE,
+ string $dateSentBefore = null,
+ string $dateSent = null,
+ string $dateSentAfter = null
+
+ ): ReadMessageOptions
{
- return new ReadMessageOptions($to, $from, $dateSentBefore, $dateSent, $dateSentAfter);
+ return new ReadMessageOptions(
+ $to,
+ $from,
+ $dateSentBefore,
+ $dateSent,
+ $dateSentAfter
+ );
}
+
+ /**
+ * @param string $body The new `body` of the Message resource. To redact the text content of a Message, this parameter's value must be an empty string
+ * @param string $status
+ * @return UpdateMessageOptions Options builder
+ */
+ public static function update(
+
+ string $body = Values::NONE,
+ string $status = Values::NONE
+
+ ): UpdateMessageOptions
+ {
+ return new UpdateMessageOptions(
+ $body,
+ $status
+ );
+ }
+
}
class CreateMessageOptions extends Options
-{
+ {
/**
- * @param string $from The phone number that initiated the message
- * @param string $messagingServiceSid The SID of the Messaging Service you want
- * to associate with the message.
- * @param string $body The text of the message you want to send. Can be up to
- * 1,600 characters in length.
- * @param string $mediaUrl The URL of the media to send with the message
- * @param string $statusCallback The URL we should call to send status
- * information to your application
- * @param string $applicationSid The application to use for callbacks
- * @param string $maxPrice The total maximum price up to 4 decimal places in US
- * dollars acceptable for the message to be delivered.
- * @param bool $provideFeedback Whether to confirm delivery of the message
- * @param int $validityPeriod The number of seconds that the message can remain
- * in our outgoing queue.
+ * @param string $from The sender's Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/quickstart), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/en-us/messaging/channels/sms/short-codes), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belongs to the Account creating the Message. If you are using `messaging_service_sid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service's Sender Pool) or you can provide a specific sender from your Sender Pool.
+ * @param string $messagingServiceSid The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services) you want to associate with the Message. When this parameter is provided and the `from` parameter is omitted, Twilio selects the optimal sender from the Messaging Service's Sender Pool. You may also provide a `from` parameter if you want to use a specific Sender from the Sender Pool.
+ * @param string $body The text content of the outgoing message. Can be up to 1,600 characters in length. SMS only: If the `body` contains more than 160 [GSM-7](https://www.twilio.com/docs/glossary/what-is-gsm-7-character-encoding) characters (or 70 [UCS-2](https://www.twilio.com/docs/glossary/what-is-ucs-2-character-encoding) characters), the message is segmented and charged accordingly. For long `body` text, consider using the [send_as_mms parameter](https://www.twilio.com/blog/mms-for-long-text-messages).
+ * @param string[] $mediaUrl The URL of media to include in the Message content. `jpeg`, `jpg`, `gif`, and `png` file types are fully supported by Twilio and content is formatted for delivery on destination devices. The media size limit is 5 MB for supported file types (`jpeg`, `jpg`, `png`, `gif`) and 500 KB for [other types](https://www.twilio.com/docs/messaging/guides/accepted-mime-types) of accepted media. To send more than one image in the message, provide multiple `media_url` parameters in the POST request. You can include up to ten `media_url` parameters per message. [International](https://support.twilio.com/hc/en-us/articles/223179808-Sending-and-receiving-MMS-messages) and [carrier](https://support.twilio.com/hc/en-us/articles/223133707-Is-MMS-supported-for-all-carriers-in-US-and-Canada-) limits apply.
+ * @param string $contentSid For [Content Editor/API](https://www.twilio.com/docs/content) only: The SID of the Content Template to be used with the Message, e.g., `HXXXXXXXXXXXXXXXXXXXXXXXXXXXXX`. If this parameter is not provided, a Content Template is not used. Find the SID in the Console on the Content Editor page. For Content API users, the SID is found in Twilio's response when [creating the Template](https://www.twilio.com/docs/content/content-api-resources#create-templates) or by [fetching your Templates](https://www.twilio.com/docs/content/content-api-resources#fetch-all-content-resources).
+ * @param string $statusCallback The URL of the endpoint to which Twilio sends [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url). URL must contain a valid hostname and underscores are not allowed. If you include this parameter with the `messaging_service_sid`, Twilio uses this URL instead of the Status Callback URL of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource).
+ * @param string $applicationSid The SID of the associated [TwiML Application](https://www.twilio.com/docs/usage/api/applications). [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url) are sent to the TwiML App's `message_status_callback` URL. Note that the `status_callback` parameter of a request takes priority over the `application_sid` parameter; if both are included `application_sid` is ignored.
+ * @param string $maxPrice [OBSOLETE] This parameter will no longer have any effect as of 2024-06-03.
+ * @param bool $provideFeedback Boolean indicating whether or not you intend to provide delivery confirmation feedback to Twilio (used in conjunction with the [Message Feedback subresource](https://www.twilio.com/docs/sms/api/message-feedback-resource)). Default value is `false`.
+ * @param int $attempt Total number of attempts made (including this request) to send the message regardless of the provider used
+ * @param int $validityPeriod The maximum length in seconds that the Message can remain in Twilio's outgoing message queue. If a queued Message exceeds the `validity_period`, the Message is not sent. Accepted values are integers from `1` to `36000`. Default value is `36000`. A `validity_period` greater than `5` is recommended. [Learn more about the validity period](https://www.twilio.com/blog/take-more-control-of-outbound-messages-using-validity-period-html)
* @param bool $forceDelivery Reserved
- * @param string $contentRetention Determines if the message content can be
- * stored or redacted based on privacy settings
- * @param string $addressRetention Determines if the address can be stored or
- * obfuscated based on privacy settings
- * @param bool $smartEncoded Whether to detect Unicode characters that have a
- * similar GSM-7 character and replace them
- * @param string $persistentAction Rich actions for Channels Messages.
+ * @param string $contentRetention
+ * @param string $addressRetention
+ * @param bool $smartEncoded Whether to detect Unicode characters that have a similar GSM-7 character and replace them. Can be: `true` or `false`.
+ * @param string[] $persistentAction Rich actions for non-SMS/MMS channels. Used for [sending location in WhatsApp messages](https://www.twilio.com/docs/whatsapp/message-features#location-messages-with-whatsapp).
+ * @param bool $shortenUrls For Messaging Services with [Link Shortening configured](https://www.twilio.com/docs/messaging/features/link-shortening) only: A Boolean indicating whether or not Twilio should shorten links in the `body` of the Message. Default value is `false`. If `true`, the `messaging_service_sid` parameter must also be provided.
+ * @param string $scheduleType
+ * @param \DateTime $sendAt The time that Twilio will send the message. Must be in ISO 8601 format.
+ * @param bool $sendAsMms If set to `true`, Twilio delivers the message as a single MMS message, regardless of the presence of media.
+ * @param string $contentVariables For [Content Editor/API](https://www.twilio.com/docs/content) only: Key-value pairs of [Template variables](https://www.twilio.com/docs/content/using-variables-with-content-api) and their substitution values. `content_sid` parameter must also be provided. If values are not defined in the `content_variables` parameter, the [Template's default placeholder values](https://www.twilio.com/docs/content/content-api-resources#create-templates) are used.
+ * @param string $riskCheck
*/
- public function __construct($from = Values::NONE, $messagingServiceSid = Values::NONE, $body = Values::NONE, $mediaUrl = Values::NONE, $statusCallback = Values::NONE, $applicationSid = Values::NONE, $maxPrice = Values::NONE, $provideFeedback = Values::NONE, $validityPeriod = Values::NONE, $forceDelivery = Values::NONE, $contentRetention = Values::NONE, $addressRetention = Values::NONE, $smartEncoded = Values::NONE, $persistentAction = Values::NONE)
- {
+ public function __construct(
+
+ string $from = Values::NONE,
+ string $messagingServiceSid = Values::NONE,
+ string $body = Values::NONE,
+ array $mediaUrl = Values::ARRAY_NONE,
+ string $contentSid = Values::NONE,
+ string $statusCallback = Values::NONE,
+ string $applicationSid = Values::NONE,
+ string $maxPrice = Values::NONE,
+ bool $provideFeedback = Values::BOOL_NONE,
+ int $attempt = Values::INT_NONE,
+ int $validityPeriod = Values::INT_NONE,
+ bool $forceDelivery = Values::BOOL_NONE,
+ string $contentRetention = Values::NONE,
+ string $addressRetention = Values::NONE,
+ bool $smartEncoded = Values::BOOL_NONE,
+ array $persistentAction = Values::ARRAY_NONE,
+ bool $shortenUrls = Values::BOOL_NONE,
+ string $scheduleType = Values::NONE,
+ \DateTime $sendAt = null,
+ bool $sendAsMms = Values::BOOL_NONE,
+ string $contentVariables = Values::NONE,
+ string $riskCheck = Values::NONE
+
+ ) {
$this->options['from'] = $from;
$this->options['messagingServiceSid'] = $messagingServiceSid;
$this->options['body'] = $body;
$this->options['mediaUrl'] = $mediaUrl;
+ $this->options['contentSid'] = $contentSid;
$this->options['statusCallback'] = $statusCallback;
$this->options['applicationSid'] = $applicationSid;
$this->options['maxPrice'] = $maxPrice;
$this->options['provideFeedback'] = $provideFeedback;
+ $this->options['attempt'] = $attempt;
$this->options['validityPeriod'] = $validityPeriod;
$this->options['forceDelivery'] = $forceDelivery;
$this->options['contentRetention'] = $contentRetention;
$this->options['addressRetention'] = $addressRetention;
$this->options['smartEncoded'] = $smartEncoded;
$this->options['persistentAction'] = $persistentAction;
+ $this->options['shortenUrls'] = $shortenUrls;
+ $this->options['scheduleType'] = $scheduleType;
+ $this->options['sendAt'] = $sendAt;
+ $this->options['sendAsMms'] = $sendAsMms;
+ $this->options['contentVariables'] = $contentVariables;
+ $this->options['riskCheck'] = $riskCheck;
}
/**
- * A Twilio phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, an [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), or a [Channel Endpoint address](https://www.twilio.com/docs/sms/channels#channel-addresses) that is enabled for the type of message you want to send. Phone numbers or [short codes](https://www.twilio.com/docs/sms/api/short-code) purchased from Twilio also work here. You cannot, for example, spoof messages from a private cell phone number. If you are using `messaging_service_sid`, this parameter must be empty.
+ * The sender's Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/quickstart), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/en-us/messaging/channels/sms/short-codes), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belongs to the Account creating the Message. If you are using `messaging_service_sid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service's Sender Pool) or you can provide a specific sender from your Sender Pool.
*
- * @param string $from The phone number that initiated the message
+ * @param string $from The sender's Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/quickstart), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/en-us/messaging/channels/sms/short-codes), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belongs to the Account creating the Message. If you are using `messaging_service_sid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service's Sender Pool) or you can provide a specific sender from your Sender Pool.
* @return $this Fluent Builder
*/
- public function setFrom($from)
+ public function setFrom(string $from): self
{
$this->options['from'] = $from;
return $this;
}
/**
- * The SID of the [Messaging Service](https://www.twilio.com/docs/sms/services#send-a-message-with-copilot) you want to associate with the Message. Set this parameter to use the [Messaging Service Settings and Copilot Features](https://www.twilio.com/console/sms/services) you have configured and leave the `from` parameter empty. When only this parameter is set, Twilio will use your enabled Copilot Features to select the `from` phone number for delivery.
+ * The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services) you want to associate with the Message. When this parameter is provided and the `from` parameter is omitted, Twilio selects the optimal sender from the Messaging Service's Sender Pool. You may also provide a `from` parameter if you want to use a specific Sender from the Sender Pool.
*
- * @param string $messagingServiceSid The SID of the Messaging Service you want
- * to associate with the message.
+ * @param string $messagingServiceSid The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services) you want to associate with the Message. When this parameter is provided and the `from` parameter is omitted, Twilio selects the optimal sender from the Messaging Service's Sender Pool. You may also provide a `from` parameter if you want to use a specific Sender from the Sender Pool.
* @return $this Fluent Builder
*/
- public function setMessagingServiceSid($messagingServiceSid)
+ public function setMessagingServiceSid(string $messagingServiceSid): self
{
$this->options['messagingServiceSid'] = $messagingServiceSid;
return $this;
}
/**
- * The text of the message you want to send. Can be up to 1,600 characters in length.
+ * The text content of the outgoing message. Can be up to 1,600 characters in length. SMS only: If the `body` contains more than 160 [GSM-7](https://www.twilio.com/docs/glossary/what-is-gsm-7-character-encoding) characters (or 70 [UCS-2](https://www.twilio.com/docs/glossary/what-is-ucs-2-character-encoding) characters), the message is segmented and charged accordingly. For long `body` text, consider using the [send_as_mms parameter](https://www.twilio.com/blog/mms-for-long-text-messages).
*
- * @param string $body The text of the message you want to send. Can be up to
- * 1,600 characters in length.
+ * @param string $body The text content of the outgoing message. Can be up to 1,600 characters in length. SMS only: If the `body` contains more than 160 [GSM-7](https://www.twilio.com/docs/glossary/what-is-gsm-7-character-encoding) characters (or 70 [UCS-2](https://www.twilio.com/docs/glossary/what-is-ucs-2-character-encoding) characters), the message is segmented and charged accordingly. For long `body` text, consider using the [send_as_mms parameter](https://www.twilio.com/blog/mms-for-long-text-messages).
* @return $this Fluent Builder
*/
- public function setBody($body)
+ public function setBody(string $body): self
{
$this->options['body'] = $body;
return $this;
}
/**
- * The URL of the media to send with the message. The media can be of type `gif`, `png`, and `jpeg` and will be formatted correctly on the recipient's device. The media size limit is 5MB for supported file types (JPEG, PNG, GIF) and 500KB for [other types](https://www.twilio.com/docs/sms/accepted-mime-types) of accepted media. To send more than one image in the message body, provide multiple `media_url` parameters in the POST request. You can include up to 10 `media_url` parameters per message. You can send images in an SMS message in only the US and Canada.
+ * The URL of media to include in the Message content. `jpeg`, `jpg`, `gif`, and `png` file types are fully supported by Twilio and content is formatted for delivery on destination devices. The media size limit is 5 MB for supported file types (`jpeg`, `jpg`, `png`, `gif`) and 500 KB for [other types](https://www.twilio.com/docs/messaging/guides/accepted-mime-types) of accepted media. To send more than one image in the message, provide multiple `media_url` parameters in the POST request. You can include up to ten `media_url` parameters per message. [International](https://support.twilio.com/hc/en-us/articles/223179808-Sending-and-receiving-MMS-messages) and [carrier](https://support.twilio.com/hc/en-us/articles/223133707-Is-MMS-supported-for-all-carriers-in-US-and-Canada-) limits apply.
*
- * @param string $mediaUrl The URL of the media to send with the message
+ * @param string[] $mediaUrl The URL of media to include in the Message content. `jpeg`, `jpg`, `gif`, and `png` file types are fully supported by Twilio and content is formatted for delivery on destination devices. The media size limit is 5 MB for supported file types (`jpeg`, `jpg`, `png`, `gif`) and 500 KB for [other types](https://www.twilio.com/docs/messaging/guides/accepted-mime-types) of accepted media. To send more than one image in the message, provide multiple `media_url` parameters in the POST request. You can include up to ten `media_url` parameters per message. [International](https://support.twilio.com/hc/en-us/articles/223179808-Sending-and-receiving-MMS-messages) and [carrier](https://support.twilio.com/hc/en-us/articles/223133707-Is-MMS-supported-for-all-carriers-in-US-and-Canada-) limits apply.
* @return $this Fluent Builder
*/
- public function setMediaUrl($mediaUrl)
+ public function setMediaUrl(array $mediaUrl): self
{
$this->options['mediaUrl'] = $mediaUrl;
return $this;
}
/**
- * The URL we should call using the `status_callback_method` to send status information to your application. If specified, we POST these message status changes to the URL: `queued`, `failed`, `sent`, `delivered`, or `undelivered`. Twilio will POST its [standard request parameters](https://www.twilio.com/docs/sms/twiml#request-parameters) as well as some additional parameters including `MessageSid`, `MessageStatus`, and `ErrorCode`. If you include this parameter with the `messaging_service_sid`, we use this URL instead of the Status Callback URL of the [Messaging Service](https://www.twilio.com/docs/sms/services/api). URLs must contain a valid hostname and underscores are not allowed.
+ * For [Content Editor/API](https://www.twilio.com/docs/content) only: The SID of the Content Template to be used with the Message, e.g., `HXXXXXXXXXXXXXXXXXXXXXXXXXXXXX`. If this parameter is not provided, a Content Template is not used. Find the SID in the Console on the Content Editor page. For Content API users, the SID is found in Twilio's response when [creating the Template](https://www.twilio.com/docs/content/content-api-resources#create-templates) or by [fetching your Templates](https://www.twilio.com/docs/content/content-api-resources#fetch-all-content-resources).
*
- * @param string $statusCallback The URL we should call to send status
- * information to your application
+ * @param string $contentSid For [Content Editor/API](https://www.twilio.com/docs/content) only: The SID of the Content Template to be used with the Message, e.g., `HXXXXXXXXXXXXXXXXXXXXXXXXXXXXX`. If this parameter is not provided, a Content Template is not used. Find the SID in the Console on the Content Editor page. For Content API users, the SID is found in Twilio's response when [creating the Template](https://www.twilio.com/docs/content/content-api-resources#create-templates) or by [fetching your Templates](https://www.twilio.com/docs/content/content-api-resources#fetch-all-content-resources).
* @return $this Fluent Builder
*/
- public function setStatusCallback($statusCallback)
+ public function setContentSid(string $contentSid): self
+ {
+ $this->options['contentSid'] = $contentSid;
+ return $this;
+ }
+
+ /**
+ * The URL of the endpoint to which Twilio sends [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url). URL must contain a valid hostname and underscores are not allowed. If you include this parameter with the `messaging_service_sid`, Twilio uses this URL instead of the Status Callback URL of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource).
+ *
+ * @param string $statusCallback The URL of the endpoint to which Twilio sends [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url). URL must contain a valid hostname and underscores are not allowed. If you include this parameter with the `messaging_service_sid`, Twilio uses this URL instead of the Status Callback URL of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource).
+ * @return $this Fluent Builder
+ */
+ public function setStatusCallback(string $statusCallback): self
{
$this->options['statusCallback'] = $statusCallback;
return $this;
}
/**
- * The SID of the application that should receive message status. We POST a `message_sid` parameter and a `message_status` parameter with a value of `sent` or `failed` to the [application](https://www.twilio.com/docs/usage/api/applications)'s `message_status_callback`. If a `status_callback` parameter is also passed, it will be ignored and the application's `message_status_callback` parameter will be used.
+ * The SID of the associated [TwiML Application](https://www.twilio.com/docs/usage/api/applications). [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url) are sent to the TwiML App's `message_status_callback` URL. Note that the `status_callback` parameter of a request takes priority over the `application_sid` parameter; if both are included `application_sid` is ignored.
*
- * @param string $applicationSid The application to use for callbacks
+ * @param string $applicationSid The SID of the associated [TwiML Application](https://www.twilio.com/docs/usage/api/applications). [Message status callback requests](https://www.twilio.com/docs/sms/api/message-resource#twilios-request-to-the-statuscallback-url) are sent to the TwiML App's `message_status_callback` URL. Note that the `status_callback` parameter of a request takes priority over the `application_sid` parameter; if both are included `application_sid` is ignored.
* @return $this Fluent Builder
*/
- public function setApplicationSid($applicationSid)
+ public function setApplicationSid(string $applicationSid): self
{
$this->options['applicationSid'] = $applicationSid;
return $this;
}
/**
- * The maximum total price in US dollars that you will pay for the message to be delivered. Can be a decimal value that has up to 4 decimal places. All messages are queued for delivery and the message cost is checked before the message is sent. If the cost exceeds `max_price`, the message will fail and a status of `Failed` is sent to the status callback. If `MaxPrice` is not set, the message cost is not checked.
+ * [OBSOLETE] This parameter will no longer have any effect as of 2024-06-03.
*
- * @param string $maxPrice The total maximum price up to 4 decimal places in US
- * dollars acceptable for the message to be delivered.
+ * @param string $maxPrice [OBSOLETE] This parameter will no longer have any effect as of 2024-06-03.
* @return $this Fluent Builder
*/
- public function setMaxPrice($maxPrice)
+ public function setMaxPrice(string $maxPrice): self
{
$this->options['maxPrice'] = $maxPrice;
return $this;
}
/**
- * Whether to confirm delivery of the message. Set this value to `true` if you are sending messages that have a trackable user action and you intend to confirm delivery of the message using the [Message Feedback API](https://www.twilio.com/docs/sms/api/message-feedback-resource). This parameter is `false` by default.
+ * Boolean indicating whether or not you intend to provide delivery confirmation feedback to Twilio (used in conjunction with the [Message Feedback subresource](https://www.twilio.com/docs/sms/api/message-feedback-resource)). Default value is `false`.
*
- * @param bool $provideFeedback Whether to confirm delivery of the message
+ * @param bool $provideFeedback Boolean indicating whether or not you intend to provide delivery confirmation feedback to Twilio (used in conjunction with the [Message Feedback subresource](https://www.twilio.com/docs/sms/api/message-feedback-resource)). Default value is `false`.
* @return $this Fluent Builder
*/
- public function setProvideFeedback($provideFeedback)
+ public function setProvideFeedback(bool $provideFeedback): self
{
$this->options['provideFeedback'] = $provideFeedback;
return $this;
}
/**
- * How long in seconds the message can remain in our outgoing message queue. After this period elapses, the message fails and we call your status callback. Can be between 1 and the default value of 14,400 seconds. After a message has been accepted by a carrier, however, we cannot guarantee that the message will not be queued after this period. We recommend that this value be at least 5 seconds.
+ * Total number of attempts made (including this request) to send the message regardless of the provider used
+ *
+ * @param int $attempt Total number of attempts made (including this request) to send the message regardless of the provider used
+ * @return $this Fluent Builder
+ */
+ public function setAttempt(int $attempt): self
+ {
+ $this->options['attempt'] = $attempt;
+ return $this;
+ }
+
+ /**
+ * The maximum length in seconds that the Message can remain in Twilio's outgoing message queue. If a queued Message exceeds the `validity_period`, the Message is not sent. Accepted values are integers from `1` to `36000`. Default value is `36000`. A `validity_period` greater than `5` is recommended. [Learn more about the validity period](https://www.twilio.com/blog/take-more-control-of-outbound-messages-using-validity-period-html)
*
- * @param int $validityPeriod The number of seconds that the message can remain
- * in our outgoing queue.
+ * @param int $validityPeriod The maximum length in seconds that the Message can remain in Twilio's outgoing message queue. If a queued Message exceeds the `validity_period`, the Message is not sent. Accepted values are integers from `1` to `36000`. Default value is `36000`. A `validity_period` greater than `5` is recommended. [Learn more about the validity period](https://www.twilio.com/blog/take-more-control-of-outbound-messages-using-validity-period-html)
* @return $this Fluent Builder
*/
- public function setValidityPeriod($validityPeriod)
+ public function setValidityPeriod(int $validityPeriod): self
{
$this->options['validityPeriod'] = $validityPeriod;
return $this;
@@ -221,33 +361,27 @@ public function setValidityPeriod($validityPeriod)
* @param bool $forceDelivery Reserved
* @return $this Fluent Builder
*/
- public function setForceDelivery($forceDelivery)
+ public function setForceDelivery(bool $forceDelivery): self
{
$this->options['forceDelivery'] = $forceDelivery;
return $this;
}
/**
- * Determines if the message content can be stored or redacted based on privacy settings
- *
- * @param string $contentRetention Determines if the message content can be
- * stored or redacted based on privacy settings
+ * @param string $contentRetention
* @return $this Fluent Builder
*/
- public function setContentRetention($contentRetention)
+ public function setContentRetention(string $contentRetention): self
{
$this->options['contentRetention'] = $contentRetention;
return $this;
}
/**
- * Determines if the address can be stored or obfuscated based on privacy settings
- *
- * @param string $addressRetention Determines if the address can be stored or
- * obfuscated based on privacy settings
+ * @param string $addressRetention
* @return $this Fluent Builder
*/
- public function setAddressRetention($addressRetention)
+ public function setAddressRetention(string $addressRetention): self
{
$this->options['addressRetention'] = $addressRetention;
return $this;
@@ -256,56 +390,127 @@ public function setAddressRetention($addressRetention)
/**
* Whether to detect Unicode characters that have a similar GSM-7 character and replace them. Can be: `true` or `false`.
*
- * @param bool $smartEncoded Whether to detect Unicode characters that have a
- * similar GSM-7 character and replace them
+ * @param bool $smartEncoded Whether to detect Unicode characters that have a similar GSM-7 character and replace them. Can be: `true` or `false`.
* @return $this Fluent Builder
*/
- public function setSmartEncoded($smartEncoded)
+ public function setSmartEncoded(bool $smartEncoded): self
{
$this->options['smartEncoded'] = $smartEncoded;
return $this;
}
/**
- * Rich actions for Channels Messages.
+ * Rich actions for non-SMS/MMS channels. Used for [sending location in WhatsApp messages](https://www.twilio.com/docs/whatsapp/message-features#location-messages-with-whatsapp).
*
- * @param string $persistentAction Rich actions for Channels Messages.
+ * @param string[] $persistentAction Rich actions for non-SMS/MMS channels. Used for [sending location in WhatsApp messages](https://www.twilio.com/docs/whatsapp/message-features#location-messages-with-whatsapp).
* @return $this Fluent Builder
*/
- public function setPersistentAction($persistentAction)
+ public function setPersistentAction(array $persistentAction): self
{
$this->options['persistentAction'] = $persistentAction;
return $this;
}
+ /**
+ * For Messaging Services with [Link Shortening configured](https://www.twilio.com/docs/messaging/features/link-shortening) only: A Boolean indicating whether or not Twilio should shorten links in the `body` of the Message. Default value is `false`. If `true`, the `messaging_service_sid` parameter must also be provided.
+ *
+ * @param bool $shortenUrls For Messaging Services with [Link Shortening configured](https://www.twilio.com/docs/messaging/features/link-shortening) only: A Boolean indicating whether or not Twilio should shorten links in the `body` of the Message. Default value is `false`. If `true`, the `messaging_service_sid` parameter must also be provided.
+ * @return $this Fluent Builder
+ */
+ public function setShortenUrls(bool $shortenUrls): self
+ {
+ $this->options['shortenUrls'] = $shortenUrls;
+ return $this;
+ }
+
+ /**
+ * @param string $scheduleType
+ * @return $this Fluent Builder
+ */
+ public function setScheduleType(string $scheduleType): self
+ {
+ $this->options['scheduleType'] = $scheduleType;
+ return $this;
+ }
+
+ /**
+ * The time that Twilio will send the message. Must be in ISO 8601 format.
+ *
+ * @param \DateTime $sendAt The time that Twilio will send the message. Must be in ISO 8601 format.
+ * @return $this Fluent Builder
+ */
+ public function setSendAt(\DateTime $sendAt): self
+ {
+ $this->options['sendAt'] = $sendAt;
+ return $this;
+ }
+
+ /**
+ * If set to `true`, Twilio delivers the message as a single MMS message, regardless of the presence of media.
+ *
+ * @param bool $sendAsMms If set to `true`, Twilio delivers the message as a single MMS message, regardless of the presence of media.
+ * @return $this Fluent Builder
+ */
+ public function setSendAsMms(bool $sendAsMms): self
+ {
+ $this->options['sendAsMms'] = $sendAsMms;
+ return $this;
+ }
+
+ /**
+ * For [Content Editor/API](https://www.twilio.com/docs/content) only: Key-value pairs of [Template variables](https://www.twilio.com/docs/content/using-variables-with-content-api) and their substitution values. `content_sid` parameter must also be provided. If values are not defined in the `content_variables` parameter, the [Template's default placeholder values](https://www.twilio.com/docs/content/content-api-resources#create-templates) are used.
+ *
+ * @param string $contentVariables For [Content Editor/API](https://www.twilio.com/docs/content) only: Key-value pairs of [Template variables](https://www.twilio.com/docs/content/using-variables-with-content-api) and their substitution values. `content_sid` parameter must also be provided. If values are not defined in the `content_variables` parameter, the [Template's default placeholder values](https://www.twilio.com/docs/content/content-api-resources#create-templates) are used.
+ * @return $this Fluent Builder
+ */
+ public function setContentVariables(string $contentVariables): self
+ {
+ $this->options['contentVariables'] = $contentVariables;
+ return $this;
+ }
+
+ /**
+ * @param string $riskCheck
+ * @return $this Fluent Builder
+ */
+ public function setRiskCheck(string $riskCheck): self
+ {
+ $this->options['riskCheck'] = $riskCheck;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.CreateMessageOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.CreateMessageOptions ' . $options . ']';
}
}
+
+
class ReadMessageOptions extends Options
-{
+ {
/**
- * @param string $to Filter by messages sent to this number
- * @param string $from Filter by from number
- * @param string $dateSentBefore Filter by date sent
- * @param string $dateSent Filter by date sent
- * @param string $dateSentAfter Filter by date sent
+ * @param string $to Filter by recipient. For example: Set this `to` parameter to `+15558881111` to retrieve a list of Message resources with `to` properties of `+15558881111`
+ * @param string $from Filter by sender. For example: Set this `from` parameter to `+15552229999` to retrieve a list of Message resources with `from` properties of `+15552229999`
+ * @param string $dateSentBefore Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
+ * @param string $dateSent Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
+ * @param string $dateSentAfter Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
*/
- public function __construct($to = Values::NONE, $from = Values::NONE, $dateSentBefore = Values::NONE, $dateSent = Values::NONE, $dateSentAfter = Values::NONE)
- {
+ public function __construct(
+
+ string $to = Values::NONE,
+ string $from = Values::NONE,
+ string $dateSentBefore = null,
+ string $dateSent = null,
+ string $dateSentAfter = null
+
+ ) {
$this->options['to'] = $to;
$this->options['from'] = $from;
$this->options['dateSentBefore'] = $dateSentBefore;
@@ -314,60 +519,60 @@ public function __construct($to = Values::NONE, $from = Values::NONE, $dateSentB
}
/**
- * Read messages sent to only this phone number.
+ * Filter by recipient. For example: Set this `to` parameter to `+15558881111` to retrieve a list of Message resources with `to` properties of `+15558881111`
*
- * @param string $to Filter by messages sent to this number
+ * @param string $to Filter by recipient. For example: Set this `to` parameter to `+15558881111` to retrieve a list of Message resources with `to` properties of `+15558881111`
* @return $this Fluent Builder
*/
- public function setTo($to)
+ public function setTo(string $to): self
{
$this->options['to'] = $to;
return $this;
}
/**
- * Read messages sent from only this phone number or alphanumeric sender ID.
+ * Filter by sender. For example: Set this `from` parameter to `+15552229999` to retrieve a list of Message resources with `from` properties of `+15552229999`
*
- * @param string $from Filter by from number
+ * @param string $from Filter by sender. For example: Set this `from` parameter to `+15552229999` to retrieve a list of Message resources with `from` properties of `+15552229999`
* @return $this Fluent Builder
*/
- public function setFrom($from)
+ public function setFrom(string $from): self
{
$this->options['from'] = $from;
return $this;
}
/**
- * The date of the messages to show. Specify a date as `YYYY-MM-DD` in GMT to read only messages sent on this date. For example: `2009-07-06`. You can also specify an inequality, such as `DateSent<=YYYY-MM-DD`, to read messages sent on or before midnight on a date, and `DateSent>=YYYY-MM-DD` to read messages sent on or after midnight on a date.
+ * Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
*
- * @param string $dateSentBefore Filter by date sent
+ * @param string $dateSentBefore Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
* @return $this Fluent Builder
*/
- public function setDateSentBefore($dateSentBefore)
+ public function setDateSentBefore(string $dateSentBefore): self
{
$this->options['dateSentBefore'] = $dateSentBefore;
return $this;
}
/**
- * The date of the messages to show. Specify a date as `YYYY-MM-DD` in GMT to read only messages sent on this date. For example: `2009-07-06`. You can also specify an inequality, such as `DateSent<=YYYY-MM-DD`, to read messages sent on or before midnight on a date, and `DateSent>=YYYY-MM-DD` to read messages sent on or after midnight on a date.
+ * Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
*
- * @param string $dateSent Filter by date sent
+ * @param string $dateSent Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
* @return $this Fluent Builder
*/
- public function setDateSent($dateSent)
+ public function setDateSent(string $dateSent): self
{
$this->options['dateSent'] = $dateSent;
return $this;
}
/**
- * The date of the messages to show. Specify a date as `YYYY-MM-DD` in GMT to read only messages sent on this date. For example: `2009-07-06`. You can also specify an inequality, such as `DateSent<=YYYY-MM-DD`, to read messages sent on or before midnight on a date, and `DateSent>=YYYY-MM-DD` to read messages sent on or after midnight on a date.
+ * Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
*
- * @param string $dateSentAfter Filter by date sent
+ * @param string $dateSentAfter Filter by Message `sent_date`. Accepts GMT dates in the following formats: `YYYY-MM-DD` (to find Messages with a specific `sent_date`), `<=YYYY-MM-DD` (to find Messages with `sent_date`s on and before a specific date), and `>=YYYY-MM-DD` (to find Messages with `sent_dates` on and after a specific date).
* @return $this Fluent Builder
*/
- public function setDateSentAfter($dateSentAfter)
+ public function setDateSentAfter(string $dateSentAfter): self
{
$this->options['dateSentAfter'] = $dateSentAfter;
return $this;
@@ -378,14 +583,60 @@ public function setDateSentAfter($dateSentAfter)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
+ {
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.ReadMessageOptions ' . $options . ']';
+ }
+}
+
+class UpdateMessageOptions extends Options
+ {
+ /**
+ * @param string $body The new `body` of the Message resource. To redact the text content of a Message, this parameter's value must be an empty string
+ * @param string $status
+ */
+ public function __construct(
+
+ string $body = Values::NONE,
+ string $status = Values::NONE
+
+ ) {
+ $this->options['body'] = $body;
+ $this->options['status'] = $status;
+ }
+
+ /**
+ * The new `body` of the Message resource. To redact the text content of a Message, this parameter's value must be an empty string
+ *
+ * @param string $body The new `body` of the Message resource. To redact the text content of a Message, this parameter's value must be an empty string
+ * @return $this Fluent Builder
+ */
+ public function setBody(string $body): self
+ {
+ $this->options['body'] = $body;
+ return $this;
+ }
+
+ /**
+ * @param string $status
+ * @return $this Fluent Builder
+ */
+ public function setStatus(string $status): self
+ {
+ $this->options['status'] = $status;
+ return $this;
+ }
+
+ /**
+ * Provide a friendly representation
+ *
+ * @return string Machine friendly representation
+ */
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.ReadMessageOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.UpdateMessageOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/MessagePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/MessagePage.php
index f8bc7de..b07c10d 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/MessagePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/MessagePage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return MessageInstance \Twilio\Rest\Api\V2010\Account\MessageInstance
+ */
+ public function buildInstance(array $payload): MessageInstance
{
return new MessageInstance($this->version, $payload, $this->solution['accountSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.MessagePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NewKeyInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NewKeyInstance.php
index d5b0538..aa4680e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NewKeyInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NewKeyInstance.php
@@ -2,51 +2,58 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $friendlyName
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $secret
+ * @property string|null $sid
+ * @property string|null $friendlyName
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $secret
*/
class NewKeyInstance extends InstanceResource
{
/**
* Initialize the NewKeyInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid A 34 character string that uniquely identifies
- * this resource.
- * @return \Twilio\Rest\Api\V2010\Account\NewKeyInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will be responsible for the new Key resource.
*/
- public function __construct(Version $version, array $payload, $accountSid)
+ public function __construct(Version $version, array $payload, string $accountSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'secret' => Values::array_get($payload, 'secret'),
- );
+ ];
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = ['accountSid' => $accountSid, ];
}
/**
@@ -56,7 +63,7 @@ public function __construct(Version $version, array $payload, $accountSid)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -75,8 +82,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.NewKeyInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NewKeyList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NewKeyList.php
index bd3726e..f2d3365 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NewKeyList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NewKeyList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account;
@@ -15,56 +22,67 @@
use Twilio\Values;
use Twilio\Version;
+
class NewKeyList extends ListResource
-{
+ {
/**
* Construct the NewKeyList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid A 34 character string that uniquely identifies
- * this resource.
- * @return \Twilio\Rest\Api\V2010\Account\NewKeyList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will be responsible for the new Key resource.
*/
- public function __construct(Version $version, $accountSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ ];
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Keys.json';
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Keys.json';
}
/**
- * Create a new NewKeyInstance
+ * Create the NewKeyInstance
*
* @param array|Options $options Optional Arguments
- * @return NewKeyInstance Newly created NewKeyInstance
+ * @return NewKeyInstance Created NewKeyInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($options = array())
+ public function create(array $options = []): NewKeyInstance
{
+
$options = new Values($options);
- $data = Values::of(array('FriendlyName' => $options['friendlyName'],));
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ ]);
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
- return new NewKeyInstance($this->version, $payload, $this->solution['accountSid']);
+ return new NewKeyInstance(
+ $this->version,
+ $payload,
+ $this->solution['accountSid']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.NewKeyList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NewKeyOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NewKeyOptions.php
index 6b91f19..f7d958d 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NewKeyOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NewKeyOptions.php
@@ -1,10 +1,16 @@
options['friendlyName'] = $friendlyName;
}
/**
* A descriptive string that you create to describe the resource. It can be up to 64 characters long.
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -51,14 +67,10 @@ public function setFriendlyName($friendlyName)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.CreateNewKeyOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.CreateNewKeyOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NewKeyPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NewKeyPage.php
index 7a61034..e2788a7 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NewKeyPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NewKeyPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return NewKeyInstance \Twilio\Rest\Api\V2010\Account\NewKeyInstance
+ */
+ public function buildInstance(array $payload): NewKeyInstance
{
return new NewKeyInstance($this->version, $payload, $this->solution['accountSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.NewKeyPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NewSigningKeyInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NewSigningKeyInstance.php
index 683db9e..3c010e2 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NewSigningKeyInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NewSigningKeyInstance.php
@@ -2,51 +2,58 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $friendlyName
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $secret
+ * @property string|null $sid
+ * @property string|null $friendlyName
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $secret
*/
class NewSigningKeyInstance extends InstanceResource
{
/**
* Initialize the NewSigningKeyInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid A 34 character string that uniquely identifies
- * this resource.
- * @return \Twilio\Rest\Api\V2010\Account\NewSigningKeyInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will be responsible for the new Key resource.
*/
- public function __construct(Version $version, array $payload, $accountSid)
+ public function __construct(Version $version, array $payload, string $accountSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'secret' => Values::array_get($payload, 'secret'),
- );
+ ];
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = ['accountSid' => $accountSid, ];
}
/**
@@ -56,7 +63,7 @@ public function __construct(Version $version, array $payload, $accountSid)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -75,8 +82,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.NewSigningKeyInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NewSigningKeyList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NewSigningKeyList.php
index a056ca0..d0cc276 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NewSigningKeyList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NewSigningKeyList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account;
@@ -15,56 +22,67 @@
use Twilio\Values;
use Twilio\Version;
+
class NewSigningKeyList extends ListResource
-{
+ {
/**
* Construct the NewSigningKeyList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid A 34 character string that uniquely identifies
- * this resource.
- * @return \Twilio\Rest\Api\V2010\Account\NewSigningKeyList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will be responsible for the new Key resource.
*/
- public function __construct(Version $version, $accountSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ ];
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SigningKeys.json';
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/SigningKeys.json';
}
/**
- * Create a new NewSigningKeyInstance
+ * Create the NewSigningKeyInstance
*
* @param array|Options $options Optional Arguments
- * @return NewSigningKeyInstance Newly created NewSigningKeyInstance
+ * @return NewSigningKeyInstance Created NewSigningKeyInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($options = array())
+ public function create(array $options = []): NewSigningKeyInstance
{
+
$options = new Values($options);
- $data = Values::of(array('FriendlyName' => $options['friendlyName'],));
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ ]);
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
- return new NewSigningKeyInstance($this->version, $payload, $this->solution['accountSid']);
+ return new NewSigningKeyInstance(
+ $this->version,
+ $payload,
+ $this->solution['accountSid']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.NewSigningKeyList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NewSigningKeyOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NewSigningKeyOptions.php
index 29b2f2f..fb6ee57 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NewSigningKeyOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NewSigningKeyOptions.php
@@ -1,10 +1,16 @@
options['friendlyName'] = $friendlyName;
}
/**
* A descriptive string that you create to describe the resource. It can be up to 64 characters long.
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -51,14 +67,10 @@ public function setFriendlyName($friendlyName)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.CreateNewSigningKeyOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.CreateNewSigningKeyOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NewSigningKeyPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NewSigningKeyPage.php
index 533401c..bf7ad41 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NewSigningKeyPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NewSigningKeyPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return NewSigningKeyInstance \Twilio\Rest\Api\V2010\Account\NewSigningKeyInstance
+ */
+ public function buildInstance(array $payload): NewSigningKeyInstance
{
return new NewSigningKeyInstance($this->version, $payload, $this->solution['accountSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.NewSigningKeyPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NotificationContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NotificationContext.php
index d591a64..de1430e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NotificationContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NotificationContext.php
@@ -2,54 +2,67 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class NotificationContext extends InstanceContext
-{
+ {
/**
* Initialize the NotificationContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * to fetch
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\NotificationContext
+ * @param Version $version Version that contains the resource
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Notification resource to fetch.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Notification resource to fetch.
*/
- public function __construct(Version $version, $accountSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $accountSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'sid' => $sid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Notifications/' . \rawurlencode($sid) . '.json';
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Notifications/' . \rawurlencode($sid)
+ .'.json';
}
/**
- * Fetch a NotificationInstance
+ * Fetch the NotificationInstance
*
* @return NotificationInstance Fetched NotificationInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): NotificationInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new NotificationInstance(
$this->version,
@@ -59,17 +72,18 @@ public function fetch()
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.NotificationContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NotificationInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NotificationInstance.php
index 6c24df1..a7bd766 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NotificationInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NotificationInstance.php
@@ -2,55 +2,63 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property string $apiVersion
- * @property string $callSid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $errorCode
- * @property string $log
- * @property \DateTime $messageDate
- * @property string $messageText
- * @property string $moreInfo
- * @property string $requestMethod
- * @property string $requestUrl
- * @property string $requestVariables
- * @property string $responseBody
- * @property string $responseHeaders
- * @property string $sid
- * @property string $uri
+ * @property string|null $accountSid
+ * @property string|null $apiVersion
+ * @property string|null $callSid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $errorCode
+ * @property string|null $log
+ * @property \DateTime|null $messageDate
+ * @property string|null $messageText
+ * @property string|null $moreInfo
+ * @property string|null $requestMethod
+ * @property string|null $requestUrl
+ * @property string|null $requestVariables
+ * @property string|null $responseBody
+ * @property string|null $responseHeaders
+ * @property string|null $sid
+ * @property string|null $uri
*/
class NotificationInstance extends InstanceResource
{
/**
* Initialize the NotificationInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\NotificationInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Notification resource to fetch.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Notification resource to fetch.
*/
- public function __construct(Version $version, array $payload, $accountSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $accountSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'apiVersion' => Values::array_get($payload, 'api_version'),
'callSid' => Values::array_get($payload, 'call_sid'),
@@ -68,19 +76,18 @@ public function __construct(Version $version, array $payload, $accountSid, $sid
'responseHeaders' => Values::array_get($payload, 'response_headers'),
'sid' => Values::array_get($payload, 'sid'),
'uri' => Values::array_get($payload, 'uri'),
- );
+ ];
- $this->solution = array('accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Api\V2010\Account\NotificationContext Context for this
- * NotificationInstance
+ * @return NotificationContext Context for this NotificationInstance
*/
- protected function proxy()
+ protected function proxy(): NotificationContext
{
if (!$this->context) {
$this->context = new NotificationContext(
@@ -94,13 +101,14 @@ protected function proxy()
}
/**
- * Fetch a NotificationInstance
+ * Fetch the NotificationInstance
*
* @return NotificationInstance Fetched NotificationInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): NotificationInstance
{
+
return $this->proxy()->fetch();
}
@@ -111,7 +119,7 @@ public function fetch()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -130,12 +138,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.NotificationInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NotificationList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NotificationList.php
index 1e81866..c79a19f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NotificationList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NotificationList.php
@@ -2,36 +2,72 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class NotificationList extends ListResource
-{
+ {
/**
* Construct the NotificationList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * @return \Twilio\Rest\Api\V2010\Account\NotificationList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Notification resource to fetch.
*/
- public function __construct(Version $version, $accountSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Notifications.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Notifications.json';
+ /**
+ * Reads NotificationInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return NotificationInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -51,9 +87,9 @@ public function __construct(Version $version, $accountSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -62,55 +98,39 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads NotificationInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return NotificationInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of NotificationInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of NotificationInstance
+ * @return NotificationPage Page of NotificationInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): NotificationPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Log' => $options['log'],
- 'MessageDate<' => Serialize::iso8601Date($options['messageDateBefore']),
- 'MessageDate' => Serialize::iso8601Date($options['messageDate']),
- 'MessageDate>' => Serialize::iso8601Date($options['messageDateAfter']),
+
+ $params = Values::of([
+ 'Log' =>
+ $options['log'],
+ 'MessageDate<' =>
+ Serialize::iso8601Date($options['messageDateBefore']),
+ 'MessageDate' =>
+ Serialize::iso8601Date($options['messageDate']),
+ 'MessageDate>' =>
+ Serialize::iso8601Date($options['messageDateAfter']),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new NotificationPage($this->version, $response, $this->solution);
}
@@ -120,9 +140,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of NotificationInstance
+ * @return NotificationPage Page of NotificationInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): NotificationPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -132,15 +152,22 @@ public function getPage($targetUrl)
return new NotificationPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a NotificationContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\NotificationContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the Notification resource to fetch.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): NotificationContext
{
- return new NotificationContext($this->version, $this->solution['accountSid'], $sid);
+ return new NotificationContext(
+ $this->version,
+ $this->solution['accountSid'],
+ $sid
+ );
}
/**
@@ -148,8 +175,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.NotificationList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NotificationOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NotificationOptions.php
index 3efbc7a..51a342f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NotificationOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NotificationOptions.php
@@ -1,10 +1,16 @@
=YYYY-MM-DD` for messages logged at or after midnight on a date.
+ * @param string $messageDate Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date.
+ * @param string $messageDateAfter Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date.
* @return ReadNotificationOptions Options builder
*/
- public static function read($log = Values::NONE, $messageDateBefore = Values::NONE, $messageDate = Values::NONE, $messageDateAfter = Values::NONE)
+ public static function read(
+
+ int $log = Values::INT_NONE,
+ string $messageDateBefore = null,
+ string $messageDate = null,
+ string $messageDateAfter = null
+
+ ): ReadNotificationOptions
{
- return new ReadNotificationOptions($log, $messageDateBefore, $messageDate, $messageDateAfter);
+ return new ReadNotificationOptions(
+ $log,
+ $messageDateBefore,
+ $messageDate,
+ $messageDateAfter
+ );
}
+
}
+
class ReadNotificationOptions extends Options
-{
+ {
/**
- * @param int $log Filter by log level
- * @param string $messageDateBefore Filter by date
- * @param string $messageDate Filter by date
- * @param string $messageDateAfter Filter by date
+ * @param int $log Only read notifications of the specified log level. Can be: `0` to read only ERROR notifications or `1` to read only WARNING notifications. By default, all notifications are read.
+ * @param string $messageDateBefore Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date.
+ * @param string $messageDate Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date.
+ * @param string $messageDateAfter Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date.
*/
- public function __construct($log = Values::NONE, $messageDateBefore = Values::NONE, $messageDate = Values::NONE, $messageDateAfter = Values::NONE)
- {
+ public function __construct(
+
+ int $log = Values::INT_NONE,
+ string $messageDateBefore = null,
+ string $messageDate = null,
+ string $messageDateAfter = null
+
+ ) {
$this->options['log'] = $log;
$this->options['messageDateBefore'] = $messageDateBefore;
$this->options['messageDate'] = $messageDate;
@@ -46,10 +73,10 @@ public function __construct($log = Values::NONE, $messageDateBefore = Values::NO
/**
* Only read notifications of the specified log level. Can be: `0` to read only ERROR notifications or `1` to read only WARNING notifications. By default, all notifications are read.
*
- * @param int $log Filter by log level
+ * @param int $log Only read notifications of the specified log level. Can be: `0` to read only ERROR notifications or `1` to read only WARNING notifications. By default, all notifications are read.
* @return $this Fluent Builder
*/
- public function setLog($log)
+ public function setLog(int $log): self
{
$this->options['log'] = $log;
return $this;
@@ -58,10 +85,10 @@ public function setLog($log)
/**
* Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date.
*
- * @param string $messageDateBefore Filter by date
+ * @param string $messageDateBefore Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date.
* @return $this Fluent Builder
*/
- public function setMessageDateBefore($messageDateBefore)
+ public function setMessageDateBefore(string $messageDateBefore): self
{
$this->options['messageDateBefore'] = $messageDateBefore;
return $this;
@@ -70,10 +97,10 @@ public function setMessageDateBefore($messageDateBefore)
/**
* Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date.
*
- * @param string $messageDate Filter by date
+ * @param string $messageDate Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date.
* @return $this Fluent Builder
*/
- public function setMessageDate($messageDate)
+ public function setMessageDate(string $messageDate): self
{
$this->options['messageDate'] = $messageDate;
return $this;
@@ -82,10 +109,10 @@ public function setMessageDate($messageDate)
/**
* Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date.
*
- * @param string $messageDateAfter Filter by date
+ * @param string $messageDateAfter Only show notifications for the specified date, formatted as `YYYY-MM-DD`. You can also specify an inequality, such as `<=YYYY-MM-DD` for messages logged at or before midnight on a date, or `>=YYYY-MM-DD` for messages logged at or after midnight on a date.
* @return $this Fluent Builder
*/
- public function setMessageDateAfter($messageDateAfter)
+ public function setMessageDateAfter(string $messageDateAfter): self
{
$this->options['messageDateAfter'] = $messageDateAfter;
return $this;
@@ -96,14 +123,10 @@ public function setMessageDateAfter($messageDateAfter)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.ReadNotificationOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.ReadNotificationOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NotificationPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NotificationPage.php
index 60d2d5d..7a5be6f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NotificationPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/NotificationPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return NotificationInstance \Twilio\Rest\Api\V2010\Account\NotificationInstance
+ */
+ public function buildInstance(array $payload): NotificationInstance
{
return new NotificationInstance($this->version, $payload, $this->solution['accountSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.NotificationPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/OutgoingCallerIdContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/OutgoingCallerIdContext.php
index 37e43e3..252b3c3 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/OutgoingCallerIdContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/OutgoingCallerIdContext.php
@@ -2,55 +2,82 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class OutgoingCallerIdContext extends InstanceContext
-{
+ {
/**
* Initialize the OutgoingCallerIdContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * to fetch
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\OutgoingCallerIdContext
+ * @param Version $version Version that contains the resource
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the OutgoingCallerId resources to delete.
+ * @param string $sid The Twilio-provided string that uniquely identifies the OutgoingCallerId resource to delete.
*/
- public function __construct(Version $version, $accountSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $accountSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'sid' => $sid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/OutgoingCallerIds/' . \rawurlencode($sid) . '.json';
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/OutgoingCallerIds/' . \rawurlencode($sid)
+ .'.json';
}
/**
- * Fetch a OutgoingCallerIdInstance
+ * Delete the OutgoingCallerIdInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
+ }
+
+
+ /**
+ * Fetch the OutgoingCallerIdInstance
*
* @return OutgoingCallerIdInstance Fetched OutgoingCallerIdInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): OutgoingCallerIdInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new OutgoingCallerIdInstance(
$this->version,
@@ -60,6 +87,7 @@ public function fetch()
);
}
+
/**
* Update the OutgoingCallerIdInstance
*
@@ -67,18 +95,18 @@ public function fetch()
* @return OutgoingCallerIdInstance Updated OutgoingCallerIdInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): OutgoingCallerIdInstance
{
+
$options = new Values($options);
- $data = Values::of(array('FriendlyName' => $options['friendlyName'],));
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ ]);
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new OutgoingCallerIdInstance(
$this->version,
@@ -88,28 +116,18 @@ public function update($options = array())
);
}
- /**
- * Deletes the OutgoingCallerIdInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.OutgoingCallerIdContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/OutgoingCallerIdInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/OutgoingCallerIdInstance.php
index edb7765..66c39c0 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/OutgoingCallerIdInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/OutgoingCallerIdInstance.php
@@ -2,46 +2,54 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $friendlyName
- * @property string $accountSid
- * @property string $phoneNumber
- * @property string $uri
+ * @property string|null $sid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $friendlyName
+ * @property string|null $accountSid
+ * @property string|null $phoneNumber
+ * @property string|null $uri
*/
class OutgoingCallerIdInstance extends InstanceResource
{
/**
* Initialize the OutgoingCallerIdInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\OutgoingCallerIdInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the OutgoingCallerId resources to delete.
+ * @param string $sid The Twilio-provided string that uniquely identifies the OutgoingCallerId resource to delete.
*/
- public function __construct(Version $version, array $payload, $accountSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $accountSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
@@ -49,20 +57,18 @@ public function __construct(Version $version, array $payload, $accountSid, $sid
'accountSid' => Values::array_get($payload, 'account_sid'),
'phoneNumber' => Values::array_get($payload, 'phone_number'),
'uri' => Values::array_get($payload, 'uri'),
- );
+ ];
- $this->solution = array('accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Api\V2010\Account\OutgoingCallerIdContext Context for
- * this
- * OutgoingCallerIdInstance
+ * @return OutgoingCallerIdContext Context for this OutgoingCallerIdInstance
*/
- protected function proxy()
+ protected function proxy(): OutgoingCallerIdContext
{
if (!$this->context) {
$this->context = new OutgoingCallerIdContext(
@@ -76,37 +82,40 @@ protected function proxy()
}
/**
- * Fetch a OutgoingCallerIdInstance
+ * Delete the OutgoingCallerIdInstance
*
- * @return OutgoingCallerIdInstance Fetched OutgoingCallerIdInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Update the OutgoingCallerIdInstance
+ * Fetch the OutgoingCallerIdInstance
*
- * @param array|Options $options Optional Arguments
- * @return OutgoingCallerIdInstance Updated OutgoingCallerIdInstance
+ * @return OutgoingCallerIdInstance Fetched OutgoingCallerIdInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): OutgoingCallerIdInstance
{
- return $this->proxy()->update($options);
+
+ return $this->proxy()->fetch();
}
/**
- * Deletes the OutgoingCallerIdInstance
+ * Update the OutgoingCallerIdInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return OutgoingCallerIdInstance Updated OutgoingCallerIdInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): OutgoingCallerIdInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->update($options);
}
/**
@@ -116,7 +125,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -135,12 +144,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.OutgoingCallerIdInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/OutgoingCallerIdList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/OutgoingCallerIdList.php
index 9145346..50b4eb4 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/OutgoingCallerIdList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/OutgoingCallerIdList.php
@@ -2,35 +2,71 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account;
use Twilio\ListResource;
use Twilio\Options;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class OutgoingCallerIdList extends ListResource
-{
+ {
/**
* Construct the OutgoingCallerIdList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * @return \Twilio\Rest\Api\V2010\Account\OutgoingCallerIdList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the OutgoingCallerId resources to delete.
*/
- public function __construct(Version $version, $accountSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/OutgoingCallerIds.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/OutgoingCallerIds.json';
+ /**
+ * Reads OutgoingCallerIdInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return OutgoingCallerIdInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -50,9 +86,9 @@ public function __construct(Version $version, $accountSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -61,53 +97,35 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads OutgoingCallerIdInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return OutgoingCallerIdInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of OutgoingCallerIdInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of OutgoingCallerIdInstance
+ * @return OutgoingCallerIdPage Page of OutgoingCallerIdInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): OutgoingCallerIdPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'PhoneNumber' => $options['phoneNumber'],
- 'FriendlyName' => $options['friendlyName'],
+
+ $params = Values::of([
+ 'PhoneNumber' =>
+ $options['phoneNumber'],
+ 'FriendlyName' =>
+ $options['friendlyName'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new OutgoingCallerIdPage($this->version, $response, $this->solution);
}
@@ -117,9 +135,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of OutgoingCallerIdInstance
+ * @return OutgoingCallerIdPage Page of OutgoingCallerIdInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): OutgoingCallerIdPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -129,15 +147,22 @@ public function getPage($targetUrl)
return new OutgoingCallerIdPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a OutgoingCallerIdContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\OutgoingCallerIdContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the OutgoingCallerId resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): OutgoingCallerIdContext
{
- return new OutgoingCallerIdContext($this->version, $this->solution['accountSid'], $sid);
+ return new OutgoingCallerIdContext(
+ $this->version,
+ $this->solution['accountSid'],
+ $sid
+ );
}
/**
@@ -145,8 +170,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.OutgoingCallerIdList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/OutgoingCallerIdOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/OutgoingCallerIdOptions.php
index c1d504c..51b2789 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/OutgoingCallerIdOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/OutgoingCallerIdOptions.php
@@ -1,10 +1,16 @@
options['phoneNumber'] = $phoneNumber;
$this->options['friendlyName'] = $friendlyName;
}
/**
- * A descriptive string that you create to describe the resource. It can be up to 64 characters long.
+ * The phone number of the OutgoingCallerId resources to read.
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $phoneNumber The phone number of the OutgoingCallerId resources to read.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setPhoneNumber(string $phoneNumber): self
{
- $this->options['friendlyName'] = $friendlyName;
+ $this->options['phoneNumber'] = $phoneNumber;
return $this;
}
/**
- * Provide a friendly representation
+ * The string that identifies the OutgoingCallerId resources to read.
*
- * @return string Machine friendly representation
+ * @param string $friendlyName The string that identifies the OutgoingCallerId resources to read.
+ * @return $this Fluent Builder
*/
- public function __toString()
+ public function setFriendlyName(string $friendlyName): self
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.UpdateOutgoingCallerIdOptions ' . \implode(' ', $options) . ']';
+ $this->options['friendlyName'] = $friendlyName;
+ return $this;
}
-}
-class ReadOutgoingCallerIdOptions extends Options
-{
/**
- * @param string $phoneNumber The phone number of the OutgoingCallerId
- * resources to read
- * @param string $friendlyName The string that identifies the OutgoingCallerId
- * resources to read
+ * Provide a friendly representation
+ *
+ * @return string Machine friendly representation
*/
- public function __construct($phoneNumber = Values::NONE, $friendlyName = Values::NONE)
+ public function __toString(): string
{
- $this->options['phoneNumber'] = $phoneNumber;
- $this->options['friendlyName'] = $friendlyName;
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.ReadOutgoingCallerIdOptions ' . $options . ']';
}
+}
+class UpdateOutgoingCallerIdOptions extends Options
+ {
/**
- * The phone number of the OutgoingCallerId resources to read.
- *
- * @param string $phoneNumber The phone number of the OutgoingCallerId
- * resources to read
- * @return $this Fluent Builder
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
*/
- public function setPhoneNumber($phoneNumber)
- {
- $this->options['phoneNumber'] = $phoneNumber;
- return $this;
+ public function __construct(
+
+ string $friendlyName = Values::NONE
+
+ ) {
+ $this->options['friendlyName'] = $friendlyName;
}
/**
- * The string that identifies the OutgoingCallerId resources to read.
+ * A descriptive string that you create to describe the resource. It can be up to 64 characters long.
*
- * @param string $friendlyName The string that identifies the OutgoingCallerId
- * resources to read
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -120,14 +141,10 @@ public function setFriendlyName($friendlyName)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.ReadOutgoingCallerIdOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.UpdateOutgoingCallerIdOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/OutgoingCallerIdPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/OutgoingCallerIdPage.php
index 8b329d8..423c34c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/OutgoingCallerIdPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/OutgoingCallerIdPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return OutgoingCallerIdInstance \Twilio\Rest\Api\V2010\Account\OutgoingCallerIdInstance
+ */
+ public function buildInstance(array $payload): OutgoingCallerIdInstance
{
return new OutgoingCallerIdInstance($this->version, $payload, $this->solution['accountSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.OutgoingCallerIdPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Queue/MemberContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Queue/MemberContext.php
index ab34c3b..58c0c6d 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Queue/MemberContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Queue/MemberContext.php
@@ -2,60 +2,73 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Queue;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class MemberContext extends InstanceContext
-{
+ {
/**
* Initialize the MemberContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the
- * resource(s) to fetch
- * @param string $queueSid The SID of the Queue in which to find the members
- * @param string $callSid The Call SID of the resource(s) to fetch
- * @return \Twilio\Rest\Api\V2010\Account\Queue\MemberContext
+ * @param Version $version Version that contains the resource
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Member resource(s) to fetch.
+ * @param string $queueSid The SID of the Queue in which to find the members to fetch.
+ * @param string $callSid The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resource(s) to fetch.
*/
- public function __construct(Version $version, $accountSid, $queueSid, $callSid)
- {
+ public function __construct(
+ Version $version,
+ $accountSid,
+ $queueSid,
+ $callSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array(
- 'accountSid' => $accountSid,
- 'queueSid' => $queueSid,
- 'callSid' => $callSid,
- );
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+ 'queueSid' =>
+ $queueSid,
+ 'callSid' =>
+ $callSid,
+ ];
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Queues/' . \rawurlencode($queueSid) . '/Members/' . \rawurlencode($callSid) . '.json';
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Queues/' . \rawurlencode($queueSid)
+ .'/Members/' . \rawurlencode($callSid)
+ .'.json';
}
/**
- * Fetch a MemberInstance
+ * Fetch the MemberInstance
*
* @return MemberInstance Fetched MemberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): MemberInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new MemberInstance(
$this->version,
@@ -66,26 +79,29 @@ public function fetch()
);
}
+
/**
* Update the MemberInstance
*
- * @param string $url The absolute URL of the Queue resource
+ * @param string $url The absolute URL of the Queue resource.
* @param array|Options $options Optional Arguments
* @return MemberInstance Updated MemberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($url, $options = array())
+ public function update(string $url, array $options = []): MemberInstance
{
+
$options = new Values($options);
- $data = Values::of(array('Url' => $url, 'Method' => $options['method'],));
+ $data = Values::of([
+ 'Url' =>
+ $url,
+ 'Method' =>
+ $options['method'],
+ ]);
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new MemberInstance(
$this->version,
@@ -96,17 +112,18 @@ public function update($url, $options = array())
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.MemberContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Queue/MemberInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Queue/MemberInstance.php
index 25c1880..da5748c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Queue/MemberInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Queue/MemberInstance.php
@@ -2,69 +2,72 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Queue;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $callSid
- * @property \DateTime $dateEnqueued
+ * @property string|null $callSid
+ * @property \DateTime|null $dateEnqueued
* @property int $position
- * @property string $uri
+ * @property string|null $uri
* @property int $waitTime
- * @property string $queueSid
+ * @property string|null $queueSid
*/
class MemberInstance extends InstanceResource
{
/**
* Initialize the MemberInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The SID of the Account that created this resource
- * @param string $queueSid The SID of the Queue the member is in
- * @param string $callSid The Call SID of the resource(s) to fetch
- * @return \Twilio\Rest\Api\V2010\Account\Queue\MemberInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Member resource(s) to fetch.
+ * @param string $queueSid The SID of the Queue in which to find the members to fetch.
+ * @param string $callSid The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resource(s) to fetch.
*/
- public function __construct(Version $version, array $payload, $accountSid, $queueSid, $callSid = null)
+ public function __construct(Version $version, array $payload, string $accountSid, string $queueSid, string $callSid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'callSid' => Values::array_get($payload, 'call_sid'),
'dateEnqueued' => Deserialize::dateTime(Values::array_get($payload, 'date_enqueued')),
'position' => Values::array_get($payload, 'position'),
'uri' => Values::array_get($payload, 'uri'),
'waitTime' => Values::array_get($payload, 'wait_time'),
'queueSid' => Values::array_get($payload, 'queue_sid'),
- );
+ ];
- $this->solution = array(
- 'accountSid' => $accountSid,
- 'queueSid' => $queueSid,
- 'callSid' => $callSid ?: $this->properties['callSid'],
- );
+ $this->solution = ['accountSid' => $accountSid, 'queueSid' => $queueSid, 'callSid' => $callSid ?: $this->properties['callSid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Api\V2010\Account\Queue\MemberContext Context for this
- * MemberInstance
+ * @return MemberContext Context for this MemberInstance
*/
- protected function proxy()
+ protected function proxy(): MemberContext
{
if (!$this->context) {
$this->context = new MemberContext(
@@ -79,26 +82,28 @@ protected function proxy()
}
/**
- * Fetch a MemberInstance
+ * Fetch the MemberInstance
*
* @return MemberInstance Fetched MemberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): MemberInstance
{
+
return $this->proxy()->fetch();
}
/**
* Update the MemberInstance
*
- * @param string $url The absolute URL of the Queue resource
+ * @param string $url The absolute URL of the Queue resource.
* @param array|Options $options Optional Arguments
* @return MemberInstance Updated MemberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($url, $options = array())
+ public function update(string $url, array $options = []): MemberInstance
{
+
return $this->proxy()->update($url, $options);
}
@@ -109,7 +114,7 @@ public function update($url, $options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -128,12 +133,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.MemberInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Queue/MemberList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Queue/MemberList.php
index 4aab514..d650e75 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Queue/MemberList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Queue/MemberList.php
@@ -2,35 +2,75 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\Queue;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class MemberList extends ListResource
-{
+ {
/**
* Construct the MemberList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created this resource
- * @param string $queueSid The SID of the Queue the member is in
- * @return \Twilio\Rest\Api\V2010\Account\Queue\MemberList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Member resource(s) to fetch.
+ * @param string $queueSid The SID of the Queue in which to find the members to fetch.
*/
- public function __construct(Version $version, $accountSid, $queueSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid,
+ string $queueSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'queueSid' => $queueSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ 'queueSid' =>
+ $queueSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Queues/' . \rawurlencode($queueSid)
+ .'/Members.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Queues/' . \rawurlencode($queueSid) . '/Members.json';
+ /**
+ * Reads MemberInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return MemberInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -49,9 +89,9 @@ public function __construct(Version $version, $accountSid, $queueSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -60,26 +100,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads MemberInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return MemberInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of MemberInstance records from the API.
* Request is executed immediately
@@ -87,21 +107,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of MemberInstance
+ * @return MemberPage Page of MemberInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): MemberPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new MemberPage($this->version, $response, $this->solution);
}
@@ -111,9 +132,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of MemberInstance
+ * @return MemberPage Page of MemberInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): MemberPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -123,13 +144,16 @@ public function getPage($targetUrl)
return new MemberPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a MemberContext
*
- * @param string $callSid The Call SID of the resource(s) to fetch
- * @return \Twilio\Rest\Api\V2010\Account\Queue\MemberContext
+ * @param string $callSid The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resource(s) to fetch.
*/
- public function getContext($callSid)
+ public function getContext(
+ string $callSid
+
+ ): MemberContext
{
return new MemberContext(
$this->version,
@@ -144,8 +168,8 @@ public function getContext($callSid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.MemberList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Queue/MemberOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Queue/MemberOptions.php
index 243b922..86517dd 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Queue/MemberOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Queue/MemberOptions.php
@@ -1,10 +1,16 @@
options['method'] = $method;
}
/**
* How to pass the update request data. Can be `GET` or `POST` and the default is `POST`. `POST` sends the data as encoded form data and `GET` sends the data as query parameters.
*
- * @param string $method How to pass the update request data
+ * @param string $method How to pass the update request data. Can be `GET` or `POST` and the default is `POST`. `POST` sends the data as encoded form data and `GET` sends the data as query parameters.
* @return $this Fluent Builder
*/
- public function setMethod($method)
+ public function setMethod(string $method): self
{
$this->options['method'] = $method;
return $this;
@@ -51,14 +71,10 @@ public function setMethod($method)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.UpdateMemberOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.UpdateMemberOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Queue/MemberPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Queue/MemberPage.php
index b11c304..9d28bbe 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Queue/MemberPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Queue/MemberPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return MemberInstance \Twilio\Rest\Api\V2010\Account\Queue\MemberInstance
+ */
+ public function buildInstance(array $payload): MemberInstance
{
- return new MemberInstance(
- $this->version,
- $payload,
- $this->solution['accountSid'],
- $this->solution['queueSid']
- );
+ return new MemberInstance($this->version, $payload, $this->solution['accountSid'], $this->solution['queueSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.MemberPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/QueueContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/QueueContext.php
index 279a5c6..493f579 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/QueueContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/QueueContext.php
@@ -2,62 +2,90 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Api\V2010\Account\Queue\MemberList;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Api\V2010\Account\Queue\MemberList;
+
/**
- * @property \Twilio\Rest\Api\V2010\Account\Queue\MemberList $members
+ * @property MemberList $members
* @method \Twilio\Rest\Api\V2010\Account\Queue\MemberContext members(string $callSid)
*/
class QueueContext extends InstanceContext
-{
- protected $_members = null;
+ {
+ protected $_members;
/**
* Initialize the QueueContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the
- * resource(s) to fetch
- * @param string $sid The unique string that identifies this resource
- * @return \Twilio\Rest\Api\V2010\Account\QueueContext
+ * @param Version $version Version that contains the resource
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Queue resource to delete
*/
- public function __construct(Version $version, $accountSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $accountSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'sid' => $sid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Queues/' . \rawurlencode($sid)
+ .'.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Queues/' . \rawurlencode($sid) . '.json';
+ /**
+ * Delete the QueueInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a QueueInstance
+ * Fetch the QueueInstance
*
* @return QueueInstance Fetched QueueInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): QueueInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new QueueInstance(
$this->version,
@@ -67,6 +95,7 @@ public function fetch()
);
}
+
/**
* Update the QueueInstance
*
@@ -74,21 +103,20 @@ public function fetch()
* @return QueueInstance Updated QueueInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): QueueInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'MaxSize' => $options['maxSize'],
- ));
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'MaxSize' =>
+ $options['maxSize'],
+ ]);
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new QueueInstance(
$this->version,
@@ -98,23 +126,11 @@ public function update($options = array())
);
}
- /**
- * Deletes the QueueInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Access the members
- *
- * @return \Twilio\Rest\Api\V2010\Account\Queue\MemberList
*/
- protected function getMembers()
+ protected function getMembers(): MemberList
{
if (!$this->_members) {
$this->_members = new MemberList(
@@ -131,10 +147,10 @@ protected function getMembers()
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -149,10 +165,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -167,12 +183,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.QueueContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/QueueInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/QueueInstance.php
index ac88c20..79d96de 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/QueueInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/QueueInstance.php
@@ -2,72 +2,80 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Api\V2010\Account\Queue\MemberList;
+
/**
- * @property string $accountSid
- * @property int $averageWaitTime
+ * @property \DateTime|null $dateUpdated
* @property int $currentSize
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $friendlyName
+ * @property string|null $friendlyName
+ * @property string|null $uri
+ * @property string|null $accountSid
+ * @property int $averageWaitTime
+ * @property string|null $sid
+ * @property \DateTime|null $dateCreated
* @property int $maxSize
- * @property string $sid
- * @property string $uri
*/
class QueueInstance extends InstanceResource
{
- protected $_members = null;
+ protected $_members;
/**
* Initialize the QueueInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The SID of the Account that created this resource
- * @param string $sid The unique string that identifies this resource
- * @return \Twilio\Rest\Api\V2010\Account\QueueInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Queue resource to delete
*/
- public function __construct(Version $version, array $payload, $accountSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $accountSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
+ 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
+ 'currentSize' => Values::array_get($payload, 'current_size'),
+ 'friendlyName' => Values::array_get($payload, 'friendly_name'),
+ 'uri' => Values::array_get($payload, 'uri'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'averageWaitTime' => Values::array_get($payload, 'average_wait_time'),
- 'currentSize' => Values::array_get($payload, 'current_size'),
+ 'sid' => Values::array_get($payload, 'sid'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- 'friendlyName' => Values::array_get($payload, 'friendly_name'),
'maxSize' => Values::array_get($payload, 'max_size'),
- 'sid' => Values::array_get($payload, 'sid'),
- 'uri' => Values::array_get($payload, 'uri'),
- );
+ ];
- $this->solution = array('accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Api\V2010\Account\QueueContext Context for this
- * QueueInstance
+ * @return QueueContext Context for this QueueInstance
*/
- protected function proxy()
+ protected function proxy(): QueueContext
{
if (!$this->context) {
$this->context = new QueueContext(
@@ -81,45 +89,46 @@ protected function proxy()
}
/**
- * Fetch a QueueInstance
+ * Delete the QueueInstance
*
- * @return QueueInstance Fetched QueueInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Update the QueueInstance
+ * Fetch the QueueInstance
*
- * @param array|Options $options Optional Arguments
- * @return QueueInstance Updated QueueInstance
+ * @return QueueInstance Fetched QueueInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): QueueInstance
{
- return $this->proxy()->update($options);
+
+ return $this->proxy()->fetch();
}
/**
- * Deletes the QueueInstance
+ * Update the QueueInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return QueueInstance Updated QueueInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): QueueInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->update($options);
}
/**
* Access the members
- *
- * @return \Twilio\Rest\Api\V2010\Account\Queue\MemberList
*/
- protected function getMembers()
+ protected function getMembers(): MemberList
{
return $this->proxy()->members;
}
@@ -131,7 +140,7 @@ protected function getMembers()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -150,12 +159,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.QueueInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/QueueList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/QueueList.php
index e11e251..cb16b66 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/QueueList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/QueueList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account;
@@ -12,55 +19,67 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class QueueList extends ListResource
-{
+ {
/**
* Construct the QueueList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created this resource
- * @return \Twilio\Rest\Api\V2010\Account\QueueList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
*/
- public function __construct(Version $version, $accountSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid,);
-
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Queues.json';
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Queues.json';
}
/**
- * Streams QueueInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the QueueInstance
*
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @param string $friendlyName A descriptive string that you created to describe this resource. It can be up to 64 characters long.
+ * @param array|Options $options Optional Arguments
+ * @return QueueInstance Created QueueInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($limit = null, $pageSize = null)
+ public function create(string $friendlyName, array $options = []): QueueInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'FriendlyName' =>
+ $friendlyName,
+ 'MaxSize' =>
+ $options['maxSize'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new QueueInstance(
+ $this->version,
+ $payload,
+ $this->solution['accountSid']
+ );
}
+
/**
* Reads QueueInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -76,11 +95,38 @@ public function stream($limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return QueueInstance[] Array of results
*/
- public function read($limit = null, $pageSize = null)
+ public function read(int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($limit, $pageSize), false);
}
+ /**
+ * Streams QueueInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of QueueInstance records from the API.
* Request is executed immediately
@@ -88,21 +134,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of QueueInstance
+ * @return QueuePage Page of QueueInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): QueuePage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new QueuePage($this->version, $response, $this->solution);
}
@@ -112,9 +159,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of QueueInstance
+ * @return QueuePage Page of QueueInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): QueuePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -124,39 +171,22 @@ public function getPage($targetUrl)
return new QueuePage($this->version, $response, $this->solution);
}
- /**
- * Create a new QueueInstance
- *
- * @param string $friendlyName A string to describe this resource
- * @param array|Options $options Optional Arguments
- * @return QueueInstance Newly created QueueInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($friendlyName, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array('FriendlyName' => $friendlyName, 'MaxSize' => $options['maxSize'],));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new QueueInstance($this->version, $payload, $this->solution['accountSid']);
- }
/**
* Constructs a QueueContext
*
- * @param string $sid The unique string that identifies this resource
- * @return \Twilio\Rest\Api\V2010\Account\QueueContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the Queue resource to delete
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): QueueContext
{
- return new QueueContext($this->version, $this->solution['accountSid'], $sid);
+ return new QueueContext(
+ $this->version,
+ $this->solution['accountSid'],
+ $sid
+ );
}
/**
@@ -164,8 +194,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.QueueList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/QueueOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/QueueOptions.php
index 7e54710..f312325 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/QueueOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/QueueOptions.php
@@ -1,10 +1,16 @@
options['friendlyName'] = $friendlyName;
- $this->options['maxSize'] = $maxSize;
- }
-
/**
- * A descriptive string that you created to describe this resource. It can be up to 64 characters long.
- *
- * @param string $friendlyName A string to describe this resource
- * @return $this Fluent Builder
+ * @param int $maxSize The maximum number of calls allowed to be in the queue. The default is 1000. The maximum is 5000.
*/
- public function setFriendlyName($friendlyName)
- {
- $this->options['friendlyName'] = $friendlyName;
- return $this;
+ public function __construct(
+
+ int $maxSize = Values::INT_NONE
+
+ ) {
+ $this->options['maxSize'] = $maxSize;
}
/**
- * The maximum number of calls allowed to be in the queue. The default is 100. The maximum is 5000.
+ * The maximum number of calls allowed to be in the queue. The default is 1000. The maximum is 5000.
*
- * @param int $maxSize The max number of calls allowed in the queue
+ * @param int $maxSize The maximum number of calls allowed to be in the queue. The default is 1000. The maximum is 5000.
* @return $this Fluent Builder
*/
- public function setMaxSize($maxSize)
+ public function setMaxSize(int $maxSize): self
{
$this->options['maxSize'] = $maxSize;
return $this;
@@ -75,35 +88,51 @@ public function setMaxSize($maxSize)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.UpdateQueueOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.CreateQueueOptions ' . $options . ']';
}
}
-class CreateQueueOptions extends Options
-{
+
+
+
+class UpdateQueueOptions extends Options
+ {
/**
- * @param int $maxSize The max number of calls allowed in the queue
+ * @param string $friendlyName A descriptive string that you created to describe this resource. It can be up to 64 characters long.
+ * @param int $maxSize The maximum number of calls allowed to be in the queue. The default is 1000. The maximum is 5000.
*/
- public function __construct($maxSize = Values::NONE)
- {
+ public function __construct(
+
+ string $friendlyName = Values::NONE,
+ int $maxSize = Values::INT_NONE
+
+ ) {
+ $this->options['friendlyName'] = $friendlyName;
$this->options['maxSize'] = $maxSize;
}
/**
- * The maximum number of calls allowed to be in the queue. The default is 100. The maximum is 5000.
+ * A descriptive string that you created to describe this resource. It can be up to 64 characters long.
+ *
+ * @param string $friendlyName A descriptive string that you created to describe this resource. It can be up to 64 characters long.
+ * @return $this Fluent Builder
+ */
+ public function setFriendlyName(string $friendlyName): self
+ {
+ $this->options['friendlyName'] = $friendlyName;
+ return $this;
+ }
+
+ /**
+ * The maximum number of calls allowed to be in the queue. The default is 1000. The maximum is 5000.
*
- * @param int $maxSize The max number of calls allowed in the queue
+ * @param int $maxSize The maximum number of calls allowed to be in the queue. The default is 1000. The maximum is 5000.
* @return $this Fluent Builder
*/
- public function setMaxSize($maxSize)
+ public function setMaxSize(int $maxSize): self
{
$this->options['maxSize'] = $maxSize;
return $this;
@@ -114,14 +143,10 @@ public function setMaxSize($maxSize)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.CreateQueueOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.UpdateQueueOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/QueuePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/QueuePage.php
index c8f1dd2..8b78498 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/QueuePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/QueuePage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return QueueInstance \Twilio\Rest\Api\V2010\Account\QueueInstance
+ */
+ public function buildInstance(array $payload): QueueInstance
{
return new QueueInstance($this->version, $payload, $this->solution['accountSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.QueuePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResult/PayloadContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResult/PayloadContext.php
index 278c9ef..340ef6e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResult/PayloadContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResult/PayloadContext.php
@@ -2,64 +2,99 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Recording\AddOnResult;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Api\V2010\Account\Recording\AddOnResult\Payload\DataList;
+
+/**
+ * @property DataList $data
+ * @method \Twilio\Rest\Api\V2010\Account\Recording\AddOnResult\Payload\DataContext data()
+ */
class PayloadContext extends InstanceContext
-{
+ {
+ protected $_data;
+
/**
* Initialize the PayloadContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * to fetch
- * @param string $referenceSid The SID of the recording to which the
- * AddOnResult resource that contains the payload
- * to fetch belongs
- * @param string $addOnResultSid The SID of the AddOnResult to which the
- * payload to fetch belongs
- * @param string $sid The unique string that identifies the resource to fetch
- * @return \Twilio\Rest\Api\V2010\Account\Recording\AddOnResult\PayloadContext
+ * @param Version $version Version that contains the resource
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording AddOnResult Payload resources to delete.
+ * @param string $referenceSid The SID of the recording to which the AddOnResult resource that contains the payloads to delete belongs.
+ * @param string $addOnResultSid The SID of the AddOnResult to which the payloads to delete belongs.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Recording AddOnResult Payload resource to delete.
*/
- public function __construct(Version $version, $accountSid, $referenceSid, $addOnResultSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $accountSid,
+ $referenceSid,
+ $addOnResultSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array(
- 'accountSid' => $accountSid,
- 'referenceSid' => $referenceSid,
- 'addOnResultSid' => $addOnResultSid,
- 'sid' => $sid,
- );
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+ 'referenceSid' =>
+ $referenceSid,
+ 'addOnResultSid' =>
+ $addOnResultSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Recordings/' . \rawurlencode($referenceSid) . '/AddOnResults/' . \rawurlencode($addOnResultSid) . '/Payloads/' . \rawurlencode($sid) . '.json';
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Recordings/' . \rawurlencode($referenceSid)
+ .'/AddOnResults/' . \rawurlencode($addOnResultSid)
+ .'/Payloads/' . \rawurlencode($sid)
+ .'.json';
}
/**
- * Fetch a PayloadInstance
+ * Delete the PayloadInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
+ }
+
+
+ /**
+ * Fetch the PayloadInstance
*
* @return PayloadInstance Fetched PayloadInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): PayloadInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new PayloadInstance(
$this->version,
@@ -71,15 +106,58 @@ public function fetch()
);
}
+
+ /**
+ * Access the data
+ */
+ protected function getData(): DataList
+ {
+ if (!$this->_data) {
+ $this->_data = new DataList(
+ $this->version,
+ $this->solution['accountSid'],
+ $this->solution['referenceSid'],
+ $this->solution['addOnResultSid'],
+ $this->solution['sid']
+ );
+ }
+
+ return $this->_data;
+ }
+
/**
- * Deletes the PayloadInstance
+ * Magic getter to lazy load subresources
*
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
+ * @param string $name Subresource to return
+ * @return ListResource The requested subresource
+ * @throws TwilioException For unknown subresources
*/
- public function delete()
+ public function __get(string $name): ListResource
{
- return $this->version->delete('delete', $this->uri);
+ if (\property_exists($this, '_' . $name)) {
+ $method = 'get' . \ucfirst($name);
+ return $this->$method();
+ }
+
+ throw new TwilioException('Unknown subresource ' . $name);
+ }
+
+ /**
+ * Magic caller to get resource contexts
+ *
+ * @param string $name Resource to return
+ * @param array $arguments Context parameters
+ * @return InstanceContext The requested resource context
+ * @throws TwilioException For unknown resource
+ */
+ public function __call(string $name, array $arguments): InstanceContext
+ {
+ $property = $this->$name;
+ if (\method_exists($property, 'getContext')) {
+ return \call_user_func_array(array($property, 'getContext'), $arguments);
+ }
+
+ throw new TwilioException('Resource does not have a context');
}
/**
@@ -87,12 +165,12 @@ public function delete()
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.PayloadContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResult/PayloadInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResult/PayloadInstance.php
index 66ddaf5..c95481e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResult/PayloadInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResult/PayloadInstance.php
@@ -2,54 +2,62 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Recording\AddOnResult;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Api\V2010\Account\Recording\AddOnResult\Payload\DataList;
+
/**
- * @property string $sid
- * @property string $addOnResultSid
- * @property string $accountSid
- * @property string $label
- * @property string $addOnSid
- * @property string $addOnConfigurationSid
- * @property string $contentType
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $referenceSid
- * @property array $subresourceUris
+ * @property string|null $sid
+ * @property string|null $addOnResultSid
+ * @property string|null $accountSid
+ * @property string|null $label
+ * @property string|null $addOnSid
+ * @property string|null $addOnConfigurationSid
+ * @property string|null $contentType
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $referenceSid
+ * @property array|null $subresourceUris
*/
class PayloadInstance extends InstanceResource
{
+ protected $_data;
+
/**
* Initialize the PayloadInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $referenceSid The SID of the recording to which the
- * AddOnResult resource that contains the payload
- * belongs
- * @param string $addOnResultSid The SID of the AddOnResult to which the
- * payload belongs
- * @param string $sid The unique string that identifies the resource to fetch
- * @return \Twilio\Rest\Api\V2010\Account\Recording\AddOnResult\PayloadInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording AddOnResult Payload resources to delete.
+ * @param string $referenceSid The SID of the recording to which the AddOnResult resource that contains the payloads to delete belongs.
+ * @param string $addOnResultSid The SID of the AddOnResult to which the payloads to delete belongs.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Recording AddOnResult Payload resource to delete.
*/
- public function __construct(Version $version, array $payload, $accountSid, $referenceSid, $addOnResultSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $accountSid, string $referenceSid, string $addOnResultSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'addOnResultSid' => Values::array_get($payload, 'add_on_result_sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
@@ -61,23 +69,18 @@ public function __construct(Version $version, array $payload, $accountSid, $refe
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'referenceSid' => Values::array_get($payload, 'reference_sid'),
'subresourceUris' => Values::array_get($payload, 'subresource_uris'),
- );
-
- $this->solution = array(
- 'accountSid' => $accountSid,
- 'referenceSid' => $referenceSid,
- 'addOnResultSid' => $addOnResultSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ ];
+
+ $this->solution = ['accountSid' => $accountSid, 'referenceSid' => $referenceSid, 'addOnResultSid' => $addOnResultSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Api\V2010\Account\Recording\AddOnResult\PayloadContext Context for this PayloadInstance
+ * @return PayloadContext Context for this PayloadInstance
*/
- protected function proxy()
+ protected function proxy(): PayloadContext
{
if (!$this->context) {
$this->context = new PayloadContext(
@@ -93,25 +96,35 @@ protected function proxy()
}
/**
- * Fetch a PayloadInstance
+ * Delete the PayloadInstance
*
- * @return PayloadInstance Fetched PayloadInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the PayloadInstance
+ * Fetch the PayloadInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return PayloadInstance Fetched PayloadInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): PayloadInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
+ }
+
+ /**
+ * Access the data
+ */
+ protected function getData(): DataList
+ {
+ return $this->proxy()->data;
}
/**
@@ -121,7 +134,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -140,12 +153,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.PayloadInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResult/PayloadList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResult/PayloadList.php
index f7b4744..74bb260 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResult/PayloadList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResult/PayloadList.php
@@ -2,43 +2,81 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\Recording\AddOnResult;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class PayloadList extends ListResource
-{
+ {
/**
* Construct the PayloadList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $referenceSid The SID of the recording to which the
- * AddOnResult resource that contains the payload
- * belongs
- * @param string $addOnResultSid The SID of the AddOnResult to which the
- * payload belongs
- * @return \Twilio\Rest\Api\V2010\Account\Recording\AddOnResult\PayloadList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording AddOnResult Payload resources to delete.
+ * @param string $referenceSid The SID of the recording to which the AddOnResult resource that contains the payloads to delete belongs.
+ * @param string $addOnResultSid The SID of the AddOnResult to which the payloads to delete belongs.
*/
- public function __construct(Version $version, $accountSid, $referenceSid, $addOnResultSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid,
+ string $referenceSid,
+ string $addOnResultSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array(
- 'accountSid' => $accountSid,
- 'referenceSid' => $referenceSid,
- 'addOnResultSid' => $addOnResultSid,
- );
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ 'referenceSid' =>
+ $referenceSid,
+
+ 'addOnResultSid' =>
+ $addOnResultSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Recordings/' . \rawurlencode($referenceSid)
+ .'/AddOnResults/' . \rawurlencode($addOnResultSid)
+ .'/Payloads.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Recordings/' . \rawurlencode($referenceSid) . '/AddOnResults/' . \rawurlencode($addOnResultSid) . '/Payloads.json';
+ /**
+ * Reads PayloadInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return PayloadInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -57,9 +95,9 @@ public function __construct(Version $version, $accountSid, $referenceSid, $addOn
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -68,26 +106,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads PayloadInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return PayloadInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of PayloadInstance records from the API.
* Request is executed immediately
@@ -95,21 +113,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of PayloadInstance
+ * @return PayloadPage Page of PayloadInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): PayloadPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new PayloadPage($this->version, $response, $this->solution);
}
@@ -119,9 +138,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of PayloadInstance
+ * @return PayloadPage Page of PayloadInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): PayloadPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -131,13 +150,16 @@ public function getPage($targetUrl)
return new PayloadPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a PayloadContext
*
- * @param string $sid The unique string that identifies the resource to fetch
- * @return \Twilio\Rest\Api\V2010\Account\Recording\AddOnResult\PayloadContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the Recording AddOnResult Payload resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): PayloadContext
{
return new PayloadContext(
$this->version,
@@ -153,8 +175,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.PayloadList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResult/PayloadPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResult/PayloadPage.php
index bc4fd6e..4c90e04 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResult/PayloadPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResult/PayloadPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return PayloadInstance \Twilio\Rest\Api\V2010\Account\Recording\AddOnResult\PayloadInstance
+ */
+ public function buildInstance(array $payload): PayloadInstance
{
- return new PayloadInstance(
- $this->version,
- $payload,
- $this->solution['accountSid'],
- $this->solution['referenceSid'],
- $this->solution['addOnResultSid']
- );
+ return new PayloadInstance($this->version, $payload, $this->solution['accountSid'], $this->solution['referenceSid'], $this->solution['addOnResultSid']);
}
/**
@@ -37,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.PayloadPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResultContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResultContext.php
index 61f9227..1fe90e4 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResultContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResultContext.php
@@ -2,67 +2,94 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Recording;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
-use Twilio\Rest\Api\V2010\Account\Recording\AddOnResult\PayloadList;
+use Twilio\ListResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Api\V2010\Account\Recording\AddOnResult\PayloadList;
+
/**
- * @property \Twilio\Rest\Api\V2010\Account\Recording\AddOnResult\PayloadList $payloads
+ * @property PayloadList $payloads
* @method \Twilio\Rest\Api\V2010\Account\Recording\AddOnResult\PayloadContext payloads(string $sid)
*/
class AddOnResultContext extends InstanceContext
-{
- protected $_payloads = null;
+ {
+ protected $_payloads;
/**
* Initialize the AddOnResultContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * to fetch
- * @param string $referenceSid The SID of the recording to which the result to
- * fetch belongs
- * @param string $sid The unique string that identifies the resource to fetch
- * @return \Twilio\Rest\Api\V2010\Account\Recording\AddOnResultContext
+ * @param Version $version Version that contains the resource
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording AddOnResult resources to delete.
+ * @param string $referenceSid The SID of the recording to which the result to delete belongs.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Recording AddOnResult resource to delete.
*/
- public function __construct(Version $version, $accountSid, $referenceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $accountSid,
+ $referenceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array(
- 'accountSid' => $accountSid,
- 'referenceSid' => $referenceSid,
- 'sid' => $sid,
- );
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+ 'referenceSid' =>
+ $referenceSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Recordings/' . \rawurlencode($referenceSid)
+ .'/AddOnResults/' . \rawurlencode($sid)
+ .'.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Recordings/' . \rawurlencode($referenceSid) . '/AddOnResults/' . \rawurlencode($sid) . '.json';
+ /**
+ * Delete the AddOnResultInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a AddOnResultInstance
+ * Fetch the AddOnResultInstance
*
* @return AddOnResultInstance Fetched AddOnResultInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): AddOnResultInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new AddOnResultInstance(
$this->version,
@@ -73,23 +100,11 @@ public function fetch()
);
}
- /**
- * Deletes the AddOnResultInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Access the payloads
- *
- * @return \Twilio\Rest\Api\V2010\Account\Recording\AddOnResult\PayloadList
*/
- protected function getPayloads()
+ protected function getPayloads(): PayloadList
{
if (!$this->_payloads) {
$this->_payloads = new PayloadList(
@@ -107,10 +122,10 @@ protected function getPayloads()
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -125,10 +140,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -143,12 +158,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.AddOnResultContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResultInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResultInstance.php
index 9b29bc8..8859f63 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResultInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResultInstance.php
@@ -2,52 +2,60 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Recording;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Api\V2010\Account\Recording\AddOnResult\PayloadList;
+
/**
- * @property string $sid
- * @property string $accountSid
+ * @property string|null $sid
+ * @property string|null $accountSid
* @property string $status
- * @property string $addOnSid
- * @property string $addOnConfigurationSid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property \DateTime $dateCompleted
- * @property string $referenceSid
- * @property array $subresourceUris
+ * @property string|null $addOnSid
+ * @property string|null $addOnConfigurationSid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property \DateTime|null $dateCompleted
+ * @property string|null $referenceSid
+ * @property array|null $subresourceUris
*/
class AddOnResultInstance extends InstanceResource
{
- protected $_payloads = null;
+ protected $_payloads;
/**
* Initialize the AddOnResultInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $referenceSid The SID of the recording to which the
- * AddOnResult resource belongs
- * @param string $sid The unique string that identifies the resource to fetch
- * @return \Twilio\Rest\Api\V2010\Account\Recording\AddOnResultInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording AddOnResult resources to delete.
+ * @param string $referenceSid The SID of the recording to which the result to delete belongs.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Recording AddOnResult resource to delete.
*/
- public function __construct(Version $version, array $payload, $accountSid, $referenceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $accountSid, string $referenceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'status' => Values::array_get($payload, 'status'),
@@ -58,24 +66,18 @@ public function __construct(Version $version, array $payload, $accountSid, $refe
'dateCompleted' => Deserialize::dateTime(Values::array_get($payload, 'date_completed')),
'referenceSid' => Values::array_get($payload, 'reference_sid'),
'subresourceUris' => Values::array_get($payload, 'subresource_uris'),
- );
+ ];
- $this->solution = array(
- 'accountSid' => $accountSid,
- 'referenceSid' => $referenceSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['accountSid' => $accountSid, 'referenceSid' => $referenceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Api\V2010\Account\Recording\AddOnResultContext Context
- * for this
- * AddOnResultInstance
+ * @return AddOnResultContext Context for this AddOnResultInstance
*/
- protected function proxy()
+ protected function proxy(): AddOnResultContext
{
if (!$this->context) {
$this->context = new AddOnResultContext(
@@ -90,33 +92,33 @@ protected function proxy()
}
/**
- * Fetch a AddOnResultInstance
+ * Delete the AddOnResultInstance
*
- * @return AddOnResultInstance Fetched AddOnResultInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the AddOnResultInstance
+ * Fetch the AddOnResultInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return AddOnResultInstance Fetched AddOnResultInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): AddOnResultInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
* Access the payloads
- *
- * @return \Twilio\Rest\Api\V2010\Account\Recording\AddOnResult\PayloadList
*/
- protected function getPayloads()
+ protected function getPayloads(): PayloadList
{
return $this->proxy()->payloads;
}
@@ -128,7 +130,7 @@ protected function getPayloads()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -147,12 +149,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.AddOnResultInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResultList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResultList.php
index 82a46f5..e37d91a 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResultList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResultList.php
@@ -2,36 +2,75 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\Recording;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class AddOnResultList extends ListResource
-{
+ {
/**
* Construct the AddOnResultList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $referenceSid The SID of the recording to which the
- * AddOnResult resource belongs
- * @return \Twilio\Rest\Api\V2010\Account\Recording\AddOnResultList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording AddOnResult resources to delete.
+ * @param string $referenceSid The SID of the recording to which the result to delete belongs.
*/
- public function __construct(Version $version, $accountSid, $referenceSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid,
+ string $referenceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'referenceSid' => $referenceSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ 'referenceSid' =>
+ $referenceSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Recordings/' . \rawurlencode($referenceSid)
+ .'/AddOnResults.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Recordings/' . \rawurlencode($referenceSid) . '/AddOnResults.json';
+ /**
+ * Reads AddOnResultInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return AddOnResultInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -50,9 +89,9 @@ public function __construct(Version $version, $accountSid, $referenceSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -61,26 +100,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads AddOnResultInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return AddOnResultInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of AddOnResultInstance records from the API.
* Request is executed immediately
@@ -88,21 +107,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of AddOnResultInstance
+ * @return AddOnResultPage Page of AddOnResultInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): AddOnResultPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new AddOnResultPage($this->version, $response, $this->solution);
}
@@ -112,9 +132,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of AddOnResultInstance
+ * @return AddOnResultPage Page of AddOnResultInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): AddOnResultPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -124,13 +144,16 @@ public function getPage($targetUrl)
return new AddOnResultPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a AddOnResultContext
*
- * @param string $sid The unique string that identifies the resource to fetch
- * @return \Twilio\Rest\Api\V2010\Account\Recording\AddOnResultContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the Recording AddOnResult resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): AddOnResultContext
{
return new AddOnResultContext(
$this->version,
@@ -145,8 +168,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.AddOnResultList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResultPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResultPage.php
index d0be9e9..0df6c14 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResultPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/AddOnResultPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return AddOnResultInstance \Twilio\Rest\Api\V2010\Account\Recording\AddOnResultInstance
+ */
+ public function buildInstance(array $payload): AddOnResultInstance
{
- return new AddOnResultInstance(
- $this->version,
- $payload,
- $this->solution['accountSid'],
- $this->solution['referenceSid']
- );
+ return new AddOnResultInstance($this->version, $payload, $this->solution['accountSid'], $this->solution['referenceSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.AddOnResultPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/TranscriptionContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/TranscriptionContext.php
index b623174..447a8f7 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/TranscriptionContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/TranscriptionContext.php
@@ -2,60 +2,86 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Recording;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class TranscriptionContext extends InstanceContext
-{
+ {
/**
* Initialize the TranscriptionContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * to fetch
- * @param string $recordingSid The SID of the recording that created the
- * transcriptions to fetch
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\Recording\TranscriptionContext
+ * @param Version $version Version that contains the resource
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resources to delete.
+ * @param string $recordingSid The SID of the [Recording](https://www.twilio.com/docs/voice/api/recording) that created the transcription to delete.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Transcription resource to delete.
*/
- public function __construct(Version $version, $accountSid, $recordingSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $accountSid,
+ $recordingSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array(
- 'accountSid' => $accountSid,
- 'recordingSid' => $recordingSid,
- 'sid' => $sid,
- );
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+ 'recordingSid' =>
+ $recordingSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Recordings/' . \rawurlencode($recordingSid) . '/Transcriptions/' . \rawurlencode($sid) . '.json';
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Recordings/' . \rawurlencode($recordingSid)
+ .'/Transcriptions/' . \rawurlencode($sid)
+ .'.json';
}
/**
- * Fetch a TranscriptionInstance
+ * Delete the TranscriptionInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
+ }
+
+
+ /**
+ * Fetch the TranscriptionInstance
*
* @return TranscriptionInstance Fetched TranscriptionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): TranscriptionInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new TranscriptionInstance(
$this->version,
@@ -66,28 +92,18 @@ public function fetch()
);
}
- /**
- * Deletes the TranscriptionInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.TranscriptionContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/TranscriptionInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/TranscriptionInstance.php
index c037464..912d3b3 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/TranscriptionInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/TranscriptionInstance.php
@@ -2,53 +2,60 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Recording;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property string $apiVersion
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $duration
- * @property string $price
- * @property string $priceUnit
- * @property string $recordingSid
- * @property string $sid
+ * @property string|null $accountSid
+ * @property string|null $apiVersion
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $duration
+ * @property string|null $price
+ * @property string|null $priceUnit
+ * @property string|null $recordingSid
+ * @property string|null $sid
* @property string $status
- * @property string $transcriptionText
- * @property string $type
- * @property string $uri
+ * @property string|null $transcriptionText
+ * @property string|null $type
+ * @property string|null $uri
*/
class TranscriptionInstance extends InstanceResource
{
/**
* Initialize the TranscriptionInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $recordingSid The SID that identifies the transcription's
- * recording
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\Recording\TranscriptionInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resources to delete.
+ * @param string $recordingSid The SID of the [Recording](https://www.twilio.com/docs/voice/api/recording) that created the transcription to delete.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Transcription resource to delete.
*/
- public function __construct(Version $version, array $payload, $accountSid, $recordingSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $accountSid, string $recordingSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'apiVersion' => Values::array_get($payload, 'api_version'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
@@ -62,22 +69,18 @@ public function __construct(Version $version, array $payload, $accountSid, $reco
'transcriptionText' => Values::array_get($payload, 'transcription_text'),
'type' => Values::array_get($payload, 'type'),
'uri' => Values::array_get($payload, 'uri'),
- );
+ ];
- $this->solution = array(
- 'accountSid' => $accountSid,
- 'recordingSid' => $recordingSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['accountSid' => $accountSid, 'recordingSid' => $recordingSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Api\V2010\Account\Recording\TranscriptionContext Context for this TranscriptionInstance
+ * @return TranscriptionContext Context for this TranscriptionInstance
*/
- protected function proxy()
+ protected function proxy(): TranscriptionContext
{
if (!$this->context) {
$this->context = new TranscriptionContext(
@@ -92,25 +95,27 @@ protected function proxy()
}
/**
- * Fetch a TranscriptionInstance
+ * Delete the TranscriptionInstance
*
- * @return TranscriptionInstance Fetched TranscriptionInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the TranscriptionInstance
+ * Fetch the TranscriptionInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return TranscriptionInstance Fetched TranscriptionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): TranscriptionInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -120,7 +125,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -139,12 +144,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.TranscriptionInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/TranscriptionList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/TranscriptionList.php
index 9ab6945..40998ba 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/TranscriptionList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/TranscriptionList.php
@@ -2,36 +2,75 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\Recording;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class TranscriptionList extends ListResource
-{
+ {
/**
* Construct the TranscriptionList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $recordingSid The SID that identifies the transcription's
- * recording
- * @return \Twilio\Rest\Api\V2010\Account\Recording\TranscriptionList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resources to delete.
+ * @param string $recordingSid The SID of the [Recording](https://www.twilio.com/docs/voice/api/recording) that created the transcription to delete.
*/
- public function __construct(Version $version, $accountSid, $recordingSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid,
+ string $recordingSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'recordingSid' => $recordingSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ 'recordingSid' =>
+ $recordingSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Recordings/' . \rawurlencode($recordingSid)
+ .'/Transcriptions.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Recordings/' . \rawurlencode($recordingSid) . '/Transcriptions.json';
+ /**
+ * Reads TranscriptionInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return TranscriptionInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -50,9 +89,9 @@ public function __construct(Version $version, $accountSid, $recordingSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -61,26 +100,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads TranscriptionInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return TranscriptionInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of TranscriptionInstance records from the API.
* Request is executed immediately
@@ -88,21 +107,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of TranscriptionInstance
+ * @return TranscriptionPage Page of TranscriptionInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): TranscriptionPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new TranscriptionPage($this->version, $response, $this->solution);
}
@@ -112,9 +132,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of TranscriptionInstance
+ * @return TranscriptionPage Page of TranscriptionInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): TranscriptionPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -124,13 +144,16 @@ public function getPage($targetUrl)
return new TranscriptionPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a TranscriptionContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\Recording\TranscriptionContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the Transcription resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): TranscriptionContext
{
return new TranscriptionContext(
$this->version,
@@ -145,8 +168,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.TranscriptionList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/TranscriptionPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/TranscriptionPage.php
index ff0a37c..613fc83 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/TranscriptionPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/TranscriptionPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return TranscriptionInstance \Twilio\Rest\Api\V2010\Account\Recording\TranscriptionInstance
+ */
+ public function buildInstance(array $payload): TranscriptionInstance
{
- return new TranscriptionInstance(
- $this->version,
- $payload,
- $this->solution['accountSid'],
- $this->solution['recordingSid']
- );
+ return new TranscriptionInstance($this->version, $payload, $this->solution['accountSid'], $this->solution['recordingSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.TranscriptionPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/RecordingContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/RecordingContext.php
index dd10ad2..8cde849 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/RecordingContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/RecordingContext.php
@@ -2,65 +2,103 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account;
use Twilio\Exceptions\TwilioException;
+use Twilio\ListResource;
+use Twilio\Options;
+use Twilio\Values;
+use Twilio\Version;
use Twilio\InstanceContext;
+use Twilio\Serialize;
use Twilio\Rest\Api\V2010\Account\Recording\AddOnResultList;
use Twilio\Rest\Api\V2010\Account\Recording\TranscriptionList;
-use Twilio\Values;
-use Twilio\Version;
+
/**
- * @property \Twilio\Rest\Api\V2010\Account\Recording\TranscriptionList $transcriptions
- * @property \Twilio\Rest\Api\V2010\Account\Recording\AddOnResultList $addOnResults
- * @method \Twilio\Rest\Api\V2010\Account\Recording\TranscriptionContext transcriptions(string $sid)
+ * @property AddOnResultList $addOnResults
+ * @property TranscriptionList $transcriptions
* @method \Twilio\Rest\Api\V2010\Account\Recording\AddOnResultContext addOnResults(string $sid)
+ * @method \Twilio\Rest\Api\V2010\Account\Recording\TranscriptionContext transcriptions(string $sid)
*/
class RecordingContext extends InstanceContext
-{
- protected $_transcriptions = null;
- protected $_addOnResults = null;
+ {
+ protected $_addOnResults;
+ protected $_transcriptions;
/**
* Initialize the RecordingContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * to fetch
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\RecordingContext
+ * @param Version $version Version that contains the resource
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resources to delete.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Recording resource to delete.
*/
- public function __construct(Version $version, $accountSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $accountSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'sid' => $sid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Recordings/' . \rawurlencode($sid)
+ .'.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Recordings/' . \rawurlencode($sid) . '.json';
+ /**
+ * Delete the RecordingInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a RecordingInstance
+ * Fetch the RecordingInstance
*
+ * @param array|Options $options Optional Arguments
* @return RecordingInstance Fetched RecordingInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(array $options = []): RecordingInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $options = new Values($options);
+
+ $params = Values::of([
+ 'IncludeSoftDeleted' =>
+ Serialize::booleanToString($options['includeSoftDeleted']),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, $params, [], $headers);
return new RecordingInstance(
$this->version,
@@ -70,61 +108,47 @@ public function fetch()
);
}
- /**
- * Deletes the RecordingInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
- * Access the transcriptions
- *
- * @return \Twilio\Rest\Api\V2010\Account\Recording\TranscriptionList
+ * Access the addOnResults
*/
- protected function getTranscriptions()
+ protected function getAddOnResults(): AddOnResultList
{
- if (!$this->_transcriptions) {
- $this->_transcriptions = new TranscriptionList(
+ if (!$this->_addOnResults) {
+ $this->_addOnResults = new AddOnResultList(
$this->version,
$this->solution['accountSid'],
$this->solution['sid']
);
}
- return $this->_transcriptions;
+ return $this->_addOnResults;
}
/**
- * Access the addOnResults
- *
- * @return \Twilio\Rest\Api\V2010\Account\Recording\AddOnResultList
+ * Access the transcriptions
*/
- protected function getAddOnResults()
+ protected function getTranscriptions(): TranscriptionList
{
- if (!$this->_addOnResults) {
- $this->_addOnResults = new AddOnResultList(
+ if (!$this->_transcriptions) {
+ $this->_transcriptions = new TranscriptionList(
$this->version,
$this->solution['accountSid'],
$this->solution['sid']
);
}
- return $this->_addOnResults;
+ return $this->_transcriptions;
}
/**
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -139,10 +163,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -157,12 +181,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.RecordingContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/RecordingInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/RecordingInstance.php
index 12168fb..4254077 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/RecordingInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/RecordingInstance.php
@@ -2,59 +2,71 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
+use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Api\V2010\Account\Recording\AddOnResultList;
+use Twilio\Rest\Api\V2010\Account\Recording\TranscriptionList;
+
/**
- * @property string $accountSid
- * @property string $apiVersion
- * @property string $callSid
- * @property string $conferenceSid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property \DateTime $startTime
- * @property string $duration
- * @property string $sid
- * @property string $price
- * @property string $priceUnit
+ * @property string|null $accountSid
+ * @property string|null $apiVersion
+ * @property string|null $callSid
+ * @property string|null $conferenceSid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property \DateTime|null $startTime
+ * @property string|null $duration
+ * @property string|null $sid
+ * @property string|null $price
+ * @property string|null $priceUnit
* @property string $status
* @property int $channels
* @property string $source
- * @property int $errorCode
- * @property string $uri
- * @property array $encryptionDetails
- * @property array $subresourceUris
+ * @property int|null $errorCode
+ * @property string|null $uri
+ * @property array|null $encryptionDetails
+ * @property array|null $subresourceUris
+ * @property string|null $mediaUrl
*/
class RecordingInstance extends InstanceResource
{
- protected $_transcriptions = null;
- protected $_addOnResults = null;
+ protected $_addOnResults;
+ protected $_transcriptions;
/**
* Initialize the RecordingInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\RecordingInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resources to delete.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Recording resource to delete.
*/
- public function __construct(Version $version, array $payload, $accountSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $accountSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'apiVersion' => Values::array_get($payload, 'api_version'),
'callSid' => Values::array_get($payload, 'call_sid'),
@@ -73,19 +85,19 @@ public function __construct(Version $version, array $payload, $accountSid, $sid
'uri' => Values::array_get($payload, 'uri'),
'encryptionDetails' => Values::array_get($payload, 'encryption_details'),
'subresourceUris' => Values::array_get($payload, 'subresource_uris'),
- );
+ 'mediaUrl' => Values::array_get($payload, 'media_url'),
+ ];
- $this->solution = array('accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Api\V2010\Account\RecordingContext Context for this
- * RecordingInstance
+ * @return RecordingContext Context for this RecordingInstance
*/
- protected function proxy()
+ protected function proxy(): RecordingContext
{
if (!$this->context) {
$this->context = new RecordingContext(
@@ -99,45 +111,44 @@ protected function proxy()
}
/**
- * Fetch a RecordingInstance
+ * Delete the RecordingInstance
*
- * @return RecordingInstance Fetched RecordingInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the RecordingInstance
+ * Fetch the RecordingInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return RecordingInstance Fetched RecordingInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(array $options = []): RecordingInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch($options);
}
/**
- * Access the transcriptions
- *
- * @return \Twilio\Rest\Api\V2010\Account\Recording\TranscriptionList
+ * Access the addOnResults
*/
- protected function getTranscriptions()
+ protected function getAddOnResults(): AddOnResultList
{
- return $this->proxy()->transcriptions;
+ return $this->proxy()->addOnResults;
}
/**
- * Access the addOnResults
- *
- * @return \Twilio\Rest\Api\V2010\Account\Recording\AddOnResultList
+ * Access the transcriptions
*/
- protected function getAddOnResults()
+ protected function getTranscriptions(): TranscriptionList
{
- return $this->proxy()->addOnResults;
+ return $this->proxy()->transcriptions;
}
/**
@@ -147,7 +158,7 @@ protected function getAddOnResults()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -166,12 +177,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.RecordingInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/RecordingList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/RecordingList.php
index 2406cbe..517b817 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/RecordingList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/RecordingList.php
@@ -2,36 +2,72 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class RecordingList extends ListResource
-{
+ {
/**
* Construct the RecordingList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * @return \Twilio\Rest\Api\V2010\Account\RecordingList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording resources to delete.
*/
- public function __construct(Version $version, $accountSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Recordings.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Recordings.json';
+ /**
+ * Reads RecordingInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return RecordingInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -51,9 +87,9 @@ public function __construct(Version $version, $accountSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -62,56 +98,43 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads RecordingInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return RecordingInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of RecordingInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of RecordingInstance
+ * @return RecordingPage Page of RecordingInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): RecordingPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'DateCreated<' => Serialize::iso8601DateTime($options['dateCreatedBefore']),
- 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']),
- 'DateCreated>' => Serialize::iso8601DateTime($options['dateCreatedAfter']),
- 'CallSid' => $options['callSid'],
- 'ConferenceSid' => $options['conferenceSid'],
+
+ $params = Values::of([
+ 'DateCreated<' =>
+ Serialize::iso8601DateTime($options['dateCreatedBefore']),
+ 'DateCreated' =>
+ Serialize::iso8601DateTime($options['dateCreated']),
+ 'DateCreated>' =>
+ Serialize::iso8601DateTime($options['dateCreatedAfter']),
+ 'CallSid' =>
+ $options['callSid'],
+ 'ConferenceSid' =>
+ $options['conferenceSid'],
+ 'IncludeSoftDeleted' =>
+ Serialize::booleanToString($options['includeSoftDeleted']),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new RecordingPage($this->version, $response, $this->solution);
}
@@ -121,9 +144,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of RecordingInstance
+ * @return RecordingPage Page of RecordingInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): RecordingPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -133,15 +156,22 @@ public function getPage($targetUrl)
return new RecordingPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a RecordingContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\RecordingContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the Recording resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): RecordingContext
{
- return new RecordingContext($this->version, $this->solution['accountSid'], $sid);
+ return new RecordingContext(
+ $this->version,
+ $this->solution['accountSid'],
+ $sid
+ );
}
/**
@@ -149,8 +179,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.RecordingList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/RecordingOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/RecordingOptions.php
index 65f2ae9..7f7d7ef 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/RecordingOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/RecordingOptions.php
@@ -1,10 +1,16 @@
=YYYY-MM-DD` to read recordings that were created on or after midnight of this date.
+ * @param string $dateCreated Only include recordings that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read recordings that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read recordings that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read recordings that were created on or after midnight of this date.
+ * @param string $dateCreatedAfter Only include recordings that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read recordings that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read recordings that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read recordings that were created on or after midnight of this date.
+ * @param string $callSid The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resources to read.
+ * @param string $conferenceSid The Conference SID that identifies the conference associated with the recording to read.
+ * @param bool $includeSoftDeleted A boolean parameter indicating whether to retrieve soft deleted recordings or not. Recordings metadata are kept after deletion for a retention period of 40 days.
* @return ReadRecordingOptions Options builder
*/
- public static function read($dateCreatedBefore = Values::NONE, $dateCreated = Values::NONE, $dateCreatedAfter = Values::NONE, $callSid = Values::NONE, $conferenceSid = Values::NONE)
+ public static function read(
+
+ string $dateCreatedBefore = null,
+ string $dateCreated = null,
+ string $dateCreatedAfter = null,
+ string $callSid = Values::NONE,
+ string $conferenceSid = Values::NONE,
+ bool $includeSoftDeleted = Values::BOOL_NONE
+
+ ): ReadRecordingOptions
{
- return new ReadRecordingOptions($dateCreatedBefore, $dateCreated, $dateCreatedAfter, $callSid, $conferenceSid);
+ return new ReadRecordingOptions(
+ $dateCreatedBefore,
+ $dateCreated,
+ $dateCreatedAfter,
+ $callSid,
+ $conferenceSid,
+ $includeSoftDeleted
+ );
}
+
}
-class ReadRecordingOptions extends Options
-{
+
+class FetchRecordingOptions extends Options
+ {
+ /**
+ * @param bool $includeSoftDeleted A boolean parameter indicating whether to retrieve soft deleted recordings or not. Recordings metadata are kept after deletion for a retention period of 40 days.
+ */
+ public function __construct(
+
+ bool $includeSoftDeleted = Values::BOOL_NONE
+
+ ) {
+ $this->options['includeSoftDeleted'] = $includeSoftDeleted;
+ }
+
+ /**
+ * A boolean parameter indicating whether to retrieve soft deleted recordings or not. Recordings metadata are kept after deletion for a retention period of 40 days.
+ *
+ * @param bool $includeSoftDeleted A boolean parameter indicating whether to retrieve soft deleted recordings or not. Recordings metadata are kept after deletion for a retention period of 40 days.
+ * @return $this Fluent Builder
+ */
+ public function setIncludeSoftDeleted(bool $includeSoftDeleted): self
+ {
+ $this->options['includeSoftDeleted'] = $includeSoftDeleted;
+ return $this;
+ }
+
/**
- * @param string $dateCreatedBefore Only include recordings that were created
- * on this date
- * @param string $dateCreated Only include recordings that were created on this
- * date
- * @param string $dateCreatedAfter Only include recordings that were created on
- * this date
- * @param string $callSid The Call SID of the resources to read
- * @param string $conferenceSid Read by unique Conference SID for the recording
+ * Provide a friendly representation
+ *
+ * @return string Machine friendly representation
*/
- public function __construct($dateCreatedBefore = Values::NONE, $dateCreated = Values::NONE, $dateCreatedAfter = Values::NONE, $callSid = Values::NONE, $conferenceSid = Values::NONE)
+ public function __toString(): string
{
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.FetchRecordingOptions ' . $options . ']';
+ }
+}
+
+class ReadRecordingOptions extends Options
+ {
+ /**
+ * @param string $dateCreatedBefore Only include recordings that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read recordings that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read recordings that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read recordings that were created on or after midnight of this date.
+ * @param string $dateCreated Only include recordings that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read recordings that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read recordings that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read recordings that were created on or after midnight of this date.
+ * @param string $dateCreatedAfter Only include recordings that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read recordings that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read recordings that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read recordings that were created on or after midnight of this date.
+ * @param string $callSid The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resources to read.
+ * @param string $conferenceSid The Conference SID that identifies the conference associated with the recording to read.
+ * @param bool $includeSoftDeleted A boolean parameter indicating whether to retrieve soft deleted recordings or not. Recordings metadata are kept after deletion for a retention period of 40 days.
+ */
+ public function __construct(
+
+ string $dateCreatedBefore = null,
+ string $dateCreated = null,
+ string $dateCreatedAfter = null,
+ string $callSid = Values::NONE,
+ string $conferenceSid = Values::NONE,
+ bool $includeSoftDeleted = Values::BOOL_NONE
+
+ ) {
$this->options['dateCreatedBefore'] = $dateCreatedBefore;
$this->options['dateCreated'] = $dateCreated;
$this->options['dateCreatedAfter'] = $dateCreatedAfter;
$this->options['callSid'] = $callSid;
$this->options['conferenceSid'] = $conferenceSid;
+ $this->options['includeSoftDeleted'] = $includeSoftDeleted;
}
/**
* Only include recordings that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read recordings that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read recordings that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read recordings that were created on or after midnight of this date.
*
- * @param string $dateCreatedBefore Only include recordings that were created
- * on this date
+ * @param string $dateCreatedBefore Only include recordings that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read recordings that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read recordings that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read recordings that were created on or after midnight of this date.
* @return $this Fluent Builder
*/
- public function setDateCreatedBefore($dateCreatedBefore)
+ public function setDateCreatedBefore(string $dateCreatedBefore): self
{
$this->options['dateCreatedBefore'] = $dateCreatedBefore;
return $this;
@@ -68,11 +149,10 @@ public function setDateCreatedBefore($dateCreatedBefore)
/**
* Only include recordings that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read recordings that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read recordings that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read recordings that were created on or after midnight of this date.
*
- * @param string $dateCreated Only include recordings that were created on this
- * date
+ * @param string $dateCreated Only include recordings that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read recordings that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read recordings that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read recordings that were created on or after midnight of this date.
* @return $this Fluent Builder
*/
- public function setDateCreated($dateCreated)
+ public function setDateCreated(string $dateCreated): self
{
$this->options['dateCreated'] = $dateCreated;
return $this;
@@ -81,11 +161,10 @@ public function setDateCreated($dateCreated)
/**
* Only include recordings that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read recordings that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read recordings that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read recordings that were created on or after midnight of this date.
*
- * @param string $dateCreatedAfter Only include recordings that were created on
- * this date
+ * @param string $dateCreatedAfter Only include recordings that were created on this date. Specify a date as `YYYY-MM-DD` in GMT, for example: `2009-07-06`, to read recordings that were created on this date. You can also specify an inequality, such as `DateCreated<=YYYY-MM-DD`, to read recordings that were created on or before midnight of this date, and `DateCreated>=YYYY-MM-DD` to read recordings that were created on or after midnight of this date.
* @return $this Fluent Builder
*/
- public function setDateCreatedAfter($dateCreatedAfter)
+ public function setDateCreatedAfter(string $dateCreatedAfter): self
{
$this->options['dateCreatedAfter'] = $dateCreatedAfter;
return $this;
@@ -94,10 +173,10 @@ public function setDateCreatedAfter($dateCreatedAfter)
/**
* The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resources to read.
*
- * @param string $callSid The Call SID of the resources to read
+ * @param string $callSid The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the resources to read.
* @return $this Fluent Builder
*/
- public function setCallSid($callSid)
+ public function setCallSid(string $callSid): self
{
$this->options['callSid'] = $callSid;
return $this;
@@ -106,28 +185,36 @@ public function setCallSid($callSid)
/**
* The Conference SID that identifies the conference associated with the recording to read.
*
- * @param string $conferenceSid Read by unique Conference SID for the recording
+ * @param string $conferenceSid The Conference SID that identifies the conference associated with the recording to read.
* @return $this Fluent Builder
*/
- public function setConferenceSid($conferenceSid)
+ public function setConferenceSid(string $conferenceSid): self
{
$this->options['conferenceSid'] = $conferenceSid;
return $this;
}
+ /**
+ * A boolean parameter indicating whether to retrieve soft deleted recordings or not. Recordings metadata are kept after deletion for a retention period of 40 days.
+ *
+ * @param bool $includeSoftDeleted A boolean parameter indicating whether to retrieve soft deleted recordings or not. Recordings metadata are kept after deletion for a retention period of 40 days.
+ * @return $this Fluent Builder
+ */
+ public function setIncludeSoftDeleted(bool $includeSoftDeleted): self
+ {
+ $this->options['includeSoftDeleted'] = $includeSoftDeleted;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.ReadRecordingOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.ReadRecordingOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/RecordingPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/RecordingPage.php
index 1dc9a81..8433b83 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/RecordingPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/RecordingPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return RecordingInstance \Twilio\Rest\Api\V2010\Account\RecordingInstance
+ */
+ public function buildInstance(array $payload): RecordingInstance
{
return new RecordingInstance($this->version, $payload, $this->solution['accountSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.RecordingPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ShortCodeContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ShortCodeContext.php
index 55935cc..d07085d 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ShortCodeContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ShortCodeContext.php
@@ -2,55 +2,68 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class ShortCodeContext extends InstanceContext
-{
+ {
/**
* Initialize the ShortCodeContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the
- * resource(s) to fetch
- * @param string $sid The unique string that identifies this resource
- * @return \Twilio\Rest\Api\V2010\Account\ShortCodeContext
+ * @param Version $version Version that contains the resource
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ShortCode resource(s) to fetch.
+ * @param string $sid The Twilio-provided string that uniquely identifies the ShortCode resource to fetch
*/
- public function __construct(Version $version, $accountSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $accountSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'sid' => $sid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SMS/ShortCodes/' . \rawurlencode($sid) . '.json';
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/SMS/ShortCodes/' . \rawurlencode($sid)
+ .'.json';
}
/**
- * Fetch a ShortCodeInstance
+ * Fetch the ShortCodeInstance
*
* @return ShortCodeInstance Fetched ShortCodeInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): ShortCodeInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new ShortCodeInstance(
$this->version,
@@ -60,6 +73,7 @@ public function fetch()
);
}
+
/**
* Update the ShortCodeInstance
*
@@ -67,25 +81,28 @@ public function fetch()
* @return ShortCodeInstance Updated ShortCodeInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ShortCodeInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'ApiVersion' => $options['apiVersion'],
- 'SmsUrl' => $options['smsUrl'],
- 'SmsMethod' => $options['smsMethod'],
- 'SmsFallbackUrl' => $options['smsFallbackUrl'],
- 'SmsFallbackMethod' => $options['smsFallbackMethod'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'ApiVersion' =>
+ $options['apiVersion'],
+ 'SmsUrl' =>
+ $options['smsUrl'],
+ 'SmsMethod' =>
+ $options['smsMethod'],
+ 'SmsFallbackUrl' =>
+ $options['smsFallbackUrl'],
+ 'SmsFallbackMethod' =>
+ $options['smsFallbackMethod'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new ShortCodeInstance(
$this->version,
@@ -95,17 +112,18 @@ public function update($options = array())
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.ShortCodeContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ShortCodeInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ShortCodeInstance.php
index 48cde95..6977c8a 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ShortCodeInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ShortCodeInstance.php
@@ -2,51 +2,59 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property string $apiVersion
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $friendlyName
- * @property string $shortCode
- * @property string $sid
- * @property string $smsFallbackMethod
- * @property string $smsFallbackUrl
- * @property string $smsMethod
- * @property string $smsUrl
- * @property string $uri
+ * @property string|null $accountSid
+ * @property string|null $apiVersion
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $friendlyName
+ * @property string|null $shortCode
+ * @property string|null $sid
+ * @property string|null $smsFallbackMethod
+ * @property string|null $smsFallbackUrl
+ * @property string|null $smsMethod
+ * @property string|null $smsUrl
+ * @property string|null $uri
*/
class ShortCodeInstance extends InstanceResource
{
/**
* Initialize the ShortCodeInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The SID of the Account that created this resource
- * @param string $sid The unique string that identifies this resource
- * @return \Twilio\Rest\Api\V2010\Account\ShortCodeInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ShortCode resource(s) to fetch.
+ * @param string $sid The Twilio-provided string that uniquely identifies the ShortCode resource to fetch
*/
- public function __construct(Version $version, array $payload, $accountSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $accountSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'apiVersion' => Values::array_get($payload, 'api_version'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
@@ -59,19 +67,18 @@ public function __construct(Version $version, array $payload, $accountSid, $sid
'smsMethod' => Values::array_get($payload, 'sms_method'),
'smsUrl' => Values::array_get($payload, 'sms_url'),
'uri' => Values::array_get($payload, 'uri'),
- );
+ ];
- $this->solution = array('accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Api\V2010\Account\ShortCodeContext Context for this
- * ShortCodeInstance
+ * @return ShortCodeContext Context for this ShortCodeInstance
*/
- protected function proxy()
+ protected function proxy(): ShortCodeContext
{
if (!$this->context) {
$this->context = new ShortCodeContext(
@@ -85,13 +92,14 @@ protected function proxy()
}
/**
- * Fetch a ShortCodeInstance
+ * Fetch the ShortCodeInstance
*
* @return ShortCodeInstance Fetched ShortCodeInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): ShortCodeInstance
{
+
return $this->proxy()->fetch();
}
@@ -102,8 +110,9 @@ public function fetch()
* @return ShortCodeInstance Updated ShortCodeInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ShortCodeInstance
{
+
return $this->proxy()->update($options);
}
@@ -114,7 +123,7 @@ public function update($options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -133,12 +142,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.ShortCodeInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ShortCodeList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ShortCodeList.php
index 1f842bf..a230dc4 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ShortCodeList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ShortCodeList.php
@@ -2,35 +2,71 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account;
use Twilio\ListResource;
use Twilio\Options;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class ShortCodeList extends ListResource
-{
+ {
/**
* Construct the ShortCodeList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created this resource
- * @return \Twilio\Rest\Api\V2010\Account\ShortCodeList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the ShortCode resource(s) to fetch.
*/
- public function __construct(Version $version, $accountSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/SMS/ShortCodes.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SMS/ShortCodes.json';
+ /**
+ * Reads ShortCodeInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return ShortCodeInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -50,9 +86,9 @@ public function __construct(Version $version, $accountSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -61,53 +97,35 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads ShortCodeInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return ShortCodeInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of ShortCodeInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of ShortCodeInstance
+ * @return ShortCodePage Page of ShortCodeInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): ShortCodePage
{
$options = new Values($options);
- $params = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'ShortCode' => $options['shortCode'],
+
+ $params = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'ShortCode' =>
+ $options['shortCode'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new ShortCodePage($this->version, $response, $this->solution);
}
@@ -117,9 +135,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of ShortCodeInstance
+ * @return ShortCodePage Page of ShortCodeInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): ShortCodePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -129,15 +147,22 @@ public function getPage($targetUrl)
return new ShortCodePage($this->version, $response, $this->solution);
}
+
/**
* Constructs a ShortCodeContext
*
- * @param string $sid The unique string that identifies this resource
- * @return \Twilio\Rest\Api\V2010\Account\ShortCodeContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the ShortCode resource to fetch
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): ShortCodeContext
{
- return new ShortCodeContext($this->version, $this->solution['accountSid'], $sid);
+ return new ShortCodeContext(
+ $this->version,
+ $this->solution['accountSid'],
+ $sid
+ );
}
/**
@@ -145,8 +170,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.ShortCodeList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ShortCodeOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ShortCodeOptions.php
index 1178170..ef5eb45 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ShortCodeOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ShortCodeOptions.php
@@ -1,10 +1,16 @@
options['friendlyName'] = $friendlyName;
- $this->options['apiVersion'] = $apiVersion;
- $this->options['smsUrl'] = $smsUrl;
- $this->options['smsMethod'] = $smsMethod;
- $this->options['smsFallbackUrl'] = $smsFallbackUrl;
- $this->options['smsFallbackMethod'] = $smsFallbackMethod;
+ $this->options['shortCode'] = $shortCode;
}
/**
- * A descriptive string that you created to describe this resource. It can be up to 64 characters long. By default, the `FriendlyName` is the short code.
+ * The string that identifies the ShortCode resources to read.
*
- * @param string $friendlyName A string to describe this resource
+ * @param string $friendlyName The string that identifies the ShortCode resources to read.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
}
/**
- * The API version to use to start a new TwiML session. Can be: `2010-04-01` or `2008-08-01`.
+ * Only show the ShortCode resources that match this pattern. You can specify partial numbers and use '*' as a wildcard for any digit.
*
- * @param string $apiVersion The API version to use to start a new TwiML session
+ * @param string $shortCode Only show the ShortCode resources that match this pattern. You can specify partial numbers and use '*' as a wildcard for any digit.
* @return $this Fluent Builder
*/
- public function setApiVersion($apiVersion)
+ public function setShortCode(string $shortCode): self
{
- $this->options['apiVersion'] = $apiVersion;
+ $this->options['shortCode'] = $shortCode;
return $this;
}
/**
- * The URL we should call when receiving an incoming SMS message to this short code.
+ * Provide a friendly representation
*
- * @param string $smsUrl URL Twilio will request when receiving an SMS
- * @return $this Fluent Builder
+ * @return string Machine friendly representation
*/
- public function setSmsUrl($smsUrl)
+ public function __toString(): string
{
- $this->options['smsUrl'] = $smsUrl;
- return $this;
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.ReadShortCodeOptions ' . $options . ']';
}
+}
+class UpdateShortCodeOptions extends Options
+ {
/**
- * The HTTP method we should use when calling the `sms_url`. Can be: `GET` or `POST`.
- *
- * @param string $smsMethod HTTP method to use when requesting the sms url
- * @return $this Fluent Builder
+ * @param string $friendlyName A descriptive string that you created to describe this resource. It can be up to 64 characters long. By default, the `FriendlyName` is the short code.
+ * @param string $apiVersion The API version to use to start a new TwiML session. Can be: `2010-04-01` or `2008-08-01`.
+ * @param string $smsUrl The URL we should call when receiving an incoming SMS message to this short code.
+ * @param string $smsMethod The HTTP method we should use when calling the `sms_url`. Can be: `GET` or `POST`.
+ * @param string $smsFallbackUrl The URL that we should call if an error occurs while retrieving or executing the TwiML from `sms_url`.
+ * @param string $smsFallbackMethod The HTTP method that we should use to call the `sms_fallback_url`. Can be: `GET` or `POST`.
*/
- public function setSmsMethod($smsMethod)
- {
+ public function __construct(
+
+ string $friendlyName = Values::NONE,
+ string $apiVersion = Values::NONE,
+ string $smsUrl = Values::NONE,
+ string $smsMethod = Values::NONE,
+ string $smsFallbackUrl = Values::NONE,
+ string $smsFallbackMethod = Values::NONE
+
+ ) {
+ $this->options['friendlyName'] = $friendlyName;
+ $this->options['apiVersion'] = $apiVersion;
+ $this->options['smsUrl'] = $smsUrl;
$this->options['smsMethod'] = $smsMethod;
- return $this;
+ $this->options['smsFallbackUrl'] = $smsFallbackUrl;
+ $this->options['smsFallbackMethod'] = $smsFallbackMethod;
}
/**
- * The URL that we should call if an error occurs while retrieving or executing the TwiML from `sms_url`.
+ * A descriptive string that you created to describe this resource. It can be up to 64 characters long. By default, the `FriendlyName` is the short code.
*
- * @param string $smsFallbackUrl URL Twilio will request if an error occurs in
- * executing TwiML
+ * @param string $friendlyName A descriptive string that you created to describe this resource. It can be up to 64 characters long. By default, the `FriendlyName` is the short code.
* @return $this Fluent Builder
*/
- public function setSmsFallbackUrl($smsFallbackUrl)
+ public function setFriendlyName(string $friendlyName): self
{
- $this->options['smsFallbackUrl'] = $smsFallbackUrl;
+ $this->options['friendlyName'] = $friendlyName;
return $this;
}
/**
- * The HTTP method that we should use to call the `sms_fallback_url`. Can be: `GET` or `POST`.
+ * The API version to use to start a new TwiML session. Can be: `2010-04-01` or `2008-08-01`.
*
- * @param string $smsFallbackMethod HTTP method Twilio will use with
- * sms_fallback_url
+ * @param string $apiVersion The API version to use to start a new TwiML session. Can be: `2010-04-01` or `2008-08-01`.
* @return $this Fluent Builder
*/
- public function setSmsFallbackMethod($smsFallbackMethod)
+ public function setApiVersion(string $apiVersion): self
{
- $this->options['smsFallbackMethod'] = $smsFallbackMethod;
+ $this->options['apiVersion'] = $apiVersion;
return $this;
}
/**
- * Provide a friendly representation
+ * The URL we should call when receiving an incoming SMS message to this short code.
*
- * @return string Machine friendly representation
+ * @param string $smsUrl The URL we should call when receiving an incoming SMS message to this short code.
+ * @return $this Fluent Builder
*/
- public function __toString()
+ public function setSmsUrl(string $smsUrl): self
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.UpdateShortCodeOptions ' . \implode(' ', $options) . ']';
+ $this->options['smsUrl'] = $smsUrl;
+ return $this;
}
-}
-class ReadShortCodeOptions extends Options
-{
/**
- * @param string $friendlyName The string that identifies the ShortCode
- * resources to read
- * @param string $shortCode Filter by ShortCode
+ * The HTTP method we should use when calling the `sms_url`. Can be: `GET` or `POST`.
+ *
+ * @param string $smsMethod The HTTP method we should use when calling the `sms_url`. Can be: `GET` or `POST`.
+ * @return $this Fluent Builder
*/
- public function __construct($friendlyName = Values::NONE, $shortCode = Values::NONE)
+ public function setSmsMethod(string $smsMethod): self
{
- $this->options['friendlyName'] = $friendlyName;
- $this->options['shortCode'] = $shortCode;
+ $this->options['smsMethod'] = $smsMethod;
+ return $this;
}
/**
- * The string that identifies the ShortCode resources to read.
+ * The URL that we should call if an error occurs while retrieving or executing the TwiML from `sms_url`.
*
- * @param string $friendlyName The string that identifies the ShortCode
- * resources to read
+ * @param string $smsFallbackUrl The URL that we should call if an error occurs while retrieving or executing the TwiML from `sms_url`.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setSmsFallbackUrl(string $smsFallbackUrl): self
{
- $this->options['friendlyName'] = $friendlyName;
+ $this->options['smsFallbackUrl'] = $smsFallbackUrl;
return $this;
}
/**
- * Only show the ShortCode resources that match this pattern. You can specify partial numbers and use '*' as a wildcard for any digit.
+ * The HTTP method that we should use to call the `sms_fallback_url`. Can be: `GET` or `POST`.
*
- * @param string $shortCode Filter by ShortCode
+ * @param string $smsFallbackMethod The HTTP method that we should use to call the `sms_fallback_url`. Can be: `GET` or `POST`.
* @return $this Fluent Builder
*/
- public function setShortCode($shortCode)
+ public function setSmsFallbackMethod(string $smsFallbackMethod): self
{
- $this->options['shortCode'] = $shortCode;
+ $this->options['smsFallbackMethod'] = $smsFallbackMethod;
return $this;
}
@@ -198,14 +229,10 @@ public function setShortCode($shortCode)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.ReadShortCodeOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.UpdateShortCodeOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ShortCodePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ShortCodePage.php
index 1895eb9..a725025 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ShortCodePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ShortCodePage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return ShortCodeInstance \Twilio\Rest\Api\V2010\Account\ShortCodeInstance
+ */
+ public function buildInstance(array $payload): ShortCodeInstance
{
return new ShortCodeInstance($this->version, $payload, $this->solution['accountSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.ShortCodePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/SigningKeyContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/SigningKeyContext.php
index ceed068..e28c17d 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/SigningKeyContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/SigningKeyContext.php
@@ -2,54 +2,82 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class SigningKeyContext extends InstanceContext
-{
+ {
/**
* Initialize the SigningKeyContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $accountSid The account_sid
- * @param string $sid The sid
- * @return \Twilio\Rest\Api\V2010\Account\SigningKeyContext
+ * @param Version $version Version that contains the resource
+ * @param string $accountSid
+ * @param string $sid
*/
- public function __construct(Version $version, $accountSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $accountSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'sid' => $sid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SigningKeys/' . \rawurlencode($sid) . '.json';
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/SigningKeys/' . \rawurlencode($sid)
+ .'.json';
}
/**
- * Fetch a SigningKeyInstance
+ * Delete the SigningKeyInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
+ }
+
+
+ /**
+ * Fetch the SigningKeyInstance
*
* @return SigningKeyInstance Fetched SigningKeyInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): SigningKeyInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new SigningKeyInstance(
$this->version,
@@ -59,6 +87,7 @@ public function fetch()
);
}
+
/**
* Update the SigningKeyInstance
*
@@ -66,18 +95,18 @@ public function fetch()
* @return SigningKeyInstance Updated SigningKeyInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): SigningKeyInstance
{
+
$options = new Values($options);
- $data = Values::of(array('FriendlyName' => $options['friendlyName'],));
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ ]);
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new SigningKeyInstance(
$this->version,
@@ -87,28 +116,18 @@ public function update($options = array())
);
}
- /**
- * Deletes the SigningKeyInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.SigningKeyContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/SigningKeyInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/SigningKeyInstance.php
index 961abc5..e403dc5 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/SigningKeyInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/SigningKeyInstance.php
@@ -2,61 +2,67 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $friendlyName
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
+ * @property string|null $sid
+ * @property string|null $friendlyName
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
*/
class SigningKeyInstance extends InstanceResource
{
/**
* Initialize the SigningKeyInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid A 34 character string that uniquely identifies
- * this resource.
- * @param string $sid The sid
- * @return \Twilio\Rest\Api\V2010\Account\SigningKeyInstance
+ * @param string $accountSid
+ * @param string $sid
*/
- public function __construct(Version $version, array $payload, $accountSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $accountSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- );
+ ];
- $this->solution = array('accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Api\V2010\Account\SigningKeyContext Context for this
- * SigningKeyInstance
+ * @return SigningKeyContext Context for this SigningKeyInstance
*/
- protected function proxy()
+ protected function proxy(): SigningKeyContext
{
if (!$this->context) {
$this->context = new SigningKeyContext(
@@ -70,37 +76,40 @@ protected function proxy()
}
/**
- * Fetch a SigningKeyInstance
+ * Delete the SigningKeyInstance
*
- * @return SigningKeyInstance Fetched SigningKeyInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Update the SigningKeyInstance
+ * Fetch the SigningKeyInstance
*
- * @param array|Options $options Optional Arguments
- * @return SigningKeyInstance Updated SigningKeyInstance
+ * @return SigningKeyInstance Fetched SigningKeyInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): SigningKeyInstance
{
- return $this->proxy()->update($options);
+
+ return $this->proxy()->fetch();
}
/**
- * Deletes the SigningKeyInstance
+ * Update the SigningKeyInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return SigningKeyInstance Updated SigningKeyInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): SigningKeyInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->update($options);
}
/**
@@ -110,7 +119,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -129,12 +138,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.SigningKeyInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/SigningKeyList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/SigningKeyList.php
index fa448f8..fba9c02 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/SigningKeyList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/SigningKeyList.php
@@ -2,35 +2,69 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class SigningKeyList extends ListResource
-{
+ {
/**
* Construct the SigningKeyList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid A 34 character string that uniquely identifies
- * this resource.
- * @return \Twilio\Rest\Api\V2010\Account\SigningKeyList
+ * @param string $accountSid
*/
- public function __construct(Version $version, $accountSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/SigningKeys.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SigningKeys.json';
+ /**
+ * Reads SigningKeyInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return SigningKeyInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -49,9 +83,9 @@ public function __construct(Version $version, $accountSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -60,26 +94,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads SigningKeyInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return SigningKeyInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of SigningKeyInstance records from the API.
* Request is executed immediately
@@ -87,21 +101,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of SigningKeyInstance
+ * @return SigningKeyPage Page of SigningKeyInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): SigningKeyPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new SigningKeyPage($this->version, $response, $this->solution);
}
@@ -111,9 +126,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of SigningKeyInstance
+ * @return SigningKeyPage Page of SigningKeyInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): SigningKeyPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -123,15 +138,22 @@ public function getPage($targetUrl)
return new SigningKeyPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a SigningKeyContext
*
- * @param string $sid The sid
- * @return \Twilio\Rest\Api\V2010\Account\SigningKeyContext
+ * @param string $sid
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): SigningKeyContext
{
- return new SigningKeyContext($this->version, $this->solution['accountSid'], $sid);
+ return new SigningKeyContext(
+ $this->version,
+ $this->solution['accountSid'],
+ $sid
+ );
}
/**
@@ -139,8 +161,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.SigningKeyList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/SigningKeyOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/SigningKeyOptions.php
index 9db6877..02e0d65 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/SigningKeyOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/SigningKeyOptions.php
@@ -1,10 +1,16 @@
options['friendlyName'] = $friendlyName;
}
/**
- * The friendly_name
+ *
*
- * @param string $friendlyName The friendly_name
+ * @param string $friendlyName
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -51,14 +73,10 @@ public function setFriendlyName($friendlyName)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.UpdateSigningKeyOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.UpdateSigningKeyOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/SigningKeyPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/SigningKeyPage.php
index 68388af..a3f767e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/SigningKeyPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/SigningKeyPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return SigningKeyInstance \Twilio\Rest\Api\V2010\Account\SigningKeyInstance
+ */
+ public function buildInstance(array $payload): SigningKeyInstance
{
return new SigningKeyInstance($this->version, $payload, $this->solution['accountSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.SigningKeyPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialContext.php
index da7a656..0f758e2 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialContext.php
@@ -2,62 +2,87 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Sip\CredentialList;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class CredentialContext extends InstanceContext
-{
+ {
/**
* Initialize the CredentialContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $accountSid The unique id of the Account that is responsible
- * for this resource.
- * @param string $credentialListSid The unique id that identifies the
- * credential list that contains the desired
- * credential
- * @param string $sid The unique id that identifies the resource to fetch.
- * @return \Twilio\Rest\Api\V2010\Account\Sip\CredentialList\CredentialContext
+ * @param Version $version Version that contains the resource
+ * @param string $accountSid The unique id of the Account that is responsible for this resource.
+ * @param string $credentialListSid The unique id that identifies the credential list to include the created credential.
+ * @param string $sid The unique id that identifies the resource to delete.
*/
- public function __construct(Version $version, $accountSid, $credentialListSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $accountSid,
+ $credentialListSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array(
- 'accountSid' => $accountSid,
- 'credentialListSid' => $credentialListSid,
- 'sid' => $sid,
- );
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+ 'credentialListSid' =>
+ $credentialListSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/SIP/CredentialLists/' . \rawurlencode($credentialListSid)
+ .'/Credentials/' . \rawurlencode($sid)
+ .'.json';
+ }
+
+ /**
+ * Delete the CredentialInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/CredentialLists/' . \rawurlencode($credentialListSid) . '/Credentials/' . \rawurlencode($sid) . '.json';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a CredentialInstance
+ * Fetch the CredentialInstance
*
* @return CredentialInstance Fetched CredentialInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): CredentialInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new CredentialInstance(
$this->version,
@@ -68,6 +93,7 @@ public function fetch()
);
}
+
/**
* Update the CredentialInstance
*
@@ -75,18 +101,18 @@ public function fetch()
* @return CredentialInstance Updated CredentialInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): CredentialInstance
{
+
$options = new Values($options);
- $data = Values::of(array('Password' => $options['password'],));
+ $data = Values::of([
+ 'Password' =>
+ $options['password'],
+ ]);
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new CredentialInstance(
$this->version,
@@ -97,28 +123,18 @@ public function update($options = array())
);
}
- /**
- * Deletes the CredentialInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.CredentialContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialInstance.php
index d73aa35..330f672 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialInstance.php
@@ -2,50 +2,55 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Sip\CredentialList;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $credentialListSid
- * @property string $username
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $uri
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $credentialListSid
+ * @property string|null $username
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $uri
*/
class CredentialInstance extends InstanceResource
{
/**
* Initialize the CredentialInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The unique id of the Account that is responsible
- * for this resource.
- * @param string $credentialListSid The unique id that identifies the
- * credential list that includes this
- * credential
- * @param string $sid The unique id that identifies the resource to fetch.
- * @return \Twilio\Rest\Api\V2010\Account\Sip\CredentialList\CredentialInstance
+ * @param string $accountSid The unique id of the Account that is responsible for this resource.
+ * @param string $credentialListSid The unique id that identifies the credential list to include the created credential.
+ * @param string $sid The unique id that identifies the resource to delete.
*/
- public function __construct(Version $version, array $payload, $accountSid, $credentialListSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $accountSid, string $credentialListSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'credentialListSid' => Values::array_get($payload, 'credential_list_sid'),
@@ -53,22 +58,18 @@ public function __construct(Version $version, array $payload, $accountSid, $cred
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'uri' => Values::array_get($payload, 'uri'),
- );
+ ];
- $this->solution = array(
- 'accountSid' => $accountSid,
- 'credentialListSid' => $credentialListSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['accountSid' => $accountSid, 'credentialListSid' => $credentialListSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Api\V2010\Account\Sip\CredentialList\CredentialContext Context for this CredentialInstance
+ * @return CredentialContext Context for this CredentialInstance
*/
- protected function proxy()
+ protected function proxy(): CredentialContext
{
if (!$this->context) {
$this->context = new CredentialContext(
@@ -83,37 +84,40 @@ protected function proxy()
}
/**
- * Fetch a CredentialInstance
+ * Delete the CredentialInstance
*
- * @return CredentialInstance Fetched CredentialInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Update the CredentialInstance
+ * Fetch the CredentialInstance
*
- * @param array|Options $options Optional Arguments
- * @return CredentialInstance Updated CredentialInstance
+ * @return CredentialInstance Fetched CredentialInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): CredentialInstance
{
- return $this->proxy()->update($options);
+
+ return $this->proxy()->fetch();
}
/**
- * Deletes the CredentialInstance
+ * Update the CredentialInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return CredentialInstance Updated CredentialInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): CredentialInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->update($options);
}
/**
@@ -123,7 +127,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -142,12 +146,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.CredentialInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialList.php
index ea04d78..8013bcf 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialList.php
@@ -2,68 +2,88 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\Sip\CredentialList;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class CredentialList extends ListResource
-{
+ {
/**
* Construct the CredentialList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The unique id of the Account that is responsible
- * for this resource.
- * @param string $credentialListSid The unique id that identifies the
- * credential list that includes this
- * credential
- * @return \Twilio\Rest\Api\V2010\Account\Sip\CredentialList\CredentialList
+ * @param string $accountSid The unique id of the Account that is responsible for this resource.
+ * @param string $credentialListSid The unique id that identifies the credential list to include the created credential.
*/
- public function __construct(Version $version, $accountSid, $credentialListSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid,
+ string $credentialListSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'credentialListSid' => $credentialListSid,);
-
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/CredentialLists/' . \rawurlencode($credentialListSid) . '/Credentials.json';
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ 'credentialListSid' =>
+ $credentialListSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/SIP/CredentialLists/' . \rawurlencode($credentialListSid)
+ .'/Credentials.json';
}
/**
- * Streams CredentialInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the CredentialInstance
*
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @param string $username The username that will be passed when authenticating SIP requests. The username should be sent in response to Twilio's challenge of the initial INVITE. It can be up to 32 characters long.
+ * @param string $password The password that the username will use when authenticating SIP requests. The password must be a minimum of 12 characters, contain at least 1 digit, and have mixed case. (eg `IWasAtSignal2018`)
+ * @return CredentialInstance Created CredentialInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($limit = null, $pageSize = null)
+ public function create(string $username, string $password): CredentialInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($limits['pageSize']);
+ $data = Values::of([
+ 'Username' =>
+ $username,
+ 'Password' =>
+ $password,
+ ]);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new CredentialInstance(
+ $this->version,
+ $payload,
+ $this->solution['accountSid'],
+ $this->solution['credentialListSid']
+ );
}
+
/**
* Reads CredentialInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -79,11 +99,38 @@ public function stream($limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return CredentialInstance[] Array of results
*/
- public function read($limit = null, $pageSize = null)
+ public function read(int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($limit, $pageSize), false);
}
+ /**
+ * Streams CredentialInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of CredentialInstance records from the API.
* Request is executed immediately
@@ -91,21 +138,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of CredentialInstance
+ * @return CredentialPage Page of CredentialInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): CredentialPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new CredentialPage($this->version, $response, $this->solution);
}
@@ -115,9 +163,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of CredentialInstance
+ * @return CredentialPage Page of CredentialInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): CredentialPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -127,40 +175,16 @@ public function getPage($targetUrl)
return new CredentialPage($this->version, $response, $this->solution);
}
- /**
- * Create a new CredentialInstance
- *
- * @param string $username The username for this credential.
- * @param string $password The password will not be returned in the response.
- * @return CredentialInstance Newly created CredentialInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($username, $password)
- {
- $data = Values::of(array('Username' => $username, 'Password' => $password,));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new CredentialInstance(
- $this->version,
- $payload,
- $this->solution['accountSid'],
- $this->solution['credentialListSid']
- );
- }
/**
* Constructs a CredentialContext
*
- * @param string $sid The unique id that identifies the resource to fetch.
- * @return \Twilio\Rest\Api\V2010\Account\Sip\CredentialList\CredentialContext
+ * @param string $sid The unique id that identifies the resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): CredentialContext
{
return new CredentialContext(
$this->version,
@@ -175,8 +199,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.CredentialList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialOptions.php
index 52eadd3..6e48aea 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialOptions.php
@@ -1,10 +1,16 @@
options['password'] = $password;
}
/**
* The password that the username will use when authenticating SIP requests. The password must be a minimum of 12 characters, contain at least 1 digit, and have mixed case. (eg `IWasAtSignal2018`)
*
- * @param string $password The password will not be returned in the response
+ * @param string $password The password that the username will use when authenticating SIP requests. The password must be a minimum of 12 characters, contain at least 1 digit, and have mixed case. (eg `IWasAtSignal2018`)
* @return $this Fluent Builder
*/
- public function setPassword($password)
+ public function setPassword(string $password): self
{
$this->options['password'] = $password;
return $this;
@@ -51,14 +75,10 @@ public function setPassword($password)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.UpdateCredentialOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.UpdateCredentialOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialPage.php
index 0f7f997..f5a3d50 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialList/CredentialPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return CredentialInstance \Twilio\Rest\Api\V2010\Account\Sip\CredentialList\CredentialInstance
+ */
+ public function buildInstance(array $payload): CredentialInstance
{
- return new CredentialInstance(
- $this->version,
- $payload,
- $this->solution['accountSid'],
- $this->solution['credentialListSid']
- );
+ return new CredentialInstance($this->version, $payload, $this->solution['accountSid'], $this->solution['credentialListSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.CredentialPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialListContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialListContext.php
index 16e0bf4..58f0ced 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialListContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialListContext.php
@@ -2,61 +2,89 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Sip;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
-use Twilio\Rest\Api\V2010\Account\Sip\CredentialList\CredentialList;
+use Twilio\ListResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Api\V2010\Account\Sip\CredentialList\CredentialList;
+
/**
- * @property \Twilio\Rest\Api\V2010\Account\Sip\CredentialList\CredentialList $credentials
+ * @property CredentialList $credentials
* @method \Twilio\Rest\Api\V2010\Account\Sip\CredentialList\CredentialContext credentials(string $sid)
*/
class CredentialListContext extends InstanceContext
-{
- protected $_credentials = null;
+ {
+ protected $_credentials;
/**
* Initialize the CredentialListContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $accountSid The unique id of the Account that is responsible
- * for this resource.
- * @param string $sid Fetch by unique credential list Sid
- * @return \Twilio\Rest\Api\V2010\Account\Sip\CredentialListContext
+ * @param Version $version Version that contains the resource
+ * @param string $accountSid The unique id of the Account that is responsible for this resource.
+ * @param string $sid The credential list Sid that uniquely identifies this resource
*/
- public function __construct(Version $version, $accountSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $accountSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'sid' => $sid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/SIP/CredentialLists/' . \rawurlencode($sid)
+ .'.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/CredentialLists/' . \rawurlencode($sid) . '.json';
+ /**
+ * Delete the CredentialListInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a CredentialListInstance
+ * Fetch the CredentialListInstance
*
* @return CredentialListInstance Fetched CredentialListInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): CredentialListInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new CredentialListInstance(
$this->version,
@@ -66,23 +94,24 @@ public function fetch()
);
}
+
/**
* Update the CredentialListInstance
*
- * @param string $friendlyName Human readable descriptive text
+ * @param string $friendlyName A human readable descriptive text for a CredentialList, up to 64 characters long.
* @return CredentialListInstance Updated CredentialListInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($friendlyName)
+ public function update(string $friendlyName): CredentialListInstance
{
- $data = Values::of(array('FriendlyName' => $friendlyName,));
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'FriendlyName' =>
+ $friendlyName,
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new CredentialListInstance(
$this->version,
@@ -92,23 +121,11 @@ public function update($friendlyName)
);
}
- /**
- * Deletes the CredentialListInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Access the credentials
- *
- * @return \Twilio\Rest\Api\V2010\Account\Sip\CredentialList\CredentialList
*/
- protected function getCredentials()
+ protected function getCredentials(): CredentialList
{
if (!$this->_credentials) {
$this->_credentials = new CredentialList(
@@ -125,10 +142,10 @@ protected function getCredentials()
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -143,10 +160,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -161,12 +178,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.CredentialListContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialListInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialListInstance.php
index 3442cd0..6b537b0 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialListInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialListInstance.php
@@ -2,48 +2,56 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Sip;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Api\V2010\Account\Sip\CredentialList\CredentialList;
+
/**
- * @property string $accountSid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $friendlyName
- * @property string $sid
- * @property array $subresourceUris
- * @property string $uri
+ * @property string|null $accountSid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $friendlyName
+ * @property string|null $sid
+ * @property array|null $subresourceUris
+ * @property string|null $uri
*/
class CredentialListInstance extends InstanceResource
{
- protected $_credentials = null;
+ protected $_credentials;
/**
* Initialize the CredentialListInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid A 34 character string that uniquely identifies
- * this resource.
- * @param string $sid Fetch by unique credential list Sid
- * @return \Twilio\Rest\Api\V2010\Account\Sip\CredentialListInstance
+ * @param string $accountSid The unique id of the Account that is responsible for this resource.
+ * @param string $sid The credential list Sid that uniquely identifies this resource
*/
- public function __construct(Version $version, array $payload, $accountSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $accountSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
@@ -51,20 +59,18 @@ public function __construct(Version $version, array $payload, $accountSid, $sid
'sid' => Values::array_get($payload, 'sid'),
'subresourceUris' => Values::array_get($payload, 'subresource_uris'),
'uri' => Values::array_get($payload, 'uri'),
- );
+ ];
- $this->solution = array('accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Api\V2010\Account\Sip\CredentialListContext Context for
- * this
- * CredentialListInstance
+ * @return CredentialListContext Context for this CredentialListInstance
*/
- protected function proxy()
+ protected function proxy(): CredentialListContext
{
if (!$this->context) {
$this->context = new CredentialListContext(
@@ -78,45 +84,46 @@ protected function proxy()
}
/**
- * Fetch a CredentialListInstance
+ * Delete the CredentialListInstance
*
- * @return CredentialListInstance Fetched CredentialListInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Update the CredentialListInstance
+ * Fetch the CredentialListInstance
*
- * @param string $friendlyName Human readable descriptive text
- * @return CredentialListInstance Updated CredentialListInstance
+ * @return CredentialListInstance Fetched CredentialListInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($friendlyName)
+ public function fetch(): CredentialListInstance
{
- return $this->proxy()->update($friendlyName);
+
+ return $this->proxy()->fetch();
}
/**
- * Deletes the CredentialListInstance
+ * Update the CredentialListInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param string $friendlyName A human readable descriptive text for a CredentialList, up to 64 characters long.
+ * @return CredentialListInstance Updated CredentialListInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(string $friendlyName): CredentialListInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->update($friendlyName);
}
/**
* Access the credentials
- *
- * @return \Twilio\Rest\Api\V2010\Account\Sip\CredentialList\CredentialList
*/
- protected function getCredentials()
+ protected function getCredentials(): CredentialList
{
return $this->proxy()->credentials;
}
@@ -128,7 +135,7 @@ protected function getCredentials()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -147,12 +154,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.CredentialListInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialListList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialListList.php
index c7712ad..a8c1f80 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialListList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialListList.php
@@ -2,65 +2,79 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\Sip;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Rest\Api\V2010\Account\Sip\CredentialList\CredentialList;
+
class CredentialListList extends ListResource
-{
+ {
/**
* Construct the CredentialListList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid A 34 character string that uniquely identifies
- * this resource.
- * @return \Twilio\Rest\Api\V2010\Account\Sip\CredentialListList
+ * @param string $accountSid The unique id of the Account that is responsible for this resource.
*/
- public function __construct(Version $version, $accountSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid,);
-
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/CredentialLists.json';
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/SIP/CredentialLists.json';
}
/**
- * Streams CredentialListInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the CredentialListInstance
*
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @param string $friendlyName A human readable descriptive text that describes the CredentialList, up to 64 characters long.
+ * @return CredentialListInstance Created CredentialListInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($limit = null, $pageSize = null)
+ public function create(string $friendlyName): CredentialListInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($limits['pageSize']);
+ $data = Values::of([
+ 'FriendlyName' =>
+ $friendlyName,
+ ]);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new CredentialListInstance(
+ $this->version,
+ $payload,
+ $this->solution['accountSid']
+ );
}
+
/**
* Reads CredentialListInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -76,11 +90,38 @@ public function stream($limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return CredentialListInstance[] Array of results
*/
- public function read($limit = null, $pageSize = null)
+ public function read(int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($limit, $pageSize), false);
}
+ /**
+ * Streams CredentialListInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of CredentialListInstance records from the API.
* Request is executed immediately
@@ -88,21 +129,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of CredentialListInstance
+ * @return CredentialListPage Page of CredentialListInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): CredentialListPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new CredentialListPage($this->version, $response, $this->solution);
}
@@ -112,9 +154,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of CredentialListInstance
+ * @return CredentialListPage Page of CredentialListInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): CredentialListPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -124,36 +166,22 @@ public function getPage($targetUrl)
return new CredentialListPage($this->version, $response, $this->solution);
}
- /**
- * Create a new CredentialListInstance
- *
- * @param string $friendlyName Human readable descriptive text
- * @return CredentialListInstance Newly created CredentialListInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($friendlyName)
- {
- $data = Values::of(array('FriendlyName' => $friendlyName,));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new CredentialListInstance($this->version, $payload, $this->solution['accountSid']);
- }
/**
* Constructs a CredentialListContext
*
- * @param string $sid Fetch by unique credential list Sid
- * @return \Twilio\Rest\Api\V2010\Account\Sip\CredentialListContext
+ * @param string $sid The credential list Sid that uniquely identifies this resource
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): CredentialListContext
{
- return new CredentialListContext($this->version, $this->solution['accountSid'], $sid);
+ return new CredentialListContext(
+ $this->version,
+ $this->solution['accountSid'],
+ $sid
+ );
}
/**
@@ -161,8 +189,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.CredentialListList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialListPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialListPage.php
index 44e3b8b..979c527 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialListPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/CredentialListPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return CredentialListInstance \Twilio\Rest\Api\V2010\Account\Sip\CredentialListInstance
+ */
+ public function buildInstance(array $payload): CredentialListInstance
{
return new CredentialListInstance($this->version, $payload, $this->solution['accountSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.CredentialListPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsCredentialListMappingContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsCredentialListMappingContext.php
index 8dc8c78..09a2207 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsCredentialListMappingContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsCredentialListMappingContext.php
@@ -2,57 +2,86 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class AuthCallsCredentialListMappingContext extends InstanceContext
-{
+ {
/**
* Initialize the AuthCallsCredentialListMappingContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * to fetch
- * @param string $domainSid The SID of the SIP domain that contains the
- * resource to fetch
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls\AuthCallsCredentialListMappingContext
+ * @param Version $version Version that contains the resource
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
+ * @param string $domainSid The SID of the SIP domain that will contain the new resource.
+ * @param string $sid The Twilio-provided string that uniquely identifies the CredentialListMapping resource to delete.
*/
- public function __construct(Version $version, $accountSid, $domainSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $accountSid,
+ $domainSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'domainSid' => $domainSid, 'sid' => $sid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+ 'domainSid' =>
+ $domainSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/Domains/' . \rawurlencode($domainSid) . '/Auth/Calls/CredentialListMappings/' . \rawurlencode($sid) . '.json';
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/SIP/Domains/' . \rawurlencode($domainSid)
+ .'/Auth/Calls/CredentialListMappings/' . \rawurlencode($sid)
+ .'.json';
}
/**
- * Fetch a AuthCallsCredentialListMappingInstance
+ * Delete the AuthCallsCredentialListMappingInstance
*
- * @return AuthCallsCredentialListMappingInstance Fetched
- * AuthCallsCredentialListMappingInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
+ }
+
+
+ /**
+ * Fetch the AuthCallsCredentialListMappingInstance
+ *
+ * @return AuthCallsCredentialListMappingInstance Fetched AuthCallsCredentialListMappingInstance
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function fetch(): AuthCallsCredentialListMappingInstance
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new AuthCallsCredentialListMappingInstance(
$this->version,
@@ -63,28 +92,18 @@ public function fetch()
);
}
- /**
- * Deletes the AuthCallsCredentialListMappingInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.AuthCallsCredentialListMappingContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsCredentialListMappingInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsCredentialListMappingInstance.php
index dbeecf8..0754d8f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsCredentialListMappingInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsCredentialListMappingInstance.php
@@ -2,66 +2,69 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $friendlyName
- * @property string $sid
+ * @property string|null $accountSid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $friendlyName
+ * @property string|null $sid
*/
class AuthCallsCredentialListMappingInstance extends InstanceResource
{
/**
* Initialize the AuthCallsCredentialListMappingInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $domainSid The unique string that identifies the resource
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls\AuthCallsCredentialListMappingInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
+ * @param string $domainSid The SID of the SIP domain that will contain the new resource.
+ * @param string $sid The Twilio-provided string that uniquely identifies the CredentialListMapping resource to delete.
*/
- public function __construct(Version $version, array $payload, $accountSid, $domainSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $accountSid, string $domainSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
'sid' => Values::array_get($payload, 'sid'),
- );
+ ];
- $this->solution = array(
- 'accountSid' => $accountSid,
- 'domainSid' => $domainSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['accountSid' => $accountSid, 'domainSid' => $domainSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls\AuthCallsCredentialListMappingContext Context for this
- * AuthCallsCredentialListMappingInstance
+ * @return AuthCallsCredentialListMappingContext Context for this AuthCallsCredentialListMappingInstance
*/
- protected function proxy()
+ protected function proxy(): AuthCallsCredentialListMappingContext
{
if (!$this->context) {
$this->context = new AuthCallsCredentialListMappingContext(
@@ -76,26 +79,27 @@ protected function proxy()
}
/**
- * Fetch a AuthCallsCredentialListMappingInstance
+ * Delete the AuthCallsCredentialListMappingInstance
*
- * @return AuthCallsCredentialListMappingInstance Fetched
- * AuthCallsCredentialListMappingInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the AuthCallsCredentialListMappingInstance
+ * Fetch the AuthCallsCredentialListMappingInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return AuthCallsCredentialListMappingInstance Fetched AuthCallsCredentialListMappingInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): AuthCallsCredentialListMappingInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -105,7 +109,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -124,12 +128,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.AuthCallsCredentialListMappingInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsCredentialListMappingList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsCredentialListMappingList.php
index a100fb0..08147ad 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsCredentialListMappingList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsCredentialListMappingList.php
@@ -2,57 +2,75 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class AuthCallsCredentialListMappingList extends ListResource
-{
+ {
/**
* Construct the AuthCallsCredentialListMappingList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $domainSid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls\AuthCallsCredentialListMappingList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
+ * @param string $domainSid The SID of the SIP domain that will contain the new resource.
*/
- public function __construct(Version $version, $accountSid, $domainSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid,
+ string $domainSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'domainSid' => $domainSid,);
-
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/Domains/' . \rawurlencode($domainSid) . '/Auth/Calls/CredentialListMappings.json';
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ 'domainSid' =>
+ $domainSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/SIP/Domains/' . \rawurlencode($domainSid)
+ .'/Auth/Calls/CredentialListMappings.json';
}
/**
- * Create a new AuthCallsCredentialListMappingInstance
+ * Create the AuthCallsCredentialListMappingInstance
*
- * @param string $credentialListSid The SID of the CredentialList resource to
- * map to the SIP domain
- * @return AuthCallsCredentialListMappingInstance Newly created
- * AuthCallsCredentialListMappingInstance
+ * @param string $credentialListSid The SID of the CredentialList resource to map to the SIP domain.
+ * @return AuthCallsCredentialListMappingInstance Created AuthCallsCredentialListMappingInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($credentialListSid)
+ public function create(string $credentialListSid): AuthCallsCredentialListMappingInstance
{
- $data = Values::of(array('CredentialListSid' => $credentialListSid,));
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'CredentialListSid' =>
+ $credentialListSid,
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
return new AuthCallsCredentialListMappingInstance(
$this->version,
@@ -62,90 +80,89 @@ public function create($credentialListSid)
);
}
+
/**
- * Streams AuthCallsCredentialListMappingInstance records from the API as a
- * generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Reads AuthCallsCredentialListMappingInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
*
- * @param int $limit Upper limit for the number of records to return. stream()
+ * @param int $limit Upper limit for the number of records to return. read()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
+ * page_size is defined but a limit is defined, read()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return AuthCallsCredentialListMappingInstance[] Array of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function read(int $limit = null, $pageSize = null): array
{
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
- * Reads AuthCallsCredentialListMappingInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
+ * Streams AuthCallsCredentialListMappingInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
*
- * @param int $limit Upper limit for the number of records to return. read()
+ * @param int $limit Upper limit for the number of records to return. stream()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
+ * page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return AuthCallsCredentialListMappingInstance[] Array of results
+ * @return Stream stream of results
*/
- public function read($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
- return \iterator_to_array($this->stream($limit, $pageSize), false);
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
/**
- * Retrieve a single page of AuthCallsCredentialListMappingInstance records
- * from the API.
+ * Retrieve a single page of AuthCallsCredentialListMappingInstance records from the API.
* Request is executed immediately
*
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of AuthCallsCredentialListMappingInstance
+ * @return AuthCallsCredentialListMappingPage Page of AuthCallsCredentialListMappingInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): AuthCallsCredentialListMappingPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new AuthCallsCredentialListMappingPage($this->version, $response, $this->solution);
}
/**
- * Retrieve a specific page of AuthCallsCredentialListMappingInstance records
- * from the API.
+ * Retrieve a specific page of AuthCallsCredentialListMappingInstance records from the API.
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of AuthCallsCredentialListMappingInstance
+ * @return AuthCallsCredentialListMappingPage Page of AuthCallsCredentialListMappingInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): AuthCallsCredentialListMappingPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -155,13 +172,16 @@ public function getPage($targetUrl)
return new AuthCallsCredentialListMappingPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a AuthCallsCredentialListMappingContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls\AuthCallsCredentialListMappingContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the CredentialListMapping resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): AuthCallsCredentialListMappingContext
{
return new AuthCallsCredentialListMappingContext(
$this->version,
@@ -176,8 +196,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.AuthCallsCredentialListMappingList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsCredentialListMappingPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsCredentialListMappingPage.php
index 9e0489f..2e23c5e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsCredentialListMappingPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsCredentialListMappingPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return AuthCallsCredentialListMappingInstance \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls\AuthCallsCredentialListMappingInstance
+ */
+ public function buildInstance(array $payload): AuthCallsCredentialListMappingInstance
{
- return new AuthCallsCredentialListMappingInstance(
- $this->version,
- $payload,
- $this->solution['accountSid'],
- $this->solution['domainSid']
- );
+ return new AuthCallsCredentialListMappingInstance($this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.AuthCallsCredentialListMappingPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsIpAccessControlListMappingContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsIpAccessControlListMappingContext.php
index 5384771..fb82e6b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsIpAccessControlListMappingContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsIpAccessControlListMappingContext.php
@@ -2,57 +2,86 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class AuthCallsIpAccessControlListMappingContext extends InstanceContext
-{
+ {
/**
* Initialize the AuthCallsIpAccessControlListMappingContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * to fetch
- * @param string $domainSid The SID of the SIP domain that contains the
- * resource to fetch
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls\AuthCallsIpAccessControlListMappingContext
+ * @param Version $version Version that contains the resource
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
+ * @param string $domainSid The SID of the SIP domain that will contain the new resource.
+ * @param string $sid The Twilio-provided string that uniquely identifies the IpAccessControlListMapping resource to delete.
*/
- public function __construct(Version $version, $accountSid, $domainSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $accountSid,
+ $domainSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'domainSid' => $domainSid, 'sid' => $sid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+ 'domainSid' =>
+ $domainSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/Domains/' . \rawurlencode($domainSid) . '/Auth/Calls/IpAccessControlListMappings/' . \rawurlencode($sid) . '.json';
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/SIP/Domains/' . \rawurlencode($domainSid)
+ .'/Auth/Calls/IpAccessControlListMappings/' . \rawurlencode($sid)
+ .'.json';
}
/**
- * Fetch a AuthCallsIpAccessControlListMappingInstance
+ * Delete the AuthCallsIpAccessControlListMappingInstance
*
- * @return AuthCallsIpAccessControlListMappingInstance Fetched
- * AuthCallsIpAccessControlListMappingInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
+ }
+
+
+ /**
+ * Fetch the AuthCallsIpAccessControlListMappingInstance
+ *
+ * @return AuthCallsIpAccessControlListMappingInstance Fetched AuthCallsIpAccessControlListMappingInstance
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function fetch(): AuthCallsIpAccessControlListMappingInstance
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new AuthCallsIpAccessControlListMappingInstance(
$this->version,
@@ -63,28 +92,18 @@ public function fetch()
);
}
- /**
- * Deletes the AuthCallsIpAccessControlListMappingInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.AuthCallsIpAccessControlListMappingContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsIpAccessControlListMappingInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsIpAccessControlListMappingInstance.php
index 6d92a6c..13a6d5e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsIpAccessControlListMappingInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsIpAccessControlListMappingInstance.php
@@ -2,66 +2,69 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $friendlyName
- * @property string $sid
+ * @property string|null $accountSid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $friendlyName
+ * @property string|null $sid
*/
class AuthCallsIpAccessControlListMappingInstance extends InstanceResource
{
/**
* Initialize the AuthCallsIpAccessControlListMappingInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $domainSid The unique string that identifies the resource
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls\AuthCallsIpAccessControlListMappingInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
+ * @param string $domainSid The SID of the SIP domain that will contain the new resource.
+ * @param string $sid The Twilio-provided string that uniquely identifies the IpAccessControlListMapping resource to delete.
*/
- public function __construct(Version $version, array $payload, $accountSid, $domainSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $accountSid, string $domainSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
'sid' => Values::array_get($payload, 'sid'),
- );
+ ];
- $this->solution = array(
- 'accountSid' => $accountSid,
- 'domainSid' => $domainSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['accountSid' => $accountSid, 'domainSid' => $domainSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls\AuthCallsIpAccessControlListMappingContext Context for this
- * AuthCallsIpAccessControlListMappingInstance
+ * @return AuthCallsIpAccessControlListMappingContext Context for this AuthCallsIpAccessControlListMappingInstance
*/
- protected function proxy()
+ protected function proxy(): AuthCallsIpAccessControlListMappingContext
{
if (!$this->context) {
$this->context = new AuthCallsIpAccessControlListMappingContext(
@@ -76,26 +79,27 @@ protected function proxy()
}
/**
- * Fetch a AuthCallsIpAccessControlListMappingInstance
+ * Delete the AuthCallsIpAccessControlListMappingInstance
*
- * @return AuthCallsIpAccessControlListMappingInstance Fetched
- * AuthCallsIpAccessControlListMappingInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the AuthCallsIpAccessControlListMappingInstance
+ * Fetch the AuthCallsIpAccessControlListMappingInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return AuthCallsIpAccessControlListMappingInstance Fetched AuthCallsIpAccessControlListMappingInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): AuthCallsIpAccessControlListMappingInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -105,7 +109,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -124,12 +128,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.AuthCallsIpAccessControlListMappingInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsIpAccessControlListMappingList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsIpAccessControlListMappingList.php
index 40e0beb..445d9d2 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsIpAccessControlListMappingList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsIpAccessControlListMappingList.php
@@ -2,57 +2,75 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class AuthCallsIpAccessControlListMappingList extends ListResource
-{
+ {
/**
* Construct the AuthCallsIpAccessControlListMappingList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $domainSid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls\AuthCallsIpAccessControlListMappingList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
+ * @param string $domainSid The SID of the SIP domain that will contain the new resource.
*/
- public function __construct(Version $version, $accountSid, $domainSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid,
+ string $domainSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'domainSid' => $domainSid,);
-
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/Domains/' . \rawurlencode($domainSid) . '/Auth/Calls/IpAccessControlListMappings.json';
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ 'domainSid' =>
+ $domainSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/SIP/Domains/' . \rawurlencode($domainSid)
+ .'/Auth/Calls/IpAccessControlListMappings.json';
}
/**
- * Create a new AuthCallsIpAccessControlListMappingInstance
+ * Create the AuthCallsIpAccessControlListMappingInstance
*
- * @param string $ipAccessControlListSid The SID of the IpAccessControlList
- * resource to map to the SIP domain
- * @return AuthCallsIpAccessControlListMappingInstance Newly created
- * AuthCallsIpAccessControlListMappingInstance
+ * @param string $ipAccessControlListSid The SID of the IpAccessControlList resource to map to the SIP domain.
+ * @return AuthCallsIpAccessControlListMappingInstance Created AuthCallsIpAccessControlListMappingInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($ipAccessControlListSid)
+ public function create(string $ipAccessControlListSid): AuthCallsIpAccessControlListMappingInstance
{
- $data = Values::of(array('IpAccessControlListSid' => $ipAccessControlListSid,));
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'IpAccessControlListSid' =>
+ $ipAccessControlListSid,
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
return new AuthCallsIpAccessControlListMappingInstance(
$this->version,
@@ -62,91 +80,89 @@ public function create($ipAccessControlListSid)
);
}
+
/**
- * Streams AuthCallsIpAccessControlListMappingInstance records from the API as
- * a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Reads AuthCallsIpAccessControlListMappingInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
*
- * @param int $limit Upper limit for the number of records to return. stream()
+ * @param int $limit Upper limit for the number of records to return. read()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
+ * page_size is defined but a limit is defined, read()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return AuthCallsIpAccessControlListMappingInstance[] Array of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function read(int $limit = null, $pageSize = null): array
{
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
- * Reads AuthCallsIpAccessControlListMappingInstance records from the API as a
- * list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
+ * Streams AuthCallsIpAccessControlListMappingInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
*
- * @param int $limit Upper limit for the number of records to return. read()
+ * @param int $limit Upper limit for the number of records to return. stream()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
+ * page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return AuthCallsIpAccessControlListMappingInstance[] Array of results
+ * @return Stream stream of results
*/
- public function read($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
- return \iterator_to_array($this->stream($limit, $pageSize), false);
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
/**
- * Retrieve a single page of AuthCallsIpAccessControlListMappingInstance
- * records from the API.
+ * Retrieve a single page of AuthCallsIpAccessControlListMappingInstance records from the API.
* Request is executed immediately
*
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of AuthCallsIpAccessControlListMappingInstance
+ * @return AuthCallsIpAccessControlListMappingPage Page of AuthCallsIpAccessControlListMappingInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): AuthCallsIpAccessControlListMappingPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new AuthCallsIpAccessControlListMappingPage($this->version, $response, $this->solution);
}
/**
- * Retrieve a specific page of AuthCallsIpAccessControlListMappingInstance
- * records from the API.
+ * Retrieve a specific page of AuthCallsIpAccessControlListMappingInstance records from the API.
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of AuthCallsIpAccessControlListMappingInstance
+ * @return AuthCallsIpAccessControlListMappingPage Page of AuthCallsIpAccessControlListMappingInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): AuthCallsIpAccessControlListMappingPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -156,13 +172,16 @@ public function getPage($targetUrl)
return new AuthCallsIpAccessControlListMappingPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a AuthCallsIpAccessControlListMappingContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls\AuthCallsIpAccessControlListMappingContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the IpAccessControlListMapping resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): AuthCallsIpAccessControlListMappingContext
{
return new AuthCallsIpAccessControlListMappingContext(
$this->version,
@@ -177,8 +196,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.AuthCallsIpAccessControlListMappingList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsIpAccessControlListMappingPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsIpAccessControlListMappingPage.php
index 385951f..c8a64c4 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsIpAccessControlListMappingPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCalls/AuthCallsIpAccessControlListMappingPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return AuthCallsIpAccessControlListMappingInstance \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls\AuthCallsIpAccessControlListMappingInstance
+ */
+ public function buildInstance(array $payload): AuthCallsIpAccessControlListMappingInstance
{
- return new AuthCallsIpAccessControlListMappingInstance(
- $this->version,
- $payload,
- $this->solution['accountSid'],
- $this->solution['domainSid']
- );
+ return new AuthCallsIpAccessControlListMappingInstance($this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.AuthCallsIpAccessControlListMappingPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCallsInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCallsInstance.php
index 4a3299b..f51e544 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCallsInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCallsInstance.php
@@ -2,34 +2,41 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
-use Twilio\Values;
use Twilio\Version;
+
class AuthTypeCallsInstance extends InstanceResource
{
/**
* Initialize the AuthTypeCallsInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $domainSid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCallsInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialListMapping resource to fetch.
+ * @param string $domainSid The SID of the SIP domain that contains the resource to fetch.
*/
- public function __construct(Version $version, array $payload, $accountSid, $domainSid)
+ public function __construct(Version $version, array $payload, string $accountSid, string $domainSid)
{
parent::__construct($version);
- $this->solution = array('accountSid' => $accountSid, 'domainSid' => $domainSid,);
+ $this->solution = ['accountSid' => $accountSid, 'domainSid' => $domainSid, ];
}
/**
@@ -39,7 +46,7 @@ public function __construct(Version $version, array $payload, $accountSid, $doma
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -58,8 +65,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.AuthTypeCallsInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCallsList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCallsList.php
index c2bad6e..29b3713 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCallsList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCallsList.php
@@ -2,76 +2,92 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
-use Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls\AuthCallsCredentialListMappingList;
-use Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls\AuthCallsIpAccessControlListMappingList;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls\AuthCallsIpAccessControlListMappingList;
+use Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls\AuthCallsCredentialListMappingList;
+
/**
- * @property \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls\AuthCallsCredentialListMappingList $credentialListMappings
- * @property \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls\AuthCallsIpAccessControlListMappingList $ipAccessControlListMappings
+ * @property AuthCallsIpAccessControlListMappingList $ipAccessControlListMappings
+ * @property AuthCallsCredentialListMappingList $credentialListMappings
* @method \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls\AuthCallsCredentialListMappingContext credentialListMappings(string $sid)
* @method \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCalls\AuthCallsIpAccessControlListMappingContext ipAccessControlListMappings(string $sid)
*/
class AuthTypeCallsList extends ListResource
-{
- protected $_credentialListMappings = null;
+ {
protected $_ipAccessControlListMappings = null;
+ protected $_credentialListMappings = null;
/**
* Construct the AuthTypeCallsList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $domainSid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCallsList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialListMapping resource to fetch.
+ * @param string $domainSid The SID of the SIP domain that contains the resource to fetch.
*/
- public function __construct(Version $version, $accountSid, $domainSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid,
+ string $domainSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'domainSid' => $domainSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ 'domainSid' =>
+ $domainSid,
+
+ ];
}
/**
- * Access the credentialListMappings
+ * Access the ipAccessControlListMappings
*/
- protected function getCredentialListMappings()
+ protected function getIpAccessControlListMappings(): AuthCallsIpAccessControlListMappingList
{
- if (!$this->_credentialListMappings) {
- $this->_credentialListMappings = new AuthCallsCredentialListMappingList(
+ if (!$this->_ipAccessControlListMappings) {
+ $this->_ipAccessControlListMappings = new AuthCallsIpAccessControlListMappingList(
$this->version,
$this->solution['accountSid'],
$this->solution['domainSid']
);
}
-
- return $this->_credentialListMappings;
+ return $this->_ipAccessControlListMappings;
}
/**
- * Access the ipAccessControlListMappings
+ * Access the credentialListMappings
*/
- protected function getIpAccessControlListMappings()
+ protected function getCredentialListMappings(): AuthCallsCredentialListMappingList
{
- if (!$this->_ipAccessControlListMappings) {
- $this->_ipAccessControlListMappings = new AuthCallsIpAccessControlListMappingList(
+ if (!$this->_credentialListMappings) {
+ $this->_credentialListMappings = new AuthCallsCredentialListMappingList(
$this->version,
$this->solution['accountSid'],
$this->solution['domainSid']
);
}
-
- return $this->_ipAccessControlListMappings;
+ return $this->_credentialListMappings;
}
/**
@@ -81,7 +97,7 @@ protected function getIpAccessControlListMappings()
* @return \Twilio\ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -96,10 +112,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -114,8 +130,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.AuthTypeCallsList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCallsPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCallsPage.php
index d889e2b..e2f779e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCallsPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeCallsPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return AuthTypeCallsInstance \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCallsInstance
+ */
+ public function buildInstance(array $payload): AuthTypeCallsInstance
{
- return new AuthTypeCallsInstance(
- $this->version,
- $payload,
- $this->solution['accountSid'],
- $this->solution['domainSid']
- );
+ return new AuthTypeCallsInstance($this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.AuthTypeCallsPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrations/AuthRegistrationsCredentialListMappingContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrations/AuthRegistrationsCredentialListMappingContext.php
index f9fc286..b466d71 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrations/AuthRegistrationsCredentialListMappingContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrations/AuthRegistrationsCredentialListMappingContext.php
@@ -2,57 +2,86 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeRegistrations;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class AuthRegistrationsCredentialListMappingContext extends InstanceContext
-{
+ {
/**
* Initialize the AuthRegistrationsCredentialListMappingContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * to fetch
- * @param string $domainSid The SID of the SIP domain that contains the
- * resource to fetch
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeRegistrations\AuthRegistrationsCredentialListMappingContext
+ * @param Version $version Version that contains the resource
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
+ * @param string $domainSid The SID of the SIP domain that will contain the new resource.
+ * @param string $sid The Twilio-provided string that uniquely identifies the CredentialListMapping resource to delete.
*/
- public function __construct(Version $version, $accountSid, $domainSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $accountSid,
+ $domainSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'domainSid' => $domainSid, 'sid' => $sid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+ 'domainSid' =>
+ $domainSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/Domains/' . \rawurlencode($domainSid) . '/Auth/Registrations/CredentialListMappings/' . \rawurlencode($sid) . '.json';
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/SIP/Domains/' . \rawurlencode($domainSid)
+ .'/Auth/Registrations/CredentialListMappings/' . \rawurlencode($sid)
+ .'.json';
}
/**
- * Fetch a AuthRegistrationsCredentialListMappingInstance
+ * Delete the AuthRegistrationsCredentialListMappingInstance
*
- * @return AuthRegistrationsCredentialListMappingInstance Fetched
- * AuthRegistrationsCredentialListMappingInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
+ }
+
+
+ /**
+ * Fetch the AuthRegistrationsCredentialListMappingInstance
+ *
+ * @return AuthRegistrationsCredentialListMappingInstance Fetched AuthRegistrationsCredentialListMappingInstance
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function fetch(): AuthRegistrationsCredentialListMappingInstance
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new AuthRegistrationsCredentialListMappingInstance(
$this->version,
@@ -63,28 +92,18 @@ public function fetch()
);
}
- /**
- * Deletes the AuthRegistrationsCredentialListMappingInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.AuthRegistrationsCredentialListMappingContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrations/AuthRegistrationsCredentialListMappingInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrations/AuthRegistrationsCredentialListMappingInstance.php
index 227aee1..7ed498c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrations/AuthRegistrationsCredentialListMappingInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrations/AuthRegistrationsCredentialListMappingInstance.php
@@ -2,66 +2,69 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeRegistrations;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $friendlyName
- * @property string $sid
+ * @property string|null $accountSid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $friendlyName
+ * @property string|null $sid
*/
class AuthRegistrationsCredentialListMappingInstance extends InstanceResource
{
/**
* Initialize the AuthRegistrationsCredentialListMappingInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $domainSid The unique string that identifies the resource
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeRegistrations\AuthRegistrationsCredentialListMappingInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
+ * @param string $domainSid The SID of the SIP domain that will contain the new resource.
+ * @param string $sid The Twilio-provided string that uniquely identifies the CredentialListMapping resource to delete.
*/
- public function __construct(Version $version, array $payload, $accountSid, $domainSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $accountSid, string $domainSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
'sid' => Values::array_get($payload, 'sid'),
- );
+ ];
- $this->solution = array(
- 'accountSid' => $accountSid,
- 'domainSid' => $domainSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['accountSid' => $accountSid, 'domainSid' => $domainSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeRegistrations\AuthRegistrationsCredentialListMappingContext Context for
- * this AuthRegistrationsCredentialListMappingInstance
+ * @return AuthRegistrationsCredentialListMappingContext Context for this AuthRegistrationsCredentialListMappingInstance
*/
- protected function proxy()
+ protected function proxy(): AuthRegistrationsCredentialListMappingContext
{
if (!$this->context) {
$this->context = new AuthRegistrationsCredentialListMappingContext(
@@ -76,26 +79,27 @@ protected function proxy()
}
/**
- * Fetch a AuthRegistrationsCredentialListMappingInstance
+ * Delete the AuthRegistrationsCredentialListMappingInstance
*
- * @return AuthRegistrationsCredentialListMappingInstance Fetched
- * AuthRegistrationsCredentialListMappingInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the AuthRegistrationsCredentialListMappingInstance
+ * Fetch the AuthRegistrationsCredentialListMappingInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return AuthRegistrationsCredentialListMappingInstance Fetched AuthRegistrationsCredentialListMappingInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): AuthRegistrationsCredentialListMappingInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -105,7 +109,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -124,12 +128,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.AuthRegistrationsCredentialListMappingInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrations/AuthRegistrationsCredentialListMappingList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrations/AuthRegistrationsCredentialListMappingList.php
index 04dcc31..ccf761b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrations/AuthRegistrationsCredentialListMappingList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrations/AuthRegistrationsCredentialListMappingList.php
@@ -2,57 +2,75 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeRegistrations;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class AuthRegistrationsCredentialListMappingList extends ListResource
-{
+ {
/**
* Construct the AuthRegistrationsCredentialListMappingList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $domainSid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeRegistrations\AuthRegistrationsCredentialListMappingList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
+ * @param string $domainSid The SID of the SIP domain that will contain the new resource.
*/
- public function __construct(Version $version, $accountSid, $domainSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid,
+ string $domainSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'domainSid' => $domainSid,);
-
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/Domains/' . \rawurlencode($domainSid) . '/Auth/Registrations/CredentialListMappings.json';
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ 'domainSid' =>
+ $domainSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/SIP/Domains/' . \rawurlencode($domainSid)
+ .'/Auth/Registrations/CredentialListMappings.json';
}
/**
- * Create a new AuthRegistrationsCredentialListMappingInstance
+ * Create the AuthRegistrationsCredentialListMappingInstance
*
- * @param string $credentialListSid The SID of the CredentialList resource to
- * map to the SIP domain
- * @return AuthRegistrationsCredentialListMappingInstance Newly created
- * AuthRegistrationsCredentialListMappingInstance
+ * @param string $credentialListSid The SID of the CredentialList resource to map to the SIP domain.
+ * @return AuthRegistrationsCredentialListMappingInstance Created AuthRegistrationsCredentialListMappingInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($credentialListSid)
+ public function create(string $credentialListSid): AuthRegistrationsCredentialListMappingInstance
{
- $data = Values::of(array('CredentialListSid' => $credentialListSid,));
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'CredentialListSid' =>
+ $credentialListSid,
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
return new AuthRegistrationsCredentialListMappingInstance(
$this->version,
@@ -62,91 +80,89 @@ public function create($credentialListSid)
);
}
+
/**
- * Streams AuthRegistrationsCredentialListMappingInstance records from the API
- * as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Reads AuthRegistrationsCredentialListMappingInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
*
- * @param int $limit Upper limit for the number of records to return. stream()
+ * @param int $limit Upper limit for the number of records to return. read()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
+ * page_size is defined but a limit is defined, read()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return AuthRegistrationsCredentialListMappingInstance[] Array of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function read(int $limit = null, $pageSize = null): array
{
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
- * Reads AuthRegistrationsCredentialListMappingInstance records from the API as
- * a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
+ * Streams AuthRegistrationsCredentialListMappingInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
*
- * @param int $limit Upper limit for the number of records to return. read()
+ * @param int $limit Upper limit for the number of records to return. stream()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
+ * page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return AuthRegistrationsCredentialListMappingInstance[] Array of results
+ * @return Stream stream of results
*/
- public function read($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
- return \iterator_to_array($this->stream($limit, $pageSize), false);
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
/**
- * Retrieve a single page of AuthRegistrationsCredentialListMappingInstance
- * records from the API.
+ * Retrieve a single page of AuthRegistrationsCredentialListMappingInstance records from the API.
* Request is executed immediately
*
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of AuthRegistrationsCredentialListMappingInstance
+ * @return AuthRegistrationsCredentialListMappingPage Page of AuthRegistrationsCredentialListMappingInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): AuthRegistrationsCredentialListMappingPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new AuthRegistrationsCredentialListMappingPage($this->version, $response, $this->solution);
}
/**
- * Retrieve a specific page of AuthRegistrationsCredentialListMappingInstance
- * records from the API.
+ * Retrieve a specific page of AuthRegistrationsCredentialListMappingInstance records from the API.
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of AuthRegistrationsCredentialListMappingInstance
+ * @return AuthRegistrationsCredentialListMappingPage Page of AuthRegistrationsCredentialListMappingInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): AuthRegistrationsCredentialListMappingPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -156,13 +172,16 @@ public function getPage($targetUrl)
return new AuthRegistrationsCredentialListMappingPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a AuthRegistrationsCredentialListMappingContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeRegistrations\AuthRegistrationsCredentialListMappingContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the CredentialListMapping resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): AuthRegistrationsCredentialListMappingContext
{
return new AuthRegistrationsCredentialListMappingContext(
$this->version,
@@ -177,8 +196,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.AuthRegistrationsCredentialListMappingList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrations/AuthRegistrationsCredentialListMappingPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrations/AuthRegistrationsCredentialListMappingPage.php
index 4b97cd6..26cda83 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrations/AuthRegistrationsCredentialListMappingPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrations/AuthRegistrationsCredentialListMappingPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return AuthRegistrationsCredentialListMappingInstance \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeRegistrations\AuthRegistrationsCredentialListMappingInstance
+ */
+ public function buildInstance(array $payload): AuthRegistrationsCredentialListMappingInstance
{
- return new AuthRegistrationsCredentialListMappingInstance(
- $this->version,
- $payload,
- $this->solution['accountSid'],
- $this->solution['domainSid']
- );
+ return new AuthRegistrationsCredentialListMappingInstance($this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.AuthRegistrationsCredentialListMappingPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrationsInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrationsInstance.php
index 1f413a2..19b18c9 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrationsInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrationsInstance.php
@@ -2,34 +2,41 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
-use Twilio\Values;
use Twilio\Version;
+
class AuthTypeRegistrationsInstance extends InstanceResource
{
/**
* Initialize the AuthTypeRegistrationsInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $domainSid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeRegistrationsInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialListMapping resource to fetch.
+ * @param string $domainSid The SID of the SIP domain that contains the resource to fetch.
*/
- public function __construct(Version $version, array $payload, $accountSid, $domainSid)
+ public function __construct(Version $version, array $payload, string $accountSid, string $domainSid)
{
parent::__construct($version);
- $this->solution = array('accountSid' => $accountSid, 'domainSid' => $domainSid,);
+ $this->solution = ['accountSid' => $accountSid, 'domainSid' => $domainSid, ];
}
/**
@@ -39,7 +46,7 @@ public function __construct(Version $version, array $payload, $accountSid, $doma
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -58,8 +65,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.AuthTypeRegistrationsInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrationsList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrationsList.php
index 98318ac..9371bd6 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrationsList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrationsList.php
@@ -2,46 +2,64 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
-use Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeRegistrations\AuthRegistrationsCredentialListMappingList;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeRegistrations\AuthRegistrationsCredentialListMappingList;
+
/**
- * @property \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeRegistrations\AuthRegistrationsCredentialListMappingList $credentialListMappings
+ * @property AuthRegistrationsCredentialListMappingList $credentialListMappings
* @method \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeRegistrations\AuthRegistrationsCredentialListMappingContext credentialListMappings(string $sid)
*/
class AuthTypeRegistrationsList extends ListResource
-{
+ {
protected $_credentialListMappings = null;
/**
* Construct the AuthTypeRegistrationsList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $domainSid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeRegistrationsList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialListMapping resource to fetch.
+ * @param string $domainSid The SID of the SIP domain that contains the resource to fetch.
*/
- public function __construct(Version $version, $accountSid, $domainSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid,
+ string $domainSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'domainSid' => $domainSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ 'domainSid' =>
+ $domainSid,
+
+ ];
}
/**
* Access the credentialListMappings
*/
- protected function getCredentialListMappings()
+ protected function getCredentialListMappings(): AuthRegistrationsCredentialListMappingList
{
if (!$this->_credentialListMappings) {
$this->_credentialListMappings = new AuthRegistrationsCredentialListMappingList(
@@ -50,7 +68,6 @@ protected function getCredentialListMappings()
$this->solution['domainSid']
);
}
-
return $this->_credentialListMappings;
}
@@ -61,7 +78,7 @@ protected function getCredentialListMappings()
* @return \Twilio\ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -76,10 +93,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -94,8 +111,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.AuthTypeRegistrationsList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrationsPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrationsPage.php
index 3c0d354..6d27932 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrationsPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypes/AuthTypeRegistrationsPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return AuthTypeRegistrationsInstance \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeRegistrationsInstance
+ */
+ public function buildInstance(array $payload): AuthTypeRegistrationsInstance
{
- return new AuthTypeRegistrationsInstance(
- $this->version,
- $payload,
- $this->solution['accountSid'],
- $this->solution['domainSid']
- );
+ return new AuthTypeRegistrationsInstance($this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.AuthTypeRegistrationsPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypesInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypesInstance.php
index c33e070..92229bc 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypesInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypesInstance.php
@@ -2,34 +2,41 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Sip\Domain;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
-use Twilio\Values;
use Twilio\Version;
+
class AuthTypesInstance extends InstanceResource
{
/**
* Initialize the AuthTypesInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $domainSid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypesInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialListMapping resource to fetch.
+ * @param string $domainSid The SID of the SIP domain that contains the resource to fetch.
*/
- public function __construct(Version $version, array $payload, $accountSid, $domainSid)
+ public function __construct(Version $version, array $payload, string $accountSid, string $domainSid)
{
parent::__construct($version);
- $this->solution = array('accountSid' => $accountSid, 'domainSid' => $domainSid,);
+ $this->solution = ['accountSid' => $accountSid, 'domainSid' => $domainSid, ];
}
/**
@@ -39,7 +46,7 @@ public function __construct(Version $version, array $payload, $accountSid, $doma
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -58,8 +65,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.AuthTypesInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypesList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypesList.php
index 80049a4..f3ec6a0 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypesList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypesList.php
@@ -2,25 +2,34 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\Sip\Domain;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
+use Twilio\Version;
+use Twilio\InstanceContext;
use Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCallsList;
use Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeRegistrationsList;
-use Twilio\Version;
+
/**
- * @property \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeCallsList $calls
- * @property \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypes\AuthTypeRegistrationsList $registrations
+ * @property AuthTypeCallsList $calls
+ * @property AuthTypeRegistrationsList $registrations
*/
class AuthTypesList extends ListResource
-{
+ {
protected $_calls = null;
protected $_registrations = null;
@@ -28,22 +37,31 @@ class AuthTypesList extends ListResource
* Construct the AuthTypesList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $domainSid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypesList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the CredentialListMapping resource to fetch.
+ * @param string $domainSid The SID of the SIP domain that contains the resource to fetch.
*/
- public function __construct(Version $version, $accountSid, $domainSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid,
+ string $domainSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'domainSid' => $domainSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ 'domainSid' =>
+ $domainSid,
+
+ ];
}
/**
* Access the calls
*/
- protected function getCalls()
+ protected function getCalls(): AuthTypeCallsList
{
if (!$this->_calls) {
$this->_calls = new AuthTypeCallsList(
@@ -52,14 +70,13 @@ protected function getCalls()
$this->solution['domainSid']
);
}
-
return $this->_calls;
}
/**
* Access the registrations
*/
- protected function getRegistrations()
+ protected function getRegistrations(): AuthTypeRegistrationsList
{
if (!$this->_registrations) {
$this->_registrations = new AuthTypeRegistrationsList(
@@ -68,7 +85,6 @@ protected function getRegistrations()
$this->solution['domainSid']
);
}
-
return $this->_registrations;
}
@@ -79,7 +95,7 @@ protected function getRegistrations()
* @return \Twilio\ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -94,10 +110,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -112,8 +128,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.AuthTypesList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypesPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypesPage.php
index f82f975..66f4c1c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypesPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypesPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return AuthTypesInstance \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypesInstance
+ */
+ public function buildInstance(array $payload): AuthTypesInstance
{
- return new AuthTypesInstance(
- $this->version,
- $payload,
- $this->solution['accountSid'],
- $this->solution['domainSid']
- );
+ return new AuthTypesInstance($this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.AuthTypesPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/CredentialListMappingContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/CredentialListMappingContext.php
index 4234638..e0760a0 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/CredentialListMappingContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/CredentialListMappingContext.php
@@ -2,55 +2,86 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Sip\Domain;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class CredentialListMappingContext extends InstanceContext
-{
+ {
/**
* Initialize the CredentialListMappingContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $accountSid The unique sid that identifies this account
- * @param string $domainSid A string that identifies the SIP Domain that
- * includes the resource to fetch
- * @param string $sid A string that identifies the resource to fetch
- * @return \Twilio\Rest\Api\V2010\Account\Sip\Domain\CredentialListMappingContext
+ * @param Version $version Version that contains the resource
+ * @param string $accountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource.
+ * @param string $domainSid A 34 character string that uniquely identifies the SIP Domain for which the CredentialList resource will be mapped.
+ * @param string $sid A 34 character string that uniquely identifies the resource to delete.
*/
- public function __construct(Version $version, $accountSid, $domainSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $accountSid,
+ $domainSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'domainSid' => $domainSid, 'sid' => $sid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+ 'domainSid' =>
+ $domainSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/SIP/Domains/' . \rawurlencode($domainSid)
+ .'/CredentialListMappings/' . \rawurlencode($sid)
+ .'.json';
+ }
+
+ /**
+ * Delete the CredentialListMappingInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/Domains/' . \rawurlencode($domainSid) . '/CredentialListMappings/' . \rawurlencode($sid) . '.json';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a CredentialListMappingInstance
+ * Fetch the CredentialListMappingInstance
*
* @return CredentialListMappingInstance Fetched CredentialListMappingInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): CredentialListMappingInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new CredentialListMappingInstance(
$this->version,
@@ -61,28 +92,18 @@ public function fetch()
);
}
- /**
- * Deletes the CredentialListMappingInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.CredentialListMappingContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/CredentialListMappingInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/CredentialListMappingInstance.php
index e945b58..dfde30e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/CredentialListMappingInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/CredentialListMappingInstance.php
@@ -2,71 +2,73 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Sip\Domain;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $friendlyName
- * @property string $sid
- * @property string $uri
- * @property array $subresourceUris
+ * @property string|null $accountSid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $domainSid
+ * @property string|null $friendlyName
+ * @property string|null $sid
+ * @property string|null $uri
*/
class CredentialListMappingInstance extends InstanceResource
{
/**
* Initialize the CredentialListMappingInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The unique id of the Account that is responsible
- * for this resource.
- * @param string $domainSid The unique string that identifies the resource
- * @param string $sid A string that identifies the resource to fetch
- * @return \Twilio\Rest\Api\V2010\Account\Sip\Domain\CredentialListMappingInstance
+ * @param string $accountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource.
+ * @param string $domainSid A 34 character string that uniquely identifies the SIP Domain for which the CredentialList resource will be mapped.
+ * @param string $sid A 34 character string that uniquely identifies the resource to delete.
*/
- public function __construct(Version $version, array $payload, $accountSid, $domainSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $accountSid, string $domainSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
+ 'domainSid' => Values::array_get($payload, 'domain_sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
'sid' => Values::array_get($payload, 'sid'),
'uri' => Values::array_get($payload, 'uri'),
- 'subresourceUris' => Values::array_get($payload, 'subresource_uris'),
- );
-
- $this->solution = array(
- 'accountSid' => $accountSid,
- 'domainSid' => $domainSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ ];
+
+ $this->solution = ['accountSid' => $accountSid, 'domainSid' => $domainSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Api\V2010\Account\Sip\Domain\CredentialListMappingContext Context for this
- * CredentialListMappingInstance
+ * @return CredentialListMappingContext Context for this CredentialListMappingInstance
*/
- protected function proxy()
+ protected function proxy(): CredentialListMappingContext
{
if (!$this->context) {
$this->context = new CredentialListMappingContext(
@@ -81,25 +83,27 @@ protected function proxy()
}
/**
- * Fetch a CredentialListMappingInstance
+ * Delete the CredentialListMappingInstance
*
- * @return CredentialListMappingInstance Fetched CredentialListMappingInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the CredentialListMappingInstance
+ * Fetch the CredentialListMappingInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return CredentialListMappingInstance Fetched CredentialListMappingInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): CredentialListMappingInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -109,7 +113,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -128,12 +132,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.CredentialListMappingInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/CredentialListMappingList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/CredentialListMappingList.php
index d1c7a5d..806ec99 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/CredentialListMappingList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/CredentialListMappingList.php
@@ -2,58 +2,75 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\Sip\Domain;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class CredentialListMappingList extends ListResource
-{
+ {
/**
* Construct the CredentialListMappingList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The unique id of the Account that is responsible
- * for this resource.
- * @param string $domainSid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\Sip\Domain\CredentialListMappingList
+ * @param string $accountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource.
+ * @param string $domainSid A 34 character string that uniquely identifies the SIP Domain for which the CredentialList resource will be mapped.
*/
- public function __construct(Version $version, $accountSid, $domainSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid,
+ string $domainSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'domainSid' => $domainSid,);
-
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/Domains/' . \rawurlencode($domainSid) . '/CredentialListMappings.json';
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ 'domainSid' =>
+ $domainSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/SIP/Domains/' . \rawurlencode($domainSid)
+ .'/CredentialListMappings.json';
}
/**
- * Create a new CredentialListMappingInstance
+ * Create the CredentialListMappingInstance
*
- * @param string $credentialListSid A string that identifies the CredentialList
- * resource to map to the SIP domain
- * @return CredentialListMappingInstance Newly created
- * CredentialListMappingInstance
+ * @param string $credentialListSid A 34 character string that uniquely identifies the CredentialList resource to map to the SIP domain.
+ * @return CredentialListMappingInstance Created CredentialListMappingInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($credentialListSid)
+ public function create(string $credentialListSid): CredentialListMappingInstance
{
- $data = Values::of(array('CredentialListSid' => $credentialListSid,));
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'CredentialListSid' =>
+ $credentialListSid,
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
return new CredentialListMappingInstance(
$this->version,
@@ -63,52 +80,52 @@ public function create($credentialListSid)
);
}
+
/**
- * Streams CredentialListMappingInstance records from the API as a generator
- * stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Reads CredentialListMappingInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
*
- * @param int $limit Upper limit for the number of records to return. stream()
+ * @param int $limit Upper limit for the number of records to return. read()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
+ * page_size is defined but a limit is defined, read()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return CredentialListMappingInstance[] Array of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function read(int $limit = null, $pageSize = null): array
{
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
- * Reads CredentialListMappingInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
+ * Streams CredentialListMappingInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
*
- * @param int $limit Upper limit for the number of records to return. read()
+ * @param int $limit Upper limit for the number of records to return. stream()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
+ * page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return CredentialListMappingInstance[] Array of results
+ * @return Stream stream of results
*/
- public function read($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
- return \iterator_to_array($this->stream($limit, $pageSize), false);
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
/**
@@ -118,34 +135,34 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of CredentialListMappingInstance
+ * @return CredentialListMappingPage Page of CredentialListMappingInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): CredentialListMappingPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new CredentialListMappingPage($this->version, $response, $this->solution);
}
/**
- * Retrieve a specific page of CredentialListMappingInstance records from the
- * API.
+ * Retrieve a specific page of CredentialListMappingInstance records from the API.
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of CredentialListMappingInstance
+ * @return CredentialListMappingPage Page of CredentialListMappingInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): CredentialListMappingPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -155,13 +172,16 @@ public function getPage($targetUrl)
return new CredentialListMappingPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a CredentialListMappingContext
*
- * @param string $sid A string that identifies the resource to fetch
- * @return \Twilio\Rest\Api\V2010\Account\Sip\Domain\CredentialListMappingContext
+ * @param string $sid A 34 character string that uniquely identifies the resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): CredentialListMappingContext
{
return new CredentialListMappingContext(
$this->version,
@@ -176,8 +196,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.CredentialListMappingList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/CredentialListMappingPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/CredentialListMappingPage.php
index 2579692..ea7c854 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/CredentialListMappingPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/CredentialListMappingPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return CredentialListMappingInstance \Twilio\Rest\Api\V2010\Account\Sip\Domain\CredentialListMappingInstance
+ */
+ public function buildInstance(array $payload): CredentialListMappingInstance
{
- return new CredentialListMappingInstance(
- $this->version,
- $payload,
- $this->solution['accountSid'],
- $this->solution['domainSid']
- );
+ return new CredentialListMappingInstance($this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.CredentialListMappingPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/IpAccessControlListMappingContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/IpAccessControlListMappingContext.php
index d7f8b7a..47ed1e0 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/IpAccessControlListMappingContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/IpAccessControlListMappingContext.php
@@ -2,57 +2,86 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Sip\Domain;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class IpAccessControlListMappingContext extends InstanceContext
-{
+ {
/**
* Initialize the IpAccessControlListMappingContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $accountSid The unique id of the Account that is responsible
- * for this resource.
- * @param string $domainSid A string that uniquely identifies the SIP Domain
- * @param string $sid A 34 character string that uniquely identifies the
- * resource to fetch.
- * @return \Twilio\Rest\Api\V2010\Account\Sip\Domain\IpAccessControlListMappingContext
+ * @param Version $version Version that contains the resource
+ * @param string $accountSid The unique id of the Account that is responsible for this resource.
+ * @param string $domainSid A 34 character string that uniquely identifies the SIP domain.
+ * @param string $sid A 34 character string that uniquely identifies the resource to delete.
*/
- public function __construct(Version $version, $accountSid, $domainSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $accountSid,
+ $domainSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'domainSid' => $domainSid, 'sid' => $sid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+ 'domainSid' =>
+ $domainSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/Domains/' . \rawurlencode($domainSid) . '/IpAccessControlListMappings/' . \rawurlencode($sid) . '.json';
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/SIP/Domains/' . \rawurlencode($domainSid)
+ .'/IpAccessControlListMappings/' . \rawurlencode($sid)
+ .'.json';
}
/**
- * Fetch a IpAccessControlListMappingInstance
+ * Delete the IpAccessControlListMappingInstance
*
- * @return IpAccessControlListMappingInstance Fetched
- * IpAccessControlListMappingInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
+ }
+
+
+ /**
+ * Fetch the IpAccessControlListMappingInstance
+ *
+ * @return IpAccessControlListMappingInstance Fetched IpAccessControlListMappingInstance
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function fetch(): IpAccessControlListMappingInstance
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new IpAccessControlListMappingInstance(
$this->version,
@@ -63,28 +92,18 @@ public function fetch()
);
}
- /**
- * Deletes the IpAccessControlListMappingInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.IpAccessControlListMappingContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/IpAccessControlListMappingInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/IpAccessControlListMappingInstance.php
index 552be67..e787cf5 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/IpAccessControlListMappingInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/IpAccessControlListMappingInstance.php
@@ -2,72 +2,73 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Sip\Domain;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $friendlyName
- * @property string $sid
- * @property string $uri
- * @property array $subresourceUris
+ * @property string|null $accountSid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $domainSid
+ * @property string|null $friendlyName
+ * @property string|null $sid
+ * @property string|null $uri
*/
class IpAccessControlListMappingInstance extends InstanceResource
{
/**
* Initialize the IpAccessControlListMappingInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The unique id of the Account that is responsible
- * for this resource.
- * @param string $domainSid The unique string that identifies the resource
- * @param string $sid A 34 character string that uniquely identifies the
- * resource to fetch.
- * @return \Twilio\Rest\Api\V2010\Account\Sip\Domain\IpAccessControlListMappingInstance
+ * @param string $accountSid The unique id of the Account that is responsible for this resource.
+ * @param string $domainSid A 34 character string that uniquely identifies the SIP domain.
+ * @param string $sid A 34 character string that uniquely identifies the resource to delete.
*/
- public function __construct(Version $version, array $payload, $accountSid, $domainSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $accountSid, string $domainSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
+ 'domainSid' => Values::array_get($payload, 'domain_sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
'sid' => Values::array_get($payload, 'sid'),
'uri' => Values::array_get($payload, 'uri'),
- 'subresourceUris' => Values::array_get($payload, 'subresource_uris'),
- );
-
- $this->solution = array(
- 'accountSid' => $accountSid,
- 'domainSid' => $domainSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ ];
+
+ $this->solution = ['accountSid' => $accountSid, 'domainSid' => $domainSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Api\V2010\Account\Sip\Domain\IpAccessControlListMappingContext Context for this
- * IpAccessControlListMappingInstance
+ * @return IpAccessControlListMappingContext Context for this IpAccessControlListMappingInstance
*/
- protected function proxy()
+ protected function proxy(): IpAccessControlListMappingContext
{
if (!$this->context) {
$this->context = new IpAccessControlListMappingContext(
@@ -82,26 +83,27 @@ protected function proxy()
}
/**
- * Fetch a IpAccessControlListMappingInstance
+ * Delete the IpAccessControlListMappingInstance
*
- * @return IpAccessControlListMappingInstance Fetched
- * IpAccessControlListMappingInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the IpAccessControlListMappingInstance
+ * Fetch the IpAccessControlListMappingInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return IpAccessControlListMappingInstance Fetched IpAccessControlListMappingInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): IpAccessControlListMappingInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -111,7 +113,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -130,12 +132,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.IpAccessControlListMappingInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/IpAccessControlListMappingList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/IpAccessControlListMappingList.php
index 0b4ee48..7411f7c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/IpAccessControlListMappingList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/IpAccessControlListMappingList.php
@@ -2,58 +2,75 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\Sip\Domain;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class IpAccessControlListMappingList extends ListResource
-{
+ {
/**
* Construct the IpAccessControlListMappingList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The unique id of the Account that is responsible
- * for this resource.
- * @param string $domainSid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\Sip\Domain\IpAccessControlListMappingList
+ * @param string $accountSid The unique id of the Account that is responsible for this resource.
+ * @param string $domainSid A 34 character string that uniquely identifies the SIP domain.
*/
- public function __construct(Version $version, $accountSid, $domainSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid,
+ string $domainSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'domainSid' => $domainSid,);
-
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/Domains/' . \rawurlencode($domainSid) . '/IpAccessControlListMappings.json';
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ 'domainSid' =>
+ $domainSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/SIP/Domains/' . \rawurlencode($domainSid)
+ .'/IpAccessControlListMappings.json';
}
/**
- * Create a new IpAccessControlListMappingInstance
+ * Create the IpAccessControlListMappingInstance
*
- * @param string $ipAccessControlListSid The unique id of the IP access control
- * list to map to the SIP domain
- * @return IpAccessControlListMappingInstance Newly created
- * IpAccessControlListMappingInstance
+ * @param string $ipAccessControlListSid The unique id of the IP access control list to map to the SIP domain.
+ * @return IpAccessControlListMappingInstance Created IpAccessControlListMappingInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($ipAccessControlListSid)
+ public function create(string $ipAccessControlListSid): IpAccessControlListMappingInstance
{
- $data = Values::of(array('IpAccessControlListSid' => $ipAccessControlListSid,));
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'IpAccessControlListSid' =>
+ $ipAccessControlListSid,
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
return new IpAccessControlListMappingInstance(
$this->version,
@@ -63,90 +80,89 @@ public function create($ipAccessControlListSid)
);
}
+
/**
- * Streams IpAccessControlListMappingInstance records from the API as a
- * generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Reads IpAccessControlListMappingInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
*
- * @param int $limit Upper limit for the number of records to return. stream()
+ * @param int $limit Upper limit for the number of records to return. read()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
+ * page_size is defined but a limit is defined, read()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return IpAccessControlListMappingInstance[] Array of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function read(int $limit = null, $pageSize = null): array
{
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
- * Reads IpAccessControlListMappingInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
+ * Streams IpAccessControlListMappingInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
*
- * @param int $limit Upper limit for the number of records to return. read()
+ * @param int $limit Upper limit for the number of records to return. stream()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
+ * page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return IpAccessControlListMappingInstance[] Array of results
+ * @return Stream stream of results
*/
- public function read($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
- return \iterator_to_array($this->stream($limit, $pageSize), false);
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
/**
- * Retrieve a single page of IpAccessControlListMappingInstance records from
- * the API.
+ * Retrieve a single page of IpAccessControlListMappingInstance records from the API.
* Request is executed immediately
*
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of IpAccessControlListMappingInstance
+ * @return IpAccessControlListMappingPage Page of IpAccessControlListMappingInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): IpAccessControlListMappingPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new IpAccessControlListMappingPage($this->version, $response, $this->solution);
}
/**
- * Retrieve a specific page of IpAccessControlListMappingInstance records from
- * the API.
+ * Retrieve a specific page of IpAccessControlListMappingInstance records from the API.
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of IpAccessControlListMappingInstance
+ * @return IpAccessControlListMappingPage Page of IpAccessControlListMappingInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): IpAccessControlListMappingPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -156,14 +172,16 @@ public function getPage($targetUrl)
return new IpAccessControlListMappingPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a IpAccessControlListMappingContext
*
- * @param string $sid A 34 character string that uniquely identifies the
- * resource to fetch.
- * @return \Twilio\Rest\Api\V2010\Account\Sip\Domain\IpAccessControlListMappingContext
+ * @param string $sid A 34 character string that uniquely identifies the resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): IpAccessControlListMappingContext
{
return new IpAccessControlListMappingContext(
$this->version,
@@ -178,8 +196,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.IpAccessControlListMappingList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/IpAccessControlListMappingPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/IpAccessControlListMappingPage.php
index 83f6636..cb760e1 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/IpAccessControlListMappingPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/IpAccessControlListMappingPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return IpAccessControlListMappingInstance \Twilio\Rest\Api\V2010\Account\Sip\Domain\IpAccessControlListMappingInstance
+ */
+ public function buildInstance(array $payload): IpAccessControlListMappingInstance
{
- return new IpAccessControlListMappingInstance(
- $this->version,
- $payload,
- $this->solution['accountSid'],
- $this->solution['domainSid']
- );
+ return new IpAccessControlListMappingInstance($this->version, $payload, $this->solution['accountSid'], $this->solution['domainSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.IpAccessControlListMappingPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/DomainContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/DomainContext.php
index 3b57956..d49d2bb 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/DomainContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/DomainContext.php
@@ -2,70 +2,98 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Sip;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypesList;
-use Twilio\Rest\Api\V2010\Account\Sip\Domain\CredentialListMappingList;
-use Twilio\Rest\Api\V2010\Account\Sip\Domain\IpAccessControlListMappingList;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+use Twilio\Rest\Api\V2010\Account\Sip\Domain\CredentialListMappingList;
+use Twilio\Rest\Api\V2010\Account\Sip\Domain\IpAccessControlListMappingList;
+use Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypesList;
+
/**
- * @property \Twilio\Rest\Api\V2010\Account\Sip\Domain\IpAccessControlListMappingList $ipAccessControlListMappings
- * @property \Twilio\Rest\Api\V2010\Account\Sip\Domain\CredentialListMappingList $credentialListMappings
- * @property \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypesList $auth
+ * @property CredentialListMappingList $credentialListMappings
+ * @property IpAccessControlListMappingList $ipAccessControlListMappings
+ * @property AuthTypesList $auth
* @method \Twilio\Rest\Api\V2010\Account\Sip\Domain\IpAccessControlListMappingContext ipAccessControlListMappings(string $sid)
* @method \Twilio\Rest\Api\V2010\Account\Sip\Domain\CredentialListMappingContext credentialListMappings(string $sid)
*/
class DomainContext extends InstanceContext
-{
- protected $_ipAccessControlListMappings = null;
- protected $_credentialListMappings = null;
- protected $_auth = null;
+ {
+ protected $_credentialListMappings;
+ protected $_ipAccessControlListMappings;
+ protected $_auth;
/**
* Initialize the DomainContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * to fetch
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\Sip\DomainContext
+ * @param Version $version Version that contains the resource
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
+ * @param string $sid The Twilio-provided string that uniquely identifies the SipDomain resource to delete.
*/
- public function __construct(Version $version, $accountSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $accountSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'sid' => $sid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/Domains/' . \rawurlencode($sid) . '.json';
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/SIP/Domains/' . \rawurlencode($sid)
+ .'.json';
}
/**
- * Fetch a DomainInstance
+ * Delete the DomainInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
+ }
+
+
+ /**
+ * Fetch the DomainInstance
*
* @return DomainInstance Fetched DomainInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): DomainInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new DomainInstance(
$this->version,
@@ -75,6 +103,7 @@ public function fetch()
);
}
+
/**
* Update the DomainInstance
*
@@ -82,28 +111,42 @@ public function fetch()
* @return DomainInstance Updated DomainInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): DomainInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'VoiceFallbackMethod' => $options['voiceFallbackMethod'],
- 'VoiceFallbackUrl' => $options['voiceFallbackUrl'],
- 'VoiceMethod' => $options['voiceMethod'],
- 'VoiceStatusCallbackMethod' => $options['voiceStatusCallbackMethod'],
- 'VoiceStatusCallbackUrl' => $options['voiceStatusCallbackUrl'],
- 'VoiceUrl' => $options['voiceUrl'],
- 'SipRegistration' => Serialize::booleanToString($options['sipRegistration']),
- 'DomainName' => $options['domainName'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'VoiceFallbackMethod' =>
+ $options['voiceFallbackMethod'],
+ 'VoiceFallbackUrl' =>
+ $options['voiceFallbackUrl'],
+ 'VoiceMethod' =>
+ $options['voiceMethod'],
+ 'VoiceStatusCallbackMethod' =>
+ $options['voiceStatusCallbackMethod'],
+ 'VoiceStatusCallbackUrl' =>
+ $options['voiceStatusCallbackUrl'],
+ 'VoiceUrl' =>
+ $options['voiceUrl'],
+ 'SipRegistration' =>
+ Serialize::booleanToString($options['sipRegistration']),
+ 'DomainName' =>
+ $options['domainName'],
+ 'EmergencyCallingEnabled' =>
+ Serialize::booleanToString($options['emergencyCallingEnabled']),
+ 'Secure' =>
+ Serialize::booleanToString($options['secure']),
+ 'ByocTrunkSid' =>
+ $options['byocTrunkSid'],
+ 'EmergencyCallerSid' =>
+ $options['emergencyCallerSid'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new DomainInstance(
$this->version,
@@ -113,59 +156,43 @@ public function update($options = array())
);
}
- /**
- * Deletes the DomainInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
- * Access the ipAccessControlListMappings
- *
- * @return \Twilio\Rest\Api\V2010\Account\Sip\Domain\IpAccessControlListMappingList
+ * Access the credentialListMappings
*/
- protected function getIpAccessControlListMappings()
+ protected function getCredentialListMappings(): CredentialListMappingList
{
- if (!$this->_ipAccessControlListMappings) {
- $this->_ipAccessControlListMappings = new IpAccessControlListMappingList(
+ if (!$this->_credentialListMappings) {
+ $this->_credentialListMappings = new CredentialListMappingList(
$this->version,
$this->solution['accountSid'],
$this->solution['sid']
);
}
- return $this->_ipAccessControlListMappings;
+ return $this->_credentialListMappings;
}
/**
- * Access the credentialListMappings
- *
- * @return \Twilio\Rest\Api\V2010\Account\Sip\Domain\CredentialListMappingList
+ * Access the ipAccessControlListMappings
*/
- protected function getCredentialListMappings()
+ protected function getIpAccessControlListMappings(): IpAccessControlListMappingList
{
- if (!$this->_credentialListMappings) {
- $this->_credentialListMappings = new CredentialListMappingList(
+ if (!$this->_ipAccessControlListMappings) {
+ $this->_ipAccessControlListMappings = new IpAccessControlListMappingList(
$this->version,
$this->solution['accountSid'],
$this->solution['sid']
);
}
- return $this->_credentialListMappings;
+ return $this->_ipAccessControlListMappings;
}
/**
* Access the auth
- *
- * @return \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypesList
*/
- protected function getAuth()
+ protected function getAuth(): AuthTypesList
{
if (!$this->_auth) {
$this->_auth = new AuthTypesList(
@@ -182,10 +209,10 @@ protected function getAuth()
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -200,10 +227,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -218,12 +245,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.DomainContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/DomainInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/DomainInstance.php
index f74d5ae..dbfb6ac 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/DomainInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/DomainInstance.php
@@ -2,61 +2,75 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Sip;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Api\V2010\Account\Sip\Domain\CredentialListMappingList;
+use Twilio\Rest\Api\V2010\Account\Sip\Domain\IpAccessControlListMappingList;
+use Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypesList;
+
/**
- * @property string $accountSid
- * @property string $apiVersion
- * @property string $authType
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $domainName
- * @property string $friendlyName
- * @property string $sid
- * @property string $uri
- * @property string $voiceFallbackMethod
- * @property string $voiceFallbackUrl
- * @property string $voiceMethod
- * @property string $voiceStatusCallbackMethod
- * @property string $voiceStatusCallbackUrl
- * @property string $voiceUrl
- * @property array $subresourceUris
- * @property bool $sipRegistration
+ * @property string|null $accountSid
+ * @property string|null $apiVersion
+ * @property string|null $authType
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $domainName
+ * @property string|null $friendlyName
+ * @property string|null $sid
+ * @property string|null $uri
+ * @property string|null $voiceFallbackMethod
+ * @property string|null $voiceFallbackUrl
+ * @property string|null $voiceMethod
+ * @property string|null $voiceStatusCallbackMethod
+ * @property string|null $voiceStatusCallbackUrl
+ * @property string|null $voiceUrl
+ * @property array|null $subresourceUris
+ * @property bool|null $sipRegistration
+ * @property bool|null $emergencyCallingEnabled
+ * @property bool|null $secure
+ * @property string|null $byocTrunkSid
+ * @property string|null $emergencyCallerSid
*/
class DomainInstance extends InstanceResource
{
- protected $_ipAccessControlListMappings = null;
- protected $_credentialListMappings = null;
- protected $_auth = null;
+ protected $_credentialListMappings;
+ protected $_ipAccessControlListMappings;
+ protected $_auth;
/**
* Initialize the DomainInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid A 34 character string that uniquely identifies
- * this resource.
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\Sip\DomainInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
+ * @param string $sid The Twilio-provided string that uniquely identifies the SipDomain resource to delete.
*/
- public function __construct(Version $version, array $payload, $accountSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $accountSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'apiVersion' => Values::array_get($payload, 'api_version'),
'authType' => Values::array_get($payload, 'auth_type'),
@@ -74,19 +88,22 @@ public function __construct(Version $version, array $payload, $accountSid, $sid
'voiceUrl' => Values::array_get($payload, 'voice_url'),
'subresourceUris' => Values::array_get($payload, 'subresource_uris'),
'sipRegistration' => Values::array_get($payload, 'sip_registration'),
- );
+ 'emergencyCallingEnabled' => Values::array_get($payload, 'emergency_calling_enabled'),
+ 'secure' => Values::array_get($payload, 'secure'),
+ 'byocTrunkSid' => Values::array_get($payload, 'byoc_trunk_sid'),
+ 'emergencyCallerSid' => Values::array_get($payload, 'emergency_caller_sid'),
+ ];
- $this->solution = array('accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Api\V2010\Account\Sip\DomainContext Context for this
- * DomainInstance
+ * @return DomainContext Context for this DomainInstance
*/
- protected function proxy()
+ protected function proxy(): DomainContext
{
if (!$this->context) {
$this->context = new DomainContext(
@@ -100,13 +117,26 @@ protected function proxy()
}
/**
- * Fetch a DomainInstance
+ * Delete the DomainInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ return $this->proxy()->delete();
+ }
+
+ /**
+ * Fetch the DomainInstance
*
* @return DomainInstance Fetched DomainInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): DomainInstance
{
+
return $this->proxy()->fetch();
}
@@ -117,48 +147,32 @@ public function fetch()
* @return DomainInstance Updated DomainInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): DomainInstance
{
+
return $this->proxy()->update($options);
}
/**
- * Deletes the DomainInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
+ * Access the credentialListMappings
*/
- public function delete()
+ protected function getCredentialListMappings(): CredentialListMappingList
{
- return $this->proxy()->delete();
+ return $this->proxy()->credentialListMappings;
}
/**
* Access the ipAccessControlListMappings
- *
- * @return \Twilio\Rest\Api\V2010\Account\Sip\Domain\IpAccessControlListMappingList
*/
- protected function getIpAccessControlListMappings()
+ protected function getIpAccessControlListMappings(): IpAccessControlListMappingList
{
return $this->proxy()->ipAccessControlListMappings;
}
- /**
- * Access the credentialListMappings
- *
- * @return \Twilio\Rest\Api\V2010\Account\Sip\Domain\CredentialListMappingList
- */
- protected function getCredentialListMappings()
- {
- return $this->proxy()->credentialListMappings;
- }
-
/**
* Access the auth
- *
- * @return \Twilio\Rest\Api\V2010\Account\Sip\Domain\AuthTypesList
*/
- protected function getAuth()
+ protected function getAuth(): AuthTypesList
{
return $this->proxy()->auth;
}
@@ -170,7 +184,7 @@ protected function getAuth()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -189,12 +203,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.DomainInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/DomainList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/DomainList.php
index 862526f..309c671 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/DomainList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/DomainList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\Sip;
@@ -12,57 +19,90 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class DomainList extends ListResource
-{
+ {
/**
* Construct the DomainList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid A 34 character string that uniquely identifies
- * this resource.
- * @return \Twilio\Rest\Api\V2010\Account\Sip\DomainList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
*/
- public function __construct(Version $version, $accountSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid,);
-
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/Domains.json';
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/SIP/Domains.json';
}
/**
- * Streams DomainInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the DomainInstance
*
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @param string $domainName The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and \\\"-\\\" and must end with `sip.twilio.com`.
+ * @param array|Options $options Optional Arguments
+ * @return DomainInstance Created DomainInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($limit = null, $pageSize = null)
+ public function create(string $domainName, array $options = []): DomainInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'DomainName' =>
+ $domainName,
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'VoiceUrl' =>
+ $options['voiceUrl'],
+ 'VoiceMethod' =>
+ $options['voiceMethod'],
+ 'VoiceFallbackUrl' =>
+ $options['voiceFallbackUrl'],
+ 'VoiceFallbackMethod' =>
+ $options['voiceFallbackMethod'],
+ 'VoiceStatusCallbackUrl' =>
+ $options['voiceStatusCallbackUrl'],
+ 'VoiceStatusCallbackMethod' =>
+ $options['voiceStatusCallbackMethod'],
+ 'SipRegistration' =>
+ Serialize::booleanToString($options['sipRegistration']),
+ 'EmergencyCallingEnabled' =>
+ Serialize::booleanToString($options['emergencyCallingEnabled']),
+ 'Secure' =>
+ Serialize::booleanToString($options['secure']),
+ 'ByocTrunkSid' =>
+ $options['byocTrunkSid'],
+ 'EmergencyCallerSid' =>
+ $options['emergencyCallerSid'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new DomainInstance(
+ $this->version,
+ $payload,
+ $this->solution['accountSid']
+ );
}
+
/**
* Reads DomainInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -78,11 +118,38 @@ public function stream($limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return DomainInstance[] Array of results
*/
- public function read($limit = null, $pageSize = null)
+ public function read(int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($limit, $pageSize), false);
}
+ /**
+ * Streams DomainInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of DomainInstance records from the API.
* Request is executed immediately
@@ -90,21 +157,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of DomainInstance
+ * @return DomainPage Page of DomainInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): DomainPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new DomainPage($this->version, $response, $this->solution);
}
@@ -114,9 +182,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of DomainInstance
+ * @return DomainPage Page of DomainInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): DomainPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -126,49 +194,22 @@ public function getPage($targetUrl)
return new DomainPage($this->version, $response, $this->solution);
}
- /**
- * Create a new DomainInstance
- *
- * @param string $domainName The unique address on Twilio to route SIP traffic
- * @param array|Options $options Optional Arguments
- * @return DomainInstance Newly created DomainInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($domainName, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'DomainName' => $domainName,
- 'FriendlyName' => $options['friendlyName'],
- 'VoiceUrl' => $options['voiceUrl'],
- 'VoiceMethod' => $options['voiceMethod'],
- 'VoiceFallbackUrl' => $options['voiceFallbackUrl'],
- 'VoiceFallbackMethod' => $options['voiceFallbackMethod'],
- 'VoiceStatusCallbackUrl' => $options['voiceStatusCallbackUrl'],
- 'VoiceStatusCallbackMethod' => $options['voiceStatusCallbackMethod'],
- 'SipRegistration' => Serialize::booleanToString($options['sipRegistration']),
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new DomainInstance($this->version, $payload, $this->solution['accountSid']);
- }
/**
* Constructs a DomainContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\Sip\DomainContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the SipDomain resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): DomainContext
{
- return new DomainContext($this->version, $this->solution['accountSid'], $sid);
+ return new DomainContext(
+ $this->version,
+ $this->solution['accountSid'],
+ $sid
+ );
}
/**
@@ -176,8 +217,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.DomainList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/DomainOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/DomainOptions.php
index 1273e08..5bbfc2c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/DomainOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/DomainOptions.php
@@ -1,10 +1,16 @@
options['friendlyName'] = $friendlyName;
$this->options['voiceUrl'] = $voiceUrl;
$this->options['voiceMethod'] = $voiceMethod;
@@ -82,15 +164,19 @@ public function __construct($friendlyName = Values::NONE, $voiceUrl = Values::NO
$this->options['voiceStatusCallbackUrl'] = $voiceStatusCallbackUrl;
$this->options['voiceStatusCallbackMethod'] = $voiceStatusCallbackMethod;
$this->options['sipRegistration'] = $sipRegistration;
+ $this->options['emergencyCallingEnabled'] = $emergencyCallingEnabled;
+ $this->options['secure'] = $secure;
+ $this->options['byocTrunkSid'] = $byocTrunkSid;
+ $this->options['emergencyCallerSid'] = $emergencyCallerSid;
}
/**
* A descriptive string that you created to describe the resource. It can be up to 64 characters long.
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName A descriptive string that you created to describe the resource. It can be up to 64 characters long.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -99,10 +185,10 @@ public function setFriendlyName($friendlyName)
/**
* The URL we should when the domain receives a call.
*
- * @param string $voiceUrl The URL we should call when receiving a call
+ * @param string $voiceUrl The URL we should when the domain receives a call.
* @return $this Fluent Builder
*/
- public function setVoiceUrl($voiceUrl)
+ public function setVoiceUrl(string $voiceUrl): self
{
$this->options['voiceUrl'] = $voiceUrl;
return $this;
@@ -111,10 +197,10 @@ public function setVoiceUrl($voiceUrl)
/**
* The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`.
*
- * @param string $voiceMethod The HTTP method to use with voice_url
+ * @param string $voiceMethod The HTTP method we should use to call `voice_url`. Can be: `GET` or `POST`.
* @return $this Fluent Builder
*/
- public function setVoiceMethod($voiceMethod)
+ public function setVoiceMethod(string $voiceMethod): self
{
$this->options['voiceMethod'] = $voiceMethod;
return $this;
@@ -123,11 +209,10 @@ public function setVoiceMethod($voiceMethod)
/**
* The URL that we should call when an error occurs while retrieving or executing the TwiML from `voice_url`.
*
- * @param string $voiceFallbackUrl The URL we should call when an error occurs
- * in executing TwiML
+ * @param string $voiceFallbackUrl The URL that we should call when an error occurs while retrieving or executing the TwiML from `voice_url`.
* @return $this Fluent Builder
*/
- public function setVoiceFallbackUrl($voiceFallbackUrl)
+ public function setVoiceFallbackUrl(string $voiceFallbackUrl): self
{
$this->options['voiceFallbackUrl'] = $voiceFallbackUrl;
return $this;
@@ -136,11 +221,10 @@ public function setVoiceFallbackUrl($voiceFallbackUrl)
/**
* The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`.
*
- * @param string $voiceFallbackMethod The HTTP method to use with
- * voice_fallback_url
+ * @param string $voiceFallbackMethod The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`.
* @return $this Fluent Builder
*/
- public function setVoiceFallbackMethod($voiceFallbackMethod)
+ public function setVoiceFallbackMethod(string $voiceFallbackMethod): self
{
$this->options['voiceFallbackMethod'] = $voiceFallbackMethod;
return $this;
@@ -149,11 +233,10 @@ public function setVoiceFallbackMethod($voiceFallbackMethod)
/**
* The URL that we should call to pass status parameters (such as call ended) to your application.
*
- * @param string $voiceStatusCallbackUrl The URL that we should call to pass
- * status updates
+ * @param string $voiceStatusCallbackUrl The URL that we should call to pass status parameters (such as call ended) to your application.
* @return $this Fluent Builder
*/
- public function setVoiceStatusCallbackUrl($voiceStatusCallbackUrl)
+ public function setVoiceStatusCallbackUrl(string $voiceStatusCallbackUrl): self
{
$this->options['voiceStatusCallbackUrl'] = $voiceStatusCallbackUrl;
return $this;
@@ -162,11 +245,10 @@ public function setVoiceStatusCallbackUrl($voiceStatusCallbackUrl)
/**
* The HTTP method we should use to call `voice_status_callback_url`. Can be: `GET` or `POST`.
*
- * @param string $voiceStatusCallbackMethod The HTTP method we should use to
- * call `voice_status_callback_url`
+ * @param string $voiceStatusCallbackMethod The HTTP method we should use to call `voice_status_callback_url`. Can be: `GET` or `POST`.
* @return $this Fluent Builder
*/
- public function setVoiceStatusCallbackMethod($voiceStatusCallbackMethod)
+ public function setVoiceStatusCallbackMethod(string $voiceStatusCallbackMethod): self
{
$this->options['voiceStatusCallbackMethod'] = $voiceStatusCallbackMethod;
return $this;
@@ -175,51 +257,112 @@ public function setVoiceStatusCallbackMethod($voiceStatusCallbackMethod)
/**
* Whether to allow SIP Endpoints to register with the domain to receive calls. Can be `true` or `false`. `true` allows SIP Endpoints to register with the domain to receive calls, `false` does not.
*
- * @param bool $sipRegistration Whether SIP registration is allowed
+ * @param bool $sipRegistration Whether to allow SIP Endpoints to register with the domain to receive calls. Can be `true` or `false`. `true` allows SIP Endpoints to register with the domain to receive calls, `false` does not.
* @return $this Fluent Builder
*/
- public function setSipRegistration($sipRegistration)
+ public function setSipRegistration(bool $sipRegistration): self
{
$this->options['sipRegistration'] = $sipRegistration;
return $this;
}
+ /**
+ * Whether emergency calling is enabled for the domain. If enabled, allows emergency calls on the domain from phone numbers with validated addresses.
+ *
+ * @param bool $emergencyCallingEnabled Whether emergency calling is enabled for the domain. If enabled, allows emergency calls on the domain from phone numbers with validated addresses.
+ * @return $this Fluent Builder
+ */
+ public function setEmergencyCallingEnabled(bool $emergencyCallingEnabled): self
+ {
+ $this->options['emergencyCallingEnabled'] = $emergencyCallingEnabled;
+ return $this;
+ }
+
+ /**
+ * Whether secure SIP is enabled for the domain. If enabled, TLS will be enforced and SRTP will be negotiated on all incoming calls to this sip domain.
+ *
+ * @param bool $secure Whether secure SIP is enabled for the domain. If enabled, TLS will be enforced and SRTP will be negotiated on all incoming calls to this sip domain.
+ * @return $this Fluent Builder
+ */
+ public function setSecure(bool $secure): self
+ {
+ $this->options['secure'] = $secure;
+ return $this;
+ }
+
+ /**
+ * The SID of the BYOC Trunk(Bring Your Own Carrier) resource that the Sip Domain will be associated with.
+ *
+ * @param string $byocTrunkSid The SID of the BYOC Trunk(Bring Your Own Carrier) resource that the Sip Domain will be associated with.
+ * @return $this Fluent Builder
+ */
+ public function setByocTrunkSid(string $byocTrunkSid): self
+ {
+ $this->options['byocTrunkSid'] = $byocTrunkSid;
+ return $this;
+ }
+
+ /**
+ * Whether an emergency caller sid is configured for the domain. If present, this phone number will be used as the callback for the emergency call.
+ *
+ * @param string $emergencyCallerSid Whether an emergency caller sid is configured for the domain. If present, this phone number will be used as the callback for the emergency call.
+ * @return $this Fluent Builder
+ */
+ public function setEmergencyCallerSid(string $emergencyCallerSid): self
+ {
+ $this->options['emergencyCallerSid'] = $emergencyCallerSid;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.CreateDomainOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.CreateDomainOptions ' . $options . ']';
}
}
+
+
+
class UpdateDomainOptions extends Options
-{
+ {
/**
- * @param string $friendlyName A string to describe the resource
- * @param string $voiceFallbackMethod The HTTP method used with
- * voice_fallback_url
- * @param string $voiceFallbackUrl The URL we should call when an error occurs
- * in executing TwiML
- * @param string $voiceMethod The HTTP method we should use with voice_url
- * @param string $voiceStatusCallbackMethod The HTTP method we should use to
- * call voice_status_callback_url
- * @param string $voiceStatusCallbackUrl The URL that we should call to pass
- * status updates
- * @param string $voiceUrl The URL we should call when receiving a call
- * @param bool $sipRegistration Whether SIP registration is allowed
- * @param string $domainName The unique address on Twilio to route SIP traffic
+ * @param string $friendlyName A descriptive string that you created to describe the resource. It can be up to 64 characters long.
+ * @param string $voiceFallbackMethod The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`.
+ * @param string $voiceFallbackUrl The URL that we should call when an error occurs while retrieving or executing the TwiML requested by `voice_url`.
+ * @param string $voiceMethod The HTTP method we should use to call `voice_url`
+ * @param string $voiceStatusCallbackMethod The HTTP method we should use to call `voice_status_callback_url`. Can be: `GET` or `POST`.
+ * @param string $voiceStatusCallbackUrl The URL that we should call to pass status parameters (such as call ended) to your application.
+ * @param string $voiceUrl The URL we should call when the domain receives a call.
+ * @param bool $sipRegistration Whether to allow SIP Endpoints to register with the domain to receive calls. Can be `true` or `false`. `true` allows SIP Endpoints to register with the domain to receive calls, `false` does not.
+ * @param string $domainName The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and \\\"-\\\" and must end with `sip.twilio.com`.
+ * @param bool $emergencyCallingEnabled Whether emergency calling is enabled for the domain. If enabled, allows emergency calls on the domain from phone numbers with validated addresses.
+ * @param bool $secure Whether secure SIP is enabled for the domain. If enabled, TLS will be enforced and SRTP will be negotiated on all incoming calls to this sip domain.
+ * @param string $byocTrunkSid The SID of the BYOC Trunk(Bring Your Own Carrier) resource that the Sip Domain will be associated with.
+ * @param string $emergencyCallerSid Whether an emergency caller sid is configured for the domain. If present, this phone number will be used as the callback for the emergency call.
*/
- public function __construct($friendlyName = Values::NONE, $voiceFallbackMethod = Values::NONE, $voiceFallbackUrl = Values::NONE, $voiceMethod = Values::NONE, $voiceStatusCallbackMethod = Values::NONE, $voiceStatusCallbackUrl = Values::NONE, $voiceUrl = Values::NONE, $sipRegistration = Values::NONE, $domainName = Values::NONE)
- {
+ public function __construct(
+
+ string $friendlyName = Values::NONE,
+ string $voiceFallbackMethod = Values::NONE,
+ string $voiceFallbackUrl = Values::NONE,
+ string $voiceMethod = Values::NONE,
+ string $voiceStatusCallbackMethod = Values::NONE,
+ string $voiceStatusCallbackUrl = Values::NONE,
+ string $voiceUrl = Values::NONE,
+ bool $sipRegistration = Values::BOOL_NONE,
+ string $domainName = Values::NONE,
+ bool $emergencyCallingEnabled = Values::BOOL_NONE,
+ bool $secure = Values::BOOL_NONE,
+ string $byocTrunkSid = Values::NONE,
+ string $emergencyCallerSid = Values::NONE
+
+ ) {
$this->options['friendlyName'] = $friendlyName;
$this->options['voiceFallbackMethod'] = $voiceFallbackMethod;
$this->options['voiceFallbackUrl'] = $voiceFallbackUrl;
@@ -229,15 +372,19 @@ public function __construct($friendlyName = Values::NONE, $voiceFallbackMethod =
$this->options['voiceUrl'] = $voiceUrl;
$this->options['sipRegistration'] = $sipRegistration;
$this->options['domainName'] = $domainName;
+ $this->options['emergencyCallingEnabled'] = $emergencyCallingEnabled;
+ $this->options['secure'] = $secure;
+ $this->options['byocTrunkSid'] = $byocTrunkSid;
+ $this->options['emergencyCallerSid'] = $emergencyCallerSid;
}
/**
* A descriptive string that you created to describe the resource. It can be up to 64 characters long.
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName A descriptive string that you created to describe the resource. It can be up to 64 characters long.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -246,11 +393,10 @@ public function setFriendlyName($friendlyName)
/**
* The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`.
*
- * @param string $voiceFallbackMethod The HTTP method used with
- * voice_fallback_url
+ * @param string $voiceFallbackMethod The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`.
* @return $this Fluent Builder
*/
- public function setVoiceFallbackMethod($voiceFallbackMethod)
+ public function setVoiceFallbackMethod(string $voiceFallbackMethod): self
{
$this->options['voiceFallbackMethod'] = $voiceFallbackMethod;
return $this;
@@ -259,11 +405,10 @@ public function setVoiceFallbackMethod($voiceFallbackMethod)
/**
* The URL that we should call when an error occurs while retrieving or executing the TwiML requested by `voice_url`.
*
- * @param string $voiceFallbackUrl The URL we should call when an error occurs
- * in executing TwiML
+ * @param string $voiceFallbackUrl The URL that we should call when an error occurs while retrieving or executing the TwiML requested by `voice_url`.
* @return $this Fluent Builder
*/
- public function setVoiceFallbackUrl($voiceFallbackUrl)
+ public function setVoiceFallbackUrl(string $voiceFallbackUrl): self
{
$this->options['voiceFallbackUrl'] = $voiceFallbackUrl;
return $this;
@@ -272,10 +417,10 @@ public function setVoiceFallbackUrl($voiceFallbackUrl)
/**
* The HTTP method we should use to call `voice_url`
*
- * @param string $voiceMethod The HTTP method we should use with voice_url
+ * @param string $voiceMethod The HTTP method we should use to call `voice_url`
* @return $this Fluent Builder
*/
- public function setVoiceMethod($voiceMethod)
+ public function setVoiceMethod(string $voiceMethod): self
{
$this->options['voiceMethod'] = $voiceMethod;
return $this;
@@ -284,11 +429,10 @@ public function setVoiceMethod($voiceMethod)
/**
* The HTTP method we should use to call `voice_status_callback_url`. Can be: `GET` or `POST`.
*
- * @param string $voiceStatusCallbackMethod The HTTP method we should use to
- * call voice_status_callback_url
+ * @param string $voiceStatusCallbackMethod The HTTP method we should use to call `voice_status_callback_url`. Can be: `GET` or `POST`.
* @return $this Fluent Builder
*/
- public function setVoiceStatusCallbackMethod($voiceStatusCallbackMethod)
+ public function setVoiceStatusCallbackMethod(string $voiceStatusCallbackMethod): self
{
$this->options['voiceStatusCallbackMethod'] = $voiceStatusCallbackMethod;
return $this;
@@ -297,11 +441,10 @@ public function setVoiceStatusCallbackMethod($voiceStatusCallbackMethod)
/**
* The URL that we should call to pass status parameters (such as call ended) to your application.
*
- * @param string $voiceStatusCallbackUrl The URL that we should call to pass
- * status updates
+ * @param string $voiceStatusCallbackUrl The URL that we should call to pass status parameters (such as call ended) to your application.
* @return $this Fluent Builder
*/
- public function setVoiceStatusCallbackUrl($voiceStatusCallbackUrl)
+ public function setVoiceStatusCallbackUrl(string $voiceStatusCallbackUrl): self
{
$this->options['voiceStatusCallbackUrl'] = $voiceStatusCallbackUrl;
return $this;
@@ -310,10 +453,10 @@ public function setVoiceStatusCallbackUrl($voiceStatusCallbackUrl)
/**
* The URL we should call when the domain receives a call.
*
- * @param string $voiceUrl The URL we should call when receiving a call
+ * @param string $voiceUrl The URL we should call when the domain receives a call.
* @return $this Fluent Builder
*/
- public function setVoiceUrl($voiceUrl)
+ public function setVoiceUrl(string $voiceUrl): self
{
$this->options['voiceUrl'] = $voiceUrl;
return $this;
@@ -322,40 +465,84 @@ public function setVoiceUrl($voiceUrl)
/**
* Whether to allow SIP Endpoints to register with the domain to receive calls. Can be `true` or `false`. `true` allows SIP Endpoints to register with the domain to receive calls, `false` does not.
*
- * @param bool $sipRegistration Whether SIP registration is allowed
+ * @param bool $sipRegistration Whether to allow SIP Endpoints to register with the domain to receive calls. Can be `true` or `false`. `true` allows SIP Endpoints to register with the domain to receive calls, `false` does not.
* @return $this Fluent Builder
*/
- public function setSipRegistration($sipRegistration)
+ public function setSipRegistration(bool $sipRegistration): self
{
$this->options['sipRegistration'] = $sipRegistration;
return $this;
}
/**
- * The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and "-".
+ * The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and \\\"-\\\" and must end with `sip.twilio.com`.
*
- * @param string $domainName The unique address on Twilio to route SIP traffic
+ * @param string $domainName The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and \\\"-\\\" and must end with `sip.twilio.com`.
* @return $this Fluent Builder
*/
- public function setDomainName($domainName)
+ public function setDomainName(string $domainName): self
{
$this->options['domainName'] = $domainName;
return $this;
}
+ /**
+ * Whether emergency calling is enabled for the domain. If enabled, allows emergency calls on the domain from phone numbers with validated addresses.
+ *
+ * @param bool $emergencyCallingEnabled Whether emergency calling is enabled for the domain. If enabled, allows emergency calls on the domain from phone numbers with validated addresses.
+ * @return $this Fluent Builder
+ */
+ public function setEmergencyCallingEnabled(bool $emergencyCallingEnabled): self
+ {
+ $this->options['emergencyCallingEnabled'] = $emergencyCallingEnabled;
+ return $this;
+ }
+
+ /**
+ * Whether secure SIP is enabled for the domain. If enabled, TLS will be enforced and SRTP will be negotiated on all incoming calls to this sip domain.
+ *
+ * @param bool $secure Whether secure SIP is enabled for the domain. If enabled, TLS will be enforced and SRTP will be negotiated on all incoming calls to this sip domain.
+ * @return $this Fluent Builder
+ */
+ public function setSecure(bool $secure): self
+ {
+ $this->options['secure'] = $secure;
+ return $this;
+ }
+
+ /**
+ * The SID of the BYOC Trunk(Bring Your Own Carrier) resource that the Sip Domain will be associated with.
+ *
+ * @param string $byocTrunkSid The SID of the BYOC Trunk(Bring Your Own Carrier) resource that the Sip Domain will be associated with.
+ * @return $this Fluent Builder
+ */
+ public function setByocTrunkSid(string $byocTrunkSid): self
+ {
+ $this->options['byocTrunkSid'] = $byocTrunkSid;
+ return $this;
+ }
+
+ /**
+ * Whether an emergency caller sid is configured for the domain. If present, this phone number will be used as the callback for the emergency call.
+ *
+ * @param string $emergencyCallerSid Whether an emergency caller sid is configured for the domain. If present, this phone number will be used as the callback for the emergency call.
+ * @return $this Fluent Builder
+ */
+ public function setEmergencyCallerSid(string $emergencyCallerSid): self
+ {
+ $this->options['emergencyCallerSid'] = $emergencyCallerSid;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.UpdateDomainOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.UpdateDomainOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/DomainPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/DomainPage.php
index 67fcb61..b9f9b23 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/DomainPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/DomainPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return DomainInstance \Twilio\Rest\Api\V2010\Account\Sip\DomainInstance
+ */
+ public function buildInstance(array $payload): DomainInstance
{
return new DomainInstance($this->version, $payload, $this->solution['accountSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.DomainPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressContext.php
index 0d060b0..c8cc742 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressContext.php
@@ -2,61 +2,87 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Sip\IpAccessControlList;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class IpAddressContext extends InstanceContext
-{
+ {
/**
* Initialize the IpAddressContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $accountSid The unique sid that identifies this account
- * @param string $ipAccessControlListSid The IpAccessControlList Sid that
- * identifies the IpAddress resources to
- * fetch
- * @param string $sid A string that identifies the IpAddress resource to fetch
- * @return \Twilio\Rest\Api\V2010\Account\Sip\IpAccessControlList\IpAddressContext
+ * @param Version $version Version that contains the resource
+ * @param string $accountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource.
+ * @param string $ipAccessControlListSid The IpAccessControlList Sid with which to associate the created IpAddress resource.
+ * @param string $sid A 34 character string that uniquely identifies the resource to delete.
*/
- public function __construct(Version $version, $accountSid, $ipAccessControlListSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $accountSid,
+ $ipAccessControlListSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array(
- 'accountSid' => $accountSid,
- 'ipAccessControlListSid' => $ipAccessControlListSid,
- 'sid' => $sid,
- );
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+ 'ipAccessControlListSid' =>
+ $ipAccessControlListSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/IpAccessControlLists/' . \rawurlencode($ipAccessControlListSid) . '/IpAddresses/' . \rawurlencode($sid) . '.json';
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/SIP/IpAccessControlLists/' . \rawurlencode($ipAccessControlListSid)
+ .'/IpAddresses/' . \rawurlencode($sid)
+ .'.json';
}
/**
- * Fetch a IpAddressInstance
+ * Delete the IpAddressInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
+ }
+
+
+ /**
+ * Fetch the IpAddressInstance
*
* @return IpAddressInstance Fetched IpAddressInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): IpAddressInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new IpAddressInstance(
$this->version,
@@ -67,6 +93,7 @@ public function fetch()
);
}
+
/**
* Update the IpAddressInstance
*
@@ -74,22 +101,22 @@ public function fetch()
* @return IpAddressInstance Updated IpAddressInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): IpAddressInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'IpAddress' => $options['ipAddress'],
- 'FriendlyName' => $options['friendlyName'],
- 'CidrPrefixLength' => $options['cidrPrefixLength'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'IpAddress' =>
+ $options['ipAddress'],
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'CidrPrefixLength' =>
+ $options['cidrPrefixLength'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new IpAddressInstance(
$this->version,
@@ -100,28 +127,18 @@ public function update($options = array())
);
}
- /**
- * Deletes the IpAddressInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.IpAddressContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressInstance.php
index 7ea456d..a9dd83c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressInstance.php
@@ -2,52 +2,57 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Sip\IpAccessControlList;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $friendlyName
- * @property string $ipAddress
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $friendlyName
+ * @property string|null $ipAddress
* @property int $cidrPrefixLength
- * @property string $ipAccessControlListSid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $uri
+ * @property string|null $ipAccessControlListSid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $uri
*/
class IpAddressInstance extends InstanceResource
{
/**
* Initialize the IpAddressInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The unique id of the Account that is responsible
- * for this resource.
- * @param string $ipAccessControlListSid The unique id of the
- * IpAccessControlList resource that
- * includes this resource.
- * @param string $sid A string that identifies the IpAddress resource to fetch
- * @return \Twilio\Rest\Api\V2010\Account\Sip\IpAccessControlList\IpAddressInstance
+ * @param string $accountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource.
+ * @param string $ipAccessControlListSid The IpAccessControlList Sid with which to associate the created IpAddress resource.
+ * @param string $sid A 34 character string that uniquely identifies the resource to delete.
*/
- public function __construct(Version $version, array $payload, $accountSid, $ipAccessControlListSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $accountSid, string $ipAccessControlListSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
@@ -57,23 +62,18 @@ public function __construct(Version $version, array $payload, $accountSid, $ipAc
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'uri' => Values::array_get($payload, 'uri'),
- );
+ ];
- $this->solution = array(
- 'accountSid' => $accountSid,
- 'ipAccessControlListSid' => $ipAccessControlListSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['accountSid' => $accountSid, 'ipAccessControlListSid' => $ipAccessControlListSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Api\V2010\Account\Sip\IpAccessControlList\IpAddressContext Context for this
- * IpAddressInstance
+ * @return IpAddressContext Context for this IpAddressInstance
*/
- protected function proxy()
+ protected function proxy(): IpAddressContext
{
if (!$this->context) {
$this->context = new IpAddressContext(
@@ -88,37 +88,40 @@ protected function proxy()
}
/**
- * Fetch a IpAddressInstance
+ * Delete the IpAddressInstance
*
- * @return IpAddressInstance Fetched IpAddressInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Update the IpAddressInstance
+ * Fetch the IpAddressInstance
*
- * @param array|Options $options Optional Arguments
- * @return IpAddressInstance Updated IpAddressInstance
+ * @return IpAddressInstance Fetched IpAddressInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): IpAddressInstance
{
- return $this->proxy()->update($options);
+
+ return $this->proxy()->fetch();
}
/**
- * Deletes the IpAddressInstance
+ * Update the IpAddressInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return IpAddressInstance Updated IpAddressInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): IpAddressInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->update($options);
}
/**
@@ -128,7 +131,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -147,12 +150,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.IpAddressInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressList.php
index 50a2db7..e942dbf 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\Sip\IpAccessControlList;
@@ -12,62 +19,77 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class IpAddressList extends ListResource
-{
+ {
/**
* Construct the IpAddressList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The unique id of the Account that is responsible
- * for this resource.
- * @param string $ipAccessControlListSid The unique id of the
- * IpAccessControlList resource that
- * includes this resource.
- * @return \Twilio\Rest\Api\V2010\Account\Sip\IpAccessControlList\IpAddressList
+ * @param string $accountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource.
+ * @param string $ipAccessControlListSid The IpAccessControlList Sid with which to associate the created IpAddress resource.
*/
- public function __construct(Version $version, $accountSid, $ipAccessControlListSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid,
+ string $ipAccessControlListSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array(
- 'accountSid' => $accountSid,
- 'ipAccessControlListSid' => $ipAccessControlListSid,
- );
-
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/IpAccessControlLists/' . \rawurlencode($ipAccessControlListSid) . '/IpAddresses.json';
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ 'ipAccessControlListSid' =>
+ $ipAccessControlListSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/SIP/IpAccessControlLists/' . \rawurlencode($ipAccessControlListSid)
+ .'/IpAddresses.json';
}
/**
- * Streams IpAddressInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the IpAddressInstance
*
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @param string $friendlyName A human readable descriptive text for this resource, up to 255 characters long.
+ * @param string $ipAddress An IP address in dotted decimal notation from which you want to accept traffic. Any SIP requests from this IP address will be allowed by Twilio. IPv4 only supported today.
+ * @param array|Options $options Optional Arguments
+ * @return IpAddressInstance Created IpAddressInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($limit = null, $pageSize = null)
+ public function create(string $friendlyName, string $ipAddress, array $options = []): IpAddressInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'FriendlyName' =>
+ $friendlyName,
+ 'IpAddress' =>
+ $ipAddress,
+ 'CidrPrefixLength' =>
+ $options['cidrPrefixLength'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new IpAddressInstance(
+ $this->version,
+ $payload,
+ $this->solution['accountSid'],
+ $this->solution['ipAccessControlListSid']
+ );
}
+
/**
* Reads IpAddressInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -83,11 +105,38 @@ public function stream($limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return IpAddressInstance[] Array of results
*/
- public function read($limit = null, $pageSize = null)
+ public function read(int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($limit, $pageSize), false);
}
+ /**
+ * Streams IpAddressInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of IpAddressInstance records from the API.
* Request is executed immediately
@@ -95,21 +144,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of IpAddressInstance
+ * @return IpAddressPage Page of IpAddressInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): IpAddressPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new IpAddressPage($this->version, $response, $this->solution);
}
@@ -119,9 +169,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of IpAddressInstance
+ * @return IpAddressPage Page of IpAddressInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): IpAddressPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -131,51 +181,16 @@ public function getPage($targetUrl)
return new IpAddressPage($this->version, $response, $this->solution);
}
- /**
- * Create a new IpAddressInstance
- *
- * @param string $friendlyName A human readable descriptive text for this
- * resource, up to 64 characters long.
- * @param string $ipAddress An IP address in dotted decimal notation from which
- * you want to accept traffic. Any SIP requests from
- * this IP address will be allowed by Twilio. IPv4
- * only supported today.
- * @param array|Options $options Optional Arguments
- * @return IpAddressInstance Newly created IpAddressInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($friendlyName, $ipAddress, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'FriendlyName' => $friendlyName,
- 'IpAddress' => $ipAddress,
- 'CidrPrefixLength' => $options['cidrPrefixLength'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new IpAddressInstance(
- $this->version,
- $payload,
- $this->solution['accountSid'],
- $this->solution['ipAccessControlListSid']
- );
- }
/**
* Constructs a IpAddressContext
*
- * @param string $sid A string that identifies the IpAddress resource to fetch
- * @return \Twilio\Rest\Api\V2010\Account\Sip\IpAccessControlList\IpAddressContext
+ * @param string $sid A 34 character string that uniquely identifies the resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): IpAddressContext
{
return new IpAddressContext(
$this->version,
@@ -190,8 +205,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.IpAddressList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressOptions.php
index d3e7a8d..4976ac3 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressOptions.php
@@ -1,10 +1,16 @@
options['cidrPrefixLength'] = $cidrPrefixLength;
}
/**
* An integer representing the length of the CIDR prefix to use with this IP address when accepting traffic. By default the entire IP address is used.
*
- * @param int $cidrPrefixLength An integer representing the length of the CIDR
- * prefix to use with this IP address when
- * accepting traffic. By default the entire IP
- * address is used.
+ * @param int $cidrPrefixLength An integer representing the length of the CIDR prefix to use with this IP address when accepting traffic. By default the entire IP address is used.
* @return $this Fluent Builder
*/
- public function setCidrPrefixLength($cidrPrefixLength)
+ public function setCidrPrefixLength(int $cidrPrefixLength): self
{
$this->options['cidrPrefixLength'] = $cidrPrefixLength;
return $this;
@@ -78,34 +91,30 @@ public function setCidrPrefixLength($cidrPrefixLength)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.CreateIpAddressOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.CreateIpAddressOptions ' . $options . ']';
}
}
+
+
+
class UpdateIpAddressOptions extends Options
-{
+ {
/**
- * @param string $ipAddress An IP address in dotted decimal notation from which
- * you want to accept traffic. Any SIP requests from
- * this IP address will be allowed by Twilio. IPv4
- * only supported today.
- * @param string $friendlyName A human readable descriptive text for this
- * resource, up to 64 characters long.
- * @param int $cidrPrefixLength An integer representing the length of the CIDR
- * prefix to use with this IP address when
- * accepting traffic. By default the entire IP
- * address is used.
+ * @param string $ipAddress An IP address in dotted decimal notation from which you want to accept traffic. Any SIP requests from this IP address will be allowed by Twilio. IPv4 only supported today.
+ * @param string $friendlyName A human readable descriptive text for this resource, up to 255 characters long.
+ * @param int $cidrPrefixLength An integer representing the length of the CIDR prefix to use with this IP address when accepting traffic. By default the entire IP address is used.
*/
- public function __construct($ipAddress = Values::NONE, $friendlyName = Values::NONE, $cidrPrefixLength = Values::NONE)
- {
+ public function __construct(
+
+ string $ipAddress = Values::NONE,
+ string $friendlyName = Values::NONE,
+ int $cidrPrefixLength = Values::INT_NONE
+
+ ) {
$this->options['ipAddress'] = $ipAddress;
$this->options['friendlyName'] = $friendlyName;
$this->options['cidrPrefixLength'] = $cidrPrefixLength;
@@ -114,26 +123,22 @@ public function __construct($ipAddress = Values::NONE, $friendlyName = Values::N
/**
* An IP address in dotted decimal notation from which you want to accept traffic. Any SIP requests from this IP address will be allowed by Twilio. IPv4 only supported today.
*
- * @param string $ipAddress An IP address in dotted decimal notation from which
- * you want to accept traffic. Any SIP requests from
- * this IP address will be allowed by Twilio. IPv4
- * only supported today.
+ * @param string $ipAddress An IP address in dotted decimal notation from which you want to accept traffic. Any SIP requests from this IP address will be allowed by Twilio. IPv4 only supported today.
* @return $this Fluent Builder
*/
- public function setIpAddress($ipAddress)
+ public function setIpAddress(string $ipAddress): self
{
$this->options['ipAddress'] = $ipAddress;
return $this;
}
/**
- * A human readable descriptive text for this resource, up to 64 characters long.
+ * A human readable descriptive text for this resource, up to 255 characters long.
*
- * @param string $friendlyName A human readable descriptive text for this
- * resource, up to 64 characters long.
+ * @param string $friendlyName A human readable descriptive text for this resource, up to 255 characters long.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -142,13 +147,10 @@ public function setFriendlyName($friendlyName)
/**
* An integer representing the length of the CIDR prefix to use with this IP address when accepting traffic. By default the entire IP address is used.
*
- * @param int $cidrPrefixLength An integer representing the length of the CIDR
- * prefix to use with this IP address when
- * accepting traffic. By default the entire IP
- * address is used.
+ * @param int $cidrPrefixLength An integer representing the length of the CIDR prefix to use with this IP address when accepting traffic. By default the entire IP address is used.
* @return $this Fluent Builder
*/
- public function setCidrPrefixLength($cidrPrefixLength)
+ public function setCidrPrefixLength(int $cidrPrefixLength): self
{
$this->options['cidrPrefixLength'] = $cidrPrefixLength;
return $this;
@@ -159,14 +161,10 @@ public function setCidrPrefixLength($cidrPrefixLength)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.UpdateIpAddressOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.UpdateIpAddressOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressPage.php
index 8fa778f..967fbef 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return IpAddressInstance \Twilio\Rest\Api\V2010\Account\Sip\IpAccessControlList\IpAddressInstance
+ */
+ public function buildInstance(array $payload): IpAddressInstance
{
- return new IpAddressInstance(
- $this->version,
- $payload,
- $this->solution['accountSid'],
- $this->solution['ipAccessControlListSid']
- );
+ return new IpAddressInstance($this->version, $payload, $this->solution['accountSid'], $this->solution['ipAccessControlListSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.IpAddressPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlListContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlListContext.php
index e887113..51939f6 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlListContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlListContext.php
@@ -2,60 +2,89 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Sip;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
-use Twilio\Rest\Api\V2010\Account\Sip\IpAccessControlList\IpAddressList;
+use Twilio\ListResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Api\V2010\Account\Sip\IpAccessControlList\IpAddressList;
+
/**
- * @property \Twilio\Rest\Api\V2010\Account\Sip\IpAccessControlList\IpAddressList $ipAddresses
+ * @property IpAddressList $ipAddresses
* @method \Twilio\Rest\Api\V2010\Account\Sip\IpAccessControlList\IpAddressContext ipAddresses(string $sid)
*/
class IpAccessControlListContext extends InstanceContext
-{
- protected $_ipAddresses = null;
+ {
+ protected $_ipAddresses;
/**
* Initialize the IpAccessControlListContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $accountSid The unique sid that identifies this account
- * @param string $sid A string that identifies the resource to fetch
- * @return \Twilio\Rest\Api\V2010\Account\Sip\IpAccessControlListContext
+ * @param Version $version Version that contains the resource
+ * @param string $accountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource.
+ * @param string $sid A 34 character string that uniquely identifies the resource to delete.
*/
- public function __construct(Version $version, $accountSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $accountSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'sid' => $sid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/SIP/IpAccessControlLists/' . \rawurlencode($sid)
+ .'.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/IpAccessControlLists/' . \rawurlencode($sid) . '.json';
+ /**
+ * Delete the IpAccessControlListInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a IpAccessControlListInstance
+ * Fetch the IpAccessControlListInstance
*
* @return IpAccessControlListInstance Fetched IpAccessControlListInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): IpAccessControlListInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new IpAccessControlListInstance(
$this->version,
@@ -65,23 +94,24 @@ public function fetch()
);
}
+
/**
* Update the IpAccessControlListInstance
*
- * @param string $friendlyName A human readable description of this resource
+ * @param string $friendlyName A human readable descriptive text, up to 255 characters long.
* @return IpAccessControlListInstance Updated IpAccessControlListInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($friendlyName)
+ public function update(string $friendlyName): IpAccessControlListInstance
{
- $data = Values::of(array('FriendlyName' => $friendlyName,));
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'FriendlyName' =>
+ $friendlyName,
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new IpAccessControlListInstance(
$this->version,
@@ -91,23 +121,11 @@ public function update($friendlyName)
);
}
- /**
- * Deletes the IpAccessControlListInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Access the ipAddresses
- *
- * @return \Twilio\Rest\Api\V2010\Account\Sip\IpAccessControlList\IpAddressList
*/
- protected function getIpAddresses()
+ protected function getIpAddresses(): IpAddressList
{
if (!$this->_ipAddresses) {
$this->_ipAddresses = new IpAddressList(
@@ -124,10 +142,10 @@ protected function getIpAddresses()
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -142,10 +160,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -160,12 +178,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.IpAccessControlListContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlListInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlListInstance.php
index 29ba55c..adf7595 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlListInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlListInstance.php
@@ -2,48 +2,56 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Sip;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Api\V2010\Account\Sip\IpAccessControlList\IpAddressList;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $friendlyName
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property array $subresourceUris
- * @property string $uri
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $friendlyName
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property array|null $subresourceUris
+ * @property string|null $uri
*/
class IpAccessControlListInstance extends InstanceResource
{
- protected $_ipAddresses = null;
+ protected $_ipAddresses;
/**
* Initialize the IpAccessControlListInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid A 34 character string that uniquely identifies
- * this resource.
- * @param string $sid A string that identifies the resource to fetch
- * @return \Twilio\Rest\Api\V2010\Account\Sip\IpAccessControlListInstance
+ * @param string $accountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource.
+ * @param string $sid A 34 character string that uniquely identifies the resource to delete.
*/
- public function __construct(Version $version, array $payload, $accountSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $accountSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
@@ -51,18 +59,18 @@ public function __construct(Version $version, array $payload, $accountSid, $sid
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'subresourceUris' => Values::array_get($payload, 'subresource_uris'),
'uri' => Values::array_get($payload, 'uri'),
- );
+ ];
- $this->solution = array('accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Api\V2010\Account\Sip\IpAccessControlListContext Context for this IpAccessControlListInstance
+ * @return IpAccessControlListContext Context for this IpAccessControlListInstance
*/
- protected function proxy()
+ protected function proxy(): IpAccessControlListContext
{
if (!$this->context) {
$this->context = new IpAccessControlListContext(
@@ -76,45 +84,46 @@ protected function proxy()
}
/**
- * Fetch a IpAccessControlListInstance
+ * Delete the IpAccessControlListInstance
*
- * @return IpAccessControlListInstance Fetched IpAccessControlListInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Update the IpAccessControlListInstance
+ * Fetch the IpAccessControlListInstance
*
- * @param string $friendlyName A human readable description of this resource
- * @return IpAccessControlListInstance Updated IpAccessControlListInstance
+ * @return IpAccessControlListInstance Fetched IpAccessControlListInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($friendlyName)
+ public function fetch(): IpAccessControlListInstance
{
- return $this->proxy()->update($friendlyName);
+
+ return $this->proxy()->fetch();
}
/**
- * Deletes the IpAccessControlListInstance
+ * Update the IpAccessControlListInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param string $friendlyName A human readable descriptive text, up to 255 characters long.
+ * @return IpAccessControlListInstance Updated IpAccessControlListInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(string $friendlyName): IpAccessControlListInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->update($friendlyName);
}
/**
* Access the ipAddresses
- *
- * @return \Twilio\Rest\Api\V2010\Account\Sip\IpAccessControlList\IpAddressList
*/
- protected function getIpAddresses()
+ protected function getIpAddresses(): IpAddressList
{
return $this->proxy()->ipAddresses;
}
@@ -126,7 +135,7 @@ protected function getIpAddresses()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -145,12 +154,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.IpAccessControlListInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlListList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlListList.php
index 1568ac2..055bf03 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlListList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlListList.php
@@ -2,66 +2,78 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\Sip;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class IpAccessControlListList extends ListResource
-{
+ {
/**
* Construct the IpAccessControlListList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid A 34 character string that uniquely identifies
- * this resource.
- * @return \Twilio\Rest\Api\V2010\Account\Sip\IpAccessControlListList
+ * @param string $accountSid The unique id of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for this resource.
*/
- public function __construct(Version $version, $accountSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid,);
-
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/SIP/IpAccessControlLists.json';
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/SIP/IpAccessControlLists.json';
}
/**
- * Streams IpAccessControlListInstance records from the API as a generator
- * stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the IpAccessControlListInstance
*
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @param string $friendlyName A human readable descriptive text that describes the IpAccessControlList, up to 255 characters long.
+ * @return IpAccessControlListInstance Created IpAccessControlListInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($limit = null, $pageSize = null)
+ public function create(string $friendlyName): IpAccessControlListInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($limits['pageSize']);
+ $data = Values::of([
+ 'FriendlyName' =>
+ $friendlyName,
+ ]);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new IpAccessControlListInstance(
+ $this->version,
+ $payload,
+ $this->solution['accountSid']
+ );
}
+
/**
* Reads IpAccessControlListInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -77,11 +89,38 @@ public function stream($limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return IpAccessControlListInstance[] Array of results
*/
- public function read($limit = null, $pageSize = null)
+ public function read(int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($limit, $pageSize), false);
}
+ /**
+ * Streams IpAccessControlListInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of IpAccessControlListInstance records from the API.
* Request is executed immediately
@@ -89,21 +128,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of IpAccessControlListInstance
+ * @return IpAccessControlListPage Page of IpAccessControlListInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): IpAccessControlListPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new IpAccessControlListPage($this->version, $response, $this->solution);
}
@@ -113,9 +153,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of IpAccessControlListInstance
+ * @return IpAccessControlListPage Page of IpAccessControlListInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): IpAccessControlListPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -125,36 +165,22 @@ public function getPage($targetUrl)
return new IpAccessControlListPage($this->version, $response, $this->solution);
}
- /**
- * Create a new IpAccessControlListInstance
- *
- * @param string $friendlyName A human readable description of this resource
- * @return IpAccessControlListInstance Newly created IpAccessControlListInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($friendlyName)
- {
- $data = Values::of(array('FriendlyName' => $friendlyName,));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new IpAccessControlListInstance($this->version, $payload, $this->solution['accountSid']);
- }
/**
* Constructs a IpAccessControlListContext
*
- * @param string $sid A string that identifies the resource to fetch
- * @return \Twilio\Rest\Api\V2010\Account\Sip\IpAccessControlListContext
+ * @param string $sid A 34 character string that uniquely identifies the resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): IpAccessControlListContext
{
- return new IpAccessControlListContext($this->version, $this->solution['accountSid'], $sid);
+ return new IpAccessControlListContext(
+ $this->version,
+ $this->solution['accountSid'],
+ $sid
+ );
}
/**
@@ -162,8 +188,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.IpAccessControlListList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlListPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlListPage.php
index 6c2aed6..179a8f5 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlListPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlListPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return IpAccessControlListInstance \Twilio\Rest\Api\V2010\Account\Sip\IpAccessControlListInstance
+ */
+ public function buildInstance(array $payload): IpAccessControlListInstance
{
return new IpAccessControlListInstance($this->version, $payload, $this->solution['accountSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.IpAccessControlListPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/SipInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/SipInstance.php
index 7be5646..df74a4b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/SipInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/SipInstance.php
@@ -2,34 +2,40 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
-use Twilio\Values;
use Twilio\Version;
+
class SipInstance extends InstanceResource
{
/**
* Initialize the SipInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid A 34 character string that uniquely identifies
- * this resource.
- * @return \Twilio\Rest\Api\V2010\Account\SipInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the SipDomain resources to read.
*/
- public function __construct(Version $version, array $payload, $accountSid)
+ public function __construct(Version $version, array $payload, string $accountSid)
{
parent::__construct($version);
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = ['accountSid' => $accountSid, ];
}
/**
@@ -39,7 +45,7 @@ public function __construct(Version $version, array $payload, $accountSid)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -58,8 +64,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.SipInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/SipList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/SipList.php
index 55a3afa..34f5420 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/SipList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/SipList.php
@@ -2,87 +2,103 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
-use Twilio\Rest\Api\V2010\Account\Sip\CredentialListList;
+use Twilio\Version;
+use Twilio\InstanceContext;
use Twilio\Rest\Api\V2010\Account\Sip\DomainList;
+use Twilio\Rest\Api\V2010\Account\Sip\CredentialListList;
use Twilio\Rest\Api\V2010\Account\Sip\IpAccessControlListList;
-use Twilio\Version;
+
/**
- * @property \Twilio\Rest\Api\V2010\Account\Sip\DomainList $domains
- * @property \Twilio\Rest\Api\V2010\Account\Sip\IpAccessControlListList $ipAccessControlLists
- * @property \Twilio\Rest\Api\V2010\Account\Sip\CredentialListList $credentialLists
+ * @property DomainList $domains
+ * @property CredentialListList $credentialLists
+ * @property IpAccessControlListList $ipAccessControlLists
* @method \Twilio\Rest\Api\V2010\Account\Sip\DomainContext domains(string $sid)
- * @method \Twilio\Rest\Api\V2010\Account\Sip\IpAccessControlListContext ipAccessControlLists(string $sid)
* @method \Twilio\Rest\Api\V2010\Account\Sip\CredentialListContext credentialLists(string $sid)
+ * @method \Twilio\Rest\Api\V2010\Account\Sip\IpAccessControlListContext ipAccessControlLists(string $sid)
*/
class SipList extends ListResource
-{
+ {
protected $_domains = null;
- protected $_ipAccessControlLists = null;
protected $_credentialLists = null;
+ protected $_ipAccessControlLists = null;
/**
* Construct the SipList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid A 34 character string that uniquely identifies
- * this resource.
- * @return \Twilio\Rest\Api\V2010\Account\SipList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the SipDomain resources to read.
*/
- public function __construct(Version $version, $accountSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ ];
}
/**
* Access the domains
*/
- protected function getDomains()
+ protected function getDomains(): DomainList
{
if (!$this->_domains) {
- $this->_domains = new DomainList($this->version, $this->solution['accountSid']);
+ $this->_domains = new DomainList(
+ $this->version,
+ $this->solution['accountSid']
+ );
}
-
return $this->_domains;
}
/**
- * Access the ipAccessControlLists
+ * Access the credentialLists
*/
- protected function getIpAccessControlLists()
+ protected function getCredentialLists(): CredentialListList
{
- if (!$this->_ipAccessControlLists) {
- $this->_ipAccessControlLists = new IpAccessControlListList(
+ if (!$this->_credentialLists) {
+ $this->_credentialLists = new CredentialListList(
$this->version,
$this->solution['accountSid']
);
}
-
- return $this->_ipAccessControlLists;
+ return $this->_credentialLists;
}
/**
- * Access the credentialLists
+ * Access the ipAccessControlLists
*/
- protected function getCredentialLists()
+ protected function getIpAccessControlLists(): IpAccessControlListList
{
- if (!$this->_credentialLists) {
- $this->_credentialLists = new CredentialListList($this->version, $this->solution['accountSid']);
+ if (!$this->_ipAccessControlLists) {
+ $this->_ipAccessControlLists = new IpAccessControlListList(
+ $this->version,
+ $this->solution['accountSid']
+ );
}
-
- return $this->_credentialLists;
+ return $this->_ipAccessControlLists;
}
/**
@@ -92,7 +108,7 @@ protected function getCredentialLists()
* @return \Twilio\ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -107,10 +123,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -125,8 +141,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.SipList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/SipPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/SipPage.php
index 96f61f1..46d0a2f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/SipPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/SipPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return SipInstance \Twilio\Rest\Api\V2010\Account\SipInstance
+ */
+ public function buildInstance(array $payload): SipInstance
{
return new SipInstance($this->version, $payload, $this->solution['accountSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.SipPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/TokenInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/TokenInstance.php
index 5f26029..3f3e405 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/TokenInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/TokenInstance.php
@@ -2,44 +2,52 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $iceServers
- * @property string $password
- * @property string $ttl
- * @property string $username
+ * @property string|null $accountSid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string[]|null $iceServers
+ * @property string|null $password
+ * @property string|null $ttl
+ * @property string|null $username
*/
class TokenInstance extends InstanceResource
{
/**
* Initialize the TokenInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The SID of the Account that created the resource
- * @return \Twilio\Rest\Api\V2010\Account\TokenInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
*/
- public function __construct(Version $version, array $payload, $accountSid)
+ public function __construct(Version $version, array $payload, string $accountSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
@@ -47,9 +55,9 @@ public function __construct(Version $version, array $payload, $accountSid)
'password' => Values::array_get($payload, 'password'),
'ttl' => Values::array_get($payload, 'ttl'),
'username' => Values::array_get($payload, 'username'),
- );
+ ];
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = ['accountSid' => $accountSid, ];
}
/**
@@ -59,7 +67,7 @@ public function __construct(Version $version, array $payload, $accountSid)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -78,8 +86,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.TokenInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/TokenList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/TokenList.php
index 6e3d201..c7d317c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/TokenList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/TokenList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account;
@@ -15,55 +22,67 @@
use Twilio\Values;
use Twilio\Version;
+
class TokenList extends ListResource
-{
+ {
/**
* Construct the TokenList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * @return \Twilio\Rest\Api\V2010\Account\TokenList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
*/
- public function __construct(Version $version, $accountSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ ];
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Tokens.json';
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Tokens.json';
}
/**
- * Create a new TokenInstance
+ * Create the TokenInstance
*
* @param array|Options $options Optional Arguments
- * @return TokenInstance Newly created TokenInstance
+ * @return TokenInstance Created TokenInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($options = array())
+ public function create(array $options = []): TokenInstance
{
+
$options = new Values($options);
- $data = Values::of(array('Ttl' => $options['ttl'],));
+ $data = Values::of([
+ 'Ttl' =>
+ $options['ttl'],
+ ]);
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
- return new TokenInstance($this->version, $payload, $this->solution['accountSid']);
+ return new TokenInstance(
+ $this->version,
+ $payload,
+ $this->solution['accountSid']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.TokenList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/TokenOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/TokenOptions.php
index 17c3792..721fcc6 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/TokenOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/TokenOptions.php
@@ -1,10 +1,16 @@
options['ttl'] = $ttl;
}
/**
* The duration in seconds for which the generated credentials are valid. The default value is 86400 (24 hours).
*
- * @param int $ttl The duration in seconds the credentials are valid
+ * @param int $ttl The duration in seconds for which the generated credentials are valid. The default value is 86400 (24 hours).
* @return $this Fluent Builder
*/
- public function setTtl($ttl)
+ public function setTtl(int $ttl): self
{
$this->options['ttl'] = $ttl;
return $this;
@@ -51,14 +67,10 @@ public function setTtl($ttl)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.CreateTokenOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.CreateTokenOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/TokenPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/TokenPage.php
index d5e5f26..de82289 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/TokenPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/TokenPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return TokenInstance \Twilio\Rest\Api\V2010\Account\TokenInstance
+ */
+ public function buildInstance(array $payload): TokenInstance
{
return new TokenInstance($this->version, $payload, $this->solution['accountSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.TokenPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/TranscriptionContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/TranscriptionContext.php
index 5ddfbb4..6218784 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/TranscriptionContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/TranscriptionContext.php
@@ -2,54 +2,81 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class TranscriptionContext extends InstanceContext
-{
+ {
/**
* Initialize the TranscriptionContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * to fetch
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\TranscriptionContext
+ * @param Version $version Version that contains the resource
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resources to delete.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Transcription resource to delete.
*/
- public function __construct(Version $version, $accountSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $accountSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'sid' => $sid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Transcriptions/' . \rawurlencode($sid)
+ .'.json';
+ }
+
+ /**
+ * Delete the TranscriptionInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Transcriptions/' . \rawurlencode($sid) . '.json';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a TranscriptionInstance
+ * Fetch the TranscriptionInstance
*
* @return TranscriptionInstance Fetched TranscriptionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): TranscriptionInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new TranscriptionInstance(
$this->version,
@@ -59,28 +86,18 @@ public function fetch()
);
}
- /**
- * Deletes the TranscriptionInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.TranscriptionContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/TranscriptionInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/TranscriptionInstance.php
index f5166fa..8216a8e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/TranscriptionInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/TranscriptionInstance.php
@@ -2,51 +2,59 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property string $apiVersion
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $duration
- * @property string $price
- * @property string $priceUnit
- * @property string $recordingSid
- * @property string $sid
+ * @property string|null $accountSid
+ * @property string|null $apiVersion
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $duration
+ * @property string|null $price
+ * @property string|null $priceUnit
+ * @property string|null $recordingSid
+ * @property string|null $sid
* @property string $status
- * @property string $transcriptionText
- * @property string $type
- * @property string $uri
+ * @property string|null $transcriptionText
+ * @property string|null $type
+ * @property string|null $uri
*/
class TranscriptionInstance extends InstanceResource
{
/**
* Initialize the TranscriptionInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The SID of the Account that created the resource
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\TranscriptionInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resources to delete.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Transcription resource to delete.
*/
- public function __construct(Version $version, array $payload, $accountSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $accountSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'apiVersion' => Values::array_get($payload, 'api_version'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
@@ -60,19 +68,18 @@ public function __construct(Version $version, array $payload, $accountSid, $sid
'transcriptionText' => Values::array_get($payload, 'transcription_text'),
'type' => Values::array_get($payload, 'type'),
'uri' => Values::array_get($payload, 'uri'),
- );
+ ];
- $this->solution = array('accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Api\V2010\Account\TranscriptionContext Context for this
- * TranscriptionInstance
+ * @return TranscriptionContext Context for this TranscriptionInstance
*/
- protected function proxy()
+ protected function proxy(): TranscriptionContext
{
if (!$this->context) {
$this->context = new TranscriptionContext(
@@ -86,25 +93,27 @@ protected function proxy()
}
/**
- * Fetch a TranscriptionInstance
+ * Delete the TranscriptionInstance
*
- * @return TranscriptionInstance Fetched TranscriptionInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the TranscriptionInstance
+ * Fetch the TranscriptionInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return TranscriptionInstance Fetched TranscriptionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): TranscriptionInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -114,7 +123,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -133,12 +142,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.TranscriptionInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/TranscriptionList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/TranscriptionList.php
index 59fb80e..03dd6c0 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/TranscriptionList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/TranscriptionList.php
@@ -2,34 +2,69 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class TranscriptionList extends ListResource
-{
+ {
/**
* Construct the TranscriptionList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * @return \Twilio\Rest\Api\V2010\Account\TranscriptionList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Transcription resources to delete.
*/
- public function __construct(Version $version, $accountSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Transcriptions.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Transcriptions.json';
+ /**
+ * Reads TranscriptionInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return TranscriptionInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -48,9 +83,9 @@ public function __construct(Version $version, $accountSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -59,26 +94,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads TranscriptionInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return TranscriptionInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of TranscriptionInstance records from the API.
* Request is executed immediately
@@ -86,21 +101,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of TranscriptionInstance
+ * @return TranscriptionPage Page of TranscriptionInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): TranscriptionPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new TranscriptionPage($this->version, $response, $this->solution);
}
@@ -110,9 +126,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of TranscriptionInstance
+ * @return TranscriptionPage Page of TranscriptionInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): TranscriptionPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -122,15 +138,22 @@ public function getPage($targetUrl)
return new TranscriptionPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a TranscriptionContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\TranscriptionContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the Transcription resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): TranscriptionContext
{
- return new TranscriptionContext($this->version, $this->solution['accountSid'], $sid);
+ return new TranscriptionContext(
+ $this->version,
+ $this->solution['accountSid'],
+ $sid
+ );
}
/**
@@ -138,8 +161,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.TranscriptionList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/TranscriptionPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/TranscriptionPage.php
index e0b4112..230ac30 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/TranscriptionPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/TranscriptionPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return TranscriptionInstance \Twilio\Rest\Api\V2010\Account\TranscriptionInstance
+ */
+ public function buildInstance(array $payload): TranscriptionInstance
{
return new TranscriptionInstance($this->version, $payload, $this->solution['accountSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.TranscriptionPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/AllTimeInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/AllTimeInstance.php
index 21ab9c1..d42ce6a 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/AllTimeInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/AllTimeInstance.php
@@ -2,53 +2,60 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Usage\Record;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property string $apiVersion
- * @property string $asOf
+ * @property string|null $accountSid
+ * @property string|null $apiVersion
+ * @property string|null $asOf
* @property string $category
- * @property string $count
- * @property string $countUnit
- * @property string $description
- * @property \DateTime $endDate
- * @property string $price
- * @property string $priceUnit
- * @property \DateTime $startDate
- * @property array $subresourceUris
- * @property string $uri
- * @property string $usage
- * @property string $usageUnit
+ * @property string|null $count
+ * @property string|null $countUnit
+ * @property string|null $description
+ * @property \DateTime|null $endDate
+ * @property string|null $price
+ * @property string|null $priceUnit
+ * @property \DateTime|null $startDate
+ * @property array|null $subresourceUris
+ * @property string|null $uri
+ * @property string|null $usage
+ * @property string|null $usageUnit
*/
class AllTimeInstance extends InstanceResource
{
/**
* Initialize the AllTimeInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid A 34 character string that uniquely identifies
- * this resource.
- * @return \Twilio\Rest\Api\V2010\Account\Usage\Record\AllTimeInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read.
*/
- public function __construct(Version $version, array $payload, $accountSid)
+ public function __construct(Version $version, array $payload, string $accountSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'apiVersion' => Values::array_get($payload, 'api_version'),
'asOf' => Values::array_get($payload, 'as_of'),
@@ -64,9 +71,9 @@ public function __construct(Version $version, array $payload, $accountSid)
'uri' => Values::array_get($payload, 'uri'),
'usage' => Values::array_get($payload, 'usage'),
'usageUnit' => Values::array_get($payload, 'usage_unit'),
- );
+ ];
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = ['accountSid' => $accountSid, ];
}
/**
@@ -76,7 +83,7 @@ public function __construct(Version $version, array $payload, $accountSid)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -95,8 +102,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.AllTimeInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/AllTimeList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/AllTimeList.php
index 9918b8b..002d9d4 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/AllTimeList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/AllTimeList.php
@@ -2,37 +2,72 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\Usage\Record;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class AllTimeList extends ListResource
-{
+ {
/**
* Construct the AllTimeList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid A 34 character string that uniquely identifies
- * this resource.
- * @return \Twilio\Rest\Api\V2010\Account\Usage\Record\AllTimeList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read.
*/
- public function __construct(Version $version, $accountSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Usage/Records/AllTime.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Usage/Records/AllTime.json';
+ /**
+ * Reads AllTimeInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return AllTimeInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -52,9 +87,9 @@ public function __construct(Version $version, $accountSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -63,55 +98,39 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads AllTimeInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return AllTimeInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of AllTimeInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of AllTimeInstance
+ * @return AllTimePage Page of AllTimeInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): AllTimePage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Category' => $options['category'],
- 'StartDate' => Serialize::iso8601Date($options['startDate']),
- 'EndDate' => Serialize::iso8601Date($options['endDate']),
- 'IncludeSubaccounts' => Serialize::booleanToString($options['includeSubaccounts']),
+
+ $params = Values::of([
+ 'Category' =>
+ $options['category'],
+ 'StartDate' =>
+ Serialize::iso8601Date($options['startDate']),
+ 'EndDate' =>
+ Serialize::iso8601Date($options['endDate']),
+ 'IncludeSubaccounts' =>
+ Serialize::booleanToString($options['includeSubaccounts']),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new AllTimePage($this->version, $response, $this->solution);
}
@@ -121,9 +140,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of AllTimeInstance
+ * @return AllTimePage Page of AllTimeInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): AllTimePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -133,13 +152,14 @@ public function getPage($targetUrl)
return new AllTimePage($this->version, $response, $this->solution);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.AllTimeList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/AllTimeOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/AllTimeOptions.php
index a9931c5..db8d2d8 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/AllTimeOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/AllTimeOptions.php
@@ -1,10 +1,16 @@
options['category'] = $category;
$this->options['startDate'] = $startDate;
$this->options['endDate'] = $endDate;
@@ -54,11 +71,10 @@ public function __construct($category = Values::NONE, $startDate = Values::NONE,
/**
* The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved.
*
- * @param string $category The usage category of the UsageRecord resources to
- * read
+ * @param string $category The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved.
* @return $this Fluent Builder
*/
- public function setCategory($category)
+ public function setCategory(string $category): self
{
$this->options['category'] = $category;
return $this;
@@ -67,11 +83,10 @@ public function setCategory($category)
/**
* Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date.
*
- * @param \DateTime $startDate Only include usage that has occurred on or after
- * this date
+ * @param \DateTime $startDate Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date.
* @return $this Fluent Builder
*/
- public function setStartDate($startDate)
+ public function setStartDate(\DateTime $startDate): self
{
$this->options['startDate'] = $startDate;
return $this;
@@ -80,11 +95,10 @@ public function setStartDate($startDate)
/**
* Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date.
*
- * @param \DateTime $endDate Only include usage that occurred on or before this
- * date
+ * @param \DateTime $endDate Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date.
* @return $this Fluent Builder
*/
- public function setEndDate($endDate)
+ public function setEndDate(\DateTime $endDate): self
{
$this->options['endDate'] = $endDate;
return $this;
@@ -93,11 +107,10 @@ public function setEndDate($endDate)
/**
* Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account.
*
- * @param bool $includeSubaccounts Whether to include usage from the master
- * account and all its subaccounts
+ * @param bool $includeSubaccounts Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account.
* @return $this Fluent Builder
*/
- public function setIncludeSubaccounts($includeSubaccounts)
+ public function setIncludeSubaccounts(bool $includeSubaccounts): self
{
$this->options['includeSubaccounts'] = $includeSubaccounts;
return $this;
@@ -108,14 +121,10 @@ public function setIncludeSubaccounts($includeSubaccounts)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.ReadAllTimeOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.ReadAllTimeOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/AllTimePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/AllTimePage.php
index 6c2592d..2db6128 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/AllTimePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/AllTimePage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return AllTimeInstance \Twilio\Rest\Api\V2010\Account\Usage\Record\AllTimeInstance
+ */
+ public function buildInstance(array $payload): AllTimeInstance
{
return new AllTimeInstance($this->version, $payload, $this->solution['accountSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.AllTimePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/DailyInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/DailyInstance.php
index e4b9b50..dfce917 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/DailyInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/DailyInstance.php
@@ -2,53 +2,60 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Usage\Record;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property string $apiVersion
- * @property string $asOf
+ * @property string|null $accountSid
+ * @property string|null $apiVersion
+ * @property string|null $asOf
* @property string $category
- * @property string $count
- * @property string $countUnit
- * @property string $description
- * @property \DateTime $endDate
- * @property string $price
- * @property string $priceUnit
- * @property \DateTime $startDate
- * @property array $subresourceUris
- * @property string $uri
- * @property string $usage
- * @property string $usageUnit
+ * @property string|null $count
+ * @property string|null $countUnit
+ * @property string|null $description
+ * @property \DateTime|null $endDate
+ * @property string|null $price
+ * @property string|null $priceUnit
+ * @property \DateTime|null $startDate
+ * @property array|null $subresourceUris
+ * @property string|null $uri
+ * @property string|null $usage
+ * @property string|null $usageUnit
*/
class DailyInstance extends InstanceResource
{
/**
* Initialize the DailyInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid A 34 character string that uniquely identifies
- * this resource.
- * @return \Twilio\Rest\Api\V2010\Account\Usage\Record\DailyInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read.
*/
- public function __construct(Version $version, array $payload, $accountSid)
+ public function __construct(Version $version, array $payload, string $accountSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'apiVersion' => Values::array_get($payload, 'api_version'),
'asOf' => Values::array_get($payload, 'as_of'),
@@ -64,9 +71,9 @@ public function __construct(Version $version, array $payload, $accountSid)
'uri' => Values::array_get($payload, 'uri'),
'usage' => Values::array_get($payload, 'usage'),
'usageUnit' => Values::array_get($payload, 'usage_unit'),
- );
+ ];
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = ['accountSid' => $accountSid, ];
}
/**
@@ -76,7 +83,7 @@ public function __construct(Version $version, array $payload, $accountSid)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -95,8 +102,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.DailyInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/DailyList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/DailyList.php
index 9bb823b..b86347d 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/DailyList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/DailyList.php
@@ -2,37 +2,72 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\Usage\Record;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class DailyList extends ListResource
-{
+ {
/**
* Construct the DailyList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid A 34 character string that uniquely identifies
- * this resource.
- * @return \Twilio\Rest\Api\V2010\Account\Usage\Record\DailyList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read.
*/
- public function __construct(Version $version, $accountSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Usage/Records/Daily.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Usage/Records/Daily.json';
+ /**
+ * Reads DailyInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return DailyInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -52,9 +87,9 @@ public function __construct(Version $version, $accountSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -63,55 +98,39 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads DailyInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return DailyInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of DailyInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of DailyInstance
+ * @return DailyPage Page of DailyInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): DailyPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Category' => $options['category'],
- 'StartDate' => Serialize::iso8601Date($options['startDate']),
- 'EndDate' => Serialize::iso8601Date($options['endDate']),
- 'IncludeSubaccounts' => Serialize::booleanToString($options['includeSubaccounts']),
+
+ $params = Values::of([
+ 'Category' =>
+ $options['category'],
+ 'StartDate' =>
+ Serialize::iso8601Date($options['startDate']),
+ 'EndDate' =>
+ Serialize::iso8601Date($options['endDate']),
+ 'IncludeSubaccounts' =>
+ Serialize::booleanToString($options['includeSubaccounts']),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new DailyPage($this->version, $response, $this->solution);
}
@@ -121,9 +140,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of DailyInstance
+ * @return DailyPage Page of DailyInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): DailyPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -133,13 +152,14 @@ public function getPage($targetUrl)
return new DailyPage($this->version, $response, $this->solution);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.DailyList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/DailyOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/DailyOptions.php
index c584d9a..75a7cc7 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/DailyOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/DailyOptions.php
@@ -1,10 +1,16 @@
options['category'] = $category;
$this->options['startDate'] = $startDate;
$this->options['endDate'] = $endDate;
@@ -54,11 +71,10 @@ public function __construct($category = Values::NONE, $startDate = Values::NONE,
/**
* The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved.
*
- * @param string $category The usage category of the UsageRecord resources to
- * read
+ * @param string $category The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved.
* @return $this Fluent Builder
*/
- public function setCategory($category)
+ public function setCategory(string $category): self
{
$this->options['category'] = $category;
return $this;
@@ -67,11 +83,10 @@ public function setCategory($category)
/**
* Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date.
*
- * @param \DateTime $startDate Only include usage that has occurred on or after
- * this date
+ * @param \DateTime $startDate Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date.
* @return $this Fluent Builder
*/
- public function setStartDate($startDate)
+ public function setStartDate(\DateTime $startDate): self
{
$this->options['startDate'] = $startDate;
return $this;
@@ -80,11 +95,10 @@ public function setStartDate($startDate)
/**
* Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date.
*
- * @param \DateTime $endDate Only include usage that occurred on or before this
- * date
+ * @param \DateTime $endDate Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date.
* @return $this Fluent Builder
*/
- public function setEndDate($endDate)
+ public function setEndDate(\DateTime $endDate): self
{
$this->options['endDate'] = $endDate;
return $this;
@@ -93,11 +107,10 @@ public function setEndDate($endDate)
/**
* Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account.
*
- * @param bool $includeSubaccounts Whether to include usage from the master
- * account and all its subaccounts
+ * @param bool $includeSubaccounts Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account.
* @return $this Fluent Builder
*/
- public function setIncludeSubaccounts($includeSubaccounts)
+ public function setIncludeSubaccounts(bool $includeSubaccounts): self
{
$this->options['includeSubaccounts'] = $includeSubaccounts;
return $this;
@@ -108,14 +121,10 @@ public function setIncludeSubaccounts($includeSubaccounts)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.ReadDailyOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.ReadDailyOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/DailyPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/DailyPage.php
index cd5b4c2..35ce1ae 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/DailyPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/DailyPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return DailyInstance \Twilio\Rest\Api\V2010\Account\Usage\Record\DailyInstance
+ */
+ public function buildInstance(array $payload): DailyInstance
{
return new DailyInstance($this->version, $payload, $this->solution['accountSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.DailyPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/LastMonthInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/LastMonthInstance.php
index 6af5ab9..2ae1d01 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/LastMonthInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/LastMonthInstance.php
@@ -2,53 +2,60 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Usage\Record;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property string $apiVersion
- * @property string $asOf
+ * @property string|null $accountSid
+ * @property string|null $apiVersion
+ * @property string|null $asOf
* @property string $category
- * @property string $count
- * @property string $countUnit
- * @property string $description
- * @property \DateTime $endDate
- * @property string $price
- * @property string $priceUnit
- * @property \DateTime $startDate
- * @property array $subresourceUris
- * @property string $uri
- * @property string $usage
- * @property string $usageUnit
+ * @property string|null $count
+ * @property string|null $countUnit
+ * @property string|null $description
+ * @property \DateTime|null $endDate
+ * @property string|null $price
+ * @property string|null $priceUnit
+ * @property \DateTime|null $startDate
+ * @property array|null $subresourceUris
+ * @property string|null $uri
+ * @property string|null $usage
+ * @property string|null $usageUnit
*/
class LastMonthInstance extends InstanceResource
{
/**
* Initialize the LastMonthInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid A 34 character string that uniquely identifies
- * this resource.
- * @return \Twilio\Rest\Api\V2010\Account\Usage\Record\LastMonthInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read.
*/
- public function __construct(Version $version, array $payload, $accountSid)
+ public function __construct(Version $version, array $payload, string $accountSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'apiVersion' => Values::array_get($payload, 'api_version'),
'asOf' => Values::array_get($payload, 'as_of'),
@@ -64,9 +71,9 @@ public function __construct(Version $version, array $payload, $accountSid)
'uri' => Values::array_get($payload, 'uri'),
'usage' => Values::array_get($payload, 'usage'),
'usageUnit' => Values::array_get($payload, 'usage_unit'),
- );
+ ];
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = ['accountSid' => $accountSid, ];
}
/**
@@ -76,7 +83,7 @@ public function __construct(Version $version, array $payload, $accountSid)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -95,8 +102,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.LastMonthInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/LastMonthList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/LastMonthList.php
index ad03518..af429f6 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/LastMonthList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/LastMonthList.php
@@ -2,37 +2,72 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\Usage\Record;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class LastMonthList extends ListResource
-{
+ {
/**
* Construct the LastMonthList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid A 34 character string that uniquely identifies
- * this resource.
- * @return \Twilio\Rest\Api\V2010\Account\Usage\Record\LastMonthList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read.
*/
- public function __construct(Version $version, $accountSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Usage/Records/LastMonth.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Usage/Records/LastMonth.json';
+ /**
+ * Reads LastMonthInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return LastMonthInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -52,9 +87,9 @@ public function __construct(Version $version, $accountSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -63,55 +98,39 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads LastMonthInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return LastMonthInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of LastMonthInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of LastMonthInstance
+ * @return LastMonthPage Page of LastMonthInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): LastMonthPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Category' => $options['category'],
- 'StartDate' => Serialize::iso8601Date($options['startDate']),
- 'EndDate' => Serialize::iso8601Date($options['endDate']),
- 'IncludeSubaccounts' => Serialize::booleanToString($options['includeSubaccounts']),
+
+ $params = Values::of([
+ 'Category' =>
+ $options['category'],
+ 'StartDate' =>
+ Serialize::iso8601Date($options['startDate']),
+ 'EndDate' =>
+ Serialize::iso8601Date($options['endDate']),
+ 'IncludeSubaccounts' =>
+ Serialize::booleanToString($options['includeSubaccounts']),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new LastMonthPage($this->version, $response, $this->solution);
}
@@ -121,9 +140,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of LastMonthInstance
+ * @return LastMonthPage Page of LastMonthInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): LastMonthPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -133,13 +152,14 @@ public function getPage($targetUrl)
return new LastMonthPage($this->version, $response, $this->solution);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.LastMonthList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/LastMonthOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/LastMonthOptions.php
index ca8a8e8..cd67a32 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/LastMonthOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/LastMonthOptions.php
@@ -1,10 +1,16 @@
options['category'] = $category;
$this->options['startDate'] = $startDate;
$this->options['endDate'] = $endDate;
@@ -54,11 +71,10 @@ public function __construct($category = Values::NONE, $startDate = Values::NONE,
/**
* The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved.
*
- * @param string $category The usage category of the UsageRecord resources to
- * read
+ * @param string $category The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved.
* @return $this Fluent Builder
*/
- public function setCategory($category)
+ public function setCategory(string $category): self
{
$this->options['category'] = $category;
return $this;
@@ -67,11 +83,10 @@ public function setCategory($category)
/**
* Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date.
*
- * @param \DateTime $startDate Only include usage that has occurred on or after
- * this date
+ * @param \DateTime $startDate Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date.
* @return $this Fluent Builder
*/
- public function setStartDate($startDate)
+ public function setStartDate(\DateTime $startDate): self
{
$this->options['startDate'] = $startDate;
return $this;
@@ -80,11 +95,10 @@ public function setStartDate($startDate)
/**
* Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date.
*
- * @param \DateTime $endDate Only include usage that occurred on or before this
- * date
+ * @param \DateTime $endDate Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date.
* @return $this Fluent Builder
*/
- public function setEndDate($endDate)
+ public function setEndDate(\DateTime $endDate): self
{
$this->options['endDate'] = $endDate;
return $this;
@@ -93,11 +107,10 @@ public function setEndDate($endDate)
/**
* Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account.
*
- * @param bool $includeSubaccounts Whether to include usage from the master
- * account and all its subaccounts
+ * @param bool $includeSubaccounts Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account.
* @return $this Fluent Builder
*/
- public function setIncludeSubaccounts($includeSubaccounts)
+ public function setIncludeSubaccounts(bool $includeSubaccounts): self
{
$this->options['includeSubaccounts'] = $includeSubaccounts;
return $this;
@@ -108,14 +121,10 @@ public function setIncludeSubaccounts($includeSubaccounts)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.ReadLastMonthOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.ReadLastMonthOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/LastMonthPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/LastMonthPage.php
index 68418f6..ade76ae 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/LastMonthPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/LastMonthPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return LastMonthInstance \Twilio\Rest\Api\V2010\Account\Usage\Record\LastMonthInstance
+ */
+ public function buildInstance(array $payload): LastMonthInstance
{
return new LastMonthInstance($this->version, $payload, $this->solution['accountSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.LastMonthPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/MonthlyInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/MonthlyInstance.php
index dd8fa1d..dbfd60c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/MonthlyInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/MonthlyInstance.php
@@ -2,53 +2,60 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Usage\Record;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property string $apiVersion
- * @property string $asOf
+ * @property string|null $accountSid
+ * @property string|null $apiVersion
+ * @property string|null $asOf
* @property string $category
- * @property string $count
- * @property string $countUnit
- * @property string $description
- * @property \DateTime $endDate
- * @property string $price
- * @property string $priceUnit
- * @property \DateTime $startDate
- * @property array $subresourceUris
- * @property string $uri
- * @property string $usage
- * @property string $usageUnit
+ * @property string|null $count
+ * @property string|null $countUnit
+ * @property string|null $description
+ * @property \DateTime|null $endDate
+ * @property string|null $price
+ * @property string|null $priceUnit
+ * @property \DateTime|null $startDate
+ * @property array|null $subresourceUris
+ * @property string|null $uri
+ * @property string|null $usage
+ * @property string|null $usageUnit
*/
class MonthlyInstance extends InstanceResource
{
/**
* Initialize the MonthlyInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid A 34 character string that uniquely identifies
- * this resource.
- * @return \Twilio\Rest\Api\V2010\Account\Usage\Record\MonthlyInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read.
*/
- public function __construct(Version $version, array $payload, $accountSid)
+ public function __construct(Version $version, array $payload, string $accountSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'apiVersion' => Values::array_get($payload, 'api_version'),
'asOf' => Values::array_get($payload, 'as_of'),
@@ -64,9 +71,9 @@ public function __construct(Version $version, array $payload, $accountSid)
'uri' => Values::array_get($payload, 'uri'),
'usage' => Values::array_get($payload, 'usage'),
'usageUnit' => Values::array_get($payload, 'usage_unit'),
- );
+ ];
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = ['accountSid' => $accountSid, ];
}
/**
@@ -76,7 +83,7 @@ public function __construct(Version $version, array $payload, $accountSid)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -95,8 +102,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.MonthlyInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/MonthlyList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/MonthlyList.php
index f18bccb..c6f35db 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/MonthlyList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/MonthlyList.php
@@ -2,37 +2,72 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\Usage\Record;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class MonthlyList extends ListResource
-{
+ {
/**
* Construct the MonthlyList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid A 34 character string that uniquely identifies
- * this resource.
- * @return \Twilio\Rest\Api\V2010\Account\Usage\Record\MonthlyList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read.
*/
- public function __construct(Version $version, $accountSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Usage/Records/Monthly.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Usage/Records/Monthly.json';
+ /**
+ * Reads MonthlyInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return MonthlyInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -52,9 +87,9 @@ public function __construct(Version $version, $accountSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -63,55 +98,39 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads MonthlyInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return MonthlyInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of MonthlyInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of MonthlyInstance
+ * @return MonthlyPage Page of MonthlyInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): MonthlyPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Category' => $options['category'],
- 'StartDate' => Serialize::iso8601Date($options['startDate']),
- 'EndDate' => Serialize::iso8601Date($options['endDate']),
- 'IncludeSubaccounts' => Serialize::booleanToString($options['includeSubaccounts']),
+
+ $params = Values::of([
+ 'Category' =>
+ $options['category'],
+ 'StartDate' =>
+ Serialize::iso8601Date($options['startDate']),
+ 'EndDate' =>
+ Serialize::iso8601Date($options['endDate']),
+ 'IncludeSubaccounts' =>
+ Serialize::booleanToString($options['includeSubaccounts']),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new MonthlyPage($this->version, $response, $this->solution);
}
@@ -121,9 +140,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of MonthlyInstance
+ * @return MonthlyPage Page of MonthlyInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): MonthlyPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -133,13 +152,14 @@ public function getPage($targetUrl)
return new MonthlyPage($this->version, $response, $this->solution);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.MonthlyList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/MonthlyOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/MonthlyOptions.php
index aaf2f68..b9a9dad 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/MonthlyOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/MonthlyOptions.php
@@ -1,10 +1,16 @@
options['category'] = $category;
$this->options['startDate'] = $startDate;
$this->options['endDate'] = $endDate;
@@ -54,11 +71,10 @@ public function __construct($category = Values::NONE, $startDate = Values::NONE,
/**
* The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved.
*
- * @param string $category The usage category of the UsageRecord resources to
- * read
+ * @param string $category The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved.
* @return $this Fluent Builder
*/
- public function setCategory($category)
+ public function setCategory(string $category): self
{
$this->options['category'] = $category;
return $this;
@@ -67,11 +83,10 @@ public function setCategory($category)
/**
* Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date.
*
- * @param \DateTime $startDate Only include usage that has occurred on or after
- * this date
+ * @param \DateTime $startDate Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date.
* @return $this Fluent Builder
*/
- public function setStartDate($startDate)
+ public function setStartDate(\DateTime $startDate): self
{
$this->options['startDate'] = $startDate;
return $this;
@@ -80,11 +95,10 @@ public function setStartDate($startDate)
/**
* Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date.
*
- * @param \DateTime $endDate Only include usage that occurred on or before this
- * date
+ * @param \DateTime $endDate Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date.
* @return $this Fluent Builder
*/
- public function setEndDate($endDate)
+ public function setEndDate(\DateTime $endDate): self
{
$this->options['endDate'] = $endDate;
return $this;
@@ -93,11 +107,10 @@ public function setEndDate($endDate)
/**
* Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account.
*
- * @param bool $includeSubaccounts Whether to include usage from the master
- * account and all its subaccounts
+ * @param bool $includeSubaccounts Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account.
* @return $this Fluent Builder
*/
- public function setIncludeSubaccounts($includeSubaccounts)
+ public function setIncludeSubaccounts(bool $includeSubaccounts): self
{
$this->options['includeSubaccounts'] = $includeSubaccounts;
return $this;
@@ -108,14 +121,10 @@ public function setIncludeSubaccounts($includeSubaccounts)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.ReadMonthlyOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.ReadMonthlyOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/MonthlyPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/MonthlyPage.php
index b919a7d..1ce1ee0 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/MonthlyPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/MonthlyPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return MonthlyInstance \Twilio\Rest\Api\V2010\Account\Usage\Record\MonthlyInstance
+ */
+ public function buildInstance(array $payload): MonthlyInstance
{
return new MonthlyInstance($this->version, $payload, $this->solution['accountSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.MonthlyPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/ThisMonthInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/ThisMonthInstance.php
index 2d1f922..d61d1ca 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/ThisMonthInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/ThisMonthInstance.php
@@ -2,53 +2,60 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Usage\Record;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property string $apiVersion
- * @property string $asOf
+ * @property string|null $accountSid
+ * @property string|null $apiVersion
+ * @property string|null $asOf
* @property string $category
- * @property string $count
- * @property string $countUnit
- * @property string $description
- * @property \DateTime $endDate
- * @property string $price
- * @property string $priceUnit
- * @property \DateTime $startDate
- * @property array $subresourceUris
- * @property string $uri
- * @property string $usage
- * @property string $usageUnit
+ * @property string|null $count
+ * @property string|null $countUnit
+ * @property string|null $description
+ * @property \DateTime|null $endDate
+ * @property string|null $price
+ * @property string|null $priceUnit
+ * @property \DateTime|null $startDate
+ * @property array|null $subresourceUris
+ * @property string|null $uri
+ * @property string|null $usage
+ * @property string|null $usageUnit
*/
class ThisMonthInstance extends InstanceResource
{
/**
* Initialize the ThisMonthInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid A 34 character string that uniquely identifies
- * this resource.
- * @return \Twilio\Rest\Api\V2010\Account\Usage\Record\ThisMonthInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read.
*/
- public function __construct(Version $version, array $payload, $accountSid)
+ public function __construct(Version $version, array $payload, string $accountSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'apiVersion' => Values::array_get($payload, 'api_version'),
'asOf' => Values::array_get($payload, 'as_of'),
@@ -64,9 +71,9 @@ public function __construct(Version $version, array $payload, $accountSid)
'uri' => Values::array_get($payload, 'uri'),
'usage' => Values::array_get($payload, 'usage'),
'usageUnit' => Values::array_get($payload, 'usage_unit'),
- );
+ ];
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = ['accountSid' => $accountSid, ];
}
/**
@@ -76,7 +83,7 @@ public function __construct(Version $version, array $payload, $accountSid)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -95,8 +102,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.ThisMonthInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/ThisMonthList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/ThisMonthList.php
index 5984bae..aa71ac6 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/ThisMonthList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/ThisMonthList.php
@@ -2,37 +2,72 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\Usage\Record;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class ThisMonthList extends ListResource
-{
+ {
/**
* Construct the ThisMonthList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid A 34 character string that uniquely identifies
- * this resource.
- * @return \Twilio\Rest\Api\V2010\Account\Usage\Record\ThisMonthList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read.
*/
- public function __construct(Version $version, $accountSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Usage/Records/ThisMonth.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Usage/Records/ThisMonth.json';
+ /**
+ * Reads ThisMonthInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return ThisMonthInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -52,9 +87,9 @@ public function __construct(Version $version, $accountSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -63,55 +98,39 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads ThisMonthInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return ThisMonthInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of ThisMonthInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of ThisMonthInstance
+ * @return ThisMonthPage Page of ThisMonthInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): ThisMonthPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Category' => $options['category'],
- 'StartDate' => Serialize::iso8601Date($options['startDate']),
- 'EndDate' => Serialize::iso8601Date($options['endDate']),
- 'IncludeSubaccounts' => Serialize::booleanToString($options['includeSubaccounts']),
+
+ $params = Values::of([
+ 'Category' =>
+ $options['category'],
+ 'StartDate' =>
+ Serialize::iso8601Date($options['startDate']),
+ 'EndDate' =>
+ Serialize::iso8601Date($options['endDate']),
+ 'IncludeSubaccounts' =>
+ Serialize::booleanToString($options['includeSubaccounts']),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new ThisMonthPage($this->version, $response, $this->solution);
}
@@ -121,9 +140,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of ThisMonthInstance
+ * @return ThisMonthPage Page of ThisMonthInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): ThisMonthPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -133,13 +152,14 @@ public function getPage($targetUrl)
return new ThisMonthPage($this->version, $response, $this->solution);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.ThisMonthList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/ThisMonthOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/ThisMonthOptions.php
index f359b7b..d3d4d1d 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/ThisMonthOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/ThisMonthOptions.php
@@ -1,10 +1,16 @@
options['category'] = $category;
$this->options['startDate'] = $startDate;
$this->options['endDate'] = $endDate;
@@ -54,11 +71,10 @@ public function __construct($category = Values::NONE, $startDate = Values::NONE,
/**
* The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved.
*
- * @param string $category The usage category of the UsageRecord resources to
- * read
+ * @param string $category The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved.
* @return $this Fluent Builder
*/
- public function setCategory($category)
+ public function setCategory(string $category): self
{
$this->options['category'] = $category;
return $this;
@@ -67,11 +83,10 @@ public function setCategory($category)
/**
* Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date.
*
- * @param \DateTime $startDate Only include usage that has occurred on or after
- * this date
+ * @param \DateTime $startDate Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date.
* @return $this Fluent Builder
*/
- public function setStartDate($startDate)
+ public function setStartDate(\DateTime $startDate): self
{
$this->options['startDate'] = $startDate;
return $this;
@@ -80,11 +95,10 @@ public function setStartDate($startDate)
/**
* Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date.
*
- * @param \DateTime $endDate Only include usage that occurred on or before this
- * date
+ * @param \DateTime $endDate Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date.
* @return $this Fluent Builder
*/
- public function setEndDate($endDate)
+ public function setEndDate(\DateTime $endDate): self
{
$this->options['endDate'] = $endDate;
return $this;
@@ -93,11 +107,10 @@ public function setEndDate($endDate)
/**
* Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account.
*
- * @param bool $includeSubaccounts Whether to include usage from the master
- * account and all its subaccounts
+ * @param bool $includeSubaccounts Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account.
* @return $this Fluent Builder
*/
- public function setIncludeSubaccounts($includeSubaccounts)
+ public function setIncludeSubaccounts(bool $includeSubaccounts): self
{
$this->options['includeSubaccounts'] = $includeSubaccounts;
return $this;
@@ -108,14 +121,10 @@ public function setIncludeSubaccounts($includeSubaccounts)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.ReadThisMonthOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.ReadThisMonthOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/ThisMonthPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/ThisMonthPage.php
index 5fdd3bc..a99d4f4 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/ThisMonthPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/ThisMonthPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return ThisMonthInstance \Twilio\Rest\Api\V2010\Account\Usage\Record\ThisMonthInstance
+ */
+ public function buildInstance(array $payload): ThisMonthInstance
{
return new ThisMonthInstance($this->version, $payload, $this->solution['accountSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.ThisMonthPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/TodayInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/TodayInstance.php
index c3e7a53..92d9650 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/TodayInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/TodayInstance.php
@@ -2,53 +2,60 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Usage\Record;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property string $apiVersion
- * @property string $asOf
+ * @property string|null $accountSid
+ * @property string|null $apiVersion
+ * @property string|null $asOf
* @property string $category
- * @property string $count
- * @property string $countUnit
- * @property string $description
- * @property \DateTime $endDate
- * @property string $price
- * @property string $priceUnit
- * @property \DateTime $startDate
- * @property array $subresourceUris
- * @property string $uri
- * @property string $usage
- * @property string $usageUnit
+ * @property string|null $count
+ * @property string|null $countUnit
+ * @property string|null $description
+ * @property \DateTime|null $endDate
+ * @property string|null $price
+ * @property string|null $priceUnit
+ * @property \DateTime|null $startDate
+ * @property array|null $subresourceUris
+ * @property string|null $uri
+ * @property string|null $usage
+ * @property string|null $usageUnit
*/
class TodayInstance extends InstanceResource
{
/**
* Initialize the TodayInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid A 34 character string that uniquely identifies
- * this resource.
- * @return \Twilio\Rest\Api\V2010\Account\Usage\Record\TodayInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read.
*/
- public function __construct(Version $version, array $payload, $accountSid)
+ public function __construct(Version $version, array $payload, string $accountSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'apiVersion' => Values::array_get($payload, 'api_version'),
'asOf' => Values::array_get($payload, 'as_of'),
@@ -64,9 +71,9 @@ public function __construct(Version $version, array $payload, $accountSid)
'uri' => Values::array_get($payload, 'uri'),
'usage' => Values::array_get($payload, 'usage'),
'usageUnit' => Values::array_get($payload, 'usage_unit'),
- );
+ ];
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = ['accountSid' => $accountSid, ];
}
/**
@@ -76,7 +83,7 @@ public function __construct(Version $version, array $payload, $accountSid)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -95,8 +102,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.TodayInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/TodayList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/TodayList.php
index 236d6f0..9c3e91b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/TodayList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/TodayList.php
@@ -2,37 +2,72 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\Usage\Record;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class TodayList extends ListResource
-{
+ {
/**
* Construct the TodayList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid A 34 character string that uniquely identifies
- * this resource.
- * @return \Twilio\Rest\Api\V2010\Account\Usage\Record\TodayList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read.
*/
- public function __construct(Version $version, $accountSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Usage/Records/Today.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Usage/Records/Today.json';
+ /**
+ * Reads TodayInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return TodayInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -52,9 +87,9 @@ public function __construct(Version $version, $accountSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -63,55 +98,39 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads TodayInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return TodayInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of TodayInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of TodayInstance
+ * @return TodayPage Page of TodayInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): TodayPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Category' => $options['category'],
- 'StartDate' => Serialize::iso8601Date($options['startDate']),
- 'EndDate' => Serialize::iso8601Date($options['endDate']),
- 'IncludeSubaccounts' => Serialize::booleanToString($options['includeSubaccounts']),
+
+ $params = Values::of([
+ 'Category' =>
+ $options['category'],
+ 'StartDate' =>
+ Serialize::iso8601Date($options['startDate']),
+ 'EndDate' =>
+ Serialize::iso8601Date($options['endDate']),
+ 'IncludeSubaccounts' =>
+ Serialize::booleanToString($options['includeSubaccounts']),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new TodayPage($this->version, $response, $this->solution);
}
@@ -121,9 +140,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of TodayInstance
+ * @return TodayPage Page of TodayInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): TodayPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -133,13 +152,14 @@ public function getPage($targetUrl)
return new TodayPage($this->version, $response, $this->solution);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.TodayList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/TodayOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/TodayOptions.php
index f4ef480..1d877d2 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/TodayOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/TodayOptions.php
@@ -1,10 +1,16 @@
options['category'] = $category;
$this->options['startDate'] = $startDate;
$this->options['endDate'] = $endDate;
@@ -54,11 +71,10 @@ public function __construct($category = Values::NONE, $startDate = Values::NONE,
/**
* The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved.
*
- * @param string $category The usage category of the UsageRecord resources to
- * read
+ * @param string $category The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved.
* @return $this Fluent Builder
*/
- public function setCategory($category)
+ public function setCategory(string $category): self
{
$this->options['category'] = $category;
return $this;
@@ -67,11 +83,10 @@ public function setCategory($category)
/**
* Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date.
*
- * @param \DateTime $startDate Only include usage that has occurred on or after
- * this date
+ * @param \DateTime $startDate Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date.
* @return $this Fluent Builder
*/
- public function setStartDate($startDate)
+ public function setStartDate(\DateTime $startDate): self
{
$this->options['startDate'] = $startDate;
return $this;
@@ -80,11 +95,10 @@ public function setStartDate($startDate)
/**
* Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date.
*
- * @param \DateTime $endDate Only include usage that occurred on or before this
- * date
+ * @param \DateTime $endDate Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date.
* @return $this Fluent Builder
*/
- public function setEndDate($endDate)
+ public function setEndDate(\DateTime $endDate): self
{
$this->options['endDate'] = $endDate;
return $this;
@@ -93,11 +107,10 @@ public function setEndDate($endDate)
/**
* Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account.
*
- * @param bool $includeSubaccounts Whether to include usage from the master
- * account and all its subaccounts
+ * @param bool $includeSubaccounts Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account.
* @return $this Fluent Builder
*/
- public function setIncludeSubaccounts($includeSubaccounts)
+ public function setIncludeSubaccounts(bool $includeSubaccounts): self
{
$this->options['includeSubaccounts'] = $includeSubaccounts;
return $this;
@@ -108,14 +121,10 @@ public function setIncludeSubaccounts($includeSubaccounts)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.ReadTodayOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.ReadTodayOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/TodayPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/TodayPage.php
index 8661e3a..7a90470 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/TodayPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/TodayPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return TodayInstance \Twilio\Rest\Api\V2010\Account\Usage\Record\TodayInstance
+ */
+ public function buildInstance(array $payload): TodayInstance
{
return new TodayInstance($this->version, $payload, $this->solution['accountSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.TodayPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YearlyInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YearlyInstance.php
index 9580a04..07ca8c1 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YearlyInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YearlyInstance.php
@@ -2,53 +2,60 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Usage\Record;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property string $apiVersion
- * @property string $asOf
+ * @property string|null $accountSid
+ * @property string|null $apiVersion
+ * @property string|null $asOf
* @property string $category
- * @property string $count
- * @property string $countUnit
- * @property string $description
- * @property \DateTime $endDate
- * @property string $price
- * @property string $priceUnit
- * @property \DateTime $startDate
- * @property array $subresourceUris
- * @property string $uri
- * @property string $usage
- * @property string $usageUnit
+ * @property string|null $count
+ * @property string|null $countUnit
+ * @property string|null $description
+ * @property \DateTime|null $endDate
+ * @property string|null $price
+ * @property string|null $priceUnit
+ * @property \DateTime|null $startDate
+ * @property array|null $subresourceUris
+ * @property string|null $uri
+ * @property string|null $usage
+ * @property string|null $usageUnit
*/
class YearlyInstance extends InstanceResource
{
/**
* Initialize the YearlyInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid A 34 character string that uniquely identifies
- * this resource.
- * @return \Twilio\Rest\Api\V2010\Account\Usage\Record\YearlyInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read.
*/
- public function __construct(Version $version, array $payload, $accountSid)
+ public function __construct(Version $version, array $payload, string $accountSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'apiVersion' => Values::array_get($payload, 'api_version'),
'asOf' => Values::array_get($payload, 'as_of'),
@@ -64,9 +71,9 @@ public function __construct(Version $version, array $payload, $accountSid)
'uri' => Values::array_get($payload, 'uri'),
'usage' => Values::array_get($payload, 'usage'),
'usageUnit' => Values::array_get($payload, 'usage_unit'),
- );
+ ];
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = ['accountSid' => $accountSid, ];
}
/**
@@ -76,7 +83,7 @@ public function __construct(Version $version, array $payload, $accountSid)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -95,8 +102,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.YearlyInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YearlyList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YearlyList.php
index 6d3607e..74aad36 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YearlyList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YearlyList.php
@@ -2,37 +2,72 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\Usage\Record;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class YearlyList extends ListResource
-{
+ {
/**
* Construct the YearlyList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid A 34 character string that uniquely identifies
- * this resource.
- * @return \Twilio\Rest\Api\V2010\Account\Usage\Record\YearlyList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read.
*/
- public function __construct(Version $version, $accountSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Usage/Records/Yearly.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Usage/Records/Yearly.json';
+ /**
+ * Reads YearlyInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return YearlyInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -52,9 +87,9 @@ public function __construct(Version $version, $accountSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -63,55 +98,39 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads YearlyInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return YearlyInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of YearlyInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of YearlyInstance
+ * @return YearlyPage Page of YearlyInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): YearlyPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Category' => $options['category'],
- 'StartDate' => Serialize::iso8601Date($options['startDate']),
- 'EndDate' => Serialize::iso8601Date($options['endDate']),
- 'IncludeSubaccounts' => Serialize::booleanToString($options['includeSubaccounts']),
+
+ $params = Values::of([
+ 'Category' =>
+ $options['category'],
+ 'StartDate' =>
+ Serialize::iso8601Date($options['startDate']),
+ 'EndDate' =>
+ Serialize::iso8601Date($options['endDate']),
+ 'IncludeSubaccounts' =>
+ Serialize::booleanToString($options['includeSubaccounts']),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new YearlyPage($this->version, $response, $this->solution);
}
@@ -121,9 +140,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of YearlyInstance
+ * @return YearlyPage Page of YearlyInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): YearlyPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -133,13 +152,14 @@ public function getPage($targetUrl)
return new YearlyPage($this->version, $response, $this->solution);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.YearlyList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YearlyOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YearlyOptions.php
index a69e2b4..1a807c3 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YearlyOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YearlyOptions.php
@@ -1,10 +1,16 @@
options['category'] = $category;
$this->options['startDate'] = $startDate;
$this->options['endDate'] = $endDate;
@@ -54,11 +71,10 @@ public function __construct($category = Values::NONE, $startDate = Values::NONE,
/**
* The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved.
*
- * @param string $category The usage category of the UsageRecord resources to
- * read
+ * @param string $category The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved.
* @return $this Fluent Builder
*/
- public function setCategory($category)
+ public function setCategory(string $category): self
{
$this->options['category'] = $category;
return $this;
@@ -67,11 +83,10 @@ public function setCategory($category)
/**
* Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date.
*
- * @param \DateTime $startDate Only include usage that has occurred on or after
- * this date
+ * @param \DateTime $startDate Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date.
* @return $this Fluent Builder
*/
- public function setStartDate($startDate)
+ public function setStartDate(\DateTime $startDate): self
{
$this->options['startDate'] = $startDate;
return $this;
@@ -80,11 +95,10 @@ public function setStartDate($startDate)
/**
* Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date.
*
- * @param \DateTime $endDate Only include usage that occurred on or before this
- * date
+ * @param \DateTime $endDate Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date.
* @return $this Fluent Builder
*/
- public function setEndDate($endDate)
+ public function setEndDate(\DateTime $endDate): self
{
$this->options['endDate'] = $endDate;
return $this;
@@ -93,11 +107,10 @@ public function setEndDate($endDate)
/**
* Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account.
*
- * @param bool $includeSubaccounts Whether to include usage from the master
- * account and all its subaccounts
+ * @param bool $includeSubaccounts Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account.
* @return $this Fluent Builder
*/
- public function setIncludeSubaccounts($includeSubaccounts)
+ public function setIncludeSubaccounts(bool $includeSubaccounts): self
{
$this->options['includeSubaccounts'] = $includeSubaccounts;
return $this;
@@ -108,14 +121,10 @@ public function setIncludeSubaccounts($includeSubaccounts)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.ReadYearlyOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.ReadYearlyOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YearlyPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YearlyPage.php
index af2460e..f5e0bb6 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YearlyPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YearlyPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return YearlyInstance \Twilio\Rest\Api\V2010\Account\Usage\Record\YearlyInstance
+ */
+ public function buildInstance(array $payload): YearlyInstance
{
return new YearlyInstance($this->version, $payload, $this->solution['accountSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.YearlyPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YesterdayInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YesterdayInstance.php
index 8ff0cfa..ed11d54 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YesterdayInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YesterdayInstance.php
@@ -2,53 +2,60 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Usage\Record;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property string $apiVersion
- * @property string $asOf
+ * @property string|null $accountSid
+ * @property string|null $apiVersion
+ * @property string|null $asOf
* @property string $category
- * @property string $count
- * @property string $countUnit
- * @property string $description
- * @property \DateTime $endDate
- * @property string $price
- * @property string $priceUnit
- * @property \DateTime $startDate
- * @property array $subresourceUris
- * @property string $uri
- * @property string $usage
- * @property string $usageUnit
+ * @property string|null $count
+ * @property string|null $countUnit
+ * @property string|null $description
+ * @property \DateTime|null $endDate
+ * @property string|null $price
+ * @property string|null $priceUnit
+ * @property \DateTime|null $startDate
+ * @property array|null $subresourceUris
+ * @property string|null $uri
+ * @property string|null $usage
+ * @property string|null $usageUnit
*/
class YesterdayInstance extends InstanceResource
{
/**
* Initialize the YesterdayInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid A 34 character string that uniquely identifies
- * this resource.
- * @return \Twilio\Rest\Api\V2010\Account\Usage\Record\YesterdayInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read.
*/
- public function __construct(Version $version, array $payload, $accountSid)
+ public function __construct(Version $version, array $payload, string $accountSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'apiVersion' => Values::array_get($payload, 'api_version'),
'asOf' => Values::array_get($payload, 'as_of'),
@@ -64,9 +71,9 @@ public function __construct(Version $version, array $payload, $accountSid)
'uri' => Values::array_get($payload, 'uri'),
'usage' => Values::array_get($payload, 'usage'),
'usageUnit' => Values::array_get($payload, 'usage_unit'),
- );
+ ];
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = ['accountSid' => $accountSid, ];
}
/**
@@ -76,7 +83,7 @@ public function __construct(Version $version, array $payload, $accountSid)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -95,8 +102,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.YesterdayInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YesterdayList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YesterdayList.php
index fbad22d..1855749 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YesterdayList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YesterdayList.php
@@ -2,37 +2,72 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\Usage\Record;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class YesterdayList extends ListResource
-{
+ {
/**
* Construct the YesterdayList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid A 34 character string that uniquely identifies
- * this resource.
- * @return \Twilio\Rest\Api\V2010\Account\Usage\Record\YesterdayList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read.
*/
- public function __construct(Version $version, $accountSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Usage/Records/Yesterday.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Usage/Records/Yesterday.json';
+ /**
+ * Reads YesterdayInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return YesterdayInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -52,9 +87,9 @@ public function __construct(Version $version, $accountSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -63,55 +98,39 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads YesterdayInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return YesterdayInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of YesterdayInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of YesterdayInstance
+ * @return YesterdayPage Page of YesterdayInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): YesterdayPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Category' => $options['category'],
- 'StartDate' => Serialize::iso8601Date($options['startDate']),
- 'EndDate' => Serialize::iso8601Date($options['endDate']),
- 'IncludeSubaccounts' => Serialize::booleanToString($options['includeSubaccounts']),
+
+ $params = Values::of([
+ 'Category' =>
+ $options['category'],
+ 'StartDate' =>
+ Serialize::iso8601Date($options['startDate']),
+ 'EndDate' =>
+ Serialize::iso8601Date($options['endDate']),
+ 'IncludeSubaccounts' =>
+ Serialize::booleanToString($options['includeSubaccounts']),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new YesterdayPage($this->version, $response, $this->solution);
}
@@ -121,9 +140,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of YesterdayInstance
+ * @return YesterdayPage Page of YesterdayInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): YesterdayPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -133,13 +152,14 @@ public function getPage($targetUrl)
return new YesterdayPage($this->version, $response, $this->solution);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.YesterdayList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YesterdayOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YesterdayOptions.php
index 7175a73..766b99a 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YesterdayOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YesterdayOptions.php
@@ -1,10 +1,16 @@
options['category'] = $category;
$this->options['startDate'] = $startDate;
$this->options['endDate'] = $endDate;
@@ -54,11 +71,10 @@ public function __construct($category = Values::NONE, $startDate = Values::NONE,
/**
* The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved.
*
- * @param string $category The usage category of the UsageRecord resources to
- * read
+ * @param string $category The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved.
* @return $this Fluent Builder
*/
- public function setCategory($category)
+ public function setCategory(string $category): self
{
$this->options['category'] = $category;
return $this;
@@ -67,11 +83,10 @@ public function setCategory($category)
/**
* Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date.
*
- * @param \DateTime $startDate Only include usage that has occurred on or after
- * this date
+ * @param \DateTime $startDate Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date.
* @return $this Fluent Builder
*/
- public function setStartDate($startDate)
+ public function setStartDate(\DateTime $startDate): self
{
$this->options['startDate'] = $startDate;
return $this;
@@ -80,11 +95,10 @@ public function setStartDate($startDate)
/**
* Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date.
*
- * @param \DateTime $endDate Only include usage that occurred on or before this
- * date
+ * @param \DateTime $endDate Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date.
* @return $this Fluent Builder
*/
- public function setEndDate($endDate)
+ public function setEndDate(\DateTime $endDate): self
{
$this->options['endDate'] = $endDate;
return $this;
@@ -93,11 +107,10 @@ public function setEndDate($endDate)
/**
* Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account.
*
- * @param bool $includeSubaccounts Whether to include usage from the master
- * account and all its subaccounts
+ * @param bool $includeSubaccounts Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account.
* @return $this Fluent Builder
*/
- public function setIncludeSubaccounts($includeSubaccounts)
+ public function setIncludeSubaccounts(bool $includeSubaccounts): self
{
$this->options['includeSubaccounts'] = $includeSubaccounts;
return $this;
@@ -108,14 +121,10 @@ public function setIncludeSubaccounts($includeSubaccounts)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.ReadYesterdayOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.ReadYesterdayOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YesterdayPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YesterdayPage.php
index 0fb234a..39f8152 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YesterdayPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/Record/YesterdayPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return YesterdayInstance \Twilio\Rest\Api\V2010\Account\Usage\Record\YesterdayInstance
+ */
+ public function buildInstance(array $payload): YesterdayInstance
{
return new YesterdayInstance($this->version, $payload, $this->solution['accountSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.YesterdayPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/RecordInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/RecordInstance.php
index 70b3407..9549b87 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/RecordInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/RecordInstance.php
@@ -2,53 +2,60 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Usage;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property string $apiVersion
- * @property string $asOf
+ * @property string|null $accountSid
+ * @property string|null $apiVersion
+ * @property string|null $asOf
* @property string $category
- * @property string $count
- * @property string $countUnit
- * @property string $description
- * @property \DateTime $endDate
- * @property string $price
- * @property string $priceUnit
- * @property \DateTime $startDate
- * @property array $subresourceUris
- * @property string $uri
- * @property string $usage
- * @property string $usageUnit
+ * @property string|null $count
+ * @property string|null $countUnit
+ * @property string|null $description
+ * @property \DateTime|null $endDate
+ * @property string|null $price
+ * @property string|null $priceUnit
+ * @property \DateTime|null $startDate
+ * @property array|null $subresourceUris
+ * @property string|null $uri
+ * @property string|null $usage
+ * @property string|null $usageUnit
*/
class RecordInstance extends InstanceResource
{
/**
* Initialize the RecordInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid A 34 character string that uniquely identifies
- * this resource.
- * @return \Twilio\Rest\Api\V2010\Account\Usage\RecordInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read.
*/
- public function __construct(Version $version, array $payload, $accountSid)
+ public function __construct(Version $version, array $payload, string $accountSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'apiVersion' => Values::array_get($payload, 'api_version'),
'asOf' => Values::array_get($payload, 'as_of'),
@@ -64,9 +71,9 @@ public function __construct(Version $version, array $payload, $accountSid)
'uri' => Values::array_get($payload, 'uri'),
'usage' => Values::array_get($payload, 'usage'),
'usageUnit' => Values::array_get($payload, 'usage_unit'),
- );
+ ];
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = ['accountSid' => $accountSid, ];
}
/**
@@ -76,7 +83,7 @@ public function __construct(Version $version, array $payload, $accountSid)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -95,8 +102,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.RecordInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/RecordList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/RecordList.php
index 2f4b8e0..f377f74 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/RecordList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/RecordList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\Usage;
@@ -12,55 +19,84 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Api\V2010\Account\Usage\Record\AllTimeList;
-use Twilio\Rest\Api\V2010\Account\Usage\Record\DailyList;
+use Twilio\Stream;
+use Twilio\Values;
+use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
use Twilio\Rest\Api\V2010\Account\Usage\Record\LastMonthList;
-use Twilio\Rest\Api\V2010\Account\Usage\Record\MonthlyList;
-use Twilio\Rest\Api\V2010\Account\Usage\Record\ThisMonthList;
use Twilio\Rest\Api\V2010\Account\Usage\Record\TodayList;
use Twilio\Rest\Api\V2010\Account\Usage\Record\YearlyList;
+use Twilio\Rest\Api\V2010\Account\Usage\Record\ThisMonthList;
+use Twilio\Rest\Api\V2010\Account\Usage\Record\DailyList;
+use Twilio\Rest\Api\V2010\Account\Usage\Record\AllTimeList;
use Twilio\Rest\Api\V2010\Account\Usage\Record\YesterdayList;
-use Twilio\Serialize;
-use Twilio\Values;
-use Twilio\Version;
+use Twilio\Rest\Api\V2010\Account\Usage\Record\MonthlyList;
+
/**
- * @property \Twilio\Rest\Api\V2010\Account\Usage\Record\AllTimeList $allTime
- * @property \Twilio\Rest\Api\V2010\Account\Usage\Record\DailyList $daily
- * @property \Twilio\Rest\Api\V2010\Account\Usage\Record\LastMonthList $lastMonth
- * @property \Twilio\Rest\Api\V2010\Account\Usage\Record\MonthlyList $monthly
- * @property \Twilio\Rest\Api\V2010\Account\Usage\Record\ThisMonthList $thisMonth
- * @property \Twilio\Rest\Api\V2010\Account\Usage\Record\TodayList $today
- * @property \Twilio\Rest\Api\V2010\Account\Usage\Record\YearlyList $yearly
- * @property \Twilio\Rest\Api\V2010\Account\Usage\Record\YesterdayList $yesterday
+ * @property LastMonthList $lastMonth
+ * @property TodayList $today
+ * @property YearlyList $yearly
+ * @property ThisMonthList $thisMonth
+ * @property DailyList $daily
+ * @property AllTimeList $allTime
+ * @property YesterdayList $yesterday
+ * @property MonthlyList $monthly
*/
class RecordList extends ListResource
-{
- protected $_allTime = null;
- protected $_daily = null;
+ {
protected $_lastMonth = null;
- protected $_monthly = null;
- protected $_thisMonth = null;
protected $_today = null;
protected $_yearly = null;
+ protected $_thisMonth = null;
+ protected $_daily = null;
+ protected $_allTime = null;
protected $_yesterday = null;
+ protected $_monthly = null;
/**
* Construct the RecordList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid A 34 character string that uniquely identifies
- * this resource.
- * @return \Twilio\Rest\Api\V2010\Account\Usage\RecordList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read.
*/
- public function __construct(Version $version, $accountSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Usage/Records.json';
+ }
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Usage/Records.json';
+ /**
+ * Reads RecordInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return RecordInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -80,9 +116,9 @@ public function __construct(Version $version, $accountSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -91,55 +127,39 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads RecordInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return RecordInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of RecordInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of RecordInstance
+ * @return RecordPage Page of RecordInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): RecordPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Category' => $options['category'],
- 'StartDate' => Serialize::iso8601Date($options['startDate']),
- 'EndDate' => Serialize::iso8601Date($options['endDate']),
- 'IncludeSubaccounts' => Serialize::booleanToString($options['includeSubaccounts']),
+
+ $params = Values::of([
+ 'Category' =>
+ $options['category'],
+ 'StartDate' =>
+ Serialize::iso8601Date($options['startDate']),
+ 'EndDate' =>
+ Serialize::iso8601Date($options['endDate']),
+ 'IncludeSubaccounts' =>
+ Serialize::booleanToString($options['includeSubaccounts']),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new RecordPage($this->version, $response, $this->solution);
}
@@ -149,9 +169,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of RecordInstance
+ * @return RecordPage Page of RecordInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): RecordPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -161,102 +181,119 @@ public function getPage($targetUrl)
return new RecordPage($this->version, $response, $this->solution);
}
- /**
- * Access the allTime
- */
- protected function getAllTime()
- {
- if (!$this->_allTime) {
- $this->_allTime = new AllTimeList($this->version, $this->solution['accountSid']);
- }
-
- return $this->_allTime;
- }
/**
- * Access the daily
+ * Access the lastMonth
*/
- protected function getDaily()
+ protected function getLastMonth(): LastMonthList
{
- if (!$this->_daily) {
- $this->_daily = new DailyList($this->version, $this->solution['accountSid']);
+ if (!$this->_lastMonth) {
+ $this->_lastMonth = new LastMonthList(
+ $this->version,
+ $this->solution['accountSid']
+ );
}
-
- return $this->_daily;
+ return $this->_lastMonth;
}
/**
- * Access the lastMonth
+ * Access the today
*/
- protected function getLastMonth()
+ protected function getToday(): TodayList
{
- if (!$this->_lastMonth) {
- $this->_lastMonth = new LastMonthList($this->version, $this->solution['accountSid']);
+ if (!$this->_today) {
+ $this->_today = new TodayList(
+ $this->version,
+ $this->solution['accountSid']
+ );
}
-
- return $this->_lastMonth;
+ return $this->_today;
}
/**
- * Access the monthly
+ * Access the yearly
*/
- protected function getMonthly()
+ protected function getYearly(): YearlyList
{
- if (!$this->_monthly) {
- $this->_monthly = new MonthlyList($this->version, $this->solution['accountSid']);
+ if (!$this->_yearly) {
+ $this->_yearly = new YearlyList(
+ $this->version,
+ $this->solution['accountSid']
+ );
}
-
- return $this->_monthly;
+ return $this->_yearly;
}
/**
* Access the thisMonth
*/
- protected function getThisMonth()
+ protected function getThisMonth(): ThisMonthList
{
if (!$this->_thisMonth) {
- $this->_thisMonth = new ThisMonthList($this->version, $this->solution['accountSid']);
+ $this->_thisMonth = new ThisMonthList(
+ $this->version,
+ $this->solution['accountSid']
+ );
}
-
return $this->_thisMonth;
}
/**
- * Access the today
+ * Access the daily
*/
- protected function getToday()
+ protected function getDaily(): DailyList
{
- if (!$this->_today) {
- $this->_today = new TodayList($this->version, $this->solution['accountSid']);
+ if (!$this->_daily) {
+ $this->_daily = new DailyList(
+ $this->version,
+ $this->solution['accountSid']
+ );
}
-
- return $this->_today;
+ return $this->_daily;
}
/**
- * Access the yearly
+ * Access the allTime
*/
- protected function getYearly()
+ protected function getAllTime(): AllTimeList
{
- if (!$this->_yearly) {
- $this->_yearly = new YearlyList($this->version, $this->solution['accountSid']);
+ if (!$this->_allTime) {
+ $this->_allTime = new AllTimeList(
+ $this->version,
+ $this->solution['accountSid']
+ );
}
-
- return $this->_yearly;
+ return $this->_allTime;
}
/**
* Access the yesterday
*/
- protected function getYesterday()
+ protected function getYesterday(): YesterdayList
{
if (!$this->_yesterday) {
- $this->_yesterday = new YesterdayList($this->version, $this->solution['accountSid']);
+ $this->_yesterday = new YesterdayList(
+ $this->version,
+ $this->solution['accountSid']
+ );
}
-
return $this->_yesterday;
}
+ /**
+ * Access the monthly
+ */
+ protected function getMonthly(): MonthlyList
+ {
+ if (!$this->_monthly) {
+ $this->_monthly = new MonthlyList(
+ $this->version,
+ $this->solution['accountSid']
+ );
+ }
+ return $this->_monthly;
+ }
+
/**
* Magic getter to lazy load subresources
*
@@ -264,7 +301,7 @@ protected function getYesterday()
* @return \Twilio\ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -279,10 +316,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -297,8 +334,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.RecordList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/RecordOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/RecordOptions.php
index 45e5568..67bbaeb 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/RecordOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/RecordOptions.php
@@ -1,10 +1,16 @@
options['category'] = $category;
$this->options['startDate'] = $startDate;
$this->options['endDate'] = $endDate;
@@ -54,11 +71,10 @@ public function __construct($category = Values::NONE, $startDate = Values::NONE,
/**
* The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved.
*
- * @param string $category The usage category of the UsageRecord resources to
- * read
+ * @param string $category The [usage category](https://www.twilio.com/docs/usage/api/usage-record#usage-categories) of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved.
* @return $this Fluent Builder
*/
- public function setCategory($category)
+ public function setCategory(string $category): self
{
$this->options['category'] = $category;
return $this;
@@ -67,11 +83,10 @@ public function setCategory($category)
/**
* Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date.
*
- * @param \DateTime $startDate Only include usage that has occurred on or after
- * this date
+ * @param \DateTime $startDate Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `-30days`, which will set the start date to be 30 days before the current date.
* @return $this Fluent Builder
*/
- public function setStartDate($startDate)
+ public function setStartDate(\DateTime $startDate): self
{
$this->options['startDate'] = $startDate;
return $this;
@@ -80,11 +95,10 @@ public function setStartDate($startDate)
/**
* Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date.
*
- * @param \DateTime $endDate Only include usage that occurred on or before this
- * date
+ * @param \DateTime $endDate Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`. You can also specify offsets from the current date, such as: `+30days`, which will set the end date to 30 days from the current date.
* @return $this Fluent Builder
*/
- public function setEndDate($endDate)
+ public function setEndDate(\DateTime $endDate): self
{
$this->options['endDate'] = $endDate;
return $this;
@@ -93,11 +107,10 @@ public function setEndDate($endDate)
/**
* Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account.
*
- * @param bool $includeSubaccounts Whether to include usage from the master
- * account and all its subaccounts
+ * @param bool $includeSubaccounts Whether to include usage from the master account and all its subaccounts. Can be: `true` (the default) to include usage from the master account and all subaccounts or `false` to retrieve usage from only the specified account.
* @return $this Fluent Builder
*/
- public function setIncludeSubaccounts($includeSubaccounts)
+ public function setIncludeSubaccounts(bool $includeSubaccounts): self
{
$this->options['includeSubaccounts'] = $includeSubaccounts;
return $this;
@@ -108,14 +121,10 @@ public function setIncludeSubaccounts($includeSubaccounts)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.ReadRecordOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.ReadRecordOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/RecordPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/RecordPage.php
index acf6ed6..4a9b210 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/RecordPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/RecordPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return RecordInstance \Twilio\Rest\Api\V2010\Account\Usage\RecordInstance
+ */
+ public function buildInstance(array $payload): RecordInstance
{
return new RecordInstance($this->version, $payload, $this->solution['accountSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.RecordPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/TriggerContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/TriggerContext.php
index ab30835..24048f5 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/TriggerContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/TriggerContext.php
@@ -2,55 +2,82 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Usage;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class TriggerContext extends InstanceContext
-{
+ {
/**
* Initialize the TriggerContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * to fetch
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\Usage\TriggerContext
+ * @param Version $version Version that contains the resource
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
+ * @param string $sid The Twilio-provided string that uniquely identifies the UsageTrigger resource to delete.
*/
- public function __construct(Version $version, $accountSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $accountSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid, 'sid' => $sid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Usage/Triggers/' . \rawurlencode($sid)
+ .'.json';
+ }
+
+ /**
+ * Delete the TriggerInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Usage/Triggers/' . \rawurlencode($sid) . '.json';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a TriggerInstance
+ * Fetch the TriggerInstance
*
* @return TriggerInstance Fetched TriggerInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): TriggerInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new TriggerInstance(
$this->version,
@@ -60,6 +87,7 @@ public function fetch()
);
}
+
/**
* Update the TriggerInstance
*
@@ -67,22 +95,22 @@ public function fetch()
* @return TriggerInstance Updated TriggerInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): TriggerInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'CallbackMethod' => $options['callbackMethod'],
- 'CallbackUrl' => $options['callbackUrl'],
- 'FriendlyName' => $options['friendlyName'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'CallbackMethod' =>
+ $options['callbackMethod'],
+ 'CallbackUrl' =>
+ $options['callbackUrl'],
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new TriggerInstance(
$this->version,
@@ -92,28 +120,18 @@ public function update($options = array())
);
}
- /**
- * Deletes the TriggerInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.TriggerContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/TriggerInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/TriggerInstance.php
index 39e84f8..b36ba5c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/TriggerInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/TriggerInstance.php
@@ -2,56 +2,63 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account\Usage;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property string $apiVersion
- * @property string $callbackMethod
- * @property string $callbackUrl
- * @property string $currentValue
- * @property \DateTime $dateCreated
- * @property \DateTime $dateFired
- * @property \DateTime $dateUpdated
- * @property string $friendlyName
+ * @property string|null $accountSid
+ * @property string|null $apiVersion
+ * @property string|null $callbackMethod
+ * @property string|null $callbackUrl
+ * @property string|null $currentValue
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateFired
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $friendlyName
* @property string $recurring
- * @property string $sid
+ * @property string|null $sid
* @property string $triggerBy
- * @property string $triggerValue
- * @property string $uri
+ * @property string|null $triggerValue
+ * @property string|null $uri
* @property string $usageCategory
- * @property string $usageRecordUri
+ * @property string|null $usageRecordUri
*/
class TriggerInstance extends InstanceResource
{
/**
* Initialize the TriggerInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid A 34 character string that uniquely identifies
- * this resource.
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\Usage\TriggerInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
+ * @param string $sid The Twilio-provided string that uniquely identifies the UsageTrigger resource to delete.
*/
- public function __construct(Version $version, array $payload, $accountSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $accountSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'apiVersion' => Values::array_get($payload, 'api_version'),
'callbackMethod' => Values::array_get($payload, 'callback_method'),
@@ -68,19 +75,18 @@ public function __construct(Version $version, array $payload, $accountSid, $sid
'uri' => Values::array_get($payload, 'uri'),
'usageCategory' => Values::array_get($payload, 'usage_category'),
'usageRecordUri' => Values::array_get($payload, 'usage_record_uri'),
- );
+ ];
- $this->solution = array('accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['accountSid' => $accountSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Api\V2010\Account\Usage\TriggerContext Context for this
- * TriggerInstance
+ * @return TriggerContext Context for this TriggerInstance
*/
- protected function proxy()
+ protected function proxy(): TriggerContext
{
if (!$this->context) {
$this->context = new TriggerContext(
@@ -94,37 +100,40 @@ protected function proxy()
}
/**
- * Fetch a TriggerInstance
+ * Delete the TriggerInstance
*
- * @return TriggerInstance Fetched TriggerInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Update the TriggerInstance
+ * Fetch the TriggerInstance
*
- * @param array|Options $options Optional Arguments
- * @return TriggerInstance Updated TriggerInstance
+ * @return TriggerInstance Fetched TriggerInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): TriggerInstance
{
- return $this->proxy()->update($options);
+
+ return $this->proxy()->fetch();
}
/**
- * Deletes the TriggerInstance
+ * Update the TriggerInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return TriggerInstance Updated TriggerInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): TriggerInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->update($options);
}
/**
@@ -134,7 +143,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -153,12 +162,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.TriggerInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/TriggerList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/TriggerList.php
index 42a0a48..3bd14fe 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/TriggerList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/TriggerList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account\Usage;
@@ -12,61 +19,98 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class TriggerList extends ListResource
-{
+ {
/**
* Construct the TriggerList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid A 34 character string that uniquely identifies
- * this resource.
- * @return \Twilio\Rest\Api\V2010\Account\Usage\TriggerList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.
*/
- public function __construct(Version $version, $accountSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid,);
-
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/Usage/Triggers.json';
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ ];
+
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/Usage/Triggers.json';
}
/**
- * Create a new TriggerInstance
+ * Create the TriggerInstance
*
- * @param string $callbackUrl The URL we call when the trigger fires
- * @param string $triggerValue The usage value at which the trigger should fire
- * @param string $usageCategory The usage category the trigger watches
+ * @param string $callbackUrl The URL we should call using `callback_method` when the trigger fires.
+ * @param string $triggerValue The usage value at which the trigger should fire. For convenience, you can use an offset value such as `+30` to specify a trigger_value that is 30 units more than the current usage value. Be sure to urlencode a `+` as `%2B`.
+ * @param string $usageCategory
* @param array|Options $options Optional Arguments
- * @return TriggerInstance Newly created TriggerInstance
+ * @return TriggerInstance Created TriggerInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($callbackUrl, $triggerValue, $usageCategory, $options = array())
+ public function create(string $callbackUrl, string $triggerValue, string $usageCategory, array $options = []): TriggerInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'CallbackUrl' => $callbackUrl,
- 'TriggerValue' => $triggerValue,
- 'UsageCategory' => $usageCategory,
- 'CallbackMethod' => $options['callbackMethod'],
- 'FriendlyName' => $options['friendlyName'],
- 'Recurring' => $options['recurring'],
- 'TriggerBy' => $options['triggerBy'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'CallbackUrl' =>
+ $callbackUrl,
+ 'TriggerValue' =>
+ $triggerValue,
+ 'UsageCategory' =>
+ $usageCategory,
+ 'CallbackMethod' =>
+ $options['callbackMethod'],
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'Recurring' =>
+ $options['recurring'],
+ 'TriggerBy' =>
+ $options['triggerBy'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new TriggerInstance(
+ $this->version,
+ $payload,
+ $this->solution['accountSid']
);
+ }
+
- return new TriggerInstance($this->version, $payload, $this->solution['accountSid']);
+ /**
+ * Reads TriggerInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return TriggerInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -86,9 +130,9 @@ public function create($callbackUrl, $triggerValue, $usageCategory, $options = a
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -97,54 +141,37 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads TriggerInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return TriggerInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of TriggerInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of TriggerInstance
+ * @return TriggerPage Page of TriggerInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): TriggerPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Recurring' => $options['recurring'],
- 'TriggerBy' => $options['triggerBy'],
- 'UsageCategory' => $options['usageCategory'],
+
+ $params = Values::of([
+ 'Recurring' =>
+ $options['recurring'],
+ 'TriggerBy' =>
+ $options['triggerBy'],
+ 'UsageCategory' =>
+ $options['usageCategory'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new TriggerPage($this->version, $response, $this->solution);
}
@@ -154,9 +181,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of TriggerInstance
+ * @return TriggerPage Page of TriggerInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): TriggerPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -166,15 +193,22 @@ public function getPage($targetUrl)
return new TriggerPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a TriggerContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\Usage\TriggerContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the UsageTrigger resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): TriggerContext
{
- return new TriggerContext($this->version, $this->solution['accountSid'], $sid);
+ return new TriggerContext(
+ $this->version,
+ $this->solution['accountSid'],
+ $sid
+ );
}
/**
@@ -182,8 +216,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.TriggerList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/TriggerOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/TriggerOptions.php
index 1221b13..faca817 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/TriggerOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/TriggerOptions.php
@@ -1,10 +1,16 @@
options['callbackMethod'] = $callbackMethod;
- $this->options['callbackUrl'] = $callbackUrl;
$this->options['friendlyName'] = $friendlyName;
+ $this->options['recurring'] = $recurring;
+ $this->options['triggerBy'] = $triggerBy;
}
/**
* The HTTP method we should use to call `callback_url`. Can be: `GET` or `POST` and the default is `POST`.
*
- * @param string $callbackMethod The HTTP method to use to call callback_url
+ * @param string $callbackMethod The HTTP method we should use to call `callback_url`. Can be: `GET` or `POST` and the default is `POST`.
* @return $this Fluent Builder
*/
- public function setCallbackMethod($callbackMethod)
+ public function setCallbackMethod(string $callbackMethod): self
{
$this->options['callbackMethod'] = $callbackMethod;
return $this;
}
/**
- * The URL we should call using `callback_method` when the trigger fires.
+ * A descriptive string that you create to describe the resource. It can be up to 64 characters long.
*
- * @param string $callbackUrl The URL we call when the trigger fires
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
* @return $this Fluent Builder
*/
- public function setCallbackUrl($callbackUrl)
+ public function setFriendlyName(string $friendlyName): self
{
- $this->options['callbackUrl'] = $callbackUrl;
+ $this->options['friendlyName'] = $friendlyName;
return $this;
}
/**
- * A descriptive string that you create to describe the resource. It can be up to 64 characters long.
- *
- * @param string $friendlyName A string to describe the resource
+ * @param string $recurring
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setRecurring(string $recurring): self
{
- $this->options['friendlyName'] = $friendlyName;
+ $this->options['recurring'] = $recurring;
+ return $this;
+ }
+
+ /**
+ * @param string $triggerBy
+ * @return $this Fluent Builder
+ */
+ public function setTriggerBy(string $triggerBy): self
+ {
+ $this->options['triggerBy'] = $triggerBy;
return $this;
}
@@ -105,81 +161,67 @@ public function setFriendlyName($friendlyName)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.UpdateTriggerOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.CreateTriggerOptions ' . $options . ']';
}
}
-class CreateTriggerOptions extends Options
-{
+
+
+class ReadTriggerOptions extends Options
+ {
/**
- * @param string $callbackMethod The HTTP method to use to call callback_url
- * @param string $friendlyName A string to describe the resource
- * @param string $recurring The frequency of a recurring UsageTrigger
- * @param string $triggerBy The field in the UsageRecord resource that fires
- * the trigger
+ * @param string $recurring The frequency of recurring UsageTriggers to read. Can be: `daily`, `monthly`, or `yearly` to read recurring UsageTriggers. An empty value or a value of `alltime` reads non-recurring UsageTriggers.
+ * @param string $triggerBy The trigger field of the UsageTriggers to read. Can be: `count`, `usage`, or `price` as described in the [UsageRecords documentation](https://www.twilio.com/docs/usage/api/usage-record#usage-count-price).
+ * @param string $usageCategory The usage category of the UsageTriggers to read. Must be a supported [usage categories](https://www.twilio.com/docs/usage/api/usage-record#usage-categories).
*/
- public function __construct($callbackMethod = Values::NONE, $friendlyName = Values::NONE, $recurring = Values::NONE, $triggerBy = Values::NONE)
- {
- $this->options['callbackMethod'] = $callbackMethod;
- $this->options['friendlyName'] = $friendlyName;
+ public function __construct(
+
+ string $recurring = Values::NONE,
+ string $triggerBy = Values::NONE,
+ string $usageCategory = Values::NONE
+
+ ) {
$this->options['recurring'] = $recurring;
$this->options['triggerBy'] = $triggerBy;
+ $this->options['usageCategory'] = $usageCategory;
}
/**
- * The HTTP method we should use to call `callback_url`. Can be: `GET` or `POST` and the default is `POST`.
- *
- * @param string $callbackMethod The HTTP method to use to call callback_url
- * @return $this Fluent Builder
- */
- public function setCallbackMethod($callbackMethod)
- {
- $this->options['callbackMethod'] = $callbackMethod;
- return $this;
- }
-
- /**
- * A descriptive string that you create to describe the resource. It can be up to 64 characters long.
+ * The frequency of recurring UsageTriggers to read. Can be: `daily`, `monthly`, or `yearly` to read recurring UsageTriggers. An empty value or a value of `alltime` reads non-recurring UsageTriggers.
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $recurring The frequency of recurring UsageTriggers to read. Can be: `daily`, `monthly`, or `yearly` to read recurring UsageTriggers. An empty value or a value of `alltime` reads non-recurring UsageTriggers.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setRecurring(string $recurring): self
{
- $this->options['friendlyName'] = $friendlyName;
+ $this->options['recurring'] = $recurring;
return $this;
}
/**
- * The frequency of a recurring UsageTrigger. Can be: `daily`, `monthly`, or `yearly` for recurring triggers or empty for non-recurring triggers. A trigger will only fire once during each period. Recurring times are in GMT.
+ * The trigger field of the UsageTriggers to read. Can be: `count`, `usage`, or `price` as described in the [UsageRecords documentation](https://www.twilio.com/docs/usage/api/usage-record#usage-count-price).
*
- * @param string $recurring The frequency of a recurring UsageTrigger
+ * @param string $triggerBy The trigger field of the UsageTriggers to read. Can be: `count`, `usage`, or `price` as described in the [UsageRecords documentation](https://www.twilio.com/docs/usage/api/usage-record#usage-count-price).
* @return $this Fluent Builder
*/
- public function setRecurring($recurring)
+ public function setTriggerBy(string $triggerBy): self
{
- $this->options['recurring'] = $recurring;
+ $this->options['triggerBy'] = $triggerBy;
return $this;
}
/**
- * The field in the [UsageRecord](https://www.twilio.com/docs/usage/api/usage-record) resource that should fire the trigger. Can be: `count`, `usage`, or `price` as described in the [UsageRecords documentation](https://www.twilio.com/docs/usage/api/usage-record#usage-count-price). The default is `usage`.
+ * The usage category of the UsageTriggers to read. Must be a supported [usage categories](https://www.twilio.com/docs/usage/api/usage-record#usage-categories).
*
- * @param string $triggerBy The field in the UsageRecord resource that fires
- * the trigger
+ * @param string $usageCategory The usage category of the UsageTriggers to read. Must be a supported [usage categories](https://www.twilio.com/docs/usage/api/usage-record#usage-categories).
* @return $this Fluent Builder
*/
- public function setTriggerBy($triggerBy)
+ public function setUsageCategory(string $usageCategory): self
{
- $this->options['triggerBy'] = $triggerBy;
+ $this->options['usageCategory'] = $usageCategory;
return $this;
}
@@ -188,65 +230,65 @@ public function setTriggerBy($triggerBy)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.CreateTriggerOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.ReadTriggerOptions ' . $options . ']';
}
}
-class ReadTriggerOptions extends Options
-{
+class UpdateTriggerOptions extends Options
+ {
/**
- * @param string $recurring The frequency of recurring UsageTriggers to read
- * @param string $triggerBy The trigger field of the UsageTriggers to read
- * @param string $usageCategory The usage category of the UsageTriggers to read
+ * @param string $callbackMethod The HTTP method we should use to call `callback_url`. Can be: `GET` or `POST` and the default is `POST`.
+ * @param string $callbackUrl The URL we should call using `callback_method` when the trigger fires.
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
*/
- public function __construct($recurring = Values::NONE, $triggerBy = Values::NONE, $usageCategory = Values::NONE)
- {
- $this->options['recurring'] = $recurring;
- $this->options['triggerBy'] = $triggerBy;
- $this->options['usageCategory'] = $usageCategory;
+ public function __construct(
+
+ string $callbackMethod = Values::NONE,
+ string $callbackUrl = Values::NONE,
+ string $friendlyName = Values::NONE
+
+ ) {
+ $this->options['callbackMethod'] = $callbackMethod;
+ $this->options['callbackUrl'] = $callbackUrl;
+ $this->options['friendlyName'] = $friendlyName;
}
/**
- * The frequency of recurring UsageTriggers to read. Can be: `daily`, `monthly`, or `yearly` to read recurring UsageTriggers. An empty value or a value of `alltime` reads non-recurring UsageTriggers.
+ * The HTTP method we should use to call `callback_url`. Can be: `GET` or `POST` and the default is `POST`.
*
- * @param string $recurring The frequency of recurring UsageTriggers to read
+ * @param string $callbackMethod The HTTP method we should use to call `callback_url`. Can be: `GET` or `POST` and the default is `POST`.
* @return $this Fluent Builder
*/
- public function setRecurring($recurring)
+ public function setCallbackMethod(string $callbackMethod): self
{
- $this->options['recurring'] = $recurring;
+ $this->options['callbackMethod'] = $callbackMethod;
return $this;
}
/**
- * The trigger field of the UsageTriggers to read. Can be: `count`, `usage`, or `price` as described in the [UsageRecords documentation](https://www.twilio.com/docs/usage/api/usage-record#usage-count-price).
+ * The URL we should call using `callback_method` when the trigger fires.
*
- * @param string $triggerBy The trigger field of the UsageTriggers to read
+ * @param string $callbackUrl The URL we should call using `callback_method` when the trigger fires.
* @return $this Fluent Builder
*/
- public function setTriggerBy($triggerBy)
+ public function setCallbackUrl(string $callbackUrl): self
{
- $this->options['triggerBy'] = $triggerBy;
+ $this->options['callbackUrl'] = $callbackUrl;
return $this;
}
/**
- * The usage category of the UsageTriggers to read. Must be a supported [usage categories](https://www.twilio.com/docs/usage/api/usage-record#usage-categories).
+ * A descriptive string that you create to describe the resource. It can be up to 64 characters long.
*
- * @param string $usageCategory The usage category of the UsageTriggers to read
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
* @return $this Fluent Builder
*/
- public function setUsageCategory($usageCategory)
+ public function setFriendlyName(string $friendlyName): self
{
- $this->options['usageCategory'] = $usageCategory;
+ $this->options['friendlyName'] = $friendlyName;
return $this;
}
@@ -255,14 +297,10 @@ public function setUsageCategory($usageCategory)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.ReadTriggerOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.UpdateTriggerOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/TriggerPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/TriggerPage.php
index b7b0e36..fe7bea2 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/TriggerPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Usage/TriggerPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return TriggerInstance \Twilio\Rest\Api\V2010\Account\Usage\TriggerInstance
+ */
+ public function buildInstance(array $payload): TriggerInstance
{
return new TriggerInstance($this->version, $payload, $this->solution['accountSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.TriggerPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/UsageInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/UsageInstance.php
index 69ef699..1c25180 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/UsageInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/UsageInstance.php
@@ -2,34 +2,40 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
-use Twilio\Values;
use Twilio\Version;
+
class UsageInstance extends InstanceResource
{
/**
* Initialize the UsageInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid A 34 character string that uniquely identifies
- * this resource.
- * @return \Twilio\Rest\Api\V2010\Account\UsageInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read.
*/
- public function __construct(Version $version, array $payload, $accountSid)
+ public function __construct(Version $version, array $payload, string $accountSid)
{
parent::__construct($version);
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = ['accountSid' => $accountSid, ];
}
/**
@@ -39,7 +45,7 @@ public function __construct(Version $version, array $payload, $accountSid)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -58,8 +64,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.UsageInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/UsageList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/UsageList.php
index e677047..5d32528 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/UsageList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/UsageList.php
@@ -2,26 +2,35 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
+use Twilio\Version;
+use Twilio\InstanceContext;
use Twilio\Rest\Api\V2010\Account\Usage\RecordList;
use Twilio\Rest\Api\V2010\Account\Usage\TriggerList;
-use Twilio\Version;
+
/**
- * @property \Twilio\Rest\Api\V2010\Account\Usage\RecordList $records
- * @property \Twilio\Rest\Api\V2010\Account\Usage\TriggerList $triggers
+ * @property RecordList $records
+ * @property TriggerList $triggers
* @method \Twilio\Rest\Api\V2010\Account\Usage\TriggerContext triggers(string $sid)
*/
class UsageList extends ListResource
-{
+ {
protected $_records = null;
protected $_triggers = null;
@@ -29,39 +38,47 @@ class UsageList extends ListResource
* Construct the UsageList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid A 34 character string that uniquely identifies
- * this resource.
- * @return \Twilio\Rest\Api\V2010\Account\UsageList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the UsageRecord resources to read.
*/
- public function __construct(Version $version, $accountSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ ];
}
/**
* Access the records
*/
- protected function getRecords()
+ protected function getRecords(): RecordList
{
if (!$this->_records) {
- $this->_records = new RecordList($this->version, $this->solution['accountSid']);
+ $this->_records = new RecordList(
+ $this->version,
+ $this->solution['accountSid']
+ );
}
-
return $this->_records;
}
/**
* Access the triggers
*/
- protected function getTriggers()
+ protected function getTriggers(): TriggerList
{
if (!$this->_triggers) {
- $this->_triggers = new TriggerList($this->version, $this->solution['accountSid']);
+ $this->_triggers = new TriggerList(
+ $this->version,
+ $this->solution['accountSid']
+ );
}
-
return $this->_triggers;
}
@@ -72,7 +89,7 @@ protected function getTriggers()
* @return \Twilio\ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -87,10 +104,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -105,8 +122,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.UsageList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/UsagePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/UsagePage.php
index 5320517..ba2b5ee 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/UsagePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/UsagePage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return UsageInstance \Twilio\Rest\Api\V2010\Account\UsageInstance
+ */
+ public function buildInstance(array $payload): UsageInstance
{
return new UsageInstance($this->version, $payload, $this->solution['accountSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.UsagePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ValidationRequestInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ValidationRequestInstance.php
index 70f209a..be3ef87 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ValidationRequestInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ValidationRequestInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010\Account;
use Twilio\Exceptions\TwilioException;
@@ -14,37 +22,37 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * @property string $accountSid
- * @property string $phoneNumber
- * @property string $friendlyName
- * @property int $validationCode
- * @property string $callSid
+ * @property string|null $accountSid
+ * @property string|null $callSid
+ * @property string|null $friendlyName
+ * @property string|null $phoneNumber
+ * @property string|null $validationCode
*/
class ValidationRequestInstance extends InstanceResource
{
/**
* Initialize the ValidationRequestInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $accountSid The SID of the Account that created the resource
- * @return \Twilio\Rest\Api\V2010\Account\ValidationRequestInstance
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for the new caller ID resource.
*/
- public function __construct(Version $version, array $payload, $accountSid)
+ public function __construct(Version $version, array $payload, string $accountSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
- 'phoneNumber' => Values::array_get($payload, 'phone_number'),
+ 'callSid' => Values::array_get($payload, 'call_sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
+ 'phoneNumber' => Values::array_get($payload, 'phone_number'),
'validationCode' => Values::array_get($payload, 'validation_code'),
- 'callSid' => Values::array_get($payload, 'call_sid'),
- );
+ ];
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = ['accountSid' => $accountSid, ];
}
/**
@@ -54,7 +62,7 @@ public function __construct(Version $version, array $payload, $accountSid)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -73,8 +81,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.ValidationRequestInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ValidationRequestList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ValidationRequestList.php
index a8e26e9..15c74e4 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ValidationRequestList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ValidationRequestList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010\Account;
@@ -15,63 +22,78 @@
use Twilio\Values;
use Twilio\Version;
+
class ValidationRequestList extends ListResource
-{
+ {
/**
* Construct the ValidationRequestList
*
* @param Version $version Version that contains the resource
- * @param string $accountSid The SID of the Account that created the resource
- * @return \Twilio\Rest\Api\V2010\Account\ValidationRequestList
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) responsible for the new caller ID resource.
*/
- public function __construct(Version $version, $accountSid)
- {
+ public function __construct(
+ Version $version,
+ string $accountSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('accountSid' => $accountSid,);
+ $this->solution = [
+ 'accountSid' =>
+ $accountSid,
+
+ ];
- $this->uri = '/Accounts/' . \rawurlencode($accountSid) . '/OutgoingCallerIds.json';
+ $this->uri = '/Accounts/' . \rawurlencode($accountSid)
+ .'/OutgoingCallerIds.json';
}
/**
- * Create a new ValidationRequestInstance
+ * Create the ValidationRequestInstance
*
- * @param string $phoneNumber The phone number to verify in E.164 format
+ * @param string $phoneNumber The phone number to verify in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, which consists of a + followed by the country code and subscriber number.
* @param array|Options $options Optional Arguments
- * @return ValidationRequestInstance Newly created ValidationRequestInstance
+ * @return ValidationRequestInstance Created ValidationRequestInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($phoneNumber, $options = array())
+ public function create(string $phoneNumber, array $options = []): ValidationRequestInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'PhoneNumber' => $phoneNumber,
- 'FriendlyName' => $options['friendlyName'],
- 'CallDelay' => $options['callDelay'],
- 'Extension' => $options['extension'],
- 'StatusCallback' => $options['statusCallback'],
- 'StatusCallbackMethod' => $options['statusCallbackMethod'],
- ));
+ $data = Values::of([
+ 'PhoneNumber' =>
+ $phoneNumber,
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'CallDelay' =>
+ $options['callDelay'],
+ 'Extension' =>
+ $options['extension'],
+ 'StatusCallback' =>
+ $options['statusCallback'],
+ 'StatusCallbackMethod' =>
+ $options['statusCallbackMethod'],
+ ]);
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
- return new ValidationRequestInstance($this->version, $payload, $this->solution['accountSid']);
+ return new ValidationRequestInstance(
+ $this->version,
+ $payload,
+ $this->solution['accountSid']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.ValidationRequestList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ValidationRequestOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ValidationRequestOptions.php
index 851dd0e..9ba9afd 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ValidationRequestOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ValidationRequestOptions.php
@@ -1,10 +1,16 @@
options['friendlyName'] = $friendlyName;
$this->options['callDelay'] = $callDelay;
$this->options['extension'] = $extension;
@@ -57,10 +77,10 @@ public function __construct($friendlyName = Values::NONE, $callDelay = Values::N
/**
* A descriptive string that you create to describe the new caller ID resource. It can be up to 64 characters long. The default value is a formatted version of the phone number.
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName A descriptive string that you create to describe the new caller ID resource. It can be up to 64 characters long. The default value is a formatted version of the phone number.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -69,11 +89,10 @@ public function setFriendlyName($friendlyName)
/**
* The number of seconds to delay before initiating the verification call. Can be an integer between `0` and `60`, inclusive. The default is `0`.
*
- * @param int $callDelay The number of seconds to delay before initiating the
- * verification call
+ * @param int $callDelay The number of seconds to delay before initiating the verification call. Can be an integer between `0` and `60`, inclusive. The default is `0`.
* @return $this Fluent Builder
*/
- public function setCallDelay($callDelay)
+ public function setCallDelay(int $callDelay): self
{
$this->options['callDelay'] = $callDelay;
return $this;
@@ -82,11 +101,10 @@ public function setCallDelay($callDelay)
/**
* The digits to dial after connecting the verification call.
*
- * @param string $extension The digits to dial after connecting the
- * verification call
+ * @param string $extension The digits to dial after connecting the verification call.
* @return $this Fluent Builder
*/
- public function setExtension($extension)
+ public function setExtension(string $extension): self
{
$this->options['extension'] = $extension;
return $this;
@@ -95,11 +113,10 @@ public function setExtension($extension)
/**
* The URL we should call using the `status_callback_method` to send status information about the verification process to your application.
*
- * @param string $statusCallback The URL we should call to send status
- * information to your application
+ * @param string $statusCallback The URL we should call using the `status_callback_method` to send status information about the verification process to your application.
* @return $this Fluent Builder
*/
- public function setStatusCallback($statusCallback)
+ public function setStatusCallback(string $statusCallback): self
{
$this->options['statusCallback'] = $statusCallback;
return $this;
@@ -108,11 +125,10 @@ public function setStatusCallback($statusCallback)
/**
* The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST`, and the default is `POST`.
*
- * @param string $statusCallbackMethod The HTTP method we should use to call
- * status_callback
+ * @param string $statusCallbackMethod The HTTP method we should use to call `status_callback`. Can be: `GET` or `POST`, and the default is `POST`.
* @return $this Fluent Builder
*/
- public function setStatusCallbackMethod($statusCallbackMethod)
+ public function setStatusCallbackMethod(string $statusCallbackMethod): self
{
$this->options['statusCallbackMethod'] = $statusCallbackMethod;
return $this;
@@ -123,14 +139,10 @@ public function setStatusCallbackMethod($statusCallbackMethod)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.CreateValidationRequestOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.CreateValidationRequestOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ValidationRequestPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ValidationRequestPage.php
index a730224..e36a285 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ValidationRequestPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/ValidationRequestPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return ValidationRequestInstance \Twilio\Rest\Api\V2010\Account\ValidationRequestInstance
+ */
+ public function buildInstance(array $payload): ValidationRequestInstance
{
return new ValidationRequestInstance($this->version, $payload, $this->solution['accountSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.ValidationRequestPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/AccountContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/AccountContext.php
index 3277695..1f67680 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/AccountContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/AccountContext.php
@@ -2,149 +2,165 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Api\V2010\Account\AddressList;
+use Twilio\Values;
+use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Api\V2010\Account\RecordingList;
+use Twilio\Rest\Api\V2010\Account\UsageList;
+use Twilio\Rest\Api\V2010\Account\MessageList;
+use Twilio\Rest\Api\V2010\Account\KeyList;
+use Twilio\Rest\Api\V2010\Account\NewKeyList;
use Twilio\Rest\Api\V2010\Account\ApplicationList;
-use Twilio\Rest\Api\V2010\Account\AuthorizedConnectAppList;
-use Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountryList;
-use Twilio\Rest\Api\V2010\Account\BalanceList;
-use Twilio\Rest\Api\V2010\Account\CallList;
+use Twilio\Rest\Api\V2010\Account\IncomingPhoneNumberList;
use Twilio\Rest\Api\V2010\Account\ConferenceList;
+use Twilio\Rest\Api\V2010\Account\CallList;
+use Twilio\Rest\Api\V2010\Account\OutgoingCallerIdList;
+use Twilio\Rest\Api\V2010\Account\ValidationRequestList;
+use Twilio\Rest\Api\V2010\Account\TranscriptionList;
use Twilio\Rest\Api\V2010\Account\ConnectAppList;
-use Twilio\Rest\Api\V2010\Account\IncomingPhoneNumberList;
-use Twilio\Rest\Api\V2010\Account\KeyList;
-use Twilio\Rest\Api\V2010\Account\MessageList;
-use Twilio\Rest\Api\V2010\Account\NewKeyList;
-use Twilio\Rest\Api\V2010\Account\NewSigningKeyList;
+use Twilio\Rest\Api\V2010\Account\AuthorizedConnectAppList;
+use Twilio\Rest\Api\V2010\Account\TokenList;
+use Twilio\Rest\Api\V2010\Account\BalanceList;
+use Twilio\Rest\Api\V2010\Account\SipList;
use Twilio\Rest\Api\V2010\Account\NotificationList;
-use Twilio\Rest\Api\V2010\Account\OutgoingCallerIdList;
+use Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountryList;
+use Twilio\Rest\Api\V2010\Account\AddressList;
use Twilio\Rest\Api\V2010\Account\QueueList;
-use Twilio\Rest\Api\V2010\Account\RecordingList;
use Twilio\Rest\Api\V2010\Account\ShortCodeList;
use Twilio\Rest\Api\V2010\Account\SigningKeyList;
-use Twilio\Rest\Api\V2010\Account\SipList;
-use Twilio\Rest\Api\V2010\Account\TokenList;
-use Twilio\Rest\Api\V2010\Account\TranscriptionList;
-use Twilio\Rest\Api\V2010\Account\UsageList;
-use Twilio\Rest\Api\V2010\Account\ValidationRequestList;
-use Twilio\Values;
-use Twilio\Version;
+use Twilio\Rest\Api\V2010\Account\NewSigningKeyList;
+
/**
- * @property \Twilio\Rest\Api\V2010\Account\AddressList $addresses
- * @property \Twilio\Rest\Api\V2010\Account\ApplicationList $applications
- * @property \Twilio\Rest\Api\V2010\Account\AuthorizedConnectAppList $authorizedConnectApps
- * @property \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountryList $availablePhoneNumbers
- * @property \Twilio\Rest\Api\V2010\Account\BalanceList $balance
- * @property \Twilio\Rest\Api\V2010\Account\CallList $calls
- * @property \Twilio\Rest\Api\V2010\Account\ConferenceList $conferences
- * @property \Twilio\Rest\Api\V2010\Account\ConnectAppList $connectApps
- * @property \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumberList $incomingPhoneNumbers
- * @property \Twilio\Rest\Api\V2010\Account\KeyList $keys
- * @property \Twilio\Rest\Api\V2010\Account\MessageList $messages
- * @property \Twilio\Rest\Api\V2010\Account\NewKeyList $newKeys
- * @property \Twilio\Rest\Api\V2010\Account\NewSigningKeyList $newSigningKeys
- * @property \Twilio\Rest\Api\V2010\Account\NotificationList $notifications
- * @property \Twilio\Rest\Api\V2010\Account\OutgoingCallerIdList $outgoingCallerIds
- * @property \Twilio\Rest\Api\V2010\Account\QueueList $queues
- * @property \Twilio\Rest\Api\V2010\Account\RecordingList $recordings
- * @property \Twilio\Rest\Api\V2010\Account\SigningKeyList $signingKeys
- * @property \Twilio\Rest\Api\V2010\Account\SipList $sip
- * @property \Twilio\Rest\Api\V2010\Account\ShortCodeList $shortCodes
- * @property \Twilio\Rest\Api\V2010\Account\TokenList $tokens
- * @property \Twilio\Rest\Api\V2010\Account\TranscriptionList $transcriptions
- * @property \Twilio\Rest\Api\V2010\Account\UsageList $usage
- * @property \Twilio\Rest\Api\V2010\Account\ValidationRequestList $validationRequests
- * @method \Twilio\Rest\Api\V2010\Account\AddressContext addresses(string $sid)
+ * @property RecordingList $recordings
+ * @property UsageList $usage
+ * @property MessageList $messages
+ * @property KeyList $keys
+ * @property NewKeyList $newKeys
+ * @property ApplicationList $applications
+ * @property IncomingPhoneNumberList $incomingPhoneNumbers
+ * @property ConferenceList $conferences
+ * @property CallList $calls
+ * @property OutgoingCallerIdList $outgoingCallerIds
+ * @property ValidationRequestList $validationRequests
+ * @property TranscriptionList $transcriptions
+ * @property ConnectAppList $connectApps
+ * @property AuthorizedConnectAppList $authorizedConnectApps
+ * @property TokenList $tokens
+ * @property BalanceList $balance
+ * @property SipList $sip
+ * @property NotificationList $notifications
+ * @property AvailablePhoneNumberCountryList $availablePhoneNumbers
+ * @property AddressList $addresses
+ * @property QueueList $queues
+ * @property ShortCodeList $shortCodes
+ * @property SigningKeyList $signingKeys
+ * @property NewSigningKeyList $newSigningKeys
* @method \Twilio\Rest\Api\V2010\Account\ApplicationContext applications(string $sid)
+ * @method \Twilio\Rest\Api\V2010\Account\RecordingContext recordings(string $sid)
+ * @method \Twilio\Rest\Api\V2010\Account\ConnectAppContext connectApps(string $sid)
+ * @method \Twilio\Rest\Api\V2010\Account\CallContext calls(string $sid)
+ * @method \Twilio\Rest\Api\V2010\Account\SigningKeyContext signingKeys(string $sid)
+ * @method \Twilio\Rest\Api\V2010\Account\OutgoingCallerIdContext outgoingCallerIds(string $sid)
+ * @method \Twilio\Rest\Api\V2010\Account\ShortCodeContext shortCodes(string $sid)
+ * @method \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumberContext incomingPhoneNumbers(string $sid)
+ * @method \Twilio\Rest\Api\V2010\Account\QueueContext queues(string $sid)
* @method \Twilio\Rest\Api\V2010\Account\AuthorizedConnectAppContext authorizedConnectApps(string $connectAppSid)
* @method \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountryContext availablePhoneNumbers(string $countryCode)
- * @method \Twilio\Rest\Api\V2010\Account\CallContext calls(string $sid)
+ * @method \Twilio\Rest\Api\V2010\Account\AddressContext addresses(string $sid)
+ * @method \Twilio\Rest\Api\V2010\Account\TranscriptionContext transcriptions(string $sid)
* @method \Twilio\Rest\Api\V2010\Account\ConferenceContext conferences(string $sid)
- * @method \Twilio\Rest\Api\V2010\Account\ConnectAppContext connectApps(string $sid)
- * @method \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumberContext incomingPhoneNumbers(string $sid)
* @method \Twilio\Rest\Api\V2010\Account\KeyContext keys(string $sid)
- * @method \Twilio\Rest\Api\V2010\Account\MessageContext messages(string $sid)
* @method \Twilio\Rest\Api\V2010\Account\NotificationContext notifications(string $sid)
- * @method \Twilio\Rest\Api\V2010\Account\OutgoingCallerIdContext outgoingCallerIds(string $sid)
- * @method \Twilio\Rest\Api\V2010\Account\QueueContext queues(string $sid)
- * @method \Twilio\Rest\Api\V2010\Account\RecordingContext recordings(string $sid)
- * @method \Twilio\Rest\Api\V2010\Account\SigningKeyContext signingKeys(string $sid)
- * @method \Twilio\Rest\Api\V2010\Account\ShortCodeContext shortCodes(string $sid)
- * @method \Twilio\Rest\Api\V2010\Account\TranscriptionContext transcriptions(string $sid)
+ * @method \Twilio\Rest\Api\V2010\Account\MessageContext messages(string $sid)
*/
class AccountContext extends InstanceContext
-{
- protected $_addresses = null;
- protected $_applications = null;
- protected $_authorizedConnectApps = null;
- protected $_availablePhoneNumbers = null;
- protected $_balance = null;
- protected $_calls = null;
- protected $_conferences = null;
- protected $_connectApps = null;
- protected $_incomingPhoneNumbers = null;
- protected $_keys = null;
- protected $_messages = null;
- protected $_newKeys = null;
- protected $_newSigningKeys = null;
- protected $_notifications = null;
- protected $_outgoingCallerIds = null;
- protected $_queues = null;
- protected $_recordings = null;
- protected $_signingKeys = null;
- protected $_sip = null;
- protected $_shortCodes = null;
- protected $_tokens = null;
- protected $_transcriptions = null;
- protected $_usage = null;
- protected $_validationRequests = null;
+ {
+ protected $_recordings;
+ protected $_usage;
+ protected $_messages;
+ protected $_keys;
+ protected $_newKeys;
+ protected $_applications;
+ protected $_incomingPhoneNumbers;
+ protected $_conferences;
+ protected $_calls;
+ protected $_outgoingCallerIds;
+ protected $_validationRequests;
+ protected $_transcriptions;
+ protected $_connectApps;
+ protected $_authorizedConnectApps;
+ protected $_tokens;
+ protected $_balance;
+ protected $_sip;
+ protected $_notifications;
+ protected $_availablePhoneNumbers;
+ protected $_addresses;
+ protected $_queues;
+ protected $_shortCodes;
+ protected $_signingKeys;
+ protected $_newSigningKeys;
/**
* Initialize the AccountContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid Fetch by unique Account Sid
- * @return \Twilio\Rest\Api\V2010\AccountContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid The Account Sid that uniquely identifies the account to fetch
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Accounts/' . \rawurlencode($sid) . '.json';
+ $this->uri = '/Accounts/' . \rawurlencode($sid)
+ .'.json';
}
/**
- * Fetch a AccountInstance
+ * Fetch the AccountInstance
*
* @return AccountInstance Fetched AccountInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): AccountInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
- return new AccountInstance($this->version, $payload, $this->solution['sid']);
+ return new AccountInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Update the AccountInstance
*
@@ -152,375 +168,397 @@ public function fetch()
* @return AccountInstance Updated AccountInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): AccountInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'Status' => $options['status'],
- ));
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'Status' =>
+ $options['status'],
+ ]);
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
- return new AccountInstance($this->version, $payload, $this->solution['sid']);
+ return new AccountInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
- * Access the addresses
- *
- * @return \Twilio\Rest\Api\V2010\Account\AddressList
+ * Access the recordings
*/
- protected function getAddresses()
+ protected function getRecordings(): RecordingList
{
- if (!$this->_addresses) {
- $this->_addresses = new AddressList($this->version, $this->solution['sid']);
+ if (!$this->_recordings) {
+ $this->_recordings = new RecordingList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_addresses;
+ return $this->_recordings;
}
/**
- * Access the applications
- *
- * @return \Twilio\Rest\Api\V2010\Account\ApplicationList
+ * Access the usage
*/
- protected function getApplications()
+ protected function getUsage(): UsageList
{
- if (!$this->_applications) {
- $this->_applications = new ApplicationList($this->version, $this->solution['sid']);
+ if (!$this->_usage) {
+ $this->_usage = new UsageList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_applications;
+ return $this->_usage;
}
/**
- * Access the authorizedConnectApps
- *
- * @return \Twilio\Rest\Api\V2010\Account\AuthorizedConnectAppList
+ * Access the messages
*/
- protected function getAuthorizedConnectApps()
+ protected function getMessages(): MessageList
{
- if (!$this->_authorizedConnectApps) {
- $this->_authorizedConnectApps = new AuthorizedConnectAppList(
+ if (!$this->_messages) {
+ $this->_messages = new MessageList(
$this->version,
$this->solution['sid']
);
}
- return $this->_authorizedConnectApps;
+ return $this->_messages;
}
/**
- * Access the availablePhoneNumbers
- *
- * @return \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountryList
+ * Access the keys
*/
- protected function getAvailablePhoneNumbers()
+ protected function getKeys(): KeyList
{
- if (!$this->_availablePhoneNumbers) {
- $this->_availablePhoneNumbers = new AvailablePhoneNumberCountryList(
+ if (!$this->_keys) {
+ $this->_keys = new KeyList(
$this->version,
$this->solution['sid']
);
}
- return $this->_availablePhoneNumbers;
+ return $this->_keys;
}
/**
- * Access the balance
- *
- * @return \Twilio\Rest\Api\V2010\Account\BalanceList
+ * Access the newKeys
*/
- protected function getBalance()
+ protected function getNewKeys(): NewKeyList
{
- if (!$this->_balance) {
- $this->_balance = new BalanceList($this->version, $this->solution['sid']);
+ if (!$this->_newKeys) {
+ $this->_newKeys = new NewKeyList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_balance;
+ return $this->_newKeys;
}
/**
- * Access the calls
- *
- * @return \Twilio\Rest\Api\V2010\Account\CallList
+ * Access the applications
*/
- protected function getCalls()
+ protected function getApplications(): ApplicationList
{
- if (!$this->_calls) {
- $this->_calls = new CallList($this->version, $this->solution['sid']);
+ if (!$this->_applications) {
+ $this->_applications = new ApplicationList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_calls;
+ return $this->_applications;
}
/**
- * Access the conferences
- *
- * @return \Twilio\Rest\Api\V2010\Account\ConferenceList
+ * Access the incomingPhoneNumbers
*/
- protected function getConferences()
+ protected function getIncomingPhoneNumbers(): IncomingPhoneNumberList
{
- if (!$this->_conferences) {
- $this->_conferences = new ConferenceList($this->version, $this->solution['sid']);
+ if (!$this->_incomingPhoneNumbers) {
+ $this->_incomingPhoneNumbers = new IncomingPhoneNumberList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_conferences;
+ return $this->_incomingPhoneNumbers;
}
/**
- * Access the connectApps
- *
- * @return \Twilio\Rest\Api\V2010\Account\ConnectAppList
+ * Access the conferences
*/
- protected function getConnectApps()
+ protected function getConferences(): ConferenceList
{
- if (!$this->_connectApps) {
- $this->_connectApps = new ConnectAppList($this->version, $this->solution['sid']);
+ if (!$this->_conferences) {
+ $this->_conferences = new ConferenceList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_connectApps;
+ return $this->_conferences;
}
/**
- * Access the incomingPhoneNumbers
- *
- * @return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumberList
+ * Access the calls
*/
- protected function getIncomingPhoneNumbers()
+ protected function getCalls(): CallList
{
- if (!$this->_incomingPhoneNumbers) {
- $this->_incomingPhoneNumbers = new IncomingPhoneNumberList($this->version, $this->solution['sid']);
+ if (!$this->_calls) {
+ $this->_calls = new CallList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_incomingPhoneNumbers;
+ return $this->_calls;
}
/**
- * Access the keys
- *
- * @return \Twilio\Rest\Api\V2010\Account\KeyList
+ * Access the outgoingCallerIds
*/
- protected function getKeys()
+ protected function getOutgoingCallerIds(): OutgoingCallerIdList
{
- if (!$this->_keys) {
- $this->_keys = new KeyList($this->version, $this->solution['sid']);
+ if (!$this->_outgoingCallerIds) {
+ $this->_outgoingCallerIds = new OutgoingCallerIdList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_keys;
+ return $this->_outgoingCallerIds;
}
/**
- * Access the messages
- *
- * @return \Twilio\Rest\Api\V2010\Account\MessageList
+ * Access the validationRequests
*/
- protected function getMessages()
+ protected function getValidationRequests(): ValidationRequestList
{
- if (!$this->_messages) {
- $this->_messages = new MessageList($this->version, $this->solution['sid']);
+ if (!$this->_validationRequests) {
+ $this->_validationRequests = new ValidationRequestList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_messages;
+ return $this->_validationRequests;
}
/**
- * Access the newKeys
- *
- * @return \Twilio\Rest\Api\V2010\Account\NewKeyList
+ * Access the transcriptions
*/
- protected function getNewKeys()
+ protected function getTranscriptions(): TranscriptionList
{
- if (!$this->_newKeys) {
- $this->_newKeys = new NewKeyList($this->version, $this->solution['sid']);
+ if (!$this->_transcriptions) {
+ $this->_transcriptions = new TranscriptionList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_newKeys;
+ return $this->_transcriptions;
}
/**
- * Access the newSigningKeys
- *
- * @return \Twilio\Rest\Api\V2010\Account\NewSigningKeyList
+ * Access the connectApps
*/
- protected function getNewSigningKeys()
+ protected function getConnectApps(): ConnectAppList
{
- if (!$this->_newSigningKeys) {
- $this->_newSigningKeys = new NewSigningKeyList($this->version, $this->solution['sid']);
+ if (!$this->_connectApps) {
+ $this->_connectApps = new ConnectAppList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_newSigningKeys;
+ return $this->_connectApps;
}
/**
- * Access the notifications
- *
- * @return \Twilio\Rest\Api\V2010\Account\NotificationList
+ * Access the authorizedConnectApps
*/
- protected function getNotifications()
+ protected function getAuthorizedConnectApps(): AuthorizedConnectAppList
{
- if (!$this->_notifications) {
- $this->_notifications = new NotificationList($this->version, $this->solution['sid']);
+ if (!$this->_authorizedConnectApps) {
+ $this->_authorizedConnectApps = new AuthorizedConnectAppList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_notifications;
+ return $this->_authorizedConnectApps;
}
/**
- * Access the outgoingCallerIds
- *
- * @return \Twilio\Rest\Api\V2010\Account\OutgoingCallerIdList
+ * Access the tokens
*/
- protected function getOutgoingCallerIds()
+ protected function getTokens(): TokenList
{
- if (!$this->_outgoingCallerIds) {
- $this->_outgoingCallerIds = new OutgoingCallerIdList($this->version, $this->solution['sid']);
+ if (!$this->_tokens) {
+ $this->_tokens = new TokenList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_outgoingCallerIds;
+ return $this->_tokens;
}
/**
- * Access the queues
- *
- * @return \Twilio\Rest\Api\V2010\Account\QueueList
+ * Access the balance
*/
- protected function getQueues()
+ protected function getBalance(): BalanceList
{
- if (!$this->_queues) {
- $this->_queues = new QueueList($this->version, $this->solution['sid']);
+ if (!$this->_balance) {
+ $this->_balance = new BalanceList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_queues;
+ return $this->_balance;
}
/**
- * Access the recordings
- *
- * @return \Twilio\Rest\Api\V2010\Account\RecordingList
+ * Access the sip
*/
- protected function getRecordings()
+ protected function getSip(): SipList
{
- if (!$this->_recordings) {
- $this->_recordings = new RecordingList($this->version, $this->solution['sid']);
+ if (!$this->_sip) {
+ $this->_sip = new SipList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_recordings;
+ return $this->_sip;
}
/**
- * Access the signingKeys
- *
- * @return \Twilio\Rest\Api\V2010\Account\SigningKeyList
+ * Access the notifications
*/
- protected function getSigningKeys()
+ protected function getNotifications(): NotificationList
{
- if (!$this->_signingKeys) {
- $this->_signingKeys = new SigningKeyList($this->version, $this->solution['sid']);
+ if (!$this->_notifications) {
+ $this->_notifications = new NotificationList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_signingKeys;
+ return $this->_notifications;
}
/**
- * Access the sip
- *
- * @return \Twilio\Rest\Api\V2010\Account\SipList
+ * Access the availablePhoneNumbers
*/
- protected function getSip()
+ protected function getAvailablePhoneNumbers(): AvailablePhoneNumberCountryList
{
- if (!$this->_sip) {
- $this->_sip = new SipList($this->version, $this->solution['sid']);
+ if (!$this->_availablePhoneNumbers) {
+ $this->_availablePhoneNumbers = new AvailablePhoneNumberCountryList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_sip;
+ return $this->_availablePhoneNumbers;
}
/**
- * Access the shortCodes
- *
- * @return \Twilio\Rest\Api\V2010\Account\ShortCodeList
+ * Access the addresses
*/
- protected function getShortCodes()
+ protected function getAddresses(): AddressList
{
- if (!$this->_shortCodes) {
- $this->_shortCodes = new ShortCodeList($this->version, $this->solution['sid']);
+ if (!$this->_addresses) {
+ $this->_addresses = new AddressList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_shortCodes;
+ return $this->_addresses;
}
/**
- * Access the tokens
- *
- * @return \Twilio\Rest\Api\V2010\Account\TokenList
+ * Access the queues
*/
- protected function getTokens()
+ protected function getQueues(): QueueList
{
- if (!$this->_tokens) {
- $this->_tokens = new TokenList($this->version, $this->solution['sid']);
+ if (!$this->_queues) {
+ $this->_queues = new QueueList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_tokens;
+ return $this->_queues;
}
/**
- * Access the transcriptions
- *
- * @return \Twilio\Rest\Api\V2010\Account\TranscriptionList
+ * Access the shortCodes
*/
- protected function getTranscriptions()
+ protected function getShortCodes(): ShortCodeList
{
- if (!$this->_transcriptions) {
- $this->_transcriptions = new TranscriptionList($this->version, $this->solution['sid']);
+ if (!$this->_shortCodes) {
+ $this->_shortCodes = new ShortCodeList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_transcriptions;
+ return $this->_shortCodes;
}
/**
- * Access the usage
- *
- * @return \Twilio\Rest\Api\V2010\Account\UsageList
+ * Access the signingKeys
*/
- protected function getUsage()
+ protected function getSigningKeys(): SigningKeyList
{
- if (!$this->_usage) {
- $this->_usage = new UsageList($this->version, $this->solution['sid']);
+ if (!$this->_signingKeys) {
+ $this->_signingKeys = new SigningKeyList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_usage;
+ return $this->_signingKeys;
}
/**
- * Access the validationRequests
- *
- * @return \Twilio\Rest\Api\V2010\Account\ValidationRequestList
+ * Access the newSigningKeys
*/
- protected function getValidationRequests()
+ protected function getNewSigningKeys(): NewSigningKeyList
{
- if (!$this->_validationRequests) {
- $this->_validationRequests = new ValidationRequestList($this->version, $this->solution['sid']);
+ if (!$this->_newSigningKeys) {
+ $this->_newSigningKeys = new NewSigningKeyList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_validationRequests;
+ return $this->_newSigningKeys;
}
/**
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -535,10 +573,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -553,12 +591,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.AccountContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/AccountInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/AccountInstance.php
index a76ba8b..3597f38 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/AccountInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/AccountInstance.php
@@ -2,73 +2,105 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Api\V2010;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Api\V2010\Account\RecordingList;
+use Twilio\Rest\Api\V2010\Account\UsageList;
+use Twilio\Rest\Api\V2010\Account\MessageList;
+use Twilio\Rest\Api\V2010\Account\KeyList;
+use Twilio\Rest\Api\V2010\Account\NewKeyList;
+use Twilio\Rest\Api\V2010\Account\ApplicationList;
+use Twilio\Rest\Api\V2010\Account\IncomingPhoneNumberList;
+use Twilio\Rest\Api\V2010\Account\ConferenceList;
+use Twilio\Rest\Api\V2010\Account\CallList;
+use Twilio\Rest\Api\V2010\Account\OutgoingCallerIdList;
+use Twilio\Rest\Api\V2010\Account\ValidationRequestList;
+use Twilio\Rest\Api\V2010\Account\TranscriptionList;
+use Twilio\Rest\Api\V2010\Account\ConnectAppList;
+use Twilio\Rest\Api\V2010\Account\AuthorizedConnectAppList;
+use Twilio\Rest\Api\V2010\Account\TokenList;
+use Twilio\Rest\Api\V2010\Account\BalanceList;
+use Twilio\Rest\Api\V2010\Account\SipList;
+use Twilio\Rest\Api\V2010\Account\NotificationList;
+use Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountryList;
+use Twilio\Rest\Api\V2010\Account\AddressList;
+use Twilio\Rest\Api\V2010\Account\QueueList;
+use Twilio\Rest\Api\V2010\Account\ShortCodeList;
+use Twilio\Rest\Api\V2010\Account\SigningKeyList;
+use Twilio\Rest\Api\V2010\Account\NewSigningKeyList;
+
/**
- * @property string $authToken
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $friendlyName
- * @property string $ownerAccountSid
- * @property string $sid
+ * @property string|null $authToken
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $friendlyName
+ * @property string|null $ownerAccountSid
+ * @property string|null $sid
* @property string $status
- * @property array $subresourceUris
+ * @property array|null $subresourceUris
* @property string $type
- * @property string $uri
+ * @property string|null $uri
*/
class AccountInstance extends InstanceResource
{
- protected $_addresses = null;
- protected $_applications = null;
- protected $_authorizedConnectApps = null;
- protected $_availablePhoneNumbers = null;
- protected $_balance = null;
- protected $_calls = null;
- protected $_conferences = null;
- protected $_connectApps = null;
- protected $_incomingPhoneNumbers = null;
- protected $_keys = null;
- protected $_messages = null;
- protected $_newKeys = null;
- protected $_newSigningKeys = null;
- protected $_notifications = null;
- protected $_outgoingCallerIds = null;
- protected $_queues = null;
- protected $_recordings = null;
- protected $_signingKeys = null;
- protected $_sip = null;
- protected $_shortCodes = null;
- protected $_tokens = null;
- protected $_transcriptions = null;
- protected $_usage = null;
- protected $_validationRequests = null;
+ protected $_recordings;
+ protected $_usage;
+ protected $_messages;
+ protected $_keys;
+ protected $_newKeys;
+ protected $_applications;
+ protected $_incomingPhoneNumbers;
+ protected $_conferences;
+ protected $_calls;
+ protected $_outgoingCallerIds;
+ protected $_validationRequests;
+ protected $_transcriptions;
+ protected $_connectApps;
+ protected $_authorizedConnectApps;
+ protected $_tokens;
+ protected $_balance;
+ protected $_sip;
+ protected $_notifications;
+ protected $_availablePhoneNumbers;
+ protected $_addresses;
+ protected $_queues;
+ protected $_shortCodes;
+ protected $_signingKeys;
+ protected $_newSigningKeys;
/**
* Initialize the AccountInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid Fetch by unique Account Sid
- * @return \Twilio\Rest\Api\V2010\AccountInstance
+ * @param string $sid The Account Sid that uniquely identifies the account to fetch
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'authToken' => Values::array_get($payload, 'auth_token'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
@@ -79,35 +111,38 @@ public function __construct(Version $version, array $payload, $sid = null)
'subresourceUris' => Values::array_get($payload, 'subresource_uris'),
'type' => Values::array_get($payload, 'type'),
'uri' => Values::array_get($payload, 'uri'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Api\V2010\AccountContext Context for this
- * AccountInstance
+ * @return AccountContext Context for this AccountInstance
*/
- protected function proxy()
+ protected function proxy(): AccountContext
{
if (!$this->context) {
- $this->context = new AccountContext($this->version, $this->solution['sid']);
+ $this->context = new AccountContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a AccountInstance
+ * Fetch the AccountInstance
*
* @return AccountInstance Fetched AccountInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): AccountInstance
{
+
return $this->proxy()->fetch();
}
@@ -118,249 +153,202 @@ public function fetch()
* @return AccountInstance Updated AccountInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): AccountInstance
{
+
return $this->proxy()->update($options);
}
/**
- * Access the addresses
- *
- * @return \Twilio\Rest\Api\V2010\Account\AddressList
+ * Access the recordings
*/
- protected function getAddresses()
+ protected function getRecordings(): RecordingList
{
- return $this->proxy()->addresses;
+ return $this->proxy()->recordings;
}
/**
- * Access the applications
- *
- * @return \Twilio\Rest\Api\V2010\Account\ApplicationList
+ * Access the usage
*/
- protected function getApplications()
+ protected function getUsage(): UsageList
{
- return $this->proxy()->applications;
+ return $this->proxy()->usage;
}
/**
- * Access the authorizedConnectApps
- *
- * @return \Twilio\Rest\Api\V2010\Account\AuthorizedConnectAppList
+ * Access the messages
*/
- protected function getAuthorizedConnectApps()
+ protected function getMessages(): MessageList
{
- return $this->proxy()->authorizedConnectApps;
+ return $this->proxy()->messages;
}
/**
- * Access the availablePhoneNumbers
- *
- * @return \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountryList
+ * Access the keys
*/
- protected function getAvailablePhoneNumbers()
+ protected function getKeys(): KeyList
{
- return $this->proxy()->availablePhoneNumbers;
+ return $this->proxy()->keys;
}
/**
- * Access the balance
- *
- * @return \Twilio\Rest\Api\V2010\Account\BalanceList
+ * Access the newKeys
*/
- protected function getBalance()
+ protected function getNewKeys(): NewKeyList
{
- return $this->proxy()->balance;
+ return $this->proxy()->newKeys;
}
/**
- * Access the calls
- *
- * @return \Twilio\Rest\Api\V2010\Account\CallList
+ * Access the applications
*/
- protected function getCalls()
+ protected function getApplications(): ApplicationList
{
- return $this->proxy()->calls;
+ return $this->proxy()->applications;
}
/**
- * Access the conferences
- *
- * @return \Twilio\Rest\Api\V2010\Account\ConferenceList
+ * Access the incomingPhoneNumbers
*/
- protected function getConferences()
+ protected function getIncomingPhoneNumbers(): IncomingPhoneNumberList
{
- return $this->proxy()->conferences;
+ return $this->proxy()->incomingPhoneNumbers;
}
/**
- * Access the connectApps
- *
- * @return \Twilio\Rest\Api\V2010\Account\ConnectAppList
+ * Access the conferences
*/
- protected function getConnectApps()
+ protected function getConferences(): ConferenceList
{
- return $this->proxy()->connectApps;
+ return $this->proxy()->conferences;
}
/**
- * Access the incomingPhoneNumbers
- *
- * @return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumberList
+ * Access the calls
*/
- protected function getIncomingPhoneNumbers()
+ protected function getCalls(): CallList
{
- return $this->proxy()->incomingPhoneNumbers;
+ return $this->proxy()->calls;
}
/**
- * Access the keys
- *
- * @return \Twilio\Rest\Api\V2010\Account\KeyList
+ * Access the outgoingCallerIds
*/
- protected function getKeys()
+ protected function getOutgoingCallerIds(): OutgoingCallerIdList
{
- return $this->proxy()->keys;
+ return $this->proxy()->outgoingCallerIds;
}
/**
- * Access the messages
- *
- * @return \Twilio\Rest\Api\V2010\Account\MessageList
+ * Access the validationRequests
*/
- protected function getMessages()
+ protected function getValidationRequests(): ValidationRequestList
{
- return $this->proxy()->messages;
+ return $this->proxy()->validationRequests;
}
/**
- * Access the newKeys
- *
- * @return \Twilio\Rest\Api\V2010\Account\NewKeyList
+ * Access the transcriptions
*/
- protected function getNewKeys()
+ protected function getTranscriptions(): TranscriptionList
{
- return $this->proxy()->newKeys;
+ return $this->proxy()->transcriptions;
}
/**
- * Access the newSigningKeys
- *
- * @return \Twilio\Rest\Api\V2010\Account\NewSigningKeyList
+ * Access the connectApps
*/
- protected function getNewSigningKeys()
+ protected function getConnectApps(): ConnectAppList
{
- return $this->proxy()->newSigningKeys;
+ return $this->proxy()->connectApps;
}
/**
- * Access the notifications
- *
- * @return \Twilio\Rest\Api\V2010\Account\NotificationList
+ * Access the authorizedConnectApps
*/
- protected function getNotifications()
+ protected function getAuthorizedConnectApps(): AuthorizedConnectAppList
{
- return $this->proxy()->notifications;
+ return $this->proxy()->authorizedConnectApps;
}
/**
- * Access the outgoingCallerIds
- *
- * @return \Twilio\Rest\Api\V2010\Account\OutgoingCallerIdList
+ * Access the tokens
*/
- protected function getOutgoingCallerIds()
+ protected function getTokens(): TokenList
{
- return $this->proxy()->outgoingCallerIds;
+ return $this->proxy()->tokens;
}
/**
- * Access the queues
- *
- * @return \Twilio\Rest\Api\V2010\Account\QueueList
+ * Access the balance
*/
- protected function getQueues()
+ protected function getBalance(): BalanceList
{
- return $this->proxy()->queues;
+ return $this->proxy()->balance;
}
/**
- * Access the recordings
- *
- * @return \Twilio\Rest\Api\V2010\Account\RecordingList
+ * Access the sip
*/
- protected function getRecordings()
+ protected function getSip(): SipList
{
- return $this->proxy()->recordings;
+ return $this->proxy()->sip;
}
/**
- * Access the signingKeys
- *
- * @return \Twilio\Rest\Api\V2010\Account\SigningKeyList
+ * Access the notifications
*/
- protected function getSigningKeys()
+ protected function getNotifications(): NotificationList
{
- return $this->proxy()->signingKeys;
+ return $this->proxy()->notifications;
}
/**
- * Access the sip
- *
- * @return \Twilio\Rest\Api\V2010\Account\SipList
+ * Access the availablePhoneNumbers
*/
- protected function getSip()
+ protected function getAvailablePhoneNumbers(): AvailablePhoneNumberCountryList
{
- return $this->proxy()->sip;
+ return $this->proxy()->availablePhoneNumbers;
}
/**
- * Access the shortCodes
- *
- * @return \Twilio\Rest\Api\V2010\Account\ShortCodeList
+ * Access the addresses
*/
- protected function getShortCodes()
+ protected function getAddresses(): AddressList
{
- return $this->proxy()->shortCodes;
+ return $this->proxy()->addresses;
}
/**
- * Access the tokens
- *
- * @return \Twilio\Rest\Api\V2010\Account\TokenList
+ * Access the queues
*/
- protected function getTokens()
+ protected function getQueues(): QueueList
{
- return $this->proxy()->tokens;
+ return $this->proxy()->queues;
}
/**
- * Access the transcriptions
- *
- * @return \Twilio\Rest\Api\V2010\Account\TranscriptionList
+ * Access the shortCodes
*/
- protected function getTranscriptions()
+ protected function getShortCodes(): ShortCodeList
{
- return $this->proxy()->transcriptions;
+ return $this->proxy()->shortCodes;
}
/**
- * Access the usage
- *
- * @return \Twilio\Rest\Api\V2010\Account\UsageList
+ * Access the signingKeys
*/
- protected function getUsage()
+ protected function getSigningKeys(): SigningKeyList
{
- return $this->proxy()->usage;
+ return $this->proxy()->signingKeys;
}
/**
- * Access the validationRequests
- *
- * @return \Twilio\Rest\Api\V2010\Account\ValidationRequestList
+ * Access the newSigningKeys
*/
- protected function getValidationRequests()
+ protected function getNewSigningKeys(): NewSigningKeyList
{
- return $this->proxy()->validationRequests;
+ return $this->proxy()->newSigningKeys;
}
/**
@@ -370,7 +358,7 @@ protected function getValidationRequests()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -389,12 +377,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Api.V2010.AccountInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/AccountList.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/AccountList.php
index fef6141..f4aca16 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/AccountList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/AccountList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Api
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Api\V2010;
@@ -12,48 +19,76 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class AccountList extends ListResource
-{
+ {
/**
* Construct the AccountList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Api\V2010\AccountList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/Accounts.json';
}
/**
- * Create a new AccountInstance
+ * Create the AccountInstance
*
* @param array|Options $options Optional Arguments
- * @return AccountInstance Newly created AccountInstance
+ * @return AccountInstance Created AccountInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($options = array())
+ public function create(array $options = []): AccountInstance
{
+
$options = new Values($options);
- $data = Values::of(array('FriendlyName' => $options['friendlyName'],));
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ ]);
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new AccountInstance(
+ $this->version,
+ $payload
);
+ }
+
- return new AccountInstance($this->version, $payload);
+ /**
+ * Reads AccountInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return AccountInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -73,9 +108,9 @@ public function create($options = array())
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -84,53 +119,35 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads AccountInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return AccountInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of AccountInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of AccountInstance
+ * @return AccountPage Page of AccountInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): AccountPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'Status' => $options['status'],
+
+ $params = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'Status' =>
+ $options['status'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new AccountPage($this->version, $response, $this->solution);
}
@@ -140,9 +157,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of AccountInstance
+ * @return AccountPage Page of AccountInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): AccountPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -152,15 +169,21 @@ public function getPage($targetUrl)
return new AccountPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a AccountContext
*
- * @param string $sid Fetch by unique Account Sid
- * @return \Twilio\Rest\Api\V2010\AccountContext
+ * @param string $sid The Account Sid that uniquely identifies the account to fetch
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): AccountContext
{
- return new AccountContext($this->version, $sid);
+ return new AccountContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -168,8 +191,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.AccountList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/AccountOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/AccountOptions.php
index 3d8d6ac..e33e3e1 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/AccountOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/AccountOptions.php
@@ -1,10 +1,16 @@
options['friendlyName'] = $friendlyName;
}
/**
* A human readable description of the account to create, defaults to `SubAccount Created at {YYYY-MM-DD HH:MM meridian}`
*
- * @param string $friendlyName A human readable description of the account
+ * @param string $friendlyName A human readable description of the account to create, defaults to `SubAccount Created at {YYYY-MM-DD HH:MM meridian}`
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -71,26 +104,26 @@ public function setFriendlyName($friendlyName)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.CreateAccountOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.CreateAccountOptions ' . $options . ']';
}
}
+
class ReadAccountOptions extends Options
-{
+ {
/**
- * @param string $friendlyName FriendlyName to filter on
- * @param string $status Status to filter on
+ * @param string $friendlyName Only return the Account resources with friendly names that exactly match this name.
+ * @param string $status Only return Account resources with the given status. Can be `closed`, `suspended` or `active`.
*/
- public function __construct($friendlyName = Values::NONE, $status = Values::NONE)
- {
+ public function __construct(
+
+ string $friendlyName = Values::NONE,
+ string $status = Values::NONE
+
+ ) {
$this->options['friendlyName'] = $friendlyName;
$this->options['status'] = $status;
}
@@ -98,10 +131,10 @@ public function __construct($friendlyName = Values::NONE, $status = Values::NONE
/**
* Only return the Account resources with friendly names that exactly match this name.
*
- * @param string $friendlyName FriendlyName to filter on
+ * @param string $friendlyName Only return the Account resources with friendly names that exactly match this name.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -110,10 +143,10 @@ public function setFriendlyName($friendlyName)
/**
* Only return Account resources with the given status. Can be `closed`, `suspended` or `active`.
*
- * @param string $status Status to filter on
+ * @param string $status Only return Account resources with the given status. Can be `closed`, `suspended` or `active`.
* @return $this Fluent Builder
*/
- public function setStatus($status)
+ public function setStatus(string $status): self
{
$this->options['status'] = $status;
return $this;
@@ -124,26 +157,25 @@ public function setStatus($status)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.ReadAccountOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.ReadAccountOptions ' . $options . ']';
}
}
class UpdateAccountOptions extends Options
-{
+ {
/**
- * @param string $friendlyName FriendlyName to update
- * @param string $status Status to update the Account with
+ * @param string $friendlyName Update the human-readable description of this Account
+ * @param string $status
*/
- public function __construct($friendlyName = Values::NONE, $status = Values::NONE)
- {
+ public function __construct(
+
+ string $friendlyName = Values::NONE,
+ string $status = Values::NONE
+
+ ) {
$this->options['friendlyName'] = $friendlyName;
$this->options['status'] = $status;
}
@@ -151,22 +183,20 @@ public function __construct($friendlyName = Values::NONE, $status = Values::NONE
/**
* Update the human-readable description of this Account
*
- * @param string $friendlyName FriendlyName to update
+ * @param string $friendlyName Update the human-readable description of this Account
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
}
/**
- * Alter the status of this account: use `closed` to irreversibly close this account, `suspended` to temporarily suspend it, or `active` to reactivate it.
- *
- * @param string $status Status to update the Account with
+ * @param string $status
* @return $this Fluent Builder
*/
- public function setStatus($status)
+ public function setStatus(string $status): self
{
$this->options['status'] = $status;
return $this;
@@ -177,14 +207,10 @@ public function setStatus($status)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Api.V2010.UpdateAccountOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Api.V2010.UpdateAccountOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/AccountPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/AccountPage.php
index 650ad1f..df4f11b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/AccountPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/AccountPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return AccountInstance \Twilio\Rest\Api\V2010\AccountInstance
+ */
+ public function buildInstance(array $payload): AccountInstance
{
return new AccountInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Api.V2010.AccountPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Authy.php b/vendor/twilio/sdk/src/Twilio/Rest/Authy.php
deleted file mode 100644
index 946ef63..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Authy.php
+++ /dev/null
@@ -1,130 +0,0 @@
-baseUrl = 'https://authy.twilio.com';
- }
-
- /**
- * @return \Twilio\Rest\Authy\V1 Version v1 of authy
- */
- protected function getV1()
- {
- if (!$this->_v1) {
- $this->_v1 = new V1($this);
- }
- return $this->_v1;
- }
-
- /**
- * Magic getter to lazy load version
- *
- * @param string $name Version to return
- * @return \Twilio\Version The requested version
- * @throws TwilioException For unknown versions
- */
- public function __get($name)
- {
- $method = 'get' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return $this->$method();
- }
-
- throw new TwilioException('Unknown version ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $method = 'context' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return \call_user_func_array(array($this, $method), $arguments);
- }
-
- throw new TwilioException('Unknown context ' . $name);
- }
-
- /**
- * @return \Twilio\Rest\Authy\V1\FormList
- */
- protected function getForms()
- {
- return $this->v1->forms;
- }
-
- /**
- * @param string $formType The Type of this Form
- * @return \Twilio\Rest\Authy\V1\FormContext
- */
- protected function contextForms($formType)
- {
- return $this->v1->forms($formType);
- }
-
- /**
- * @return \Twilio\Rest\Authy\V1\ServiceList
- */
- protected function getServices()
- {
- return $this->v1->services;
- }
-
- /**
- * @param string $sid A string that uniquely identifies this Service.
- * @return \Twilio\Rest\Authy\V1\ServiceContext
- */
- protected function contextServices($sid)
- {
- return $this->v1->services($sid);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Authy]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1.php b/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1.php
deleted file mode 100644
index f8d6f97..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1.php
+++ /dev/null
@@ -1,107 +0,0 @@
-version = 'v1';
- }
-
- /**
- * @return \Twilio\Rest\Authy\V1\FormList
- */
- protected function getForms()
- {
- if (!$this->_forms) {
- $this->_forms = new FormList($this);
- }
- return $this->_forms;
- }
-
- /**
- * @return \Twilio\Rest\Authy\V1\ServiceList
- */
- protected function getServices()
- {
- if (!$this->_services) {
- $this->_services = new ServiceList($this);
- }
- return $this->_services;
- }
-
- /**
- * Magic getter to lazy load root resources
- *
- * @param string $name Resource to return
- * @return \Twilio\ListResource The requested resource
- * @throws TwilioException For unknown resource
- */
- public function __get($name)
- {
- $method = 'get' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return $this->$method();
- }
-
- throw new TwilioException('Unknown resource ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $property = $this->$name;
- if (\method_exists($property, 'getContext')) {
- return \call_user_func_array(array($property, 'getContext'), $arguments);
- }
-
- throw new TwilioException('Resource does not have a context');
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Authy.V1]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/FormContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/FormContext.php
deleted file mode 100644
index 854300d..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/FormContext.php
+++ /dev/null
@@ -1,71 +0,0 @@
-solution = array('formType' => $formType,);
-
- $this->uri = '/Forms/' . \rawurlencode($formType) . '';
- }
-
- /**
- * Fetch a FormInstance
- *
- * @return FormInstance Fetched FormInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new FormInstance($this->version, $payload, $this->solution['formType']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Authy.V1.FormContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/FormInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/FormInstance.php
deleted file mode 100644
index bc2deee..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/FormInstance.php
+++ /dev/null
@@ -1,110 +0,0 @@
-properties = array(
- 'formType' => Values::array_get($payload, 'form_type'),
- 'forms' => Values::array_get($payload, 'forms'),
- 'formMeta' => Values::array_get($payload, 'form_meta'),
- 'url' => Values::array_get($payload, 'url'),
- );
-
- $this->solution = array('formType' => $formType ?: $this->properties['formType'],);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Authy\V1\FormContext Context for this FormInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new FormContext($this->version, $this->solution['formType']);
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a FormInstance
- *
- * @return FormInstance Fetched FormInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Authy.V1.FormInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/FormList.php b/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/FormList.php
deleted file mode 100644
index be9b577..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/FormList.php
+++ /dev/null
@@ -1,54 +0,0 @@
-solution = array();
- }
-
- /**
- * Constructs a FormContext
- *
- * @param string $formType The Type of this Form
- * @return \Twilio\Rest\Authy\V1\FormContext
- */
- public function getContext($formType)
- {
- return new FormContext($this->version, $formType);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Authy.V1.FormList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/FormPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/FormPage.php
deleted file mode 100644
index 0daeab4..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/FormPage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new FormInstance($this->version, $payload);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Authy.V1.FormPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/Entity/Factor/ChallengeContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/Entity/Factor/ChallengeContext.php
deleted file mode 100644
index cd5ed26..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/Entity/Factor/ChallengeContext.php
+++ /dev/null
@@ -1,129 +0,0 @@
-solution = array(
- 'serviceSid' => $serviceSid,
- 'identity' => $identity,
- 'factorSid' => $factorSid,
- 'sid' => $sid,
- );
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Entities/' . \rawurlencode($identity) . '/Factors/' . \rawurlencode($factorSid) . '/Challenges/' . \rawurlencode($sid) . '';
- }
-
- /**
- * Deletes the ChallengeInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
-
- /**
- * Fetch a ChallengeInstance
- *
- * @return ChallengeInstance Fetched ChallengeInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new ChallengeInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['identity'],
- $this->solution['factorSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Update the ChallengeInstance
- *
- * @param array|Options $options Optional Arguments
- * @return ChallengeInstance Updated ChallengeInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array('AuthPayload' => $options['authPayload'],));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new ChallengeInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['identity'],
- $this->solution['factorSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Authy.V1.ChallengeContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/Entity/Factor/ChallengeInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/Entity/Factor/ChallengeInstance.php
deleted file mode 100644
index e12b37c..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/Entity/Factor/ChallengeInstance.php
+++ /dev/null
@@ -1,179 +0,0 @@
-properties = array(
- 'sid' => Values::array_get($payload, 'sid'),
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'serviceSid' => Values::array_get($payload, 'service_sid'),
- 'entitySid' => Values::array_get($payload, 'entity_sid'),
- 'identity' => Values::array_get($payload, 'identity'),
- 'factorSid' => Values::array_get($payload, 'factor_sid'),
- 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- 'dateResponded' => Deserialize::dateTime(Values::array_get($payload, 'date_responded')),
- 'expirationDate' => Deserialize::dateTime(Values::array_get($payload, 'expiration_date')),
- 'status' => Values::array_get($payload, 'status'),
- 'respondedReason' => Values::array_get($payload, 'responded_reason'),
- 'details' => Values::array_get($payload, 'details'),
- 'hiddenDetails' => Values::array_get($payload, 'hidden_details'),
- 'factorType' => Values::array_get($payload, 'factor_type'),
- 'factorStrength' => Values::array_get($payload, 'factor_strength'),
- 'url' => Values::array_get($payload, 'url'),
- );
-
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'identity' => $identity,
- 'factorSid' => $factorSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Authy\V1\Service\Entity\Factor\ChallengeContext Context
- * for
- * this
- * ChallengeInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new ChallengeContext(
- $this->version,
- $this->solution['serviceSid'],
- $this->solution['identity'],
- $this->solution['factorSid'],
- $this->solution['sid']
- );
- }
-
- return $this->context;
- }
-
- /**
- * Deletes the ChallengeInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->proxy()->delete();
- }
-
- /**
- * Fetch a ChallengeInstance
- *
- * @return ChallengeInstance Fetched ChallengeInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Update the ChallengeInstance
- *
- * @param array|Options $options Optional Arguments
- * @return ChallengeInstance Updated ChallengeInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- return $this->proxy()->update($options);
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Authy.V1.ChallengeInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/Entity/Factor/ChallengeList.php b/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/Entity/Factor/ChallengeList.php
deleted file mode 100644
index 3bed00f..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/Entity/Factor/ChallengeList.php
+++ /dev/null
@@ -1,107 +0,0 @@
-solution = array(
- 'serviceSid' => $serviceSid,
- 'identity' => $identity,
- 'factorSid' => $factorSid,
- );
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Entities/' . \rawurlencode($identity) . '/Factors/' . \rawurlencode($factorSid) . '/Challenges';
- }
-
- /**
- * Create a new ChallengeInstance
- *
- * @param array|Options $options Optional Arguments
- * @return ChallengeInstance Newly created ChallengeInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'ExpirationDate' => Serialize::iso8601DateTime($options['expirationDate']),
- 'Details' => $options['details'],
- 'HiddenDetails' => $options['hiddenDetails'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new ChallengeInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['identity'],
- $this->solution['factorSid']
- );
- }
-
- /**
- * Constructs a ChallengeContext
- *
- * @param string $sid A string that uniquely identifies this Challenge, or
- * `latest`.
- * @return \Twilio\Rest\Authy\V1\Service\Entity\Factor\ChallengeContext
- */
- public function getContext($sid)
- {
- return new ChallengeContext(
- $this->version,
- $this->solution['serviceSid'],
- $this->solution['identity'],
- $this->solution['factorSid'],
- $sid
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Authy.V1.ChallengeList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/Entity/Factor/ChallengeOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/Entity/Factor/ChallengeOptions.php
deleted file mode 100644
index 07aa52a..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/Entity/Factor/ChallengeOptions.php
+++ /dev/null
@@ -1,151 +0,0 @@
-options['expirationDate'] = $expirationDate;
- $this->options['details'] = $details;
- $this->options['hiddenDetails'] = $hiddenDetails;
- }
-
- /**
- * The future date in which this Challenge will expire, given in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
- *
- * @param \DateTime $expirationDate The future date in which this Challenge
- * will expire
- * @return $this Fluent Builder
- */
- public function setExpirationDate($expirationDate)
- {
- $this->options['expirationDate'] = $expirationDate;
- return $this;
- }
-
- /**
- * Details provided to give context about the Challenge. Shown to the end user.
- *
- * @param string $details Public details provided to contextualize the Challenge
- * @return $this Fluent Builder
- */
- public function setDetails($details)
- {
- $this->options['details'] = $details;
- return $this;
- }
-
- /**
- * Details provided to give context about the Challenge. Not shown to the end user.
- *
- * @param string $hiddenDetails Hidden details provided to contextualize the
- * Challenge
- * @return $this Fluent Builder
- */
- public function setHiddenDetails($hiddenDetails)
- {
- $this->options['hiddenDetails'] = $hiddenDetails;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Authy.V1.CreateChallengeOptions ' . \implode(' ', $options) . ']';
- }
-}
-
-class UpdateChallengeOptions extends Options
-{
- /**
- * @param string $authPayload Optional payload to verify the Challenge
- */
- public function __construct($authPayload = Values::NONE)
- {
- $this->options['authPayload'] = $authPayload;
- }
-
- /**
- * The optional payload needed to verify the Challenge. E.g., a TOTP would use the numeric code.
- *
- * @param string $authPayload Optional payload to verify the Challenge
- * @return $this Fluent Builder
- */
- public function setAuthPayload($authPayload)
- {
- $this->options['authPayload'] = $authPayload;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Authy.V1.UpdateChallengeOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/Entity/Factor/ChallengePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/Entity/Factor/ChallengePage.php
deleted file mode 100644
index 0fd71ed..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/Entity/Factor/ChallengePage.php
+++ /dev/null
@@ -1,47 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new ChallengeInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['identity'],
- $this->solution['factorSid']
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Authy.V1.ChallengePage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/Entity/FactorContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/Entity/FactorContext.php
deleted file mode 100644
index bc7809a..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/Entity/FactorContext.php
+++ /dev/null
@@ -1,180 +0,0 @@
-solution = array('serviceSid' => $serviceSid, 'identity' => $identity, 'sid' => $sid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Entities/' . \rawurlencode($identity) . '/Factors/' . \rawurlencode($sid) . '';
- }
-
- /**
- * Deletes the FactorInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
-
- /**
- * Fetch a FactorInstance
- *
- * @return FactorInstance Fetched FactorInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new FactorInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['identity'],
- $this->solution['sid']
- );
- }
-
- /**
- * Update the FactorInstance
- *
- * @param array|Options $options Optional Arguments
- * @return FactorInstance Updated FactorInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array('AuthPayload' => $options['authPayload'],));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new FactorInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['identity'],
- $this->solution['sid']
- );
- }
-
- /**
- * Access the challenges
- *
- * @return \Twilio\Rest\Authy\V1\Service\Entity\Factor\ChallengeList
- */
- protected function getChallenges()
- {
- if (!$this->_challenges) {
- $this->_challenges = new ChallengeList(
- $this->version,
- $this->solution['serviceSid'],
- $this->solution['identity'],
- $this->solution['sid']
- );
- }
-
- return $this->_challenges;
- }
-
- /**
- * Magic getter to lazy load subresources
- *
- * @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
- * @throws TwilioException For unknown subresources
- */
- public function __get($name)
- {
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown subresource ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $property = $this->$name;
- if (\method_exists($property, 'getContext')) {
- return \call_user_func_array(array($property, 'getContext'), $arguments);
- }
-
- throw new TwilioException('Resource does not have a context');
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Authy.V1.FactorContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/Entity/FactorInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/Entity/FactorInstance.php
deleted file mode 100644
index f0cc98a..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/Entity/FactorInstance.php
+++ /dev/null
@@ -1,177 +0,0 @@
-properties = array(
- 'sid' => Values::array_get($payload, 'sid'),
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'serviceSid' => Values::array_get($payload, 'service_sid'),
- 'entitySid' => Values::array_get($payload, 'entity_sid'),
- 'identity' => Values::array_get($payload, 'identity'),
- 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- 'friendlyName' => Values::array_get($payload, 'friendly_name'),
- 'status' => Values::array_get($payload, 'status'),
- 'factorType' => Values::array_get($payload, 'factor_type'),
- 'factorStrength' => Values::array_get($payload, 'factor_strength'),
- 'url' => Values::array_get($payload, 'url'),
- 'links' => Values::array_get($payload, 'links'),
- );
-
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'identity' => $identity,
- 'sid' => $sid ?: $this->properties['sid'],
- );
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Authy\V1\Service\Entity\FactorContext Context for this
- * FactorInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new FactorContext(
- $this->version,
- $this->solution['serviceSid'],
- $this->solution['identity'],
- $this->solution['sid']
- );
- }
-
- return $this->context;
- }
-
- /**
- * Deletes the FactorInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->proxy()->delete();
- }
-
- /**
- * Fetch a FactorInstance
- *
- * @return FactorInstance Fetched FactorInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Update the FactorInstance
- *
- * @param array|Options $options Optional Arguments
- * @return FactorInstance Updated FactorInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- return $this->proxy()->update($options);
- }
-
- /**
- * Access the challenges
- *
- * @return \Twilio\Rest\Authy\V1\Service\Entity\Factor\ChallengeList
- */
- protected function getChallenges()
- {
- return $this->proxy()->challenges;
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Authy.V1.FactorInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/Entity/FactorList.php b/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/Entity/FactorList.php
deleted file mode 100644
index 24dd6f6..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/Entity/FactorList.php
+++ /dev/null
@@ -1,187 +0,0 @@
-solution = array('serviceSid' => $serviceSid, 'identity' => $identity,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Entities/' . \rawurlencode($identity) . '/Factors';
- }
-
- /**
- * Create a new FactorInstance
- *
- * @param string $binding A unique binding for this Factor as a json string
- * @param string $friendlyName The friendly name of this Factor
- * @param string $factorType The Type of this Factor
- * @return FactorInstance Newly created FactorInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($binding, $friendlyName, $factorType)
- {
- $data = Values::of(array(
- 'Binding' => $binding,
- 'FriendlyName' => $friendlyName,
- 'FactorType' => $factorType,
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new FactorInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['identity']
- );
- }
-
- /**
- * Streams FactorInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
- *
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
- */
- public function stream($limit = null, $pageSize = null)
- {
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
- }
-
- /**
- * Reads FactorInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return FactorInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
- /**
- * Retrieve a single page of FactorInstance records from the API.
- * Request is executed immediately
- *
- * @param mixed $pageSize Number of records to return, defaults to 50
- * @param string $pageToken PageToken provided by the API
- * @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of FactorInstance
- */
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
- {
- $params = Values::of(array(
- 'PageToken' => $pageToken,
- 'Page' => $pageNumber,
- 'PageSize' => $pageSize,
- ));
-
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
-
- return new FactorPage($this->version, $response, $this->solution);
- }
-
- /**
- * Retrieve a specific page of FactorInstance records from the API.
- * Request is executed immediately
- *
- * @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of FactorInstance
- */
- public function getPage($targetUrl)
- {
- $response = $this->version->getDomain()->getClient()->request(
- 'GET',
- $targetUrl
- );
-
- return new FactorPage($this->version, $response, $this->solution);
- }
-
- /**
- * Constructs a FactorContext
- *
- * @param string $sid A string that uniquely identifies this Factor.
- * @return \Twilio\Rest\Authy\V1\Service\Entity\FactorContext
- */
- public function getContext($sid)
- {
- return new FactorContext(
- $this->version,
- $this->solution['serviceSid'],
- $this->solution['identity'],
- $sid
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Authy.V1.FactorList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/Entity/FactorOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/Entity/FactorOptions.php
deleted file mode 100644
index 18a1866..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/Entity/FactorOptions.php
+++ /dev/null
@@ -1,70 +0,0 @@
-options['authPayload'] = $authPayload;
- }
-
- /**
- * The optional payload needed to verify the Factor for the first time. E.g. for a TOTP, the numeric code.
- *
- * @param string $authPayload Optional payload to verify the Factor for the
- * first time
- * @return $this Fluent Builder
- */
- public function setAuthPayload($authPayload)
- {
- $this->options['authPayload'] = $authPayload;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Authy.V1.UpdateFactorOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/Entity/FactorPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/Entity/FactorPage.php
deleted file mode 100644
index 1d2a129..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/Entity/FactorPage.php
+++ /dev/null
@@ -1,46 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new FactorInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['identity']
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Authy.V1.FactorPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/EntityContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/EntityContext.php
deleted file mode 100644
index 4784c94..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/EntityContext.php
+++ /dev/null
@@ -1,147 +0,0 @@
-solution = array('serviceSid' => $serviceSid, 'identity' => $identity,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Entities/' . \rawurlencode($identity) . '';
- }
-
- /**
- * Deletes the EntityInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
-
- /**
- * Fetch a EntityInstance
- *
- * @return EntityInstance Fetched EntityInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new EntityInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['identity']
- );
- }
-
- /**
- * Access the factors
- *
- * @return \Twilio\Rest\Authy\V1\Service\Entity\FactorList
- */
- protected function getFactors()
- {
- if (!$this->_factors) {
- $this->_factors = new FactorList(
- $this->version,
- $this->solution['serviceSid'],
- $this->solution['identity']
- );
- }
-
- return $this->_factors;
- }
-
- /**
- * Magic getter to lazy load subresources
- *
- * @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
- * @throws TwilioException For unknown subresources
- */
- public function __get($name)
- {
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown subresource ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $property = $this->$name;
- if (\method_exists($property, 'getContext')) {
- return \call_user_func_array(array($property, 'getContext'), $arguments);
- }
-
- throw new TwilioException('Resource does not have a context');
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Authy.V1.EntityContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/EntityInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/EntityInstance.php
deleted file mode 100644
index ce2d72f..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/EntityInstance.php
+++ /dev/null
@@ -1,151 +0,0 @@
-properties = array(
- 'sid' => Values::array_get($payload, 'sid'),
- 'identity' => Values::array_get($payload, 'identity'),
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'serviceSid' => Values::array_get($payload, 'service_sid'),
- 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- 'url' => Values::array_get($payload, 'url'),
- 'links' => Values::array_get($payload, 'links'),
- );
-
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'identity' => $identity ?: $this->properties['identity'],
- );
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Authy\V1\Service\EntityContext Context for this
- * EntityInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new EntityContext(
- $this->version,
- $this->solution['serviceSid'],
- $this->solution['identity']
- );
- }
-
- return $this->context;
- }
-
- /**
- * Deletes the EntityInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->proxy()->delete();
- }
-
- /**
- * Fetch a EntityInstance
- *
- * @return EntityInstance Fetched EntityInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Access the factors
- *
- * @return \Twilio\Rest\Authy\V1\Service\Entity\FactorList
- */
- protected function getFactors()
- {
- return $this->proxy()->factors;
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Authy.V1.EntityInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/EntityList.php b/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/EntityList.php
deleted file mode 100644
index e3a98ec..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/EntityList.php
+++ /dev/null
@@ -1,170 +0,0 @@
-solution = array('serviceSid' => $serviceSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Entities';
- }
-
- /**
- * Create a new EntityInstance
- *
- * @param string $identity Unique identity of the Entity
- * @return EntityInstance Newly created EntityInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($identity)
- {
- $data = Values::of(array('Identity' => $identity,));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new EntityInstance($this->version, $payload, $this->solution['serviceSid']);
- }
-
- /**
- * Streams EntityInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
- *
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
- */
- public function stream($limit = null, $pageSize = null)
- {
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
- }
-
- /**
- * Reads EntityInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return EntityInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
- /**
- * Retrieve a single page of EntityInstance records from the API.
- * Request is executed immediately
- *
- * @param mixed $pageSize Number of records to return, defaults to 50
- * @param string $pageToken PageToken provided by the API
- * @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of EntityInstance
- */
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
- {
- $params = Values::of(array(
- 'PageToken' => $pageToken,
- 'Page' => $pageNumber,
- 'PageSize' => $pageSize,
- ));
-
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
-
- return new EntityPage($this->version, $response, $this->solution);
- }
-
- /**
- * Retrieve a specific page of EntityInstance records from the API.
- * Request is executed immediately
- *
- * @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of EntityInstance
- */
- public function getPage($targetUrl)
- {
- $response = $this->version->getDomain()->getClient()->request(
- 'GET',
- $targetUrl
- );
-
- return new EntityPage($this->version, $response, $this->solution);
- }
-
- /**
- * Constructs a EntityContext
- *
- * @param string $identity Unique identity of the Entity
- * @return \Twilio\Rest\Authy\V1\Service\EntityContext
- */
- public function getContext($identity)
- {
- return new EntityContext($this->version, $this->solution['serviceSid'], $identity);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Authy.V1.EntityList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/EntityPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/EntityPage.php
deleted file mode 100644
index f464abb..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/Service/EntityPage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new EntityInstance($this->version, $payload, $this->solution['serviceSid']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Authy.V1.EntityPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/ServiceContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/ServiceContext.php
deleted file mode 100644
index 41cf810..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/ServiceContext.php
+++ /dev/null
@@ -1,161 +0,0 @@
-solution = array('sid' => $sid,);
-
- $this->uri = '/Services/' . \rawurlencode($sid) . '';
- }
-
- /**
- * Deletes the ServiceInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
-
- /**
- * Fetch a ServiceInstance
- *
- * @return ServiceInstance Fetched ServiceInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new ServiceInstance($this->version, $payload, $this->solution['sid']);
- }
-
- /**
- * Update the ServiceInstance
- *
- * @param array|Options $options Optional Arguments
- * @return ServiceInstance Updated ServiceInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array('FriendlyName' => $options['friendlyName'],));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new ServiceInstance($this->version, $payload, $this->solution['sid']);
- }
-
- /**
- * Access the entities
- *
- * @return \Twilio\Rest\Authy\V1\Service\EntityList
- */
- protected function getEntities()
- {
- if (!$this->_entities) {
- $this->_entities = new EntityList($this->version, $this->solution['sid']);
- }
-
- return $this->_entities;
- }
-
- /**
- * Magic getter to lazy load subresources
- *
- * @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
- * @throws TwilioException For unknown subresources
- */
- public function __get($name)
- {
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown subresource ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $property = $this->$name;
- if (\method_exists($property, 'getContext')) {
- return \call_user_func_array(array($property, 'getContext'), $arguments);
- }
-
- throw new TwilioException('Resource does not have a context');
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Authy.V1.ServiceContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/ServiceInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/ServiceInstance.php
deleted file mode 100644
index 31dc401..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/ServiceInstance.php
+++ /dev/null
@@ -1,153 +0,0 @@
-properties = array(
- 'sid' => Values::array_get($payload, 'sid'),
- 'friendlyName' => Values::array_get($payload, 'friendly_name'),
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- 'url' => Values::array_get($payload, 'url'),
- 'links' => Values::array_get($payload, 'links'),
- );
-
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Authy\V1\ServiceContext Context for this ServiceInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new ServiceContext($this->version, $this->solution['sid']);
- }
-
- return $this->context;
- }
-
- /**
- * Deletes the ServiceInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->proxy()->delete();
- }
-
- /**
- * Fetch a ServiceInstance
- *
- * @return ServiceInstance Fetched ServiceInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Update the ServiceInstance
- *
- * @param array|Options $options Optional Arguments
- * @return ServiceInstance Updated ServiceInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- return $this->proxy()->update($options);
- }
-
- /**
- * Access the entities
- *
- * @return \Twilio\Rest\Authy\V1\Service\EntityList
- */
- protected function getEntities()
- {
- return $this->proxy()->entities;
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Authy.V1.ServiceInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/ServiceList.php b/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/ServiceList.php
deleted file mode 100644
index 0cebca3..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/ServiceList.php
+++ /dev/null
@@ -1,169 +0,0 @@
-solution = array();
-
- $this->uri = '/Services';
- }
-
- /**
- * Create a new ServiceInstance
- *
- * @param string $friendlyName A human readable description of this resource.
- * @return ServiceInstance Newly created ServiceInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($friendlyName)
- {
- $data = Values::of(array('FriendlyName' => $friendlyName,));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new ServiceInstance($this->version, $payload);
- }
-
- /**
- * Streams ServiceInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
- *
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
- */
- public function stream($limit = null, $pageSize = null)
- {
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
- }
-
- /**
- * Reads ServiceInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return ServiceInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
- /**
- * Retrieve a single page of ServiceInstance records from the API.
- * Request is executed immediately
- *
- * @param mixed $pageSize Number of records to return, defaults to 50
- * @param string $pageToken PageToken provided by the API
- * @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of ServiceInstance
- */
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
- {
- $params = Values::of(array(
- 'PageToken' => $pageToken,
- 'Page' => $pageNumber,
- 'PageSize' => $pageSize,
- ));
-
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
-
- return new ServicePage($this->version, $response, $this->solution);
- }
-
- /**
- * Retrieve a specific page of ServiceInstance records from the API.
- * Request is executed immediately
- *
- * @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of ServiceInstance
- */
- public function getPage($targetUrl)
- {
- $response = $this->version->getDomain()->getClient()->request(
- 'GET',
- $targetUrl
- );
-
- return new ServicePage($this->version, $response, $this->solution);
- }
-
- /**
- * Constructs a ServiceContext
- *
- * @param string $sid A string that uniquely identifies this Service.
- * @return \Twilio\Rest\Authy\V1\ServiceContext
- */
- public function getContext($sid)
- {
- return new ServiceContext($this->version, $sid);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Authy.V1.ServiceList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/ServiceOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/ServiceOptions.php
deleted file mode 100644
index 8aba6ad..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/ServiceOptions.php
+++ /dev/null
@@ -1,67 +0,0 @@
-options['friendlyName'] = $friendlyName;
- }
-
- /**
- * A human readable description of this resource, up to 64 characters.
- *
- * @param string $friendlyName A human readable description of this resource.
- * @return $this Fluent Builder
- */
- public function setFriendlyName($friendlyName)
- {
- $this->options['friendlyName'] = $friendlyName;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Authy.V1.UpdateServiceOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/ServicePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/ServicePage.php
deleted file mode 100644
index e0827f3..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Authy/V1/ServicePage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new ServiceInstance($this->version, $payload);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Authy.V1.ServicePage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot.php
index f2d27f0..766ee01 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot.php
@@ -1,111 +1,32 @@
baseUrl = 'https://autopilot.twilio.com';
- }
-
- /**
- * @return \Twilio\Rest\Autopilot\V1 Version v1 of autopilot
- */
- protected function getV1()
- {
- if (!$this->_v1) {
- $this->_v1 = new V1($this);
- }
- return $this->_v1;
- }
-
- /**
- * Magic getter to lazy load version
- *
- * @param string $name Version to return
- * @return \Twilio\Version The requested version
- * @throws TwilioException For unknown versions
- */
- public function __get($name)
- {
- $method = 'get' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return $this->$method();
- }
-
- throw new TwilioException('Unknown version ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $method = 'context' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return \call_user_func_array(array($this, $method), $arguments);
- }
-
- throw new TwilioException('Unknown context ' . $name);
- }
+class Autopilot extends AutopilotBase {
/**
- * @return \Twilio\Rest\Autopilot\V1\AssistantList
+ * @deprecated Use v1->assistants instead.
*/
- protected function getAssistants()
- {
+ protected function getAssistants(): \Twilio\Rest\Autopilot\V1\AssistantList {
+ echo "assistants is deprecated. Use v1->assistants instead.";
return $this->v1->assistants;
}
/**
+ * @deprecated Use v1->assistants(\$sid) instead.
* @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Autopilot\V1\AssistantContext
*/
- protected function contextAssistants($sid)
- {
+ protected function contextAssistants(string $sid): \Twilio\Rest\Autopilot\V1\AssistantContext {
+ echo "assistants(\$sid) is deprecated. Use v1->assistants(\$sid) instead.";
return $this->v1->assistants($sid);
}
/**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
+ * @deprecated Use v1->restoreAssistant instead
*/
- public function __toString()
- {
- return '[Twilio.Autopilot]';
+ protected function getRestoreAssistant(): \Twilio\Rest\Autopilot\V1\RestoreAssistantList {
+ echo "restoreAssistant is deprecated. Use v1->restoreAssistant instead.";
+ return $this->v1->restoreAssistant;
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1.php
deleted file mode 100644
index cb0c82d..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1.php
+++ /dev/null
@@ -1,92 +0,0 @@
-version = 'v1';
- }
-
- /**
- * @return \Twilio\Rest\Autopilot\V1\AssistantList
- */
- protected function getAssistants()
- {
- if (!$this->_assistants) {
- $this->_assistants = new AssistantList($this);
- }
- return $this->_assistants;
- }
-
- /**
- * Magic getter to lazy load root resources
- *
- * @param string $name Resource to return
- * @return \Twilio\ListResource The requested resource
- * @throws TwilioException For unknown resource
- */
- public function __get($name)
- {
- $method = 'get' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return $this->$method();
- }
-
- throw new TwilioException('Unknown resource ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $property = $this->$name;
- if (\method_exists($property, 'getContext')) {
- return \call_user_func_array(array($property, 'getContext'), $arguments);
- }
-
- throw new TwilioException('Resource does not have a context');
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Autopilot.V1]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/DefaultsContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/DefaultsContext.php
deleted file mode 100644
index e85d1d2..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/DefaultsContext.php
+++ /dev/null
@@ -1,97 +0,0 @@
-solution = array('assistantSid' => $assistantSid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Defaults';
- }
-
- /**
- * Fetch a DefaultsInstance
- *
- * @return DefaultsInstance Fetched DefaultsInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new DefaultsInstance($this->version, $payload, $this->solution['assistantSid']);
- }
-
- /**
- * Update the DefaultsInstance
- *
- * @param array|Options $options Optional Arguments
- * @return DefaultsInstance Updated DefaultsInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array('Defaults' => Serialize::jsonObject($options['defaults']),));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new DefaultsInstance($this->version, $payload, $this->solution['assistantSid']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Autopilot.V1.DefaultsContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/DefaultsInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/DefaultsInstance.php
deleted file mode 100644
index ab00e6a..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/DefaultsInstance.php
+++ /dev/null
@@ -1,125 +0,0 @@
-properties = array(
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'assistantSid' => Values::array_get($payload, 'assistant_sid'),
- 'url' => Values::array_get($payload, 'url'),
- 'data' => Values::array_get($payload, 'data'),
- );
-
- $this->solution = array('assistantSid' => $assistantSid,);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\DefaultsContext Context for this
- * DefaultsInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new DefaultsContext($this->version, $this->solution['assistantSid']);
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a DefaultsInstance
- *
- * @return DefaultsInstance Fetched DefaultsInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Update the DefaultsInstance
- *
- * @param array|Options $options Optional Arguments
- * @return DefaultsInstance Updated DefaultsInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- return $this->proxy()->update($options);
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Autopilot.V1.DefaultsInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/DefaultsList.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/DefaultsList.php
deleted file mode 100644
index 92b75e0..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/DefaultsList.php
+++ /dev/null
@@ -1,55 +0,0 @@
-solution = array('assistantSid' => $assistantSid,);
- }
-
- /**
- * Constructs a DefaultsContext
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\DefaultsContext
- */
- public function getContext()
- {
- return new DefaultsContext($this->version, $this->solution['assistantSid']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Autopilot.V1.DefaultsList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/DefaultsOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/DefaultsOptions.php
deleted file mode 100644
index fb63621..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/DefaultsOptions.php
+++ /dev/null
@@ -1,67 +0,0 @@
-options['defaults'] = $defaults;
- }
-
- /**
- * A JSON string that describes the default task links for the `assistant_initiation`, `collect`, and `fallback` situations.
- *
- * @param array $defaults A JSON string that describes the default task links.
- * @return $this Fluent Builder
- */
- public function setDefaults($defaults)
- {
- $this->options['defaults'] = $defaults;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Autopilot.V1.UpdateDefaultsOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/DefaultsPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/DefaultsPage.php
deleted file mode 100644
index bef0021..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/DefaultsPage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new DefaultsInstance($this->version, $payload, $this->solution['assistantSid']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Autopilot.V1.DefaultsPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/DialogueContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/DialogueContext.php
deleted file mode 100644
index 8af8f55..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/DialogueContext.php
+++ /dev/null
@@ -1,78 +0,0 @@
-solution = array('assistantSid' => $assistantSid, 'sid' => $sid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Dialogues/' . \rawurlencode($sid) . '';
- }
-
- /**
- * Fetch a DialogueInstance
- *
- * @return DialogueInstance Fetched DialogueInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new DialogueInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Autopilot.V1.DialogueContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/DialogueInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/DialogueInstance.php
deleted file mode 100644
index 7e25003..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/DialogueInstance.php
+++ /dev/null
@@ -1,119 +0,0 @@
-properties = array(
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'assistantSid' => Values::array_get($payload, 'assistant_sid'),
- 'sid' => Values::array_get($payload, 'sid'),
- 'data' => Values::array_get($payload, 'data'),
- 'url' => Values::array_get($payload, 'url'),
- );
-
- $this->solution = array('assistantSid' => $assistantSid, 'sid' => $sid ?: $this->properties['sid'],);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\DialogueContext Context for this
- * DialogueInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new DialogueContext(
- $this->version,
- $this->solution['assistantSid'],
- $this->solution['sid']
- );
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a DialogueInstance
- *
- * @return DialogueInstance Fetched DialogueInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Autopilot.V1.DialogueInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/DialogueList.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/DialogueList.php
deleted file mode 100644
index 402e0e6..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/DialogueList.php
+++ /dev/null
@@ -1,56 +0,0 @@
-solution = array('assistantSid' => $assistantSid,);
- }
-
- /**
- * Constructs a DialogueContext
- *
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Autopilot\V1\Assistant\DialogueContext
- */
- public function getContext($sid)
- {
- return new DialogueContext($this->version, $this->solution['assistantSid'], $sid);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Autopilot.V1.DialogueList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/DialoguePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/DialoguePage.php
deleted file mode 100644
index 34f8d6e..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/DialoguePage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new DialogueInstance($this->version, $payload, $this->solution['assistantSid']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Autopilot.V1.DialoguePage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/ExportAssistantContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/ExportAssistantContext.php
deleted file mode 100644
index 05ffb6d..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/ExportAssistantContext.php
+++ /dev/null
@@ -1,71 +0,0 @@
-solution = array('assistantSid' => $assistantSid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Export';
- }
-
- /**
- * Fetch a ExportAssistantInstance
- *
- * @return ExportAssistantInstance Fetched ExportAssistantInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new ExportAssistantInstance($this->version, $payload, $this->solution['assistantSid']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Autopilot.V1.ExportAssistantContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/ExportAssistantInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/ExportAssistantInstance.php
deleted file mode 100644
index c07c3b6..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/ExportAssistantInstance.php
+++ /dev/null
@@ -1,119 +0,0 @@
-properties = array(
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'assistantSid' => Values::array_get($payload, 'assistant_sid'),
- 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'status' => Values::array_get($payload, 'status'),
- 'errorCode' => Values::array_get($payload, 'error_code'),
- 'url' => Values::array_get($payload, 'url'),
- 'schema' => Values::array_get($payload, 'schema'),
- );
-
- $this->solution = array('assistantSid' => $assistantSid,);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\ExportAssistantContext Context
- * for this
- * ExportAssistantInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new ExportAssistantContext($this->version, $this->solution['assistantSid']);
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a ExportAssistantInstance
- *
- * @return ExportAssistantInstance Fetched ExportAssistantInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Autopilot.V1.ExportAssistantInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/ExportAssistantList.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/ExportAssistantList.php
deleted file mode 100644
index f06232f..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/ExportAssistantList.php
+++ /dev/null
@@ -1,54 +0,0 @@
-solution = array('assistantSid' => $assistantSid,);
- }
-
- /**
- * Constructs a ExportAssistantContext
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\ExportAssistantContext
- */
- public function getContext()
- {
- return new ExportAssistantContext($this->version, $this->solution['assistantSid']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Autopilot.V1.ExportAssistantList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/ExportAssistantPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/ExportAssistantPage.php
deleted file mode 100644
index 7908666..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/ExportAssistantPage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new ExportAssistantInstance($this->version, $payload, $this->solution['assistantSid']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Autopilot.V1.ExportAssistantPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/FieldType/FieldValueContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/FieldType/FieldValueContext.php
deleted file mode 100644
index acdfe54..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/FieldType/FieldValueContext.php
+++ /dev/null
@@ -1,97 +0,0 @@
-solution = array(
- 'assistantSid' => $assistantSid,
- 'fieldTypeSid' => $fieldTypeSid,
- 'sid' => $sid,
- );
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/FieldTypes/' . \rawurlencode($fieldTypeSid) . '/FieldValues/' . \rawurlencode($sid) . '';
- }
-
- /**
- * Fetch a FieldValueInstance
- *
- * @return FieldValueInstance Fetched FieldValueInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new FieldValueInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['fieldTypeSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Deletes the FieldValueInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Autopilot.V1.FieldValueContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/FieldType/FieldValueInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/FieldType/FieldValueInstance.php
deleted file mode 100644
index a055f5e..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/FieldType/FieldValueInstance.php
+++ /dev/null
@@ -1,147 +0,0 @@
-properties = array(
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- 'fieldTypeSid' => Values::array_get($payload, 'field_type_sid'),
- 'language' => Values::array_get($payload, 'language'),
- 'assistantSid' => Values::array_get($payload, 'assistant_sid'),
- 'sid' => Values::array_get($payload, 'sid'),
- 'value' => Values::array_get($payload, 'value'),
- 'url' => Values::array_get($payload, 'url'),
- 'synonymOf' => Values::array_get($payload, 'synonym_of'),
- );
-
- $this->solution = array(
- 'assistantSid' => $assistantSid,
- 'fieldTypeSid' => $fieldTypeSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\FieldType\FieldValueContext Context for this FieldValueInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new FieldValueContext(
- $this->version,
- $this->solution['assistantSid'],
- $this->solution['fieldTypeSid'],
- $this->solution['sid']
- );
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a FieldValueInstance
- *
- * @return FieldValueInstance Fetched FieldValueInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Deletes the FieldValueInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->proxy()->delete();
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Autopilot.V1.FieldValueInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/FieldType/FieldValueList.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/FieldType/FieldValueList.php
deleted file mode 100644
index 6f31bb7..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/FieldType/FieldValueList.php
+++ /dev/null
@@ -1,198 +0,0 @@
-solution = array('assistantSid' => $assistantSid, 'fieldTypeSid' => $fieldTypeSid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/FieldTypes/' . \rawurlencode($fieldTypeSid) . '/FieldValues';
- }
-
- /**
- * Streams FieldValueInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
- */
- public function stream($options = array(), $limit = null, $pageSize = null)
- {
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($options, $limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
- }
-
- /**
- * Reads FieldValueInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return FieldValueInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
- /**
- * Retrieve a single page of FieldValueInstance records from the API.
- * Request is executed immediately
- *
- * @param array|Options $options Optional Arguments
- * @param mixed $pageSize Number of records to return, defaults to 50
- * @param string $pageToken PageToken provided by the API
- * @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of FieldValueInstance
- */
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
- {
- $options = new Values($options);
- $params = Values::of(array(
- 'Language' => $options['language'],
- 'PageToken' => $pageToken,
- 'Page' => $pageNumber,
- 'PageSize' => $pageSize,
- ));
-
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
-
- return new FieldValuePage($this->version, $response, $this->solution);
- }
-
- /**
- * Retrieve a specific page of FieldValueInstance records from the API.
- * Request is executed immediately
- *
- * @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of FieldValueInstance
- */
- public function getPage($targetUrl)
- {
- $response = $this->version->getDomain()->getClient()->request(
- 'GET',
- $targetUrl
- );
-
- return new FieldValuePage($this->version, $response, $this->solution);
- }
-
- /**
- * Create a new FieldValueInstance
- *
- * @param string $language The ISO language-country tag that identifies the
- * language of the value
- * @param string $value The Field Value data
- * @param array|Options $options Optional Arguments
- * @return FieldValueInstance Newly created FieldValueInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($language, $value, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'Language' => $language,
- 'Value' => $value,
- 'SynonymOf' => $options['synonymOf'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new FieldValueInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['fieldTypeSid']
- );
- }
-
- /**
- * Constructs a FieldValueContext
- *
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Autopilot\V1\Assistant\FieldType\FieldValueContext
- */
- public function getContext($sid)
- {
- return new FieldValueContext(
- $this->version,
- $this->solution['assistantSid'],
- $this->solution['fieldTypeSid'],
- $sid
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Autopilot.V1.FieldValueList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/FieldType/FieldValueOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/FieldType/FieldValueOptions.php
deleted file mode 100644
index 842def1..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/FieldType/FieldValueOptions.php
+++ /dev/null
@@ -1,121 +0,0 @@
-options['language'] = $language;
- }
-
- /**
- * The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) tag that specifies the language of the value. Currently supported tags: `en-US`
- *
- * @param string $language The ISO language-country tag that identifies the
- * language of the value
- * @return $this Fluent Builder
- */
- public function setLanguage($language)
- {
- $this->options['language'] = $language;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Autopilot.V1.ReadFieldValueOptions ' . \implode(' ', $options) . ']';
- }
-}
-
-class CreateFieldValueOptions extends Options
-{
- /**
- * @param string $synonymOf The string value that indicates which word the
- * field value is a synonym of
- */
- public function __construct($synonymOf = Values::NONE)
- {
- $this->options['synonymOf'] = $synonymOf;
- }
-
- /**
- * The string value that indicates which word the field value is a synonym of.
- *
- * @param string $synonymOf The string value that indicates which word the
- * field value is a synonym of
- * @return $this Fluent Builder
- */
- public function setSynonymOf($synonymOf)
- {
- $this->options['synonymOf'] = $synonymOf;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Autopilot.V1.CreateFieldValueOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/FieldType/FieldValuePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/FieldType/FieldValuePage.php
deleted file mode 100644
index 0ac365e..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/FieldType/FieldValuePage.php
+++ /dev/null
@@ -1,46 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new FieldValueInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['fieldTypeSid']
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Autopilot.V1.FieldValuePage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/FieldTypeContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/FieldTypeContext.php
deleted file mode 100644
index bfbcd68..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/FieldTypeContext.php
+++ /dev/null
@@ -1,180 +0,0 @@
-solution = array('assistantSid' => $assistantSid, 'sid' => $sid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/FieldTypes/' . \rawurlencode($sid) . '';
- }
-
- /**
- * Fetch a FieldTypeInstance
- *
- * @return FieldTypeInstance Fetched FieldTypeInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new FieldTypeInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Update the FieldTypeInstance
- *
- * @param array|Options $options Optional Arguments
- * @return FieldTypeInstance Updated FieldTypeInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'UniqueName' => $options['uniqueName'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new FieldTypeInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Deletes the FieldTypeInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
-
- /**
- * Access the fieldValues
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\FieldType\FieldValueList
- */
- protected function getFieldValues()
- {
- if (!$this->_fieldValues) {
- $this->_fieldValues = new FieldValueList(
- $this->version,
- $this->solution['assistantSid'],
- $this->solution['sid']
- );
- }
-
- return $this->_fieldValues;
- }
-
- /**
- * Magic getter to lazy load subresources
- *
- * @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
- * @throws TwilioException For unknown subresources
- */
- public function __get($name)
- {
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown subresource ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $property = $this->$name;
- if (\method_exists($property, 'getContext')) {
- return \call_user_func_array(array($property, 'getContext'), $arguments);
- }
-
- throw new TwilioException('Resource does not have a context');
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Autopilot.V1.FieldTypeContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/FieldTypeInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/FieldTypeInstance.php
deleted file mode 100644
index 7d06c47..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/FieldTypeInstance.php
+++ /dev/null
@@ -1,165 +0,0 @@
-properties = array(
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- 'friendlyName' => Values::array_get($payload, 'friendly_name'),
- 'links' => Values::array_get($payload, 'links'),
- 'assistantSid' => Values::array_get($payload, 'assistant_sid'),
- 'sid' => Values::array_get($payload, 'sid'),
- 'uniqueName' => Values::array_get($payload, 'unique_name'),
- 'url' => Values::array_get($payload, 'url'),
- );
-
- $this->solution = array('assistantSid' => $assistantSid, 'sid' => $sid ?: $this->properties['sid'],);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\FieldTypeContext Context for
- * this
- * FieldTypeInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new FieldTypeContext(
- $this->version,
- $this->solution['assistantSid'],
- $this->solution['sid']
- );
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a FieldTypeInstance
- *
- * @return FieldTypeInstance Fetched FieldTypeInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Update the FieldTypeInstance
- *
- * @param array|Options $options Optional Arguments
- * @return FieldTypeInstance Updated FieldTypeInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- return $this->proxy()->update($options);
- }
-
- /**
- * Deletes the FieldTypeInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->proxy()->delete();
- }
-
- /**
- * Access the fieldValues
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\FieldType\FieldValueList
- */
- protected function getFieldValues()
- {
- return $this->proxy()->fieldValues;
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Autopilot.V1.FieldTypeInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/FieldTypeList.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/FieldTypeList.php
deleted file mode 100644
index 4555aa5..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/FieldTypeList.php
+++ /dev/null
@@ -1,176 +0,0 @@
-solution = array('assistantSid' => $assistantSid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/FieldTypes';
- }
-
- /**
- * Streams FieldTypeInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
- *
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
- */
- public function stream($limit = null, $pageSize = null)
- {
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
- }
-
- /**
- * Reads FieldTypeInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return FieldTypeInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
- /**
- * Retrieve a single page of FieldTypeInstance records from the API.
- * Request is executed immediately
- *
- * @param mixed $pageSize Number of records to return, defaults to 50
- * @param string $pageToken PageToken provided by the API
- * @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of FieldTypeInstance
- */
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
- {
- $params = Values::of(array(
- 'PageToken' => $pageToken,
- 'Page' => $pageNumber,
- 'PageSize' => $pageSize,
- ));
-
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
-
- return new FieldTypePage($this->version, $response, $this->solution);
- }
-
- /**
- * Retrieve a specific page of FieldTypeInstance records from the API.
- * Request is executed immediately
- *
- * @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of FieldTypeInstance
- */
- public function getPage($targetUrl)
- {
- $response = $this->version->getDomain()->getClient()->request(
- 'GET',
- $targetUrl
- );
-
- return new FieldTypePage($this->version, $response, $this->solution);
- }
-
- /**
- * Create a new FieldTypeInstance
- *
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the new resource
- * @param array|Options $options Optional Arguments
- * @return FieldTypeInstance Newly created FieldTypeInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($uniqueName, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array('UniqueName' => $uniqueName, 'FriendlyName' => $options['friendlyName'],));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new FieldTypeInstance($this->version, $payload, $this->solution['assistantSid']);
- }
-
- /**
- * Constructs a FieldTypeContext
- *
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Autopilot\V1\Assistant\FieldTypeContext
- */
- public function getContext($sid)
- {
- return new FieldTypeContext($this->version, $this->solution['assistantSid'], $sid);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Autopilot.V1.FieldTypeList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/FieldTypeOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/FieldTypeOptions.php
deleted file mode 100644
index 76f7cde..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/FieldTypeOptions.php
+++ /dev/null
@@ -1,133 +0,0 @@
-options['friendlyName'] = $friendlyName;
- }
-
- /**
- * A descriptive string that you create to describe the new resource. It is not unique and can be up to 255 characters long.
- *
- * @param string $friendlyName A string to describe the new resource
- * @return $this Fluent Builder
- */
- public function setFriendlyName($friendlyName)
- {
- $this->options['friendlyName'] = $friendlyName;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Autopilot.V1.CreateFieldTypeOptions ' . \implode(' ', $options) . ']';
- }
-}
-
-class UpdateFieldTypeOptions extends Options
-{
- /**
- * @param string $friendlyName A string to describe the resource
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the resource
- */
- public function __construct($friendlyName = Values::NONE, $uniqueName = Values::NONE)
- {
- $this->options['friendlyName'] = $friendlyName;
- $this->options['uniqueName'] = $uniqueName;
- }
-
- /**
- * A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long.
- *
- * @param string $friendlyName A string to describe the resource
- * @return $this Fluent Builder
- */
- public function setFriendlyName($friendlyName)
- {
- $this->options['friendlyName'] = $friendlyName;
- return $this;
- }
-
- /**
- * An application-defined string that uniquely identifies the resource. It can be used as an alternative to the `sid` in the URL path to address the resource. The first 64 characters must be unique.
- *
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the resource
- * @return $this Fluent Builder
- */
- public function setUniqueName($uniqueName)
- {
- $this->options['uniqueName'] = $uniqueName;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Autopilot.V1.UpdateFieldTypeOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/FieldTypePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/FieldTypePage.php
deleted file mode 100644
index 204f5fd..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/FieldTypePage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new FieldTypeInstance($this->version, $payload, $this->solution['assistantSid']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Autopilot.V1.FieldTypePage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/ModelBuildContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/ModelBuildContext.php
deleted file mode 100644
index 24fa122..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/ModelBuildContext.php
+++ /dev/null
@@ -1,118 +0,0 @@
-solution = array('assistantSid' => $assistantSid, 'sid' => $sid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/ModelBuilds/' . \rawurlencode($sid) . '';
- }
-
- /**
- * Fetch a ModelBuildInstance
- *
- * @return ModelBuildInstance Fetched ModelBuildInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new ModelBuildInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Update the ModelBuildInstance
- *
- * @param array|Options $options Optional Arguments
- * @return ModelBuildInstance Updated ModelBuildInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array('UniqueName' => $options['uniqueName'],));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new ModelBuildInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Deletes the ModelBuildInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Autopilot.V1.ModelBuildContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/ModelBuildInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/ModelBuildInstance.php
deleted file mode 100644
index e8f66e0..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/ModelBuildInstance.php
+++ /dev/null
@@ -1,155 +0,0 @@
-properties = array(
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- 'assistantSid' => Values::array_get($payload, 'assistant_sid'),
- 'sid' => Values::array_get($payload, 'sid'),
- 'status' => Values::array_get($payload, 'status'),
- 'uniqueName' => Values::array_get($payload, 'unique_name'),
- 'url' => Values::array_get($payload, 'url'),
- 'buildDuration' => Values::array_get($payload, 'build_duration'),
- 'errorCode' => Values::array_get($payload, 'error_code'),
- );
-
- $this->solution = array('assistantSid' => $assistantSid, 'sid' => $sid ?: $this->properties['sid'],);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\ModelBuildContext Context for
- * this
- * ModelBuildInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new ModelBuildContext(
- $this->version,
- $this->solution['assistantSid'],
- $this->solution['sid']
- );
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a ModelBuildInstance
- *
- * @return ModelBuildInstance Fetched ModelBuildInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Update the ModelBuildInstance
- *
- * @param array|Options $options Optional Arguments
- * @return ModelBuildInstance Updated ModelBuildInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- return $this->proxy()->update($options);
- }
-
- /**
- * Deletes the ModelBuildInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->proxy()->delete();
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Autopilot.V1.ModelBuildInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/ModelBuildList.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/ModelBuildList.php
deleted file mode 100644
index 87bd46f..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/ModelBuildList.php
+++ /dev/null
@@ -1,177 +0,0 @@
-solution = array('assistantSid' => $assistantSid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/ModelBuilds';
- }
-
- /**
- * Streams ModelBuildInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
- *
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
- */
- public function stream($limit = null, $pageSize = null)
- {
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
- }
-
- /**
- * Reads ModelBuildInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return ModelBuildInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
- /**
- * Retrieve a single page of ModelBuildInstance records from the API.
- * Request is executed immediately
- *
- * @param mixed $pageSize Number of records to return, defaults to 50
- * @param string $pageToken PageToken provided by the API
- * @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of ModelBuildInstance
- */
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
- {
- $params = Values::of(array(
- 'PageToken' => $pageToken,
- 'Page' => $pageNumber,
- 'PageSize' => $pageSize,
- ));
-
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
-
- return new ModelBuildPage($this->version, $response, $this->solution);
- }
-
- /**
- * Retrieve a specific page of ModelBuildInstance records from the API.
- * Request is executed immediately
- *
- * @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of ModelBuildInstance
- */
- public function getPage($targetUrl)
- {
- $response = $this->version->getDomain()->getClient()->request(
- 'GET',
- $targetUrl
- );
-
- return new ModelBuildPage($this->version, $response, $this->solution);
- }
-
- /**
- * Create a new ModelBuildInstance
- *
- * @param array|Options $options Optional Arguments
- * @return ModelBuildInstance Newly created ModelBuildInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'StatusCallback' => $options['statusCallback'],
- 'UniqueName' => $options['uniqueName'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new ModelBuildInstance($this->version, $payload, $this->solution['assistantSid']);
- }
-
- /**
- * Constructs a ModelBuildContext
- *
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Autopilot\V1\Assistant\ModelBuildContext
- */
- public function getContext($sid)
- {
- return new ModelBuildContext($this->version, $this->solution['assistantSid'], $sid);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Autopilot.V1.ModelBuildList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/ModelBuildOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/ModelBuildOptions.php
deleted file mode 100644
index 097cb79..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/ModelBuildOptions.php
+++ /dev/null
@@ -1,139 +0,0 @@
-options['statusCallback'] = $statusCallback;
- $this->options['uniqueName'] = $uniqueName;
- }
-
- /**
- * The URL we should call using a POST method to send status information to your application.
- *
- * @param string $statusCallback The URL we should call using a POST method to
- * send status information to your application
- * @return $this Fluent Builder
- */
- public function setStatusCallback($statusCallback)
- {
- $this->options['statusCallback'] = $statusCallback;
- return $this;
- }
-
- /**
- * An application-defined string that uniquely identifies the new resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the `sid` in the URL path to address the resource.
- *
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the new resource
- * @return $this Fluent Builder
- */
- public function setUniqueName($uniqueName)
- {
- $this->options['uniqueName'] = $uniqueName;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Autopilot.V1.CreateModelBuildOptions ' . \implode(' ', $options) . ']';
- }
-}
-
-class UpdateModelBuildOptions extends Options
-{
- /**
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the resource
- */
- public function __construct($uniqueName = Values::NONE)
- {
- $this->options['uniqueName'] = $uniqueName;
- }
-
- /**
- * An application-defined string that uniquely identifies the resource. This value must be a unique string of no more than 64 characters. It can be used as an alternative to the `sid` in the URL path to address the resource.
- *
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the resource
- * @return $this Fluent Builder
- */
- public function setUniqueName($uniqueName)
- {
- $this->options['uniqueName'] = $uniqueName;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Autopilot.V1.UpdateModelBuildOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/ModelBuildPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/ModelBuildPage.php
deleted file mode 100644
index c88eee6..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/ModelBuildPage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new ModelBuildInstance($this->version, $payload, $this->solution['assistantSid']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Autopilot.V1.ModelBuildPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/QueryContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/QueryContext.php
deleted file mode 100644
index 162f0ac..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/QueryContext.php
+++ /dev/null
@@ -1,118 +0,0 @@
-solution = array('assistantSid' => $assistantSid, 'sid' => $sid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Queries/' . \rawurlencode($sid) . '';
- }
-
- /**
- * Fetch a QueryInstance
- *
- * @return QueryInstance Fetched QueryInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new QueryInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Update the QueryInstance
- *
- * @param array|Options $options Optional Arguments
- * @return QueryInstance Updated QueryInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array('SampleSid' => $options['sampleSid'], 'Status' => $options['status'],));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new QueryInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Deletes the QueryInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Autopilot.V1.QueryContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/QueryInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/QueryInstance.php
deleted file mode 100644
index d47461b..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/QueryInstance.php
+++ /dev/null
@@ -1,162 +0,0 @@
-properties = array(
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- 'results' => Values::array_get($payload, 'results'),
- 'language' => Values::array_get($payload, 'language'),
- 'modelBuildSid' => Values::array_get($payload, 'model_build_sid'),
- 'query' => Values::array_get($payload, 'query'),
- 'sampleSid' => Values::array_get($payload, 'sample_sid'),
- 'assistantSid' => Values::array_get($payload, 'assistant_sid'),
- 'sid' => Values::array_get($payload, 'sid'),
- 'status' => Values::array_get($payload, 'status'),
- 'url' => Values::array_get($payload, 'url'),
- 'sourceChannel' => Values::array_get($payload, 'source_channel'),
- 'dialogueSid' => Values::array_get($payload, 'dialogue_sid'),
- );
-
- $this->solution = array('assistantSid' => $assistantSid, 'sid' => $sid ?: $this->properties['sid'],);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\QueryContext Context for this
- * QueryInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new QueryContext(
- $this->version,
- $this->solution['assistantSid'],
- $this->solution['sid']
- );
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a QueryInstance
- *
- * @return QueryInstance Fetched QueryInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Update the QueryInstance
- *
- * @param array|Options $options Optional Arguments
- * @return QueryInstance Updated QueryInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- return $this->proxy()->update($options);
- }
-
- /**
- * Deletes the QueryInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->proxy()->delete();
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Autopilot.V1.QueryInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/QueryList.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/QueryList.php
deleted file mode 100644
index 5e07315..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/QueryList.php
+++ /dev/null
@@ -1,189 +0,0 @@
-solution = array('assistantSid' => $assistantSid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Queries';
- }
-
- /**
- * Streams QueryInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
- */
- public function stream($options = array(), $limit = null, $pageSize = null)
- {
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($options, $limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
- }
-
- /**
- * Reads QueryInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return QueryInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
- /**
- * Retrieve a single page of QueryInstance records from the API.
- * Request is executed immediately
- *
- * @param array|Options $options Optional Arguments
- * @param mixed $pageSize Number of records to return, defaults to 50
- * @param string $pageToken PageToken provided by the API
- * @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of QueryInstance
- */
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
- {
- $options = new Values($options);
- $params = Values::of(array(
- 'Language' => $options['language'],
- 'ModelBuild' => $options['modelBuild'],
- 'Status' => $options['status'],
- 'PageToken' => $pageToken,
- 'Page' => $pageNumber,
- 'PageSize' => $pageSize,
- ));
-
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
-
- return new QueryPage($this->version, $response, $this->solution);
- }
-
- /**
- * Retrieve a specific page of QueryInstance records from the API.
- * Request is executed immediately
- *
- * @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of QueryInstance
- */
- public function getPage($targetUrl)
- {
- $response = $this->version->getDomain()->getClient()->request(
- 'GET',
- $targetUrl
- );
-
- return new QueryPage($this->version, $response, $this->solution);
- }
-
- /**
- * Create a new QueryInstance
- *
- * @param string $language The ISO language-country string that specifies the
- * language used for the new query
- * @param string $query The end-user's natural language input
- * @param array|Options $options Optional Arguments
- * @return QueryInstance Newly created QueryInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($language, $query, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'Language' => $language,
- 'Query' => $query,
- 'Tasks' => $options['tasks'],
- 'ModelBuild' => $options['modelBuild'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new QueryInstance($this->version, $payload, $this->solution['assistantSid']);
- }
-
- /**
- * Constructs a QueryContext
- *
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Autopilot\V1\Assistant\QueryContext
- */
- public function getContext($sid)
- {
- return new QueryContext($this->version, $this->solution['assistantSid'], $sid);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Autopilot.V1.QueryList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/QueryOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/QueryOptions.php
deleted file mode 100644
index bb3b53a..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/QueryOptions.php
+++ /dev/null
@@ -1,235 +0,0 @@
-options['language'] = $language;
- $this->options['modelBuild'] = $modelBuild;
- $this->options['status'] = $status;
- }
-
- /**
- * The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used by the Query resources to read. For example: `en-US`.
- *
- * @param string $language The ISO language-country string that specifies the
- * language used by the Query resources to read
- * @return $this Fluent Builder
- */
- public function setLanguage($language)
- {
- $this->options['language'] = $language;
- return $this;
- }
-
- /**
- * The SID or unique name of the [Model Build](https://www.twilio.com/docs/autopilot/api/model-build) to be queried.
- *
- * @param string $modelBuild The SID or unique name of the Model Build to be
- * queried
- * @return $this Fluent Builder
- */
- public function setModelBuild($modelBuild)
- {
- $this->options['modelBuild'] = $modelBuild;
- return $this;
- }
-
- /**
- * The status of the resources to read. Can be: `pending-review`, `reviewed`, or `discarded`
- *
- * @param string $status The status of the resources to read
- * @return $this Fluent Builder
- */
- public function setStatus($status)
- {
- $this->options['status'] = $status;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Autopilot.V1.ReadQueryOptions ' . \implode(' ', $options) . ']';
- }
-}
-
-class CreateQueryOptions extends Options
-{
- /**
- * @param string $tasks The list of tasks to limit the new query to
- * @param string $modelBuild The SID or unique name of the Model Build to be
- * queried
- */
- public function __construct($tasks = Values::NONE, $modelBuild = Values::NONE)
- {
- $this->options['tasks'] = $tasks;
- $this->options['modelBuild'] = $modelBuild;
- }
-
- /**
- * The list of tasks to limit the new query to. Tasks are expressed as a comma-separated list of task `unique_name` values. For example, `task-unique_name-1, task-unique_name-2`. Listing specific tasks is useful to constrain the paths that a user can take.
- *
- * @param string $tasks The list of tasks to limit the new query to
- * @return $this Fluent Builder
- */
- public function setTasks($tasks)
- {
- $this->options['tasks'] = $tasks;
- return $this;
- }
-
- /**
- * The SID or unique name of the [Model Build](https://www.twilio.com/docs/autopilot/api/model-build) to be queried.
- *
- * @param string $modelBuild The SID or unique name of the Model Build to be
- * queried
- * @return $this Fluent Builder
- */
- public function setModelBuild($modelBuild)
- {
- $this->options['modelBuild'] = $modelBuild;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Autopilot.V1.CreateQueryOptions ' . \implode(' ', $options) . ']';
- }
-}
-
-class UpdateQueryOptions extends Options
-{
- /**
- * @param string $sampleSid The SID of an optional reference to the Sample
- * created from the query
- * @param string $status The new status of the resource
- */
- public function __construct($sampleSid = Values::NONE, $status = Values::NONE)
- {
- $this->options['sampleSid'] = $sampleSid;
- $this->options['status'] = $status;
- }
-
- /**
- * The SID of an optional reference to the [Sample](https://www.twilio.com/docs/autopilot/api/task-sample) created from the query.
- *
- * @param string $sampleSid The SID of an optional reference to the Sample
- * created from the query
- * @return $this Fluent Builder
- */
- public function setSampleSid($sampleSid)
- {
- $this->options['sampleSid'] = $sampleSid;
- return $this;
- }
-
- /**
- * The new status of the resource. Can be: `pending-review`, `reviewed`, or `discarded`
- *
- * @param string $status The new status of the resource
- * @return $this Fluent Builder
- */
- public function setStatus($status)
- {
- $this->options['status'] = $status;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Autopilot.V1.UpdateQueryOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/QueryPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/QueryPage.php
deleted file mode 100644
index 7a4d0be..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/QueryPage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new QueryInstance($this->version, $payload, $this->solution['assistantSid']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Autopilot.V1.QueryPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/StyleSheetContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/StyleSheetContext.php
deleted file mode 100644
index ac2e891..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/StyleSheetContext.php
+++ /dev/null
@@ -1,97 +0,0 @@
-solution = array('assistantSid' => $assistantSid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/StyleSheet';
- }
-
- /**
- * Fetch a StyleSheetInstance
- *
- * @return StyleSheetInstance Fetched StyleSheetInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new StyleSheetInstance($this->version, $payload, $this->solution['assistantSid']);
- }
-
- /**
- * Update the StyleSheetInstance
- *
- * @param array|Options $options Optional Arguments
- * @return StyleSheetInstance Updated StyleSheetInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array('StyleSheet' => Serialize::jsonObject($options['styleSheet']),));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new StyleSheetInstance($this->version, $payload, $this->solution['assistantSid']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Autopilot.V1.StyleSheetContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/StyleSheetInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/StyleSheetInstance.php
deleted file mode 100644
index 6fcecf9..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/StyleSheetInstance.php
+++ /dev/null
@@ -1,126 +0,0 @@
-properties = array(
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'assistantSid' => Values::array_get($payload, 'assistant_sid'),
- 'url' => Values::array_get($payload, 'url'),
- 'data' => Values::array_get($payload, 'data'),
- );
-
- $this->solution = array('assistantSid' => $assistantSid,);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\StyleSheetContext Context for
- * this
- * StyleSheetInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new StyleSheetContext($this->version, $this->solution['assistantSid']);
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a StyleSheetInstance
- *
- * @return StyleSheetInstance Fetched StyleSheetInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Update the StyleSheetInstance
- *
- * @param array|Options $options Optional Arguments
- * @return StyleSheetInstance Updated StyleSheetInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- return $this->proxy()->update($options);
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Autopilot.V1.StyleSheetInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/StyleSheetList.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/StyleSheetList.php
deleted file mode 100644
index 71b25ef..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/StyleSheetList.php
+++ /dev/null
@@ -1,55 +0,0 @@
-solution = array('assistantSid' => $assistantSid,);
- }
-
- /**
- * Constructs a StyleSheetContext
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\StyleSheetContext
- */
- public function getContext()
- {
- return new StyleSheetContext($this->version, $this->solution['assistantSid']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Autopilot.V1.StyleSheetList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/StyleSheetOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/StyleSheetOptions.php
deleted file mode 100644
index e313369..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/StyleSheetOptions.php
+++ /dev/null
@@ -1,70 +0,0 @@
-options['styleSheet'] = $styleSheet;
- }
-
- /**
- * The JSON string that describes the style sheet object.
- *
- * @param array $styleSheet The JSON string that describes the style sheet
- * object
- * @return $this Fluent Builder
- */
- public function setStyleSheet($styleSheet)
- {
- $this->options['styleSheet'] = $styleSheet;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Autopilot.V1.UpdateStyleSheetOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/StyleSheetPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/StyleSheetPage.php
deleted file mode 100644
index 70962fc..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/StyleSheetPage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new StyleSheetInstance($this->version, $payload, $this->solution['assistantSid']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Autopilot.V1.StyleSheetPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/FieldContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/FieldContext.php
deleted file mode 100644
index 8037ea2..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/FieldContext.php
+++ /dev/null
@@ -1,92 +0,0 @@
-solution = array('assistantSid' => $assistantSid, 'taskSid' => $taskSid, 'sid' => $sid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Tasks/' . \rawurlencode($taskSid) . '/Fields/' . \rawurlencode($sid) . '';
- }
-
- /**
- * Fetch a FieldInstance
- *
- * @return FieldInstance Fetched FieldInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new FieldInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['taskSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Deletes the FieldInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Autopilot.V1.FieldContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/FieldInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/FieldInstance.php
deleted file mode 100644
index 4034609..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/FieldInstance.php
+++ /dev/null
@@ -1,147 +0,0 @@
-properties = array(
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- 'fieldType' => Values::array_get($payload, 'field_type'),
- 'taskSid' => Values::array_get($payload, 'task_sid'),
- 'assistantSid' => Values::array_get($payload, 'assistant_sid'),
- 'sid' => Values::array_get($payload, 'sid'),
- 'uniqueName' => Values::array_get($payload, 'unique_name'),
- 'url' => Values::array_get($payload, 'url'),
- );
-
- $this->solution = array(
- 'assistantSid' => $assistantSid,
- 'taskSid' => $taskSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\Task\FieldContext Context for
- * this
- * FieldInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new FieldContext(
- $this->version,
- $this->solution['assistantSid'],
- $this->solution['taskSid'],
- $this->solution['sid']
- );
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a FieldInstance
- *
- * @return FieldInstance Fetched FieldInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Deletes the FieldInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->proxy()->delete();
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Autopilot.V1.FieldInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/FieldList.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/FieldList.php
deleted file mode 100644
index 8d6c40d..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/FieldList.php
+++ /dev/null
@@ -1,185 +0,0 @@
-solution = array('assistantSid' => $assistantSid, 'taskSid' => $taskSid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Tasks/' . \rawurlencode($taskSid) . '/Fields';
- }
-
- /**
- * Streams FieldInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
- *
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
- */
- public function stream($limit = null, $pageSize = null)
- {
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
- }
-
- /**
- * Reads FieldInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return FieldInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
- /**
- * Retrieve a single page of FieldInstance records from the API.
- * Request is executed immediately
- *
- * @param mixed $pageSize Number of records to return, defaults to 50
- * @param string $pageToken PageToken provided by the API
- * @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of FieldInstance
- */
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
- {
- $params = Values::of(array(
- 'PageToken' => $pageToken,
- 'Page' => $pageNumber,
- 'PageSize' => $pageSize,
- ));
-
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
-
- return new FieldPage($this->version, $response, $this->solution);
- }
-
- /**
- * Retrieve a specific page of FieldInstance records from the API.
- * Request is executed immediately
- *
- * @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of FieldInstance
- */
- public function getPage($targetUrl)
- {
- $response = $this->version->getDomain()->getClient()->request(
- 'GET',
- $targetUrl
- );
-
- return new FieldPage($this->version, $response, $this->solution);
- }
-
- /**
- * Create a new FieldInstance
- *
- * @param string $fieldType The Field Type of this field
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the new resource
- * @return FieldInstance Newly created FieldInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($fieldType, $uniqueName)
- {
- $data = Values::of(array('FieldType' => $fieldType, 'UniqueName' => $uniqueName,));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new FieldInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['taskSid']
- );
- }
-
- /**
- * Constructs a FieldContext
- *
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Autopilot\V1\Assistant\Task\FieldContext
- */
- public function getContext($sid)
- {
- return new FieldContext(
- $this->version,
- $this->solution['assistantSid'],
- $this->solution['taskSid'],
- $sid
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Autopilot.V1.FieldList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/FieldPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/FieldPage.php
deleted file mode 100644
index f0417d2..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/FieldPage.php
+++ /dev/null
@@ -1,46 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new FieldInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['taskSid']
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Autopilot.V1.FieldPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/SampleContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/SampleContext.php
deleted file mode 100644
index 1d5fb22..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/SampleContext.php
+++ /dev/null
@@ -1,126 +0,0 @@
-solution = array('assistantSid' => $assistantSid, 'taskSid' => $taskSid, 'sid' => $sid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Tasks/' . \rawurlencode($taskSid) . '/Samples/' . \rawurlencode($sid) . '';
- }
-
- /**
- * Fetch a SampleInstance
- *
- * @return SampleInstance Fetched SampleInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new SampleInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['taskSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Update the SampleInstance
- *
- * @param array|Options $options Optional Arguments
- * @return SampleInstance Updated SampleInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'Language' => $options['language'],
- 'TaggedText' => $options['taggedText'],
- 'SourceChannel' => $options['sourceChannel'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new SampleInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['taskSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Deletes the SampleInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Autopilot.V1.SampleContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/SampleInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/SampleInstance.php
deleted file mode 100644
index 2d056cb..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/SampleInstance.php
+++ /dev/null
@@ -1,161 +0,0 @@
-properties = array(
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- 'taskSid' => Values::array_get($payload, 'task_sid'),
- 'language' => Values::array_get($payload, 'language'),
- 'assistantSid' => Values::array_get($payload, 'assistant_sid'),
- 'sid' => Values::array_get($payload, 'sid'),
- 'taggedText' => Values::array_get($payload, 'tagged_text'),
- 'url' => Values::array_get($payload, 'url'),
- 'sourceChannel' => Values::array_get($payload, 'source_channel'),
- );
-
- $this->solution = array(
- 'assistantSid' => $assistantSid,
- 'taskSid' => $taskSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\Task\SampleContext Context for
- * this
- * SampleInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new SampleContext(
- $this->version,
- $this->solution['assistantSid'],
- $this->solution['taskSid'],
- $this->solution['sid']
- );
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a SampleInstance
- *
- * @return SampleInstance Fetched SampleInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Update the SampleInstance
- *
- * @param array|Options $options Optional Arguments
- * @return SampleInstance Updated SampleInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- return $this->proxy()->update($options);
- }
-
- /**
- * Deletes the SampleInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->proxy()->delete();
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Autopilot.V1.SampleInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/SampleList.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/SampleList.php
deleted file mode 100644
index 657f947..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/SampleList.php
+++ /dev/null
@@ -1,198 +0,0 @@
-solution = array('assistantSid' => $assistantSid, 'taskSid' => $taskSid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Tasks/' . \rawurlencode($taskSid) . '/Samples';
- }
-
- /**
- * Streams SampleInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
- */
- public function stream($options = array(), $limit = null, $pageSize = null)
- {
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($options, $limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
- }
-
- /**
- * Reads SampleInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return SampleInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
- /**
- * Retrieve a single page of SampleInstance records from the API.
- * Request is executed immediately
- *
- * @param array|Options $options Optional Arguments
- * @param mixed $pageSize Number of records to return, defaults to 50
- * @param string $pageToken PageToken provided by the API
- * @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of SampleInstance
- */
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
- {
- $options = new Values($options);
- $params = Values::of(array(
- 'Language' => $options['language'],
- 'PageToken' => $pageToken,
- 'Page' => $pageNumber,
- 'PageSize' => $pageSize,
- ));
-
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
-
- return new SamplePage($this->version, $response, $this->solution);
- }
-
- /**
- * Retrieve a specific page of SampleInstance records from the API.
- * Request is executed immediately
- *
- * @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of SampleInstance
- */
- public function getPage($targetUrl)
- {
- $response = $this->version->getDomain()->getClient()->request(
- 'GET',
- $targetUrl
- );
-
- return new SamplePage($this->version, $response, $this->solution);
- }
-
- /**
- * Create a new SampleInstance
- *
- * @param string $language The ISO language-country string that specifies the
- * language used for the new sample
- * @param string $taggedText The text example of how end users might express
- * the task
- * @param array|Options $options Optional Arguments
- * @return SampleInstance Newly created SampleInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($language, $taggedText, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'Language' => $language,
- 'TaggedText' => $taggedText,
- 'SourceChannel' => $options['sourceChannel'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new SampleInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['taskSid']
- );
- }
-
- /**
- * Constructs a SampleContext
- *
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Autopilot\V1\Assistant\Task\SampleContext
- */
- public function getContext($sid)
- {
- return new SampleContext(
- $this->version,
- $this->solution['assistantSid'],
- $this->solution['taskSid'],
- $sid
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Autopilot.V1.SampleList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/SampleOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/SampleOptions.php
deleted file mode 100644
index 04890ea..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/SampleOptions.php
+++ /dev/null
@@ -1,208 +0,0 @@
-options['language'] = $language;
- }
-
- /**
- * The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used for the sample. For example: `en-US`.
- *
- * @param string $language The ISO language-country string that specifies the
- * language used for the sample
- * @return $this Fluent Builder
- */
- public function setLanguage($language)
- {
- $this->options['language'] = $language;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Autopilot.V1.ReadSampleOptions ' . \implode(' ', $options) . ']';
- }
-}
-
-class CreateSampleOptions extends Options
-{
- /**
- * @param string $sourceChannel The communication channel from which the new
- * sample was captured
- */
- public function __construct($sourceChannel = Values::NONE)
- {
- $this->options['sourceChannel'] = $sourceChannel;
- }
-
- /**
- * The communication channel from which the new sample was captured. Can be: `voice`, `sms`, `chat`, `alexa`, `google-assistant`, `slack`, or null if not included.
- *
- * @param string $sourceChannel The communication channel from which the new
- * sample was captured
- * @return $this Fluent Builder
- */
- public function setSourceChannel($sourceChannel)
- {
- $this->options['sourceChannel'] = $sourceChannel;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Autopilot.V1.CreateSampleOptions ' . \implode(' ', $options) . ']';
- }
-}
-
-class UpdateSampleOptions extends Options
-{
- /**
- * @param string $language The ISO language-country string that specifies the
- * language used for the sample
- * @param string $taggedText The text example of how end users might express
- * the task
- * @param string $sourceChannel The communication channel from which the sample
- * was captured
- */
- public function __construct($language = Values::NONE, $taggedText = Values::NONE, $sourceChannel = Values::NONE)
- {
- $this->options['language'] = $language;
- $this->options['taggedText'] = $taggedText;
- $this->options['sourceChannel'] = $sourceChannel;
- }
-
- /**
- * The [ISO language-country](https://docs.oracle.com/cd/E13214_01/wli/docs92/xref/xqisocodes.html) string that specifies the language used for the sample. For example: `en-US`.
- *
- * @param string $language The ISO language-country string that specifies the
- * language used for the sample
- * @return $this Fluent Builder
- */
- public function setLanguage($language)
- {
- $this->options['language'] = $language;
- return $this;
- }
-
- /**
- * The text example of how end users might express the task. The sample can contain [Field tag blocks](https://www.twilio.com/docs/autopilot/api/task-sample#field-tagging).
- *
- * @param string $taggedText The text example of how end users might express
- * the task
- * @return $this Fluent Builder
- */
- public function setTaggedText($taggedText)
- {
- $this->options['taggedText'] = $taggedText;
- return $this;
- }
-
- /**
- * The communication channel from which the sample was captured. Can be: `voice`, `sms`, `chat`, `alexa`, `google-assistant`, `slack`, or null if not included.
- *
- * @param string $sourceChannel The communication channel from which the sample
- * was captured
- * @return $this Fluent Builder
- */
- public function setSourceChannel($sourceChannel)
- {
- $this->options['sourceChannel'] = $sourceChannel;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Autopilot.V1.UpdateSampleOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/SamplePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/SamplePage.php
deleted file mode 100644
index 20cdfe3..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/SamplePage.php
+++ /dev/null
@@ -1,46 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new SampleInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['taskSid']
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Autopilot.V1.SamplePage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskActionsContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskActionsContext.php
deleted file mode 100644
index 247a02b..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskActionsContext.php
+++ /dev/null
@@ -1,110 +0,0 @@
-solution = array('assistantSid' => $assistantSid, 'taskSid' => $taskSid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Tasks/' . \rawurlencode($taskSid) . '/Actions';
- }
-
- /**
- * Fetch a TaskActionsInstance
- *
- * @return TaskActionsInstance Fetched TaskActionsInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new TaskActionsInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['taskSid']
- );
- }
-
- /**
- * Update the TaskActionsInstance
- *
- * @param array|Options $options Optional Arguments
- * @return TaskActionsInstance Updated TaskActionsInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array('Actions' => Serialize::jsonObject($options['actions']),));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new TaskActionsInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['taskSid']
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Autopilot.V1.TaskActionsContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskActionsInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskActionsInstance.php
deleted file mode 100644
index 7bfbc2b..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskActionsInstance.php
+++ /dev/null
@@ -1,133 +0,0 @@
-properties = array(
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'assistantSid' => Values::array_get($payload, 'assistant_sid'),
- 'taskSid' => Values::array_get($payload, 'task_sid'),
- 'url' => Values::array_get($payload, 'url'),
- 'data' => Values::array_get($payload, 'data'),
- );
-
- $this->solution = array('assistantSid' => $assistantSid, 'taskSid' => $taskSid,);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\Task\TaskActionsContext Context
- * for this
- * TaskActionsInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new TaskActionsContext(
- $this->version,
- $this->solution['assistantSid'],
- $this->solution['taskSid']
- );
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a TaskActionsInstance
- *
- * @return TaskActionsInstance Fetched TaskActionsInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Update the TaskActionsInstance
- *
- * @param array|Options $options Optional Arguments
- * @return TaskActionsInstance Updated TaskActionsInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- return $this->proxy()->update($options);
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Autopilot.V1.TaskActionsInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskActionsList.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskActionsList.php
deleted file mode 100644
index b66baf5..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskActionsList.php
+++ /dev/null
@@ -1,60 +0,0 @@
-solution = array('assistantSid' => $assistantSid, 'taskSid' => $taskSid,);
- }
-
- /**
- * Constructs a TaskActionsContext
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\Task\TaskActionsContext
- */
- public function getContext()
- {
- return new TaskActionsContext(
- $this->version,
- $this->solution['assistantSid'],
- $this->solution['taskSid']
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Autopilot.V1.TaskActionsList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskActionsOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskActionsOptions.php
deleted file mode 100644
index 751baf5..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskActionsOptions.php
+++ /dev/null
@@ -1,70 +0,0 @@
-options['actions'] = $actions;
- }
-
- /**
- * The JSON string that specifies the [actions](https://www.twilio.com/docs/autopilot/actions) that instruct the Assistant on how to perform the task.
- *
- * @param array $actions The JSON string that specifies the actions that
- * instruct the Assistant on how to perform the task
- * @return $this Fluent Builder
- */
- public function setActions($actions)
- {
- $this->options['actions'] = $actions;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Autopilot.V1.UpdateTaskActionsOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskActionsPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskActionsPage.php
deleted file mode 100644
index 3df98c5..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskActionsPage.php
+++ /dev/null
@@ -1,46 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new TaskActionsInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['taskSid']
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Autopilot.V1.TaskActionsPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskStatisticsContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskStatisticsContext.php
deleted file mode 100644
index bf2b647..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskStatisticsContext.php
+++ /dev/null
@@ -1,79 +0,0 @@
-solution = array('assistantSid' => $assistantSid, 'taskSid' => $taskSid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Tasks/' . \rawurlencode($taskSid) . '/Statistics';
- }
-
- /**
- * Fetch a TaskStatisticsInstance
- *
- * @return TaskStatisticsInstance Fetched TaskStatisticsInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new TaskStatisticsInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['taskSid']
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Autopilot.V1.TaskStatisticsContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskStatisticsInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskStatisticsInstance.php
deleted file mode 100644
index 2b2a86f..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskStatisticsInstance.php
+++ /dev/null
@@ -1,121 +0,0 @@
-properties = array(
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'assistantSid' => Values::array_get($payload, 'assistant_sid'),
- 'taskSid' => Values::array_get($payload, 'task_sid'),
- 'samplesCount' => Values::array_get($payload, 'samples_count'),
- 'fieldsCount' => Values::array_get($payload, 'fields_count'),
- 'url' => Values::array_get($payload, 'url'),
- );
-
- $this->solution = array('assistantSid' => $assistantSid, 'taskSid' => $taskSid,);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\Task\TaskStatisticsContext Context for this TaskStatisticsInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new TaskStatisticsContext(
- $this->version,
- $this->solution['assistantSid'],
- $this->solution['taskSid']
- );
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a TaskStatisticsInstance
- *
- * @return TaskStatisticsInstance Fetched TaskStatisticsInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Autopilot.V1.TaskStatisticsInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskStatisticsList.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskStatisticsList.php
deleted file mode 100644
index 0fdb503..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskStatisticsList.php
+++ /dev/null
@@ -1,61 +0,0 @@
-solution = array('assistantSid' => $assistantSid, 'taskSid' => $taskSid,);
- }
-
- /**
- * Constructs a TaskStatisticsContext
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\Task\TaskStatisticsContext
- */
- public function getContext()
- {
- return new TaskStatisticsContext(
- $this->version,
- $this->solution['assistantSid'],
- $this->solution['taskSid']
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Autopilot.V1.TaskStatisticsList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskStatisticsPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskStatisticsPage.php
deleted file mode 100644
index c9dd812..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/Task/TaskStatisticsPage.php
+++ /dev/null
@@ -1,46 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new TaskStatisticsInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['taskSid']
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Autopilot.V1.TaskStatisticsPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/TaskContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/TaskContext.php
deleted file mode 100644
index 70e3867..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/TaskContext.php
+++ /dev/null
@@ -1,249 +0,0 @@
-solution = array('assistantSid' => $assistantSid, 'sid' => $sid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Tasks/' . \rawurlencode($sid) . '';
- }
-
- /**
- * Fetch a TaskInstance
- *
- * @return TaskInstance Fetched TaskInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new TaskInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Update the TaskInstance
- *
- * @param array|Options $options Optional Arguments
- * @return TaskInstance Updated TaskInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'UniqueName' => $options['uniqueName'],
- 'Actions' => Serialize::jsonObject($options['actions']),
- 'ActionsUrl' => $options['actionsUrl'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new TaskInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Deletes the TaskInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
-
- /**
- * Access the fields
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\Task\FieldList
- */
- protected function getFields()
- {
- if (!$this->_fields) {
- $this->_fields = new FieldList(
- $this->version,
- $this->solution['assistantSid'],
- $this->solution['sid']
- );
- }
-
- return $this->_fields;
- }
-
- /**
- * Access the samples
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\Task\SampleList
- */
- protected function getSamples()
- {
- if (!$this->_samples) {
- $this->_samples = new SampleList(
- $this->version,
- $this->solution['assistantSid'],
- $this->solution['sid']
- );
- }
-
- return $this->_samples;
- }
-
- /**
- * Access the taskActions
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\Task\TaskActionsList
- */
- protected function getTaskActions()
- {
- if (!$this->_taskActions) {
- $this->_taskActions = new TaskActionsList(
- $this->version,
- $this->solution['assistantSid'],
- $this->solution['sid']
- );
- }
-
- return $this->_taskActions;
- }
-
- /**
- * Access the statistics
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\Task\TaskStatisticsList
- */
- protected function getStatistics()
- {
- if (!$this->_statistics) {
- $this->_statistics = new TaskStatisticsList(
- $this->version,
- $this->solution['assistantSid'],
- $this->solution['sid']
- );
- }
-
- return $this->_statistics;
- }
-
- /**
- * Magic getter to lazy load subresources
- *
- * @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
- * @throws TwilioException For unknown subresources
- */
- public function __get($name)
- {
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown subresource ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $property = $this->$name;
- if (\method_exists($property, 'getContext')) {
- return \call_user_func_array(array($property, 'getContext'), $arguments);
- }
-
- throw new TwilioException('Resource does not have a context');
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Autopilot.V1.TaskContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/TaskInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/TaskInstance.php
deleted file mode 100644
index 37ed6fc..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/TaskInstance.php
+++ /dev/null
@@ -1,199 +0,0 @@
-properties = array(
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- 'friendlyName' => Values::array_get($payload, 'friendly_name'),
- 'links' => Values::array_get($payload, 'links'),
- 'assistantSid' => Values::array_get($payload, 'assistant_sid'),
- 'sid' => Values::array_get($payload, 'sid'),
- 'uniqueName' => Values::array_get($payload, 'unique_name'),
- 'actionsUrl' => Values::array_get($payload, 'actions_url'),
- 'url' => Values::array_get($payload, 'url'),
- );
-
- $this->solution = array('assistantSid' => $assistantSid, 'sid' => $sid ?: $this->properties['sid'],);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\TaskContext Context for this
- * TaskInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new TaskContext(
- $this->version,
- $this->solution['assistantSid'],
- $this->solution['sid']
- );
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a TaskInstance
- *
- * @return TaskInstance Fetched TaskInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Update the TaskInstance
- *
- * @param array|Options $options Optional Arguments
- * @return TaskInstance Updated TaskInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- return $this->proxy()->update($options);
- }
-
- /**
- * Deletes the TaskInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->proxy()->delete();
- }
-
- /**
- * Access the fields
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\Task\FieldList
- */
- protected function getFields()
- {
- return $this->proxy()->fields;
- }
-
- /**
- * Access the samples
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\Task\SampleList
- */
- protected function getSamples()
- {
- return $this->proxy()->samples;
- }
-
- /**
- * Access the taskActions
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\Task\TaskActionsList
- */
- protected function getTaskActions()
- {
- return $this->proxy()->taskActions;
- }
-
- /**
- * Access the statistics
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\Task\TaskStatisticsList
- */
- protected function getStatistics()
- {
- return $this->proxy()->statistics;
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Autopilot.V1.TaskInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/TaskList.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/TaskList.php
deleted file mode 100644
index 71a46bc..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/TaskList.php
+++ /dev/null
@@ -1,182 +0,0 @@
-solution = array('assistantSid' => $assistantSid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Tasks';
- }
-
- /**
- * Streams TaskInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
- *
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
- */
- public function stream($limit = null, $pageSize = null)
- {
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
- }
-
- /**
- * Reads TaskInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return TaskInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
- /**
- * Retrieve a single page of TaskInstance records from the API.
- * Request is executed immediately
- *
- * @param mixed $pageSize Number of records to return, defaults to 50
- * @param string $pageToken PageToken provided by the API
- * @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of TaskInstance
- */
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
- {
- $params = Values::of(array(
- 'PageToken' => $pageToken,
- 'Page' => $pageNumber,
- 'PageSize' => $pageSize,
- ));
-
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
-
- return new TaskPage($this->version, $response, $this->solution);
- }
-
- /**
- * Retrieve a specific page of TaskInstance records from the API.
- * Request is executed immediately
- *
- * @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of TaskInstance
- */
- public function getPage($targetUrl)
- {
- $response = $this->version->getDomain()->getClient()->request(
- 'GET',
- $targetUrl
- );
-
- return new TaskPage($this->version, $response, $this->solution);
- }
-
- /**
- * Create a new TaskInstance
- *
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the resource
- * @param array|Options $options Optional Arguments
- * @return TaskInstance Newly created TaskInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($uniqueName, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'UniqueName' => $uniqueName,
- 'FriendlyName' => $options['friendlyName'],
- 'Actions' => Serialize::jsonObject($options['actions']),
- 'ActionsUrl' => $options['actionsUrl'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new TaskInstance($this->version, $payload, $this->solution['assistantSid']);
- }
-
- /**
- * Constructs a TaskContext
- *
- * @param string $sid The unique string that identifies the resource to fetch
- * @return \Twilio\Rest\Autopilot\V1\Assistant\TaskContext
- */
- public function getContext($sid)
- {
- return new TaskContext($this->version, $this->solution['assistantSid'], $sid);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Autopilot.V1.TaskList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/TaskOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/TaskOptions.php
deleted file mode 100644
index 861e5b9..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/TaskOptions.php
+++ /dev/null
@@ -1,202 +0,0 @@
-options['friendlyName'] = $friendlyName;
- $this->options['actions'] = $actions;
- $this->options['actionsUrl'] = $actionsUrl;
- }
-
- /**
- * A descriptive string that you create to describe the new resource. It is not unique and can be up to 255 characters long.
- *
- * @param string $friendlyName descriptive string that you create to describe
- * the new resource
- * @return $this Fluent Builder
- */
- public function setFriendlyName($friendlyName)
- {
- $this->options['friendlyName'] = $friendlyName;
- return $this;
- }
-
- /**
- * The JSON string that specifies the [actions](https://www.twilio.com/docs/autopilot/actions) that instruct the Assistant on how to perform the task. It is optional and not unique.
- *
- * @param array $actions The JSON string that specifies the actions that
- * instruct the Assistant on how to perform the task
- * @return $this Fluent Builder
- */
- public function setActions($actions)
- {
- $this->options['actions'] = $actions;
- return $this;
- }
-
- /**
- * The URL from which the Assistant can fetch actions.
- *
- * @param string $actionsUrl The URL from which the Assistant can fetch actions
- * @return $this Fluent Builder
- */
- public function setActionsUrl($actionsUrl)
- {
- $this->options['actionsUrl'] = $actionsUrl;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Autopilot.V1.CreateTaskOptions ' . \implode(' ', $options) . ']';
- }
-}
-
-class UpdateTaskOptions extends Options
-{
- /**
- * @param string $friendlyName A string to describe the resource
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the resource
- * @param array $actions The JSON string that specifies the actions that
- * instruct the Assistant on how to perform the task
- * @param string $actionsUrl The URL from which the Assistant can fetch actions
- */
- public function __construct($friendlyName = Values::NONE, $uniqueName = Values::NONE, $actions = Values::NONE, $actionsUrl = Values::NONE)
- {
- $this->options['friendlyName'] = $friendlyName;
- $this->options['uniqueName'] = $uniqueName;
- $this->options['actions'] = $actions;
- $this->options['actionsUrl'] = $actionsUrl;
- }
-
- /**
- * A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long.
- *
- * @param string $friendlyName A string to describe the resource
- * @return $this Fluent Builder
- */
- public function setFriendlyName($friendlyName)
- {
- $this->options['friendlyName'] = $friendlyName;
- return $this;
- }
-
- /**
- * An application-defined string that uniquely identifies the resource. This value must be 64 characters or less in length and be unique. It can be used as an alternative to the `sid` in the URL path to address the resource.
- *
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the resource
- * @return $this Fluent Builder
- */
- public function setUniqueName($uniqueName)
- {
- $this->options['uniqueName'] = $uniqueName;
- return $this;
- }
-
- /**
- * The JSON string that specifies the [actions](https://www.twilio.com/docs/autopilot/actions) that instruct the Assistant on how to perform the task.
- *
- * @param array $actions The JSON string that specifies the actions that
- * instruct the Assistant on how to perform the task
- * @return $this Fluent Builder
- */
- public function setActions($actions)
- {
- $this->options['actions'] = $actions;
- return $this;
- }
-
- /**
- * The URL from which the Assistant can fetch actions.
- *
- * @param string $actionsUrl The URL from which the Assistant can fetch actions
- * @return $this Fluent Builder
- */
- public function setActionsUrl($actionsUrl)
- {
- $this->options['actionsUrl'] = $actionsUrl;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Autopilot.V1.UpdateTaskOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/TaskPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/TaskPage.php
deleted file mode 100644
index 145d977..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/TaskPage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new TaskInstance($this->version, $payload, $this->solution['assistantSid']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Autopilot.V1.TaskPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/WebhookContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/WebhookContext.php
deleted file mode 100644
index 1f41902..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/WebhookContext.php
+++ /dev/null
@@ -1,123 +0,0 @@
-solution = array('assistantSid' => $assistantSid, 'sid' => $sid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Webhooks/' . \rawurlencode($sid) . '';
- }
-
- /**
- * Fetch a WebhookInstance
- *
- * @return WebhookInstance Fetched WebhookInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new WebhookInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Update the WebhookInstance
- *
- * @param array|Options $options Optional Arguments
- * @return WebhookInstance Updated WebhookInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'UniqueName' => $options['uniqueName'],
- 'Events' => $options['events'],
- 'WebhookUrl' => $options['webhookUrl'],
- 'WebhookMethod' => $options['webhookMethod'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new WebhookInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Deletes the WebhookInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Autopilot.V1.WebhookContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/WebhookInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/WebhookInstance.php
deleted file mode 100644
index aa555f4..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/WebhookInstance.php
+++ /dev/null
@@ -1,154 +0,0 @@
-properties = array(
- 'url' => Values::array_get($payload, 'url'),
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- 'assistantSid' => Values::array_get($payload, 'assistant_sid'),
- 'sid' => Values::array_get($payload, 'sid'),
- 'uniqueName' => Values::array_get($payload, 'unique_name'),
- 'events' => Values::array_get($payload, 'events'),
- 'webhookUrl' => Values::array_get($payload, 'webhook_url'),
- 'webhookMethod' => Values::array_get($payload, 'webhook_method'),
- );
-
- $this->solution = array('assistantSid' => $assistantSid, 'sid' => $sid ?: $this->properties['sid'],);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\WebhookContext Context for this
- * WebhookInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new WebhookContext(
- $this->version,
- $this->solution['assistantSid'],
- $this->solution['sid']
- );
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a WebhookInstance
- *
- * @return WebhookInstance Fetched WebhookInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Update the WebhookInstance
- *
- * @param array|Options $options Optional Arguments
- * @return WebhookInstance Updated WebhookInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- return $this->proxy()->update($options);
- }
-
- /**
- * Deletes the WebhookInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->proxy()->delete();
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Autopilot.V1.WebhookInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/WebhookList.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/WebhookList.php
deleted file mode 100644
index ae2d8c0..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/WebhookList.php
+++ /dev/null
@@ -1,184 +0,0 @@
-solution = array('assistantSid' => $assistantSid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Webhooks';
- }
-
- /**
- * Streams WebhookInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
- *
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
- */
- public function stream($limit = null, $pageSize = null)
- {
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
- }
-
- /**
- * Reads WebhookInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return WebhookInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
- /**
- * Retrieve a single page of WebhookInstance records from the API.
- * Request is executed immediately
- *
- * @param mixed $pageSize Number of records to return, defaults to 50
- * @param string $pageToken PageToken provided by the API
- * @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of WebhookInstance
- */
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
- {
- $params = Values::of(array(
- 'PageToken' => $pageToken,
- 'Page' => $pageNumber,
- 'PageSize' => $pageSize,
- ));
-
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
-
- return new WebhookPage($this->version, $response, $this->solution);
- }
-
- /**
- * Retrieve a specific page of WebhookInstance records from the API.
- * Request is executed immediately
- *
- * @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of WebhookInstance
- */
- public function getPage($targetUrl)
- {
- $response = $this->version->getDomain()->getClient()->request(
- 'GET',
- $targetUrl
- );
-
- return new WebhookPage($this->version, $response, $this->solution);
- }
-
- /**
- * Create a new WebhookInstance
- *
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the resource
- * @param string $events The list of space-separated events that this Webhook
- * will subscribe to.
- * @param string $webhookUrl The URL associated with this Webhook.
- * @param array|Options $options Optional Arguments
- * @return WebhookInstance Newly created WebhookInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($uniqueName, $events, $webhookUrl, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'UniqueName' => $uniqueName,
- 'Events' => $events,
- 'WebhookUrl' => $webhookUrl,
- 'WebhookMethod' => $options['webhookMethod'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new WebhookInstance($this->version, $payload, $this->solution['assistantSid']);
- }
-
- /**
- * Constructs a WebhookContext
- *
- * @param string $sid The unique string that identifies the resource to fetch
- * @return \Twilio\Rest\Autopilot\V1\Assistant\WebhookContext
- */
- public function getContext($sid)
- {
- return new WebhookContext($this->version, $this->solution['assistantSid'], $sid);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Autopilot.V1.WebhookList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/WebhookOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/WebhookOptions.php
deleted file mode 100644
index 3bbf2cc..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/WebhookOptions.php
+++ /dev/null
@@ -1,172 +0,0 @@
-options['webhookMethod'] = $webhookMethod;
- }
-
- /**
- * The method to be used when calling the webhook's URL.
- *
- * @param string $webhookMethod The method to be used when calling the
- * webhook's URL.
- * @return $this Fluent Builder
- */
- public function setWebhookMethod($webhookMethod)
- {
- $this->options['webhookMethod'] = $webhookMethod;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Autopilot.V1.CreateWebhookOptions ' . \implode(' ', $options) . ']';
- }
-}
-
-class UpdateWebhookOptions extends Options
-{
- /**
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the resource
- * @param string $events The list of space-separated events that this Webhook
- * will subscribe to.
- * @param string $webhookUrl The URL associated with this Webhook.
- * @param string $webhookMethod The method to be used when calling the
- * webhook's URL.
- */
- public function __construct($uniqueName = Values::NONE, $events = Values::NONE, $webhookUrl = Values::NONE, $webhookMethod = Values::NONE)
- {
- $this->options['uniqueName'] = $uniqueName;
- $this->options['events'] = $events;
- $this->options['webhookUrl'] = $webhookUrl;
- $this->options['webhookMethod'] = $webhookMethod;
- }
-
- /**
- * An application-defined string that uniquely identifies the new resource. It can be used as an alternative to the `sid` in the URL path to address the resource. This value must be unique and 64 characters or less in length.
- *
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the resource
- * @return $this Fluent Builder
- */
- public function setUniqueName($uniqueName)
- {
- $this->options['uniqueName'] = $uniqueName;
- return $this;
- }
-
- /**
- * The list of space-separated events that this Webhook will subscribe to.
- *
- * @param string $events The list of space-separated events that this Webhook
- * will subscribe to.
- * @return $this Fluent Builder
- */
- public function setEvents($events)
- {
- $this->options['events'] = $events;
- return $this;
- }
-
- /**
- * The URL associated with this Webhook.
- *
- * @param string $webhookUrl The URL associated with this Webhook.
- * @return $this Fluent Builder
- */
- public function setWebhookUrl($webhookUrl)
- {
- $this->options['webhookUrl'] = $webhookUrl;
- return $this;
- }
-
- /**
- * The method to be used when calling the webhook's URL.
- *
- * @param string $webhookMethod The method to be used when calling the
- * webhook's URL.
- * @return $this Fluent Builder
- */
- public function setWebhookMethod($webhookMethod)
- {
- $this->options['webhookMethod'] = $webhookMethod;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Autopilot.V1.UpdateWebhookOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/WebhookPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/WebhookPage.php
deleted file mode 100644
index cffc596..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/Assistant/WebhookPage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new WebhookInstance($this->version, $payload, $this->solution['assistantSid']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Autopilot.V1.WebhookPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/AssistantContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/AssistantContext.php
deleted file mode 100644
index 78cf848..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/AssistantContext.php
+++ /dev/null
@@ -1,315 +0,0 @@
-solution = array('sid' => $sid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($sid) . '';
- }
-
- /**
- * Fetch a AssistantInstance
- *
- * @return AssistantInstance Fetched AssistantInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new AssistantInstance($this->version, $payload, $this->solution['sid']);
- }
-
- /**
- * Update the AssistantInstance
- *
- * @param array|Options $options Optional Arguments
- * @return AssistantInstance Updated AssistantInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'LogQueries' => Serialize::booleanToString($options['logQueries']),
- 'UniqueName' => $options['uniqueName'],
- 'CallbackUrl' => $options['callbackUrl'],
- 'CallbackEvents' => $options['callbackEvents'],
- 'StyleSheet' => Serialize::jsonObject($options['styleSheet']),
- 'Defaults' => Serialize::jsonObject($options['defaults']),
- 'DevelopmentStage' => $options['developmentStage'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new AssistantInstance($this->version, $payload, $this->solution['sid']);
- }
-
- /**
- * Deletes the AssistantInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
-
- /**
- * Access the fieldTypes
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\FieldTypeList
- */
- protected function getFieldTypes()
- {
- if (!$this->_fieldTypes) {
- $this->_fieldTypes = new FieldTypeList($this->version, $this->solution['sid']);
- }
-
- return $this->_fieldTypes;
- }
-
- /**
- * Access the tasks
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\TaskList
- */
- protected function getTasks()
- {
- if (!$this->_tasks) {
- $this->_tasks = new TaskList($this->version, $this->solution['sid']);
- }
-
- return $this->_tasks;
- }
-
- /**
- * Access the modelBuilds
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\ModelBuildList
- */
- protected function getModelBuilds()
- {
- if (!$this->_modelBuilds) {
- $this->_modelBuilds = new ModelBuildList($this->version, $this->solution['sid']);
- }
-
- return $this->_modelBuilds;
- }
-
- /**
- * Access the queries
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\QueryList
- */
- protected function getQueries()
- {
- if (!$this->_queries) {
- $this->_queries = new QueryList($this->version, $this->solution['sid']);
- }
-
- return $this->_queries;
- }
-
- /**
- * Access the styleSheet
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\StyleSheetList
- */
- protected function getStyleSheet()
- {
- if (!$this->_styleSheet) {
- $this->_styleSheet = new StyleSheetList($this->version, $this->solution['sid']);
- }
-
- return $this->_styleSheet;
- }
-
- /**
- * Access the defaults
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\DefaultsList
- */
- protected function getDefaults()
- {
- if (!$this->_defaults) {
- $this->_defaults = new DefaultsList($this->version, $this->solution['sid']);
- }
-
- return $this->_defaults;
- }
-
- /**
- * Access the dialogues
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\DialogueList
- */
- protected function getDialogues()
- {
- if (!$this->_dialogues) {
- $this->_dialogues = new DialogueList($this->version, $this->solution['sid']);
- }
-
- return $this->_dialogues;
- }
-
- /**
- * Access the webhooks
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\WebhookList
- */
- protected function getWebhooks()
- {
- if (!$this->_webhooks) {
- $this->_webhooks = new WebhookList($this->version, $this->solution['sid']);
- }
-
- return $this->_webhooks;
- }
-
- /**
- * Access the exportAssistant
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\ExportAssistantList
- */
- protected function getExportAssistant()
- {
- if (!$this->_exportAssistant) {
- $this->_exportAssistant = new ExportAssistantList($this->version, $this->solution['sid']);
- }
-
- return $this->_exportAssistant;
- }
-
- /**
- * Magic getter to lazy load subresources
- *
- * @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
- * @throws TwilioException For unknown subresources
- */
- public function __get($name)
- {
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown subresource ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $property = $this->$name;
- if (\method_exists($property, 'getContext')) {
- return \call_user_func_array(array($property, 'getContext'), $arguments);
- }
-
- throw new TwilioException('Resource does not have a context');
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Autopilot.V1.AssistantContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/AssistantInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/AssistantInstance.php
deleted file mode 100644
index cef1f10..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/AssistantInstance.php
+++ /dev/null
@@ -1,256 +0,0 @@
-properties = array(
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- 'friendlyName' => Values::array_get($payload, 'friendly_name'),
- 'latestModelBuildSid' => Values::array_get($payload, 'latest_model_build_sid'),
- 'links' => Values::array_get($payload, 'links'),
- 'logQueries' => Values::array_get($payload, 'log_queries'),
- 'developmentStage' => Values::array_get($payload, 'development_stage'),
- 'needsModelBuild' => Values::array_get($payload, 'needs_model_build'),
- 'sid' => Values::array_get($payload, 'sid'),
- 'uniqueName' => Values::array_get($payload, 'unique_name'),
- 'url' => Values::array_get($payload, 'url'),
- 'callbackUrl' => Values::array_get($payload, 'callback_url'),
- 'callbackEvents' => Values::array_get($payload, 'callback_events'),
- );
-
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Autopilot\V1\AssistantContext Context for this
- * AssistantInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new AssistantContext($this->version, $this->solution['sid']);
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a AssistantInstance
- *
- * @return AssistantInstance Fetched AssistantInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Update the AssistantInstance
- *
- * @param array|Options $options Optional Arguments
- * @return AssistantInstance Updated AssistantInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- return $this->proxy()->update($options);
- }
-
- /**
- * Deletes the AssistantInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->proxy()->delete();
- }
-
- /**
- * Access the fieldTypes
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\FieldTypeList
- */
- protected function getFieldTypes()
- {
- return $this->proxy()->fieldTypes;
- }
-
- /**
- * Access the tasks
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\TaskList
- */
- protected function getTasks()
- {
- return $this->proxy()->tasks;
- }
-
- /**
- * Access the modelBuilds
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\ModelBuildList
- */
- protected function getModelBuilds()
- {
- return $this->proxy()->modelBuilds;
- }
-
- /**
- * Access the queries
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\QueryList
- */
- protected function getQueries()
- {
- return $this->proxy()->queries;
- }
-
- /**
- * Access the styleSheet
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\StyleSheetList
- */
- protected function getStyleSheet()
- {
- return $this->proxy()->styleSheet;
- }
-
- /**
- * Access the defaults
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\DefaultsList
- */
- protected function getDefaults()
- {
- return $this->proxy()->defaults;
- }
-
- /**
- * Access the dialogues
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\DialogueList
- */
- protected function getDialogues()
- {
- return $this->proxy()->dialogues;
- }
-
- /**
- * Access the webhooks
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\WebhookList
- */
- protected function getWebhooks()
- {
- return $this->proxy()->webhooks;
- }
-
- /**
- * Access the exportAssistant
- *
- * @return \Twilio\Rest\Autopilot\V1\Assistant\ExportAssistantList
- */
- protected function getExportAssistant()
- {
- return $this->proxy()->exportAssistant;
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Autopilot.V1.AssistantInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/AssistantList.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/AssistantList.php
deleted file mode 100644
index 3afce0e..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/AssistantList.php
+++ /dev/null
@@ -1,181 +0,0 @@
-solution = array();
-
- $this->uri = '/Assistants';
- }
-
- /**
- * Streams AssistantInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
- *
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
- */
- public function stream($limit = null, $pageSize = null)
- {
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
- }
-
- /**
- * Reads AssistantInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return AssistantInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
- /**
- * Retrieve a single page of AssistantInstance records from the API.
- * Request is executed immediately
- *
- * @param mixed $pageSize Number of records to return, defaults to 50
- * @param string $pageToken PageToken provided by the API
- * @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of AssistantInstance
- */
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
- {
- $params = Values::of(array(
- 'PageToken' => $pageToken,
- 'Page' => $pageNumber,
- 'PageSize' => $pageSize,
- ));
-
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
-
- return new AssistantPage($this->version, $response, $this->solution);
- }
-
- /**
- * Retrieve a specific page of AssistantInstance records from the API.
- * Request is executed immediately
- *
- * @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of AssistantInstance
- */
- public function getPage($targetUrl)
- {
- $response = $this->version->getDomain()->getClient()->request(
- 'GET',
- $targetUrl
- );
-
- return new AssistantPage($this->version, $response, $this->solution);
- }
-
- /**
- * Create a new AssistantInstance
- *
- * @param array|Options $options Optional Arguments
- * @return AssistantInstance Newly created AssistantInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'LogQueries' => Serialize::booleanToString($options['logQueries']),
- 'UniqueName' => $options['uniqueName'],
- 'CallbackUrl' => $options['callbackUrl'],
- 'CallbackEvents' => $options['callbackEvents'],
- 'StyleSheet' => Serialize::jsonObject($options['styleSheet']),
- 'Defaults' => Serialize::jsonObject($options['defaults']),
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new AssistantInstance($this->version, $payload);
- }
-
- /**
- * Constructs a AssistantContext
- *
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Autopilot\V1\AssistantContext
- */
- public function getContext($sid)
- {
- return new AssistantContext($this->version, $sid);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Autopilot.V1.AssistantList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/AssistantOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/AssistantOptions.php
deleted file mode 100644
index a24e221..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/AssistantOptions.php
+++ /dev/null
@@ -1,337 +0,0 @@
-options['friendlyName'] = $friendlyName;
- $this->options['logQueries'] = $logQueries;
- $this->options['uniqueName'] = $uniqueName;
- $this->options['callbackUrl'] = $callbackUrl;
- $this->options['callbackEvents'] = $callbackEvents;
- $this->options['styleSheet'] = $styleSheet;
- $this->options['defaults'] = $defaults;
- }
-
- /**
- * A descriptive string that you create to describe the new resource. It is not unique and can be up to 255 characters long.
- *
- * @param string $friendlyName A string to describe the new resource
- * @return $this Fluent Builder
- */
- public function setFriendlyName($friendlyName)
- {
- $this->options['friendlyName'] = $friendlyName;
- return $this;
- }
-
- /**
- * Whether queries should be logged and kept after training. Can be: `true` or `false` and defaults to `true`. If `true`, queries are stored for 30 days, and then deleted. If `false`, no queries are stored.
- *
- * @param bool $logQueries Whether queries should be logged and kept after
- * training
- * @return $this Fluent Builder
- */
- public function setLogQueries($logQueries)
- {
- $this->options['logQueries'] = $logQueries;
- return $this;
- }
-
- /**
- * An application-defined string that uniquely identifies the new resource. It can be used as an alternative to the `sid` in the URL path to address the resource. The first 64 characters must be unique.
- *
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the new resource
- * @return $this Fluent Builder
- */
- public function setUniqueName($uniqueName)
- {
- $this->options['uniqueName'] = $uniqueName;
- return $this;
- }
-
- /**
- * Reserved.
- *
- * @param string $callbackUrl Reserved
- * @return $this Fluent Builder
- */
- public function setCallbackUrl($callbackUrl)
- {
- $this->options['callbackUrl'] = $callbackUrl;
- return $this;
- }
-
- /**
- * Reserved.
- *
- * @param string $callbackEvents Reserved
- * @return $this Fluent Builder
- */
- public function setCallbackEvents($callbackEvents)
- {
- $this->options['callbackEvents'] = $callbackEvents;
- return $this;
- }
-
- /**
- * The JSON string that defines the Assistant's [style sheet](https://www.twilio.com/docs/autopilot/api/assistant/stylesheet)
- *
- * @param array $styleSheet A JSON string that defines the Assistant's style
- * sheet
- * @return $this Fluent Builder
- */
- public function setStyleSheet($styleSheet)
- {
- $this->options['styleSheet'] = $styleSheet;
- return $this;
- }
-
- /**
- * A JSON object that defines the Assistant's [default tasks](https://www.twilio.com/docs/autopilot/api/assistant/defaults) for various scenarios, including initiation actions and fallback tasks.
- *
- * @param array $defaults A JSON object that defines the Assistant's default
- * tasks for various scenarios
- * @return $this Fluent Builder
- */
- public function setDefaults($defaults)
- {
- $this->options['defaults'] = $defaults;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Autopilot.V1.CreateAssistantOptions ' . \implode(' ', $options) . ']';
- }
-}
-
-class UpdateAssistantOptions extends Options
-{
- /**
- * @param string $friendlyName A string to describe the resource
- * @param bool $logQueries Whether queries should be logged and kept after
- * training
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the resource
- * @param string $callbackUrl Reserved
- * @param string $callbackEvents Reserved
- * @param array $styleSheet A JSON string that defines the Assistant's style
- * sheet
- * @param array $defaults A JSON object that defines the Assistant's [default
- * tasks](https://www.twilio.com/docs/autopilot/api/assistant/defaults) for various scenarios
- * @param string $developmentStage A string describing the state of the
- * assistant.
- */
- public function __construct($friendlyName = Values::NONE, $logQueries = Values::NONE, $uniqueName = Values::NONE, $callbackUrl = Values::NONE, $callbackEvents = Values::NONE, $styleSheet = Values::NONE, $defaults = Values::NONE, $developmentStage = Values::NONE)
- {
- $this->options['friendlyName'] = $friendlyName;
- $this->options['logQueries'] = $logQueries;
- $this->options['uniqueName'] = $uniqueName;
- $this->options['callbackUrl'] = $callbackUrl;
- $this->options['callbackEvents'] = $callbackEvents;
- $this->options['styleSheet'] = $styleSheet;
- $this->options['defaults'] = $defaults;
- $this->options['developmentStage'] = $developmentStage;
- }
-
- /**
- * A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long.
- *
- * @param string $friendlyName A string to describe the resource
- * @return $this Fluent Builder
- */
- public function setFriendlyName($friendlyName)
- {
- $this->options['friendlyName'] = $friendlyName;
- return $this;
- }
-
- /**
- * Whether queries should be logged and kept after training. Can be: `true` or `false` and defaults to `true`. If `true`, queries are stored for 30 days, and then deleted. If `false`, no queries are stored.
- *
- * @param bool $logQueries Whether queries should be logged and kept after
- * training
- * @return $this Fluent Builder
- */
- public function setLogQueries($logQueries)
- {
- $this->options['logQueries'] = $logQueries;
- return $this;
- }
-
- /**
- * An application-defined string that uniquely identifies the resource. It can be used as an alternative to the `sid` in the URL path to address the resource. The first 64 characters must be unique.
- *
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the resource
- * @return $this Fluent Builder
- */
- public function setUniqueName($uniqueName)
- {
- $this->options['uniqueName'] = $uniqueName;
- return $this;
- }
-
- /**
- * Reserved.
- *
- * @param string $callbackUrl Reserved
- * @return $this Fluent Builder
- */
- public function setCallbackUrl($callbackUrl)
- {
- $this->options['callbackUrl'] = $callbackUrl;
- return $this;
- }
-
- /**
- * Reserved.
- *
- * @param string $callbackEvents Reserved
- * @return $this Fluent Builder
- */
- public function setCallbackEvents($callbackEvents)
- {
- $this->options['callbackEvents'] = $callbackEvents;
- return $this;
- }
-
- /**
- * The JSON string that defines the Assistant's [style sheet](https://www.twilio.com/docs/autopilot/api/assistant/stylesheet)
- *
- * @param array $styleSheet A JSON string that defines the Assistant's style
- * sheet
- * @return $this Fluent Builder
- */
- public function setStyleSheet($styleSheet)
- {
- $this->options['styleSheet'] = $styleSheet;
- return $this;
- }
-
- /**
- * A JSON object that defines the Assistant's [default tasks](https://www.twilio.com/docs/autopilot/api/assistant/defaults) for various scenarios, including initiation actions and fallback tasks.
- *
- * @param array $defaults A JSON object that defines the Assistant's [default
- * tasks](https://www.twilio.com/docs/autopilot/api/assistant/defaults) for various scenarios
- * @return $this Fluent Builder
- */
- public function setDefaults($defaults)
- {
- $this->options['defaults'] = $defaults;
- return $this;
- }
-
- /**
- * A string describing the state of the assistant.
- *
- * @param string $developmentStage A string describing the state of the
- * assistant.
- * @return $this Fluent Builder
- */
- public function setDevelopmentStage($developmentStage)
- {
- $this->options['developmentStage'] = $developmentStage;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Autopilot.V1.UpdateAssistantOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/AssistantPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/AssistantPage.php
deleted file mode 100644
index 2904667..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Autopilot/V1/AssistantPage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new AssistantInstance($this->version, $payload);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Autopilot.V1.AssistantPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat.php
index 8cbfffb..fadde8f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat.php
@@ -1,144 +1,60 @@
baseUrl = 'https://chat.twilio.com';
- }
-
- /**
- * @return \Twilio\Rest\Chat\V1 Version v1 of chat
- */
- protected function getV1()
- {
- if (!$this->_v1) {
- $this->_v1 = new V1($this);
- }
- return $this->_v1;
- }
-
- /**
- * @return \Twilio\Rest\Chat\V2 Version v2 of chat
- */
- protected function getV2()
- {
- if (!$this->_v2) {
- $this->_v2 = new V2($this);
- }
- return $this->_v2;
- }
+use Twilio\Rest\Chat\V3;
+class Chat extends ChatBase {
/**
- * Magic getter to lazy load version
- *
- * @param string $name Version to return
- * @return \Twilio\Version The requested version
- * @throws TwilioException For unknown versions
+ * @deprecated Use v2->credentials instead.
*/
- public function __get($name)
- {
- $method = 'get' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return $this->$method();
- }
-
- throw new TwilioException('Unknown version ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $method = 'context' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return \call_user_func_array(array($this, $method), $arguments);
- }
-
- throw new TwilioException('Unknown context ' . $name);
- }
-
- /**
- * @return \Twilio\Rest\Chat\V2\CredentialList
- */
- protected function getCredentials()
- {
+ protected function getCredentials(): \Twilio\Rest\Chat\V2\CredentialList {
+ echo "credentials is deprecated. Use v2->credentials instead.";
return $this->v2->credentials;
}
/**
+ * @deprecated Use v2->credentials(\$sid) instead.
* @param string $sid The SID of the Credential resource to fetch
- * @return \Twilio\Rest\Chat\V2\CredentialContext
*/
- protected function contextCredentials($sid)
- {
+ protected function contextCredentials(string $sid): \Twilio\Rest\Chat\V2\CredentialContext {
+ echo "credentials(\$sid) is deprecated. Use v2->credentials(\$sid) instead.";
return $this->v2->credentials($sid);
}
/**
- * @return \Twilio\Rest\Chat\V2\ServiceList
+ * @deprecated Use v2->services instead.
*/
- protected function getServices()
- {
+ protected function getServices(): \Twilio\Rest\Chat\V2\ServiceList {
+ echo "services is deprecated. Use v2->services instead.";
return $this->v2->services;
}
/**
+ * @deprecated Use v2->services(\$sid) instead.
* @param string $sid The SID of the Service resource to fetch
- * @return \Twilio\Rest\Chat\V2\ServiceContext
*/
- protected function contextServices($sid)
- {
+ protected function contextServices(string $sid): \Twilio\Rest\Chat\V2\ServiceContext {
+ echo "services(\$sid) is deprecated. Use v2->services(\$sid) instead.";
return $this->v2->services($sid);
}
/**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
+ * @deprecated Use v3->channels instead.
+ */
+ protected function getChannels(): \Twilio\Rest\Chat\V3\ChannelList {
+ echo "channels is deprecated. Use v3->channels instead.";
+ return $this->v3->channels;
+ }
+
+ /**
+ * @deprecated Use v3->channels(\$serviceSid, \$sid) instead.
+ * @param string $serviceSid Service Sid.
+ * @param string $sid A string that uniquely identifies this Channel.
*/
- public function __toString()
- {
- return '[Twilio.Chat]';
+ protected function contextChannels(string $serviceSid, string $sid): \Twilio\Rest\Chat\V3\ChannelContext {
+ echo "channels(\$serviceSid, \$sid) is deprecated. Use v3->channels(\$serviceSid, \$sid) instead.";
+ return $this->v3->channels($serviceSid, $sid);
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1.php
index 0559fef..b4d3f71 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1.php
@@ -1,36 +1,42 @@
version = 'v1';
}
- /**
- * @return \Twilio\Rest\Chat\V1\CredentialList
- */
- protected function getCredentials()
+ protected function getCredentials(): CredentialList
{
if (!$this->_credentials) {
$this->_credentials = new CredentialList($this);
@@ -49,10 +52,7 @@ protected function getCredentials()
return $this->_credentials;
}
- /**
- * @return \Twilio\Rest\Chat\V1\ServiceList
- */
- protected function getServices()
+ protected function getServices(): ServiceList
{
if (!$this->_services) {
$this->_services = new ServiceList($this);
@@ -67,7 +67,7 @@ protected function getServices()
* @return \Twilio\ListResource The requested resource
* @throws TwilioException For unknown resource
*/
- public function __get($name)
+ public function __get(string $name)
{
$method = 'get' . \ucfirst($name);
if (\method_exists($this, $method)) {
@@ -82,10 +82,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -100,8 +100,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V1]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/CredentialContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/CredentialContext.php
index 62f683c..ed57606 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/CredentialContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/CredentialContext.php
@@ -2,110 +2,136 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Chat\V1;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
class CredentialContext extends InstanceContext
-{
+ {
/**
* Initialize the CredentialContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Chat\V1\CredentialContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid The Twilio-provided string that uniquely identifies the Credential resource to delete.
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Credentials/' . \rawurlencode($sid) . '';
+ $this->uri = '/Credentials/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a CredentialInstance
+ * Delete the CredentialInstance
*
- * @return CredentialInstance Fetched CredentialInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
- return new CredentialInstance($this->version, $payload, $this->solution['sid']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Update the CredentialInstance
+ * Fetch the CredentialInstance
*
- * @param array|Options $options Optional Arguments
- * @return CredentialInstance Updated CredentialInstance
+ * @return CredentialInstance Fetched CredentialInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): CredentialInstance
{
- $options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'Certificate' => $options['certificate'],
- 'PrivateKey' => $options['privateKey'],
- 'Sandbox' => Serialize::booleanToString($options['sandbox']),
- 'ApiKey' => $options['apiKey'],
- 'Secret' => $options['secret'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
- return new CredentialInstance($this->version, $payload, $this->solution['sid']);
+ return new CredentialInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
- * Deletes the CredentialInstance
+ * Update the CredentialInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return CredentialInstance Updated CredentialInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): CredentialInstance
{
- return $this->version->delete('delete', $this->uri);
+
+ $options = new Values($options);
+
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'Certificate' =>
+ $options['certificate'],
+ 'PrivateKey' =>
+ $options['privateKey'],
+ 'Sandbox' =>
+ Serialize::booleanToString($options['sandbox']),
+ 'ApiKey' =>
+ $options['apiKey'],
+ 'Secret' =>
+ $options['secret'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
+
+ return new CredentialInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Chat.V1.CredentialContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/CredentialInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/CredentialInstance.php
index e326504..476973c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/CredentialInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/CredentialInstance.php
@@ -2,46 +2,54 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Chat\V1;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $friendlyName
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $friendlyName
* @property string $type
- * @property string $sandbox
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
+ * @property string|null $sandbox
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
*/
class CredentialInstance extends InstanceResource
{
/**
* Initialize the CredentialInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Chat\V1\CredentialInstance
+ * @param string $sid The Twilio-provided string that uniquely identifies the Credential resource to delete.
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
@@ -50,59 +58,64 @@ public function __construct(Version $version, array $payload, $sid = null)
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Chat\V1\CredentialContext Context for this
- * CredentialInstance
+ * @return CredentialContext Context for this CredentialInstance
*/
- protected function proxy()
+ protected function proxy(): CredentialContext
{
if (!$this->context) {
- $this->context = new CredentialContext($this->version, $this->solution['sid']);
+ $this->context = new CredentialContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a CredentialInstance
+ * Delete the CredentialInstance
*
- * @return CredentialInstance Fetched CredentialInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Update the CredentialInstance
+ * Fetch the CredentialInstance
*
- * @param array|Options $options Optional Arguments
- * @return CredentialInstance Updated CredentialInstance
+ * @return CredentialInstance Fetched CredentialInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): CredentialInstance
{
- return $this->proxy()->update($options);
+
+ return $this->proxy()->fetch();
}
/**
- * Deletes the CredentialInstance
+ * Update the CredentialInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return CredentialInstance Updated CredentialInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): CredentialInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->update($options);
}
/**
@@ -112,7 +125,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -131,12 +144,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Chat.V1.CredentialInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/CredentialList.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/CredentialList.php
index 3f804d7..a0d59db 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/CredentialList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/CredentialList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Chat\V1;
@@ -12,55 +19,71 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class CredentialList extends ListResource
-{
+ {
/**
* Construct the CredentialList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Chat\V1\CredentialList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/Credentials';
}
/**
- * Streams CredentialInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the CredentialInstance
*
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @param string $type
+ * @param array|Options $options Optional Arguments
+ * @return CredentialInstance Created CredentialInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($limit = null, $pageSize = null)
+ public function create(string $type, array $options = []): CredentialInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'Type' =>
+ $type,
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'Certificate' =>
+ $options['certificate'],
+ 'PrivateKey' =>
+ $options['privateKey'],
+ 'Sandbox' =>
+ Serialize::booleanToString($options['sandbox']),
+ 'ApiKey' =>
+ $options['apiKey'],
+ 'Secret' =>
+ $options['secret'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new CredentialInstance(
+ $this->version,
+ $payload
+ );
}
+
/**
* Reads CredentialInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -76,11 +99,38 @@ public function stream($limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return CredentialInstance[] Array of results
*/
- public function read($limit = null, $pageSize = null)
+ public function read(int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($limit, $pageSize), false);
}
+ /**
+ * Streams CredentialInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of CredentialInstance records from the API.
* Request is executed immediately
@@ -88,21 +138,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of CredentialInstance
+ * @return CredentialPage Page of CredentialInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): CredentialPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new CredentialPage($this->version, $response, $this->solution);
}
@@ -112,9 +163,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of CredentialInstance
+ * @return CredentialPage Page of CredentialInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): CredentialPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -124,48 +175,21 @@ public function getPage($targetUrl)
return new CredentialPage($this->version, $response, $this->solution);
}
- /**
- * Create a new CredentialInstance
- *
- * @param string $type The type of push-notification service the credential is
- * for
- * @param array|Options $options Optional Arguments
- * @return CredentialInstance Newly created CredentialInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($type, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'Type' => $type,
- 'FriendlyName' => $options['friendlyName'],
- 'Certificate' => $options['certificate'],
- 'PrivateKey' => $options['privateKey'],
- 'Sandbox' => Serialize::booleanToString($options['sandbox']),
- 'ApiKey' => $options['apiKey'],
- 'Secret' => $options['secret'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new CredentialInstance($this->version, $payload);
- }
/**
* Constructs a CredentialContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Chat\V1\CredentialContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the Credential resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): CredentialContext
{
- return new CredentialContext($this->version, $sid);
+ return new CredentialContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -173,8 +197,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V1.CredentialList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/CredentialOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/CredentialOptions.php
index 7613df9..aa037ba 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/CredentialOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/CredentialOptions.php
@@ -1,10 +1,16 @@
options['friendlyName'] = $friendlyName;
$this->options['certificate'] = $certificate;
$this->options['privateKey'] = $privateKey;
@@ -84,42 +116,34 @@ public function __construct($friendlyName = Values::NONE, $certificate = Values:
/**
* A descriptive string that you create to describe the new resource. It can be up to 64 characters long.
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName A descriptive string that you create to describe the new resource. It can be up to 64 characters long.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
}
/**
- * [APN only] The URL encoded representation of the certificate. For example,
- * `-----BEGIN CERTIFICATE-----
- * MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==
- * -----END CERTIFICATE-----`
+ * [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A== -----END CERTIFICATE-----`
*
- * @param string $certificate [APN only] The URL encoded representation of the
- * certificate
+ * @param string $certificate [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A== -----END CERTIFICATE-----`
* @return $this Fluent Builder
*/
- public function setCertificate($certificate)
+ public function setCertificate(string $certificate): self
{
$this->options['certificate'] = $certificate;
return $this;
}
/**
- * [APN only] The URL encoded representation of the private key. For example,
- * `-----BEGIN RSA PRIVATE KEY-----
- * MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR.
- * -----END RSA PRIVATE KEY-----`
+ * [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR. -----END RSA PRIVATE KEY-----`
*
- * @param string $privateKey [APN only] The URL encoded representation of the
- * private key
+ * @param string $privateKey [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR. -----END RSA PRIVATE KEY-----`
* @return $this Fluent Builder
*/
- public function setPrivateKey($privateKey)
+ public function setPrivateKey(string $privateKey): self
{
$this->options['privateKey'] = $privateKey;
return $this;
@@ -128,11 +152,10 @@ public function setPrivateKey($privateKey)
/**
* [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production.
*
- * @param bool $sandbox [APN only] Whether to send the credential to sandbox
- * APNs
+ * @param bool $sandbox [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production.
* @return $this Fluent Builder
*/
- public function setSandbox($sandbox)
+ public function setSandbox(bool $sandbox): self
{
$this->options['sandbox'] = $sandbox;
return $this;
@@ -141,12 +164,10 @@ public function setSandbox($sandbox)
/**
* [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential.
*
- * @param string $apiKey [GCM only] The API key for the project that was
- * obtained from the Google Developer console for your
- * GCM Service application credential
+ * @param string $apiKey [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential.
* @return $this Fluent Builder
*/
- public function setApiKey($apiKey)
+ public function setApiKey(string $apiKey): self
{
$this->options['apiKey'] = $apiKey;
return $this;
@@ -155,11 +176,10 @@ public function setApiKey($apiKey)
/**
* [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging.
*
- * @param string $secret [FCM only] The Server key of your project from
- * Firebase console
+ * @param string $secret [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging.
* @return $this Fluent Builder
*/
- public function setSecret($secret)
+ public function setSecret(string $secret): self
{
$this->options['secret'] = $secret;
return $this;
@@ -170,36 +190,36 @@ public function setSecret($secret)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Chat.V1.CreateCredentialOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Chat.V1.CreateCredentialOptions ' . $options . ']';
}
}
+
+
+
class UpdateCredentialOptions extends Options
-{
+ {
/**
- * @param string $friendlyName A string to describe the resource
- * @param string $certificate [APN only] The URL encoded representation of the
- * certificate
- * @param string $privateKey [APN only] The URL encoded representation of the
- * private key
- * @param bool $sandbox [APN only] Whether to send the credential to sandbox
- * APNs
- * @param string $apiKey [GCM only] The API key for the project that was
- * obtained from the Google Developer console for your
- * GCM Service application credential
- * @param string $secret [FCM only] The Server key of your project from
- * Firebase console
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
+ * @param string $certificate [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A== -----END CERTIFICATE-----`
+ * @param string $privateKey [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR. -----END RSA PRIVATE KEY-----`
+ * @param bool $sandbox [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production.
+ * @param string $apiKey [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential.
+ * @param string $secret [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging.
*/
- public function __construct($friendlyName = Values::NONE, $certificate = Values::NONE, $privateKey = Values::NONE, $sandbox = Values::NONE, $apiKey = Values::NONE, $secret = Values::NONE)
- {
+ public function __construct(
+
+ string $friendlyName = Values::NONE,
+ string $certificate = Values::NONE,
+ string $privateKey = Values::NONE,
+ bool $sandbox = Values::BOOL_NONE,
+ string $apiKey = Values::NONE,
+ string $secret = Values::NONE
+
+ ) {
$this->options['friendlyName'] = $friendlyName;
$this->options['certificate'] = $certificate;
$this->options['privateKey'] = $privateKey;
@@ -211,42 +231,34 @@ public function __construct($friendlyName = Values::NONE, $certificate = Values:
/**
* A descriptive string that you create to describe the resource. It can be up to 64 characters long.
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
}
/**
- * [APN only] The URL encoded representation of the certificate. For example,
- * `-----BEGIN CERTIFICATE-----
- * MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==
- * -----END CERTIFICATE-----`
+ * [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A== -----END CERTIFICATE-----`
*
- * @param string $certificate [APN only] The URL encoded representation of the
- * certificate
+ * @param string $certificate [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A== -----END CERTIFICATE-----`
* @return $this Fluent Builder
*/
- public function setCertificate($certificate)
+ public function setCertificate(string $certificate): self
{
$this->options['certificate'] = $certificate;
return $this;
}
/**
- * [APN only] The URL encoded representation of the private key. For example,
- * `-----BEGIN RSA PRIVATE KEY-----
- * MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR.
- * -----END RSA PRIVATE KEY-----`
+ * [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR. -----END RSA PRIVATE KEY-----`
*
- * @param string $privateKey [APN only] The URL encoded representation of the
- * private key
+ * @param string $privateKey [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR. -----END RSA PRIVATE KEY-----`
* @return $this Fluent Builder
*/
- public function setPrivateKey($privateKey)
+ public function setPrivateKey(string $privateKey): self
{
$this->options['privateKey'] = $privateKey;
return $this;
@@ -255,11 +267,10 @@ public function setPrivateKey($privateKey)
/**
* [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production.
*
- * @param bool $sandbox [APN only] Whether to send the credential to sandbox
- * APNs
+ * @param bool $sandbox [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production.
* @return $this Fluent Builder
*/
- public function setSandbox($sandbox)
+ public function setSandbox(bool $sandbox): self
{
$this->options['sandbox'] = $sandbox;
return $this;
@@ -268,12 +279,10 @@ public function setSandbox($sandbox)
/**
* [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential.
*
- * @param string $apiKey [GCM only] The API key for the project that was
- * obtained from the Google Developer console for your
- * GCM Service application credential
+ * @param string $apiKey [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential.
* @return $this Fluent Builder
*/
- public function setApiKey($apiKey)
+ public function setApiKey(string $apiKey): self
{
$this->options['apiKey'] = $apiKey;
return $this;
@@ -282,11 +291,10 @@ public function setApiKey($apiKey)
/**
* [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging.
*
- * @param string $secret [FCM only] The Server key of your project from
- * Firebase console
+ * @param string $secret [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging.
* @return $this Fluent Builder
*/
- public function setSecret($secret)
+ public function setSecret(string $secret): self
{
$this->options['secret'] = $secret;
return $this;
@@ -297,14 +305,10 @@ public function setSecret($secret)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Chat.V1.UpdateCredentialOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Chat.V1.UpdateCredentialOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/CredentialPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/CredentialPage.php
index 710ca53..44c73e9 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/CredentialPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/CredentialPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return CredentialInstance \Twilio\Rest\Chat\V1\CredentialInstance
+ */
+ public function buildInstance(array $payload): CredentialInstance
{
return new CredentialInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V1.CredentialPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/InviteContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/InviteContext.php
index bafd5cb..42549e4 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/InviteContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/InviteContext.php
@@ -2,55 +2,86 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Chat\V1\Service\Channel;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class InviteContext extends InstanceContext
-{
+ {
/**
* Initialize the InviteContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the resource from
- * @param string $channelSid The SID of the Channel the resource to fetch
- * belongs to
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Chat\V1\Service\Channel\InviteContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under.
+ * @param string $channelSid The SID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the new resource belongs to.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Invite resource to delete.
*/
- public function __construct(Version $version, $serviceSid, $channelSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $channelSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'channelSid' =>
+ $channelSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Channels/' . \rawurlencode($channelSid)
+ .'/Invites/' . \rawurlencode($sid)
+ .'';
+ }
+
+ /**
+ * Delete the InviteInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Invites/' . \rawurlencode($sid) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a InviteInstance
+ * Fetch the InviteInstance
*
* @return InviteInstance Fetched InviteInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): InviteInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new InviteInstance(
$this->version,
@@ -61,28 +92,18 @@ public function fetch()
);
}
- /**
- * Deletes the InviteInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Chat.V1.InviteContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/InviteInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/InviteInstance.php
index 7c8a65a..aa4a2dc 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/InviteInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/InviteInstance.php
@@ -2,50 +2,57 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Chat\V1\Service\Channel;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $channelSid
- * @property string $serviceSid
- * @property string $identity
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $roleSid
- * @property string $createdBy
- * @property string $url
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $channelSid
+ * @property string|null $serviceSid
+ * @property string|null $identity
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $roleSid
+ * @property string|null $createdBy
+ * @property string|null $url
*/
class InviteInstance extends InstanceResource
{
/**
* Initialize the InviteInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $channelSid The SID of the Channel the new resource belongs to
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Chat\V1\Service\Channel\InviteInstance
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under.
+ * @param string $channelSid The SID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the new resource belongs to.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Invite resource to delete.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $channelSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $channelSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'channelSid' => Values::array_get($payload, 'channel_sid'),
@@ -56,23 +63,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $chan
'roleSid' => Values::array_get($payload, 'role_sid'),
'createdBy' => Values::array_get($payload, 'created_by'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'channelSid' => $channelSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Chat\V1\Service\Channel\InviteContext Context for this
- * InviteInstance
+ * @return InviteContext Context for this InviteInstance
*/
- protected function proxy()
+ protected function proxy(): InviteContext
{
if (!$this->context) {
$this->context = new InviteContext(
@@ -87,25 +89,27 @@ protected function proxy()
}
/**
- * Fetch a InviteInstance
+ * Delete the InviteInstance
*
- * @return InviteInstance Fetched InviteInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the InviteInstance
+ * Fetch the InviteInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return InviteInstance Fetched InviteInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): InviteInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -115,7 +119,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -134,12 +138,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Chat.V1.InviteInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/InviteList.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/InviteList.php
index 5c6d20f..c0b95d8 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/InviteList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/InviteList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Chat\V1\Service\Channel;
@@ -12,52 +19,65 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class InviteList extends ListResource
-{
+ {
/**
* Construct the InviteList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $channelSid The SID of the Channel the new resource belongs to
- * @return \Twilio\Rest\Chat\V1\Service\Channel\InviteList
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under.
+ * @param string $channelSid The SID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the new resource belongs to.
*/
- public function __construct(Version $version, $serviceSid, $channelSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid,
+ string $channelSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'channelSid' => $channelSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Invites';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ 'channelSid' =>
+ $channelSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Channels/' . \rawurlencode($channelSid)
+ .'/Invites';
}
/**
- * Create a new InviteInstance
+ * Create the InviteInstance
*
- * @param string $identity The `identity` value that identifies the new
- * resource's User
+ * @param string $identity The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/api/chat/rest/v1/user) within the [Service](https://www.twilio.com/docs/api/chat/rest/v1/service). See [access tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more info.
* @param array|Options $options Optional Arguments
- * @return InviteInstance Newly created InviteInstance
+ * @return InviteInstance Created InviteInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($identity, $options = array())
+ public function create(string $identity, array $options = []): InviteInstance
{
+
$options = new Values($options);
- $data = Values::of(array('Identity' => $identity, 'RoleSid' => $options['roleSid'],));
+ $data = Values::of([
+ 'Identity' =>
+ $identity,
+ 'RoleSid' =>
+ $options['roleSid'],
+ ]);
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
return new InviteInstance(
$this->version,
@@ -67,82 +87,83 @@ public function create($identity, $options = array())
);
}
+
/**
- * Streams InviteInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Reads InviteInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
+ * @param int $limit Upper limit for the number of records to return. read()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
+ * page_size is defined but a limit is defined, read()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return InviteInstance[] Array of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($options, $limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
- * Reads InviteInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
+ * Streams InviteInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
+ * @param int $limit Upper limit for the number of records to return. stream()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
+ * page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return InviteInstance[] Array of results
+ * @return Stream stream of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
/**
* Retrieve a single page of InviteInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of InviteInstance
+ * @return InvitePage Page of InviteInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): InvitePage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Identity' => Serialize::map($options['identity'], function ($e) {
- return $e;
- }),
+
+ $params = Values::of([
+ 'Identity' =>
+ Serialize::map($options['identity'], function ($e) { return $e; }),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new InvitePage($this->version, $response, $this->solution);
}
@@ -152,9 +173,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of InviteInstance
+ * @return InvitePage Page of InviteInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): InvitePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -164,13 +185,16 @@ public function getPage($targetUrl)
return new InvitePage($this->version, $response, $this->solution);
}
+
/**
* Constructs a InviteContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Chat\V1\Service\Channel\InviteContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the Invite resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): InviteContext
{
return new InviteContext(
$this->version,
@@ -185,8 +209,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V1.InviteList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/InviteOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/InviteOptions.php
index 16893a6..7271fd0 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/InviteOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/InviteOptions.php
@@ -1,10 +1,16 @@
options['roleSid'] = $roleSid;
}
/**
* The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to the new member.
*
- * @param string $roleSid The Role assigned to the new member
+ * @param string $roleSid The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to the new member.
* @return $this Fluent Builder
*/
- public function setRoleSid($roleSid)
+ public function setRoleSid(string $roleSid): self
{
$this->options['roleSid'] = $roleSid;
return $this;
@@ -60,35 +84,35 @@ public function setRoleSid($roleSid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Chat.V1.CreateInviteOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Chat.V1.CreateInviteOptions ' . $options . ']';
}
}
+
+
class ReadInviteOptions extends Options
-{
+ {
/**
- * @param string $identity The `identity` value of the resources to read
+ * @param string[] $identity The [User](https://www.twilio.com/docs/api/chat/rest/v1/user)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more details.
*/
- public function __construct($identity = Values::NONE)
- {
+ public function __construct(
+
+ array $identity = Values::ARRAY_NONE
+
+ ) {
$this->options['identity'] = $identity;
}
/**
* The [User](https://www.twilio.com/docs/api/chat/rest/v1/user)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more details.
*
- * @param string $identity The `identity` value of the resources to read
+ * @param string[] $identity The [User](https://www.twilio.com/docs/api/chat/rest/v1/user)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more details.
* @return $this Fluent Builder
*/
- public function setIdentity($identity)
+ public function setIdentity(array $identity): self
{
$this->options['identity'] = $identity;
return $this;
@@ -99,14 +123,10 @@ public function setIdentity($identity)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Chat.V1.ReadInviteOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Chat.V1.ReadInviteOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/InvitePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/InvitePage.php
index 1665587..9c3e840 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/InvitePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/InvitePage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return InviteInstance \Twilio\Rest\Chat\V1\Service\Channel\InviteInstance
+ */
+ public function buildInstance(array $payload): InviteInstance
{
- return new InviteInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['channelSid']
- );
+ return new InviteInstance($this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V1.InvitePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/MemberContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/MemberContext.php
index ce335f4..2a6a675 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/MemberContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/MemberContext.php
@@ -2,55 +2,87 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Chat\V1\Service\Channel;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class MemberContext extends InstanceContext
-{
+ {
/**
* Initialize the MemberContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the resource from
- * @param string $channelSid The unique ID of the channel the member belongs to
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Chat\V1\Service\Channel\MemberContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under.
+ * @param string $channelSid The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the new member belongs to. Can be the Channel resource's `sid` or `unique_name`.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Member resource to delete.
*/
- public function __construct(Version $version, $serviceSid, $channelSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $channelSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'channelSid' =>
+ $channelSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Members/' . \rawurlencode($sid) . '';
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Channels/' . \rawurlencode($channelSid)
+ .'/Members/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a MemberInstance
+ * Delete the MemberInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
+ }
+
+
+ /**
+ * Fetch the MemberInstance
*
* @return MemberInstance Fetched MemberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): MemberInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new MemberInstance(
$this->version,
@@ -61,16 +93,6 @@ public function fetch()
);
}
- /**
- * Deletes the MemberInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Update the MemberInstance
@@ -79,21 +101,20 @@ public function delete()
* @return MemberInstance Updated MemberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): MemberInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'RoleSid' => $options['roleSid'],
- 'LastConsumedMessageIndex' => $options['lastConsumedMessageIndex'],
- ));
+ $data = Values::of([
+ 'RoleSid' =>
+ $options['roleSid'],
+ 'LastConsumedMessageIndex' =>
+ $options['lastConsumedMessageIndex'],
+ ]);
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new MemberInstance(
$this->version,
@@ -104,17 +125,18 @@ public function update($options = array())
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Chat.V1.MemberContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/MemberInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/MemberInstance.php
index 52fcaf2..c3e3545 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/MemberInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/MemberInstance.php
@@ -2,52 +2,59 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Chat\V1\Service\Channel;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $channelSid
- * @property string $serviceSid
- * @property string $identity
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $roleSid
- * @property int $lastConsumedMessageIndex
- * @property \DateTime $lastConsumptionTimestamp
- * @property string $url
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $channelSid
+ * @property string|null $serviceSid
+ * @property string|null $identity
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $roleSid
+ * @property int|null $lastConsumedMessageIndex
+ * @property \DateTime|null $lastConsumptionTimestamp
+ * @property string|null $url
*/
class MemberInstance extends InstanceResource
{
/**
* Initialize the MemberInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $channelSid The unique ID of the Channel for the member
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Chat\V1\Service\Channel\MemberInstance
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under.
+ * @param string $channelSid The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the new member belongs to. Can be the Channel resource's `sid` or `unique_name`.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Member resource to delete.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $channelSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $channelSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'channelSid' => Values::array_get($payload, 'channel_sid'),
@@ -59,23 +66,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $chan
'lastConsumedMessageIndex' => Values::array_get($payload, 'last_consumed_message_index'),
'lastConsumptionTimestamp' => Deserialize::dateTime(Values::array_get($payload, 'last_consumption_timestamp')),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'channelSid' => $channelSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Chat\V1\Service\Channel\MemberContext Context for this
- * MemberInstance
+ * @return MemberContext Context for this MemberInstance
*/
- protected function proxy()
+ protected function proxy(): MemberContext
{
if (!$this->context) {
$this->context = new MemberContext(
@@ -90,25 +92,27 @@ protected function proxy()
}
/**
- * Fetch a MemberInstance
+ * Delete the MemberInstance
*
- * @return MemberInstance Fetched MemberInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the MemberInstance
+ * Fetch the MemberInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return MemberInstance Fetched MemberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): MemberInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -118,8 +122,9 @@ public function delete()
* @return MemberInstance Updated MemberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): MemberInstance
{
+
return $this->proxy()->update($options);
}
@@ -130,7 +135,7 @@ public function update($options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -149,12 +154,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Chat.V1.MemberInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/MemberList.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/MemberList.php
index f8513ff..600ba0c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/MemberList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/MemberList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Chat\V1\Service\Channel;
@@ -12,52 +19,65 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class MemberList extends ListResource
-{
+ {
/**
* Construct the MemberList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $channelSid The unique ID of the Channel for the member
- * @return \Twilio\Rest\Chat\V1\Service\Channel\MemberList
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under.
+ * @param string $channelSid The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the new member belongs to. Can be the Channel resource's `sid` or `unique_name`.
*/
- public function __construct(Version $version, $serviceSid, $channelSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid,
+ string $channelSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'channelSid' => $channelSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Members';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ 'channelSid' =>
+ $channelSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Channels/' . \rawurlencode($channelSid)
+ .'/Members';
}
/**
- * Create a new MemberInstance
+ * Create the MemberInstance
*
- * @param string $identity The `identity` value that identifies the new
- * resource's User
+ * @param string $identity The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/api/chat/rest/v1/user) within the [Service](https://www.twilio.com/docs/api/chat/rest/services). See [access tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more details.
* @param array|Options $options Optional Arguments
- * @return MemberInstance Newly created MemberInstance
+ * @return MemberInstance Created MemberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($identity, $options = array())
+ public function create(string $identity, array $options = []): MemberInstance
{
+
$options = new Values($options);
- $data = Values::of(array('Identity' => $identity, 'RoleSid' => $options['roleSid'],));
+ $data = Values::of([
+ 'Identity' =>
+ $identity,
+ 'RoleSid' =>
+ $options['roleSid'],
+ ]);
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
return new MemberInstance(
$this->version,
@@ -67,82 +87,83 @@ public function create($identity, $options = array())
);
}
+
/**
- * Streams MemberInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Reads MemberInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
+ * @param int $limit Upper limit for the number of records to return. read()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
+ * page_size is defined but a limit is defined, read()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return MemberInstance[] Array of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($options, $limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
- * Reads MemberInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
+ * Streams MemberInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
+ * @param int $limit Upper limit for the number of records to return. stream()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
+ * page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return MemberInstance[] Array of results
+ * @return Stream stream of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
/**
* Retrieve a single page of MemberInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of MemberInstance
+ * @return MemberPage Page of MemberInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): MemberPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Identity' => Serialize::map($options['identity'], function ($e) {
- return $e;
- }),
+
+ $params = Values::of([
+ 'Identity' =>
+ Serialize::map($options['identity'], function ($e) { return $e; }),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new MemberPage($this->version, $response, $this->solution);
}
@@ -152,9 +173,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of MemberInstance
+ * @return MemberPage Page of MemberInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): MemberPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -164,13 +185,16 @@ public function getPage($targetUrl)
return new MemberPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a MemberContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Chat\V1\Service\Channel\MemberContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the Member resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): MemberContext
{
return new MemberContext(
$this->version,
@@ -185,8 +209,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V1.MemberList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/MemberOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/MemberOptions.php
index e3012ed..ff7edc1 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/MemberOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/MemberOptions.php
@@ -1,10 +1,16 @@
options['roleSid'] = $roleSid;
}
/**
* The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/api/services).
*
- * @param string $roleSid The SID of the Role to assign to the member
+ * @param string $roleSid The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/api/services).
* @return $this Fluent Builder
*/
- public function setRoleSid($roleSid)
+ public function setRoleSid(string $roleSid): self
{
$this->options['roleSid'] = $roleSid;
return $this;
@@ -71,35 +102,35 @@ public function setRoleSid($roleSid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Chat.V1.CreateMemberOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Chat.V1.CreateMemberOptions ' . $options . ']';
}
}
+
+
class ReadMemberOptions extends Options
-{
+ {
/**
- * @param string $identity The `identity` value of the resources to read
+ * @param string[] $identity The [User](https://www.twilio.com/docs/api/chat/rest/v1/user)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more details.
*/
- public function __construct($identity = Values::NONE)
- {
+ public function __construct(
+
+ array $identity = Values::ARRAY_NONE
+
+ ) {
$this->options['identity'] = $identity;
}
/**
* The [User](https://www.twilio.com/docs/api/chat/rest/v1/user)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more details.
*
- * @param string $identity The `identity` value of the resources to read
+ * @param string[] $identity The [User](https://www.twilio.com/docs/api/chat/rest/v1/user)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more details.
* @return $this Fluent Builder
*/
- public function setIdentity($identity)
+ public function setIdentity(array $identity): self
{
$this->options['identity'] = $identity;
return $this;
@@ -110,27 +141,25 @@ public function setIdentity($identity)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Chat.V1.ReadMemberOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Chat.V1.ReadMemberOptions ' . $options . ']';
}
}
class UpdateMemberOptions extends Options
-{
+ {
/**
- * @param string $roleSid The SID of the Role to assign to the member
- * @param int $lastConsumedMessageIndex The index of the last consumed Message
- * for the Channel for the Member
+ * @param string $roleSid The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/api/services).
+ * @param int $lastConsumedMessageIndex The index of the last [Message](https://www.twilio.com/docs/api/chat/rest/messages) that the Member has read within the [Channel](https://www.twilio.com/docs/api/chat/rest/channels).
*/
- public function __construct($roleSid = Values::NONE, $lastConsumedMessageIndex = Values::NONE)
- {
+ public function __construct(
+
+ string $roleSid = Values::NONE,
+ int $lastConsumedMessageIndex = Values::INT_NONE
+
+ ) {
$this->options['roleSid'] = $roleSid;
$this->options['lastConsumedMessageIndex'] = $lastConsumedMessageIndex;
}
@@ -138,10 +167,10 @@ public function __construct($roleSid = Values::NONE, $lastConsumedMessageIndex =
/**
* The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/api/services).
*
- * @param string $roleSid The SID of the Role to assign to the member
+ * @param string $roleSid The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/api/services).
* @return $this Fluent Builder
*/
- public function setRoleSid($roleSid)
+ public function setRoleSid(string $roleSid): self
{
$this->options['roleSid'] = $roleSid;
return $this;
@@ -150,11 +179,10 @@ public function setRoleSid($roleSid)
/**
* The index of the last [Message](https://www.twilio.com/docs/api/chat/rest/messages) that the Member has read within the [Channel](https://www.twilio.com/docs/api/chat/rest/channels).
*
- * @param int $lastConsumedMessageIndex The index of the last consumed Message
- * for the Channel for the Member
+ * @param int $lastConsumedMessageIndex The index of the last [Message](https://www.twilio.com/docs/api/chat/rest/messages) that the Member has read within the [Channel](https://www.twilio.com/docs/api/chat/rest/channels).
* @return $this Fluent Builder
*/
- public function setLastConsumedMessageIndex($lastConsumedMessageIndex)
+ public function setLastConsumedMessageIndex(int $lastConsumedMessageIndex): self
{
$this->options['lastConsumedMessageIndex'] = $lastConsumedMessageIndex;
return $this;
@@ -165,14 +193,10 @@ public function setLastConsumedMessageIndex($lastConsumedMessageIndex)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Chat.V1.UpdateMemberOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Chat.V1.UpdateMemberOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/MemberPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/MemberPage.php
index 985e2b6..45851a1 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/MemberPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/MemberPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return MemberInstance \Twilio\Rest\Chat\V1\Service\Channel\MemberInstance
+ */
+ public function buildInstance(array $payload): MemberInstance
{
- return new MemberInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['channelSid']
- );
+ return new MemberInstance($this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V1.MemberPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/MessageContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/MessageContext.php
index 2924727..16886e7 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/MessageContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/MessageContext.php
@@ -2,56 +2,87 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Chat\V1\Service\Channel;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class MessageContext extends InstanceContext
-{
+ {
/**
* Initialize the MessageContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the resource from
- * @param string $channelSid The unique ID of the Channel the message to fetch
- * belongs to
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Chat\V1\Service\Channel\MessageContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under.
+ * @param string $channelSid The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the new resource belongs to. Can be the Channel resource's `sid` or `unique_name`.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Message resource to delete.
*/
- public function __construct(Version $version, $serviceSid, $channelSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $channelSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'channelSid' =>
+ $channelSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Messages/' . \rawurlencode($sid) . '';
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Channels/' . \rawurlencode($channelSid)
+ .'/Messages/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a MessageInstance
+ * Delete the MessageInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
+ }
+
+
+ /**
+ * Fetch the MessageInstance
*
* @return MessageInstance Fetched MessageInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): MessageInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new MessageInstance(
$this->version,
@@ -62,16 +93,6 @@ public function fetch()
);
}
- /**
- * Deletes the MessageInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Update the MessageInstance
@@ -80,18 +101,20 @@ public function delete()
* @return MessageInstance Updated MessageInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): MessageInstance
{
+
$options = new Values($options);
- $data = Values::of(array('Body' => $options['body'], 'Attributes' => $options['attributes'],));
+ $data = Values::of([
+ 'Body' =>
+ $options['body'],
+ 'Attributes' =>
+ $options['attributes'],
+ ]);
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new MessageInstance(
$this->version,
@@ -102,17 +125,18 @@ public function update($options = array())
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Chat.V1.MessageContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/MessageInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/MessageInstance.php
index 5ebe44c..42a3dc5 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/MessageInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/MessageInstance.php
@@ -2,55 +2,61 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Chat\V1\Service\Channel;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $attributes
- * @property string $serviceSid
- * @property string $to
- * @property string $channelSid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property bool $wasEdited
- * @property string $from
- * @property string $body
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $attributes
+ * @property string|null $serviceSid
+ * @property string|null $to
+ * @property string|null $channelSid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property bool|null $wasEdited
+ * @property string|null $from
+ * @property string|null $body
* @property int $index
- * @property string $url
+ * @property string|null $url
*/
class MessageInstance extends InstanceResource
{
/**
* Initialize the MessageInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $channelSid The unique ID of the Channel the Message resource
- * belongs to
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Chat\V1\Service\Channel\MessageInstance
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under.
+ * @param string $channelSid The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the new resource belongs to. Can be the Channel resource's `sid` or `unique_name`.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Message resource to delete.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $channelSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $channelSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'attributes' => Values::array_get($payload, 'attributes'),
@@ -64,23 +70,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $chan
'body' => Values::array_get($payload, 'body'),
'index' => Values::array_get($payload, 'index'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'channelSid' => $channelSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Chat\V1\Service\Channel\MessageContext Context for this
- * MessageInstance
+ * @return MessageContext Context for this MessageInstance
*/
- protected function proxy()
+ protected function proxy(): MessageContext
{
if (!$this->context) {
$this->context = new MessageContext(
@@ -95,25 +96,27 @@ protected function proxy()
}
/**
- * Fetch a MessageInstance
+ * Delete the MessageInstance
*
- * @return MessageInstance Fetched MessageInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the MessageInstance
+ * Fetch the MessageInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return MessageInstance Fetched MessageInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): MessageInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -123,8 +126,9 @@ public function delete()
* @return MessageInstance Updated MessageInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): MessageInstance
{
+
return $this->proxy()->update($options);
}
@@ -135,7 +139,7 @@ public function update($options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -154,12 +158,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Chat.V1.MessageInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/MessageList.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/MessageList.php
index 711fd7f..f18a5d4 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/MessageList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/MessageList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Chat\V1\Service\Channel;
@@ -12,55 +19,66 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class MessageList extends ListResource
-{
+ {
/**
* Construct the MessageList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $channelSid The unique ID of the Channel the Message resource
- * belongs to
- * @return \Twilio\Rest\Chat\V1\Service\Channel\MessageList
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under.
+ * @param string $channelSid The unique ID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the new resource belongs to. Can be the Channel resource's `sid` or `unique_name`.
*/
- public function __construct(Version $version, $serviceSid, $channelSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid,
+ string $channelSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'channelSid' => $channelSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Messages';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ 'channelSid' =>
+ $channelSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Channels/' . \rawurlencode($channelSid)
+ .'/Messages';
}
/**
- * Create a new MessageInstance
+ * Create the MessageInstance
*
- * @param string $body The message to send to the channel
+ * @param string $body The message to send to the channel. Can also be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string.
* @param array|Options $options Optional Arguments
- * @return MessageInstance Newly created MessageInstance
+ * @return MessageInstance Created MessageInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($body, $options = array())
+ public function create(string $body, array $options = []): MessageInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'Body' => $body,
- 'From' => $options['from'],
- 'Attributes' => $options['attributes'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'Body' =>
+ $body,
+ 'From' =>
+ $options['from'],
+ 'Attributes' =>
+ $options['attributes'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
return new MessageInstance(
$this->version,
@@ -70,80 +88,83 @@ public function create($body, $options = array())
);
}
+
/**
- * Streams MessageInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Reads MessageInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
+ * @param int $limit Upper limit for the number of records to return. read()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
+ * page_size is defined but a limit is defined, read()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return MessageInstance[] Array of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($options, $limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
- * Reads MessageInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
+ * Streams MessageInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
+ * @param int $limit Upper limit for the number of records to return. stream()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
+ * page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return MessageInstance[] Array of results
+ * @return Stream stream of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
/**
* Retrieve a single page of MessageInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of MessageInstance
+ * @return MessagePage Page of MessageInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): MessagePage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Order' => $options['order'],
+
+ $params = Values::of([
+ 'Order' =>
+ $options['order'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new MessagePage($this->version, $response, $this->solution);
}
@@ -153,9 +174,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of MessageInstance
+ * @return MessagePage Page of MessageInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): MessagePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -165,13 +186,16 @@ public function getPage($targetUrl)
return new MessagePage($this->version, $response, $this->solution);
}
+
/**
* Constructs a MessageContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Chat\V1\Service\Channel\MessageContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the Message resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): MessageContext
{
return new MessageContext(
$this->version,
@@ -186,8 +210,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V1.MessageList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/MessageOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/MessageOptions.php
index 91424ec..359f26c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/MessageOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/MessageOptions.php
@@ -1,10 +1,16 @@
options['from'] = $from;
$this->options['attributes'] = $attributes;
}
@@ -62,10 +94,10 @@ public function __construct($from = Values::NONE, $attributes = Values::NONE)
/**
* The [identity](https://www.twilio.com/docs/api/chat/guides/identity) of the new message's author. The default value is `system`.
*
- * @param string $from The identity of the new message's author
+ * @param string $from The [identity](https://www.twilio.com/docs/api/chat/guides/identity) of the new message's author. The default value is `system`.
* @return $this Fluent Builder
*/
- public function setFrom($from)
+ public function setFrom(string $from): self
{
$this->options['from'] = $from;
return $this;
@@ -74,11 +106,10 @@ public function setFrom($from)
/**
* A valid JSON string that contains application-specific data.
*
- * @param string $attributes A valid JSON string that contains
- * application-specific data
+ * @param string $attributes A valid JSON string that contains application-specific data.
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setAttributes(string $attributes): self
{
$this->options['attributes'] = $attributes;
return $this;
@@ -89,35 +120,35 @@ public function setAttributes($attributes)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Chat.V1.CreateMessageOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Chat.V1.CreateMessageOptions ' . $options . ']';
}
}
+
+
class ReadMessageOptions extends Options
-{
+ {
/**
- * @param string $order The sort order of the returned messages
+ * @param string $order The sort order of the returned messages. Can be: `asc` (ascending) or `desc` (descending) with `asc` as the default.
*/
- public function __construct($order = Values::NONE)
- {
+ public function __construct(
+
+ string $order = Values::NONE
+
+ ) {
$this->options['order'] = $order;
}
/**
* The sort order of the returned messages. Can be: `asc` (ascending) or `desc` (descending) with `asc` as the default.
*
- * @param string $order The sort order of the returned messages
+ * @param string $order The sort order of the returned messages. Can be: `asc` (ascending) or `desc` (descending) with `asc` as the default.
* @return $this Fluent Builder
*/
- public function setOrder($order)
+ public function setOrder(string $order): self
{
$this->options['order'] = $order;
return $this;
@@ -128,27 +159,25 @@ public function setOrder($order)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Chat.V1.ReadMessageOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Chat.V1.ReadMessageOptions ' . $options . ']';
}
}
class UpdateMessageOptions extends Options
-{
+ {
/**
- * @param string $body The message to send to the channel
- * @param string $attributes A valid JSON string that contains
- * application-specific data
+ * @param string $body The message to send to the channel. Can also be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string.
+ * @param string $attributes A valid JSON string that contains application-specific data.
*/
- public function __construct($body = Values::NONE, $attributes = Values::NONE)
- {
+ public function __construct(
+
+ string $body = Values::NONE,
+ string $attributes = Values::NONE
+
+ ) {
$this->options['body'] = $body;
$this->options['attributes'] = $attributes;
}
@@ -156,10 +185,10 @@ public function __construct($body = Values::NONE, $attributes = Values::NONE)
/**
* The message to send to the channel. Can also be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string.
*
- * @param string $body The message to send to the channel
+ * @param string $body The message to send to the channel. Can also be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string.
* @return $this Fluent Builder
*/
- public function setBody($body)
+ public function setBody(string $body): self
{
$this->options['body'] = $body;
return $this;
@@ -168,11 +197,10 @@ public function setBody($body)
/**
* A valid JSON string that contains application-specific data.
*
- * @param string $attributes A valid JSON string that contains
- * application-specific data
+ * @param string $attributes A valid JSON string that contains application-specific data.
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setAttributes(string $attributes): self
{
$this->options['attributes'] = $attributes;
return $this;
@@ -183,14 +211,10 @@ public function setAttributes($attributes)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Chat.V1.UpdateMessageOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Chat.V1.UpdateMessageOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/MessagePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/MessagePage.php
index 498948f..19373f7 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/MessagePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/Channel/MessagePage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return MessageInstance \Twilio\Rest\Chat\V1\Service\Channel\MessageInstance
+ */
+ public function buildInstance(array $payload): MessageInstance
{
- return new MessageInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['channelSid']
- );
+ return new MessageInstance($this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V1.MessagePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/ChannelContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/ChannelContext.php
index 5ee7d32..dda1d3b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/ChannelContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/ChannelContext.php
@@ -2,69 +2,98 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Chat\V1\Service;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Chat\V1\Service\Channel\InviteList;
-use Twilio\Rest\Chat\V1\Service\Channel\MemberList;
-use Twilio\Rest\Chat\V1\Service\Channel\MessageList;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Chat\V1\Service\Channel\MemberList;
+use Twilio\Rest\Chat\V1\Service\Channel\InviteList;
+use Twilio\Rest\Chat\V1\Service\Channel\MessageList;
+
/**
- * @property \Twilio\Rest\Chat\V1\Service\Channel\MemberList $members
- * @property \Twilio\Rest\Chat\V1\Service\Channel\MessageList $messages
- * @property \Twilio\Rest\Chat\V1\Service\Channel\InviteList $invites
+ * @property MemberList $members
+ * @property InviteList $invites
+ * @property MessageList $messages
* @method \Twilio\Rest\Chat\V1\Service\Channel\MemberContext members(string $sid)
* @method \Twilio\Rest\Chat\V1\Service\Channel\MessageContext messages(string $sid)
* @method \Twilio\Rest\Chat\V1\Service\Channel\InviteContext invites(string $sid)
*/
class ChannelContext extends InstanceContext
-{
- protected $_members = null;
- protected $_messages = null;
- protected $_invites = null;
+ {
+ protected $_members;
+ protected $_invites;
+ protected $_messages;
/**
* Initialize the ChannelContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the resource from
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Chat\V1\Service\ChannelContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Channel resource to delete.
*/
- public function __construct(Version $version, $serviceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Channels/' . \rawurlencode($sid)
+ .'';
+ }
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($sid) . '';
+ /**
+ * Delete the ChannelInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a ChannelInstance
+ * Fetch the ChannelInstance
*
* @return ChannelInstance Fetched ChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): ChannelInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new ChannelInstance(
$this->version,
@@ -74,16 +103,6 @@ public function fetch()
);
}
- /**
- * Deletes the ChannelInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Update the ChannelInstance
@@ -92,22 +111,22 @@ public function delete()
* @return ChannelInstance Updated ChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ChannelInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'UniqueName' => $options['uniqueName'],
- 'Attributes' => $options['attributes'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'UniqueName' =>
+ $options['uniqueName'],
+ 'Attributes' =>
+ $options['attributes'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new ChannelInstance(
$this->version,
@@ -117,12 +136,11 @@ public function update($options = array())
);
}
+
/**
* Access the members
- *
- * @return \Twilio\Rest\Chat\V1\Service\Channel\MemberList
*/
- protected function getMembers()
+ protected function getMembers(): MemberList
{
if (!$this->_members) {
$this->_members = new MemberList(
@@ -136,49 +154,45 @@ protected function getMembers()
}
/**
- * Access the messages
- *
- * @return \Twilio\Rest\Chat\V1\Service\Channel\MessageList
+ * Access the invites
*/
- protected function getMessages()
+ protected function getInvites(): InviteList
{
- if (!$this->_messages) {
- $this->_messages = new MessageList(
+ if (!$this->_invites) {
+ $this->_invites = new InviteList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sid']
);
}
- return $this->_messages;
+ return $this->_invites;
}
/**
- * Access the invites
- *
- * @return \Twilio\Rest\Chat\V1\Service\Channel\InviteList
+ * Access the messages
*/
- protected function getInvites()
+ protected function getMessages(): MessageList
{
- if (!$this->_invites) {
- $this->_invites = new InviteList(
+ if (!$this->_messages) {
+ $this->_messages = new MessageList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sid']
);
}
- return $this->_invites;
+ return $this->_messages;
}
/**
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -193,10 +207,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -211,12 +225,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Chat.V1.ChannelContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/ChannelInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/ChannelInstance.php
index c699c04..31bd58f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/ChannelInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/ChannelInstance.php
@@ -2,58 +2,68 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Chat\V1\Service;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Chat\V1\Service\Channel\MemberList;
+use Twilio\Rest\Chat\V1\Service\Channel\InviteList;
+use Twilio\Rest\Chat\V1\Service\Channel\MessageList;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $friendlyName
- * @property string $uniqueName
- * @property string $attributes
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $friendlyName
+ * @property string|null $uniqueName
+ * @property string|null $attributes
* @property string $type
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $createdBy
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $createdBy
* @property int $membersCount
* @property int $messagesCount
- * @property string $url
- * @property array $links
+ * @property string|null $url
+ * @property array|null $links
*/
class ChannelInstance extends InstanceResource
{
- protected $_members = null;
- protected $_messages = null;
- protected $_invites = null;
+ protected $_members;
+ protected $_invites;
+ protected $_messages;
/**
* Initialize the ChannelInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Chat\V1\Service\ChannelInstance
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Channel resource to delete.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
@@ -68,19 +78,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $sid
'messagesCount' => Values::array_get($payload, 'messages_count'),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Chat\V1\Service\ChannelContext Context for this
- * ChannelInstance
+ * @return ChannelContext Context for this ChannelInstance
*/
- protected function proxy()
+ protected function proxy(): ChannelContext
{
if (!$this->context) {
$this->context = new ChannelContext(
@@ -94,25 +103,27 @@ protected function proxy()
}
/**
- * Fetch a ChannelInstance
+ * Delete the ChannelInstance
*
- * @return ChannelInstance Fetched ChannelInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the ChannelInstance
+ * Fetch the ChannelInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return ChannelInstance Fetched ChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): ChannelInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -122,39 +133,34 @@ public function delete()
* @return ChannelInstance Updated ChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ChannelInstance
{
+
return $this->proxy()->update($options);
}
/**
* Access the members
- *
- * @return \Twilio\Rest\Chat\V1\Service\Channel\MemberList
*/
- protected function getMembers()
+ protected function getMembers(): MemberList
{
return $this->proxy()->members;
}
/**
- * Access the messages
- *
- * @return \Twilio\Rest\Chat\V1\Service\Channel\MessageList
+ * Access the invites
*/
- protected function getMessages()
+ protected function getInvites(): InviteList
{
- return $this->proxy()->messages;
+ return $this->proxy()->invites;
}
/**
- * Access the invites
- *
- * @return \Twilio\Rest\Chat\V1\Service\Channel\InviteList
+ * Access the messages
*/
- protected function getInvites()
+ protected function getMessages(): MessageList
{
- return $this->proxy()->invites;
+ return $this->proxy()->messages;
}
/**
@@ -164,7 +170,7 @@ protected function getInvites()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -183,12 +189,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Chat.V1.ChannelInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/ChannelList.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/ChannelList.php
index 05ea7b7..dcff76d 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/ChannelList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/ChannelList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Chat\V1\Service;
@@ -12,56 +19,89 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class ChannelList extends ListResource
-{
+ {
/**
* Construct the ChannelList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @return \Twilio\Rest\Chat\V1\Service\ChannelList
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under.
*/
- public function __construct(Version $version, $serviceSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Channels';
}
/**
- * Create a new ChannelInstance
+ * Create the ChannelInstance
*
* @param array|Options $options Optional Arguments
- * @return ChannelInstance Newly created ChannelInstance
+ * @return ChannelInstance Created ChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($options = array())
+ public function create(array $options = []): ChannelInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'UniqueName' => $options['uniqueName'],
- 'Attributes' => $options['attributes'],
- 'Type' => $options['type'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'UniqueName' =>
+ $options['uniqueName'],
+ 'Attributes' =>
+ $options['attributes'],
+ 'Type' =>
+ $options['type'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new ChannelInstance(
+ $this->version,
+ $payload,
+ $this->solution['serviceSid']
);
+ }
+
- return new ChannelInstance($this->version, $payload, $this->solution['serviceSid']);
+ /**
+ * Reads ChannelInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return ChannelInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -81,9 +121,9 @@ public function create($options = array())
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -92,54 +132,33 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads ChannelInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return ChannelInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of ChannelInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of ChannelInstance
+ * @return ChannelPage Page of ChannelInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): ChannelPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Type' => Serialize::map($options['type'], function ($e) {
- return $e;
- }),
+
+ $params = Values::of([
+ 'Type' =>
+ $options['type'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new ChannelPage($this->version, $response, $this->solution);
}
@@ -149,9 +168,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of ChannelInstance
+ * @return ChannelPage Page of ChannelInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): ChannelPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -161,15 +180,22 @@ public function getPage($targetUrl)
return new ChannelPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a ChannelContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Chat\V1\Service\ChannelContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the Channel resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): ChannelContext
{
- return new ChannelContext($this->version, $this->solution['serviceSid'], $sid);
+ return new ChannelContext(
+ $this->version,
+ $this->solution['serviceSid'],
+ $sid
+ );
}
/**
@@ -177,8 +203,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V1.ChannelList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/ChannelOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/ChannelOptions.php
index 24d7b6b..2bb4e24 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/ChannelOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/ChannelOptions.php
@@ -1,10 +1,16 @@
options['friendlyName'] = $friendlyName;
$this->options['uniqueName'] = $uniqueName;
$this->options['attributes'] = $attributes;
@@ -72,10 +109,10 @@ public function __construct($friendlyName = Values::NONE, $uniqueName = Values::
/**
* A descriptive string that you create to describe the new resource. It can be up to 64 characters long.
*
- * @param string $friendlyName A string to describe the new resource
+ * @param string $friendlyName A descriptive string that you create to describe the new resource. It can be up to 64 characters long.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -84,11 +121,10 @@ public function setFriendlyName($friendlyName)
/**
* An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. This value must be 64 characters or less in length and be unique within the Service.
*
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the resource
+ * @param string $uniqueName An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. This value must be 64 characters or less in length and be unique within the Service.
* @return $this Fluent Builder
*/
- public function setUniqueName($uniqueName)
+ public function setUniqueName(string $uniqueName): self
{
$this->options['uniqueName'] = $uniqueName;
return $this;
@@ -97,23 +133,20 @@ public function setUniqueName($uniqueName)
/**
* A valid JSON string that contains application-specific data.
*
- * @param string $attributes A valid JSON string that contains
- * application-specific data
+ * @param string $attributes A valid JSON string that contains application-specific data.
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setAttributes(string $attributes): self
{
$this->options['attributes'] = $attributes;
return $this;
}
/**
- * The visibility of the channel. Can be: `public` or `private` and defaults to `public`.
- *
- * @param string $type The visibility of the channel
+ * @param string $type
* @return $this Fluent Builder
*/
- public function setType($type)
+ public function setType(string $type): self
{
$this->options['type'] = $type;
return $this;
@@ -124,35 +157,35 @@ public function setType($type)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Chat.V1.CreateChannelOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Chat.V1.CreateChannelOptions ' . $options . ']';
}
}
+
+
class ReadChannelOptions extends Options
-{
+ {
/**
- * @param string $type The visibility of the channel to read
+ * @param string $type The visibility of the Channels to read. Can be: `public` or `private` and defaults to `public`.
*/
- public function __construct($type = Values::NONE)
- {
+ public function __construct(
+
+ array $type = Values::ARRAY_NONE
+
+ ) {
$this->options['type'] = $type;
}
/**
* The visibility of the Channels to read. Can be: `public` or `private` and defaults to `public`.
*
- * @param string $type The visibility of the channel to read
+ * @param string $type The visibility of the Channels to read. Can be: `public` or `private` and defaults to `public`.
* @return $this Fluent Builder
*/
- public function setType($type)
+ public function setType(array $type): self
{
$this->options['type'] = $type;
return $this;
@@ -163,29 +196,27 @@ public function setType($type)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Chat.V1.ReadChannelOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Chat.V1.ReadChannelOptions ' . $options . ']';
}
}
class UpdateChannelOptions extends Options
-{
+ {
/**
- * @param string $friendlyName A string to describe the resource
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the resource
- * @param string $attributes A valid JSON string that contains
- * application-specific data
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
+ * @param string $uniqueName An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. This value must be 64 characters or less in length and be unique within the Service.
+ * @param string $attributes A valid JSON string that contains application-specific data.
*/
- public function __construct($friendlyName = Values::NONE, $uniqueName = Values::NONE, $attributes = Values::NONE)
- {
+ public function __construct(
+
+ string $friendlyName = Values::NONE,
+ string $uniqueName = Values::NONE,
+ string $attributes = Values::NONE
+
+ ) {
$this->options['friendlyName'] = $friendlyName;
$this->options['uniqueName'] = $uniqueName;
$this->options['attributes'] = $attributes;
@@ -194,10 +225,10 @@ public function __construct($friendlyName = Values::NONE, $uniqueName = Values::
/**
* A descriptive string that you create to describe the resource. It can be up to 64 characters long.
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -206,11 +237,10 @@ public function setFriendlyName($friendlyName)
/**
* An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. This value must be 64 characters or less in length and be unique within the Service.
*
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the resource
+ * @param string $uniqueName An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. This value must be 64 characters or less in length and be unique within the Service.
* @return $this Fluent Builder
*/
- public function setUniqueName($uniqueName)
+ public function setUniqueName(string $uniqueName): self
{
$this->options['uniqueName'] = $uniqueName;
return $this;
@@ -219,11 +249,10 @@ public function setUniqueName($uniqueName)
/**
* A valid JSON string that contains application-specific data.
*
- * @param string $attributes A valid JSON string that contains
- * application-specific data
+ * @param string $attributes A valid JSON string that contains application-specific data.
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setAttributes(string $attributes): self
{
$this->options['attributes'] = $attributes;
return $this;
@@ -234,14 +263,10 @@ public function setAttributes($attributes)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Chat.V1.UpdateChannelOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Chat.V1.UpdateChannelOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/ChannelPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/ChannelPage.php
index d7125f1..fd4ba59 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/ChannelPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/ChannelPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return ChannelInstance \Twilio\Rest\Chat\V1\Service\ChannelInstance
+ */
+ public function buildInstance(array $payload): ChannelInstance
{
return new ChannelInstance($this->version, $payload, $this->solution['serviceSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V1.ChannelPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/RoleContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/RoleContext.php
index aaa7729..5d6ab55 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/RoleContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/RoleContext.php
@@ -2,54 +2,82 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Chat\V1\Service;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
class RoleContext extends InstanceContext
-{
+ {
/**
* Initialize the RoleContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the resource from
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Chat\V1\Service\RoleContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Role resource to delete.
*/
- public function __construct(Version $version, $serviceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Roles/' . \rawurlencode($sid)
+ .'';
+ }
+
+ /**
+ * Delete the RoleInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Roles/' . \rawurlencode($sid) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a RoleInstance
+ * Fetch the RoleInstance
*
* @return RoleInstance Fetched RoleInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): RoleInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new RoleInstance(
$this->version,
@@ -59,36 +87,24 @@ public function fetch()
);
}
- /**
- * Deletes the RoleInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Update the RoleInstance
*
- * @param string $permission A permission the role should have
+ * @param string[] $permission A permission that you grant to the role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type` and are described in the documentation.
* @return RoleInstance Updated RoleInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($permission)
+ public function update(array $permission): RoleInstance
{
- $data = Values::of(array('Permission' => Serialize::map($permission, function ($e) {
- return $e;
- }),));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+
+ $data = Values::of([
+ 'Permission' =>
+ Serialize::map($permission,function ($e) { return $e; }),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new RoleInstance(
$this->version,
@@ -98,17 +114,18 @@ public function update($permission)
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Chat.V1.RoleContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/RoleInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/RoleInstance.php
index 5a01dda..206eb8b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/RoleInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/RoleInstance.php
@@ -2,48 +2,55 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Chat\V1\Service;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $friendlyName
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $friendlyName
* @property string $type
- * @property string $permissions
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
+ * @property string[]|null $permissions
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
*/
class RoleInstance extends InstanceResource
{
/**
* Initialize the RoleInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Chat\V1\Service\RoleInstance
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Role resource to delete.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
@@ -53,19 +60,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $sid
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Chat\V1\Service\RoleContext Context for this
- * RoleInstance
+ * @return RoleContext Context for this RoleInstance
*/
- protected function proxy()
+ protected function proxy(): RoleContext
{
if (!$this->context) {
$this->context = new RoleContext(
@@ -79,36 +85,39 @@ protected function proxy()
}
/**
- * Fetch a RoleInstance
+ * Delete the RoleInstance
*
- * @return RoleInstance Fetched RoleInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the RoleInstance
+ * Fetch the RoleInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return RoleInstance Fetched RoleInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): RoleInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
* Update the RoleInstance
*
- * @param string $permission A permission the role should have
+ * @param string[] $permission A permission that you grant to the role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type` and are described in the documentation.
* @return RoleInstance Updated RoleInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($permission)
+ public function update(array $permission): RoleInstance
{
+
return $this->proxy()->update($permission);
}
@@ -119,7 +128,7 @@ public function update($permission)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -138,12 +147,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Chat.V1.RoleInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/RoleList.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/RoleList.php
index ea8eb55..2a665cf 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/RoleList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/RoleList.php
@@ -2,66 +2,103 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Chat\V1\Service;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class RoleList extends ListResource
-{
+ {
/**
* Construct the RoleList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @return \Twilio\Rest\Chat\V1\Service\RoleList
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under.
*/
- public function __construct(Version $version, $serviceSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Roles';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Roles';
}
/**
- * Create a new RoleInstance
+ * Create the RoleInstance
*
- * @param string $friendlyName A string to describe the new resource
- * @param string $type The type of role
- * @param string $permission A permission the role should have
- * @return RoleInstance Newly created RoleInstance
+ * @param string $friendlyName A descriptive string that you create to describe the new resource. It can be up to 64 characters long.
+ * @param string $type
+ * @param string[] $permission A permission that you grant to the new role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type` and are described in the documentation.
+ * @return RoleInstance Created RoleInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($friendlyName, $type, $permission)
+ public function create(string $friendlyName, string $type, array $permission): RoleInstance
{
- $data = Values::of(array(
- 'FriendlyName' => $friendlyName,
- 'Type' => $type,
- 'Permission' => Serialize::map($permission, function ($e) {
- return $e;
- }),
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+
+ $data = Values::of([
+ 'FriendlyName' =>
+ $friendlyName,
+ 'Type' =>
+ $type,
+ 'Permission' =>
+ Serialize::map($permission,function ($e) { return $e; }),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new RoleInstance(
+ $this->version,
+ $payload,
+ $this->solution['serviceSid']
);
+ }
+
- return new RoleInstance($this->version, $payload, $this->solution['serviceSid']);
+ /**
+ * Reads RoleInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return RoleInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -80,9 +117,9 @@ public function create($friendlyName, $type, $permission)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -91,26 +128,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads RoleInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return RoleInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of RoleInstance records from the API.
* Request is executed immediately
@@ -118,21 +135,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of RoleInstance
+ * @return RolePage Page of RoleInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): RolePage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new RolePage($this->version, $response, $this->solution);
}
@@ -142,9 +160,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of RoleInstance
+ * @return RolePage Page of RoleInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): RolePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -154,15 +172,22 @@ public function getPage($targetUrl)
return new RolePage($this->version, $response, $this->solution);
}
+
/**
* Constructs a RoleContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Chat\V1\Service\RoleContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the Role resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): RoleContext
{
- return new RoleContext($this->version, $this->solution['serviceSid'], $sid);
+ return new RoleContext(
+ $this->version,
+ $this->solution['serviceSid'],
+ $sid
+ );
}
/**
@@ -170,8 +195,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V1.RoleList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/RolePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/RolePage.php
index d2ec040..861b266 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/RolePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/RolePage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return RoleInstance \Twilio\Rest\Chat\V1\Service\RoleInstance
+ */
+ public function buildInstance(array $payload): RoleInstance
{
return new RoleInstance($this->version, $payload, $this->solution['serviceSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V1.RolePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/User/UserChannelInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/User/UserChannelInstance.php
index 3335f19..4b01f99 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/User/UserChannelInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/User/UserChannelInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Chat\V1\Service\User;
use Twilio\Exceptions\TwilioException;
@@ -14,34 +22,33 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $channelSid
- * @property string $memberSid
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $channelSid
+ * @property string|null $memberSid
* @property string $status
- * @property int $lastConsumedMessageIndex
- * @property int $unreadMessagesCount
- * @property array $links
+ * @property int|null $lastConsumedMessageIndex
+ * @property int|null $unreadMessagesCount
+ * @property array|null $links
*/
class UserChannelInstance extends InstanceResource
{
/**
* Initialize the UserChannelInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $userSid The unique string that identifies the resource
- * @return \Twilio\Rest\Chat\V1\Service\User\UserChannelInstance
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from.
+ * @param string $userSid The SID of the [User](https://www.twilio.com/docs/api/chat/rest/users) to read the User Channel resources from.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $userSid)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $userSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
'channelSid' => Values::array_get($payload, 'channel_sid'),
@@ -50,9 +57,9 @@ public function __construct(Version $version, array $payload, $serviceSid, $user
'lastConsumedMessageIndex' => Values::array_get($payload, 'last_consumed_message_index'),
'unreadMessagesCount' => Values::array_get($payload, 'unread_messages_count'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('serviceSid' => $serviceSid, 'userSid' => $userSid,);
+ $this->solution = ['serviceSid' => $serviceSid, 'userSid' => $userSid, ];
}
/**
@@ -62,7 +69,7 @@ public function __construct(Version $version, array $payload, $serviceSid, $user
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -81,8 +88,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V1.UserChannelInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/User/UserChannelList.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/User/UserChannelList.php
index 69c65ff..bd406c4 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/User/UserChannelList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/User/UserChannelList.php
@@ -2,36 +2,75 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Chat\V1\Service\User;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class UserChannelList extends ListResource
-{
+ {
/**
* Construct the UserChannelList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $userSid The unique string that identifies the resource
- * @return \Twilio\Rest\Chat\V1\Service\User\UserChannelList
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from.
+ * @param string $userSid The SID of the [User](https://www.twilio.com/docs/api/chat/rest/users) to read the User Channel resources from.
*/
- public function __construct(Version $version, $serviceSid, $userSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid,
+ string $userSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'userSid' => $userSid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ 'userSid' =>
+ $userSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Users/' . \rawurlencode($userSid)
+ .'/Channels';
+ }
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Users/' . \rawurlencode($userSid) . '/Channels';
+ /**
+ * Reads UserChannelInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return UserChannelInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -50,9 +89,9 @@ public function __construct(Version $version, $serviceSid, $userSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -61,26 +100,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads UserChannelInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return UserChannelInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of UserChannelInstance records from the API.
* Request is executed immediately
@@ -88,21 +107,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of UserChannelInstance
+ * @return UserChannelPage Page of UserChannelInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): UserChannelPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new UserChannelPage($this->version, $response, $this->solution);
}
@@ -112,9 +132,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of UserChannelInstance
+ * @return UserChannelPage Page of UserChannelInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): UserChannelPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -124,13 +144,14 @@ public function getPage($targetUrl)
return new UserChannelPage($this->version, $response, $this->solution);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V1.UserChannelList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/User/UserChannelPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/User/UserChannelPage.php
index 0c12013..7399236 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/User/UserChannelPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/User/UserChannelPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return UserChannelInstance \Twilio\Rest\Chat\V1\Service\User\UserChannelInstance
+ */
+ public function buildInstance(array $payload): UserChannelInstance
{
- return new UserChannelInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['userSid']
- );
+ return new UserChannelInstance($this->version, $payload, $this->solution['serviceSid'], $this->solution['userSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V1.UserChannelPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/UserContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/UserContext.php
index 1f230be..2ea37c5 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/UserContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/UserContext.php
@@ -2,60 +2,89 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Chat\V1\Service;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Chat\V1\Service\User\UserChannelList;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Chat\V1\Service\User\UserChannelList;
+
/**
- * @property \Twilio\Rest\Chat\V1\Service\User\UserChannelList $userChannels
+ * @property UserChannelList $userChannels
*/
class UserContext extends InstanceContext
-{
- protected $_userChannels = null;
+ {
+ protected $_userChannels;
/**
* Initialize the UserContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the resource from
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Chat\V1\Service\UserContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under.
+ * @param string $sid The Twilio-provided string that uniquely identifies the User resource to delete.
*/
- public function __construct(Version $version, $serviceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Users/' . \rawurlencode($sid)
+ .'';
+ }
+
+ /**
+ * Delete the UserInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Users/' . \rawurlencode($sid) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a UserInstance
+ * Fetch the UserInstance
*
* @return UserInstance Fetched UserInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): UserInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new UserInstance(
$this->version,
@@ -65,16 +94,6 @@ public function fetch()
);
}
- /**
- * Deletes the UserInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Update the UserInstance
@@ -83,22 +102,22 @@ public function delete()
* @return UserInstance Updated UserInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): UserInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'RoleSid' => $options['roleSid'],
- 'Attributes' => $options['attributes'],
- 'FriendlyName' => $options['friendlyName'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'RoleSid' =>
+ $options['roleSid'],
+ 'Attributes' =>
+ $options['attributes'],
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new UserInstance(
$this->version,
@@ -108,12 +127,11 @@ public function update($options = array())
);
}
+
/**
* Access the userChannels
- *
- * @return \Twilio\Rest\Chat\V1\Service\User\UserChannelList
*/
- protected function getUserChannels()
+ protected function getUserChannels(): UserChannelList
{
if (!$this->_userChannels) {
$this->_userChannels = new UserChannelList(
@@ -130,10 +148,10 @@ protected function getUserChannels()
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -148,10 +166,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -166,12 +184,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Chat.V1.UserContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/UserInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/UserInstance.php
index 100f6d3..b08ed9c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/UserInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/UserInstance.php
@@ -2,56 +2,64 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Chat\V1\Service;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Chat\V1\Service\User\UserChannelList;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $attributes
- * @property string $friendlyName
- * @property string $roleSid
- * @property string $identity
- * @property bool $isOnline
- * @property bool $isNotifiable
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $attributes
+ * @property string|null $friendlyName
+ * @property string|null $roleSid
+ * @property string|null $identity
+ * @property bool|null $isOnline
+ * @property bool|null $isNotifiable
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
* @property int $joinedChannelsCount
- * @property array $links
- * @property string $url
+ * @property array|null $links
+ * @property string|null $url
*/
class UserInstance extends InstanceResource
{
- protected $_userChannels = null;
+ protected $_userChannels;
/**
* Initialize the UserInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Chat\V1\Service\UserInstance
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under.
+ * @param string $sid The Twilio-provided string that uniquely identifies the User resource to delete.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
@@ -66,19 +74,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $sid
'joinedChannelsCount' => Values::array_get($payload, 'joined_channels_count'),
'links' => Values::array_get($payload, 'links'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Chat\V1\Service\UserContext Context for this
- * UserInstance
+ * @return UserContext Context for this UserInstance
*/
- protected function proxy()
+ protected function proxy(): UserContext
{
if (!$this->context) {
$this->context = new UserContext(
@@ -92,25 +99,27 @@ protected function proxy()
}
/**
- * Fetch a UserInstance
+ * Delete the UserInstance
*
- * @return UserInstance Fetched UserInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the UserInstance
+ * Fetch the UserInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return UserInstance Fetched UserInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): UserInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -120,17 +129,16 @@ public function delete()
* @return UserInstance Updated UserInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): UserInstance
{
+
return $this->proxy()->update($options);
}
/**
* Access the userChannels
- *
- * @return \Twilio\Rest\Chat\V1\Service\User\UserChannelList
*/
- protected function getUserChannels()
+ protected function getUserChannels(): UserChannelList
{
return $this->proxy()->userChannels;
}
@@ -142,7 +150,7 @@ protected function getUserChannels()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -161,12 +169,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Chat.V1.UserInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/UserList.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/UserList.php
index a3f61f1..9b4bc93 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/UserList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/UserList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Chat\V1\Service;
@@ -12,57 +19,89 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class UserList extends ListResource
-{
+ {
/**
* Construct the UserList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @return \Twilio\Rest\Chat\V1\Service\UserList
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to create the resource under.
*/
- public function __construct(Version $version, $serviceSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Users';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Users';
}
/**
- * Create a new UserInstance
+ * Create the UserInstance
*
- * @param string $identity The `identity` value that identifies the new
- * resource's User
+ * @param string $identity The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/api/chat/rest/v1/user) within the [Service](https://www.twilio.com/docs/api/chat/rest/v1/service). This value is often a username or email address. See the Identity documentation for more details.
* @param array|Options $options Optional Arguments
- * @return UserInstance Newly created UserInstance
+ * @return UserInstance Created UserInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($identity, $options = array())
+ public function create(string $identity, array $options = []): UserInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'Identity' => $identity,
- 'RoleSid' => $options['roleSid'],
- 'Attributes' => $options['attributes'],
- 'FriendlyName' => $options['friendlyName'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'Identity' =>
+ $identity,
+ 'RoleSid' =>
+ $options['roleSid'],
+ 'Attributes' =>
+ $options['attributes'],
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new UserInstance(
+ $this->version,
+ $payload,
+ $this->solution['serviceSid']
);
+ }
- return new UserInstance($this->version, $payload, $this->solution['serviceSid']);
+
+ /**
+ * Reads UserInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return UserInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -81,9 +120,9 @@ public function create($identity, $options = array())
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -92,26 +131,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads UserInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return UserInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of UserInstance records from the API.
* Request is executed immediately
@@ -119,21 +138,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of UserInstance
+ * @return UserPage Page of UserInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): UserPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new UserPage($this->version, $response, $this->solution);
}
@@ -143,9 +163,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of UserInstance
+ * @return UserPage Page of UserInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): UserPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -155,15 +175,22 @@ public function getPage($targetUrl)
return new UserPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a UserContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Chat\V1\Service\UserContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the User resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): UserContext
{
- return new UserContext($this->version, $this->solution['serviceSid'], $sid);
+ return new UserContext(
+ $this->version,
+ $this->solution['serviceSid'],
+ $sid
+ );
}
/**
@@ -171,8 +198,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V1.UserList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/UserOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/UserOptions.php
index e64393b..3fb4738 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/UserOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/UserOptions.php
@@ -1,10 +1,16 @@
options['roleSid'] = $roleSid;
$this->options['attributes'] = $attributes;
$this->options['friendlyName'] = $friendlyName;
@@ -57,10 +89,10 @@ public function __construct($roleSid = Values::NONE, $attributes = Values::NONE,
/**
* The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to the new User.
*
- * @param string $roleSid The SID of the Role assigned to this user
+ * @param string $roleSid The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to the new User.
* @return $this Fluent Builder
*/
- public function setRoleSid($roleSid)
+ public function setRoleSid(string $roleSid): self
{
$this->options['roleSid'] = $roleSid;
return $this;
@@ -69,11 +101,10 @@ public function setRoleSid($roleSid)
/**
* A valid JSON string that contains application-specific data.
*
- * @param string $attributes A valid JSON string that contains
- * application-specific data
+ * @param string $attributes A valid JSON string that contains application-specific data.
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setAttributes(string $attributes): self
{
$this->options['attributes'] = $attributes;
return $this;
@@ -82,10 +113,10 @@ public function setAttributes($attributes)
/**
* A descriptive string that you create to describe the new resource. This value is often used for display purposes.
*
- * @param string $friendlyName A string to describe the new resource
+ * @param string $friendlyName A descriptive string that you create to describe the new resource. This value is often used for display purposes.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -96,28 +127,30 @@ public function setFriendlyName($friendlyName)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Chat.V1.CreateUserOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Chat.V1.CreateUserOptions ' . $options . ']';
}
}
+
+
+
class UpdateUserOptions extends Options
-{
+ {
/**
- * @param string $roleSid The SID id of the Role assigned to this user
- * @param string $attributes A valid JSON string that contains
- * application-specific data
- * @param string $friendlyName A string to describe the resource
+ * @param string $roleSid The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to this user.
+ * @param string $attributes A valid JSON string that contains application-specific data.
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It is often used for display purposes.
*/
- public function __construct($roleSid = Values::NONE, $attributes = Values::NONE, $friendlyName = Values::NONE)
- {
+ public function __construct(
+
+ string $roleSid = Values::NONE,
+ string $attributes = Values::NONE,
+ string $friendlyName = Values::NONE
+
+ ) {
$this->options['roleSid'] = $roleSid;
$this->options['attributes'] = $attributes;
$this->options['friendlyName'] = $friendlyName;
@@ -126,10 +159,10 @@ public function __construct($roleSid = Values::NONE, $attributes = Values::NONE,
/**
* The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to this user.
*
- * @param string $roleSid The SID id of the Role assigned to this user
+ * @param string $roleSid The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to this user.
* @return $this Fluent Builder
*/
- public function setRoleSid($roleSid)
+ public function setRoleSid(string $roleSid): self
{
$this->options['roleSid'] = $roleSid;
return $this;
@@ -138,11 +171,10 @@ public function setRoleSid($roleSid)
/**
* A valid JSON string that contains application-specific data.
*
- * @param string $attributes A valid JSON string that contains
- * application-specific data
+ * @param string $attributes A valid JSON string that contains application-specific data.
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setAttributes(string $attributes): self
{
$this->options['attributes'] = $attributes;
return $this;
@@ -151,10 +183,10 @@ public function setAttributes($attributes)
/**
* A descriptive string that you create to describe the resource. It is often used for display purposes.
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It is often used for display purposes.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -165,14 +197,10 @@ public function setFriendlyName($friendlyName)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Chat.V1.UpdateUserOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Chat.V1.UpdateUserOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/UserPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/UserPage.php
index 0ac5d77..e439d88 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/UserPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/Service/UserPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return UserInstance \Twilio\Rest\Chat\V1\Service\UserInstance
+ */
+ public function buildInstance(array $payload): UserInstance
{
return new UserInstance($this->version, $payload, $this->solution['serviceSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V1.UserPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/ServiceContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/ServiceContext.php
index 45bd9b9..5aaa466 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/ServiceContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/ServiceContext.php
@@ -2,84 +2,103 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Chat\V1;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
+use Twilio\Values;
+use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
use Twilio\Rest\Chat\V1\Service\ChannelList;
use Twilio\Rest\Chat\V1\Service\RoleList;
use Twilio\Rest\Chat\V1\Service\UserList;
-use Twilio\Serialize;
-use Twilio\Values;
-use Twilio\Version;
+
/**
- * @property \Twilio\Rest\Chat\V1\Service\ChannelList $channels
- * @property \Twilio\Rest\Chat\V1\Service\RoleList $roles
- * @property \Twilio\Rest\Chat\V1\Service\UserList $users
+ * @property ChannelList $channels
+ * @property RoleList $roles
+ * @property UserList $users
* @method \Twilio\Rest\Chat\V1\Service\ChannelContext channels(string $sid)
* @method \Twilio\Rest\Chat\V1\Service\RoleContext roles(string $sid)
* @method \Twilio\Rest\Chat\V1\Service\UserContext users(string $sid)
*/
class ServiceContext extends InstanceContext
-{
- protected $_channels = null;
- protected $_roles = null;
- protected $_users = null;
+ {
+ protected $_channels;
+ protected $_roles;
+ protected $_users;
/**
* Initialize the ServiceContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Chat\V1\ServiceContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid The Twilio-provided string that uniquely identifies the Service resource to delete.
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Services/' . \rawurlencode($sid) . '';
+ $this->uri = '/Services/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a ServiceInstance
+ * Delete the ServiceInstance
*
- * @return ServiceInstance Fetched ServiceInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
- return new ServiceInstance($this->version, $payload, $this->solution['sid']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Deletes the ServiceInstance
+ * Fetch the ServiceInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return ServiceInstance Fetched ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): ServiceInstance
{
- return $this->version->delete('delete', $this->uri);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
+
+ return new ServiceInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Update the ServiceInstance
*
@@ -87,88 +106,143 @@ public function delete()
* @return ServiceInstance Updated ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ServiceInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'DefaultServiceRoleSid' => $options['defaultServiceRoleSid'],
- 'DefaultChannelRoleSid' => $options['defaultChannelRoleSid'],
- 'DefaultChannelCreatorRoleSid' => $options['defaultChannelCreatorRoleSid'],
- 'ReadStatusEnabled' => Serialize::booleanToString($options['readStatusEnabled']),
- 'ReachabilityEnabled' => Serialize::booleanToString($options['reachabilityEnabled']),
- 'TypingIndicatorTimeout' => $options['typingIndicatorTimeout'],
- 'ConsumptionReportInterval' => $options['consumptionReportInterval'],
- 'Notifications.NewMessage.Enabled' => Serialize::booleanToString($options['notificationsNewMessageEnabled']),
- 'Notifications.NewMessage.Template' => $options['notificationsNewMessageTemplate'],
- 'Notifications.AddedToChannel.Enabled' => Serialize::booleanToString($options['notificationsAddedToChannelEnabled']),
- 'Notifications.AddedToChannel.Template' => $options['notificationsAddedToChannelTemplate'],
- 'Notifications.RemovedFromChannel.Enabled' => Serialize::booleanToString($options['notificationsRemovedFromChannelEnabled']),
- 'Notifications.RemovedFromChannel.Template' => $options['notificationsRemovedFromChannelTemplate'],
- 'Notifications.InvitedToChannel.Enabled' => Serialize::booleanToString($options['notificationsInvitedToChannelEnabled']),
- 'Notifications.InvitedToChannel.Template' => $options['notificationsInvitedToChannelTemplate'],
- 'PreWebhookUrl' => $options['preWebhookUrl'],
- 'PostWebhookUrl' => $options['postWebhookUrl'],
- 'WebhookMethod' => $options['webhookMethod'],
- 'WebhookFilters' => Serialize::map($options['webhookFilters'], function ($e) {
- return $e;
- }),
- 'Webhooks.OnMessageSend.Url' => $options['webhooksOnMessageSendUrl'],
- 'Webhooks.OnMessageSend.Method' => $options['webhooksOnMessageSendMethod'],
- 'Webhooks.OnMessageUpdate.Url' => $options['webhooksOnMessageUpdateUrl'],
- 'Webhooks.OnMessageUpdate.Method' => $options['webhooksOnMessageUpdateMethod'],
- 'Webhooks.OnMessageRemove.Url' => $options['webhooksOnMessageRemoveUrl'],
- 'Webhooks.OnMessageRemove.Method' => $options['webhooksOnMessageRemoveMethod'],
- 'Webhooks.OnChannelAdd.Url' => $options['webhooksOnChannelAddUrl'],
- 'Webhooks.OnChannelAdd.Method' => $options['webhooksOnChannelAddMethod'],
- 'Webhooks.OnChannelDestroy.Url' => $options['webhooksOnChannelDestroyUrl'],
- 'Webhooks.OnChannelDestroy.Method' => $options['webhooksOnChannelDestroyMethod'],
- 'Webhooks.OnChannelUpdate.Url' => $options['webhooksOnChannelUpdateUrl'],
- 'Webhooks.OnChannelUpdate.Method' => $options['webhooksOnChannelUpdateMethod'],
- 'Webhooks.OnMemberAdd.Url' => $options['webhooksOnMemberAddUrl'],
- 'Webhooks.OnMemberAdd.Method' => $options['webhooksOnMemberAddMethod'],
- 'Webhooks.OnMemberRemove.Url' => $options['webhooksOnMemberRemoveUrl'],
- 'Webhooks.OnMemberRemove.Method' => $options['webhooksOnMemberRemoveMethod'],
- 'Webhooks.OnMessageSent.Url' => $options['webhooksOnMessageSentUrl'],
- 'Webhooks.OnMessageSent.Method' => $options['webhooksOnMessageSentMethod'],
- 'Webhooks.OnMessageUpdated.Url' => $options['webhooksOnMessageUpdatedUrl'],
- 'Webhooks.OnMessageUpdated.Method' => $options['webhooksOnMessageUpdatedMethod'],
- 'Webhooks.OnMessageRemoved.Url' => $options['webhooksOnMessageRemovedUrl'],
- 'Webhooks.OnMessageRemoved.Method' => $options['webhooksOnMessageRemovedMethod'],
- 'Webhooks.OnChannelAdded.Url' => $options['webhooksOnChannelAddedUrl'],
- 'Webhooks.OnChannelAdded.Method' => $options['webhooksOnChannelAddedMethod'],
- 'Webhooks.OnChannelDestroyed.Url' => $options['webhooksOnChannelDestroyedUrl'],
- 'Webhooks.OnChannelDestroyed.Method' => $options['webhooksOnChannelDestroyedMethod'],
- 'Webhooks.OnChannelUpdated.Url' => $options['webhooksOnChannelUpdatedUrl'],
- 'Webhooks.OnChannelUpdated.Method' => $options['webhooksOnChannelUpdatedMethod'],
- 'Webhooks.OnMemberAdded.Url' => $options['webhooksOnMemberAddedUrl'],
- 'Webhooks.OnMemberAdded.Method' => $options['webhooksOnMemberAddedMethod'],
- 'Webhooks.OnMemberRemoved.Url' => $options['webhooksOnMemberRemovedUrl'],
- 'Webhooks.OnMemberRemoved.Method' => $options['webhooksOnMemberRemovedMethod'],
- 'Limits.ChannelMembers' => $options['limitsChannelMembers'],
- 'Limits.UserChannels' => $options['limitsUserChannels'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'DefaultServiceRoleSid' =>
+ $options['defaultServiceRoleSid'],
+ 'DefaultChannelRoleSid' =>
+ $options['defaultChannelRoleSid'],
+ 'DefaultChannelCreatorRoleSid' =>
+ $options['defaultChannelCreatorRoleSid'],
+ 'ReadStatusEnabled' =>
+ Serialize::booleanToString($options['readStatusEnabled']),
+ 'ReachabilityEnabled' =>
+ Serialize::booleanToString($options['reachabilityEnabled']),
+ 'TypingIndicatorTimeout' =>
+ $options['typingIndicatorTimeout'],
+ 'ConsumptionReportInterval' =>
+ $options['consumptionReportInterval'],
+ 'Notifications.NewMessage.Enabled' =>
+ Serialize::booleanToString($options['notificationsNewMessageEnabled']),
+ 'Notifications.NewMessage.Template' =>
+ $options['notificationsNewMessageTemplate'],
+ 'Notifications.AddedToChannel.Enabled' =>
+ Serialize::booleanToString($options['notificationsAddedToChannelEnabled']),
+ 'Notifications.AddedToChannel.Template' =>
+ $options['notificationsAddedToChannelTemplate'],
+ 'Notifications.RemovedFromChannel.Enabled' =>
+ Serialize::booleanToString($options['notificationsRemovedFromChannelEnabled']),
+ 'Notifications.RemovedFromChannel.Template' =>
+ $options['notificationsRemovedFromChannelTemplate'],
+ 'Notifications.InvitedToChannel.Enabled' =>
+ Serialize::booleanToString($options['notificationsInvitedToChannelEnabled']),
+ 'Notifications.InvitedToChannel.Template' =>
+ $options['notificationsInvitedToChannelTemplate'],
+ 'PreWebhookUrl' =>
+ $options['preWebhookUrl'],
+ 'PostWebhookUrl' =>
+ $options['postWebhookUrl'],
+ 'WebhookMethod' =>
+ $options['webhookMethod'],
+ 'WebhookFilters' =>
+ Serialize::map($options['webhookFilters'], function ($e) { return $e; }),
+ 'Webhooks.OnMessageSend.Url' =>
+ $options['webhooksOnMessageSendUrl'],
+ 'Webhooks.OnMessageSend.Method' =>
+ $options['webhooksOnMessageSendMethod'],
+ 'Webhooks.OnMessageUpdate.Url' =>
+ $options['webhooksOnMessageUpdateUrl'],
+ 'Webhooks.OnMessageUpdate.Method' =>
+ $options['webhooksOnMessageUpdateMethod'],
+ 'Webhooks.OnMessageRemove.Url' =>
+ $options['webhooksOnMessageRemoveUrl'],
+ 'Webhooks.OnMessageRemove.Method' =>
+ $options['webhooksOnMessageRemoveMethod'],
+ 'Webhooks.OnChannelAdd.Url' =>
+ $options['webhooksOnChannelAddUrl'],
+ 'Webhooks.OnChannelAdd.Method' =>
+ $options['webhooksOnChannelAddMethod'],
+ 'Webhooks.OnChannelDestroy.Url' =>
+ $options['webhooksOnChannelDestroyUrl'],
+ 'Webhooks.OnChannelDestroy.Method' =>
+ $options['webhooksOnChannelDestroyMethod'],
+ 'Webhooks.OnChannelUpdate.Url' =>
+ $options['webhooksOnChannelUpdateUrl'],
+ 'Webhooks.OnChannelUpdate.Method' =>
+ $options['webhooksOnChannelUpdateMethod'],
+ 'Webhooks.OnMemberAdd.Url' =>
+ $options['webhooksOnMemberAddUrl'],
+ 'Webhooks.OnMemberAdd.Method' =>
+ $options['webhooksOnMemberAddMethod'],
+ 'Webhooks.OnMemberRemove.Url' =>
+ $options['webhooksOnMemberRemoveUrl'],
+ 'Webhooks.OnMemberRemove.Method' =>
+ $options['webhooksOnMemberRemoveMethod'],
+ 'Webhooks.OnMessageSent.Url' =>
+ $options['webhooksOnMessageSentUrl'],
+ 'Webhooks.OnMessageSent.Method' =>
+ $options['webhooksOnMessageSentMethod'],
+ 'Webhooks.OnMessageUpdated.Url' =>
+ $options['webhooksOnMessageUpdatedUrl'],
+ 'Webhooks.OnMessageUpdated.Method' =>
+ $options['webhooksOnMessageUpdatedMethod'],
+ 'Webhooks.OnMessageRemoved.Url' =>
+ $options['webhooksOnMessageRemovedUrl'],
+ 'Webhooks.OnMessageRemoved.Method' =>
+ $options['webhooksOnMessageRemovedMethod'],
+ 'Webhooks.OnChannelAdded.Url' =>
+ $options['webhooksOnChannelAddedUrl'],
+ 'Webhooks.OnChannelAdded.Method' =>
+ $options['webhooksOnChannelAddedMethod'],
+ 'Webhooks.OnChannelDestroyed.Url' =>
+ $options['webhooksOnChannelDestroyedUrl'],
+ 'Webhooks.OnChannelDestroyed.Method' =>
+ $options['webhooksOnChannelDestroyedMethod'],
+ 'Webhooks.OnChannelUpdated.Url' =>
+ $options['webhooksOnChannelUpdatedUrl'],
+ 'Webhooks.OnChannelUpdated.Method' =>
+ $options['webhooksOnChannelUpdatedMethod'],
+ 'Webhooks.OnMemberAdded.Url' =>
+ $options['webhooksOnMemberAddedUrl'],
+ 'Webhooks.OnMemberAdded.Method' =>
+ $options['webhooksOnMemberAddedMethod'],
+ 'Webhooks.OnMemberRemoved.Url' =>
+ $options['webhooksOnMemberRemovedUrl'],
+ 'Webhooks.OnMemberRemoved.Method' =>
+ $options['webhooksOnMemberRemovedMethod'],
+ 'Limits.ChannelMembers' =>
+ $options['limitsChannelMembers'],
+ 'Limits.UserChannels' =>
+ $options['limitsUserChannels'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
- return new ServiceInstance($this->version, $payload, $this->solution['sid']);
+ return new ServiceInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Access the channels
- *
- * @return \Twilio\Rest\Chat\V1\Service\ChannelList
*/
- protected function getChannels()
+ protected function getChannels(): ChannelList
{
if (!$this->_channels) {
- $this->_channels = new ChannelList($this->version, $this->solution['sid']);
+ $this->_channels = new ChannelList(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->_channels;
@@ -176,13 +250,14 @@ protected function getChannels()
/**
* Access the roles
- *
- * @return \Twilio\Rest\Chat\V1\Service\RoleList
*/
- protected function getRoles()
+ protected function getRoles(): RoleList
{
if (!$this->_roles) {
- $this->_roles = new RoleList($this->version, $this->solution['sid']);
+ $this->_roles = new RoleList(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->_roles;
@@ -190,13 +265,14 @@ protected function getRoles()
/**
* Access the users
- *
- * @return \Twilio\Rest\Chat\V1\Service\UserList
*/
- protected function getUsers()
+ protected function getUsers(): UserList
{
if (!$this->_users) {
- $this->_users = new UserList($this->version, $this->solution['sid']);
+ $this->_users = new UserList(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->_users;
@@ -206,10 +282,10 @@ protected function getUsers()
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -224,10 +300,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -242,12 +318,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Chat.V1.ServiceContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/ServiceInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/ServiceInstance.php
index bc98180..f52f547 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/ServiceInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/ServiceInstance.php
@@ -2,63 +2,74 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Chat\V1;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Chat\V1\Service\ChannelList;
+use Twilio\Rest\Chat\V1\Service\RoleList;
+use Twilio\Rest\Chat\V1\Service\UserList;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $friendlyName
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $defaultServiceRoleSid
- * @property string $defaultChannelRoleSid
- * @property string $defaultChannelCreatorRoleSid
- * @property bool $readStatusEnabled
- * @property bool $reachabilityEnabled
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $friendlyName
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $defaultServiceRoleSid
+ * @property string|null $defaultChannelRoleSid
+ * @property string|null $defaultChannelCreatorRoleSid
+ * @property bool|null $readStatusEnabled
+ * @property bool|null $reachabilityEnabled
* @property int $typingIndicatorTimeout
* @property int $consumptionReportInterval
- * @property array $limits
- * @property array $webhooks
- * @property string $preWebhookUrl
- * @property string $postWebhookUrl
- * @property string $webhookMethod
- * @property string $webhookFilters
- * @property array $notifications
- * @property string $url
- * @property array $links
+ * @property array|null $limits
+ * @property array|null $webhooks
+ * @property string|null $preWebhookUrl
+ * @property string|null $postWebhookUrl
+ * @property string|null $webhookMethod
+ * @property string[]|null $webhookFilters
+ * @property array|null $notifications
+ * @property string|null $url
+ * @property array|null $links
*/
class ServiceInstance extends InstanceResource
{
- protected $_channels = null;
- protected $_roles = null;
- protected $_users = null;
+ protected $_channels;
+ protected $_roles;
+ protected $_users;
/**
* Initialize the ServiceInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Chat\V1\ServiceInstance
+ * @param string $sid The Twilio-provided string that uniquely identifies the Service resource to delete.
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
@@ -80,46 +91,51 @@ public function __construct(Version $version, array $payload, $sid = null)
'notifications' => Values::array_get($payload, 'notifications'),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Chat\V1\ServiceContext Context for this ServiceInstance
+ * @return ServiceContext Context for this ServiceInstance
*/
- protected function proxy()
+ protected function proxy(): ServiceContext
{
if (!$this->context) {
- $this->context = new ServiceContext($this->version, $this->solution['sid']);
+ $this->context = new ServiceContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a ServiceInstance
+ * Delete the ServiceInstance
*
- * @return ServiceInstance Fetched ServiceInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the ServiceInstance
+ * Fetch the ServiceInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return ServiceInstance Fetched ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): ServiceInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -129,37 +145,32 @@ public function delete()
* @return ServiceInstance Updated ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ServiceInstance
{
+
return $this->proxy()->update($options);
}
/**
* Access the channels
- *
- * @return \Twilio\Rest\Chat\V1\Service\ChannelList
*/
- protected function getChannels()
+ protected function getChannels(): ChannelList
{
return $this->proxy()->channels;
}
/**
* Access the roles
- *
- * @return \Twilio\Rest\Chat\V1\Service\RoleList
*/
- protected function getRoles()
+ protected function getRoles(): RoleList
{
return $this->proxy()->roles;
}
/**
* Access the users
- *
- * @return \Twilio\Rest\Chat\V1\Service\UserList
*/
- protected function getUsers()
+ protected function getUsers(): UserList
{
return $this->proxy()->users;
}
@@ -171,7 +182,7 @@ protected function getUsers()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -190,12 +201,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Chat.V1.ServiceInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/ServiceList.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/ServiceList.php
index c372939..e968dcf 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/ServiceList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/ServiceList.php
@@ -2,55 +2,89 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Chat\V1;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class ServiceList extends ListResource
-{
+ {
/**
* Construct the ServiceList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Chat\V1\ServiceList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/Services';
}
/**
- * Create a new ServiceInstance
+ * Create the ServiceInstance
*
- * @param string $friendlyName A string to describe the resource
- * @return ServiceInstance Newly created ServiceInstance
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
+ * @return ServiceInstance Created ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($friendlyName)
+ public function create(string $friendlyName): ServiceInstance
{
- $data = Values::of(array('FriendlyName' => $friendlyName,));
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'FriendlyName' =>
+ $friendlyName,
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new ServiceInstance(
+ $this->version,
+ $payload
);
+ }
- return new ServiceInstance($this->version, $payload);
+
+ /**
+ * Reads ServiceInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return ServiceInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -69,9 +103,9 @@ public function create($friendlyName)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -80,26 +114,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads ServiceInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return ServiceInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of ServiceInstance records from the API.
* Request is executed immediately
@@ -107,21 +121,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of ServiceInstance
+ * @return ServicePage Page of ServiceInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): ServicePage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new ServicePage($this->version, $response, $this->solution);
}
@@ -131,9 +146,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of ServiceInstance
+ * @return ServicePage Page of ServiceInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): ServicePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -143,15 +158,21 @@ public function getPage($targetUrl)
return new ServicePage($this->version, $response, $this->solution);
}
+
/**
* Constructs a ServiceContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Chat\V1\ServiceContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the Service resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): ServiceContext
{
- return new ServiceContext($this->version, $sid);
+ return new ServiceContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -159,8 +180,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V1.ServiceList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/ServiceOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/ServiceOptions.php
index bb4af60..1068d53 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/ServiceOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/ServiceOptions.php
@@ -1,10 +1,16 @@
options['friendlyName'] = $friendlyName;
$this->options['defaultServiceRoleSid'] = $defaultServiceRoleSid;
$this->options['defaultChannelRoleSid'] = $defaultChannelRoleSid;
@@ -384,10 +379,10 @@ public function __construct($friendlyName = Values::NONE, $defaultServiceRoleSid
/**
* A descriptive string that you create to describe the resource. It can be up to 64 characters long.
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -396,11 +391,10 @@ public function setFriendlyName($friendlyName)
/**
* The service role assigned to users when they are added to the service. See the [Roles endpoint](https://www.twilio.com/docs/chat/api/roles) for more details.
*
- * @param string $defaultServiceRoleSid The service role assigned to users when
- * they are added to the service
+ * @param string $defaultServiceRoleSid The service role assigned to users when they are added to the service. See the [Roles endpoint](https://www.twilio.com/docs/chat/api/roles) for more details.
* @return $this Fluent Builder
*/
- public function setDefaultServiceRoleSid($defaultServiceRoleSid)
+ public function setDefaultServiceRoleSid(string $defaultServiceRoleSid): self
{
$this->options['defaultServiceRoleSid'] = $defaultServiceRoleSid;
return $this;
@@ -409,11 +403,10 @@ public function setDefaultServiceRoleSid($defaultServiceRoleSid)
/**
* The channel role assigned to users when they are added to a channel. See the [Roles endpoint](https://www.twilio.com/docs/chat/api/roles) for more details.
*
- * @param string $defaultChannelRoleSid The channel role assigned to users when
- * they are added to a channel
+ * @param string $defaultChannelRoleSid The channel role assigned to users when they are added to a channel. See the [Roles endpoint](https://www.twilio.com/docs/chat/api/roles) for more details.
* @return $this Fluent Builder
*/
- public function setDefaultChannelRoleSid($defaultChannelRoleSid)
+ public function setDefaultChannelRoleSid(string $defaultChannelRoleSid): self
{
$this->options['defaultChannelRoleSid'] = $defaultChannelRoleSid;
return $this;
@@ -422,12 +415,10 @@ public function setDefaultChannelRoleSid($defaultChannelRoleSid)
/**
* The channel role assigned to a channel creator when they join a new channel. See the [Roles endpoint](https://www.twilio.com/docs/chat/api/roles) for more details.
*
- * @param string $defaultChannelCreatorRoleSid The channel role assigned to a
- * channel creator when they join a
- * new channel
+ * @param string $defaultChannelCreatorRoleSid The channel role assigned to a channel creator when they join a new channel. See the [Roles endpoint](https://www.twilio.com/docs/chat/api/roles) for more details.
* @return $this Fluent Builder
*/
- public function setDefaultChannelCreatorRoleSid($defaultChannelCreatorRoleSid)
+ public function setDefaultChannelCreatorRoleSid(string $defaultChannelCreatorRoleSid): self
{
$this->options['defaultChannelCreatorRoleSid'] = $defaultChannelCreatorRoleSid;
return $this;
@@ -436,11 +427,10 @@ public function setDefaultChannelCreatorRoleSid($defaultChannelCreatorRoleSid)
/**
* Whether to enable the [Message Consumption Horizon](https://www.twilio.com/docs/chat/consumption-horizon) feature. The default is `true`.
*
- * @param bool $readStatusEnabled Whether to enable the Message Consumption
- * Horizon feature
+ * @param bool $readStatusEnabled Whether to enable the [Message Consumption Horizon](https://www.twilio.com/docs/chat/consumption-horizon) feature. The default is `true`.
* @return $this Fluent Builder
*/
- public function setReadStatusEnabled($readStatusEnabled)
+ public function setReadStatusEnabled(bool $readStatusEnabled): self
{
$this->options['readStatusEnabled'] = $readStatusEnabled;
return $this;
@@ -449,11 +439,10 @@ public function setReadStatusEnabled($readStatusEnabled)
/**
* Whether to enable the [Reachability Indicator](https://www.twilio.com/docs/chat/reachability-indicator) for this Service instance. The default is `false`.
*
- * @param bool $reachabilityEnabled Whether to enable the Reachability
- * Indicator feature for this Service instance
+ * @param bool $reachabilityEnabled Whether to enable the [Reachability Indicator](https://www.twilio.com/docs/chat/reachability-indicator) for this Service instance. The default is `false`.
* @return $this Fluent Builder
*/
- public function setReachabilityEnabled($reachabilityEnabled)
+ public function setReachabilityEnabled(bool $reachabilityEnabled): self
{
$this->options['reachabilityEnabled'] = $reachabilityEnabled;
return $this;
@@ -462,11 +451,10 @@ public function setReachabilityEnabled($reachabilityEnabled)
/**
* How long in seconds after a `started typing` event until clients should assume that user is no longer typing, even if no `ended typing` message was received. The default is 5 seconds.
*
- * @param int $typingIndicatorTimeout How long in seconds to wait before
- * assuming the user is no longer typing
+ * @param int $typingIndicatorTimeout How long in seconds after a `started typing` event until clients should assume that user is no longer typing, even if no `ended typing` message was received. The default is 5 seconds.
* @return $this Fluent Builder
*/
- public function setTypingIndicatorTimeout($typingIndicatorTimeout)
+ public function setTypingIndicatorTimeout(int $typingIndicatorTimeout): self
{
$this->options['typingIndicatorTimeout'] = $typingIndicatorTimeout;
return $this;
@@ -475,10 +463,10 @@ public function setTypingIndicatorTimeout($typingIndicatorTimeout)
/**
* DEPRECATED. The interval in seconds between consumption reports submission batches from client endpoints.
*
- * @param int $consumptionReportInterval DEPRECATED
+ * @param int $consumptionReportInterval DEPRECATED. The interval in seconds between consumption reports submission batches from client endpoints.
* @return $this Fluent Builder
*/
- public function setConsumptionReportInterval($consumptionReportInterval)
+ public function setConsumptionReportInterval(int $consumptionReportInterval): self
{
$this->options['consumptionReportInterval'] = $consumptionReportInterval;
return $this;
@@ -487,12 +475,10 @@ public function setConsumptionReportInterval($consumptionReportInterval)
/**
* Whether to send a notification when a new message is added to a channel. Can be: `true` or `false` and the default is `false`.
*
- * @param bool $notificationsNewMessageEnabled Whether to send a notification
- * when a new message is added to a
- * channel
+ * @param bool $notificationsNewMessageEnabled Whether to send a notification when a new message is added to a channel. Can be: `true` or `false` and the default is `false`.
* @return $this Fluent Builder
*/
- public function setNotificationsNewMessageEnabled($notificationsNewMessageEnabled)
+ public function setNotificationsNewMessageEnabled(bool $notificationsNewMessageEnabled): self
{
$this->options['notificationsNewMessageEnabled'] = $notificationsNewMessageEnabled;
return $this;
@@ -501,13 +487,10 @@ public function setNotificationsNewMessageEnabled($notificationsNewMessageEnable
/**
* The template to use to create the notification text displayed when a new message is added to a channel and `notifications.new_message.enabled` is `true`.
*
- * @param string $notificationsNewMessageTemplate The template to use to create
- * the notification text
- * displayed when a new message
- * is added to a channel
+ * @param string $notificationsNewMessageTemplate The template to use to create the notification text displayed when a new message is added to a channel and `notifications.new_message.enabled` is `true`.
* @return $this Fluent Builder
*/
- public function setNotificationsNewMessageTemplate($notificationsNewMessageTemplate)
+ public function setNotificationsNewMessageTemplate(string $notificationsNewMessageTemplate): self
{
$this->options['notificationsNewMessageTemplate'] = $notificationsNewMessageTemplate;
return $this;
@@ -516,12 +499,10 @@ public function setNotificationsNewMessageTemplate($notificationsNewMessageTempl
/**
* Whether to send a notification when a member is added to a channel. Can be: `true` or `false` and the default is `false`.
*
- * @param bool $notificationsAddedToChannelEnabled Whether to send a
- * notification when a member
- * is added to a channel
+ * @param bool $notificationsAddedToChannelEnabled Whether to send a notification when a member is added to a channel. Can be: `true` or `false` and the default is `false`.
* @return $this Fluent Builder
*/
- public function setNotificationsAddedToChannelEnabled($notificationsAddedToChannelEnabled)
+ public function setNotificationsAddedToChannelEnabled(bool $notificationsAddedToChannelEnabled): self
{
$this->options['notificationsAddedToChannelEnabled'] = $notificationsAddedToChannelEnabled;
return $this;
@@ -530,14 +511,10 @@ public function setNotificationsAddedToChannelEnabled($notificationsAddedToChann
/**
* The template to use to create the notification text displayed when a member is added to a channel and `notifications.added_to_channel.enabled` is `true`.
*
- * @param string $notificationsAddedToChannelTemplate The template to use to
- * create the notification
- * text displayed when a
- * member is added to a
- * channel
+ * @param string $notificationsAddedToChannelTemplate The template to use to create the notification text displayed when a member is added to a channel and `notifications.added_to_channel.enabled` is `true`.
* @return $this Fluent Builder
*/
- public function setNotificationsAddedToChannelTemplate($notificationsAddedToChannelTemplate)
+ public function setNotificationsAddedToChannelTemplate(string $notificationsAddedToChannelTemplate): self
{
$this->options['notificationsAddedToChannelTemplate'] = $notificationsAddedToChannelTemplate;
return $this;
@@ -546,13 +523,10 @@ public function setNotificationsAddedToChannelTemplate($notificationsAddedToChan
/**
* Whether to send a notification to a user when they are removed from a channel. Can be: `true` or `false` and the default is `false`.
*
- * @param bool $notificationsRemovedFromChannelEnabled Whether to send a
- * notification to a user
- * when they are removed
- * from a channel
+ * @param bool $notificationsRemovedFromChannelEnabled Whether to send a notification to a user when they are removed from a channel. Can be: `true` or `false` and the default is `false`.
* @return $this Fluent Builder
*/
- public function setNotificationsRemovedFromChannelEnabled($notificationsRemovedFromChannelEnabled)
+ public function setNotificationsRemovedFromChannelEnabled(bool $notificationsRemovedFromChannelEnabled): self
{
$this->options['notificationsRemovedFromChannelEnabled'] = $notificationsRemovedFromChannelEnabled;
return $this;
@@ -561,14 +535,10 @@ public function setNotificationsRemovedFromChannelEnabled($notificationsRemovedF
/**
* The template to use to create the notification text displayed to a user when they are removed from a channel and `notifications.removed_from_channel.enabled` is `true`.
*
- * @param string $notificationsRemovedFromChannelTemplate The template to use
- * to create the
- * notification text
- * displayed to a user
- * when they are removed
+ * @param string $notificationsRemovedFromChannelTemplate The template to use to create the notification text displayed to a user when they are removed from a channel and `notifications.removed_from_channel.enabled` is `true`.
* @return $this Fluent Builder
*/
- public function setNotificationsRemovedFromChannelTemplate($notificationsRemovedFromChannelTemplate)
+ public function setNotificationsRemovedFromChannelTemplate(string $notificationsRemovedFromChannelTemplate): self
{
$this->options['notificationsRemovedFromChannelTemplate'] = $notificationsRemovedFromChannelTemplate;
return $this;
@@ -577,12 +547,10 @@ public function setNotificationsRemovedFromChannelTemplate($notificationsRemoved
/**
* Whether to send a notification when a user is invited to a channel. Can be: `true` or `false` and the default is `false`.
*
- * @param bool $notificationsInvitedToChannelEnabled Whether to send a
- * notification when a user
- * is invited to a channel
+ * @param bool $notificationsInvitedToChannelEnabled Whether to send a notification when a user is invited to a channel. Can be: `true` or `false` and the default is `false`.
* @return $this Fluent Builder
*/
- public function setNotificationsInvitedToChannelEnabled($notificationsInvitedToChannelEnabled)
+ public function setNotificationsInvitedToChannelEnabled(bool $notificationsInvitedToChannelEnabled): self
{
$this->options['notificationsInvitedToChannelEnabled'] = $notificationsInvitedToChannelEnabled;
return $this;
@@ -591,14 +559,10 @@ public function setNotificationsInvitedToChannelEnabled($notificationsInvitedToC
/**
* The template to use to create the notification text displayed when a user is invited to a channel and `notifications.invited_to_channel.enabled` is `true`.
*
- * @param string $notificationsInvitedToChannelTemplate The template to use to
- * create the notification
- * text displayed when a
- * user is invited to a
- * channel
+ * @param string $notificationsInvitedToChannelTemplate The template to use to create the notification text displayed when a user is invited to a channel and `notifications.invited_to_channel.enabled` is `true`.
* @return $this Fluent Builder
*/
- public function setNotificationsInvitedToChannelTemplate($notificationsInvitedToChannelTemplate)
+ public function setNotificationsInvitedToChannelTemplate(string $notificationsInvitedToChannelTemplate): self
{
$this->options['notificationsInvitedToChannelTemplate'] = $notificationsInvitedToChannelTemplate;
return $this;
@@ -607,10 +571,10 @@ public function setNotificationsInvitedToChannelTemplate($notificationsInvitedTo
/**
* The URL for pre-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/api/chat/webhooks) for more details.
*
- * @param string $preWebhookUrl The webhook URL for pre-event webhooks
+ * @param string $preWebhookUrl The URL for pre-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/api/chat/webhooks) for more details.
* @return $this Fluent Builder
*/
- public function setPreWebhookUrl($preWebhookUrl)
+ public function setPreWebhookUrl(string $preWebhookUrl): self
{
$this->options['preWebhookUrl'] = $preWebhookUrl;
return $this;
@@ -619,10 +583,10 @@ public function setPreWebhookUrl($preWebhookUrl)
/**
* The URL for post-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/api/chat/webhooks) for more details.
*
- * @param string $postWebhookUrl The URL for post-event webhooks
+ * @param string $postWebhookUrl The URL for post-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/api/chat/webhooks) for more details.
* @return $this Fluent Builder
*/
- public function setPostWebhookUrl($postWebhookUrl)
+ public function setPostWebhookUrl(string $postWebhookUrl): self
{
$this->options['postWebhookUrl'] = $postWebhookUrl;
return $this;
@@ -631,11 +595,10 @@ public function setPostWebhookUrl($postWebhookUrl)
/**
* The HTTP method to use for calls to the `pre_webhook_url` and `post_webhook_url` webhooks. Can be: `POST` or `GET` and the default is `POST`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details.
*
- * @param string $webhookMethod The HTTP method to use for both PRE and POST
- * webhooks
+ * @param string $webhookMethod The HTTP method to use for calls to the `pre_webhook_url` and `post_webhook_url` webhooks. Can be: `POST` or `GET` and the default is `POST`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details.
* @return $this Fluent Builder
*/
- public function setWebhookMethod($webhookMethod)
+ public function setWebhookMethod(string $webhookMethod): self
{
$this->options['webhookMethod'] = $webhookMethod;
return $this;
@@ -644,11 +607,10 @@ public function setWebhookMethod($webhookMethod)
/**
* The list of WebHook events that are enabled for this Service instance. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details.
*
- * @param string $webhookFilters The list of WebHook events that are enabled
- * for this Service instance
+ * @param string[] $webhookFilters The list of WebHook events that are enabled for this Service instance. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details.
* @return $this Fluent Builder
*/
- public function setWebhookFilters($webhookFilters)
+ public function setWebhookFilters(array $webhookFilters): self
{
$this->options['webhookFilters'] = $webhookFilters;
return $this;
@@ -657,11 +619,10 @@ public function setWebhookFilters($webhookFilters)
/**
* The URL of the webhook to call in response to the `on_message_send` event using the `webhooks.on_message_send.method` HTTP method.
*
- * @param string $webhooksOnMessageSendUrl The URL of the webhook to call in
- * response to the on_message_send event
+ * @param string $webhooksOnMessageSendUrl The URL of the webhook to call in response to the `on_message_send` event using the `webhooks.on_message_send.method` HTTP method.
* @return $this Fluent Builder
*/
- public function setWebhooksOnMessageSendUrl($webhooksOnMessageSendUrl)
+ public function setWebhooksOnMessageSendUrl(string $webhooksOnMessageSendUrl): self
{
$this->options['webhooksOnMessageSendUrl'] = $webhooksOnMessageSendUrl;
return $this;
@@ -670,12 +631,10 @@ public function setWebhooksOnMessageSendUrl($webhooksOnMessageSendUrl)
/**
* The HTTP method to use when calling the `webhooks.on_message_send.url`.
*
- * @param string $webhooksOnMessageSendMethod The HTTP method to use when
- * calling the
- * webhooks.on_message_send.url
+ * @param string $webhooksOnMessageSendMethod The HTTP method to use when calling the `webhooks.on_message_send.url`.
* @return $this Fluent Builder
*/
- public function setWebhooksOnMessageSendMethod($webhooksOnMessageSendMethod)
+ public function setWebhooksOnMessageSendMethod(string $webhooksOnMessageSendMethod): self
{
$this->options['webhooksOnMessageSendMethod'] = $webhooksOnMessageSendMethod;
return $this;
@@ -684,12 +643,10 @@ public function setWebhooksOnMessageSendMethod($webhooksOnMessageSendMethod)
/**
* The URL of the webhook to call in response to the `on_message_update` event using the `webhooks.on_message_update.method` HTTP method.
*
- * @param string $webhooksOnMessageUpdateUrl The URL of the webhook to call in
- * response to the on_message_update
- * event
+ * @param string $webhooksOnMessageUpdateUrl The URL of the webhook to call in response to the `on_message_update` event using the `webhooks.on_message_update.method` HTTP method.
* @return $this Fluent Builder
*/
- public function setWebhooksOnMessageUpdateUrl($webhooksOnMessageUpdateUrl)
+ public function setWebhooksOnMessageUpdateUrl(string $webhooksOnMessageUpdateUrl): self
{
$this->options['webhooksOnMessageUpdateUrl'] = $webhooksOnMessageUpdateUrl;
return $this;
@@ -698,12 +655,10 @@ public function setWebhooksOnMessageUpdateUrl($webhooksOnMessageUpdateUrl)
/**
* The HTTP method to use when calling the `webhooks.on_message_update.url`.
*
- * @param string $webhooksOnMessageUpdateMethod The HTTP method to use when
- * calling the
- * webhooks.on_message_update.url
+ * @param string $webhooksOnMessageUpdateMethod The HTTP method to use when calling the `webhooks.on_message_update.url`.
* @return $this Fluent Builder
*/
- public function setWebhooksOnMessageUpdateMethod($webhooksOnMessageUpdateMethod)
+ public function setWebhooksOnMessageUpdateMethod(string $webhooksOnMessageUpdateMethod): self
{
$this->options['webhooksOnMessageUpdateMethod'] = $webhooksOnMessageUpdateMethod;
return $this;
@@ -712,12 +667,10 @@ public function setWebhooksOnMessageUpdateMethod($webhooksOnMessageUpdateMethod)
/**
* The URL of the webhook to call in response to the `on_message_remove` event using the `webhooks.on_message_remove.method` HTTP method.
*
- * @param string $webhooksOnMessageRemoveUrl The URL of the webhook to call in
- * response to the on_message_remove
- * event
+ * @param string $webhooksOnMessageRemoveUrl The URL of the webhook to call in response to the `on_message_remove` event using the `webhooks.on_message_remove.method` HTTP method.
* @return $this Fluent Builder
*/
- public function setWebhooksOnMessageRemoveUrl($webhooksOnMessageRemoveUrl)
+ public function setWebhooksOnMessageRemoveUrl(string $webhooksOnMessageRemoveUrl): self
{
$this->options['webhooksOnMessageRemoveUrl'] = $webhooksOnMessageRemoveUrl;
return $this;
@@ -726,12 +679,10 @@ public function setWebhooksOnMessageRemoveUrl($webhooksOnMessageRemoveUrl)
/**
* The HTTP method to use when calling the `webhooks.on_message_remove.url`.
*
- * @param string $webhooksOnMessageRemoveMethod The HTTP method to use when
- * calling the
- * webhooks.on_message_remove.url
+ * @param string $webhooksOnMessageRemoveMethod The HTTP method to use when calling the `webhooks.on_message_remove.url`.
* @return $this Fluent Builder
*/
- public function setWebhooksOnMessageRemoveMethod($webhooksOnMessageRemoveMethod)
+ public function setWebhooksOnMessageRemoveMethod(string $webhooksOnMessageRemoveMethod): self
{
$this->options['webhooksOnMessageRemoveMethod'] = $webhooksOnMessageRemoveMethod;
return $this;
@@ -740,11 +691,10 @@ public function setWebhooksOnMessageRemoveMethod($webhooksOnMessageRemoveMethod)
/**
* The URL of the webhook to call in response to the `on_channel_add` event using the `webhooks.on_channel_add.method` HTTP method.
*
- * @param string $webhooksOnChannelAddUrl The URL of the webhook to call in
- * response to the on_channel_add event
+ * @param string $webhooksOnChannelAddUrl The URL of the webhook to call in response to the `on_channel_add` event using the `webhooks.on_channel_add.method` HTTP method.
* @return $this Fluent Builder
*/
- public function setWebhooksOnChannelAddUrl($webhooksOnChannelAddUrl)
+ public function setWebhooksOnChannelAddUrl(string $webhooksOnChannelAddUrl): self
{
$this->options['webhooksOnChannelAddUrl'] = $webhooksOnChannelAddUrl;
return $this;
@@ -753,12 +703,10 @@ public function setWebhooksOnChannelAddUrl($webhooksOnChannelAddUrl)
/**
* The HTTP method to use when calling the `webhooks.on_channel_add.url`.
*
- * @param string $webhooksOnChannelAddMethod The HTTP method to use when
- * calling the
- * webhooks.on_channel_add.url
+ * @param string $webhooksOnChannelAddMethod The HTTP method to use when calling the `webhooks.on_channel_add.url`.
* @return $this Fluent Builder
*/
- public function setWebhooksOnChannelAddMethod($webhooksOnChannelAddMethod)
+ public function setWebhooksOnChannelAddMethod(string $webhooksOnChannelAddMethod): self
{
$this->options['webhooksOnChannelAddMethod'] = $webhooksOnChannelAddMethod;
return $this;
@@ -767,12 +715,10 @@ public function setWebhooksOnChannelAddMethod($webhooksOnChannelAddMethod)
/**
* The URL of the webhook to call in response to the `on_channel_destroy` event using the `webhooks.on_channel_destroy.method` HTTP method.
*
- * @param string $webhooksOnChannelDestroyUrl The URL of the webhook to call in
- * response to the
- * on_channel_destroy event
+ * @param string $webhooksOnChannelDestroyUrl The URL of the webhook to call in response to the `on_channel_destroy` event using the `webhooks.on_channel_destroy.method` HTTP method.
* @return $this Fluent Builder
*/
- public function setWebhooksOnChannelDestroyUrl($webhooksOnChannelDestroyUrl)
+ public function setWebhooksOnChannelDestroyUrl(string $webhooksOnChannelDestroyUrl): self
{
$this->options['webhooksOnChannelDestroyUrl'] = $webhooksOnChannelDestroyUrl;
return $this;
@@ -781,12 +727,10 @@ public function setWebhooksOnChannelDestroyUrl($webhooksOnChannelDestroyUrl)
/**
* The HTTP method to use when calling the `webhooks.on_channel_destroy.url`.
*
- * @param string $webhooksOnChannelDestroyMethod The HTTP method to use when
- * calling the
- * webhooks.on_channel_destroy.url
+ * @param string $webhooksOnChannelDestroyMethod The HTTP method to use when calling the `webhooks.on_channel_destroy.url`.
* @return $this Fluent Builder
*/
- public function setWebhooksOnChannelDestroyMethod($webhooksOnChannelDestroyMethod)
+ public function setWebhooksOnChannelDestroyMethod(string $webhooksOnChannelDestroyMethod): self
{
$this->options['webhooksOnChannelDestroyMethod'] = $webhooksOnChannelDestroyMethod;
return $this;
@@ -795,12 +739,10 @@ public function setWebhooksOnChannelDestroyMethod($webhooksOnChannelDestroyMetho
/**
* The URL of the webhook to call in response to the `on_channel_update` event using the `webhooks.on_channel_update.method` HTTP method.
*
- * @param string $webhooksOnChannelUpdateUrl The URL of the webhook to call in
- * response to the on_channel_update
- * event
+ * @param string $webhooksOnChannelUpdateUrl The URL of the webhook to call in response to the `on_channel_update` event using the `webhooks.on_channel_update.method` HTTP method.
* @return $this Fluent Builder
*/
- public function setWebhooksOnChannelUpdateUrl($webhooksOnChannelUpdateUrl)
+ public function setWebhooksOnChannelUpdateUrl(string $webhooksOnChannelUpdateUrl): self
{
$this->options['webhooksOnChannelUpdateUrl'] = $webhooksOnChannelUpdateUrl;
return $this;
@@ -809,12 +751,10 @@ public function setWebhooksOnChannelUpdateUrl($webhooksOnChannelUpdateUrl)
/**
* The HTTP method to use when calling the `webhooks.on_channel_update.url`.
*
- * @param string $webhooksOnChannelUpdateMethod The HTTP method to use when
- * calling the
- * webhooks.on_channel_update.url
+ * @param string $webhooksOnChannelUpdateMethod The HTTP method to use when calling the `webhooks.on_channel_update.url`.
* @return $this Fluent Builder
*/
- public function setWebhooksOnChannelUpdateMethod($webhooksOnChannelUpdateMethod)
+ public function setWebhooksOnChannelUpdateMethod(string $webhooksOnChannelUpdateMethod): self
{
$this->options['webhooksOnChannelUpdateMethod'] = $webhooksOnChannelUpdateMethod;
return $this;
@@ -823,11 +763,10 @@ public function setWebhooksOnChannelUpdateMethod($webhooksOnChannelUpdateMethod)
/**
* The URL of the webhook to call in response to the `on_member_add` event using the `webhooks.on_member_add.method` HTTP method.
*
- * @param string $webhooksOnMemberAddUrl The URL of the webhook to call in
- * response to the on_member_add event
+ * @param string $webhooksOnMemberAddUrl The URL of the webhook to call in response to the `on_member_add` event using the `webhooks.on_member_add.method` HTTP method.
* @return $this Fluent Builder
*/
- public function setWebhooksOnMemberAddUrl($webhooksOnMemberAddUrl)
+ public function setWebhooksOnMemberAddUrl(string $webhooksOnMemberAddUrl): self
{
$this->options['webhooksOnMemberAddUrl'] = $webhooksOnMemberAddUrl;
return $this;
@@ -836,11 +775,10 @@ public function setWebhooksOnMemberAddUrl($webhooksOnMemberAddUrl)
/**
* The HTTP method to use when calling the `webhooks.on_member_add.url`.
*
- * @param string $webhooksOnMemberAddMethod The HTTP method to use when calling
- * the webhooks.on_member_add.url
+ * @param string $webhooksOnMemberAddMethod The HTTP method to use when calling the `webhooks.on_member_add.url`.
* @return $this Fluent Builder
*/
- public function setWebhooksOnMemberAddMethod($webhooksOnMemberAddMethod)
+ public function setWebhooksOnMemberAddMethod(string $webhooksOnMemberAddMethod): self
{
$this->options['webhooksOnMemberAddMethod'] = $webhooksOnMemberAddMethod;
return $this;
@@ -849,12 +787,10 @@ public function setWebhooksOnMemberAddMethod($webhooksOnMemberAddMethod)
/**
* The URL of the webhook to call in response to the `on_member_remove` event using the `webhooks.on_member_remove.method` HTTP method.
*
- * @param string $webhooksOnMemberRemoveUrl The URL of the webhook to call in
- * response to the on_member_remove
- * event
+ * @param string $webhooksOnMemberRemoveUrl The URL of the webhook to call in response to the `on_member_remove` event using the `webhooks.on_member_remove.method` HTTP method.
* @return $this Fluent Builder
*/
- public function setWebhooksOnMemberRemoveUrl($webhooksOnMemberRemoveUrl)
+ public function setWebhooksOnMemberRemoveUrl(string $webhooksOnMemberRemoveUrl): self
{
$this->options['webhooksOnMemberRemoveUrl'] = $webhooksOnMemberRemoveUrl;
return $this;
@@ -863,12 +799,10 @@ public function setWebhooksOnMemberRemoveUrl($webhooksOnMemberRemoveUrl)
/**
* The HTTP method to use when calling the `webhooks.on_member_remove.url`.
*
- * @param string $webhooksOnMemberRemoveMethod The HTTP method to use when
- * calling the
- * webhooks.on_member_remove.url
+ * @param string $webhooksOnMemberRemoveMethod The HTTP method to use when calling the `webhooks.on_member_remove.url`.
* @return $this Fluent Builder
*/
- public function setWebhooksOnMemberRemoveMethod($webhooksOnMemberRemoveMethod)
+ public function setWebhooksOnMemberRemoveMethod(string $webhooksOnMemberRemoveMethod): self
{
$this->options['webhooksOnMemberRemoveMethod'] = $webhooksOnMemberRemoveMethod;
return $this;
@@ -877,11 +811,10 @@ public function setWebhooksOnMemberRemoveMethod($webhooksOnMemberRemoveMethod)
/**
* The URL of the webhook to call in response to the `on_message_sent` event using the `webhooks.on_message_sent.method` HTTP method.
*
- * @param string $webhooksOnMessageSentUrl The URL of the webhook to call in
- * response to the on_message_sent event
+ * @param string $webhooksOnMessageSentUrl The URL of the webhook to call in response to the `on_message_sent` event using the `webhooks.on_message_sent.method` HTTP method.
* @return $this Fluent Builder
*/
- public function setWebhooksOnMessageSentUrl($webhooksOnMessageSentUrl)
+ public function setWebhooksOnMessageSentUrl(string $webhooksOnMessageSentUrl): self
{
$this->options['webhooksOnMessageSentUrl'] = $webhooksOnMessageSentUrl;
return $this;
@@ -890,12 +823,10 @@ public function setWebhooksOnMessageSentUrl($webhooksOnMessageSentUrl)
/**
* The URL of the webhook to call in response to the `on_message_sent` event`.
*
- * @param string $webhooksOnMessageSentMethod The URL of the webhook to call in
- * response to the on_message_sent
- * event
+ * @param string $webhooksOnMessageSentMethod The URL of the webhook to call in response to the `on_message_sent` event`.
* @return $this Fluent Builder
*/
- public function setWebhooksOnMessageSentMethod($webhooksOnMessageSentMethod)
+ public function setWebhooksOnMessageSentMethod(string $webhooksOnMessageSentMethod): self
{
$this->options['webhooksOnMessageSentMethod'] = $webhooksOnMessageSentMethod;
return $this;
@@ -904,12 +835,10 @@ public function setWebhooksOnMessageSentMethod($webhooksOnMessageSentMethod)
/**
* The URL of the webhook to call in response to the `on_message_updated` event using the `webhooks.on_message_updated.method` HTTP method.
*
- * @param string $webhooksOnMessageUpdatedUrl The URL of the webhook to call in
- * response to the
- * on_message_updated event
+ * @param string $webhooksOnMessageUpdatedUrl The URL of the webhook to call in response to the `on_message_updated` event using the `webhooks.on_message_updated.method` HTTP method.
* @return $this Fluent Builder
*/
- public function setWebhooksOnMessageUpdatedUrl($webhooksOnMessageUpdatedUrl)
+ public function setWebhooksOnMessageUpdatedUrl(string $webhooksOnMessageUpdatedUrl): self
{
$this->options['webhooksOnMessageUpdatedUrl'] = $webhooksOnMessageUpdatedUrl;
return $this;
@@ -918,12 +847,10 @@ public function setWebhooksOnMessageUpdatedUrl($webhooksOnMessageUpdatedUrl)
/**
* The HTTP method to use when calling the `webhooks.on_message_updated.url`.
*
- * @param string $webhooksOnMessageUpdatedMethod The HTTP method to use when
- * calling the
- * webhooks.on_message_updated.url
+ * @param string $webhooksOnMessageUpdatedMethod The HTTP method to use when calling the `webhooks.on_message_updated.url`.
* @return $this Fluent Builder
*/
- public function setWebhooksOnMessageUpdatedMethod($webhooksOnMessageUpdatedMethod)
+ public function setWebhooksOnMessageUpdatedMethod(string $webhooksOnMessageUpdatedMethod): self
{
$this->options['webhooksOnMessageUpdatedMethod'] = $webhooksOnMessageUpdatedMethod;
return $this;
@@ -932,12 +859,10 @@ public function setWebhooksOnMessageUpdatedMethod($webhooksOnMessageUpdatedMetho
/**
* The URL of the webhook to call in response to the `on_message_removed` event using the `webhooks.on_message_removed.method` HTTP method.
*
- * @param string $webhooksOnMessageRemovedUrl The URL of the webhook to call in
- * response to the
- * on_message_removed event
+ * @param string $webhooksOnMessageRemovedUrl The URL of the webhook to call in response to the `on_message_removed` event using the `webhooks.on_message_removed.method` HTTP method.
* @return $this Fluent Builder
*/
- public function setWebhooksOnMessageRemovedUrl($webhooksOnMessageRemovedUrl)
+ public function setWebhooksOnMessageRemovedUrl(string $webhooksOnMessageRemovedUrl): self
{
$this->options['webhooksOnMessageRemovedUrl'] = $webhooksOnMessageRemovedUrl;
return $this;
@@ -946,12 +871,10 @@ public function setWebhooksOnMessageRemovedUrl($webhooksOnMessageRemovedUrl)
/**
* The HTTP method to use when calling the `webhooks.on_message_removed.url`.
*
- * @param string $webhooksOnMessageRemovedMethod The HTTP method to use when
- * calling the
- * webhooks.on_message_removed.url
+ * @param string $webhooksOnMessageRemovedMethod The HTTP method to use when calling the `webhooks.on_message_removed.url`.
* @return $this Fluent Builder
*/
- public function setWebhooksOnMessageRemovedMethod($webhooksOnMessageRemovedMethod)
+ public function setWebhooksOnMessageRemovedMethod(string $webhooksOnMessageRemovedMethod): self
{
$this->options['webhooksOnMessageRemovedMethod'] = $webhooksOnMessageRemovedMethod;
return $this;
@@ -960,12 +883,10 @@ public function setWebhooksOnMessageRemovedMethod($webhooksOnMessageRemovedMetho
/**
* The URL of the webhook to call in response to the `on_channel_added` event using the `webhooks.on_channel_added.method` HTTP method.
*
- * @param string $webhooksOnChannelAddedUrl The URL of the webhook to call in
- * response to the on_channel_added
- * event
+ * @param string $webhooksOnChannelAddedUrl The URL of the webhook to call in response to the `on_channel_added` event using the `webhooks.on_channel_added.method` HTTP method.
* @return $this Fluent Builder
*/
- public function setWebhooksOnChannelAddedUrl($webhooksOnChannelAddedUrl)
+ public function setWebhooksOnChannelAddedUrl(string $webhooksOnChannelAddedUrl): self
{
$this->options['webhooksOnChannelAddedUrl'] = $webhooksOnChannelAddedUrl;
return $this;
@@ -974,12 +895,10 @@ public function setWebhooksOnChannelAddedUrl($webhooksOnChannelAddedUrl)
/**
* The URL of the webhook to call in response to the `on_channel_added` event`.
*
- * @param string $webhooksOnChannelAddedMethod The URL of the webhook to call
- * in response to the
- * on_channel_added event
+ * @param string $webhooksOnChannelAddedMethod The URL of the webhook to call in response to the `on_channel_added` event`.
* @return $this Fluent Builder
*/
- public function setWebhooksOnChannelAddedMethod($webhooksOnChannelAddedMethod)
+ public function setWebhooksOnChannelAddedMethod(string $webhooksOnChannelAddedMethod): self
{
$this->options['webhooksOnChannelAddedMethod'] = $webhooksOnChannelAddedMethod;
return $this;
@@ -988,12 +907,10 @@ public function setWebhooksOnChannelAddedMethod($webhooksOnChannelAddedMethod)
/**
* The URL of the webhook to call in response to the `on_channel_added` event using the `webhooks.on_channel_destroyed.method` HTTP method.
*
- * @param string $webhooksOnChannelDestroyedUrl The URL of the webhook to call
- * in response to the
- * on_channel_added event
+ * @param string $webhooksOnChannelDestroyedUrl The URL of the webhook to call in response to the `on_channel_added` event using the `webhooks.on_channel_destroyed.method` HTTP method.
* @return $this Fluent Builder
*/
- public function setWebhooksOnChannelDestroyedUrl($webhooksOnChannelDestroyedUrl)
+ public function setWebhooksOnChannelDestroyedUrl(string $webhooksOnChannelDestroyedUrl): self
{
$this->options['webhooksOnChannelDestroyedUrl'] = $webhooksOnChannelDestroyedUrl;
return $this;
@@ -1002,12 +919,10 @@ public function setWebhooksOnChannelDestroyedUrl($webhooksOnChannelDestroyedUrl)
/**
* The HTTP method to use when calling the `webhooks.on_channel_destroyed.url`.
*
- * @param string $webhooksOnChannelDestroyedMethod The HTTP method to use when
- * calling the
- * webhooks.on_channel_destroyed.url
+ * @param string $webhooksOnChannelDestroyedMethod The HTTP method to use when calling the `webhooks.on_channel_destroyed.url`.
* @return $this Fluent Builder
*/
- public function setWebhooksOnChannelDestroyedMethod($webhooksOnChannelDestroyedMethod)
+ public function setWebhooksOnChannelDestroyedMethod(string $webhooksOnChannelDestroyedMethod): self
{
$this->options['webhooksOnChannelDestroyedMethod'] = $webhooksOnChannelDestroyedMethod;
return $this;
@@ -1016,12 +931,10 @@ public function setWebhooksOnChannelDestroyedMethod($webhooksOnChannelDestroyedM
/**
* The URL of the webhook to call in response to the `on_channel_updated` event using the `webhooks.on_channel_updated.method` HTTP method.
*
- * @param string $webhooksOnChannelUpdatedUrl he URL of the webhook to call in
- * response to the
- * on_channel_updated event
+ * @param string $webhooksOnChannelUpdatedUrl The URL of the webhook to call in response to the `on_channel_updated` event using the `webhooks.on_channel_updated.method` HTTP method.
* @return $this Fluent Builder
*/
- public function setWebhooksOnChannelUpdatedUrl($webhooksOnChannelUpdatedUrl)
+ public function setWebhooksOnChannelUpdatedUrl(string $webhooksOnChannelUpdatedUrl): self
{
$this->options['webhooksOnChannelUpdatedUrl'] = $webhooksOnChannelUpdatedUrl;
return $this;
@@ -1030,12 +943,10 @@ public function setWebhooksOnChannelUpdatedUrl($webhooksOnChannelUpdatedUrl)
/**
* The HTTP method to use when calling the `webhooks.on_channel_updated.url`.
*
- * @param string $webhooksOnChannelUpdatedMethod The HTTP method to use when
- * calling the
- * webhooks.on_channel_updated.url
+ * @param string $webhooksOnChannelUpdatedMethod The HTTP method to use when calling the `webhooks.on_channel_updated.url`.
* @return $this Fluent Builder
*/
- public function setWebhooksOnChannelUpdatedMethod($webhooksOnChannelUpdatedMethod)
+ public function setWebhooksOnChannelUpdatedMethod(string $webhooksOnChannelUpdatedMethod): self
{
$this->options['webhooksOnChannelUpdatedMethod'] = $webhooksOnChannelUpdatedMethod;
return $this;
@@ -1044,12 +955,10 @@ public function setWebhooksOnChannelUpdatedMethod($webhooksOnChannelUpdatedMetho
/**
* The URL of the webhook to call in response to the `on_channel_updated` event using the `webhooks.on_channel_updated.method` HTTP method.
*
- * @param string $webhooksOnMemberAddedUrl The URL of the webhook to call in
- * response to the on_channel_updated
- * event
+ * @param string $webhooksOnMemberAddedUrl The URL of the webhook to call in response to the `on_channel_updated` event using the `webhooks.on_channel_updated.method` HTTP method.
* @return $this Fluent Builder
*/
- public function setWebhooksOnMemberAddedUrl($webhooksOnMemberAddedUrl)
+ public function setWebhooksOnMemberAddedUrl(string $webhooksOnMemberAddedUrl): self
{
$this->options['webhooksOnMemberAddedUrl'] = $webhooksOnMemberAddedUrl;
return $this;
@@ -1058,12 +967,10 @@ public function setWebhooksOnMemberAddedUrl($webhooksOnMemberAddedUrl)
/**
* The HTTP method to use when calling the `webhooks.on_channel_updated.url`.
*
- * @param string $webhooksOnMemberAddedMethod he HTTP method to use when
- * calling the
- * webhooks.on_channel_updated.url
+ * @param string $webhooksOnMemberAddedMethod The HTTP method to use when calling the `webhooks.on_channel_updated.url`.
* @return $this Fluent Builder
*/
- public function setWebhooksOnMemberAddedMethod($webhooksOnMemberAddedMethod)
+ public function setWebhooksOnMemberAddedMethod(string $webhooksOnMemberAddedMethod): self
{
$this->options['webhooksOnMemberAddedMethod'] = $webhooksOnMemberAddedMethod;
return $this;
@@ -1072,12 +979,10 @@ public function setWebhooksOnMemberAddedMethod($webhooksOnMemberAddedMethod)
/**
* The URL of the webhook to call in response to the `on_member_removed` event using the `webhooks.on_member_removed.method` HTTP method.
*
- * @param string $webhooksOnMemberRemovedUrl The URL of the webhook to call in
- * response to the on_member_removed
- * event
+ * @param string $webhooksOnMemberRemovedUrl The URL of the webhook to call in response to the `on_member_removed` event using the `webhooks.on_member_removed.method` HTTP method.
* @return $this Fluent Builder
*/
- public function setWebhooksOnMemberRemovedUrl($webhooksOnMemberRemovedUrl)
+ public function setWebhooksOnMemberRemovedUrl(string $webhooksOnMemberRemovedUrl): self
{
$this->options['webhooksOnMemberRemovedUrl'] = $webhooksOnMemberRemovedUrl;
return $this;
@@ -1086,12 +991,10 @@ public function setWebhooksOnMemberRemovedUrl($webhooksOnMemberRemovedUrl)
/**
* The HTTP method to use when calling the `webhooks.on_member_removed.url`.
*
- * @param string $webhooksOnMemberRemovedMethod The HTTP method to use when
- * calling the
- * webhooks.on_member_removed.url
+ * @param string $webhooksOnMemberRemovedMethod The HTTP method to use when calling the `webhooks.on_member_removed.url`.
* @return $this Fluent Builder
*/
- public function setWebhooksOnMemberRemovedMethod($webhooksOnMemberRemovedMethod)
+ public function setWebhooksOnMemberRemovedMethod(string $webhooksOnMemberRemovedMethod): self
{
$this->options['webhooksOnMemberRemovedMethod'] = $webhooksOnMemberRemovedMethod;
return $this;
@@ -1100,11 +1003,10 @@ public function setWebhooksOnMemberRemovedMethod($webhooksOnMemberRemovedMethod)
/**
* The maximum number of Members that can be added to Channels within this Service. Can be up to 1,000.
*
- * @param int $limitsChannelMembers The maximum number of Members that can be
- * added to Channels within this Service
+ * @param int $limitsChannelMembers The maximum number of Members that can be added to Channels within this Service. Can be up to 1,000.
* @return $this Fluent Builder
*/
- public function setLimitsChannelMembers($limitsChannelMembers)
+ public function setLimitsChannelMembers(int $limitsChannelMembers): self
{
$this->options['limitsChannelMembers'] = $limitsChannelMembers;
return $this;
@@ -1113,11 +1015,10 @@ public function setLimitsChannelMembers($limitsChannelMembers)
/**
* The maximum number of Channels Users can be a Member of within this Service. Can be up to 1,000.
*
- * @param int $limitsUserChannels The maximum number of Channels Users can be a
- * Member of within this Service
+ * @param int $limitsUserChannels The maximum number of Channels Users can be a Member of within this Service. Can be up to 1,000.
* @return $this Fluent Builder
*/
- public function setLimitsUserChannels($limitsUserChannels)
+ public function setLimitsUserChannels(int $limitsUserChannels): self
{
$this->options['limitsUserChannels'] = $limitsUserChannels;
return $this;
@@ -1128,14 +1029,10 @@ public function setLimitsUserChannels($limitsUserChannels)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Chat.V1.UpdateServiceOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Chat.V1.UpdateServiceOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/ServicePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/ServicePage.php
index 7774c7a..bf52c10 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/ServicePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V1/ServicePage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return ServiceInstance \Twilio\Rest\Chat\V1\ServiceInstance
+ */
+ public function buildInstance(array $payload): ServiceInstance
{
return new ServiceInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V1.ServicePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2.php
index fbe0852..9c8011e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2.php
@@ -1,36 +1,42 @@
version = 'v2';
}
- /**
- * @return \Twilio\Rest\Chat\V2\CredentialList
- */
- protected function getCredentials()
+ protected function getCredentials(): CredentialList
{
if (!$this->_credentials) {
$this->_credentials = new CredentialList($this);
@@ -49,10 +52,7 @@ protected function getCredentials()
return $this->_credentials;
}
- /**
- * @return \Twilio\Rest\Chat\V2\ServiceList
- */
- protected function getServices()
+ protected function getServices(): ServiceList
{
if (!$this->_services) {
$this->_services = new ServiceList($this);
@@ -67,7 +67,7 @@ protected function getServices()
* @return \Twilio\ListResource The requested resource
* @throws TwilioException For unknown resource
*/
- public function __get($name)
+ public function __get(string $name)
{
$method = 'get' . \ucfirst($name);
if (\method_exists($this, $method)) {
@@ -82,10 +82,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -100,8 +100,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V2]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/CredentialContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/CredentialContext.php
index 3c84570..ecbe6fe 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/CredentialContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/CredentialContext.php
@@ -2,110 +2,136 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Chat\V2;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
class CredentialContext extends InstanceContext
-{
+ {
/**
* Initialize the CredentialContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The SID of the Credential resource to fetch
- * @return \Twilio\Rest\Chat\V2\CredentialContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid The SID of the Credential resource to delete.
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Credentials/' . \rawurlencode($sid) . '';
+ $this->uri = '/Credentials/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a CredentialInstance
+ * Delete the CredentialInstance
*
- * @return CredentialInstance Fetched CredentialInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
- return new CredentialInstance($this->version, $payload, $this->solution['sid']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Update the CredentialInstance
+ * Fetch the CredentialInstance
*
- * @param array|Options $options Optional Arguments
- * @return CredentialInstance Updated CredentialInstance
+ * @return CredentialInstance Fetched CredentialInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): CredentialInstance
{
- $options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'Certificate' => $options['certificate'],
- 'PrivateKey' => $options['privateKey'],
- 'Sandbox' => Serialize::booleanToString($options['sandbox']),
- 'ApiKey' => $options['apiKey'],
- 'Secret' => $options['secret'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
- return new CredentialInstance($this->version, $payload, $this->solution['sid']);
+ return new CredentialInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
- * Deletes the CredentialInstance
+ * Update the CredentialInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return CredentialInstance Updated CredentialInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): CredentialInstance
{
- return $this->version->delete('delete', $this->uri);
+
+ $options = new Values($options);
+
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'Certificate' =>
+ $options['certificate'],
+ 'PrivateKey' =>
+ $options['privateKey'],
+ 'Sandbox' =>
+ Serialize::booleanToString($options['sandbox']),
+ 'ApiKey' =>
+ $options['apiKey'],
+ 'Secret' =>
+ $options['secret'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
+
+ return new CredentialInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Chat.V2.CredentialContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/CredentialInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/CredentialInstance.php
index 4b9fdbd..2e73c1f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/CredentialInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/CredentialInstance.php
@@ -2,46 +2,54 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Chat\V2;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $friendlyName
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $friendlyName
* @property string $type
- * @property string $sandbox
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
+ * @property string|null $sandbox
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
*/
class CredentialInstance extends InstanceResource
{
/**
* Initialize the CredentialInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The SID of the Credential resource to fetch
- * @return \Twilio\Rest\Chat\V2\CredentialInstance
+ * @param string $sid The SID of the Credential resource to delete.
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
@@ -50,59 +58,64 @@ public function __construct(Version $version, array $payload, $sid = null)
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Chat\V2\CredentialContext Context for this
- * CredentialInstance
+ * @return CredentialContext Context for this CredentialInstance
*/
- protected function proxy()
+ protected function proxy(): CredentialContext
{
if (!$this->context) {
- $this->context = new CredentialContext($this->version, $this->solution['sid']);
+ $this->context = new CredentialContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a CredentialInstance
+ * Delete the CredentialInstance
*
- * @return CredentialInstance Fetched CredentialInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Update the CredentialInstance
+ * Fetch the CredentialInstance
*
- * @param array|Options $options Optional Arguments
- * @return CredentialInstance Updated CredentialInstance
+ * @return CredentialInstance Fetched CredentialInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): CredentialInstance
{
- return $this->proxy()->update($options);
+
+ return $this->proxy()->fetch();
}
/**
- * Deletes the CredentialInstance
+ * Update the CredentialInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return CredentialInstance Updated CredentialInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): CredentialInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->update($options);
}
/**
@@ -112,7 +125,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -131,12 +144,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Chat.V2.CredentialInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/CredentialList.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/CredentialList.php
index 84802a3..3d0e001 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/CredentialList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/CredentialList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Chat\V2;
@@ -12,55 +19,71 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class CredentialList extends ListResource
-{
+ {
/**
* Construct the CredentialList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Chat\V2\CredentialList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/Credentials';
}
/**
- * Streams CredentialInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the CredentialInstance
*
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @param string $type
+ * @param array|Options $options Optional Arguments
+ * @return CredentialInstance Created CredentialInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($limit = null, $pageSize = null)
+ public function create(string $type, array $options = []): CredentialInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'Type' =>
+ $type,
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'Certificate' =>
+ $options['certificate'],
+ 'PrivateKey' =>
+ $options['privateKey'],
+ 'Sandbox' =>
+ Serialize::booleanToString($options['sandbox']),
+ 'ApiKey' =>
+ $options['apiKey'],
+ 'Secret' =>
+ $options['secret'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new CredentialInstance(
+ $this->version,
+ $payload
+ );
}
+
/**
* Reads CredentialInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -76,11 +99,38 @@ public function stream($limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return CredentialInstance[] Array of results
*/
- public function read($limit = null, $pageSize = null)
+ public function read(int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($limit, $pageSize), false);
}
+ /**
+ * Streams CredentialInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of CredentialInstance records from the API.
* Request is executed immediately
@@ -88,21 +138,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of CredentialInstance
+ * @return CredentialPage Page of CredentialInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): CredentialPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new CredentialPage($this->version, $response, $this->solution);
}
@@ -112,9 +163,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of CredentialInstance
+ * @return CredentialPage Page of CredentialInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): CredentialPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -124,48 +175,21 @@ public function getPage($targetUrl)
return new CredentialPage($this->version, $response, $this->solution);
}
- /**
- * Create a new CredentialInstance
- *
- * @param string $type The type of push-notification service the credential is
- * for
- * @param array|Options $options Optional Arguments
- * @return CredentialInstance Newly created CredentialInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($type, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'Type' => $type,
- 'FriendlyName' => $options['friendlyName'],
- 'Certificate' => $options['certificate'],
- 'PrivateKey' => $options['privateKey'],
- 'Sandbox' => Serialize::booleanToString($options['sandbox']),
- 'ApiKey' => $options['apiKey'],
- 'Secret' => $options['secret'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new CredentialInstance($this->version, $payload);
- }
/**
* Constructs a CredentialContext
*
- * @param string $sid The SID of the Credential resource to fetch
- * @return \Twilio\Rest\Chat\V2\CredentialContext
+ * @param string $sid The SID of the Credential resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): CredentialContext
{
- return new CredentialContext($this->version, $sid);
+ return new CredentialContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -173,8 +197,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V2.CredentialList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/CredentialOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/CredentialOptions.php
index 814ee18..fdd0e1f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/CredentialOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/CredentialOptions.php
@@ -1,10 +1,16 @@
options['friendlyName'] = $friendlyName;
$this->options['certificate'] = $certificate;
$this->options['privateKey'] = $privateKey;
@@ -84,42 +116,34 @@ public function __construct($friendlyName = Values::NONE, $certificate = Values:
/**
* A descriptive string that you create to describe the new resource. It can be up to 64 characters long.
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName A descriptive string that you create to describe the new resource. It can be up to 64 characters long.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
}
/**
- * [APN only] The URL encoded representation of the certificate. For example,
- * `-----BEGIN CERTIFICATE-----
- * MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A==
- * -----END CERTIFICATE-----`
+ * [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A== -----END CERTIFICATE-----`
*
- * @param string $certificate [APN only] The URL encoded representation of the
- * certificate
+ * @param string $certificate [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A== -----END CERTIFICATE-----`
* @return $this Fluent Builder
*/
- public function setCertificate($certificate)
+ public function setCertificate(string $certificate): self
{
$this->options['certificate'] = $certificate;
return $this;
}
/**
- * [APN only] The URL encoded representation of the private key. For example,
- * `-----BEGIN RSA PRIVATE KEY-----
- * MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fG...
- * -----END RSA PRIVATE KEY-----`
+ * [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fG... -----END RSA PRIVATE KEY-----`
*
- * @param string $privateKey [APN only] The URL encoded representation of the
- * private key
+ * @param string $privateKey [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fG... -----END RSA PRIVATE KEY-----`
* @return $this Fluent Builder
*/
- public function setPrivateKey($privateKey)
+ public function setPrivateKey(string $privateKey): self
{
$this->options['privateKey'] = $privateKey;
return $this;
@@ -128,11 +152,10 @@ public function setPrivateKey($privateKey)
/**
* [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production.
*
- * @param bool $sandbox [APN only] Whether to send the credential to sandbox
- * APNs
+ * @param bool $sandbox [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production.
* @return $this Fluent Builder
*/
- public function setSandbox($sandbox)
+ public function setSandbox(bool $sandbox): self
{
$this->options['sandbox'] = $sandbox;
return $this;
@@ -141,12 +164,10 @@ public function setSandbox($sandbox)
/**
* [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential.
*
- * @param string $apiKey [GCM only] The API key for the project that was
- * obtained from the Google Developer console for your
- * GCM Service application credential
+ * @param string $apiKey [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential.
* @return $this Fluent Builder
*/
- public function setApiKey($apiKey)
+ public function setApiKey(string $apiKey): self
{
$this->options['apiKey'] = $apiKey;
return $this;
@@ -155,11 +176,10 @@ public function setApiKey($apiKey)
/**
* [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging.
*
- * @param string $secret [FCM only] The Server key of your project from
- * Firebase console
+ * @param string $secret [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging.
* @return $this Fluent Builder
*/
- public function setSecret($secret)
+ public function setSecret(string $secret): self
{
$this->options['secret'] = $secret;
return $this;
@@ -170,36 +190,36 @@ public function setSecret($secret)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Chat.V2.CreateCredentialOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Chat.V2.CreateCredentialOptions ' . $options . ']';
}
}
+
+
+
class UpdateCredentialOptions extends Options
-{
+ {
/**
- * @param string $friendlyName A string to describe the resource
- * @param string $certificate [APN only] The URL encoded representation of the
- * certificate
- * @param string $privateKey [APN only] The URL encoded representation of the
- * private key
- * @param bool $sandbox [APN only] Whether to send the credential to sandbox
- * APNs
- * @param string $apiKey [GCM only] The API key for the project that was
- * obtained from the Google Developer console for your
- * GCM Service application credential
- * @param string $secret [FCM only] The Server key of your project from
- * Firebase console
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
+ * @param string $certificate [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A== -----END CERTIFICATE-----`
+ * @param string $privateKey [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fG... -----END RSA PRIVATE KEY-----`
+ * @param bool $sandbox [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production.
+ * @param string $apiKey [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential.
+ * @param string $secret [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging.
*/
- public function __construct($friendlyName = Values::NONE, $certificate = Values::NONE, $privateKey = Values::NONE, $sandbox = Values::NONE, $apiKey = Values::NONE, $secret = Values::NONE)
- {
+ public function __construct(
+
+ string $friendlyName = Values::NONE,
+ string $certificate = Values::NONE,
+ string $privateKey = Values::NONE,
+ bool $sandbox = Values::BOOL_NONE,
+ string $apiKey = Values::NONE,
+ string $secret = Values::NONE
+
+ ) {
$this->options['friendlyName'] = $friendlyName;
$this->options['certificate'] = $certificate;
$this->options['privateKey'] = $privateKey;
@@ -211,42 +231,34 @@ public function __construct($friendlyName = Values::NONE, $certificate = Values:
/**
* A descriptive string that you create to describe the resource. It can be up to 64 characters long.
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
}
/**
- * [APN only] The URL encoded representation of the certificate. For example,
- * `-----BEGIN CERTIFICATE-----
- * MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A==
- * -----END CERTIFICATE-----`
+ * [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A== -----END CERTIFICATE-----`
*
- * @param string $certificate [APN only] The URL encoded representation of the
- * certificate
+ * @param string $certificate [APN only] The URL encoded representation of the certificate. For example, `-----BEGIN CERTIFICATE----- MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A== -----END CERTIFICATE-----`
* @return $this Fluent Builder
*/
- public function setCertificate($certificate)
+ public function setCertificate(string $certificate): self
{
$this->options['certificate'] = $certificate;
return $this;
}
/**
- * [APN only] The URL encoded representation of the private key. For example,
- * `-----BEGIN RSA PRIVATE KEY-----
- * MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fG...
- * -----END RSA PRIVATE KEY-----`
+ * [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fG... -----END RSA PRIVATE KEY-----`
*
- * @param string $privateKey [APN only] The URL encoded representation of the
- * private key
+ * @param string $privateKey [APN only] The URL encoded representation of the private key. For example, `-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fG... -----END RSA PRIVATE KEY-----`
* @return $this Fluent Builder
*/
- public function setPrivateKey($privateKey)
+ public function setPrivateKey(string $privateKey): self
{
$this->options['privateKey'] = $privateKey;
return $this;
@@ -255,11 +267,10 @@ public function setPrivateKey($privateKey)
/**
* [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production.
*
- * @param bool $sandbox [APN only] Whether to send the credential to sandbox
- * APNs
+ * @param bool $sandbox [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production.
* @return $this Fluent Builder
*/
- public function setSandbox($sandbox)
+ public function setSandbox(bool $sandbox): self
{
$this->options['sandbox'] = $sandbox;
return $this;
@@ -268,12 +279,10 @@ public function setSandbox($sandbox)
/**
* [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential.
*
- * @param string $apiKey [GCM only] The API key for the project that was
- * obtained from the Google Developer console for your
- * GCM Service application credential
+ * @param string $apiKey [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential.
* @return $this Fluent Builder
*/
- public function setApiKey($apiKey)
+ public function setApiKey(string $apiKey): self
{
$this->options['apiKey'] = $apiKey;
return $this;
@@ -282,11 +291,10 @@ public function setApiKey($apiKey)
/**
* [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging.
*
- * @param string $secret [FCM only] The Server key of your project from
- * Firebase console
+ * @param string $secret [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging.
* @return $this Fluent Builder
*/
- public function setSecret($secret)
+ public function setSecret(string $secret): self
{
$this->options['secret'] = $secret;
return $this;
@@ -297,14 +305,10 @@ public function setSecret($secret)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Chat.V2.UpdateCredentialOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Chat.V2.UpdateCredentialOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/CredentialPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/CredentialPage.php
index 611585b..74e3942 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/CredentialPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/CredentialPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return CredentialInstance \Twilio\Rest\Chat\V2\CredentialInstance
+ */
+ public function buildInstance(array $payload): CredentialInstance
{
return new CredentialInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V2.CredentialPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/BindingContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/BindingContext.php
index e2fd7eb..ed46c12 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/BindingContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/BindingContext.php
@@ -2,53 +2,81 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Chat\V2\Service;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class BindingContext extends InstanceContext
-{
+ {
/**
* Initialize the BindingContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the resource from
- * @param string $sid The SID of the resource to fetch
- * @return \Twilio\Rest\Chat\V2\Service\BindingContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the Binding resource from.
+ * @param string $sid The SID of the Binding resource to delete.
*/
- public function __construct(Version $version, $serviceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Bindings/' . \rawurlencode($sid)
+ .'';
+ }
+
+ /**
+ * Delete the BindingInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Bindings/' . \rawurlencode($sid) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a BindingInstance
+ * Fetch the BindingInstance
*
* @return BindingInstance Fetched BindingInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): BindingInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new BindingInstance(
$this->version,
@@ -58,28 +86,18 @@ public function fetch()
);
}
- /**
- * Deletes the BindingInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Chat.V2.BindingContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/BindingInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/BindingInstance.php
index bbdbf3c..084bf70 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/BindingInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/BindingInstance.php
@@ -2,51 +2,58 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Chat\V2\Service;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $serviceSid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $endpoint
- * @property string $identity
- * @property string $credentialSid
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $endpoint
+ * @property string|null $identity
+ * @property string|null $credentialSid
* @property string $bindingType
- * @property string $messageTypes
- * @property string $url
- * @property array $links
+ * @property string[]|null $messageTypes
+ * @property string|null $url
+ * @property array|null $links
*/
class BindingInstance extends InstanceResource
{
/**
* Initialize the BindingInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the Binding resource
- * is associated with
- * @param string $sid The SID of the resource to fetch
- * @return \Twilio\Rest\Chat\V2\Service\BindingInstance
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the Binding resource from.
+ * @param string $sid The SID of the Binding resource to delete.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
@@ -59,19 +66,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $sid
'messageTypes' => Values::array_get($payload, 'message_types'),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Chat\V2\Service\BindingContext Context for this
- * BindingInstance
+ * @return BindingContext Context for this BindingInstance
*/
- protected function proxy()
+ protected function proxy(): BindingContext
{
if (!$this->context) {
$this->context = new BindingContext(
@@ -85,25 +91,27 @@ protected function proxy()
}
/**
- * Fetch a BindingInstance
+ * Delete the BindingInstance
*
- * @return BindingInstance Fetched BindingInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the BindingInstance
+ * Fetch the BindingInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return BindingInstance Fetched BindingInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): BindingInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -113,7 +121,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -132,12 +140,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Chat.V2.BindingInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/BindingList.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/BindingList.php
index e506f2e..205175f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/BindingList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/BindingList.php
@@ -2,37 +2,72 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Chat\V2\Service;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class BindingList extends ListResource
-{
+ {
/**
* Construct the BindingList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the Binding resource
- * is associated with
- * @return \Twilio\Rest\Chat\V2\Service\BindingList
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the Binding resource from.
*/
- public function __construct(Version $version, $serviceSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Bindings';
+ }
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Bindings';
+ /**
+ * Reads BindingInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return BindingInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -52,9 +87,9 @@ public function __construct(Version $version, $serviceSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -63,57 +98,35 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads BindingInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return BindingInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of BindingInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of BindingInstance
+ * @return BindingPage Page of BindingInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): BindingPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'BindingType' => Serialize::map($options['bindingType'], function ($e) {
- return $e;
- }),
- 'Identity' => Serialize::map($options['identity'], function ($e) {
- return $e;
- }),
+
+ $params = Values::of([
+ 'BindingType' =>
+ $options['bindingType'],
+ 'Identity' =>
+ Serialize::map($options['identity'], function ($e) { return $e; }),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new BindingPage($this->version, $response, $this->solution);
}
@@ -123,9 +136,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of BindingInstance
+ * @return BindingPage Page of BindingInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): BindingPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -135,15 +148,22 @@ public function getPage($targetUrl)
return new BindingPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a BindingContext
*
- * @param string $sid The SID of the resource to fetch
- * @return \Twilio\Rest\Chat\V2\Service\BindingContext
+ * @param string $sid The SID of the Binding resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): BindingContext
{
- return new BindingContext($this->version, $this->solution['serviceSid'], $sid);
+ return new BindingContext(
+ $this->version,
+ $this->solution['serviceSid'],
+ $sid
+ );
}
/**
@@ -151,8 +171,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V2.BindingList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/BindingOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/BindingOptions.php
index c2d43ef..40e9af3 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/BindingOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/BindingOptions.php
@@ -1,10 +1,16 @@
options['bindingType'] = $bindingType;
$this->options['identity'] = $identity;
}
@@ -42,11 +63,10 @@ public function __construct($bindingType = Values::NONE, $identity = Values::NON
/**
* The push technology used by the Binding resources to read. Can be: `apn`, `gcm`, or `fcm`. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info.
*
- * @param string $bindingType The push technology used by the Binding resources
- * to read
+ * @param string $bindingType The push technology used by the Binding resources to read. Can be: `apn`, `gcm`, or `fcm`. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info.
* @return $this Fluent Builder
*/
- public function setBindingType($bindingType)
+ public function setBindingType(array $bindingType): self
{
$this->options['bindingType'] = $bindingType;
return $this;
@@ -55,10 +75,10 @@ public function setBindingType($bindingType)
/**
* The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more details.
*
- * @param string $identity The `identity` value of the resources to read
+ * @param string[] $identity The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more details.
* @return $this Fluent Builder
*/
- public function setIdentity($identity)
+ public function setIdentity(array $identity): self
{
$this->options['identity'] = $identity;
return $this;
@@ -69,14 +89,10 @@ public function setIdentity($identity)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Chat.V2.ReadBindingOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Chat.V2.ReadBindingOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/BindingPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/BindingPage.php
index e31a941..1e75544 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/BindingPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/BindingPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return BindingInstance \Twilio\Rest\Chat\V2\Service\BindingInstance
+ */
+ public function buildInstance(array $payload): BindingInstance
{
return new BindingInstance($this->version, $payload, $this->solution['serviceSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V2.BindingPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/InviteContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/InviteContext.php
index 4c50ef9..3911505 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/InviteContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/InviteContext.php
@@ -2,55 +2,86 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Chat\V2\Service\Channel;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class InviteContext extends InstanceContext
-{
+ {
/**
* Initialize the InviteContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the resource from
- * @param string $channelSid The SID of the Channel the resource to fetch
- * belongs to
- * @param string $sid The SID of the Invite resource to fetch
- * @return \Twilio\Rest\Chat\V2\Service\Channel\InviteContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the Invite resource under.
+ * @param string $channelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the new Invite resource belongs to. This value can be the Channel resource's `sid` or `unique_name`.
+ * @param string $sid The SID of the Invite resource to delete.
*/
- public function __construct(Version $version, $serviceSid, $channelSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $channelSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'channelSid' =>
+ $channelSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Channels/' . \rawurlencode($channelSid)
+ .'/Invites/' . \rawurlencode($sid)
+ .'';
+ }
+
+ /**
+ * Delete the InviteInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Invites/' . \rawurlencode($sid) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a InviteInstance
+ * Fetch the InviteInstance
*
* @return InviteInstance Fetched InviteInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): InviteInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new InviteInstance(
$this->version,
@@ -61,28 +92,18 @@ public function fetch()
);
}
- /**
- * Deletes the InviteInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Chat.V2.InviteContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/InviteInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/InviteInstance.php
index d5c0097..86bbe5d 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/InviteInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/InviteInstance.php
@@ -2,50 +2,57 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Chat\V2\Service\Channel;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $channelSid
- * @property string $serviceSid
- * @property string $identity
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $roleSid
- * @property string $createdBy
- * @property string $url
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $channelSid
+ * @property string|null $serviceSid
+ * @property string|null $identity
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $roleSid
+ * @property string|null $createdBy
+ * @property string|null $url
*/
class InviteInstance extends InstanceResource
{
/**
* Initialize the InviteInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $channelSid The SID of the Channel the new resource belongs to
- * @param string $sid The SID of the Invite resource to fetch
- * @return \Twilio\Rest\Chat\V2\Service\Channel\InviteInstance
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the Invite resource under.
+ * @param string $channelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the new Invite resource belongs to. This value can be the Channel resource's `sid` or `unique_name`.
+ * @param string $sid The SID of the Invite resource to delete.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $channelSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $channelSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'channelSid' => Values::array_get($payload, 'channel_sid'),
@@ -56,23 +63,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $chan
'roleSid' => Values::array_get($payload, 'role_sid'),
'createdBy' => Values::array_get($payload, 'created_by'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'channelSid' => $channelSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Chat\V2\Service\Channel\InviteContext Context for this
- * InviteInstance
+ * @return InviteContext Context for this InviteInstance
*/
- protected function proxy()
+ protected function proxy(): InviteContext
{
if (!$this->context) {
$this->context = new InviteContext(
@@ -87,25 +89,27 @@ protected function proxy()
}
/**
- * Fetch a InviteInstance
+ * Delete the InviteInstance
*
- * @return InviteInstance Fetched InviteInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the InviteInstance
+ * Fetch the InviteInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return InviteInstance Fetched InviteInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): InviteInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -115,7 +119,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -134,12 +138,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Chat.V2.InviteInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/InviteList.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/InviteList.php
index 576f735..965b193 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/InviteList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/InviteList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Chat\V2\Service\Channel;
@@ -12,52 +19,65 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class InviteList extends ListResource
-{
+ {
/**
* Construct the InviteList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $channelSid The SID of the Channel the new resource belongs to
- * @return \Twilio\Rest\Chat\V2\Service\Channel\InviteList
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the Invite resource under.
+ * @param string $channelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the new Invite resource belongs to. This value can be the Channel resource's `sid` or `unique_name`.
*/
- public function __construct(Version $version, $serviceSid, $channelSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid,
+ string $channelSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'channelSid' => $channelSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Invites';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ 'channelSid' =>
+ $channelSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Channels/' . \rawurlencode($channelSid)
+ .'/Invites';
}
/**
- * Create a new InviteInstance
+ * Create the InviteInstance
*
- * @param string $identity The `identity` value that identifies the new
- * resource's User
+ * @param string $identity The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/chat/rest/service-resource). See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more info.
* @param array|Options $options Optional Arguments
- * @return InviteInstance Newly created InviteInstance
+ * @return InviteInstance Created InviteInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($identity, $options = array())
+ public function create(string $identity, array $options = []): InviteInstance
{
+
$options = new Values($options);
- $data = Values::of(array('Identity' => $identity, 'RoleSid' => $options['roleSid'],));
+ $data = Values::of([
+ 'Identity' =>
+ $identity,
+ 'RoleSid' =>
+ $options['roleSid'],
+ ]);
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
return new InviteInstance(
$this->version,
@@ -67,82 +87,83 @@ public function create($identity, $options = array())
);
}
+
/**
- * Streams InviteInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Reads InviteInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
+ * @param int $limit Upper limit for the number of records to return. read()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
+ * page_size is defined but a limit is defined, read()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return InviteInstance[] Array of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($options, $limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
- * Reads InviteInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
+ * Streams InviteInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
+ * @param int $limit Upper limit for the number of records to return. stream()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
+ * page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return InviteInstance[] Array of results
+ * @return Stream stream of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
/**
* Retrieve a single page of InviteInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of InviteInstance
+ * @return InvitePage Page of InviteInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): InvitePage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Identity' => Serialize::map($options['identity'], function ($e) {
- return $e;
- }),
+
+ $params = Values::of([
+ 'Identity' =>
+ Serialize::map($options['identity'], function ($e) { return $e; }),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new InvitePage($this->version, $response, $this->solution);
}
@@ -152,9 +173,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of InviteInstance
+ * @return InvitePage Page of InviteInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): InvitePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -164,13 +185,16 @@ public function getPage($targetUrl)
return new InvitePage($this->version, $response, $this->solution);
}
+
/**
* Constructs a InviteContext
*
- * @param string $sid The SID of the Invite resource to fetch
- * @return \Twilio\Rest\Chat\V2\Service\Channel\InviteContext
+ * @param string $sid The SID of the Invite resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): InviteContext
{
return new InviteContext(
$this->version,
@@ -185,8 +209,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V2.InviteList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/InviteOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/InviteOptions.php
index a7e39b6..ad926de 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/InviteOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/InviteOptions.php
@@ -1,10 +1,16 @@
options['roleSid'] = $roleSid;
}
/**
* The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) assigned to the new member.
*
- * @param string $roleSid The Role assigned to the new member
+ * @param string $roleSid The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) assigned to the new member.
* @return $this Fluent Builder
*/
- public function setRoleSid($roleSid)
+ public function setRoleSid(string $roleSid): self
{
$this->options['roleSid'] = $roleSid;
return $this;
@@ -60,35 +84,35 @@ public function setRoleSid($roleSid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Chat.V2.CreateInviteOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Chat.V2.CreateInviteOptions ' . $options . ']';
}
}
+
+
class ReadInviteOptions extends Options
-{
+ {
/**
- * @param string $identity The `identity` value of the resources to read
+ * @param string[] $identity The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more details.
*/
- public function __construct($identity = Values::NONE)
- {
+ public function __construct(
+
+ array $identity = Values::ARRAY_NONE
+
+ ) {
$this->options['identity'] = $identity;
}
/**
* The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more details.
*
- * @param string $identity The `identity` value of the resources to read
+ * @param string[] $identity The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more details.
* @return $this Fluent Builder
*/
- public function setIdentity($identity)
+ public function setIdentity(array $identity): self
{
$this->options['identity'] = $identity;
return $this;
@@ -99,14 +123,10 @@ public function setIdentity($identity)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Chat.V2.ReadInviteOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Chat.V2.ReadInviteOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/InvitePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/InvitePage.php
index 8e8b527..8a513c2 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/InvitePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/InvitePage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return InviteInstance \Twilio\Rest\Chat\V2\Service\Channel\InviteInstance
+ */
+ public function buildInstance(array $payload): InviteInstance
{
- return new InviteInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['channelSid']
- );
+ return new InviteInstance($this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V2.InvitePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/MemberContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/MemberContext.php
index fea58f3..296f262 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/MemberContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/MemberContext.php
@@ -2,56 +2,91 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Chat\V2\Service\Channel;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
class MemberContext extends InstanceContext
-{
+ {
/**
* Initialize the MemberContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the resource from
- * @param string $channelSid The SID of the channel the member belongs to
- * @param string $sid The SID of the Member resource to fetch
- * @return \Twilio\Rest\Chat\V2\Service\Channel\MemberContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the Member resource under.
+ * @param string $channelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the new Member resource belongs to. This value can be the Channel resource's `sid` or `unique_name`.
+ * @param string $sid The SID of the Member resource to delete. This value can be either the Member's `sid` or its `identity` value.
*/
- public function __construct(Version $version, $serviceSid, $channelSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $channelSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'channelSid' =>
+ $channelSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Members/' . \rawurlencode($sid) . '';
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Channels/' . \rawurlencode($channelSid)
+ .'/Members/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a MemberInstance
+ * Delete the MemberInstance
+ *
+ * @param array|Options $options Optional Arguments
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(array $options = []): bool
+ {
+
+ $options = new Values($options);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled']]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
+ }
+
+
+ /**
+ * Fetch the MemberInstance
*
* @return MemberInstance Fetched MemberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): MemberInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new MemberInstance(
$this->version,
@@ -62,16 +97,6 @@ public function fetch()
);
}
- /**
- * Deletes the MemberInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Update the MemberInstance
@@ -80,25 +105,28 @@ public function delete()
* @return MemberInstance Updated MemberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): MemberInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'RoleSid' => $options['roleSid'],
- 'LastConsumedMessageIndex' => $options['lastConsumedMessageIndex'],
- 'LastConsumptionTimestamp' => Serialize::iso8601DateTime($options['lastConsumptionTimestamp']),
- 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']),
- 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']),
- 'Attributes' => $options['attributes'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'RoleSid' =>
+ $options['roleSid'],
+ 'LastConsumedMessageIndex' =>
+ $options['lastConsumedMessageIndex'],
+ 'LastConsumptionTimestamp' =>
+ Serialize::iso8601DateTime($options['lastConsumptionTimestamp']),
+ 'DateCreated' =>
+ Serialize::iso8601DateTime($options['dateCreated']),
+ 'DateUpdated' =>
+ Serialize::iso8601DateTime($options['dateUpdated']),
+ 'Attributes' =>
+ $options['attributes'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled']]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new MemberInstance(
$this->version,
@@ -109,17 +137,18 @@ public function update($options = array())
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Chat.V2.MemberContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/MemberInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/MemberInstance.php
index 24b06b0..38ee4ea 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/MemberInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/MemberInstance.php
@@ -2,53 +2,60 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Chat\V2\Service\Channel;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $channelSid
- * @property string $serviceSid
- * @property string $identity
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $roleSid
- * @property int $lastConsumedMessageIndex
- * @property \DateTime $lastConsumptionTimestamp
- * @property string $url
- * @property string $attributes
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $channelSid
+ * @property string|null $serviceSid
+ * @property string|null $identity
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $roleSid
+ * @property int|null $lastConsumedMessageIndex
+ * @property \DateTime|null $lastConsumptionTimestamp
+ * @property string|null $url
+ * @property string|null $attributes
*/
class MemberInstance extends InstanceResource
{
/**
* Initialize the MemberInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $channelSid The SID of the Channel for the member
- * @param string $sid The SID of the Member resource to fetch
- * @return \Twilio\Rest\Chat\V2\Service\Channel\MemberInstance
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the Member resource under.
+ * @param string $channelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the new Member resource belongs to. This value can be the Channel resource's `sid` or `unique_name`.
+ * @param string $sid The SID of the Member resource to delete. This value can be either the Member's `sid` or its `identity` value.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $channelSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $channelSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'channelSid' => Values::array_get($payload, 'channel_sid'),
@@ -61,23 +68,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $chan
'lastConsumptionTimestamp' => Deserialize::dateTime(Values::array_get($payload, 'last_consumption_timestamp')),
'url' => Values::array_get($payload, 'url'),
'attributes' => Values::array_get($payload, 'attributes'),
- );
+ ];
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'channelSid' => $channelSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Chat\V2\Service\Channel\MemberContext Context for this
- * MemberInstance
+ * @return MemberContext Context for this MemberInstance
*/
- protected function proxy()
+ protected function proxy(): MemberContext
{
if (!$this->context) {
$this->context = new MemberContext(
@@ -92,25 +94,28 @@ protected function proxy()
}
/**
- * Fetch a MemberInstance
+ * Delete the MemberInstance
*
- * @return MemberInstance Fetched MemberInstance
+ * @param array|Options $options Optional Arguments
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(array $options = []): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete($options);
}
/**
- * Deletes the MemberInstance
+ * Fetch the MemberInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return MemberInstance Fetched MemberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): MemberInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -120,8 +125,9 @@ public function delete()
* @return MemberInstance Updated MemberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): MemberInstance
{
+
return $this->proxy()->update($options);
}
@@ -132,7 +138,7 @@ public function update($options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -151,12 +157,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Chat.V2.MemberInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/MemberList.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/MemberList.php
index d1304d8..e8d4ffd 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/MemberList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/MemberList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Chat\V2\Service\Channel;
@@ -12,60 +19,75 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class MemberList extends ListResource
-{
+ {
/**
* Construct the MemberList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $channelSid The SID of the Channel for the member
- * @return \Twilio\Rest\Chat\V2\Service\Channel\MemberList
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the Member resource under.
+ * @param string $channelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the new Member resource belongs to. This value can be the Channel resource's `sid` or `unique_name`.
*/
- public function __construct(Version $version, $serviceSid, $channelSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid,
+ string $channelSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'channelSid' => $channelSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Members';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ 'channelSid' =>
+ $channelSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Channels/' . \rawurlencode($channelSid)
+ .'/Members';
}
/**
- * Create a new MemberInstance
+ * Create the MemberInstance
*
- * @param string $identity The `identity` value that identifies the new
- * resource's User
+ * @param string $identity The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/chat/rest/service-resource). See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more info.
* @param array|Options $options Optional Arguments
- * @return MemberInstance Newly created MemberInstance
+ * @return MemberInstance Created MemberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($identity, $options = array())
+ public function create(string $identity, array $options = []): MemberInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'Identity' => $identity,
- 'RoleSid' => $options['roleSid'],
- 'LastConsumedMessageIndex' => $options['lastConsumedMessageIndex'],
- 'LastConsumptionTimestamp' => Serialize::iso8601DateTime($options['lastConsumptionTimestamp']),
- 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']),
- 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']),
- 'Attributes' => $options['attributes'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'Identity' =>
+ $identity,
+ 'RoleSid' =>
+ $options['roleSid'],
+ 'LastConsumedMessageIndex' =>
+ $options['lastConsumedMessageIndex'],
+ 'LastConsumptionTimestamp' =>
+ Serialize::iso8601DateTime($options['lastConsumptionTimestamp']),
+ 'DateCreated' =>
+ Serialize::iso8601DateTime($options['dateCreated']),
+ 'DateUpdated' =>
+ Serialize::iso8601DateTime($options['dateUpdated']),
+ 'Attributes' =>
+ $options['attributes'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled']]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
return new MemberInstance(
$this->version,
@@ -75,82 +97,83 @@ public function create($identity, $options = array())
);
}
+
/**
- * Streams MemberInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Reads MemberInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
+ * @param int $limit Upper limit for the number of records to return. read()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
+ * page_size is defined but a limit is defined, read()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return MemberInstance[] Array of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($options, $limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
- * Reads MemberInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
+ * Streams MemberInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
+ * @param int $limit Upper limit for the number of records to return. stream()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
+ * page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return MemberInstance[] Array of results
+ * @return Stream stream of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
/**
* Retrieve a single page of MemberInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of MemberInstance
+ * @return MemberPage Page of MemberInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): MemberPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Identity' => Serialize::map($options['identity'], function ($e) {
- return $e;
- }),
+
+ $params = Values::of([
+ 'Identity' =>
+ Serialize::map($options['identity'], function ($e) { return $e; }),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new MemberPage($this->version, $response, $this->solution);
}
@@ -160,9 +183,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of MemberInstance
+ * @return MemberPage Page of MemberInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): MemberPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -172,13 +195,16 @@ public function getPage($targetUrl)
return new MemberPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a MemberContext
*
- * @param string $sid The SID of the Member resource to fetch
- * @return \Twilio\Rest\Chat\V2\Service\Channel\MemberContext
+ * @param string $sid The SID of the Member resource to delete. This value can be either the Member's `sid` or its `identity` value.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): MemberContext
{
return new MemberContext(
$this->version,
@@ -193,8 +219,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V2.MemberList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/MemberOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/MemberOptions.php
index af16241..79003e2 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/MemberOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/MemberOptions.php
@@ -1,10 +1,16 @@
options['roleSid'] = $roleSid;
$this->options['lastConsumedMessageIndex'] = $lastConsumedMessageIndex;
$this->options['lastConsumptionTimestamp'] = $lastConsumptionTimestamp;
$this->options['dateCreated'] = $dateCreated;
$this->options['dateUpdated'] = $dateUpdated;
$this->options['attributes'] = $attributes;
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
}
/**
* The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/rest/service-resource).
*
- * @param string $roleSid The SID of the Role to assign to the member
+ * @param string $roleSid The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/rest/service-resource).
* @return $this Fluent Builder
*/
- public function setRoleSid($roleSid)
+ public function setRoleSid(string $roleSid): self
{
$this->options['roleSid'] = $roleSid;
return $this;
@@ -108,11 +165,10 @@ public function setRoleSid($roleSid)
/**
* The index of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) in the [Channel](https://www.twilio.com/docs/chat/channels) that the Member has read. This parameter should only be used when recreating a Member from a backup/separate source.
*
- * @param int $lastConsumedMessageIndex The index of the last Message in the
- * Channel the Member has read
+ * @param int $lastConsumedMessageIndex The index of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) in the [Channel](https://www.twilio.com/docs/chat/channels) that the Member has read. This parameter should only be used when recreating a Member from a backup/separate source.
* @return $this Fluent Builder
*/
- public function setLastConsumedMessageIndex($lastConsumedMessageIndex)
+ public function setLastConsumedMessageIndex(int $lastConsumedMessageIndex): self
{
$this->options['lastConsumedMessageIndex'] = $lastConsumedMessageIndex;
return $this;
@@ -121,13 +177,10 @@ public function setLastConsumedMessageIndex($lastConsumedMessageIndex)
/**
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) read event for the Member within the [Channel](https://www.twilio.com/docs/chat/channels).
*
- * @param \DateTime $lastConsumptionTimestamp The ISO 8601 based timestamp
- * string representing the datetime
- * of the last Message read event
- * for the member within the Channel
+ * @param \DateTime $lastConsumptionTimestamp The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) read event for the Member within the [Channel](https://www.twilio.com/docs/chat/channels).
* @return $this Fluent Builder
*/
- public function setLastConsumptionTimestamp($lastConsumptionTimestamp)
+ public function setLastConsumptionTimestamp(\DateTime $lastConsumptionTimestamp): self
{
$this->options['lastConsumptionTimestamp'] = $lastConsumptionTimestamp;
return $this;
@@ -136,11 +189,10 @@ public function setLastConsumptionTimestamp($lastConsumptionTimestamp)
/**
* The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this parameter should only be used when a Member is being recreated from a backup/separate source.
*
- * @param \DateTime $dateCreated The ISO 8601 date and time in GMT when the
- * resource was created
+ * @param \DateTime $dateCreated The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this parameter should only be used when a Member is being recreated from a backup/separate source.
* @return $this Fluent Builder
*/
- public function setDateCreated($dateCreated)
+ public function setDateCreated(\DateTime $dateCreated): self
{
$this->options['dateCreated'] = $dateCreated;
return $this;
@@ -149,11 +201,10 @@ public function setDateCreated($dateCreated)
/**
* The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. The default value is `null`. Note that this parameter should only be used when a Member is being recreated from a backup/separate source and where a Member was previously updated.
*
- * @param \DateTime $dateUpdated The ISO 8601 date and time in GMT when the
- * resource was updated
+ * @param \DateTime $dateUpdated The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. The default value is `null`. Note that this parameter should only be used when a Member is being recreated from a backup/separate source and where a Member was previously updated.
* @return $this Fluent Builder
*/
- public function setDateUpdated($dateUpdated)
+ public function setDateUpdated(\DateTime $dateUpdated): self
{
$this->options['dateUpdated'] = $dateUpdated;
return $this;
@@ -162,50 +213,97 @@ public function setDateUpdated($dateUpdated)
/**
* A valid JSON string that contains application-specific data.
*
- * @param string $attributes A valid JSON string that contains
- * application-specific data
+ * @param string $attributes A valid JSON string that contains application-specific data.
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setAttributes(string $attributes): self
{
$this->options['attributes'] = $attributes;
return $this;
}
+ /**
+ * The X-Twilio-Webhook-Enabled HTTP request header
+ *
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
+ * @return $this Fluent Builder
+ */
+ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self
+ {
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Chat.V2.CreateMemberOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Chat.V2.CreateMemberOptions ' . $options . ']';
}
}
-class ReadMemberOptions extends Options
-{
+class DeleteMemberOptions extends Options
+ {
+ /**
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
+ */
+ public function __construct(
+
+ string $xTwilioWebhookEnabled = Values::NONE
+
+ ) {
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ }
+
+ /**
+ * The X-Twilio-Webhook-Enabled HTTP request header
+ *
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
+ * @return $this Fluent Builder
+ */
+ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self
+ {
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ return $this;
+ }
+
/**
- * @param string $identity The `identity` value of the resources to read
+ * Provide a friendly representation
+ *
+ * @return string Machine friendly representation
*/
- public function __construct($identity = Values::NONE)
+ public function __toString(): string
+ {
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Chat.V2.DeleteMemberOptions ' . $options . ']';
+ }
+}
+
+
+class ReadMemberOptions extends Options
{
+ /**
+ * @param string[] $identity The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the Member resources to read. See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more details.
+ */
+ public function __construct(
+
+ array $identity = Values::ARRAY_NONE
+
+ ) {
$this->options['identity'] = $identity;
}
/**
* The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the Member resources to read. See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more details.
*
- * @param string $identity The `identity` value of the resources to read
+ * @param string[] $identity The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the Member resources to read. See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more details.
* @return $this Fluent Builder
*/
- public function setIdentity($identity)
+ public function setIdentity(array $identity): self
{
$this->options['identity'] = $identity;
return $this;
@@ -216,52 +314,51 @@ public function setIdentity($identity)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Chat.V2.ReadMemberOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Chat.V2.ReadMemberOptions ' . $options . ']';
}
}
class UpdateMemberOptions extends Options
-{
+ {
/**
- * @param string $roleSid The SID of the Role to assign to the member
- * @param int $lastConsumedMessageIndex The index of the last consumed Message
- * for the Channel for the Member
- * @param \DateTime $lastConsumptionTimestamp The ISO 8601 based timestamp
- * string representing the datetime
- * of the last Message read event
- * for the Member within the Channel
- * @param \DateTime $dateCreated The ISO 8601 date and time in GMT when the
- * resource was created
- * @param \DateTime $dateUpdated The ISO 8601 date and time in GMT when the
- * resource was updated
- * @param string $attributes A valid JSON string that contains
- * application-specific data
+ * @param string $roleSid The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/rest/service-resource).
+ * @param int $lastConsumedMessageIndex The index of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) that the Member has read within the [Channel](https://www.twilio.com/docs/chat/channels).
+ * @param \DateTime $lastConsumptionTimestamp The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) read event for the Member within the [Channel](https://www.twilio.com/docs/chat/channels).
+ * @param \DateTime $dateCreated The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this parameter should only be used when a Member is being recreated from a backup/separate source.
+ * @param \DateTime $dateUpdated The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated.
+ * @param string $attributes A valid JSON string that contains application-specific data.
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
*/
- public function __construct($roleSid = Values::NONE, $lastConsumedMessageIndex = Values::NONE, $lastConsumptionTimestamp = Values::NONE, $dateCreated = Values::NONE, $dateUpdated = Values::NONE, $attributes = Values::NONE)
- {
+ public function __construct(
+
+ string $roleSid = Values::NONE,
+ int $lastConsumedMessageIndex = Values::INT_NONE,
+ \DateTime $lastConsumptionTimestamp = null,
+ \DateTime $dateCreated = null,
+ \DateTime $dateUpdated = null,
+ string $attributes = Values::NONE,
+ string $xTwilioWebhookEnabled = Values::NONE
+
+ ) {
$this->options['roleSid'] = $roleSid;
$this->options['lastConsumedMessageIndex'] = $lastConsumedMessageIndex;
$this->options['lastConsumptionTimestamp'] = $lastConsumptionTimestamp;
$this->options['dateCreated'] = $dateCreated;
$this->options['dateUpdated'] = $dateUpdated;
$this->options['attributes'] = $attributes;
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
}
/**
* The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/rest/service-resource).
*
- * @param string $roleSid The SID of the Role to assign to the member
+ * @param string $roleSid The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/rest/service-resource).
* @return $this Fluent Builder
*/
- public function setRoleSid($roleSid)
+ public function setRoleSid(string $roleSid): self
{
$this->options['roleSid'] = $roleSid;
return $this;
@@ -270,11 +367,10 @@ public function setRoleSid($roleSid)
/**
* The index of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) that the Member has read within the [Channel](https://www.twilio.com/docs/chat/channels).
*
- * @param int $lastConsumedMessageIndex The index of the last consumed Message
- * for the Channel for the Member
+ * @param int $lastConsumedMessageIndex The index of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) that the Member has read within the [Channel](https://www.twilio.com/docs/chat/channels).
* @return $this Fluent Builder
*/
- public function setLastConsumedMessageIndex($lastConsumedMessageIndex)
+ public function setLastConsumedMessageIndex(int $lastConsumedMessageIndex): self
{
$this->options['lastConsumedMessageIndex'] = $lastConsumedMessageIndex;
return $this;
@@ -283,13 +379,10 @@ public function setLastConsumedMessageIndex($lastConsumedMessageIndex)
/**
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) read event for the Member within the [Channel](https://www.twilio.com/docs/chat/channels).
*
- * @param \DateTime $lastConsumptionTimestamp The ISO 8601 based timestamp
- * string representing the datetime
- * of the last Message read event
- * for the Member within the Channel
+ * @param \DateTime $lastConsumptionTimestamp The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) read event for the Member within the [Channel](https://www.twilio.com/docs/chat/channels).
* @return $this Fluent Builder
*/
- public function setLastConsumptionTimestamp($lastConsumptionTimestamp)
+ public function setLastConsumptionTimestamp(\DateTime $lastConsumptionTimestamp): self
{
$this->options['lastConsumptionTimestamp'] = $lastConsumptionTimestamp;
return $this;
@@ -298,11 +391,10 @@ public function setLastConsumptionTimestamp($lastConsumptionTimestamp)
/**
* The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this parameter should only be used when a Member is being recreated from a backup/separate source.
*
- * @param \DateTime $dateCreated The ISO 8601 date and time in GMT when the
- * resource was created
+ * @param \DateTime $dateCreated The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this parameter should only be used when a Member is being recreated from a backup/separate source.
* @return $this Fluent Builder
*/
- public function setDateCreated($dateCreated)
+ public function setDateCreated(\DateTime $dateCreated): self
{
$this->options['dateCreated'] = $dateCreated;
return $this;
@@ -311,11 +403,10 @@ public function setDateCreated($dateCreated)
/**
* The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated.
*
- * @param \DateTime $dateUpdated The ISO 8601 date and time in GMT when the
- * resource was updated
+ * @param \DateTime $dateUpdated The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated.
* @return $this Fluent Builder
*/
- public function setDateUpdated($dateUpdated)
+ public function setDateUpdated(\DateTime $dateUpdated): self
{
$this->options['dateUpdated'] = $dateUpdated;
return $this;
@@ -324,29 +415,36 @@ public function setDateUpdated($dateUpdated)
/**
* A valid JSON string that contains application-specific data.
*
- * @param string $attributes A valid JSON string that contains
- * application-specific data
+ * @param string $attributes A valid JSON string that contains application-specific data.
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setAttributes(string $attributes): self
{
$this->options['attributes'] = $attributes;
return $this;
}
+ /**
+ * The X-Twilio-Webhook-Enabled HTTP request header
+ *
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
+ * @return $this Fluent Builder
+ */
+ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self
+ {
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Chat.V2.UpdateMemberOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Chat.V2.UpdateMemberOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/MemberPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/MemberPage.php
index f4eb1c0..5216f63 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/MemberPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/MemberPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return MemberInstance \Twilio\Rest\Chat\V2\Service\Channel\MemberInstance
+ */
+ public function buildInstance(array $payload): MemberInstance
{
- return new MemberInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['channelSid']
- );
+ return new MemberInstance($this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V2.MemberPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/MessageContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/MessageContext.php
index a396f56..bed59b8 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/MessageContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/MessageContext.php
@@ -2,57 +2,91 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Chat\V2\Service\Channel;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
class MessageContext extends InstanceContext
-{
+ {
/**
* Initialize the MessageContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the resource from
- * @param string $channelSid The SID of the Channel the message to fetch
- * belongs to
- * @param string $sid The SID of the Message resource to fetch
- * @return \Twilio\Rest\Chat\V2\Service\Channel\MessageContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the Message resource under.
+ * @param string $channelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the new Message resource belongs to. This value can be the Channel resource's `sid` or `unique_name`.
+ * @param string $sid The SID of the Message resource to delete.
*/
- public function __construct(Version $version, $serviceSid, $channelSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $channelSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'channelSid' =>
+ $channelSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Messages/' . \rawurlencode($sid) . '';
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Channels/' . \rawurlencode($channelSid)
+ .'/Messages/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a MessageInstance
+ * Delete the MessageInstance
+ *
+ * @param array|Options $options Optional Arguments
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(array $options = []): bool
+ {
+
+ $options = new Values($options);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled']]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
+ }
+
+
+ /**
+ * Fetch the MessageInstance
*
* @return MessageInstance Fetched MessageInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): MessageInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new MessageInstance(
$this->version,
@@ -63,16 +97,6 @@ public function fetch()
);
}
- /**
- * Deletes the MessageInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Update the MessageInstance
@@ -81,25 +105,28 @@ public function delete()
* @return MessageInstance Updated MessageInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): MessageInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'Body' => $options['body'],
- 'Attributes' => $options['attributes'],
- 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']),
- 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']),
- 'LastUpdatedBy' => $options['lastUpdatedBy'],
- 'From' => $options['from'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'Body' =>
+ $options['body'],
+ 'Attributes' =>
+ $options['attributes'],
+ 'DateCreated' =>
+ Serialize::iso8601DateTime($options['dateCreated']),
+ 'DateUpdated' =>
+ Serialize::iso8601DateTime($options['dateUpdated']),
+ 'LastUpdatedBy' =>
+ $options['lastUpdatedBy'],
+ 'From' =>
+ $options['from'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled']]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new MessageInstance(
$this->version,
@@ -110,17 +137,18 @@ public function update($options = array())
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Chat.V2.MessageContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/MessageInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/MessageInstance.php
index b0bfd94..f43ac45 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/MessageInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/MessageInstance.php
@@ -2,58 +2,64 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Chat\V2\Service\Channel;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $attributes
- * @property string $serviceSid
- * @property string $to
- * @property string $channelSid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $lastUpdatedBy
- * @property bool $wasEdited
- * @property string $from
- * @property string $body
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $attributes
+ * @property string|null $serviceSid
+ * @property string|null $to
+ * @property string|null $channelSid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $lastUpdatedBy
+ * @property bool|null $wasEdited
+ * @property string|null $from
+ * @property string|null $body
* @property int $index
- * @property string $type
- * @property array $media
- * @property string $url
+ * @property string|null $type
+ * @property array|null $media
+ * @property string|null $url
*/
class MessageInstance extends InstanceResource
{
/**
* Initialize the MessageInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $channelSid The SID of the Channel the Message resource
- * belongs to
- * @param string $sid The SID of the Message resource to fetch
- * @return \Twilio\Rest\Chat\V2\Service\Channel\MessageInstance
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the Message resource under.
+ * @param string $channelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the new Message resource belongs to. This value can be the Channel resource's `sid` or `unique_name`.
+ * @param string $sid The SID of the Message resource to delete.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $channelSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $channelSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'attributes' => Values::array_get($payload, 'attributes'),
@@ -70,23 +76,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $chan
'type' => Values::array_get($payload, 'type'),
'media' => Values::array_get($payload, 'media'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'channelSid' => $channelSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Chat\V2\Service\Channel\MessageContext Context for this
- * MessageInstance
+ * @return MessageContext Context for this MessageInstance
*/
- protected function proxy()
+ protected function proxy(): MessageContext
{
if (!$this->context) {
$this->context = new MessageContext(
@@ -101,25 +102,28 @@ protected function proxy()
}
/**
- * Fetch a MessageInstance
+ * Delete the MessageInstance
*
- * @return MessageInstance Fetched MessageInstance
+ * @param array|Options $options Optional Arguments
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(array $options = []): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete($options);
}
/**
- * Deletes the MessageInstance
+ * Fetch the MessageInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return MessageInstance Fetched MessageInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): MessageInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -129,8 +133,9 @@ public function delete()
* @return MessageInstance Updated MessageInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): MessageInstance
{
+
return $this->proxy()->update($options);
}
@@ -141,7 +146,7 @@ public function update($options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -160,12 +165,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Chat.V2.MessageInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/MessageList.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/MessageList.php
index 399b83d..61c612f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/MessageList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/MessageList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Chat\V2\Service\Channel;
@@ -12,59 +19,74 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class MessageList extends ListResource
-{
+ {
/**
* Construct the MessageList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $channelSid The SID of the Channel the Message resource
- * belongs to
- * @return \Twilio\Rest\Chat\V2\Service\Channel\MessageList
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the Message resource under.
+ * @param string $channelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the new Message resource belongs to. This value can be the Channel resource's `sid` or `unique_name`.
*/
- public function __construct(Version $version, $serviceSid, $channelSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid,
+ string $channelSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'channelSid' => $channelSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Messages';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ 'channelSid' =>
+ $channelSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Channels/' . \rawurlencode($channelSid)
+ .'/Messages';
}
/**
- * Create a new MessageInstance
+ * Create the MessageInstance
*
* @param array|Options $options Optional Arguments
- * @return MessageInstance Newly created MessageInstance
+ * @return MessageInstance Created MessageInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($options = array())
+ public function create(array $options = []): MessageInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'From' => $options['from'],
- 'Attributes' => $options['attributes'],
- 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']),
- 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']),
- 'LastUpdatedBy' => $options['lastUpdatedBy'],
- 'Body' => $options['body'],
- 'MediaSid' => $options['mediaSid'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'From' =>
+ $options['from'],
+ 'Attributes' =>
+ $options['attributes'],
+ 'DateCreated' =>
+ Serialize::iso8601DateTime($options['dateCreated']),
+ 'DateUpdated' =>
+ Serialize::iso8601DateTime($options['dateUpdated']),
+ 'LastUpdatedBy' =>
+ $options['lastUpdatedBy'],
+ 'Body' =>
+ $options['body'],
+ 'MediaSid' =>
+ $options['mediaSid'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled']]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
return new MessageInstance(
$this->version,
@@ -74,80 +96,83 @@ public function create($options = array())
);
}
+
/**
- * Streams MessageInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Reads MessageInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
+ * @param int $limit Upper limit for the number of records to return. read()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
+ * page_size is defined but a limit is defined, read()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return MessageInstance[] Array of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($options, $limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
- * Reads MessageInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
+ * Streams MessageInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
+ * @param int $limit Upper limit for the number of records to return. stream()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
+ * page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return MessageInstance[] Array of results
+ * @return Stream stream of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
/**
* Retrieve a single page of MessageInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of MessageInstance
+ * @return MessagePage Page of MessageInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): MessagePage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Order' => $options['order'],
+
+ $params = Values::of([
+ 'Order' =>
+ $options['order'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new MessagePage($this->version, $response, $this->solution);
}
@@ -157,9 +182,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of MessageInstance
+ * @return MessagePage Page of MessageInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): MessagePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -169,13 +194,16 @@ public function getPage($targetUrl)
return new MessagePage($this->version, $response, $this->solution);
}
+
/**
* Constructs a MessageContext
*
- * @param string $sid The SID of the Message resource to fetch
- * @return \Twilio\Rest\Chat\V2\Service\Channel\MessageContext
+ * @param string $sid The SID of the Message resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): MessageContext
{
return new MessageContext(
$this->version,
@@ -190,8 +218,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V2.MessageList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/MessageOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/MessageOptions.php
index 9244dec..e85bc39 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/MessageOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/MessageOptions.php
@@ -1,10 +1,16 @@
options['from'] = $from;
$this->options['attributes'] = $attributes;
$this->options['dateCreated'] = $dateCreated;
@@ -85,15 +153,16 @@ public function __construct($from = Values::NONE, $attributes = Values::NONE, $d
$this->options['lastUpdatedBy'] = $lastUpdatedBy;
$this->options['body'] = $body;
$this->options['mediaSid'] = $mediaSid;
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
}
/**
* The [Identity](https://www.twilio.com/docs/chat/identity) of the new message's author. The default value is `system`.
*
- * @param string $from The Identity of the new message's author
+ * @param string $from The [Identity](https://www.twilio.com/docs/chat/identity) of the new message's author. The default value is `system`.
* @return $this Fluent Builder
*/
- public function setFrom($from)
+ public function setFrom(string $from): self
{
$this->options['from'] = $from;
return $this;
@@ -102,11 +171,10 @@ public function setFrom($from)
/**
* A valid JSON string that contains application-specific data.
*
- * @param string $attributes A valid JSON string that contains
- * application-specific data
+ * @param string $attributes A valid JSON string that contains application-specific data.
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setAttributes(string $attributes): self
{
$this->options['attributes'] = $attributes;
return $this;
@@ -115,11 +183,10 @@ public function setAttributes($attributes)
/**
* The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. This parameter should only be used when a Chat's history is being recreated from a backup/separate source.
*
- * @param \DateTime $dateCreated The ISO 8601 date and time in GMT when the
- * resource was created
+ * @param \DateTime $dateCreated The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. This parameter should only be used when a Chat's history is being recreated from a backup/separate source.
* @return $this Fluent Builder
*/
- public function setDateCreated($dateCreated)
+ public function setDateCreated(\DateTime $dateCreated): self
{
$this->options['dateCreated'] = $dateCreated;
return $this;
@@ -128,11 +195,10 @@ public function setDateCreated($dateCreated)
/**
* The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated.
*
- * @param \DateTime $dateUpdated The ISO 8601 date and time in GMT when the
- * resource was updated
+ * @param \DateTime $dateUpdated The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated.
* @return $this Fluent Builder
*/
- public function setDateUpdated($dateUpdated)
+ public function setDateUpdated(\DateTime $dateUpdated): self
{
$this->options['dateUpdated'] = $dateUpdated;
return $this;
@@ -141,11 +207,10 @@ public function setDateUpdated($dateUpdated)
/**
* The [Identity](https://www.twilio.com/docs/chat/identity) of the User who last updated the Message, if applicable.
*
- * @param string $lastUpdatedBy The Identity of the User who last updated the
- * Message
+ * @param string $lastUpdatedBy The [Identity](https://www.twilio.com/docs/chat/identity) of the User who last updated the Message, if applicable.
* @return $this Fluent Builder
*/
- public function setLastUpdatedBy($lastUpdatedBy)
+ public function setLastUpdatedBy(string $lastUpdatedBy): self
{
$this->options['lastUpdatedBy'] = $lastUpdatedBy;
return $this;
@@ -154,10 +219,10 @@ public function setLastUpdatedBy($lastUpdatedBy)
/**
* The message to send to the channel. Can be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string.
*
- * @param string $body The message to send to the channel
+ * @param string $body The message to send to the channel. Can be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string.
* @return $this Fluent Builder
*/
- public function setBody($body)
+ public function setBody(string $body): self
{
$this->options['body'] = $body;
return $this;
@@ -166,49 +231,97 @@ public function setBody($body)
/**
* The SID of the [Media](https://www.twilio.com/docs/chat/rest/media) to attach to the new Message.
*
- * @param string $mediaSid The Media Sid to be attached to the new Message
+ * @param string $mediaSid The SID of the [Media](https://www.twilio.com/docs/chat/rest/media) to attach to the new Message.
* @return $this Fluent Builder
*/
- public function setMediaSid($mediaSid)
+ public function setMediaSid(string $mediaSid): self
{
$this->options['mediaSid'] = $mediaSid;
return $this;
}
+ /**
+ * The X-Twilio-Webhook-Enabled HTTP request header
+ *
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
+ * @return $this Fluent Builder
+ */
+ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self
+ {
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Chat.V2.CreateMessageOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Chat.V2.CreateMessageOptions ' . $options . ']';
}
}
-class ReadMessageOptions extends Options
-{
+class DeleteMessageOptions extends Options
+ {
+ /**
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
+ */
+ public function __construct(
+
+ string $xTwilioWebhookEnabled = Values::NONE
+
+ ) {
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ }
+
+ /**
+ * The X-Twilio-Webhook-Enabled HTTP request header
+ *
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
+ * @return $this Fluent Builder
+ */
+ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self
+ {
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ return $this;
+ }
+
/**
- * @param string $order The sort order of the returned messages
+ * Provide a friendly representation
+ *
+ * @return string Machine friendly representation
*/
- public function __construct($order = Values::NONE)
+ public function __toString(): string
+ {
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Chat.V2.DeleteMessageOptions ' . $options . ']';
+ }
+}
+
+
+class ReadMessageOptions extends Options
{
+ /**
+ * @param string $order The sort order of the returned messages. Can be: `asc` (ascending) or `desc` (descending) with `asc` as the default.
+ */
+ public function __construct(
+
+ string $order = Values::NONE
+
+ ) {
$this->options['order'] = $order;
}
/**
* The sort order of the returned messages. Can be: `asc` (ascending) or `desc` (descending) with `asc` as the default.
*
- * @param string $order The sort order of the returned messages
+ * @param string $order The sort order of the returned messages. Can be: `asc` (ascending) or `desc` (descending) with `asc` as the default.
* @return $this Fluent Builder
*/
- public function setOrder($order)
+ public function setOrder(string $order): self
{
$this->options['order'] = $order;
return $this;
@@ -219,49 +332,51 @@ public function setOrder($order)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Chat.V2.ReadMessageOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Chat.V2.ReadMessageOptions ' . $options . ']';
}
}
class UpdateMessageOptions extends Options
-{
+ {
/**
- * @param string $body The message to send to the channel
- * @param string $attributes A valid JSON string that contains
- * application-specific data
- * @param \DateTime $dateCreated The ISO 8601 date and time in GMT when the
- * resource was created
- * @param \DateTime $dateUpdated The ISO 8601 date and time in GMT when the
- * resource was updated
- * @param string $lastUpdatedBy The Identity of the User who last updated the
- * Message, if applicable
- * @param string $from The Identity of the message's author
+ * @param string $body The message to send to the channel. Can be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string.
+ * @param string $attributes A valid JSON string that contains application-specific data.
+ * @param \DateTime $dateCreated The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. This parameter should only be used when a Chat's history is being recreated from a backup/separate source.
+ * @param \DateTime $dateUpdated The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated.
+ * @param string $lastUpdatedBy The [Identity](https://www.twilio.com/docs/chat/identity) of the User who last updated the Message, if applicable.
+ * @param string $from The [Identity](https://www.twilio.com/docs/chat/identity) of the message's author.
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
*/
- public function __construct($body = Values::NONE, $attributes = Values::NONE, $dateCreated = Values::NONE, $dateUpdated = Values::NONE, $lastUpdatedBy = Values::NONE, $from = Values::NONE)
- {
+ public function __construct(
+
+ string $body = Values::NONE,
+ string $attributes = Values::NONE,
+ \DateTime $dateCreated = null,
+ \DateTime $dateUpdated = null,
+ string $lastUpdatedBy = Values::NONE,
+ string $from = Values::NONE,
+ string $xTwilioWebhookEnabled = Values::NONE
+
+ ) {
$this->options['body'] = $body;
$this->options['attributes'] = $attributes;
$this->options['dateCreated'] = $dateCreated;
$this->options['dateUpdated'] = $dateUpdated;
$this->options['lastUpdatedBy'] = $lastUpdatedBy;
$this->options['from'] = $from;
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
}
/**
* The message to send to the channel. Can be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string.
*
- * @param string $body The message to send to the channel
+ * @param string $body The message to send to the channel. Can be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string.
* @return $this Fluent Builder
*/
- public function setBody($body)
+ public function setBody(string $body): self
{
$this->options['body'] = $body;
return $this;
@@ -270,11 +385,10 @@ public function setBody($body)
/**
* A valid JSON string that contains application-specific data.
*
- * @param string $attributes A valid JSON string that contains
- * application-specific data
+ * @param string $attributes A valid JSON string that contains application-specific data.
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setAttributes(string $attributes): self
{
$this->options['attributes'] = $attributes;
return $this;
@@ -283,11 +397,10 @@ public function setAttributes($attributes)
/**
* The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. This parameter should only be used when a Chat's history is being recreated from a backup/separate source.
*
- * @param \DateTime $dateCreated The ISO 8601 date and time in GMT when the
- * resource was created
+ * @param \DateTime $dateCreated The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. This parameter should only be used when a Chat's history is being recreated from a backup/separate source.
* @return $this Fluent Builder
*/
- public function setDateCreated($dateCreated)
+ public function setDateCreated(\DateTime $dateCreated): self
{
$this->options['dateCreated'] = $dateCreated;
return $this;
@@ -296,11 +409,10 @@ public function setDateCreated($dateCreated)
/**
* The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated.
*
- * @param \DateTime $dateUpdated The ISO 8601 date and time in GMT when the
- * resource was updated
+ * @param \DateTime $dateUpdated The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated.
* @return $this Fluent Builder
*/
- public function setDateUpdated($dateUpdated)
+ public function setDateUpdated(\DateTime $dateUpdated): self
{
$this->options['dateUpdated'] = $dateUpdated;
return $this;
@@ -309,11 +421,10 @@ public function setDateUpdated($dateUpdated)
/**
* The [Identity](https://www.twilio.com/docs/chat/identity) of the User who last updated the Message, if applicable.
*
- * @param string $lastUpdatedBy The Identity of the User who last updated the
- * Message, if applicable
+ * @param string $lastUpdatedBy The [Identity](https://www.twilio.com/docs/chat/identity) of the User who last updated the Message, if applicable.
* @return $this Fluent Builder
*/
- public function setLastUpdatedBy($lastUpdatedBy)
+ public function setLastUpdatedBy(string $lastUpdatedBy): self
{
$this->options['lastUpdatedBy'] = $lastUpdatedBy;
return $this;
@@ -322,28 +433,36 @@ public function setLastUpdatedBy($lastUpdatedBy)
/**
* The [Identity](https://www.twilio.com/docs/chat/identity) of the message's author.
*
- * @param string $from The Identity of the message's author
+ * @param string $from The [Identity](https://www.twilio.com/docs/chat/identity) of the message's author.
* @return $this Fluent Builder
*/
- public function setFrom($from)
+ public function setFrom(string $from): self
{
$this->options['from'] = $from;
return $this;
}
+ /**
+ * The X-Twilio-Webhook-Enabled HTTP request header
+ *
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
+ * @return $this Fluent Builder
+ */
+ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self
+ {
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Chat.V2.UpdateMessageOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Chat.V2.UpdateMessageOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/MessagePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/MessagePage.php
index 4e213df..d060e3e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/MessagePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/MessagePage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return MessageInstance \Twilio\Rest\Chat\V2\Service\Channel\MessageInstance
+ */
+ public function buildInstance(array $payload): MessageInstance
{
- return new MessageInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['channelSid']
- );
+ return new MessageInstance($this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V2.MessagePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/WebhookContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/WebhookContext.php
index f6a84fc..fbeae95 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/WebhookContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/WebhookContext.php
@@ -2,58 +2,88 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Chat\V2\Service\Channel;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
class WebhookContext extends InstanceContext
-{
+ {
/**
* Initialize the WebhookContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service with the Channel to fetch
- * the Webhook resource from
- * @param string $channelSid The SID of the Channel the resource to fetch
- * belongs to
- * @param string $sid The SID of the Channel Webhook resource to fetch
- * @return \Twilio\Rest\Chat\V2\Service\Channel\WebhookContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) with the Channel to create the Webhook resource under.
+ * @param string $channelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the new Channel Webhook resource belongs to. This value can be the Channel resource's `sid` or `unique_name`.
+ * @param string $sid The SID of the Channel Webhook resource to delete.
*/
- public function __construct(Version $version, $serviceSid, $channelSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $channelSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'channelSid' =>
+ $channelSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Channels/' . \rawurlencode($channelSid)
+ .'/Webhooks/' . \rawurlencode($sid)
+ .'';
+ }
+
+ /**
+ * Delete the WebhookInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Webhooks/' . \rawurlencode($sid) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a WebhookInstance
+ * Fetch the WebhookInstance
*
* @return WebhookInstance Fetched WebhookInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): WebhookInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new WebhookInstance(
$this->version,
@@ -64,6 +94,7 @@ public function fetch()
);
}
+
/**
* Update the WebhookInstance
*
@@ -71,29 +102,28 @@ public function fetch()
* @return WebhookInstance Updated WebhookInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): WebhookInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'Configuration.Url' => $options['configurationUrl'],
- 'Configuration.Method' => $options['configurationMethod'],
- 'Configuration.Filters' => Serialize::map($options['configurationFilters'], function ($e) {
- return $e;
- }),
- 'Configuration.Triggers' => Serialize::map($options['configurationTriggers'], function ($e) {
- return $e;
- }),
- 'Configuration.FlowSid' => $options['configurationFlowSid'],
- 'Configuration.RetryCount' => $options['configurationRetryCount'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'Configuration.Url' =>
+ $options['configurationUrl'],
+ 'Configuration.Method' =>
+ $options['configurationMethod'],
+ 'Configuration.Filters' =>
+ Serialize::map($options['configurationFilters'], function ($e) { return $e; }),
+ 'Configuration.Triggers' =>
+ Serialize::map($options['configurationTriggers'], function ($e) { return $e; }),
+ 'Configuration.FlowSid' =>
+ $options['configurationFlowSid'],
+ 'Configuration.RetryCount' =>
+ $options['configurationRetryCount'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new WebhookInstance(
$this->version,
@@ -104,28 +134,18 @@ public function update($options = array())
);
}
- /**
- * Deletes the WebhookInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Chat.V2.WebhookContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/WebhookInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/WebhookInstance.php
index 36b1b61..47b69e9 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/WebhookInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/WebhookInstance.php
@@ -2,51 +2,57 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Chat\V2\Service\Channel;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $channelSid
- * @property string $type
- * @property string $url
- * @property array $configuration
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $channelSid
+ * @property string|null $type
+ * @property string|null $url
+ * @property array|null $configuration
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
*/
class WebhookInstance extends InstanceResource
{
/**
* Initialize the WebhookInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the Channel Webhook
- * resource is associated with
- * @param string $channelSid The SID of the Channel the Channel Webhook
- * resource belongs to
- * @param string $sid The SID of the Channel Webhook resource to fetch
- * @return \Twilio\Rest\Chat\V2\Service\Channel\WebhookInstance
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) with the Channel to create the Webhook resource under.
+ * @param string $channelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the new Channel Webhook resource belongs to. This value can be the Channel resource's `sid` or `unique_name`.
+ * @param string $sid The SID of the Channel Webhook resource to delete.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $channelSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $channelSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
@@ -56,23 +62,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $chan
'configuration' => Values::array_get($payload, 'configuration'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- );
+ ];
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'channelSid' => $channelSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Chat\V2\Service\Channel\WebhookContext Context for this
- * WebhookInstance
+ * @return WebhookContext Context for this WebhookInstance
*/
- protected function proxy()
+ protected function proxy(): WebhookContext
{
if (!$this->context) {
$this->context = new WebhookContext(
@@ -87,37 +88,40 @@ protected function proxy()
}
/**
- * Fetch a WebhookInstance
+ * Delete the WebhookInstance
*
- * @return WebhookInstance Fetched WebhookInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Update the WebhookInstance
+ * Fetch the WebhookInstance
*
- * @param array|Options $options Optional Arguments
- * @return WebhookInstance Updated WebhookInstance
+ * @return WebhookInstance Fetched WebhookInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): WebhookInstance
{
- return $this->proxy()->update($options);
+
+ return $this->proxy()->fetch();
}
/**
- * Deletes the WebhookInstance
+ * Update the WebhookInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return WebhookInstance Updated WebhookInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): WebhookInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->update($options);
}
/**
@@ -127,7 +131,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -146,12 +150,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Chat.V2.WebhookInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/WebhookList.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/WebhookList.php
index 22be10d..45f7cff 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/WebhookList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/WebhookList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Chat\V2\Service\Channel;
@@ -12,59 +19,85 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class WebhookList extends ListResource
-{
+ {
/**
* Construct the WebhookList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the Channel Webhook
- * resource is associated with
- * @param string $channelSid The SID of the Channel the Channel Webhook
- * resource belongs to
- * @return \Twilio\Rest\Chat\V2\Service\Channel\WebhookList
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) with the Channel to create the Webhook resource under.
+ * @param string $channelSid The SID of the [Channel](https://www.twilio.com/docs/chat/channels) the new Channel Webhook resource belongs to. This value can be the Channel resource's `sid` or `unique_name`.
*/
- public function __construct(Version $version, $serviceSid, $channelSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid,
+ string $channelSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'channelSid' => $channelSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Webhooks';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ 'channelSid' =>
+ $channelSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Channels/' . \rawurlencode($channelSid)
+ .'/Webhooks';
}
/**
- * Streams WebhookInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the WebhookInstance
*
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @param string $type
+ * @param array|Options $options Optional Arguments
+ * @return WebhookInstance Created WebhookInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($limit = null, $pageSize = null)
+ public function create(string $type, array $options = []): WebhookInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'Type' =>
+ $type,
+ 'Configuration.Url' =>
+ $options['configurationUrl'],
+ 'Configuration.Method' =>
+ $options['configurationMethod'],
+ 'Configuration.Filters' =>
+ Serialize::map($options['configurationFilters'], function ($e) { return $e; }),
+ 'Configuration.Triggers' =>
+ Serialize::map($options['configurationTriggers'], function ($e) { return $e; }),
+ 'Configuration.FlowSid' =>
+ $options['configurationFlowSid'],
+ 'Configuration.RetryCount' =>
+ $options['configurationRetryCount'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new WebhookInstance(
+ $this->version,
+ $payload,
+ $this->solution['serviceSid'],
+ $this->solution['channelSid']
+ );
}
+
/**
* Reads WebhookInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -80,11 +113,38 @@ public function stream($limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return WebhookInstance[] Array of results
*/
- public function read($limit = null, $pageSize = null)
+ public function read(int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($limit, $pageSize), false);
}
+ /**
+ * Streams WebhookInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of WebhookInstance records from the API.
* Request is executed immediately
@@ -92,21 +152,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of WebhookInstance
+ * @return WebhookPage Page of WebhookInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): WebhookPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new WebhookPage($this->version, $response, $this->solution);
}
@@ -116,9 +177,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of WebhookInstance
+ * @return WebhookPage Page of WebhookInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): WebhookPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -128,54 +189,16 @@ public function getPage($targetUrl)
return new WebhookPage($this->version, $response, $this->solution);
}
- /**
- * Create a new WebhookInstance
- *
- * @param string $type The type of webhook
- * @param array|Options $options Optional Arguments
- * @return WebhookInstance Newly created WebhookInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($type, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'Type' => $type,
- 'Configuration.Url' => $options['configurationUrl'],
- 'Configuration.Method' => $options['configurationMethod'],
- 'Configuration.Filters' => Serialize::map($options['configurationFilters'], function ($e) {
- return $e;
- }),
- 'Configuration.Triggers' => Serialize::map($options['configurationTriggers'], function ($e) {
- return $e;
- }),
- 'Configuration.FlowSid' => $options['configurationFlowSid'],
- 'Configuration.RetryCount' => $options['configurationRetryCount'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new WebhookInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['channelSid']
- );
- }
/**
* Constructs a WebhookContext
*
- * @param string $sid The SID of the Channel Webhook resource to fetch
- * @return \Twilio\Rest\Chat\V2\Service\Channel\WebhookContext
+ * @param string $sid The SID of the Channel Webhook resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): WebhookContext
{
return new WebhookContext(
$this->version,
@@ -190,8 +213,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V2.WebhookList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/WebhookOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/WebhookOptions.php
index 7c96d5c..d661c61 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/WebhookOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/WebhookOptions.php
@@ -1,10 +1,16 @@
options['configurationUrl'] = $configurationUrl;
$this->options['configurationMethod'] = $configurationMethod;
$this->options['configurationFilters'] = $configurationFilters;
@@ -84,23 +116,20 @@ public function __construct($configurationUrl = Values::NONE, $configurationMeth
/**
* The URL of the webhook to call using the `configuration.method`.
*
- * @param string $configurationUrl The URL of the webhook to call
+ * @param string $configurationUrl The URL of the webhook to call using the `configuration.method`.
* @return $this Fluent Builder
*/
- public function setConfigurationUrl($configurationUrl)
+ public function setConfigurationUrl(string $configurationUrl): self
{
$this->options['configurationUrl'] = $configurationUrl;
return $this;
}
/**
- * The HTTP method used to call `configuration.url`. Can be: `GET` or `POST` and the default is `POST`.
- *
- * @param string $configurationMethod The HTTP method used to call
- * `configuration.url`
+ * @param string $configurationMethod
* @return $this Fluent Builder
*/
- public function setConfigurationMethod($configurationMethod)
+ public function setConfigurationMethod(string $configurationMethod): self
{
$this->options['configurationMethod'] = $configurationMethod;
return $this;
@@ -109,11 +138,10 @@ public function setConfigurationMethod($configurationMethod)
/**
* The events that cause us to call the Channel Webhook. Used when `type` is `webhook`. This parameter takes only one event. To specify more than one event, repeat this parameter for each event. For the list of possible events, see [Webhook Event Triggers](https://www.twilio.com/docs/chat/webhook-events#webhook-event-trigger).
*
- * @param string $configurationFilters The events that cause us to call the
- * Channel Webhook
+ * @param string[] $configurationFilters The events that cause us to call the Channel Webhook. Used when `type` is `webhook`. This parameter takes only one event. To specify more than one event, repeat this parameter for each event. For the list of possible events, see [Webhook Event Triggers](https://www.twilio.com/docs/chat/webhook-events#webhook-event-trigger).
* @return $this Fluent Builder
*/
- public function setConfigurationFilters($configurationFilters)
+ public function setConfigurationFilters(array $configurationFilters): self
{
$this->options['configurationFilters'] = $configurationFilters;
return $this;
@@ -122,12 +150,10 @@ public function setConfigurationFilters($configurationFilters)
/**
* A string that will cause us to call the webhook when it is present in a message body. This parameter takes only one trigger string. To specify more than one, repeat this parameter for each trigger string up to a total of 5 trigger strings. Used only when `type` = `trigger`.
*
- * @param string $configurationTriggers A string that will cause us to call the
- * webhook when it is found in a message
- * body
+ * @param string[] $configurationTriggers A string that will cause us to call the webhook when it is present in a message body. This parameter takes only one trigger string. To specify more than one, repeat this parameter for each trigger string up to a total of 5 trigger strings. Used only when `type` = `trigger`.
* @return $this Fluent Builder
*/
- public function setConfigurationTriggers($configurationTriggers)
+ public function setConfigurationTriggers(array $configurationTriggers): self
{
$this->options['configurationTriggers'] = $configurationTriggers;
return $this;
@@ -136,11 +162,10 @@ public function setConfigurationTriggers($configurationTriggers)
/**
* The SID of the Studio [Flow](https://www.twilio.com/docs/studio/rest-api/flow) to call when an event in `configuration.filters` occurs. Used only when `type` is `studio`.
*
- * @param string $configurationFlowSid The SID of the Studio Flow to call when
- * an event occurs
+ * @param string $configurationFlowSid The SID of the Studio [Flow](https://www.twilio.com/docs/studio/rest-api/flow) to call when an event in `configuration.filters` occurs. Used only when `type` is `studio`.
* @return $this Fluent Builder
*/
- public function setConfigurationFlowSid($configurationFlowSid)
+ public function setConfigurationFlowSid(string $configurationFlowSid): self
{
$this->options['configurationFlowSid'] = $configurationFlowSid;
return $this;
@@ -149,11 +174,10 @@ public function setConfigurationFlowSid($configurationFlowSid)
/**
* The number of times to retry the webhook if the first attempt fails. Can be an integer between 0 and 3, inclusive, and the default is 0.
*
- * @param int $configurationRetryCount The number of times to retry the webhook
- * if the first attempt fails
+ * @param int $configurationRetryCount The number of times to retry the webhook if the first attempt fails. Can be an integer between 0 and 3, inclusive, and the default is 0.
* @return $this Fluent Builder
*/
- public function setConfigurationRetryCount($configurationRetryCount)
+ public function setConfigurationRetryCount(int $configurationRetryCount): self
{
$this->options['configurationRetryCount'] = $configurationRetryCount;
return $this;
@@ -164,36 +188,36 @@ public function setConfigurationRetryCount($configurationRetryCount)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Chat.V2.CreateWebhookOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Chat.V2.CreateWebhookOptions ' . $options . ']';
}
}
+
+
+
class UpdateWebhookOptions extends Options
-{
+ {
/**
- * @param string $configurationUrl The URL of the webhook to call
- * @param string $configurationMethod The HTTP method used to call
- * `configuration.url`
- * @param string $configurationFilters The events that cause us to call the
- * Channel Webhook
- * @param string $configurationTriggers A string that will cause us to call the
- * webhook when it is found in a message
- * body
- * @param string $configurationFlowSid The SID of the Studio Flow to call when
- * an event occurs
- * @param int $configurationRetryCount The number of times to retry the webhook
- * if the first attempt fails
+ * @param string $configurationUrl The URL of the webhook to call using the `configuration.method`.
+ * @param string $configurationMethod
+ * @param string[] $configurationFilters The events that cause us to call the Channel Webhook. Used when `type` is `webhook`. This parameter takes only one event. To specify more than one event, repeat this parameter for each event. For the list of possible events, see [Webhook Event Triggers](https://www.twilio.com/docs/chat/webhook-events#webhook-event-trigger).
+ * @param string[] $configurationTriggers A string that will cause us to call the webhook when it is present in a message body. This parameter takes only one trigger string. To specify more than one, repeat this parameter for each trigger string up to a total of 5 trigger strings. Used only when `type` = `trigger`.
+ * @param string $configurationFlowSid The SID of the Studio [Flow](https://www.twilio.com/docs/studio/rest-api/flow) to call when an event in `configuration.filters` occurs. Used only when `type` = `studio`.
+ * @param int $configurationRetryCount The number of times to retry the webhook if the first attempt fails. Can be an integer between 0 and 3, inclusive, and the default is 0.
*/
- public function __construct($configurationUrl = Values::NONE, $configurationMethod = Values::NONE, $configurationFilters = Values::NONE, $configurationTriggers = Values::NONE, $configurationFlowSid = Values::NONE, $configurationRetryCount = Values::NONE)
- {
+ public function __construct(
+
+ string $configurationUrl = Values::NONE,
+ string $configurationMethod = Values::NONE,
+ array $configurationFilters = Values::ARRAY_NONE,
+ array $configurationTriggers = Values::ARRAY_NONE,
+ string $configurationFlowSid = Values::NONE,
+ int $configurationRetryCount = Values::INT_NONE
+
+ ) {
$this->options['configurationUrl'] = $configurationUrl;
$this->options['configurationMethod'] = $configurationMethod;
$this->options['configurationFilters'] = $configurationFilters;
@@ -205,23 +229,20 @@ public function __construct($configurationUrl = Values::NONE, $configurationMeth
/**
* The URL of the webhook to call using the `configuration.method`.
*
- * @param string $configurationUrl The URL of the webhook to call
+ * @param string $configurationUrl The URL of the webhook to call using the `configuration.method`.
* @return $this Fluent Builder
*/
- public function setConfigurationUrl($configurationUrl)
+ public function setConfigurationUrl(string $configurationUrl): self
{
$this->options['configurationUrl'] = $configurationUrl;
return $this;
}
/**
- * The HTTP method used to call `configuration.url`. Can be: `GET` or `POST` and the default is `POST`.
- *
- * @param string $configurationMethod The HTTP method used to call
- * `configuration.url`
+ * @param string $configurationMethod
* @return $this Fluent Builder
*/
- public function setConfigurationMethod($configurationMethod)
+ public function setConfigurationMethod(string $configurationMethod): self
{
$this->options['configurationMethod'] = $configurationMethod;
return $this;
@@ -230,11 +251,10 @@ public function setConfigurationMethod($configurationMethod)
/**
* The events that cause us to call the Channel Webhook. Used when `type` is `webhook`. This parameter takes only one event. To specify more than one event, repeat this parameter for each event. For the list of possible events, see [Webhook Event Triggers](https://www.twilio.com/docs/chat/webhook-events#webhook-event-trigger).
*
- * @param string $configurationFilters The events that cause us to call the
- * Channel Webhook
+ * @param string[] $configurationFilters The events that cause us to call the Channel Webhook. Used when `type` is `webhook`. This parameter takes only one event. To specify more than one event, repeat this parameter for each event. For the list of possible events, see [Webhook Event Triggers](https://www.twilio.com/docs/chat/webhook-events#webhook-event-trigger).
* @return $this Fluent Builder
*/
- public function setConfigurationFilters($configurationFilters)
+ public function setConfigurationFilters(array $configurationFilters): self
{
$this->options['configurationFilters'] = $configurationFilters;
return $this;
@@ -243,12 +263,10 @@ public function setConfigurationFilters($configurationFilters)
/**
* A string that will cause us to call the webhook when it is present in a message body. This parameter takes only one trigger string. To specify more than one, repeat this parameter for each trigger string up to a total of 5 trigger strings. Used only when `type` = `trigger`.
*
- * @param string $configurationTriggers A string that will cause us to call the
- * webhook when it is found in a message
- * body
+ * @param string[] $configurationTriggers A string that will cause us to call the webhook when it is present in a message body. This parameter takes only one trigger string. To specify more than one, repeat this parameter for each trigger string up to a total of 5 trigger strings. Used only when `type` = `trigger`.
* @return $this Fluent Builder
*/
- public function setConfigurationTriggers($configurationTriggers)
+ public function setConfigurationTriggers(array $configurationTriggers): self
{
$this->options['configurationTriggers'] = $configurationTriggers;
return $this;
@@ -257,11 +275,10 @@ public function setConfigurationTriggers($configurationTriggers)
/**
* The SID of the Studio [Flow](https://www.twilio.com/docs/studio/rest-api/flow) to call when an event in `configuration.filters` occurs. Used only when `type` = `studio`.
*
- * @param string $configurationFlowSid The SID of the Studio Flow to call when
- * an event occurs
+ * @param string $configurationFlowSid The SID of the Studio [Flow](https://www.twilio.com/docs/studio/rest-api/flow) to call when an event in `configuration.filters` occurs. Used only when `type` = `studio`.
* @return $this Fluent Builder
*/
- public function setConfigurationFlowSid($configurationFlowSid)
+ public function setConfigurationFlowSid(string $configurationFlowSid): self
{
$this->options['configurationFlowSid'] = $configurationFlowSid;
return $this;
@@ -270,11 +287,10 @@ public function setConfigurationFlowSid($configurationFlowSid)
/**
* The number of times to retry the webhook if the first attempt fails. Can be an integer between 0 and 3, inclusive, and the default is 0.
*
- * @param int $configurationRetryCount The number of times to retry the webhook
- * if the first attempt fails
+ * @param int $configurationRetryCount The number of times to retry the webhook if the first attempt fails. Can be an integer between 0 and 3, inclusive, and the default is 0.
* @return $this Fluent Builder
*/
- public function setConfigurationRetryCount($configurationRetryCount)
+ public function setConfigurationRetryCount(int $configurationRetryCount): self
{
$this->options['configurationRetryCount'] = $configurationRetryCount;
return $this;
@@ -285,14 +301,10 @@ public function setConfigurationRetryCount($configurationRetryCount)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Chat.V2.UpdateWebhookOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Chat.V2.UpdateWebhookOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/WebhookPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/WebhookPage.php
index d899499..29ae519 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/WebhookPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/Channel/WebhookPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return WebhookInstance \Twilio\Rest\Chat\V2\Service\Channel\WebhookInstance
+ */
+ public function buildInstance(array $payload): WebhookInstance
{
- return new WebhookInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['channelSid']
- );
+ return new WebhookInstance($this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V2.WebhookPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/ChannelContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/ChannelContext.php
index b365fc5..788e4a9 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/ChannelContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/ChannelContext.php
@@ -2,74 +2,106 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Chat\V2\Service;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Chat\V2\Service\Channel\InviteList;
-use Twilio\Rest\Chat\V2\Service\Channel\MemberList;
-use Twilio\Rest\Chat\V2\Service\Channel\MessageList;
-use Twilio\Rest\Chat\V2\Service\Channel\WebhookList;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+use Twilio\Rest\Chat\V2\Service\Channel\MemberList;
+use Twilio\Rest\Chat\V2\Service\Channel\InviteList;
+use Twilio\Rest\Chat\V2\Service\Channel\WebhookList;
+use Twilio\Rest\Chat\V2\Service\Channel\MessageList;
+
/**
- * @property \Twilio\Rest\Chat\V2\Service\Channel\MemberList $members
- * @property \Twilio\Rest\Chat\V2\Service\Channel\MessageList $messages
- * @property \Twilio\Rest\Chat\V2\Service\Channel\InviteList $invites
- * @property \Twilio\Rest\Chat\V2\Service\Channel\WebhookList $webhooks
+ * @property MemberList $members
+ * @property InviteList $invites
+ * @property WebhookList $webhooks
+ * @property MessageList $messages
+ * @method \Twilio\Rest\Chat\V2\Service\Channel\WebhookContext webhooks(string $sid)
* @method \Twilio\Rest\Chat\V2\Service\Channel\MemberContext members(string $sid)
* @method \Twilio\Rest\Chat\V2\Service\Channel\MessageContext messages(string $sid)
* @method \Twilio\Rest\Chat\V2\Service\Channel\InviteContext invites(string $sid)
- * @method \Twilio\Rest\Chat\V2\Service\Channel\WebhookContext webhooks(string $sid)
*/
class ChannelContext extends InstanceContext
-{
- protected $_members = null;
- protected $_messages = null;
- protected $_invites = null;
- protected $_webhooks = null;
+ {
+ protected $_members;
+ protected $_invites;
+ protected $_webhooks;
+ protected $_messages;
/**
* Initialize the ChannelContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the resource from
- * @param string $sid The SID of the resource
- * @return \Twilio\Rest\Chat\V2\Service\ChannelContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the Channel resource under.
+ * @param string $sid The SID of the Channel resource to delete. This value can be either the `sid` or the `unique_name` of the Channel resource to delete.
*/
- public function __construct(Version $version, $serviceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($sid) . '';
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Channels/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a ChannelInstance
+ * Delete the ChannelInstance
+ *
+ * @param array|Options $options Optional Arguments
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(array $options = []): bool
+ {
+
+ $options = new Values($options);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled']]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
+ }
+
+
+ /**
+ * Fetch the ChannelInstance
*
* @return ChannelInstance Fetched ChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): ChannelInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new ChannelInstance(
$this->version,
@@ -79,16 +111,6 @@ public function fetch()
);
}
- /**
- * Deletes the ChannelInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Update the ChannelInstance
@@ -97,25 +119,28 @@ public function delete()
* @return ChannelInstance Updated ChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ChannelInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'UniqueName' => $options['uniqueName'],
- 'Attributes' => $options['attributes'],
- 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']),
- 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']),
- 'CreatedBy' => $options['createdBy'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'UniqueName' =>
+ $options['uniqueName'],
+ 'Attributes' =>
+ $options['attributes'],
+ 'DateCreated' =>
+ Serialize::iso8601DateTime($options['dateCreated']),
+ 'DateUpdated' =>
+ Serialize::iso8601DateTime($options['dateUpdated']),
+ 'CreatedBy' =>
+ $options['createdBy'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled']]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new ChannelInstance(
$this->version,
@@ -125,12 +150,11 @@ public function update($options = array())
);
}
+
/**
* Access the members
- *
- * @return \Twilio\Rest\Chat\V2\Service\Channel\MemberList
*/
- protected function getMembers()
+ protected function getMembers(): MemberList
{
if (!$this->_members) {
$this->_members = new MemberList(
@@ -144,67 +168,61 @@ protected function getMembers()
}
/**
- * Access the messages
- *
- * @return \Twilio\Rest\Chat\V2\Service\Channel\MessageList
+ * Access the invites
*/
- protected function getMessages()
+ protected function getInvites(): InviteList
{
- if (!$this->_messages) {
- $this->_messages = new MessageList(
+ if (!$this->_invites) {
+ $this->_invites = new InviteList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sid']
);
}
- return $this->_messages;
+ return $this->_invites;
}
/**
- * Access the invites
- *
- * @return \Twilio\Rest\Chat\V2\Service\Channel\InviteList
+ * Access the webhooks
*/
- protected function getInvites()
+ protected function getWebhooks(): WebhookList
{
- if (!$this->_invites) {
- $this->_invites = new InviteList(
+ if (!$this->_webhooks) {
+ $this->_webhooks = new WebhookList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sid']
);
}
- return $this->_invites;
+ return $this->_webhooks;
}
/**
- * Access the webhooks
- *
- * @return \Twilio\Rest\Chat\V2\Service\Channel\WebhookList
+ * Access the messages
*/
- protected function getWebhooks()
+ protected function getMessages(): MessageList
{
- if (!$this->_webhooks) {
- $this->_webhooks = new WebhookList(
+ if (!$this->_messages) {
+ $this->_messages = new MessageList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sid']
);
}
- return $this->_webhooks;
+ return $this->_messages;
}
/**
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -219,10 +237,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -237,12 +255,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Chat.V2.ChannelContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/ChannelInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/ChannelInstance.php
index e28dbe5..33920ff 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/ChannelInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/ChannelInstance.php
@@ -2,59 +2,70 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Chat\V2\Service;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Chat\V2\Service\Channel\MemberList;
+use Twilio\Rest\Chat\V2\Service\Channel\InviteList;
+use Twilio\Rest\Chat\V2\Service\Channel\WebhookList;
+use Twilio\Rest\Chat\V2\Service\Channel\MessageList;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $friendlyName
- * @property string $uniqueName
- * @property string $attributes
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $friendlyName
+ * @property string|null $uniqueName
+ * @property string|null $attributes
* @property string $type
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $createdBy
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $createdBy
* @property int $membersCount
* @property int $messagesCount
- * @property string $url
- * @property array $links
+ * @property string|null $url
+ * @property array|null $links
*/
class ChannelInstance extends InstanceResource
{
- protected $_members = null;
- protected $_messages = null;
- protected $_invites = null;
- protected $_webhooks = null;
+ protected $_members;
+ protected $_invites;
+ protected $_webhooks;
+ protected $_messages;
/**
* Initialize the ChannelInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $sid The SID of the resource
- * @return \Twilio\Rest\Chat\V2\Service\ChannelInstance
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the Channel resource under.
+ * @param string $sid The SID of the Channel resource to delete. This value can be either the `sid` or the `unique_name` of the Channel resource to delete.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
@@ -69,19 +80,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $sid
'messagesCount' => Values::array_get($payload, 'messages_count'),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Chat\V2\Service\ChannelContext Context for this
- * ChannelInstance
+ * @return ChannelContext Context for this ChannelInstance
*/
- protected function proxy()
+ protected function proxy(): ChannelContext
{
if (!$this->context) {
$this->context = new ChannelContext(
@@ -95,25 +105,28 @@ protected function proxy()
}
/**
- * Fetch a ChannelInstance
+ * Delete the ChannelInstance
*
- * @return ChannelInstance Fetched ChannelInstance
+ * @param array|Options $options Optional Arguments
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(array $options = []): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete($options);
}
/**
- * Deletes the ChannelInstance
+ * Fetch the ChannelInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return ChannelInstance Fetched ChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): ChannelInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -123,49 +136,42 @@ public function delete()
* @return ChannelInstance Updated ChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ChannelInstance
{
+
return $this->proxy()->update($options);
}
/**
* Access the members
- *
- * @return \Twilio\Rest\Chat\V2\Service\Channel\MemberList
*/
- protected function getMembers()
+ protected function getMembers(): MemberList
{
return $this->proxy()->members;
}
/**
- * Access the messages
- *
- * @return \Twilio\Rest\Chat\V2\Service\Channel\MessageList
+ * Access the invites
*/
- protected function getMessages()
+ protected function getInvites(): InviteList
{
- return $this->proxy()->messages;
+ return $this->proxy()->invites;
}
/**
- * Access the invites
- *
- * @return \Twilio\Rest\Chat\V2\Service\Channel\InviteList
+ * Access the webhooks
*/
- protected function getInvites()
+ protected function getWebhooks(): WebhookList
{
- return $this->proxy()->invites;
+ return $this->proxy()->webhooks;
}
/**
- * Access the webhooks
- *
- * @return \Twilio\Rest\Chat\V2\Service\Channel\WebhookList
+ * Access the messages
*/
- protected function getWebhooks()
+ protected function getMessages(): MessageList
{
- return $this->proxy()->webhooks;
+ return $this->proxy()->messages;
}
/**
@@ -175,7 +181,7 @@ protected function getWebhooks()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -194,12 +200,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Chat.V2.ChannelInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/ChannelList.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/ChannelList.php
index 93075ba..4449629 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/ChannelList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/ChannelList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Chat\V2\Service;
@@ -12,59 +19,96 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class ChannelList extends ListResource
-{
+ {
/**
* Construct the ChannelList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @return \Twilio\Rest\Chat\V2\Service\ChannelList
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the Channel resource under.
*/
- public function __construct(Version $version, $serviceSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Channels';
}
/**
- * Create a new ChannelInstance
+ * Create the ChannelInstance
*
* @param array|Options $options Optional Arguments
- * @return ChannelInstance Newly created ChannelInstance
+ * @return ChannelInstance Created ChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($options = array())
+ public function create(array $options = []): ChannelInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'UniqueName' => $options['uniqueName'],
- 'Attributes' => $options['attributes'],
- 'Type' => $options['type'],
- 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']),
- 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']),
- 'CreatedBy' => $options['createdBy'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'UniqueName' =>
+ $options['uniqueName'],
+ 'Attributes' =>
+ $options['attributes'],
+ 'Type' =>
+ $options['type'],
+ 'DateCreated' =>
+ Serialize::iso8601DateTime($options['dateCreated']),
+ 'DateUpdated' =>
+ Serialize::iso8601DateTime($options['dateUpdated']),
+ 'CreatedBy' =>
+ $options['createdBy'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled']]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new ChannelInstance(
+ $this->version,
+ $payload,
+ $this->solution['serviceSid']
);
+ }
+
- return new ChannelInstance($this->version, $payload, $this->solution['serviceSid']);
+ /**
+ * Reads ChannelInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return ChannelInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -84,9 +128,9 @@ public function create($options = array())
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -95,54 +139,33 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads ChannelInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return ChannelInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of ChannelInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of ChannelInstance
+ * @return ChannelPage Page of ChannelInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): ChannelPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Type' => Serialize::map($options['type'], function ($e) {
- return $e;
- }),
+
+ $params = Values::of([
+ 'Type' =>
+ $options['type'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new ChannelPage($this->version, $response, $this->solution);
}
@@ -152,9 +175,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of ChannelInstance
+ * @return ChannelPage Page of ChannelInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): ChannelPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -164,15 +187,22 @@ public function getPage($targetUrl)
return new ChannelPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a ChannelContext
*
- * @param string $sid The SID of the resource
- * @return \Twilio\Rest\Chat\V2\Service\ChannelContext
+ * @param string $sid The SID of the Channel resource to delete. This value can be either the `sid` or the `unique_name` of the Channel resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): ChannelContext
{
- return new ChannelContext($this->version, $this->solution['serviceSid'], $sid);
+ return new ChannelContext(
+ $this->version,
+ $this->solution['serviceSid'],
+ $sid
+ );
}
/**
@@ -180,8 +210,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V2.ChannelList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/ChannelOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/ChannelOptions.php
index 592f197..caa22fe 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/ChannelOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/ChannelOptions.php
@@ -1,10 +1,16 @@
options['friendlyName'] = $friendlyName;
$this->options['uniqueName'] = $uniqueName;
$this->options['attributes'] = $attributes;
@@ -85,15 +153,16 @@ public function __construct($friendlyName = Values::NONE, $uniqueName = Values::
$this->options['dateCreated'] = $dateCreated;
$this->options['dateUpdated'] = $dateUpdated;
$this->options['createdBy'] = $createdBy;
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
}
/**
* A descriptive string that you create to describe the new resource. It can be up to 64 characters long.
*
- * @param string $friendlyName A string to describe the new resource
+ * @param string $friendlyName A descriptive string that you create to describe the new resource. It can be up to 64 characters long.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -102,11 +171,10 @@ public function setFriendlyName($friendlyName)
/**
* An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the Channel resource's `sid` in the URL. This value must be 64 characters or less in length and be unique within the Service.
*
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the Channel resource
+ * @param string $uniqueName An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the Channel resource's `sid` in the URL. This value must be 64 characters or less in length and be unique within the Service.
* @return $this Fluent Builder
*/
- public function setUniqueName($uniqueName)
+ public function setUniqueName(string $uniqueName): self
{
$this->options['uniqueName'] = $uniqueName;
return $this;
@@ -115,23 +183,20 @@ public function setUniqueName($uniqueName)
/**
* A valid JSON string that contains application-specific data.
*
- * @param string $attributes A valid JSON string that contains
- * application-specific data
+ * @param string $attributes A valid JSON string that contains application-specific data.
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setAttributes(string $attributes): self
{
$this->options['attributes'] = $attributes;
return $this;
}
/**
- * The visibility of the channel. Can be: `public` or `private` and defaults to `public`.
- *
- * @param string $type The visibility of the channel
+ * @param string $type
* @return $this Fluent Builder
*/
- public function setType($type)
+ public function setType(string $type): self
{
$this->options['type'] = $type;
return $this;
@@ -140,11 +205,10 @@ public function setType($type)
/**
* The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this should only be used in cases where a Channel is being recreated from a backup/separate source.
*
- * @param \DateTime $dateCreated The ISO 8601 date and time in GMT when the
- * resource was created
+ * @param \DateTime $dateCreated The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this should only be used in cases where a Channel is being recreated from a backup/separate source.
* @return $this Fluent Builder
*/
- public function setDateCreated($dateCreated)
+ public function setDateCreated(\DateTime $dateCreated): self
{
$this->options['dateCreated'] = $dateCreated;
return $this;
@@ -153,11 +217,10 @@ public function setDateCreated($dateCreated)
/**
* The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. The default value is `null`. Note that this parameter should only be used in cases where a Channel is being recreated from a backup/separate source and where a Message was previously updated.
*
- * @param \DateTime $dateUpdated The ISO 8601 date and time in GMT when the
- * resource was updated
+ * @param \DateTime $dateUpdated The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. The default value is `null`. Note that this parameter should only be used in cases where a Channel is being recreated from a backup/separate source and where a Message was previously updated.
* @return $this Fluent Builder
*/
- public function setDateUpdated($dateUpdated)
+ public function setDateUpdated(\DateTime $dateUpdated): self
{
$this->options['dateUpdated'] = $dateUpdated;
return $this;
@@ -166,49 +229,97 @@ public function setDateUpdated($dateUpdated)
/**
* The `identity` of the User that created the channel. Default is: `system`.
*
- * @param string $createdBy The identity of the User that created the Channel
+ * @param string $createdBy The `identity` of the User that created the channel. Default is: `system`.
* @return $this Fluent Builder
*/
- public function setCreatedBy($createdBy)
+ public function setCreatedBy(string $createdBy): self
{
$this->options['createdBy'] = $createdBy;
return $this;
}
+ /**
+ * The X-Twilio-Webhook-Enabled HTTP request header
+ *
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
+ * @return $this Fluent Builder
+ */
+ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self
+ {
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Chat.V2.CreateChannelOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Chat.V2.CreateChannelOptions ' . $options . ']';
}
}
-class ReadChannelOptions extends Options
-{
+class DeleteChannelOptions extends Options
+ {
/**
- * @param string $type The visibility of the channel to read
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
*/
- public function __construct($type = Values::NONE)
+ public function __construct(
+
+ string $xTwilioWebhookEnabled = Values::NONE
+
+ ) {
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ }
+
+ /**
+ * The X-Twilio-Webhook-Enabled HTTP request header
+ *
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
+ * @return $this Fluent Builder
+ */
+ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self
{
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ return $this;
+ }
+
+ /**
+ * Provide a friendly representation
+ *
+ * @return string Machine friendly representation
+ */
+ public function __toString(): string
+ {
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Chat.V2.DeleteChannelOptions ' . $options . ']';
+ }
+}
+
+
+class ReadChannelOptions extends Options
+ {
+ /**
+ * @param string $type The visibility of the Channels to read. Can be: `public` or `private` and defaults to `public`.
+ */
+ public function __construct(
+
+ array $type = Values::ARRAY_NONE
+
+ ) {
$this->options['type'] = $type;
}
/**
* The visibility of the Channels to read. Can be: `public` or `private` and defaults to `public`.
*
- * @param string $type The visibility of the channel to read
+ * @param string $type The visibility of the Channels to read. Can be: `public` or `private` and defaults to `public`.
* @return $this Fluent Builder
*/
- public function setType($type)
+ public function setType(array $type): self
{
$this->options['type'] = $type;
return $this;
@@ -219,49 +330,51 @@ public function setType($type)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Chat.V2.ReadChannelOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Chat.V2.ReadChannelOptions ' . $options . ']';
}
}
class UpdateChannelOptions extends Options
-{
+ {
/**
- * @param string $friendlyName A string to describe the resource
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the resource
- * @param string $attributes A valid JSON string that contains
- * application-specific data
- * @param \DateTime $dateCreated The ISO 8601 date and time in GMT when the
- * resource was created
- * @param \DateTime $dateUpdated The ISO 8601 date and time in GMT when the
- * resource was updated
- * @param string $createdBy The identity of the User that created the Channel
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 256 characters long.
+ * @param string $uniqueName An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. This value must be 256 characters or less in length and unique within the Service.
+ * @param string $attributes A valid JSON string that contains application-specific data.
+ * @param \DateTime $dateCreated The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this should only be used in cases where a Channel is being recreated from a backup/separate source.
+ * @param \DateTime $dateUpdated The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated.
+ * @param string $createdBy The `identity` of the User that created the channel. Default is: `system`.
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
*/
- public function __construct($friendlyName = Values::NONE, $uniqueName = Values::NONE, $attributes = Values::NONE, $dateCreated = Values::NONE, $dateUpdated = Values::NONE, $createdBy = Values::NONE)
- {
+ public function __construct(
+
+ string $friendlyName = Values::NONE,
+ string $uniqueName = Values::NONE,
+ string $attributes = Values::NONE,
+ \DateTime $dateCreated = null,
+ \DateTime $dateUpdated = null,
+ string $createdBy = Values::NONE,
+ string $xTwilioWebhookEnabled = Values::NONE
+
+ ) {
$this->options['friendlyName'] = $friendlyName;
$this->options['uniqueName'] = $uniqueName;
$this->options['attributes'] = $attributes;
$this->options['dateCreated'] = $dateCreated;
$this->options['dateUpdated'] = $dateUpdated;
$this->options['createdBy'] = $createdBy;
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
}
/**
* A descriptive string that you create to describe the resource. It can be up to 256 characters long.
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 256 characters long.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -270,11 +383,10 @@ public function setFriendlyName($friendlyName)
/**
* An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. This value must be 256 characters or less in length and unique within the Service.
*
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the resource
+ * @param string $uniqueName An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. This value must be 256 characters or less in length and unique within the Service.
* @return $this Fluent Builder
*/
- public function setUniqueName($uniqueName)
+ public function setUniqueName(string $uniqueName): self
{
$this->options['uniqueName'] = $uniqueName;
return $this;
@@ -283,11 +395,10 @@ public function setUniqueName($uniqueName)
/**
* A valid JSON string that contains application-specific data.
*
- * @param string $attributes A valid JSON string that contains
- * application-specific data
+ * @param string $attributes A valid JSON string that contains application-specific data.
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setAttributes(string $attributes): self
{
$this->options['attributes'] = $attributes;
return $this;
@@ -296,11 +407,10 @@ public function setAttributes($attributes)
/**
* The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this should only be used in cases where a Channel is being recreated from a backup/separate source.
*
- * @param \DateTime $dateCreated The ISO 8601 date and time in GMT when the
- * resource was created
+ * @param \DateTime $dateCreated The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this should only be used in cases where a Channel is being recreated from a backup/separate source.
* @return $this Fluent Builder
*/
- public function setDateCreated($dateCreated)
+ public function setDateCreated(\DateTime $dateCreated): self
{
$this->options['dateCreated'] = $dateCreated;
return $this;
@@ -309,11 +419,10 @@ public function setDateCreated($dateCreated)
/**
* The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated.
*
- * @param \DateTime $dateUpdated The ISO 8601 date and time in GMT when the
- * resource was updated
+ * @param \DateTime $dateUpdated The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated.
* @return $this Fluent Builder
*/
- public function setDateUpdated($dateUpdated)
+ public function setDateUpdated(\DateTime $dateUpdated): self
{
$this->options['dateUpdated'] = $dateUpdated;
return $this;
@@ -322,28 +431,36 @@ public function setDateUpdated($dateUpdated)
/**
* The `identity` of the User that created the channel. Default is: `system`.
*
- * @param string $createdBy The identity of the User that created the Channel
+ * @param string $createdBy The `identity` of the User that created the channel. Default is: `system`.
* @return $this Fluent Builder
*/
- public function setCreatedBy($createdBy)
+ public function setCreatedBy(string $createdBy): self
{
$this->options['createdBy'] = $createdBy;
return $this;
}
+ /**
+ * The X-Twilio-Webhook-Enabled HTTP request header
+ *
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
+ * @return $this Fluent Builder
+ */
+ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self
+ {
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Chat.V2.UpdateChannelOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Chat.V2.UpdateChannelOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/ChannelPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/ChannelPage.php
index 3d9fb9c..40aac39 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/ChannelPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/ChannelPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return ChannelInstance \Twilio\Rest\Chat\V2\Service\ChannelInstance
+ */
+ public function buildInstance(array $payload): ChannelInstance
{
return new ChannelInstance($this->version, $payload, $this->solution['serviceSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V2.ChannelPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/RoleContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/RoleContext.php
index aa66c28..edd4437 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/RoleContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/RoleContext.php
@@ -2,54 +2,82 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Chat\V2\Service;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
class RoleContext extends InstanceContext
-{
+ {
/**
* Initialize the RoleContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the resource from
- * @param string $sid The SID of the Role resource to fetch
- * @return \Twilio\Rest\Chat\V2\Service\RoleContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the Role resource under.
+ * @param string $sid The SID of the Role resource to delete.
*/
- public function __construct(Version $version, $serviceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Roles/' . \rawurlencode($sid)
+ .'';
+ }
+
+ /**
+ * Delete the RoleInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Roles/' . \rawurlencode($sid) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a RoleInstance
+ * Fetch the RoleInstance
*
* @return RoleInstance Fetched RoleInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): RoleInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new RoleInstance(
$this->version,
@@ -59,36 +87,24 @@ public function fetch()
);
}
- /**
- * Deletes the RoleInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Update the RoleInstance
*
- * @param string $permission A permission the role should have
+ * @param string[] $permission A permission that you grant to the role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. Note that the update action replaces all previously assigned permissions with those defined in the update action. To remove a permission, do not include it in the subsequent update action. The values for this parameter depend on the role's `type`.
* @return RoleInstance Updated RoleInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($permission)
+ public function update(array $permission): RoleInstance
{
- $data = Values::of(array('Permission' => Serialize::map($permission, function ($e) {
- return $e;
- }),));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+
+ $data = Values::of([
+ 'Permission' =>
+ Serialize::map($permission,function ($e) { return $e; }),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new RoleInstance(
$this->version,
@@ -98,17 +114,18 @@ public function update($permission)
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Chat.V2.RoleContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/RoleInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/RoleInstance.php
index 8af6afc..f71601a 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/RoleInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/RoleInstance.php
@@ -2,48 +2,55 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Chat\V2\Service;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $friendlyName
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $friendlyName
* @property string $type
- * @property string $permissions
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
+ * @property string[]|null $permissions
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
*/
class RoleInstance extends InstanceResource
{
/**
* Initialize the RoleInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $sid The SID of the Role resource to fetch
- * @return \Twilio\Rest\Chat\V2\Service\RoleInstance
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the Role resource under.
+ * @param string $sid The SID of the Role resource to delete.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
@@ -53,19 +60,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $sid
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Chat\V2\Service\RoleContext Context for this
- * RoleInstance
+ * @return RoleContext Context for this RoleInstance
*/
- protected function proxy()
+ protected function proxy(): RoleContext
{
if (!$this->context) {
$this->context = new RoleContext(
@@ -79,36 +85,39 @@ protected function proxy()
}
/**
- * Fetch a RoleInstance
+ * Delete the RoleInstance
*
- * @return RoleInstance Fetched RoleInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the RoleInstance
+ * Fetch the RoleInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return RoleInstance Fetched RoleInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): RoleInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
* Update the RoleInstance
*
- * @param string $permission A permission the role should have
+ * @param string[] $permission A permission that you grant to the role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. Note that the update action replaces all previously assigned permissions with those defined in the update action. To remove a permission, do not include it in the subsequent update action. The values for this parameter depend on the role's `type`.
* @return RoleInstance Updated RoleInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($permission)
+ public function update(array $permission): RoleInstance
{
+
return $this->proxy()->update($permission);
}
@@ -119,7 +128,7 @@ public function update($permission)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -138,12 +147,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Chat.V2.RoleInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/RoleList.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/RoleList.php
index 13a5f9c..3028be0 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/RoleList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/RoleList.php
@@ -2,66 +2,103 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Chat\V2\Service;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class RoleList extends ListResource
-{
+ {
/**
* Construct the RoleList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @return \Twilio\Rest\Chat\V2\Service\RoleList
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the Role resource under.
*/
- public function __construct(Version $version, $serviceSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Roles';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Roles';
}
/**
- * Create a new RoleInstance
+ * Create the RoleInstance
*
- * @param string $friendlyName A string to describe the new resource
- * @param string $type The type of role
- * @param string $permission A permission the role should have
- * @return RoleInstance Newly created RoleInstance
+ * @param string $friendlyName A descriptive string that you create to describe the new resource. It can be up to 64 characters long.
+ * @param string $type
+ * @param string[] $permission A permission that you grant to the new role. Only one permission can be granted per parameter. To assign more than one permission, repeat this parameter for each permission value. The values for this parameter depend on the role's `type`.
+ * @return RoleInstance Created RoleInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($friendlyName, $type, $permission)
+ public function create(string $friendlyName, string $type, array $permission): RoleInstance
{
- $data = Values::of(array(
- 'FriendlyName' => $friendlyName,
- 'Type' => $type,
- 'Permission' => Serialize::map($permission, function ($e) {
- return $e;
- }),
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+
+ $data = Values::of([
+ 'FriendlyName' =>
+ $friendlyName,
+ 'Type' =>
+ $type,
+ 'Permission' =>
+ Serialize::map($permission,function ($e) { return $e; }),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new RoleInstance(
+ $this->version,
+ $payload,
+ $this->solution['serviceSid']
);
+ }
+
- return new RoleInstance($this->version, $payload, $this->solution['serviceSid']);
+ /**
+ * Reads RoleInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return RoleInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -80,9 +117,9 @@ public function create($friendlyName, $type, $permission)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -91,26 +128,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads RoleInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return RoleInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of RoleInstance records from the API.
* Request is executed immediately
@@ -118,21 +135,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of RoleInstance
+ * @return RolePage Page of RoleInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): RolePage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new RolePage($this->version, $response, $this->solution);
}
@@ -142,9 +160,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of RoleInstance
+ * @return RolePage Page of RoleInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): RolePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -154,15 +172,22 @@ public function getPage($targetUrl)
return new RolePage($this->version, $response, $this->solution);
}
+
/**
* Constructs a RoleContext
*
- * @param string $sid The SID of the Role resource to fetch
- * @return \Twilio\Rest\Chat\V2\Service\RoleContext
+ * @param string $sid The SID of the Role resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): RoleContext
{
- return new RoleContext($this->version, $this->solution['serviceSid'], $sid);
+ return new RoleContext(
+ $this->version,
+ $this->solution['serviceSid'],
+ $sid
+ );
}
/**
@@ -170,8 +195,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V2.RoleList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/RolePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/RolePage.php
index 4fec6b5..d953103 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/RolePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/RolePage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return RoleInstance \Twilio\Rest\Chat\V2\Service\RoleInstance
+ */
+ public function buildInstance(array $payload): RoleInstance
{
return new RoleInstance($this->version, $payload, $this->solution['serviceSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V2.RolePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/User/UserBindingContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/User/UserBindingContext.php
index 5e0ba33..6c41665 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/User/UserBindingContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/User/UserBindingContext.php
@@ -2,54 +2,86 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Chat\V2\Service\User;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class UserBindingContext extends InstanceContext
-{
+ {
/**
* Initialize the UserBindingContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the resource from
- * @param string $userSid The SID of the User with the binding
- * @param string $sid The SID of the User Binding resource to fetch
- * @return \Twilio\Rest\Chat\V2\Service\User\UserBindingContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the User Binding resource from.
+ * @param string $userSid The SID of the [User](https://www.twilio.com/docs/chat/rest/user-resource) with the User Binding resources to delete. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info.
+ * @param string $sid The SID of the User Binding resource to delete.
*/
- public function __construct(Version $version, $serviceSid, $userSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $userSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'userSid' => $userSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'userSid' =>
+ $userSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Users/' . \rawurlencode($userSid)
+ .'/Bindings/' . \rawurlencode($sid)
+ .'';
+ }
+
+ /**
+ * Delete the UserBindingInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Users/' . \rawurlencode($userSid) . '/Bindings/' . \rawurlencode($sid) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a UserBindingInstance
+ * Fetch the UserBindingInstance
*
* @return UserBindingInstance Fetched UserBindingInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): UserBindingInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new UserBindingInstance(
$this->version,
@@ -60,28 +92,18 @@ public function fetch()
);
}
- /**
- * Deletes the UserBindingInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Chat.V2.UserBindingContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/User/UserBindingInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/User/UserBindingInstance.php
index 6783f71..b350adb 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/User/UserBindingInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/User/UserBindingInstance.php
@@ -2,52 +2,59 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Chat\V2\Service\User;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $serviceSid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $endpoint
- * @property string $identity
- * @property string $userSid
- * @property string $credentialSid
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $endpoint
+ * @property string|null $identity
+ * @property string|null $userSid
+ * @property string|null $credentialSid
* @property string $bindingType
- * @property string $messageTypes
- * @property string $url
+ * @property string[]|null $messageTypes
+ * @property string|null $url
*/
class UserBindingInstance extends InstanceResource
{
/**
* Initialize the UserBindingInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $userSid The SID of the User with the binding
- * @param string $sid The SID of the User Binding resource to fetch
- * @return \Twilio\Rest\Chat\V2\Service\User\UserBindingInstance
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the User Binding resource from.
+ * @param string $userSid The SID of the [User](https://www.twilio.com/docs/chat/rest/user-resource) with the User Binding resources to delete. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info.
+ * @param string $sid The SID of the User Binding resource to delete.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $userSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $userSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
@@ -60,24 +67,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $user
'bindingType' => Values::array_get($payload, 'binding_type'),
'messageTypes' => Values::array_get($payload, 'message_types'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'userSid' => $userSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['serviceSid' => $serviceSid, 'userSid' => $userSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Chat\V2\Service\User\UserBindingContext Context for
- * this
- * UserBindingInstance
+ * @return UserBindingContext Context for this UserBindingInstance
*/
- protected function proxy()
+ protected function proxy(): UserBindingContext
{
if (!$this->context) {
$this->context = new UserBindingContext(
@@ -92,25 +93,27 @@ protected function proxy()
}
/**
- * Fetch a UserBindingInstance
+ * Delete the UserBindingInstance
*
- * @return UserBindingInstance Fetched UserBindingInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the UserBindingInstance
+ * Fetch the UserBindingInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return UserBindingInstance Fetched UserBindingInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): UserBindingInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -120,7 +123,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -139,12 +142,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Chat.V2.UserBindingInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/User/UserBindingList.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/User/UserBindingList.php
index e1081e1..99125db 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/User/UserBindingList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/User/UserBindingList.php
@@ -2,38 +2,77 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Chat\V2\Service\User;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class UserBindingList extends ListResource
-{
+ {
/**
* Construct the UserBindingList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $userSid The SID of the User with the binding
- * @return \Twilio\Rest\Chat\V2\Service\User\UserBindingList
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to delete the User Binding resource from.
+ * @param string $userSid The SID of the [User](https://www.twilio.com/docs/chat/rest/user-resource) with the User Binding resources to delete. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info.
*/
- public function __construct(Version $version, $serviceSid, $userSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid,
+ string $userSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'userSid' => $userSid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ 'userSid' =>
+ $userSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Users/' . \rawurlencode($userSid)
+ .'/Bindings';
+ }
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Users/' . \rawurlencode($userSid) . '/Bindings';
+ /**
+ * Reads UserBindingInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return UserBindingInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -53,9 +92,9 @@ public function __construct(Version $version, $serviceSid, $userSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -64,54 +103,33 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads UserBindingInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return UserBindingInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of UserBindingInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of UserBindingInstance
+ * @return UserBindingPage Page of UserBindingInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): UserBindingPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'BindingType' => Serialize::map($options['bindingType'], function ($e) {
- return $e;
- }),
+
+ $params = Values::of([
+ 'BindingType' =>
+ $options['bindingType'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new UserBindingPage($this->version, $response, $this->solution);
}
@@ -121,9 +139,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of UserBindingInstance
+ * @return UserBindingPage Page of UserBindingInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): UserBindingPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -133,13 +151,16 @@ public function getPage($targetUrl)
return new UserBindingPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a UserBindingContext
*
- * @param string $sid The SID of the User Binding resource to fetch
- * @return \Twilio\Rest\Chat\V2\Service\User\UserBindingContext
+ * @param string $sid The SID of the User Binding resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): UserBindingContext
{
return new UserBindingContext(
$this->version,
@@ -154,8 +175,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V2.UserBindingList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/User/UserBindingOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/User/UserBindingOptions.php
index aed9d09..2912f7c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/User/UserBindingOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/User/UserBindingOptions.php
@@ -1,10 +1,16 @@
options['bindingType'] = $bindingType;
}
/**
* The push technology used by the User Binding resources to read. Can be: `apn`, `gcm`, or `fcm`. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info.
*
- * @param string $bindingType The push technology used by the User Binding
- * resources to read
+ * @param string $bindingType The push technology used by the User Binding resources to read. Can be: `apn`, `gcm`, or `fcm`. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info.
* @return $this Fluent Builder
*/
- public function setBindingType($bindingType)
+ public function setBindingType(array $bindingType): self
{
$this->options['bindingType'] = $bindingType;
return $this;
@@ -54,14 +71,10 @@ public function setBindingType($bindingType)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Chat.V2.ReadUserBindingOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Chat.V2.ReadUserBindingOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/User/UserBindingPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/User/UserBindingPage.php
index 41c4862..60355d5 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/User/UserBindingPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/User/UserBindingPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return UserBindingInstance \Twilio\Rest\Chat\V2\Service\User\UserBindingInstance
+ */
+ public function buildInstance(array $payload): UserBindingInstance
{
- return new UserBindingInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['userSid']
- );
+ return new UserBindingInstance($this->version, $payload, $this->solution['serviceSid'], $this->solution['userSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V2.UserBindingPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/User/UserChannelContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/User/UserChannelContext.php
index 7b5ecc6..319658b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/User/UserChannelContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/User/UserChannelContext.php
@@ -2,63 +2,91 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Chat\V2\Service\User;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
class UserChannelContext extends InstanceContext
-{
+ {
/**
* Initialize the UserChannelContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the User Channel
- * resource from
- * @param string $userSid The SID of the User to fetch the User Channel
- * resource from
- * @param string $channelSid The SID of the Channel that has the User Channel
- * to fetch
- * @return \Twilio\Rest\Chat\V2\Service\User\UserChannelContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from.
+ * @param string $userSid The SID of the [User](https://www.twilio.com/docs/api/chat/rest/users) to read the User Channel resources from.
+ * @param string $channelSid The SID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the resource belongs to.
*/
- public function __construct(Version $version, $serviceSid, $userSid, $channelSid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $userSid,
+ $channelSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'userSid' => $userSid,
- 'channelSid' => $channelSid,
- );
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'userSid' =>
+ $userSid,
+ 'channelSid' =>
+ $channelSid,
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Users/' . \rawurlencode($userSid)
+ .'/Channels/' . \rawurlencode($channelSid)
+ .'';
+ }
+
+ /**
+ * Delete the UserChannelInstance
+ *
+ * @param array|Options $options Optional Arguments
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(array $options = []): bool
+ {
+
+ $options = new Values($options);
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Users/' . \rawurlencode($userSid) . '/Channels/' . \rawurlencode($channelSid) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled']]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a UserChannelInstance
+ * Fetch the UserChannelInstance
*
* @return UserChannelInstance Fetched UserChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): UserChannelInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new UserChannelInstance(
$this->version,
@@ -69,16 +97,6 @@ public function fetch()
);
}
- /**
- * Deletes the UserChannelInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Update the UserChannelInstance
@@ -87,22 +105,22 @@ public function delete()
* @return UserChannelInstance Updated UserChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): UserChannelInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'NotificationLevel' => $options['notificationLevel'],
- 'LastConsumedMessageIndex' => $options['lastConsumedMessageIndex'],
- 'LastConsumptionTimestamp' => Serialize::iso8601DateTime($options['lastConsumptionTimestamp']),
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'NotificationLevel' =>
+ $options['notificationLevel'],
+ 'LastConsumedMessageIndex' =>
+ $options['lastConsumedMessageIndex'],
+ 'LastConsumptionTimestamp' =>
+ Serialize::iso8601DateTime($options['lastConsumptionTimestamp']),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new UserChannelInstance(
$this->version,
@@ -113,17 +131,18 @@ public function update($options = array())
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Chat.V2.UserChannelContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/User/UserChannelInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/User/UserChannelInstance.php
index 48afefa..343453c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/User/UserChannelInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/User/UserChannelInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Chat\V2\Service\User;
use Twilio\Exceptions\TwilioException;
@@ -15,17 +23,18 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $channelSid
- * @property string $userSid
- * @property string $memberSid
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $channelSid
+ * @property string|null $userSid
+ * @property string|null $memberSid
* @property string $status
- * @property int $lastConsumedMessageIndex
- * @property int $unreadMessagesCount
- * @property array $links
- * @property string $url
+ * @property int|null $lastConsumedMessageIndex
+ * @property int|null $unreadMessagesCount
+ * @property array|null $links
+ * @property string|null $url
* @property string $notificationLevel
*/
class UserChannelInstance extends InstanceResource
@@ -33,21 +42,18 @@ class UserChannelInstance extends InstanceResource
/**
* Initialize the UserChannelInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $userSid The SID of the User the User Channel belongs to
- * @param string $channelSid The SID of the Channel that has the User Channel
- * to fetch
- * @return \Twilio\Rest\Chat\V2\Service\User\UserChannelInstance
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from.
+ * @param string $userSid The SID of the [User](https://www.twilio.com/docs/api/chat/rest/users) to read the User Channel resources from.
+ * @param string $channelSid The SID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the resource belongs to.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $userSid, $channelSid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $userSid, string $channelSid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
'channelSid' => Values::array_get($payload, 'channel_sid'),
@@ -59,24 +65,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $user
'links' => Values::array_get($payload, 'links'),
'url' => Values::array_get($payload, 'url'),
'notificationLevel' => Values::array_get($payload, 'notification_level'),
- );
+ ];
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'userSid' => $userSid,
- 'channelSid' => $channelSid ?: $this->properties['channelSid'],
- );
+ $this->solution = ['serviceSid' => $serviceSid, 'userSid' => $userSid, 'channelSid' => $channelSid ?: $this->properties['channelSid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Chat\V2\Service\User\UserChannelContext Context for
- * this
- * UserChannelInstance
+ * @return UserChannelContext Context for this UserChannelInstance
*/
- protected function proxy()
+ protected function proxy(): UserChannelContext
{
if (!$this->context) {
$this->context = new UserChannelContext(
@@ -91,25 +91,28 @@ protected function proxy()
}
/**
- * Fetch a UserChannelInstance
+ * Delete the UserChannelInstance
*
- * @return UserChannelInstance Fetched UserChannelInstance
+ * @param array|Options $options Optional Arguments
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(array $options = []): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete($options);
}
/**
- * Deletes the UserChannelInstance
+ * Fetch the UserChannelInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return UserChannelInstance Fetched UserChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): UserChannelInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -119,8 +122,9 @@ public function delete()
* @return UserChannelInstance Updated UserChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): UserChannelInstance
{
+
return $this->proxy()->update($options);
}
@@ -131,7 +135,7 @@ public function update($options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -150,12 +154,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Chat.V2.UserChannelInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/User/UserChannelList.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/User/UserChannelList.php
index 5ea8c95..2f83e71 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/User/UserChannelList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/User/UserChannelList.php
@@ -2,36 +2,75 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Chat\V2\Service\User;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class UserChannelList extends ListResource
-{
+ {
/**
* Construct the UserChannelList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $userSid The SID of the User the User Channel belongs to
- * @return \Twilio\Rest\Chat\V2\Service\User\UserChannelList
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/api/chat/rest/services) to read the resources from.
+ * @param string $userSid The SID of the [User](https://www.twilio.com/docs/api/chat/rest/users) to read the User Channel resources from.
*/
- public function __construct(Version $version, $serviceSid, $userSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid,
+ string $userSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'userSid' => $userSid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ 'userSid' =>
+ $userSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Users/' . \rawurlencode($userSid)
+ .'/Channels';
+ }
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Users/' . \rawurlencode($userSid) . '/Channels';
+ /**
+ * Reads UserChannelInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return UserChannelInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -50,9 +89,9 @@ public function __construct(Version $version, $serviceSid, $userSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -61,26 +100,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads UserChannelInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return UserChannelInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of UserChannelInstance records from the API.
* Request is executed immediately
@@ -88,21 +107,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of UserChannelInstance
+ * @return UserChannelPage Page of UserChannelInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): UserChannelPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new UserChannelPage($this->version, $response, $this->solution);
}
@@ -112,9 +132,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of UserChannelInstance
+ * @return UserChannelPage Page of UserChannelInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): UserChannelPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -124,14 +144,16 @@ public function getPage($targetUrl)
return new UserChannelPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a UserChannelContext
*
- * @param string $channelSid The SID of the Channel that has the User Channel
- * to fetch
- * @return \Twilio\Rest\Chat\V2\Service\User\UserChannelContext
+ * @param string $channelSid The SID of the [Channel](https://www.twilio.com/docs/api/chat/rest/channels) the resource belongs to.
*/
- public function getContext($channelSid)
+ public function getContext(
+ string $channelSid
+
+ ): UserChannelContext
{
return new UserChannelContext(
$this->version,
@@ -146,8 +168,8 @@ public function getContext($channelSid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V2.UserChannelList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/User/UserChannelOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/User/UserChannelOptions.php
index 8c9595e..ff59988 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/User/UserChannelOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/User/UserChannelOptions.php
@@ -1,10 +1,16 @@
options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ }
+
+ /**
+ * The X-Twilio-Webhook-Enabled HTTP request header
+ *
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
+ * @return $this Fluent Builder
+ */
+ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self
{
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ return $this;
+ }
+
+ /**
+ * Provide a friendly representation
+ *
+ * @return string Machine friendly representation
+ */
+ public function __toString(): string
+ {
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Chat.V2.DeleteUserChannelOptions ' . $options . ']';
+ }
+}
+
+
+
+class UpdateUserChannelOptions extends Options
+ {
+ /**
+ * @param string $notificationLevel
+ * @param int $lastConsumedMessageIndex The index of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) in the [Channel](https://www.twilio.com/docs/chat/channels) that the Member has read.
+ * @param \DateTime $lastConsumptionTimestamp The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) read event for the Member within the [Channel](https://www.twilio.com/docs/chat/channels).
+ */
+ public function __construct(
+
+ string $notificationLevel = Values::NONE,
+ int $lastConsumedMessageIndex = Values::INT_NONE,
+ \DateTime $lastConsumptionTimestamp = null
+
+ ) {
$this->options['notificationLevel'] = $notificationLevel;
$this->options['lastConsumedMessageIndex'] = $lastConsumedMessageIndex;
$this->options['lastConsumptionTimestamp'] = $lastConsumptionTimestamp;
}
/**
- * The push notification level to assign to the User Channel. Can be: `default` or `muted`.
- *
- * @param string $notificationLevel The push notification level to assign to
- * the User Channel
+ * @param string $notificationLevel
* @return $this Fluent Builder
*/
- public function setNotificationLevel($notificationLevel)
+ public function setNotificationLevel(string $notificationLevel): self
{
$this->options['notificationLevel'] = $notificationLevel;
return $this;
@@ -68,11 +131,10 @@ public function setNotificationLevel($notificationLevel)
/**
* The index of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) in the [Channel](https://www.twilio.com/docs/chat/channels) that the Member has read.
*
- * @param int $lastConsumedMessageIndex The index of the last Message that the
- * Member has read within the Channel
+ * @param int $lastConsumedMessageIndex The index of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) in the [Channel](https://www.twilio.com/docs/chat/channels) that the Member has read.
* @return $this Fluent Builder
*/
- public function setLastConsumedMessageIndex($lastConsumedMessageIndex)
+ public function setLastConsumedMessageIndex(int $lastConsumedMessageIndex): self
{
$this->options['lastConsumedMessageIndex'] = $lastConsumedMessageIndex;
return $this;
@@ -81,14 +143,10 @@ public function setLastConsumedMessageIndex($lastConsumedMessageIndex)
/**
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) read event for the Member within the [Channel](https://www.twilio.com/docs/chat/channels).
*
- * @param \DateTime $lastConsumptionTimestamp The ISO 8601 based timestamp
- * string that represents the
- * datetime of the last Message read
- * event for the Member within the
- * Channel
+ * @param \DateTime $lastConsumptionTimestamp The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) read event for the Member within the [Channel](https://www.twilio.com/docs/chat/channels).
* @return $this Fluent Builder
*/
- public function setLastConsumptionTimestamp($lastConsumptionTimestamp)
+ public function setLastConsumptionTimestamp(\DateTime $lastConsumptionTimestamp): self
{
$this->options['lastConsumptionTimestamp'] = $lastConsumptionTimestamp;
return $this;
@@ -99,14 +157,10 @@ public function setLastConsumptionTimestamp($lastConsumptionTimestamp)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Chat.V2.UpdateUserChannelOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Chat.V2.UpdateUserChannelOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/User/UserChannelPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/User/UserChannelPage.php
index 6548e5a..b50deef 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/User/UserChannelPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/User/UserChannelPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return UserChannelInstance \Twilio\Rest\Chat\V2\Service\User\UserChannelInstance
+ */
+ public function buildInstance(array $payload): UserChannelInstance
{
- return new UserChannelInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['userSid']
- );
+ return new UserChannelInstance($this->version, $payload, $this->solution['serviceSid'], $this->solution['userSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V2.UserChannelPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/UserContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/UserContext.php
index 0b03030..be526be 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/UserContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/UserContext.php
@@ -2,65 +2,94 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Chat\V2\Service;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Chat\V2\Service\User\UserBindingList;
-use Twilio\Rest\Chat\V2\Service\User\UserChannelList;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Chat\V2\Service\User\UserBindingList;
+use Twilio\Rest\Chat\V2\Service\User\UserChannelList;
+
/**
- * @property \Twilio\Rest\Chat\V2\Service\User\UserChannelList $userChannels
- * @property \Twilio\Rest\Chat\V2\Service\User\UserBindingList $userBindings
+ * @property UserBindingList $userBindings
+ * @property UserChannelList $userChannels
* @method \Twilio\Rest\Chat\V2\Service\User\UserChannelContext userChannels(string $channelSid)
* @method \Twilio\Rest\Chat\V2\Service\User\UserBindingContext userBindings(string $sid)
*/
class UserContext extends InstanceContext
-{
- protected $_userChannels = null;
- protected $_userBindings = null;
+ {
+ protected $_userBindings;
+ protected $_userChannels;
/**
* Initialize the UserContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the resource from
- * @param string $sid The SID of the User resource to fetch
- * @return \Twilio\Rest\Chat\V2\Service\UserContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the User resource under.
+ * @param string $sid The SID of the User resource to delete. This value can be either the `sid` or the `identity` of the User resource to delete.
*/
- public function __construct(Version $version, $serviceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Users/' . \rawurlencode($sid)
+ .'';
+ }
+
+ /**
+ * Delete the UserInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Users/' . \rawurlencode($sid) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a UserInstance
+ * Fetch the UserInstance
*
* @return UserInstance Fetched UserInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): UserInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new UserInstance(
$this->version,
@@ -70,16 +99,6 @@ public function fetch()
);
}
- /**
- * Deletes the UserInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Update the UserInstance
@@ -88,22 +107,22 @@ public function delete()
* @return UserInstance Updated UserInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): UserInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'RoleSid' => $options['roleSid'],
- 'Attributes' => $options['attributes'],
- 'FriendlyName' => $options['friendlyName'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'RoleSid' =>
+ $options['roleSid'],
+ 'Attributes' =>
+ $options['attributes'],
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled']]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new UserInstance(
$this->version,
@@ -113,50 +132,47 @@ public function update($options = array())
);
}
+
/**
- * Access the userChannels
- *
- * @return \Twilio\Rest\Chat\V2\Service\User\UserChannelList
+ * Access the userBindings
*/
- protected function getUserChannels()
+ protected function getUserBindings(): UserBindingList
{
- if (!$this->_userChannels) {
- $this->_userChannels = new UserChannelList(
+ if (!$this->_userBindings) {
+ $this->_userBindings = new UserBindingList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sid']
);
}
- return $this->_userChannels;
+ return $this->_userBindings;
}
/**
- * Access the userBindings
- *
- * @return \Twilio\Rest\Chat\V2\Service\User\UserBindingList
+ * Access the userChannels
*/
- protected function getUserBindings()
+ protected function getUserChannels(): UserChannelList
{
- if (!$this->_userBindings) {
- $this->_userBindings = new UserBindingList(
+ if (!$this->_userChannels) {
+ $this->_userChannels = new UserChannelList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sid']
);
}
- return $this->_userBindings;
+ return $this->_userChannels;
}
/**
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -171,10 +187,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -189,12 +205,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Chat.V2.UserContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/UserInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/UserInstance.php
index 9017137..5a22b20 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/UserInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/UserInstance.php
@@ -2,57 +2,66 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Chat\V2\Service;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Chat\V2\Service\User\UserBindingList;
+use Twilio\Rest\Chat\V2\Service\User\UserChannelList;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $attributes
- * @property string $friendlyName
- * @property string $roleSid
- * @property string $identity
- * @property bool $isOnline
- * @property bool $isNotifiable
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $attributes
+ * @property string|null $friendlyName
+ * @property string|null $roleSid
+ * @property string|null $identity
+ * @property bool|null $isOnline
+ * @property bool|null $isNotifiable
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
* @property int $joinedChannelsCount
- * @property array $links
- * @property string $url
+ * @property array|null $links
+ * @property string|null $url
*/
class UserInstance extends InstanceResource
{
- protected $_userChannels = null;
- protected $_userBindings = null;
+ protected $_userBindings;
+ protected $_userChannels;
/**
* Initialize the UserInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $sid The SID of the User resource to fetch
- * @return \Twilio\Rest\Chat\V2\Service\UserInstance
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the User resource under.
+ * @param string $sid The SID of the User resource to delete. This value can be either the `sid` or the `identity` of the User resource to delete.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
@@ -67,19 +76,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $sid
'joinedChannelsCount' => Values::array_get($payload, 'joined_channels_count'),
'links' => Values::array_get($payload, 'links'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Chat\V2\Service\UserContext Context for this
- * UserInstance
+ * @return UserContext Context for this UserInstance
*/
- protected function proxy()
+ protected function proxy(): UserContext
{
if (!$this->context) {
$this->context = new UserContext(
@@ -93,25 +101,27 @@ protected function proxy()
}
/**
- * Fetch a UserInstance
+ * Delete the UserInstance
*
- * @return UserInstance Fetched UserInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the UserInstance
+ * Fetch the UserInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return UserInstance Fetched UserInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): UserInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -121,29 +131,26 @@ public function delete()
* @return UserInstance Updated UserInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): UserInstance
{
+
return $this->proxy()->update($options);
}
/**
- * Access the userChannels
- *
- * @return \Twilio\Rest\Chat\V2\Service\User\UserChannelList
+ * Access the userBindings
*/
- protected function getUserChannels()
+ protected function getUserBindings(): UserBindingList
{
- return $this->proxy()->userChannels;
+ return $this->proxy()->userBindings;
}
/**
- * Access the userBindings
- *
- * @return \Twilio\Rest\Chat\V2\Service\User\UserBindingList
+ * Access the userChannels
*/
- protected function getUserBindings()
+ protected function getUserChannels(): UserChannelList
{
- return $this->proxy()->userBindings;
+ return $this->proxy()->userChannels;
}
/**
@@ -153,7 +160,7 @@ protected function getUserBindings()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -172,12 +179,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Chat.V2.UserInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/UserList.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/UserList.php
index 785a180..af20839 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/UserList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/UserList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Chat\V2\Service;
@@ -12,57 +19,89 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class UserList extends ListResource
-{
+ {
/**
* Construct the UserList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @return \Twilio\Rest\Chat\V2\Service\UserList
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the User resource under.
*/
- public function __construct(Version $version, $serviceSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Users';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Users';
}
/**
- * Create a new UserInstance
+ * Create the UserInstance
*
- * @param string $identity The `identity` value that identifies the new
- * resource's User
+ * @param string $identity The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/chat/rest/service-resource). This value is often a username or email address. See the Identity documentation for more info.
* @param array|Options $options Optional Arguments
- * @return UserInstance Newly created UserInstance
+ * @return UserInstance Created UserInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($identity, $options = array())
+ public function create(string $identity, array $options = []): UserInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'Identity' => $identity,
- 'RoleSid' => $options['roleSid'],
- 'Attributes' => $options['attributes'],
- 'FriendlyName' => $options['friendlyName'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'Identity' =>
+ $identity,
+ 'RoleSid' =>
+ $options['roleSid'],
+ 'Attributes' =>
+ $options['attributes'],
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled']]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new UserInstance(
+ $this->version,
+ $payload,
+ $this->solution['serviceSid']
);
+ }
- return new UserInstance($this->version, $payload, $this->solution['serviceSid']);
+
+ /**
+ * Reads UserInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return UserInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -81,9 +120,9 @@ public function create($identity, $options = array())
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -92,26 +131,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads UserInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return UserInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of UserInstance records from the API.
* Request is executed immediately
@@ -119,21 +138,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of UserInstance
+ * @return UserPage Page of UserInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): UserPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new UserPage($this->version, $response, $this->solution);
}
@@ -143,9 +163,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of UserInstance
+ * @return UserPage Page of UserInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): UserPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -155,15 +175,22 @@ public function getPage($targetUrl)
return new UserPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a UserContext
*
- * @param string $sid The SID of the User resource to fetch
- * @return \Twilio\Rest\Chat\V2\Service\UserContext
+ * @param string $sid The SID of the User resource to delete. This value can be either the `sid` or the `identity` of the User resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): UserContext
{
- return new UserContext($this->version, $this->solution['serviceSid'], $sid);
+ return new UserContext(
+ $this->version,
+ $this->solution['serviceSid'],
+ $sid
+ );
}
/**
@@ -171,8 +198,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V2.UserList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/UserOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/UserOptions.php
index 95796d2..5820ca0 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/UserOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/UserOptions.php
@@ -1,10 +1,16 @@
options['roleSid'] = $roleSid;
$this->options['attributes'] = $attributes;
$this->options['friendlyName'] = $friendlyName;
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
}
/**
* The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the new User.
*
- * @param string $roleSid The SID of the Role assigned to this user
+ * @param string $roleSid The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the new User.
* @return $this Fluent Builder
*/
- public function setRoleSid($roleSid)
+ public function setRoleSid(string $roleSid): self
{
$this->options['roleSid'] = $roleSid;
return $this;
@@ -69,11 +110,10 @@ public function setRoleSid($roleSid)
/**
* A valid JSON string that contains application-specific data.
*
- * @param string $attributes A valid JSON string that contains
- * application-specific data
+ * @param string $attributes A valid JSON string that contains application-specific data.
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setAttributes(string $attributes): self
{
$this->options['attributes'] = $attributes;
return $this;
@@ -82,54 +122,71 @@ public function setAttributes($attributes)
/**
* A descriptive string that you create to describe the new resource. This value is often used for display purposes.
*
- * @param string $friendlyName A string to describe the new resource
+ * @param string $friendlyName A descriptive string that you create to describe the new resource. This value is often used for display purposes.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
}
+ /**
+ * The X-Twilio-Webhook-Enabled HTTP request header
+ *
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
+ * @return $this Fluent Builder
+ */
+ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self
+ {
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Chat.V2.CreateUserOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Chat.V2.CreateUserOptions ' . $options . ']';
}
}
+
+
+
class UpdateUserOptions extends Options
-{
+ {
/**
- * @param string $roleSid The SID id of the Role assigned to this user
- * @param string $attributes A valid JSON string that contains
- * application-specific data
- * @param string $friendlyName A string to describe the resource
+ * @param string $roleSid The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the User.
+ * @param string $attributes A valid JSON string that contains application-specific data.
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It is often used for display purposes.
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
*/
- public function __construct($roleSid = Values::NONE, $attributes = Values::NONE, $friendlyName = Values::NONE)
- {
+ public function __construct(
+
+ string $roleSid = Values::NONE,
+ string $attributes = Values::NONE,
+ string $friendlyName = Values::NONE,
+ string $xTwilioWebhookEnabled = Values::NONE
+
+ ) {
$this->options['roleSid'] = $roleSid;
$this->options['attributes'] = $attributes;
$this->options['friendlyName'] = $friendlyName;
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
}
/**
* The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the User.
*
- * @param string $roleSid The SID id of the Role assigned to this user
+ * @param string $roleSid The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the User.
* @return $this Fluent Builder
*/
- public function setRoleSid($roleSid)
+ public function setRoleSid(string $roleSid): self
{
$this->options['roleSid'] = $roleSid;
return $this;
@@ -138,11 +195,10 @@ public function setRoleSid($roleSid)
/**
* A valid JSON string that contains application-specific data.
*
- * @param string $attributes A valid JSON string that contains
- * application-specific data
+ * @param string $attributes A valid JSON string that contains application-specific data.
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setAttributes(string $attributes): self
{
$this->options['attributes'] = $attributes;
return $this;
@@ -151,28 +207,36 @@ public function setAttributes($attributes)
/**
* A descriptive string that you create to describe the resource. It is often used for display purposes.
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It is often used for display purposes.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
}
+ /**
+ * The X-Twilio-Webhook-Enabled HTTP request header
+ *
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
+ * @return $this Fluent Builder
+ */
+ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self
+ {
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Chat.V2.UpdateUserOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Chat.V2.UpdateUserOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/UserPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/UserPage.php
index c01edd9..3034c9f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/UserPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/Service/UserPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return UserInstance \Twilio\Rest\Chat\V2\Service\UserInstance
+ */
+ public function buildInstance(array $payload): UserInstance
{
return new UserInstance($this->version, $payload, $this->solution['serviceSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V2.UserPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/ServiceContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/ServiceContext.php
index 083522d..5383d4b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/ServiceContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/ServiceContext.php
@@ -2,88 +2,107 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Chat\V2;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Chat\V2\Service\BindingList;
+use Twilio\Values;
+use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
use Twilio\Rest\Chat\V2\Service\ChannelList;
+use Twilio\Rest\Chat\V2\Service\BindingList;
use Twilio\Rest\Chat\V2\Service\RoleList;
use Twilio\Rest\Chat\V2\Service\UserList;
-use Twilio\Serialize;
-use Twilio\Values;
-use Twilio\Version;
+
/**
- * @property \Twilio\Rest\Chat\V2\Service\ChannelList $channels
- * @property \Twilio\Rest\Chat\V2\Service\RoleList $roles
- * @property \Twilio\Rest\Chat\V2\Service\UserList $users
- * @property \Twilio\Rest\Chat\V2\Service\BindingList $bindings
+ * @property ChannelList $channels
+ * @property BindingList $bindings
+ * @property RoleList $roles
+ * @property UserList $users
+ * @method \Twilio\Rest\Chat\V2\Service\BindingContext bindings(string $sid)
* @method \Twilio\Rest\Chat\V2\Service\ChannelContext channels(string $sid)
* @method \Twilio\Rest\Chat\V2\Service\RoleContext roles(string $sid)
* @method \Twilio\Rest\Chat\V2\Service\UserContext users(string $sid)
- * @method \Twilio\Rest\Chat\V2\Service\BindingContext bindings(string $sid)
*/
class ServiceContext extends InstanceContext
-{
- protected $_channels = null;
- protected $_roles = null;
- protected $_users = null;
- protected $_bindings = null;
+ {
+ protected $_channels;
+ protected $_bindings;
+ protected $_roles;
+ protected $_users;
/**
* Initialize the ServiceContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The SID of the Service resource to fetch
- * @return \Twilio\Rest\Chat\V2\ServiceContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid The SID of the Service resource to delete.
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Services/' . \rawurlencode($sid) . '';
+ $this->uri = '/Services/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a ServiceInstance
+ * Delete the ServiceInstance
*
- * @return ServiceInstance Fetched ServiceInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new ServiceInstance($this->version, $payload, $this->solution['sid']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Deletes the ServiceInstance
+ * Fetch the ServiceInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return ServiceInstance Fetched ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): ServiceInstance
{
- return $this->version->delete('delete', $this->uri);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
+
+ return new ServiceInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Update the ServiceInstance
*
@@ -91,120 +110,155 @@ public function delete()
* @return ServiceInstance Updated ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ServiceInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'DefaultServiceRoleSid' => $options['defaultServiceRoleSid'],
- 'DefaultChannelRoleSid' => $options['defaultChannelRoleSid'],
- 'DefaultChannelCreatorRoleSid' => $options['defaultChannelCreatorRoleSid'],
- 'ReadStatusEnabled' => Serialize::booleanToString($options['readStatusEnabled']),
- 'ReachabilityEnabled' => Serialize::booleanToString($options['reachabilityEnabled']),
- 'TypingIndicatorTimeout' => $options['typingIndicatorTimeout'],
- 'ConsumptionReportInterval' => $options['consumptionReportInterval'],
- 'Notifications.NewMessage.Enabled' => Serialize::booleanToString($options['notificationsNewMessageEnabled']),
- 'Notifications.NewMessage.Template' => $options['notificationsNewMessageTemplate'],
- 'Notifications.NewMessage.Sound' => $options['notificationsNewMessageSound'],
- 'Notifications.NewMessage.BadgeCountEnabled' => Serialize::booleanToString($options['notificationsNewMessageBadgeCountEnabled']),
- 'Notifications.AddedToChannel.Enabled' => Serialize::booleanToString($options['notificationsAddedToChannelEnabled']),
- 'Notifications.AddedToChannel.Template' => $options['notificationsAddedToChannelTemplate'],
- 'Notifications.AddedToChannel.Sound' => $options['notificationsAddedToChannelSound'],
- 'Notifications.RemovedFromChannel.Enabled' => Serialize::booleanToString($options['notificationsRemovedFromChannelEnabled']),
- 'Notifications.RemovedFromChannel.Template' => $options['notificationsRemovedFromChannelTemplate'],
- 'Notifications.RemovedFromChannel.Sound' => $options['notificationsRemovedFromChannelSound'],
- 'Notifications.InvitedToChannel.Enabled' => Serialize::booleanToString($options['notificationsInvitedToChannelEnabled']),
- 'Notifications.InvitedToChannel.Template' => $options['notificationsInvitedToChannelTemplate'],
- 'Notifications.InvitedToChannel.Sound' => $options['notificationsInvitedToChannelSound'],
- 'PreWebhookUrl' => $options['preWebhookUrl'],
- 'PostWebhookUrl' => $options['postWebhookUrl'],
- 'WebhookMethod' => $options['webhookMethod'],
- 'WebhookFilters' => Serialize::map($options['webhookFilters'], function ($e) {
- return $e;
- }),
- 'Limits.ChannelMembers' => $options['limitsChannelMembers'],
- 'Limits.UserChannels' => $options['limitsUserChannels'],
- 'Media.CompatibilityMessage' => $options['mediaCompatibilityMessage'],
- 'PreWebhookRetryCount' => $options['preWebhookRetryCount'],
- 'PostWebhookRetryCount' => $options['postWebhookRetryCount'],
- 'Notifications.LogEnabled' => Serialize::booleanToString($options['notificationsLogEnabled']),
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'DefaultServiceRoleSid' =>
+ $options['defaultServiceRoleSid'],
+ 'DefaultChannelRoleSid' =>
+ $options['defaultChannelRoleSid'],
+ 'DefaultChannelCreatorRoleSid' =>
+ $options['defaultChannelCreatorRoleSid'],
+ 'ReadStatusEnabled' =>
+ Serialize::booleanToString($options['readStatusEnabled']),
+ 'ReachabilityEnabled' =>
+ Serialize::booleanToString($options['reachabilityEnabled']),
+ 'TypingIndicatorTimeout' =>
+ $options['typingIndicatorTimeout'],
+ 'ConsumptionReportInterval' =>
+ $options['consumptionReportInterval'],
+ 'Notifications.NewMessage.Enabled' =>
+ Serialize::booleanToString($options['notificationsNewMessageEnabled']),
+ 'Notifications.NewMessage.Template' =>
+ $options['notificationsNewMessageTemplate'],
+ 'Notifications.NewMessage.Sound' =>
+ $options['notificationsNewMessageSound'],
+ 'Notifications.NewMessage.BadgeCountEnabled' =>
+ Serialize::booleanToString($options['notificationsNewMessageBadgeCountEnabled']),
+ 'Notifications.AddedToChannel.Enabled' =>
+ Serialize::booleanToString($options['notificationsAddedToChannelEnabled']),
+ 'Notifications.AddedToChannel.Template' =>
+ $options['notificationsAddedToChannelTemplate'],
+ 'Notifications.AddedToChannel.Sound' =>
+ $options['notificationsAddedToChannelSound'],
+ 'Notifications.RemovedFromChannel.Enabled' =>
+ Serialize::booleanToString($options['notificationsRemovedFromChannelEnabled']),
+ 'Notifications.RemovedFromChannel.Template' =>
+ $options['notificationsRemovedFromChannelTemplate'],
+ 'Notifications.RemovedFromChannel.Sound' =>
+ $options['notificationsRemovedFromChannelSound'],
+ 'Notifications.InvitedToChannel.Enabled' =>
+ Serialize::booleanToString($options['notificationsInvitedToChannelEnabled']),
+ 'Notifications.InvitedToChannel.Template' =>
+ $options['notificationsInvitedToChannelTemplate'],
+ 'Notifications.InvitedToChannel.Sound' =>
+ $options['notificationsInvitedToChannelSound'],
+ 'PreWebhookUrl' =>
+ $options['preWebhookUrl'],
+ 'PostWebhookUrl' =>
+ $options['postWebhookUrl'],
+ 'WebhookMethod' =>
+ $options['webhookMethod'],
+ 'WebhookFilters' =>
+ Serialize::map($options['webhookFilters'], function ($e) { return $e; }),
+ 'Limits.ChannelMembers' =>
+ $options['limitsChannelMembers'],
+ 'Limits.UserChannels' =>
+ $options['limitsUserChannels'],
+ 'Media.CompatibilityMessage' =>
+ $options['mediaCompatibilityMessage'],
+ 'PreWebhookRetryCount' =>
+ $options['preWebhookRetryCount'],
+ 'PostWebhookRetryCount' =>
+ $options['postWebhookRetryCount'],
+ 'Notifications.LogEnabled' =>
+ Serialize::booleanToString($options['notificationsLogEnabled']),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
- return new ServiceInstance($this->version, $payload, $this->solution['sid']);
+ return new ServiceInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Access the channels
- *
- * @return \Twilio\Rest\Chat\V2\Service\ChannelList
*/
- protected function getChannels()
+ protected function getChannels(): ChannelList
{
if (!$this->_channels) {
- $this->_channels = new ChannelList($this->version, $this->solution['sid']);
+ $this->_channels = new ChannelList(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->_channels;
}
/**
- * Access the roles
- *
- * @return \Twilio\Rest\Chat\V2\Service\RoleList
+ * Access the bindings
*/
- protected function getRoles()
+ protected function getBindings(): BindingList
{
- if (!$this->_roles) {
- $this->_roles = new RoleList($this->version, $this->solution['sid']);
+ if (!$this->_bindings) {
+ $this->_bindings = new BindingList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_roles;
+ return $this->_bindings;
}
/**
- * Access the users
- *
- * @return \Twilio\Rest\Chat\V2\Service\UserList
+ * Access the roles
*/
- protected function getUsers()
+ protected function getRoles(): RoleList
{
- if (!$this->_users) {
- $this->_users = new UserList($this->version, $this->solution['sid']);
+ if (!$this->_roles) {
+ $this->_roles = new RoleList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_users;
+ return $this->_roles;
}
/**
- * Access the bindings
- *
- * @return \Twilio\Rest\Chat\V2\Service\BindingList
+ * Access the users
*/
- protected function getBindings()
+ protected function getUsers(): UserList
{
- if (!$this->_bindings) {
- $this->_bindings = new BindingList($this->version, $this->solution['sid']);
+ if (!$this->_users) {
+ $this->_users = new UserList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_bindings;
+ return $this->_users;
}
/**
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -219,10 +273,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -237,12 +291,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Chat.V2.ServiceContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/ServiceInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/ServiceInstance.php
index 13f73c8..ae5b275 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/ServiceInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/ServiceInstance.php
@@ -2,66 +2,78 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Chat\V2;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Chat\V2\Service\ChannelList;
+use Twilio\Rest\Chat\V2\Service\BindingList;
+use Twilio\Rest\Chat\V2\Service\RoleList;
+use Twilio\Rest\Chat\V2\Service\UserList;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $friendlyName
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $defaultServiceRoleSid
- * @property string $defaultChannelRoleSid
- * @property string $defaultChannelCreatorRoleSid
- * @property bool $readStatusEnabled
- * @property bool $reachabilityEnabled
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $friendlyName
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $defaultServiceRoleSid
+ * @property string|null $defaultChannelRoleSid
+ * @property string|null $defaultChannelCreatorRoleSid
+ * @property bool|null $readStatusEnabled
+ * @property bool|null $reachabilityEnabled
* @property int $typingIndicatorTimeout
* @property int $consumptionReportInterval
- * @property array $limits
- * @property string $preWebhookUrl
- * @property string $postWebhookUrl
- * @property string $webhookMethod
- * @property string $webhookFilters
+ * @property array|null $limits
+ * @property string|null $preWebhookUrl
+ * @property string|null $postWebhookUrl
+ * @property string|null $webhookMethod
+ * @property string[]|null $webhookFilters
* @property int $preWebhookRetryCount
* @property int $postWebhookRetryCount
- * @property array $notifications
- * @property array $media
- * @property string $url
- * @property array $links
+ * @property array|null $notifications
+ * @property array|null $media
+ * @property string|null $url
+ * @property array|null $links
*/
class ServiceInstance extends InstanceResource
{
- protected $_channels = null;
- protected $_roles = null;
- protected $_users = null;
- protected $_bindings = null;
+ protected $_channels;
+ protected $_bindings;
+ protected $_roles;
+ protected $_users;
/**
* Initialize the ServiceInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The SID of the Service resource to fetch
- * @return \Twilio\Rest\Chat\V2\ServiceInstance
+ * @param string $sid The SID of the Service resource to delete.
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
@@ -85,46 +97,51 @@ public function __construct(Version $version, array $payload, $sid = null)
'media' => Values::array_get($payload, 'media'),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Chat\V2\ServiceContext Context for this ServiceInstance
+ * @return ServiceContext Context for this ServiceInstance
*/
- protected function proxy()
+ protected function proxy(): ServiceContext
{
if (!$this->context) {
- $this->context = new ServiceContext($this->version, $this->solution['sid']);
+ $this->context = new ServiceContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a ServiceInstance
+ * Delete the ServiceInstance
*
- * @return ServiceInstance Fetched ServiceInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the ServiceInstance
+ * Fetch the ServiceInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return ServiceInstance Fetched ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): ServiceInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -134,49 +151,42 @@ public function delete()
* @return ServiceInstance Updated ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ServiceInstance
{
+
return $this->proxy()->update($options);
}
/**
* Access the channels
- *
- * @return \Twilio\Rest\Chat\V2\Service\ChannelList
*/
- protected function getChannels()
+ protected function getChannels(): ChannelList
{
return $this->proxy()->channels;
}
/**
- * Access the roles
- *
- * @return \Twilio\Rest\Chat\V2\Service\RoleList
+ * Access the bindings
*/
- protected function getRoles()
+ protected function getBindings(): BindingList
{
- return $this->proxy()->roles;
+ return $this->proxy()->bindings;
}
/**
- * Access the users
- *
- * @return \Twilio\Rest\Chat\V2\Service\UserList
+ * Access the roles
*/
- protected function getUsers()
+ protected function getRoles(): RoleList
{
- return $this->proxy()->users;
+ return $this->proxy()->roles;
}
/**
- * Access the bindings
- *
- * @return \Twilio\Rest\Chat\V2\Service\BindingList
+ * Access the users
*/
- protected function getBindings()
+ protected function getUsers(): UserList
{
- return $this->proxy()->bindings;
+ return $this->proxy()->users;
}
/**
@@ -186,7 +196,7 @@ protected function getBindings()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -205,12 +215,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Chat.V2.ServiceInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/ServiceList.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/ServiceList.php
index d5345d8..ca6b0b9 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/ServiceList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/ServiceList.php
@@ -2,55 +2,89 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Chat
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Chat\V2;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class ServiceList extends ListResource
-{
+ {
/**
* Construct the ServiceList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Chat\V2\ServiceList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/Services';
}
/**
- * Create a new ServiceInstance
+ * Create the ServiceInstance
*
- * @param string $friendlyName A string to describe the resource
- * @return ServiceInstance Newly created ServiceInstance
+ * @param string $friendlyName A descriptive string that you create to describe the new resource.
+ * @return ServiceInstance Created ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($friendlyName)
+ public function create(string $friendlyName): ServiceInstance
{
- $data = Values::of(array('FriendlyName' => $friendlyName,));
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'FriendlyName' =>
+ $friendlyName,
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new ServiceInstance(
+ $this->version,
+ $payload
);
+ }
- return new ServiceInstance($this->version, $payload);
+
+ /**
+ * Reads ServiceInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return ServiceInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -69,9 +103,9 @@ public function create($friendlyName)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -80,26 +114,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads ServiceInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return ServiceInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of ServiceInstance records from the API.
* Request is executed immediately
@@ -107,21 +121,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of ServiceInstance
+ * @return ServicePage Page of ServiceInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): ServicePage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new ServicePage($this->version, $response, $this->solution);
}
@@ -131,9 +146,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of ServiceInstance
+ * @return ServicePage Page of ServiceInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): ServicePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -143,15 +158,21 @@ public function getPage($targetUrl)
return new ServicePage($this->version, $response, $this->solution);
}
+
/**
* Constructs a ServiceContext
*
- * @param string $sid The SID of the Service resource to fetch
- * @return \Twilio\Rest\Chat\V2\ServiceContext
+ * @param string $sid The SID of the Service resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): ServiceContext
{
- return new ServiceContext($this->version, $sid);
+ return new ServiceContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -159,8 +180,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V2.ServiceList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/ServiceOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/ServiceOptions.php
index 84aaa99..3b398a8 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/ServiceOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/ServiceOptions.php
@@ -1,10 +1,16 @@
options['friendlyName'] = $friendlyName;
$this->options['defaultServiceRoleSid'] = $defaultServiceRoleSid;
$this->options['defaultChannelRoleSid'] = $defaultChannelRoleSid;
@@ -227,10 +241,10 @@ public function __construct($friendlyName = Values::NONE, $defaultServiceRoleSid
/**
* A descriptive string that you create to describe the resource.
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName A descriptive string that you create to describe the resource.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -239,11 +253,10 @@ public function setFriendlyName($friendlyName)
/**
* The service role assigned to users when they are added to the service. See the [Role resource](https://www.twilio.com/docs/chat/rest/role-resource) for more info about roles.
*
- * @param string $defaultServiceRoleSid The service role assigned to users when
- * they are added to the service
+ * @param string $defaultServiceRoleSid The service role assigned to users when they are added to the service. See the [Role resource](https://www.twilio.com/docs/chat/rest/role-resource) for more info about roles.
* @return $this Fluent Builder
*/
- public function setDefaultServiceRoleSid($defaultServiceRoleSid)
+ public function setDefaultServiceRoleSid(string $defaultServiceRoleSid): self
{
$this->options['defaultServiceRoleSid'] = $defaultServiceRoleSid;
return $this;
@@ -252,11 +265,10 @@ public function setDefaultServiceRoleSid($defaultServiceRoleSid)
/**
* The channel role assigned to users when they are added to a channel. See the [Role resource](https://www.twilio.com/docs/chat/rest/role-resource) for more info about roles.
*
- * @param string $defaultChannelRoleSid The channel role assigned to users when
- * they are added to a channel
+ * @param string $defaultChannelRoleSid The channel role assigned to users when they are added to a channel. See the [Role resource](https://www.twilio.com/docs/chat/rest/role-resource) for more info about roles.
* @return $this Fluent Builder
*/
- public function setDefaultChannelRoleSid($defaultChannelRoleSid)
+ public function setDefaultChannelRoleSid(string $defaultChannelRoleSid): self
{
$this->options['defaultChannelRoleSid'] = $defaultChannelRoleSid;
return $this;
@@ -265,12 +277,10 @@ public function setDefaultChannelRoleSid($defaultChannelRoleSid)
/**
* The channel role assigned to a channel creator when they join a new channel. See the [Role resource](https://www.twilio.com/docs/chat/rest/role-resource) for more info about roles.
*
- * @param string $defaultChannelCreatorRoleSid The channel role assigned to a
- * channel creator when they join a
- * new channel
+ * @param string $defaultChannelCreatorRoleSid The channel role assigned to a channel creator when they join a new channel. See the [Role resource](https://www.twilio.com/docs/chat/rest/role-resource) for more info about roles.
* @return $this Fluent Builder
*/
- public function setDefaultChannelCreatorRoleSid($defaultChannelCreatorRoleSid)
+ public function setDefaultChannelCreatorRoleSid(string $defaultChannelCreatorRoleSid): self
{
$this->options['defaultChannelCreatorRoleSid'] = $defaultChannelCreatorRoleSid;
return $this;
@@ -279,11 +289,10 @@ public function setDefaultChannelCreatorRoleSid($defaultChannelCreatorRoleSid)
/**
* Whether to enable the [Message Consumption Horizon](https://www.twilio.com/docs/chat/consumption-horizon) feature. The default is `true`.
*
- * @param bool $readStatusEnabled Whether to enable the Message Consumption
- * Horizon feature
+ * @param bool $readStatusEnabled Whether to enable the [Message Consumption Horizon](https://www.twilio.com/docs/chat/consumption-horizon) feature. The default is `true`.
* @return $this Fluent Builder
*/
- public function setReadStatusEnabled($readStatusEnabled)
+ public function setReadStatusEnabled(bool $readStatusEnabled): self
{
$this->options['readStatusEnabled'] = $readStatusEnabled;
return $this;
@@ -292,11 +301,10 @@ public function setReadStatusEnabled($readStatusEnabled)
/**
* Whether to enable the [Reachability Indicator](https://www.twilio.com/docs/chat/reachability-indicator) for this Service instance. The default is `false`.
*
- * @param bool $reachabilityEnabled Whether to enable the Reachability
- * Indicator feature for this Service instance
+ * @param bool $reachabilityEnabled Whether to enable the [Reachability Indicator](https://www.twilio.com/docs/chat/reachability-indicator) for this Service instance. The default is `false`.
* @return $this Fluent Builder
*/
- public function setReachabilityEnabled($reachabilityEnabled)
+ public function setReachabilityEnabled(bool $reachabilityEnabled): self
{
$this->options['reachabilityEnabled'] = $reachabilityEnabled;
return $this;
@@ -305,11 +313,10 @@ public function setReachabilityEnabled($reachabilityEnabled)
/**
* How long in seconds after a `started typing` event until clients should assume that user is no longer typing, even if no `ended typing` message was received. The default is 5 seconds.
*
- * @param int $typingIndicatorTimeout How long in seconds to wait before
- * assuming the user is no longer typing
+ * @param int $typingIndicatorTimeout How long in seconds after a `started typing` event until clients should assume that user is no longer typing, even if no `ended typing` message was received. The default is 5 seconds.
* @return $this Fluent Builder
*/
- public function setTypingIndicatorTimeout($typingIndicatorTimeout)
+ public function setTypingIndicatorTimeout(int $typingIndicatorTimeout): self
{
$this->options['typingIndicatorTimeout'] = $typingIndicatorTimeout;
return $this;
@@ -318,10 +325,10 @@ public function setTypingIndicatorTimeout($typingIndicatorTimeout)
/**
* DEPRECATED. The interval in seconds between consumption reports submission batches from client endpoints.
*
- * @param int $consumptionReportInterval DEPRECATED
+ * @param int $consumptionReportInterval DEPRECATED. The interval in seconds between consumption reports submission batches from client endpoints.
* @return $this Fluent Builder
*/
- public function setConsumptionReportInterval($consumptionReportInterval)
+ public function setConsumptionReportInterval(int $consumptionReportInterval): self
{
$this->options['consumptionReportInterval'] = $consumptionReportInterval;
return $this;
@@ -330,12 +337,10 @@ public function setConsumptionReportInterval($consumptionReportInterval)
/**
* Whether to send a notification when a new message is added to a channel. The default is `false`.
*
- * @param bool $notificationsNewMessageEnabled Whether to send a notification
- * when a new message is added to a
- * channel
+ * @param bool $notificationsNewMessageEnabled Whether to send a notification when a new message is added to a channel. The default is `false`.
* @return $this Fluent Builder
*/
- public function setNotificationsNewMessageEnabled($notificationsNewMessageEnabled)
+ public function setNotificationsNewMessageEnabled(bool $notificationsNewMessageEnabled): self
{
$this->options['notificationsNewMessageEnabled'] = $notificationsNewMessageEnabled;
return $this;
@@ -344,13 +349,10 @@ public function setNotificationsNewMessageEnabled($notificationsNewMessageEnable
/**
* The template to use to create the notification text displayed when a new message is added to a channel and `notifications.new_message.enabled` is `true`.
*
- * @param string $notificationsNewMessageTemplate The template to use to create
- * the notification text
- * displayed when a new message
- * is added to a channel
+ * @param string $notificationsNewMessageTemplate The template to use to create the notification text displayed when a new message is added to a channel and `notifications.new_message.enabled` is `true`.
* @return $this Fluent Builder
*/
- public function setNotificationsNewMessageTemplate($notificationsNewMessageTemplate)
+ public function setNotificationsNewMessageTemplate(string $notificationsNewMessageTemplate): self
{
$this->options['notificationsNewMessageTemplate'] = $notificationsNewMessageTemplate;
return $this;
@@ -359,12 +361,10 @@ public function setNotificationsNewMessageTemplate($notificationsNewMessageTempl
/**
* The name of the sound to play when a new message is added to a channel and `notifications.new_message.enabled` is `true`.
*
- * @param string $notificationsNewMessageSound The name of the sound to play
- * when a new message is added to a
- * channel
+ * @param string $notificationsNewMessageSound The name of the sound to play when a new message is added to a channel and `notifications.new_message.enabled` is `true`.
* @return $this Fluent Builder
*/
- public function setNotificationsNewMessageSound($notificationsNewMessageSound)
+ public function setNotificationsNewMessageSound(string $notificationsNewMessageSound): self
{
$this->options['notificationsNewMessageSound'] = $notificationsNewMessageSound;
return $this;
@@ -373,12 +373,10 @@ public function setNotificationsNewMessageSound($notificationsNewMessageSound)
/**
* Whether the new message badge is enabled. The default is `false`.
*
- * @param bool $notificationsNewMessageBadgeCountEnabled Whether the new
- * message badge is
- * enabled
+ * @param bool $notificationsNewMessageBadgeCountEnabled Whether the new message badge is enabled. The default is `false`.
* @return $this Fluent Builder
*/
- public function setNotificationsNewMessageBadgeCountEnabled($notificationsNewMessageBadgeCountEnabled)
+ public function setNotificationsNewMessageBadgeCountEnabled(bool $notificationsNewMessageBadgeCountEnabled): self
{
$this->options['notificationsNewMessageBadgeCountEnabled'] = $notificationsNewMessageBadgeCountEnabled;
return $this;
@@ -387,12 +385,10 @@ public function setNotificationsNewMessageBadgeCountEnabled($notificationsNewMes
/**
* Whether to send a notification when a member is added to a channel. The default is `false`.
*
- * @param bool $notificationsAddedToChannelEnabled Whether to send a
- * notification when a member
- * is added to a channel
+ * @param bool $notificationsAddedToChannelEnabled Whether to send a notification when a member is added to a channel. The default is `false`.
* @return $this Fluent Builder
*/
- public function setNotificationsAddedToChannelEnabled($notificationsAddedToChannelEnabled)
+ public function setNotificationsAddedToChannelEnabled(bool $notificationsAddedToChannelEnabled): self
{
$this->options['notificationsAddedToChannelEnabled'] = $notificationsAddedToChannelEnabled;
return $this;
@@ -401,14 +397,10 @@ public function setNotificationsAddedToChannelEnabled($notificationsAddedToChann
/**
* The template to use to create the notification text displayed when a member is added to a channel and `notifications.added_to_channel.enabled` is `true`.
*
- * @param string $notificationsAddedToChannelTemplate The template to use to
- * create the notification
- * text displayed when a
- * member is added to a
- * channel
+ * @param string $notificationsAddedToChannelTemplate The template to use to create the notification text displayed when a member is added to a channel and `notifications.added_to_channel.enabled` is `true`.
* @return $this Fluent Builder
*/
- public function setNotificationsAddedToChannelTemplate($notificationsAddedToChannelTemplate)
+ public function setNotificationsAddedToChannelTemplate(string $notificationsAddedToChannelTemplate): self
{
$this->options['notificationsAddedToChannelTemplate'] = $notificationsAddedToChannelTemplate;
return $this;
@@ -417,12 +409,10 @@ public function setNotificationsAddedToChannelTemplate($notificationsAddedToChan
/**
* The name of the sound to play when a member is added to a channel and `notifications.added_to_channel.enabled` is `true`.
*
- * @param string $notificationsAddedToChannelSound The name of the sound to
- * play when a member is added
- * to a channel
+ * @param string $notificationsAddedToChannelSound The name of the sound to play when a member is added to a channel and `notifications.added_to_channel.enabled` is `true`.
* @return $this Fluent Builder
*/
- public function setNotificationsAddedToChannelSound($notificationsAddedToChannelSound)
+ public function setNotificationsAddedToChannelSound(string $notificationsAddedToChannelSound): self
{
$this->options['notificationsAddedToChannelSound'] = $notificationsAddedToChannelSound;
return $this;
@@ -431,13 +421,10 @@ public function setNotificationsAddedToChannelSound($notificationsAddedToChannel
/**
* Whether to send a notification to a user when they are removed from a channel. The default is `false`.
*
- * @param bool $notificationsRemovedFromChannelEnabled Whether to send a
- * notification to a user
- * when they are removed
- * from a channel
+ * @param bool $notificationsRemovedFromChannelEnabled Whether to send a notification to a user when they are removed from a channel. The default is `false`.
* @return $this Fluent Builder
*/
- public function setNotificationsRemovedFromChannelEnabled($notificationsRemovedFromChannelEnabled)
+ public function setNotificationsRemovedFromChannelEnabled(bool $notificationsRemovedFromChannelEnabled): self
{
$this->options['notificationsRemovedFromChannelEnabled'] = $notificationsRemovedFromChannelEnabled;
return $this;
@@ -446,14 +433,10 @@ public function setNotificationsRemovedFromChannelEnabled($notificationsRemovedF
/**
* The template to use to create the notification text displayed to a user when they are removed from a channel and `notifications.removed_from_channel.enabled` is `true`.
*
- * @param string $notificationsRemovedFromChannelTemplate The template to use
- * to create the
- * notification text
- * displayed to a user
- * when they are removed
+ * @param string $notificationsRemovedFromChannelTemplate The template to use to create the notification text displayed to a user when they are removed from a channel and `notifications.removed_from_channel.enabled` is `true`.
* @return $this Fluent Builder
*/
- public function setNotificationsRemovedFromChannelTemplate($notificationsRemovedFromChannelTemplate)
+ public function setNotificationsRemovedFromChannelTemplate(string $notificationsRemovedFromChannelTemplate): self
{
$this->options['notificationsRemovedFromChannelTemplate'] = $notificationsRemovedFromChannelTemplate;
return $this;
@@ -462,13 +445,10 @@ public function setNotificationsRemovedFromChannelTemplate($notificationsRemoved
/**
* The name of the sound to play to a user when they are removed from a channel and `notifications.removed_from_channel.enabled` is `true`.
*
- * @param string $notificationsRemovedFromChannelSound The name of the sound to
- * play to a user when they
- * are removed from a
- * channel
+ * @param string $notificationsRemovedFromChannelSound The name of the sound to play to a user when they are removed from a channel and `notifications.removed_from_channel.enabled` is `true`.
* @return $this Fluent Builder
*/
- public function setNotificationsRemovedFromChannelSound($notificationsRemovedFromChannelSound)
+ public function setNotificationsRemovedFromChannelSound(string $notificationsRemovedFromChannelSound): self
{
$this->options['notificationsRemovedFromChannelSound'] = $notificationsRemovedFromChannelSound;
return $this;
@@ -477,12 +457,10 @@ public function setNotificationsRemovedFromChannelSound($notificationsRemovedFro
/**
* Whether to send a notification when a user is invited to a channel. The default is `false`.
*
- * @param bool $notificationsInvitedToChannelEnabled Whether to send a
- * notification when a user
- * is invited to a channel
+ * @param bool $notificationsInvitedToChannelEnabled Whether to send a notification when a user is invited to a channel. The default is `false`.
* @return $this Fluent Builder
*/
- public function setNotificationsInvitedToChannelEnabled($notificationsInvitedToChannelEnabled)
+ public function setNotificationsInvitedToChannelEnabled(bool $notificationsInvitedToChannelEnabled): self
{
$this->options['notificationsInvitedToChannelEnabled'] = $notificationsInvitedToChannelEnabled;
return $this;
@@ -491,14 +469,10 @@ public function setNotificationsInvitedToChannelEnabled($notificationsInvitedToC
/**
* The template to use to create the notification text displayed when a user is invited to a channel and `notifications.invited_to_channel.enabled` is `true`.
*
- * @param string $notificationsInvitedToChannelTemplate The template to use to
- * create the notification
- * text displayed when a
- * user is invited to a
- * channel
+ * @param string $notificationsInvitedToChannelTemplate The template to use to create the notification text displayed when a user is invited to a channel and `notifications.invited_to_channel.enabled` is `true`.
* @return $this Fluent Builder
*/
- public function setNotificationsInvitedToChannelTemplate($notificationsInvitedToChannelTemplate)
+ public function setNotificationsInvitedToChannelTemplate(string $notificationsInvitedToChannelTemplate): self
{
$this->options['notificationsInvitedToChannelTemplate'] = $notificationsInvitedToChannelTemplate;
return $this;
@@ -507,12 +481,10 @@ public function setNotificationsInvitedToChannelTemplate($notificationsInvitedTo
/**
* The name of the sound to play when a user is invited to a channel and `notifications.invited_to_channel.enabled` is `true`.
*
- * @param string $notificationsInvitedToChannelSound The name of the sound to
- * play when a user is
- * invited to a channel
+ * @param string $notificationsInvitedToChannelSound The name of the sound to play when a user is invited to a channel and `notifications.invited_to_channel.enabled` is `true`.
* @return $this Fluent Builder
*/
- public function setNotificationsInvitedToChannelSound($notificationsInvitedToChannelSound)
+ public function setNotificationsInvitedToChannelSound(string $notificationsInvitedToChannelSound): self
{
$this->options['notificationsInvitedToChannelSound'] = $notificationsInvitedToChannelSound;
return $this;
@@ -521,10 +493,10 @@ public function setNotificationsInvitedToChannelSound($notificationsInvitedToCha
/**
* The URL for pre-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details.
*
- * @param string $preWebhookUrl The webhook URL for pre-event webhooks
+ * @param string $preWebhookUrl The URL for pre-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details.
* @return $this Fluent Builder
*/
- public function setPreWebhookUrl($preWebhookUrl)
+ public function setPreWebhookUrl(string $preWebhookUrl): self
{
$this->options['preWebhookUrl'] = $preWebhookUrl;
return $this;
@@ -533,10 +505,10 @@ public function setPreWebhookUrl($preWebhookUrl)
/**
* The URL for post-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details.
*
- * @param string $postWebhookUrl The URL for post-event webhooks
+ * @param string $postWebhookUrl The URL for post-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details.
* @return $this Fluent Builder
*/
- public function setPostWebhookUrl($postWebhookUrl)
+ public function setPostWebhookUrl(string $postWebhookUrl): self
{
$this->options['postWebhookUrl'] = $postWebhookUrl;
return $this;
@@ -545,11 +517,10 @@ public function setPostWebhookUrl($postWebhookUrl)
/**
* The HTTP method to use for calls to the `pre_webhook_url` and `post_webhook_url` webhooks. Can be: `POST` or `GET` and the default is `POST`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details.
*
- * @param string $webhookMethod The HTTP method to use for both PRE and POST
- * webhooks
+ * @param string $webhookMethod The HTTP method to use for calls to the `pre_webhook_url` and `post_webhook_url` webhooks. Can be: `POST` or `GET` and the default is `POST`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details.
* @return $this Fluent Builder
*/
- public function setWebhookMethod($webhookMethod)
+ public function setWebhookMethod(string $webhookMethod): self
{
$this->options['webhookMethod'] = $webhookMethod;
return $this;
@@ -558,11 +529,10 @@ public function setWebhookMethod($webhookMethod)
/**
* The list of webhook events that are enabled for this Service instance. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details.
*
- * @param string $webhookFilters The list of webhook events that are enabled
- * for this Service instance
+ * @param string[] $webhookFilters The list of webhook events that are enabled for this Service instance. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details.
* @return $this Fluent Builder
*/
- public function setWebhookFilters($webhookFilters)
+ public function setWebhookFilters(array $webhookFilters): self
{
$this->options['webhookFilters'] = $webhookFilters;
return $this;
@@ -571,11 +541,10 @@ public function setWebhookFilters($webhookFilters)
/**
* The maximum number of Members that can be added to Channels within this Service. Can be up to 1,000.
*
- * @param int $limitsChannelMembers The maximum number of Members that can be
- * added to Channels within this Service
+ * @param int $limitsChannelMembers The maximum number of Members that can be added to Channels within this Service. Can be up to 1,000.
* @return $this Fluent Builder
*/
- public function setLimitsChannelMembers($limitsChannelMembers)
+ public function setLimitsChannelMembers(int $limitsChannelMembers): self
{
$this->options['limitsChannelMembers'] = $limitsChannelMembers;
return $this;
@@ -584,11 +553,10 @@ public function setLimitsChannelMembers($limitsChannelMembers)
/**
* The maximum number of Channels Users can be a Member of within this Service. Can be up to 1,000.
*
- * @param int $limitsUserChannels The maximum number of Channels Users can be a
- * Member of within this Service
+ * @param int $limitsUserChannels The maximum number of Channels Users can be a Member of within this Service. Can be up to 1,000.
* @return $this Fluent Builder
*/
- public function setLimitsUserChannels($limitsUserChannels)
+ public function setLimitsUserChannels(int $limitsUserChannels): self
{
$this->options['limitsUserChannels'] = $limitsUserChannels;
return $this;
@@ -597,11 +565,10 @@ public function setLimitsUserChannels($limitsUserChannels)
/**
* The message to send when a media message has no text. Can be used as placeholder message.
*
- * @param string $mediaCompatibilityMessage The message to send when a media
- * message has no text
+ * @param string $mediaCompatibilityMessage The message to send when a media message has no text. Can be used as placeholder message.
* @return $this Fluent Builder
*/
- public function setMediaCompatibilityMessage($mediaCompatibilityMessage)
+ public function setMediaCompatibilityMessage(string $mediaCompatibilityMessage): self
{
$this->options['mediaCompatibilityMessage'] = $mediaCompatibilityMessage;
return $this;
@@ -610,12 +577,10 @@ public function setMediaCompatibilityMessage($mediaCompatibilityMessage)
/**
* The number of times to retry a call to the `pre_webhook_url` if the request times out (after 5 seconds) or it receives a 429, 503, or 504 HTTP response. Default retry count is 0 times, which means the call won't be retried.
*
- * @param int $preWebhookRetryCount Count of times webhook will be retried in
- * case of timeout or 429/503/504 HTTP
- * responses
+ * @param int $preWebhookRetryCount The number of times to retry a call to the `pre_webhook_url` if the request times out (after 5 seconds) or it receives a 429, 503, or 504 HTTP response. Default retry count is 0 times, which means the call won't be retried.
* @return $this Fluent Builder
*/
- public function setPreWebhookRetryCount($preWebhookRetryCount)
+ public function setPreWebhookRetryCount(int $preWebhookRetryCount): self
{
$this->options['preWebhookRetryCount'] = $preWebhookRetryCount;
return $this;
@@ -624,11 +589,10 @@ public function setPreWebhookRetryCount($preWebhookRetryCount)
/**
* The number of times to retry a call to the `post_webhook_url` if the request times out (after 5 seconds) or it receives a 429, 503, or 504 HTTP response. The default is 0, which means the call won't be retried.
*
- * @param int $postWebhookRetryCount The number of times calls to the
- * `post_webhook_url` will be retried
+ * @param int $postWebhookRetryCount The number of times to retry a call to the `post_webhook_url` if the request times out (after 5 seconds) or it receives a 429, 503, or 504 HTTP response. The default is 0, which means the call won't be retried.
* @return $this Fluent Builder
*/
- public function setPostWebhookRetryCount($postWebhookRetryCount)
+ public function setPostWebhookRetryCount(int $postWebhookRetryCount): self
{
$this->options['postWebhookRetryCount'] = $postWebhookRetryCount;
return $this;
@@ -637,10 +601,10 @@ public function setPostWebhookRetryCount($postWebhookRetryCount)
/**
* Whether to log notifications. The default is `false`.
*
- * @param bool $notificationsLogEnabled Whether to log notifications
+ * @param bool $notificationsLogEnabled Whether to log notifications. The default is `false`.
* @return $this Fluent Builder
*/
- public function setNotificationsLogEnabled($notificationsLogEnabled)
+ public function setNotificationsLogEnabled(bool $notificationsLogEnabled): self
{
$this->options['notificationsLogEnabled'] = $notificationsLogEnabled;
return $this;
@@ -651,14 +615,10 @@ public function setNotificationsLogEnabled($notificationsLogEnabled)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Chat.V2.UpdateServiceOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Chat.V2.UpdateServiceOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/ServicePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/ServicePage.php
index 0bc7c7a..797910e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/ServicePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Chat/V2/ServicePage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return ServiceInstance \Twilio\Rest\Chat\V2\ServiceInstance
+ */
+ public function buildInstance(array $payload): ServiceInstance
{
return new ServiceInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Chat.V2.ServicePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Client.php b/vendor/twilio/sdk/src/Twilio/Rest/Client.php
index 96b94c8..cf187f6 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Client.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Client.php
@@ -1,51 +1,60 @@
username = $username;
- } else {
- if (\array_key_exists(self::ENV_ACCOUNT_SID, $environment)) {
- $this->username = $environment[self::ENV_ACCOUNT_SID];
- }
- }
-
- if ($password) {
- $this->password = $password;
- } else {
- if (\array_key_exists(self::ENV_AUTH_TOKEN, $environment)) {
- $this->password = $environment[self::ENV_AUTH_TOKEN];
- }
- }
-
- if (!$this->username || !$this->password) {
- throw new ConfigurationException("Credentials are required to create a Client");
- }
-
- $this->accountSid = $accountSid ?: $this->username;
- $this->region = $region;
-
- if ($httpClient) {
- $this->httpClient = $httpClient;
- } else {
- $this->httpClient = new CurlClient();
- }
- }
-
- /**
- * Makes a request to the Twilio API using the configured http client
- * Authentication information is automatically added if none is provided
- *
- * @param string $method HTTP Method
- * @param string $uri Fully qualified url
- * @param string[] $params Query string parameters
- * @param string[] $data POST body data
- * @param string[] $headers HTTP Headers
- * @param string $username User for Authentication
- * @param string $password Password for Authentication
- * @param int $timeout Timeout in seconds
- * @return \Twilio\Http\Response Response from the Twilio API
- */
- public function request($method, $uri, $params = array(), $data = array(), $headers = array(), $username = null, $password = null, $timeout = null)
- {
- $username = $username ? $username : $this->username;
- $password = $password ? $password : $this->password;
-
- $headers['User-Agent'] = 'twilio-php/' . VersionInfo::string() .
- ' (PHP ' . \phpversion() . ')';
- $headers['Accept-Charset'] = 'utf-8';
-
- if ($method == 'POST' && !\array_key_exists('Content-Type', $headers)) {
- $headers['Content-Type'] = 'application/x-www-form-urlencoded';
- }
-
- if (!\array_key_exists('Accept', $headers)) {
- $headers['Accept'] = 'application/json';
- }
-
- if ($this->region) {
- list($head, $tail) = \explode('.', $uri, 2);
-
- if (\strpos($tail, $this->region) !== 0) {
- $uri = \implode('.', array($head, $this->region, $tail));
- }
- }
-
- return $this->getHttpClient()->request(
- $method,
- $uri,
- $params,
- $data,
- $headers,
- $username,
- $password,
- $timeout
- );
- }
-
- /**
- * Retrieve the Username
- *
- * @return string Current Username
- */
- public function getUsername()
- {
- return $this->username;
- }
-
- /**
- * Retrieve the Password
- *
- * @return string Current Password
- */
- public function getPassword()
- {
- return $this->password;
- }
-
- /**
- * Retrieve the AccountSid
- *
- * @return string Current AccountSid
- */
- public function getAccountSid()
- {
- return $this->accountSid;
- }
-
- /**
- * Retrieve the Region
- *
- * @return string Current Region
- */
- public function getRegion()
- {
- return $this->region;
- }
-
- /**
- * Retrieve the HttpClient
- *
- * @return \Twilio\Http\Client Current HttpClient
- */
- public function getHttpClient()
- {
- return $this->httpClient;
- }
- /**
- * Set the HttpClient
- *
- * @param \Twilio\Http\Client $httpClient HttpClient to use
- */
- public function setHttpClient(HttpClient $httpClient)
- {
- $this->httpClient = $httpClient;
- }
+class Client extends BaseClient {
+ protected $_accounts;
+ protected $_api;
+ protected $_assistants;
+ protected $_bulkexports;
+ protected $_chat;
+ protected $_content;
+ protected $_conversations;
+ protected $_events;
+ protected $_flexApi;
+ protected $_frontlineApi;
+ protected $_iam;
+ protected $_insights;
+ protected $_intelligence;
+ protected $_ipMessaging;
+ protected $_lookups;
+ protected $_marketplace;
+ protected $_messaging;
+ protected $_microvisor;
+ protected $_monitor;
+ protected $_notify;
+ protected $_numbers;
+ protected $_oauth;
+ protected $_preview;
+ protected $_pricing;
+ protected $_proxy;
+ protected $_routes;
+ protected $_serverless;
+ protected $_studio;
+ protected $_supersim;
+ protected $_sync;
+ protected $_taskrouter;
+ protected $_trunking;
+ protected $_trusthub;
+ protected $_verify;
+ protected $_video;
+ protected $_voice;
+ protected $_wireless;
/**
* Access the Accounts Twilio Domain
*
- * @return \Twilio\Rest\Accounts Accounts Twilio Domain
+ * @return Accounts Accounts Twilio Domain
*/
- protected function getAccounts()
- {
+ protected function getAccounts(): Accounts {
if (!$this->_accounts) {
$this->_accounts = new Accounts($this);
}
return $this->_accounts;
}
-
/**
* Access the Api Twilio Domain
*
- * @return \Twilio\Rest\Api Api Twilio Domain
+ * @return Api Api Twilio Domain
*/
- protected function getApi()
- {
+ protected function getApi(): Api {
if (!$this->_api) {
$this->_api = new Api($this);
}
return $this->_api;
}
-
- /**
- * @return \Twilio\Rest\Api\V2010\AccountContext Account provided as the
- * authenticating account
- */
- public function getAccount()
- {
- return $this->api->v2010->account;
- }
-
- /**
- * @return \Twilio\Rest\Api\V2010\Account\AddressList
- */
- protected function getAddresses()
- {
- return $this->api->v2010->account->addresses;
- }
-
- /**
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\AddressContext
- */
- protected function contextAddresses($sid)
- {
- return $this->api->v2010->account->addresses($sid);
- }
-
- /**
- * @return \Twilio\Rest\Api\V2010\Account\ApplicationList
- */
- protected function getApplications()
- {
- return $this->api->v2010->account->applications;
- }
-
- /**
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\ApplicationContext
- */
- protected function contextApplications($sid)
- {
- return $this->api->v2010->account->applications($sid);
- }
-
- /**
- * @return \Twilio\Rest\Api\V2010\Account\AuthorizedConnectAppList
- */
- protected function getAuthorizedConnectApps()
- {
- return $this->api->v2010->account->authorizedConnectApps;
- }
-
- /**
- * @param string $connectAppSid The SID of the Connect App to fetch
- * @return \Twilio\Rest\Api\V2010\Account\AuthorizedConnectAppContext
- */
- protected function contextAuthorizedConnectApps($connectAppSid)
- {
- return $this->api->v2010->account->authorizedConnectApps($connectAppSid);
- }
-
- /**
- * @return \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountryList
- */
- protected function getAvailablePhoneNumbers()
- {
- return $this->api->v2010->account->availablePhoneNumbers;
- }
-
- /**
- * @param string $countryCode The ISO country code of the country to fetch
- * available phone number information about
- * @return \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountryContext
- */
- protected function contextAvailablePhoneNumbers($countryCode)
- {
- return $this->api->v2010->account->availablePhoneNumbers($countryCode);
- }
-
- /**
- * @return \Twilio\Rest\Api\V2010\Account\BalanceList
- */
- protected function getBalance()
- {
- return $this->api->v2010->account->balance;
- }
-
- /**
- * @return \Twilio\Rest\Api\V2010\Account\CallList
- */
- protected function getCalls()
- {
- return $this->api->v2010->account->calls;
- }
-
- /**
- * @param string $sid The SID of the Call resource to fetch
- * @return \Twilio\Rest\Api\V2010\Account\CallContext
- */
- protected function contextCalls($sid)
- {
- return $this->api->v2010->account->calls($sid);
- }
-
- /**
- * @return \Twilio\Rest\Api\V2010\Account\ConferenceList
- */
- protected function getConferences()
- {
- return $this->api->v2010->account->conferences;
- }
-
- /**
- * @param string $sid The unique string that identifies this resource
- * @return \Twilio\Rest\Api\V2010\Account\ConferenceContext
- */
- protected function contextConferences($sid)
- {
- return $this->api->v2010->account->conferences($sid);
- }
-
- /**
- * @return \Twilio\Rest\Api\V2010\Account\ConnectAppList
- */
- protected function getConnectApps()
- {
- return $this->api->v2010->account->connectApps;
- }
-
- /**
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\ConnectAppContext
- */
- protected function contextConnectApps($sid)
- {
- return $this->api->v2010->account->connectApps($sid);
- }
-
- /**
- * @return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumberList
- */
- protected function getIncomingPhoneNumbers()
- {
- return $this->api->v2010->account->incomingPhoneNumbers;
- }
-
- /**
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumberContext
- */
- protected function contextIncomingPhoneNumbers($sid)
- {
- return $this->api->v2010->account->incomingPhoneNumbers($sid);
- }
-
- /**
- * @return \Twilio\Rest\Api\V2010\Account\KeyList
- */
- protected function getKeys()
- {
- return $this->api->v2010->account->keys;
- }
-
- /**
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\KeyContext
- */
- protected function contextKeys($sid)
- {
- return $this->api->v2010->account->keys($sid);
- }
-
- /**
- * @return \Twilio\Rest\Api\V2010\Account\MessageList
- */
- protected function getMessages()
- {
- return $this->api->v2010->account->messages;
- }
-
- /**
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\MessageContext
- */
- protected function contextMessages($sid)
- {
- return $this->api->v2010->account->messages($sid);
- }
-
- /**
- * @return \Twilio\Rest\Api\V2010\Account\NewKeyList
- */
- protected function getNewKeys()
- {
- return $this->api->v2010->account->newKeys;
- }
-
- /**
- * @return \Twilio\Rest\Api\V2010\Account\NewSigningKeyList
- */
- protected function getNewSigningKeys()
- {
- return $this->api->v2010->account->newSigningKeys;
- }
-
- /**
- * @return \Twilio\Rest\Api\V2010\Account\NotificationList
- */
- protected function getNotifications()
- {
- return $this->api->v2010->account->notifications;
- }
-
- /**
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\NotificationContext
- */
- protected function contextNotifications($sid)
- {
- return $this->api->v2010->account->notifications($sid);
- }
-
- /**
- * @return \Twilio\Rest\Api\V2010\Account\OutgoingCallerIdList
- */
- protected function getOutgoingCallerIds()
- {
- return $this->api->v2010->account->outgoingCallerIds;
- }
-
- /**
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\OutgoingCallerIdContext
- */
- protected function contextOutgoingCallerIds($sid)
- {
- return $this->api->v2010->account->outgoingCallerIds($sid);
- }
-
- /**
- * @return \Twilio\Rest\Api\V2010\Account\QueueList
- */
- protected function getQueues()
- {
- return $this->api->v2010->account->queues;
- }
-
- /**
- * @param string $sid The unique string that identifies this resource
- * @return \Twilio\Rest\Api\V2010\Account\QueueContext
- */
- protected function contextQueues($sid)
- {
- return $this->api->v2010->account->queues($sid);
- }
-
- /**
- * @return \Twilio\Rest\Api\V2010\Account\RecordingList
- */
- protected function getRecordings()
- {
- return $this->api->v2010->account->recordings;
- }
-
- /**
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\RecordingContext
- */
- protected function contextRecordings($sid)
- {
- return $this->api->v2010->account->recordings($sid);
- }
-
- /**
- * @return \Twilio\Rest\Api\V2010\Account\SigningKeyList
- */
- protected function getSigningKeys()
- {
- return $this->api->v2010->account->signingKeys;
- }
-
/**
- * @param string $sid The sid
- * @return \Twilio\Rest\Api\V2010\Account\SigningKeyContext
- */
- protected function contextSigningKeys($sid)
- {
- return $this->api->v2010->account->signingKeys($sid);
- }
-
- /**
- * @return \Twilio\Rest\Api\V2010\Account\SipList
- */
- protected function getSip()
- {
- return $this->api->v2010->account->sip;
- }
-
- /**
- * @return \Twilio\Rest\Api\V2010\Account\ShortCodeList
- */
- protected function getShortCodes()
- {
- return $this->api->v2010->account->shortCodes;
- }
-
- /**
- * @param string $sid The unique string that identifies this resource
- * @return \Twilio\Rest\Api\V2010\Account\ShortCodeContext
- */
- protected function contextShortCodes($sid)
- {
- return $this->api->v2010->account->shortCodes($sid);
- }
-
- /**
- * @return \Twilio\Rest\Api\V2010\Account\TokenList
- */
- protected function getTokens()
- {
- return $this->api->v2010->account->tokens;
- }
-
- /**
- * @return \Twilio\Rest\Api\V2010\Account\TranscriptionList
- */
- protected function getTranscriptions()
- {
- return $this->api->v2010->account->transcriptions;
- }
-
- /**
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Api\V2010\Account\TranscriptionContext
- */
- protected function contextTranscriptions($sid)
- {
- return $this->api->v2010->account->transcriptions($sid);
- }
-
- /**
- * @return \Twilio\Rest\Api\V2010\Account\UsageList
- */
- protected function getUsage()
- {
- return $this->api->v2010->account->usage;
- }
-
- /**
- * @return \Twilio\Rest\Api\V2010\Account\ValidationRequestList
- */
- protected function getValidationRequests()
- {
- return $this->api->v2010->account->validationRequests;
- }
-
- /**
- * Access the Authy Twilio Domain
+ * Access the Assistants Twilio Domain
*
- * @return \Twilio\Rest\Authy Authy Twilio Domain
+ * @return Assistants Assistants Twilio Domain
*/
- protected function getAuthy()
- {
- if (!$this->_authy) {
- $this->_authy = new Authy($this);
+ protected function getAssistants(): Assistants {
+ if (!$this->_assistants) {
+ $this->_assistants = new Assistants($this);
}
- return $this->_authy;
+ return $this->_assistants;
}
-
/**
- * Access the Autopilot Twilio Domain
+ * Access the Bulkexports Twilio Domain
*
- * @return \Twilio\Rest\Autopilot Autopilot Twilio Domain
+ * @return Bulkexports Bulkexports Twilio Domain
*/
- protected function getAutopilot()
- {
- if (!$this->_autopilot) {
- $this->_autopilot = new Autopilot($this);
+ protected function getBulkexports(): Bulkexports {
+ if (!$this->_bulkexports) {
+ $this->_bulkexports = new Bulkexports($this);
}
- return $this->_autopilot;
+ return $this->_bulkexports;
}
-
/**
* Access the Chat Twilio Domain
*
- * @return \Twilio\Rest\Chat Chat Twilio Domain
+ * @return Chat Chat Twilio Domain
*/
- protected function getChat()
- {
+ protected function getChat(): Chat {
if (!$this->_chat) {
$this->_chat = new Chat($this);
}
return $this->_chat;
}
-
+ /**
+ * Access the Content Twilio Domain
+ *
+ * @return Content Content Twilio Domain
+ */
+ protected function getContent(): Content {
+ if (!$this->_content) {
+ $this->_content = new Content($this);
+ }
+ return $this->_content;
+ }
/**
* Access the Conversations Twilio Domain
*
- * @return \Twilio\Rest\Conversations Conversations Twilio Domain
+ * @return Conversations Conversations Twilio Domain
*/
- protected function getConversations()
- {
+ protected function getConversations(): Conversations {
if (!$this->_conversations) {
$this->_conversations = new Conversations($this);
}
return $this->_conversations;
}
-
/**
- * Access the Fax Twilio Domain
+ * Access the Events Twilio Domain
*
- * @return \Twilio\Rest\Fax Fax Twilio Domain
+ * @return Events Events Twilio Domain
*/
- protected function getFax()
- {
- if (!$this->_fax) {
- $this->_fax = new Fax($this);
+ protected function getEvents(): Events {
+ if (!$this->_events) {
+ $this->_events = new Events($this);
}
- return $this->_fax;
+ return $this->_events;
}
-
/**
* Access the FlexApi Twilio Domain
*
- * @return \Twilio\Rest\FlexApi FlexApi Twilio Domain
+ * @return FlexApi FlexApi Twilio Domain
*/
- protected function getFlexApi()
- {
+ protected function getFlexApi(): FlexApi {
if (!$this->_flexApi) {
$this->_flexApi = new FlexApi($this);
}
return $this->_flexApi;
}
-
+ /**
+ * Access the FrontlineApi Twilio Domain
+ *
+ * @return FrontlineApi FrontlineApi Twilio Domain
+ */
+ protected function getFrontlineApi(): FrontlineApi {
+ if (!$this->_frontlineApi) {
+ $this->_frontlineApi = new FrontlineApi($this);
+ }
+ return $this->_frontlineApi;
+ }
+ /**
+ * Access the Iam Twilio Domain
+ *
+ * @return Iam Iam Twilio Domain
+ */
+ protected function getIam(): Iam {
+ if (!$this->_iam) {
+ $this->_iam = new Iam($this);
+ }
+ return $this->_iam;
+ }
/**
* Access the Insights Twilio Domain
*
- * @return \Twilio\Rest\Insights Insights Twilio Domain
+ * @return Insights Insights Twilio Domain
*/
- protected function getInsights()
- {
+ protected function getInsights(): Insights {
if (!$this->_insights) {
$this->_insights = new Insights($this);
}
return $this->_insights;
}
-
+ /**
+ * Access the Intelligence Twilio Domain
+ *
+ * @return Intelligence Intelligence Twilio Domain
+ */
+ protected function getIntelligence(): Intelligence {
+ if (!$this->_intelligence) {
+ $this->_intelligence = new Intelligence($this);
+ }
+ return $this->_intelligence;
+ }
/**
* Access the IpMessaging Twilio Domain
*
- * @return \Twilio\Rest\IpMessaging IpMessaging Twilio Domain
+ * @return IpMessaging IpMessaging Twilio Domain
*/
- protected function getIpMessaging()
- {
+ protected function getIpMessaging(): IpMessaging {
if (!$this->_ipMessaging) {
$this->_ipMessaging = new IpMessaging($this);
}
return $this->_ipMessaging;
}
-
/**
* Access the Lookups Twilio Domain
*
- * @return \Twilio\Rest\Lookups Lookups Twilio Domain
+ * @return Lookups Lookups Twilio Domain
*/
- protected function getLookups()
- {
+ protected function getLookups(): Lookups {
if (!$this->_lookups) {
$this->_lookups = new Lookups($this);
}
return $this->_lookups;
}
-
+ /**
+ * Access the Marketplace Twilio Domain
+ *
+ * @return Marketplace Marketplace Twilio Domain
+ */
+ protected function getMarketplace(): Marketplace {
+ if (!$this->_marketplace) {
+ $this->_marketplace = new Marketplace($this);
+ }
+ return $this->_marketplace;
+ }
/**
* Access the Messaging Twilio Domain
*
- * @return \Twilio\Rest\Messaging Messaging Twilio Domain
+ * @return Messaging Messaging Twilio Domain
*/
- protected function getMessaging()
- {
+ protected function getMessaging(): Messaging {
if (!$this->_messaging) {
$this->_messaging = new Messaging($this);
}
return $this->_messaging;
}
-
+ /**
+ * Access the Microvisor Twilio Domain
+ *
+ * @return Microvisor Microvisor Twilio Domain
+ */
+ protected function getMicrovisor(): Microvisor {
+ if (!$this->_microvisor) {
+ $this->_microvisor = new Microvisor($this);
+ }
+ return $this->_microvisor;
+ }
/**
* Access the Monitor Twilio Domain
*
- * @return \Twilio\Rest\Monitor Monitor Twilio Domain
+ * @return Monitor Monitor Twilio Domain
*/
- protected function getMonitor()
- {
+ protected function getMonitor(): Monitor {
if (!$this->_monitor) {
$this->_monitor = new Monitor($this);
}
return $this->_monitor;
}
-
/**
* Access the Notify Twilio Domain
*
- * @return \Twilio\Rest\Notify Notify Twilio Domain
+ * @return Notify Notify Twilio Domain
*/
- protected function getNotify()
- {
+ protected function getNotify(): Notify {
if (!$this->_notify) {
$this->_notify = new Notify($this);
}
return $this->_notify;
}
-
/**
* Access the Numbers Twilio Domain
*
- * @return \Twilio\Rest\Numbers Numbers Twilio Domain
+ * @return Numbers Numbers Twilio Domain
*/
- protected function getNumbers()
- {
+ protected function getNumbers(): Numbers {
if (!$this->_numbers) {
$this->_numbers = new Numbers($this);
}
return $this->_numbers;
}
-
+ /**
+ * Access the Oauth Twilio Domain
+ *
+ * @return Oauth Oauth Twilio Domain
+ */
+ protected function getOauth(): Oauth {
+ if (!$this->_oauth) {
+ $this->_oauth = new Oauth($this);
+ }
+ return $this->_oauth;
+ }
/**
* Access the Preview Twilio Domain
*
- * @return \Twilio\Rest\Preview Preview Twilio Domain
+ * @return Preview Preview Twilio Domain
*/
- protected function getPreview()
- {
+ protected function getPreview(): Preview {
if (!$this->_preview) {
$this->_preview = new Preview($this);
}
return $this->_preview;
}
-
/**
* Access the Pricing Twilio Domain
*
- * @return \Twilio\Rest\Pricing Pricing Twilio Domain
+ * @return Pricing Pricing Twilio Domain
*/
- protected function getPricing()
- {
+ protected function getPricing(): Pricing {
if (!$this->_pricing) {
$this->_pricing = new Pricing($this);
}
return $this->_pricing;
}
-
/**
* Access the Proxy Twilio Domain
*
- * @return \Twilio\Rest\Proxy Proxy Twilio Domain
+ * @return Proxy Proxy Twilio Domain
*/
- protected function getProxy()
- {
+ protected function getProxy(): Proxy {
if (!$this->_proxy) {
$this->_proxy = new Proxy($this);
}
return $this->_proxy;
}
-
+ /**
+ * Access the Routes Twilio Domain
+ *
+ * @return Routes Routes Twilio Domain
+ */
+ protected function getRoutes(): Routes {
+ if (!$this->_routes) {
+ $this->_routes = new Routes($this);
+ }
+ return $this->_routes;
+ }
/**
* Access the Serverless Twilio Domain
*
- * @return \Twilio\Rest\Serverless Serverless Twilio Domain
+ * @return Serverless Serverless Twilio Domain
*/
- protected function getServerless()
- {
+ protected function getServerless(): Serverless {
if (!$this->_serverless) {
$this->_serverless = new Serverless($this);
}
return $this->_serverless;
}
-
/**
* Access the Studio Twilio Domain
*
- * @return \Twilio\Rest\Studio Studio Twilio Domain
+ * @return Studio Studio Twilio Domain
*/
- protected function getStudio()
- {
+ protected function getStudio(): Studio {
if (!$this->_studio) {
$this->_studio = new Studio($this);
}
return $this->_studio;
}
-
+ /**
+ * Access the Supersim Twilio Domain
+ *
+ * @return Supersim Supersim Twilio Domain
+ */
+ protected function getSupersim(): Supersim {
+ if (!$this->_supersim) {
+ $this->_supersim = new Supersim($this);
+ }
+ return $this->_supersim;
+ }
/**
* Access the Sync Twilio Domain
*
- * @return \Twilio\Rest\Sync Sync Twilio Domain
+ * @return Sync Sync Twilio Domain
*/
- protected function getSync()
- {
+ protected function getSync(): Sync {
if (!$this->_sync) {
$this->_sync = new Sync($this);
}
return $this->_sync;
}
-
/**
* Access the Taskrouter Twilio Domain
*
- * @return \Twilio\Rest\Taskrouter Taskrouter Twilio Domain
+ * @return Taskrouter Taskrouter Twilio Domain
*/
- protected function getTaskrouter()
- {
+ protected function getTaskrouter(): Taskrouter {
if (!$this->_taskrouter) {
$this->_taskrouter = new Taskrouter($this);
}
return $this->_taskrouter;
}
-
/**
* Access the Trunking Twilio Domain
*
- * @return \Twilio\Rest\Trunking Trunking Twilio Domain
+ * @return Trunking Trunking Twilio Domain
*/
- protected function getTrunking()
- {
+ protected function getTrunking(): Trunking {
if (!$this->_trunking) {
$this->_trunking = new Trunking($this);
}
return $this->_trunking;
}
-
+ /**
+ * Access the Trusthub Twilio Domain
+ *
+ * @return Trusthub Trusthub Twilio Domain
+ */
+ protected function getTrusthub(): Trusthub {
+ if (!$this->_trusthub) {
+ $this->_trusthub = new Trusthub($this);
+ }
+ return $this->_trusthub;
+ }
/**
* Access the Verify Twilio Domain
*
- * @return \Twilio\Rest\Verify Verify Twilio Domain
+ * @return Verify Verify Twilio Domain
*/
- protected function getVerify()
- {
+ protected function getVerify(): Verify {
if (!$this->_verify) {
$this->_verify = new Verify($this);
}
return $this->_verify;
}
-
/**
* Access the Video Twilio Domain
*
- * @return \Twilio\Rest\Video Video Twilio Domain
+ * @return Video Video Twilio Domain
*/
- protected function getVideo()
- {
+ protected function getVideo(): Video {
if (!$this->_video) {
$this->_video = new Video($this);
}
return $this->_video;
}
-
/**
* Access the Voice Twilio Domain
*
- * @return \Twilio\Rest\Voice Voice Twilio Domain
+ * @return Voice Voice Twilio Domain
*/
- protected function getVoice()
- {
+ protected function getVoice(): Voice {
if (!$this->_voice) {
$this->_voice = new Voice($this);
}
return $this->_voice;
}
-
/**
* Access the Wireless Twilio Domain
*
- * @return \Twilio\Rest\Wireless Wireless Twilio Domain
+ * @return Wireless Wireless Twilio Domain
*/
- protected function getWireless()
- {
+ protected function getWireless(): Wireless {
if (!$this->_wireless) {
$this->_wireless = new Wireless($this);
}
return $this->_wireless;
}
-
+ protected function getAddresses(): \Twilio\Rest\Api\V2010\Account\AddressList {
+ return $this->api->v2010->account->addresses;
+ }
/**
- * Magic getter to lazy load domains
- *
- * @param string $name Domain to return
- * @return \Twilio\Domain The requested domain
- * @throws TwilioException For unknown domains
- */
- public function __get($name)
- {
- $method = 'get' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return $this->$method();
- }
-
- throw new TwilioException('Unknown domain ' . $name);
+ * @param string $sid The Twilio-provided string that uniquely identifies the Address resource to fetch.
+ */
+ protected function contextAddresses(string $sid): \Twilio\Rest\Api\V2010\Account\AddressContext {
+ return $this->api->v2010->account->addresses($sid);
+ }
+ protected function getApplications(): \Twilio\Rest\Api\V2010\Account\ApplicationList {
+ return $this->api->v2010->account->applications;
}
-
/**
- * Magic call to lazy load contexts
- *
- * @param string $name Context to return
- * @param mixed[] $arguments Context to return
- * @return \Twilio\InstanceContext The requested context
- * @throws TwilioException For unknown contexts
- */
- public function __call($name, $arguments)
- {
- $method = 'context' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return \call_user_func_array(array($this, $method), $arguments);
- }
-
- throw new TwilioException('Unknown context ' . $name);
+ * @param string $sid The Twilio-provided string that uniquely identifies the Application resource to fetch.
+ */
+ protected function contextApplications(string $sid): \Twilio\Rest\Api\V2010\Account\ApplicationContext {
+ return $this->api->v2010->account->applications($sid);
+ }
+ protected function getAuthorizedConnectApps(): \Twilio\Rest\Api\V2010\Account\AuthorizedConnectAppList {
+ return $this->api->v2010->account->authorizedConnectApps;
}
-
/**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Client ' . $this->getAccountSid() . ']';
+ * @param string $connectAppSid The SID of the Connect App to fetch.
+ */
+ protected function contextAuthorizedConnectApps(string $connectAppSid): \Twilio\Rest\Api\V2010\Account\AuthorizedConnectAppContext {
+ return $this->api->v2010->account->authorizedConnectApps($connectAppSid);
+ }
+ protected function getAvailablePhoneNumbers(): \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountryList {
+ return $this->api->v2010->account->availablePhoneNumbers;
}
-
/**
- * Validates connection to new SSL certificate endpoint
- *
- * @param CurlClient $client
- * @throws TwilioException if request fails
- */
- public function validateSslCertificate($client)
- {
- $response = $client->request('GET', 'https://api.twilio.com:8443');
-
- if ($response->getStatusCode() < 200 || $response->getStatusCode() > 300) {
- throw new TwilioException("Failed to validate SSL certificate");
- }
+ * @param string $countryCode The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country to fetch available phone number information about.
+ */
+ protected function contextAvailablePhoneNumbers(string $countryCode): \Twilio\Rest\Api\V2010\Account\AvailablePhoneNumberCountryContext {
+ return $this->api->v2010->account->availablePhoneNumbers($countryCode);
+ }
+ protected function getBalance(): \Twilio\Rest\Api\V2010\Account\BalanceList {
+ return $this->api->v2010->account->balance;
+ }
+ protected function getCalls(): \Twilio\Rest\Api\V2010\Account\CallList {
+ return $this->api->v2010->account->calls;
+ }
+ /**
+ * @param string $sid The SID of the Call resource to fetch.
+ */
+ protected function contextCalls(string $sid): \Twilio\Rest\Api\V2010\Account\CallContext {
+ return $this->api->v2010->account->calls($sid);
+ }
+ protected function getConferences(): \Twilio\Rest\Api\V2010\Account\ConferenceList {
+ return $this->api->v2010->account->conferences;
+ }
+ /**
+ * @param string $sid The Twilio-provided string that uniquely identifies the Conference resource to fetch
+ */
+ protected function contextConferences(string $sid): \Twilio\Rest\Api\V2010\Account\ConferenceContext {
+ return $this->api->v2010->account->conferences($sid);
+ }
+ protected function getConnectApps(): \Twilio\Rest\Api\V2010\Account\ConnectAppList {
+ return $this->api->v2010->account->connectApps;
+ }
+ /**
+ * @param string $sid The Twilio-provided string that uniquely identifies the ConnectApp resource to fetch.
+ */
+ protected function contextConnectApps(string $sid): \Twilio\Rest\Api\V2010\Account\ConnectAppContext {
+ return $this->api->v2010->account->connectApps($sid);
+ }
+ protected function getIncomingPhoneNumbers(): \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumberList {
+ return $this->api->v2010->account->incomingPhoneNumbers;
+ }
+ /**
+ * @param string $sid The Twilio-provided string that uniquely identifies the IncomingPhoneNumber resource to fetch.
+ */
+ protected function contextIncomingPhoneNumbers(string $sid): \Twilio\Rest\Api\V2010\Account\IncomingPhoneNumberContext {
+ return $this->api->v2010->account->incomingPhoneNumbers($sid);
+ }
+ protected function getKeys(): \Twilio\Rest\Api\V2010\Account\KeyList {
+ return $this->api->v2010->account->keys;
+ }
+ /**
+ * @param string $sid The Twilio-provided string that uniquely identifies the Key resource to fetch.
+ */
+ protected function contextKeys(string $sid): \Twilio\Rest\Api\V2010\Account\KeyContext {
+ return $this->api->v2010->account->keys($sid);
+ }
+ protected function getMessages(): \Twilio\Rest\Api\V2010\Account\MessageList {
+ return $this->api->v2010->account->messages;
+ }
+ /**
+ * @param string $sid The SID of the Message resource to be fetched
+ */
+ protected function contextMessages(string $sid): \Twilio\Rest\Api\V2010\Account\MessageContext {
+ return $this->api->v2010->account->messages($sid);
+ }
+ protected function getNewKeys(): \Twilio\Rest\Api\V2010\Account\NewKeyList {
+ return $this->api->v2010->account->newKeys;
+ }
+ protected function getNewSigningKeys(): \Twilio\Rest\Api\V2010\Account\NewSigningKeyList {
+ return $this->api->v2010->account->newSigningKeys;
+ }
+ protected function getNotifications(): \Twilio\Rest\Api\V2010\Account\NotificationList {
+ return $this->api->v2010->account->notifications;
+ }
+ /**
+ * @param string $sid The Twilio-provided string that uniquely identifies the Notification resource to fetch.
+ */
+ protected function contextNotifications(string $sid): \Twilio\Rest\Api\V2010\Account\NotificationContext {
+ return $this->api->v2010->account->notifications($sid);
+ }
+ protected function getOutgoingCallerIds(): \Twilio\Rest\Api\V2010\Account\OutgoingCallerIdList {
+ return $this->api->v2010->account->outgoingCallerIds;
+ }
+ /**
+ * @param string $sid The Twilio-provided string that uniquely identifies the OutgoingCallerId resource to fetch.
+ */
+ protected function contextOutgoingCallerIds(string $sid): \Twilio\Rest\Api\V2010\Account\OutgoingCallerIdContext {
+ return $this->api->v2010->account->outgoingCallerIds($sid);
+ }
+ protected function getQueues(): \Twilio\Rest\Api\V2010\Account\QueueList {
+ return $this->api->v2010->account->queues;
+ }
+ /**
+ * @param string $sid The Twilio-provided string that uniquely identifies the Queue resource to fetch
+ */
+ protected function contextQueues(string $sid): \Twilio\Rest\Api\V2010\Account\QueueContext {
+ return $this->api->v2010->account->queues($sid);
+ }
+ protected function getRecordings(): \Twilio\Rest\Api\V2010\Account\RecordingList {
+ return $this->api->v2010->account->recordings;
+ }
+ /**
+ * @param string $sid The Twilio-provided string that uniquely identifies the Recording resource to fetch.
+ */
+ protected function contextRecordings(string $sid): \Twilio\Rest\Api\V2010\Account\RecordingContext {
+ return $this->api->v2010->account->recordings($sid);
+ }
+ protected function getShortCodes(): \Twilio\Rest\Api\V2010\Account\ShortCodeList {
+ return $this->api->v2010->account->shortCodes;
+ }
+ /**
+ * @param string $sid The Twilio-provided string that uniquely identifies the ShortCode resource to fetch
+ */
+ protected function contextShortCodes(string $sid): \Twilio\Rest\Api\V2010\Account\ShortCodeContext {
+ return $this->api->v2010->account->shortCodes($sid);
+ }
+ protected function getSigningKeys(): \Twilio\Rest\Api\V2010\Account\SigningKeyList {
+ return $this->api->v2010->account->signingKeys;
+ }
+ /**
+ * @param string $sid The sid
+ */
+ protected function contextSigningKeys(string $sid): \Twilio\Rest\Api\V2010\Account\SigningKeyContext {
+ return $this->api->v2010->account->signingKeys($sid);
+ }
+ protected function getSip(): \Twilio\Rest\Api\V2010\Account\SipList {
+ return $this->api->v2010->account->sip;
+ }
+ protected function getTokens(): \Twilio\Rest\Api\V2010\Account\TokenList {
+ return $this->api->v2010->account->tokens;
+ }
+ protected function getTranscriptions(): \Twilio\Rest\Api\V2010\Account\TranscriptionList {
+ return $this->api->v2010->account->transcriptions;
+ }
+ /**
+ * @param string $sid The Twilio-provided string that uniquely identifies the Transcription resource to fetch.
+ */
+ protected function contextTranscriptions(string $sid): \Twilio\Rest\Api\V2010\Account\TranscriptionContext {
+ return $this->api->v2010->account->transcriptions($sid);
+ }
+ protected function getUsage(): \Twilio\Rest\Api\V2010\Account\UsageList {
+ return $this->api->v2010->account->usage;
+ }
+ protected function getValidationRequests(): \Twilio\Rest\Api\V2010\Account\ValidationRequestList {
+ return $this->api->v2010->account->validationRequests;
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Conversations.php b/vendor/twilio/sdk/src/Twilio/Rest/Conversations.php
index 753092f..09fa76c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Conversations.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Conversations.php
@@ -1,130 +1,137 @@
configuration instead.
*/
- public function __construct(Client $client)
- {
- parent::__construct($client);
-
- $this->baseUrl = 'https://conversations.twilio.com';
+ protected function getConfiguration(): \Twilio\Rest\Conversations\V1\ConfigurationList {
+ echo "configuration is deprecated. Use v1->configuration instead.";
+ return $this->v1->configuration;
}
/**
- * @return \Twilio\Rest\Conversations\V1 Version v1 of conversations
+ * @deprecated Use v1->configuration() instead.
*/
- protected function getV1()
- {
- if (!$this->_v1) {
- $this->_v1 = new V1($this);
- }
- return $this->_v1;
+ protected function contextConfiguration(): \Twilio\Rest\Conversations\V1\ConfigurationContext {
+ echo "configuration() is deprecated. Use v1->configuration() instead.";
+ return $this->v1->configuration();
}
/**
- * Magic getter to lazy load version
- *
- * @param string $name Version to return
- * @return \Twilio\Version The requested version
- * @throws TwilioException For unknown versions
+ * @deprecated Use v1->addressConfigurations instead.
*/
- public function __get($name)
- {
- $method = 'get' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return $this->$method();
- }
-
- throw new TwilioException('Unknown version ' . $name);
+ protected function getAddressConfigurations(): \Twilio\Rest\Conversations\V1\AddressConfigurationList {
+ echo "addressConfigurations is deprecated. Use v1->addressConfigurations instead.";
+ return $this->v1->addressConfigurations;
}
/**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
+ * @deprecated Use v1->addressConfigurations(\$sid) instead.
+ * @param string $sid The SID or Address of the Configuration.
*/
- public function __call($name, $arguments)
- {
- $method = 'context' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return \call_user_func_array(array($this, $method), $arguments);
- }
-
- throw new TwilioException('Unknown context ' . $name);
+ protected function contextAddressConfigurations(string $sid): \Twilio\Rest\Conversations\V1\AddressConfigurationContext {
+ echo "addressConfigurations(\$sid) is deprecated. Use v1->addressConfigurations(\$sid) instead.";
+ return $this->v1->addressConfigurations($sid);
}
/**
- * @return \Twilio\Rest\Conversations\V1\ConversationList
+ * @deprecated Use v1->conversations instead.
*/
- protected function getConversations()
- {
+ protected function getConversations(): \Twilio\Rest\Conversations\V1\ConversationList {
+ echo "conversations is deprecated. Use v1->conversations instead.";
return $this->v1->conversations;
}
/**
+ * @deprecated Use v1->conversations(\$sid) instead.
* @param string $sid A 34 character string that uniquely identifies this
* resource.
- * @return \Twilio\Rest\Conversations\V1\ConversationContext
*/
- protected function contextConversations($sid)
- {
+ protected function contextConversations(string $sid): \Twilio\Rest\Conversations\V1\ConversationContext {
+ echo "conversations(\$sid) is deprecated. Use v1->conversations(\$sid) instead.";
return $this->v1->conversations($sid);
}
/**
- * @return \Twilio\Rest\Conversations\V1\WebhookList
+ * @deprecated Use v1->credentials instead.
+ */
+ protected function getCredentials(): \Twilio\Rest\Conversations\V1\CredentialList {
+ echo "credentials is deprecated. Use v1->credentials instead.";
+ return $this->v1->credentials;
+ }
+
+ /**
+ * @deprecated Use v1->credentials(\$sid) instead.
+ * @param string $sid A 34 character string that uniquely identifies this
+ * resource.
+ */
+ protected function contextCredentials(string $sid): \Twilio\Rest\Conversations\V1\CredentialContext {
+ echo "credentials(\$sid) is deprecated. Use v1->credentials(\$sid) instead.";
+ return $this->v1->credentials($sid);
+ }
+
+ /**
+ * @deprecated Use v1->participantConversations instead.
+ */
+ protected function getParticipantConversations(): \Twilio\Rest\Conversations\V1\ParticipantConversationList {
+ echo "participantConversations is deprecated. Use v1->participantConversations instead.";
+ return $this->v1->participantConversations;
+ }
+
+ /**
+ * @deprecated Use v1->roles instead.
+ */
+ protected function getRoles(): \Twilio\Rest\Conversations\V1\RoleList {
+ echo "roles is deprecated. Use v1->roles instead.";
+ return $this->v1->roles;
+ }
+
+ /**
+ * @deprecated Use v1->roles(\$sid) instead.
+ * @param string $sid The SID of the Role resource to fetch
+ */
+ protected function contextRoles(string $sid): \Twilio\Rest\Conversations\V1\RoleContext {
+ echo "roles(\$sid) is deprecated. Use v1->roles(\$sid) instead.";
+ return $this->v1->roles($sid);
+ }
+
+ /**
+ * @deprecated Use v1->services instead.
+ */
+ protected function getServices(): \Twilio\Rest\Conversations\V1\ServiceList {
+ echo "services is deprecated. Use v1->services instead.";
+ return $this->v1->services;
+ }
+
+ /**
+ * @deprecated Use v1->services(\$sid) instead.
+ * @param string $sid A 34 character string that uniquely identifies this
+ * resource.
*/
- protected function getWebhooks()
- {
- return $this->v1->webhooks;
+ protected function contextServices(string $sid): \Twilio\Rest\Conversations\V1\ServiceContext {
+ echo "services(\$sid) is deprecated. Use v1->services(\$sid) instead.";
+ return $this->v1->services($sid);
}
/**
- * @return \Twilio\Rest\Conversations\V1\WebhookContext
+ * @deprecated Use v1->users instead.
*/
- protected function contextWebhooks()
- {
- return $this->v1->webhooks();
+ protected function getUsers(): \Twilio\Rest\Conversations\V1\UserList {
+ echo "users is deprecated. Use v1->users instead.";
+ return $this->v1->users;
}
/**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
+ * @deprecated Use v1->users(\$sid) instead.
+ * @param string $sid The SID of the User resource to fetch
*/
- public function __toString()
- {
- return '[Twilio.Conversations]';
+ protected function contextUsers(string $sid): \Twilio\Rest\Conversations\V1\UserContext {
+ echo "users(\$sid) is deprecated. Use v1->users(\$sid) instead.";
+ return $this->v1->users($sid);
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1.php b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1.php
index b9eff4e..2b63cbf 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1.php
@@ -1,35 +1,67 @@
version = 'v1';
}
- /**
- * @return \Twilio\Rest\Conversations\V1\ConversationList
- */
- protected function getConversations()
+ protected function getAddressConfigurations(): AddressConfigurationList
+ {
+ if (!$this->_addressConfigurations) {
+ $this->_addressConfigurations = new AddressConfigurationList($this);
+ }
+ return $this->_addressConfigurations;
+ }
+
+ protected function getConfiguration(): ConfigurationList
+ {
+ if (!$this->_configuration) {
+ $this->_configuration = new ConfigurationList($this);
+ }
+ return $this->_configuration;
+ }
+
+ protected function getConversations(): ConversationList
{
if (!$this->_conversations) {
$this->_conversations = new ConversationList($this);
@@ -48,15 +93,52 @@ protected function getConversations()
return $this->_conversations;
}
- /**
- * @return \Twilio\Rest\Conversations\V1\WebhookList
- */
- protected function getWebhooks()
+ protected function getConversationWithParticipants(): ConversationWithParticipantsList
+ {
+ if (!$this->_conversationWithParticipants) {
+ $this->_conversationWithParticipants = new ConversationWithParticipantsList($this);
+ }
+ return $this->_conversationWithParticipants;
+ }
+
+ protected function getCredentials(): CredentialList
+ {
+ if (!$this->_credentials) {
+ $this->_credentials = new CredentialList($this);
+ }
+ return $this->_credentials;
+ }
+
+ protected function getParticipantConversations(): ParticipantConversationList
+ {
+ if (!$this->_participantConversations) {
+ $this->_participantConversations = new ParticipantConversationList($this);
+ }
+ return $this->_participantConversations;
+ }
+
+ protected function getRoles(): RoleList
+ {
+ if (!$this->_roles) {
+ $this->_roles = new RoleList($this);
+ }
+ return $this->_roles;
+ }
+
+ protected function getServices(): ServiceList
+ {
+ if (!$this->_services) {
+ $this->_services = new ServiceList($this);
+ }
+ return $this->_services;
+ }
+
+ protected function getUsers(): UserList
{
- if (!$this->_webhooks) {
- $this->_webhooks = new WebhookList($this);
+ if (!$this->_users) {
+ $this->_users = new UserList($this);
}
- return $this->_webhooks;
+ return $this->_users;
}
/**
@@ -66,7 +148,7 @@ protected function getWebhooks()
* @return \Twilio\ListResource The requested resource
* @throws TwilioException For unknown resource
*/
- public function __get($name)
+ public function __get(string $name)
{
$method = 'get' . \ucfirst($name);
if (\method_exists($this, $method)) {
@@ -81,10 +163,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -99,8 +181,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Conversations.V1]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/MessageContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/MessageContext.php
index 697a992..f5e3246 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/MessageContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/MessageContext.php
@@ -2,70 +2,94 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Conversations
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Conversations\V1\Conversation;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+use Twilio\Rest\Conversations\V1\Conversation\Message\DeliveryReceiptList;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
+ * @property DeliveryReceiptList $deliveryReceipts
+ * @method \Twilio\Rest\Conversations\V1\Conversation\Message\DeliveryReceiptContext deliveryReceipts(string $sid)
*/
class MessageContext extends InstanceContext
-{
+ {
+ protected $_deliveryReceipts;
+
/**
* Initialize the MessageContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $conversationSid The unique id of the Conversation for this
- * message.
- * @param string $sid A 34 character string that uniquely identifies this
- * resource.
- * @return \Twilio\Rest\Conversations\V1\Conversation\MessageContext
+ * @param Version $version Version that contains the resource
+ * @param string $conversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message.
+ * @param string $sid A 34 character string that uniquely identifies this resource.
*/
- public function __construct(Version $version, $conversationSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $conversationSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('conversationSid' => $conversationSid, 'sid' => $sid,);
+ $this->solution = [
+ 'conversationSid' =>
+ $conversationSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Conversations/' . \rawurlencode($conversationSid) . '/Messages/' . \rawurlencode($sid) . '';
+ $this->uri = '/Conversations/' . \rawurlencode($conversationSid)
+ .'/Messages/' . \rawurlencode($sid)
+ .'';
}
/**
- * Update the MessageInstance
+ * Delete the MessageInstance
*
* @param array|Options $options Optional Arguments
- * @return MessageInstance Updated MessageInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function delete(array $options = []): bool
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'Author' => $options['author'],
- 'Body' => $options['body'],
- 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']),
- 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']),
- 'Attributes' => $options['attributes'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled']]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
+ }
+
+
+ /**
+ * Fetch the MessageInstance
+ *
+ * @return MessageInstance Fetched MessageInstance
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function fetch(): MessageInstance
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new MessageInstance(
$this->version,
@@ -75,32 +99,36 @@ public function update($options = array())
);
}
- /**
- * Deletes the MessageInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
- * Fetch a MessageInstance
+ * Update the MessageInstance
*
- * @return MessageInstance Fetched MessageInstance
+ * @param array|Options $options Optional Arguments
+ * @return MessageInstance Updated MessageInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function update(array $options = []): MessageInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $options = new Values($options);
+
+ $data = Values::of([
+ 'Author' =>
+ $options['author'],
+ 'Body' =>
+ $options['body'],
+ 'DateCreated' =>
+ Serialize::iso8601DateTime($options['dateCreated']),
+ 'DateUpdated' =>
+ Serialize::iso8601DateTime($options['dateUpdated']),
+ 'Attributes' =>
+ $options['attributes'],
+ 'Subject' =>
+ $options['subject'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled']]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new MessageInstance(
$this->version,
@@ -110,17 +138,69 @@ public function fetch()
);
}
+
+ /**
+ * Access the deliveryReceipts
+ */
+ protected function getDeliveryReceipts(): DeliveryReceiptList
+ {
+ if (!$this->_deliveryReceipts) {
+ $this->_deliveryReceipts = new DeliveryReceiptList(
+ $this->version,
+ $this->solution['conversationSid'],
+ $this->solution['sid']
+ );
+ }
+
+ return $this->_deliveryReceipts;
+ }
+
+ /**
+ * Magic getter to lazy load subresources
+ *
+ * @param string $name Subresource to return
+ * @return ListResource The requested subresource
+ * @throws TwilioException For unknown subresources
+ */
+ public function __get(string $name): ListResource
+ {
+ if (\property_exists($this, '_' . $name)) {
+ $method = 'get' . \ucfirst($name);
+ return $this->$method();
+ }
+
+ throw new TwilioException('Unknown subresource ' . $name);
+ }
+
+ /**
+ * Magic caller to get resource contexts
+ *
+ * @param string $name Resource to return
+ * @param array $arguments Context parameters
+ * @return InstanceContext The requested resource context
+ * @throws TwilioException For unknown resource
+ */
+ public function __call(string $name, array $arguments): InstanceContext
+ {
+ $property = $this->$name;
+ if (\method_exists($property, 'getContext')) {
+ return \call_user_func_array(array($property, 'getContext'), $arguments);
+ }
+
+ throw new TwilioException('Resource does not have a context');
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Conversations.V1.MessageContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/MessageInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/MessageInstance.php
index 956fa86..5d17547 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/MessageInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/MessageInstance.php
@@ -2,55 +2,65 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Conversations
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Conversations\V1\Conversation;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Conversations\V1\Conversation\Message\DeliveryReceiptList;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property string $accountSid
- * @property string $conversationSid
- * @property string $sid
+ * @property string|null $accountSid
+ * @property string|null $conversationSid
+ * @property string|null $sid
* @property int $index
- * @property string $author
- * @property string $body
- * @property array $media
- * @property string $attributes
- * @property string $participantSid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
+ * @property string|null $author
+ * @property string|null $body
+ * @property array[]|null $media
+ * @property string|null $attributes
+ * @property string|null $participantSid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
+ * @property array|null $delivery
+ * @property array|null $links
+ * @property string|null $contentSid
*/
class MessageInstance extends InstanceResource
{
+ protected $_deliveryReceipts;
+
/**
* Initialize the MessageInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $conversationSid The unique id of the Conversation for this
- * message.
- * @param string $sid A 34 character string that uniquely identifies this
- * resource.
- * @return \Twilio\Rest\Conversations\V1\Conversation\MessageInstance
+ * @param string $conversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message.
+ * @param string $sid A 34 character string that uniquely identifies this resource.
*/
- public function __construct(Version $version, array $payload, $conversationSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $conversationSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'conversationSid' => Values::array_get($payload, 'conversation_sid'),
'sid' => Values::array_get($payload, 'sid'),
@@ -63,23 +73,21 @@ public function __construct(Version $version, array $payload, $conversationSid,
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
- );
+ 'delivery' => Values::array_get($payload, 'delivery'),
+ 'links' => Values::array_get($payload, 'links'),
+ 'contentSid' => Values::array_get($payload, 'content_sid'),
+ ];
- $this->solution = array(
- 'conversationSid' => $conversationSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['conversationSid' => $conversationSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Conversations\V1\Conversation\MessageContext Context
- * for this
- * MessageInstance
+ * @return MessageContext Context for this MessageInstance
*/
- protected function proxy()
+ protected function proxy(): MessageContext
{
if (!$this->context) {
$this->context = new MessageContext(
@@ -93,37 +101,49 @@ protected function proxy()
}
/**
- * Update the MessageInstance
+ * Delete the MessageInstance
*
* @param array|Options $options Optional Arguments
- * @return MessageInstance Updated MessageInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function delete(array $options = []): bool
{
- return $this->proxy()->update($options);
+
+ return $this->proxy()->delete($options);
}
/**
- * Deletes the MessageInstance
+ * Fetch the MessageInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return MessageInstance Fetched MessageInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): MessageInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
- * Fetch a MessageInstance
+ * Update the MessageInstance
*
- * @return MessageInstance Fetched MessageInstance
+ * @param array|Options $options Optional Arguments
+ * @return MessageInstance Updated MessageInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function update(array $options = []): MessageInstance
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->update($options);
+ }
+
+ /**
+ * Access the deliveryReceipts
+ */
+ protected function getDeliveryReceipts(): DeliveryReceiptList
+ {
+ return $this->proxy()->deliveryReceipts;
}
/**
@@ -133,7 +153,7 @@ public function fetch()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -152,12 +172,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Conversations.V1.MessageInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/MessageList.php b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/MessageList.php
index db5f3a4..26b15d7 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/MessageList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/MessageList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Conversations
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Conversations\V1\Conversation;
@@ -12,61 +19,100 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
class MessageList extends ListResource
-{
+ {
/**
* Construct the MessageList
*
* @param Version $version Version that contains the resource
- * @param string $conversationSid The unique id of the Conversation for this
- * message.
- * @return \Twilio\Rest\Conversations\V1\Conversation\MessageList
+ * @param string $conversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this message.
*/
- public function __construct(Version $version, $conversationSid)
- {
+ public function __construct(
+ Version $version,
+ string $conversationSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('conversationSid' => $conversationSid,);
-
- $this->uri = '/Conversations/' . \rawurlencode($conversationSid) . '/Messages';
+ $this->solution = [
+ 'conversationSid' =>
+ $conversationSid,
+
+ ];
+
+ $this->uri = '/Conversations/' . \rawurlencode($conversationSid)
+ .'/Messages';
}
/**
- * Create a new MessageInstance
+ * Create the MessageInstance
*
* @param array|Options $options Optional Arguments
- * @return MessageInstance Newly created MessageInstance
+ * @return MessageInstance Created MessageInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($options = array())
+ public function create(array $options = []): MessageInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'Author' => $options['author'],
- 'Body' => $options['body'],
- 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']),
- 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']),
- 'Attributes' => $options['attributes'],
- 'MediaSid' => $options['mediaSid'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'Author' =>
+ $options['author'],
+ 'Body' =>
+ $options['body'],
+ 'DateCreated' =>
+ Serialize::iso8601DateTime($options['dateCreated']),
+ 'DateUpdated' =>
+ Serialize::iso8601DateTime($options['dateUpdated']),
+ 'Attributes' =>
+ $options['attributes'],
+ 'MediaSid' =>
+ $options['mediaSid'],
+ 'ContentSid' =>
+ $options['contentSid'],
+ 'ContentVariables' =>
+ $options['contentVariables'],
+ 'Subject' =>
+ $options['subject'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled']]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new MessageInstance(
+ $this->version,
+ $payload,
+ $this->solution['conversationSid']
);
+ }
+
- return new MessageInstance($this->version, $payload, $this->solution['conversationSid']);
+ /**
+ * Reads MessageInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return MessageInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -77,6 +123,7 @@ public function create($options = array())
* The results are returned as a generator, so this operation is memory
* efficient.
*
+ * @param array|Options $options Optional Arguments
* @param int $limit Upper limit for the number of records to return. stream()
* guarantees to never return more than limit. Default is no
* limit
@@ -85,37 +132,17 @@ public function create($options = array())
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($limits['pageSize']);
+ $page = $this->page($options, $limits['pageSize']);
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads MessageInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return MessageInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of MessageInstance records from the API.
* Request is executed immediately
@@ -123,21 +150,26 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of MessageInstance
+ * @return MessagePage Page of MessageInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): MessagePage
{
- $params = Values::of(array(
+ $options = new Values($options);
+
+ $params = Values::of([
+ 'Order' =>
+ $options['order'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new MessagePage($this->version, $response, $this->solution);
}
@@ -147,9 +179,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of MessageInstance
+ * @return MessagePage Page of MessageInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): MessagePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -159,16 +191,22 @@ public function getPage($targetUrl)
return new MessagePage($this->version, $response, $this->solution);
}
+
/**
* Constructs a MessageContext
*
- * @param string $sid A 34 character string that uniquely identifies this
- * resource.
- * @return \Twilio\Rest\Conversations\V1\Conversation\MessageContext
+ * @param string $sid A 34 character string that uniquely identifies this resource.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): MessageContext
{
- return new MessageContext($this->version, $this->solution['conversationSid'], $sid);
+ return new MessageContext(
+ $this->version,
+ $this->solution['conversationSid'],
+ $sid
+ );
}
/**
@@ -176,8 +214,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Conversations.V1.MessageList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/MessageOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/MessageOptions.php
index 428ab0f..ca7b06a 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/MessageOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/MessageOptions.php
@@ -1,10 +1,16 @@
options['author'] = $author;
$this->options['body'] = $body;
$this->options['dateCreated'] = $dateCreated;
$this->options['dateUpdated'] = $dateUpdated;
$this->options['attributes'] = $attributes;
$this->options['mediaSid'] = $mediaSid;
+ $this->options['contentSid'] = $contentSid;
+ $this->options['contentVariables'] = $contentVariables;
+ $this->options['subject'] = $subject;
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
}
/**
* The channel specific identifier of the message's author. Defaults to `system`.
*
- * @param string $author The channel specific identifier of the message's
- * author.
+ * @param string $author The channel specific identifier of the message's author. Defaults to `system`.
* @return $this Fluent Builder
*/
- public function setAuthor($author)
+ public function setAuthor(string $author): self
{
$this->options['author'] = $author;
return $this;
@@ -87,10 +183,10 @@ public function setAuthor($author)
/**
* The content of the message, can be up to 1,600 characters long.
*
- * @param string $body The content of the message.
+ * @param string $body The content of the message, can be up to 1,600 characters long.
* @return $this Fluent Builder
*/
- public function setBody($body)
+ public function setBody(string $body): self
{
$this->options['body'] = $body;
return $this;
@@ -102,7 +198,7 @@ public function setBody($body)
* @param \DateTime $dateCreated The date that this resource was created.
* @return $this Fluent Builder
*/
- public function setDateCreated($dateCreated)
+ public function setDateCreated(\DateTime $dateCreated): self
{
$this->options['dateCreated'] = $dateCreated;
return $this;
@@ -111,85 +207,212 @@ public function setDateCreated($dateCreated)
/**
* The date that this resource was last updated. `null` if the message has not been edited.
*
- * @param \DateTime $dateUpdated The date that this resource was last updated.
+ * @param \DateTime $dateUpdated The date that this resource was last updated. `null` if the message has not been edited.
* @return $this Fluent Builder
*/
- public function setDateUpdated($dateUpdated)
+ public function setDateUpdated(\DateTime $dateUpdated): self
{
$this->options['dateUpdated'] = $dateUpdated;
return $this;
}
/**
- * A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set "{}" will be returned.
+ * A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned.
*
- * @param string $attributes A string metadata field you can use to store any
- * data you wish.
+ * @param string $attributes A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned.
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setAttributes(string $attributes): self
{
$this->options['attributes'] = $attributes;
return $this;
}
/**
- * The Media Sid to be attached to the new Message.
+ * The Media SID to be attached to the new Message.
*
- * @param string $mediaSid The Media Sid to be attached to the new Message.
+ * @param string $mediaSid The Media SID to be attached to the new Message.
* @return $this Fluent Builder
*/
- public function setMediaSid($mediaSid)
+ public function setMediaSid(string $mediaSid): self
{
$this->options['mediaSid'] = $mediaSid;
return $this;
}
+ /**
+ * The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored.
+ *
+ * @param string $contentSid The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored.
+ * @return $this Fluent Builder
+ */
+ public function setContentSid(string $contentSid): self
+ {
+ $this->options['contentSid'] = $contentSid;
+ return $this;
+ }
+
+ /**
+ * A structurally valid JSON string that contains values to resolve Rich Content template variables.
+ *
+ * @param string $contentVariables A structurally valid JSON string that contains values to resolve Rich Content template variables.
+ * @return $this Fluent Builder
+ */
+ public function setContentVariables(string $contentVariables): self
+ {
+ $this->options['contentVariables'] = $contentVariables;
+ return $this;
+ }
+
+ /**
+ * The subject of the message, can be up to 256 characters long.
+ *
+ * @param string $subject The subject of the message, can be up to 256 characters long.
+ * @return $this Fluent Builder
+ */
+ public function setSubject(string $subject): self
+ {
+ $this->options['subject'] = $subject;
+ return $this;
+ }
+
+ /**
+ * The X-Twilio-Webhook-Enabled HTTP request header
+ *
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
+ * @return $this Fluent Builder
+ */
+ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self
+ {
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ return $this;
+ }
+
+ /**
+ * Provide a friendly representation
+ *
+ * @return string Machine friendly representation
+ */
+ public function __toString(): string
+ {
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Conversations.V1.CreateMessageOptions ' . $options . ']';
+ }
+}
+
+class DeleteMessageOptions extends Options
+ {
+ /**
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
+ */
+ public function __construct(
+
+ string $xTwilioWebhookEnabled = Values::NONE
+
+ ) {
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ }
+
+ /**
+ * The X-Twilio-Webhook-Enabled HTTP request header
+ *
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
+ * @return $this Fluent Builder
+ */
+ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self
+ {
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ return $this;
+ }
+
+ /**
+ * Provide a friendly representation
+ *
+ * @return string Machine friendly representation
+ */
+ public function __toString(): string
+ {
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Conversations.V1.DeleteMessageOptions ' . $options . ']';
+ }
+}
+
+
+class ReadMessageOptions extends Options
+ {
+ /**
+ * @param string $order The sort order of the returned messages. Can be: `asc` (ascending) or `desc` (descending), with `asc` as the default.
+ */
+ public function __construct(
+
+ string $order = Values::NONE
+
+ ) {
+ $this->options['order'] = $order;
+ }
+
+ /**
+ * The sort order of the returned messages. Can be: `asc` (ascending) or `desc` (descending), with `asc` as the default.
+ *
+ * @param string $order The sort order of the returned messages. Can be: `asc` (ascending) or `desc` (descending), with `asc` as the default.
+ * @return $this Fluent Builder
+ */
+ public function setOrder(string $order): self
+ {
+ $this->options['order'] = $order;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Conversations.V1.CreateMessageOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Conversations.V1.ReadMessageOptions ' . $options . ']';
}
}
class UpdateMessageOptions extends Options
-{
+ {
/**
- * @param string $author The channel specific identifier of the message's
- * author.
- * @param string $body The content of the message.
+ * @param string $author The channel specific identifier of the message's author. Defaults to `system`.
+ * @param string $body The content of the message, can be up to 1,600 characters long.
* @param \DateTime $dateCreated The date that this resource was created.
- * @param \DateTime $dateUpdated The date that this resource was last updated.
- * @param string $attributes A string metadata field you can use to store any
- * data you wish.
+ * @param \DateTime $dateUpdated The date that this resource was last updated. `null` if the message has not been edited.
+ * @param string $attributes A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned.
+ * @param string $subject The subject of the message, can be up to 256 characters long.
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
*/
- public function __construct($author = Values::NONE, $body = Values::NONE, $dateCreated = Values::NONE, $dateUpdated = Values::NONE, $attributes = Values::NONE)
- {
+ public function __construct(
+
+ string $author = Values::NONE,
+ string $body = Values::NONE,
+ \DateTime $dateCreated = null,
+ \DateTime $dateUpdated = null,
+ string $attributes = Values::NONE,
+ string $subject = Values::NONE,
+ string $xTwilioWebhookEnabled = Values::NONE
+
+ ) {
$this->options['author'] = $author;
$this->options['body'] = $body;
$this->options['dateCreated'] = $dateCreated;
$this->options['dateUpdated'] = $dateUpdated;
$this->options['attributes'] = $attributes;
+ $this->options['subject'] = $subject;
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
}
/**
* The channel specific identifier of the message's author. Defaults to `system`.
*
- * @param string $author The channel specific identifier of the message's
- * author.
+ * @param string $author The channel specific identifier of the message's author. Defaults to `system`.
* @return $this Fluent Builder
*/
- public function setAuthor($author)
+ public function setAuthor(string $author): self
{
$this->options['author'] = $author;
return $this;
@@ -198,10 +421,10 @@ public function setAuthor($author)
/**
* The content of the message, can be up to 1,600 characters long.
*
- * @param string $body The content of the message.
+ * @param string $body The content of the message, can be up to 1,600 characters long.
* @return $this Fluent Builder
*/
- public function setBody($body)
+ public function setBody(string $body): self
{
$this->options['body'] = $body;
return $this;
@@ -213,7 +436,7 @@ public function setBody($body)
* @param \DateTime $dateCreated The date that this resource was created.
* @return $this Fluent Builder
*/
- public function setDateCreated($dateCreated)
+ public function setDateCreated(\DateTime $dateCreated): self
{
$this->options['dateCreated'] = $dateCreated;
return $this;
@@ -222,41 +445,60 @@ public function setDateCreated($dateCreated)
/**
* The date that this resource was last updated. `null` if the message has not been edited.
*
- * @param \DateTime $dateUpdated The date that this resource was last updated.
+ * @param \DateTime $dateUpdated The date that this resource was last updated. `null` if the message has not been edited.
* @return $this Fluent Builder
*/
- public function setDateUpdated($dateUpdated)
+ public function setDateUpdated(\DateTime $dateUpdated): self
{
$this->options['dateUpdated'] = $dateUpdated;
return $this;
}
/**
- * A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set "{}" will be returned.
+ * A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned.
*
- * @param string $attributes A string metadata field you can use to store any
- * data you wish.
+ * @param string $attributes A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned.
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setAttributes(string $attributes): self
{
$this->options['attributes'] = $attributes;
return $this;
}
+ /**
+ * The subject of the message, can be up to 256 characters long.
+ *
+ * @param string $subject The subject of the message, can be up to 256 characters long.
+ * @return $this Fluent Builder
+ */
+ public function setSubject(string $subject): self
+ {
+ $this->options['subject'] = $subject;
+ return $this;
+ }
+
+ /**
+ * The X-Twilio-Webhook-Enabled HTTP request header
+ *
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
+ * @return $this Fluent Builder
+ */
+ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self
+ {
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Conversations.V1.UpdateMessageOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Conversations.V1.UpdateMessageOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/MessagePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/MessagePage.php
index 0bb915f..5e22241 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/MessagePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/MessagePage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return MessageInstance \Twilio\Rest\Conversations\V1\Conversation\MessageInstance
+ */
+ public function buildInstance(array $payload): MessageInstance
{
return new MessageInstance($this->version, $payload, $this->solution['conversationSid']);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Conversations.V1.MessagePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/ParticipantContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/ParticipantContext.php
index 2088f0c..d94b4f4 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/ParticipantContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/ParticipantContext.php
@@ -2,68 +2,86 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Conversations
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Conversations\V1\Conversation;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
class ParticipantContext extends InstanceContext
-{
+ {
/**
* Initialize the ParticipantContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $conversationSid The unique id of the Conversation for this
- * participant.
- * @param string $sid A 34 character string that uniquely identifies this
- * resource.
- * @return \Twilio\Rest\Conversations\V1\Conversation\ParticipantContext
+ * @param Version $version Version that contains the resource
+ * @param string $conversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this participant.
+ * @param string $sid A 34 character string that uniquely identifies this resource.
*/
- public function __construct(Version $version, $conversationSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $conversationSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('conversationSid' => $conversationSid, 'sid' => $sid,);
+ $this->solution = [
+ 'conversationSid' =>
+ $conversationSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Conversations/' . \rawurlencode($conversationSid) . '/Participants/' . \rawurlencode($sid) . '';
+ $this->uri = '/Conversations/' . \rawurlencode($conversationSid)
+ .'/Participants/' . \rawurlencode($sid)
+ .'';
}
/**
- * Update the ParticipantInstance
+ * Delete the ParticipantInstance
*
* @param array|Options $options Optional Arguments
- * @return ParticipantInstance Updated ParticipantInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function delete(array $options = []): bool
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']),
- 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']),
- 'Attributes' => $options['attributes'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled']]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
+ }
+
+
+ /**
+ * Fetch the ParticipantInstance
+ *
+ * @return ParticipantInstance Fetched ParticipantInstance
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function fetch(): ParticipantInstance
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new ParticipantInstance(
$this->version,
@@ -73,32 +91,42 @@ public function update($options = array())
);
}
- /**
- * Deletes the ParticipantInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
- * Fetch a ParticipantInstance
+ * Update the ParticipantInstance
*
- * @return ParticipantInstance Fetched ParticipantInstance
+ * @param array|Options $options Optional Arguments
+ * @return ParticipantInstance Updated ParticipantInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function update(array $options = []): ParticipantInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $options = new Values($options);
+
+ $data = Values::of([
+ 'DateCreated' =>
+ Serialize::iso8601DateTime($options['dateCreated']),
+ 'DateUpdated' =>
+ Serialize::iso8601DateTime($options['dateUpdated']),
+ 'Attributes' =>
+ $options['attributes'],
+ 'RoleSid' =>
+ $options['roleSid'],
+ 'MessagingBinding.ProxyAddress' =>
+ $options['messagingBindingProxyAddress'],
+ 'MessagingBinding.ProjectedAddress' =>
+ $options['messagingBindingProjectedAddress'],
+ 'Identity' =>
+ $options['identity'],
+ 'LastReadMessageIndex' =>
+ $options['lastReadMessageIndex'],
+ 'LastReadTimestamp' =>
+ $options['lastReadTimestamp'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled']]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new ParticipantInstance(
$this->version,
@@ -108,17 +136,18 @@ public function fetch()
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Conversations.V1.ParticipantContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/ParticipantInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/ParticipantInstance.php
index f7a3727..b50d917 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/ParticipantInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/ParticipantInstance.php
@@ -2,76 +2,83 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Conversations
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Conversations\V1\Conversation;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property string $accountSid
- * @property string $conversationSid
- * @property string $sid
- * @property string $identity
- * @property string $attributes
- * @property array $messagingBinding
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
+ * @property string|null $accountSid
+ * @property string|null $conversationSid
+ * @property string|null $sid
+ * @property string|null $identity
+ * @property string|null $attributes
+ * @property array|null $messagingBinding
+ * @property string|null $roleSid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
+ * @property int|null $lastReadMessageIndex
+ * @property string|null $lastReadTimestamp
*/
class ParticipantInstance extends InstanceResource
{
/**
* Initialize the ParticipantInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $conversationSid The unique id of the Conversation for this
- * participant.
- * @param string $sid A 34 character string that uniquely identifies this
- * resource.
- * @return \Twilio\Rest\Conversations\V1\Conversation\ParticipantInstance
+ * @param string $conversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this participant.
+ * @param string $sid A 34 character string that uniquely identifies this resource.
*/
- public function __construct(Version $version, array $payload, $conversationSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $conversationSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'conversationSid' => Values::array_get($payload, 'conversation_sid'),
'sid' => Values::array_get($payload, 'sid'),
'identity' => Values::array_get($payload, 'identity'),
'attributes' => Values::array_get($payload, 'attributes'),
'messagingBinding' => Values::array_get($payload, 'messaging_binding'),
+ 'roleSid' => Values::array_get($payload, 'role_sid'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
- );
+ 'lastReadMessageIndex' => Values::array_get($payload, 'last_read_message_index'),
+ 'lastReadTimestamp' => Values::array_get($payload, 'last_read_timestamp'),
+ ];
- $this->solution = array(
- 'conversationSid' => $conversationSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['conversationSid' => $conversationSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Conversations\V1\Conversation\ParticipantContext Context for this ParticipantInstance
+ * @return ParticipantContext Context for this ParticipantInstance
*/
- protected function proxy()
+ protected function proxy(): ParticipantContext
{
if (!$this->context) {
$this->context = new ParticipantContext(
@@ -85,37 +92,41 @@ protected function proxy()
}
/**
- * Update the ParticipantInstance
+ * Delete the ParticipantInstance
*
* @param array|Options $options Optional Arguments
- * @return ParticipantInstance Updated ParticipantInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function delete(array $options = []): bool
{
- return $this->proxy()->update($options);
+
+ return $this->proxy()->delete($options);
}
/**
- * Deletes the ParticipantInstance
+ * Fetch the ParticipantInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return ParticipantInstance Fetched ParticipantInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): ParticipantInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
- * Fetch a ParticipantInstance
+ * Update the ParticipantInstance
*
- * @return ParticipantInstance Fetched ParticipantInstance
+ * @param array|Options $options Optional Arguments
+ * @return ParticipantInstance Updated ParticipantInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function update(array $options = []): ParticipantInstance
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->update($options);
}
/**
@@ -125,7 +136,7 @@ public function fetch()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -144,12 +155,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Conversations.V1.ParticipantInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/ParticipantList.php b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/ParticipantList.php
index 20d82d4..160bb85 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/ParticipantList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/ParticipantList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Conversations
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Conversations\V1\Conversation;
@@ -12,62 +19,97 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
class ParticipantList extends ListResource
-{
+ {
/**
* Construct the ParticipantList
*
* @param Version $version Version that contains the resource
- * @param string $conversationSid The unique id of the Conversation for this
- * participant.
- * @return \Twilio\Rest\Conversations\V1\Conversation\ParticipantList
+ * @param string $conversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this participant.
*/
- public function __construct(Version $version, $conversationSid)
- {
+ public function __construct(
+ Version $version,
+ string $conversationSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('conversationSid' => $conversationSid,);
-
- $this->uri = '/Conversations/' . \rawurlencode($conversationSid) . '/Participants';
+ $this->solution = [
+ 'conversationSid' =>
+ $conversationSid,
+
+ ];
+
+ $this->uri = '/Conversations/' . \rawurlencode($conversationSid)
+ .'/Participants';
}
/**
- * Create a new ParticipantInstance
+ * Create the ParticipantInstance
*
* @param array|Options $options Optional Arguments
- * @return ParticipantInstance Newly created ParticipantInstance
+ * @return ParticipantInstance Created ParticipantInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($options = array())
+ public function create(array $options = []): ParticipantInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'Identity' => $options['identity'],
- 'MessagingBinding.Address' => $options['messagingBindingAddress'],
- 'MessagingBinding.ProxyAddress' => $options['messagingBindingProxyAddress'],
- 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']),
- 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']),
- 'Attributes' => $options['attributes'],
- 'MessagingBinding.ProjectedAddress' => $options['messagingBindingProjectedAddress'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'Identity' =>
+ $options['identity'],
+ 'MessagingBinding.Address' =>
+ $options['messagingBindingAddress'],
+ 'MessagingBinding.ProxyAddress' =>
+ $options['messagingBindingProxyAddress'],
+ 'DateCreated' =>
+ Serialize::iso8601DateTime($options['dateCreated']),
+ 'DateUpdated' =>
+ Serialize::iso8601DateTime($options['dateUpdated']),
+ 'Attributes' =>
+ $options['attributes'],
+ 'MessagingBinding.ProjectedAddress' =>
+ $options['messagingBindingProjectedAddress'],
+ 'RoleSid' =>
+ $options['roleSid'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled']]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new ParticipantInstance(
+ $this->version,
+ $payload,
+ $this->solution['conversationSid']
);
+ }
- return new ParticipantInstance($this->version, $payload, $this->solution['conversationSid']);
+
+ /**
+ * Reads ParticipantInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return ParticipantInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -86,9 +128,9 @@ public function create($options = array())
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -97,26 +139,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads ParticipantInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return ParticipantInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of ParticipantInstance records from the API.
* Request is executed immediately
@@ -124,21 +146,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of ParticipantInstance
+ * @return ParticipantPage Page of ParticipantInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): ParticipantPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new ParticipantPage($this->version, $response, $this->solution);
}
@@ -148,9 +171,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of ParticipantInstance
+ * @return ParticipantPage Page of ParticipantInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): ParticipantPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -160,16 +183,22 @@ public function getPage($targetUrl)
return new ParticipantPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a ParticipantContext
*
- * @param string $sid A 34 character string that uniquely identifies this
- * resource.
- * @return \Twilio\Rest\Conversations\V1\Conversation\ParticipantContext
+ * @param string $sid A 34 character string that uniquely identifies this resource.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): ParticipantContext
{
- return new ParticipantContext($this->version, $this->solution['conversationSid'], $sid);
+ return new ParticipantContext(
+ $this->version,
+ $this->solution['conversationSid'],
+ $sid
+ );
}
/**
@@ -177,8 +206,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Conversations.V1.ParticipantList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/ParticipantOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/ParticipantOptions.php
index 0982559..fd2693c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/ParticipantOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/ParticipantOptions.php
@@ -1,10 +1,16 @@
options['identity'] = $identity;
$this->options['messagingBindingAddress'] = $messagingBindingAddress;
$this->options['messagingBindingProxyAddress'] = $messagingBindingProxyAddress;
@@ -79,43 +153,41 @@ public function __construct($identity = Values::NONE, $messagingBindingAddress =
$this->options['dateUpdated'] = $dateUpdated;
$this->options['attributes'] = $attributes;
$this->options['messagingBindingProjectedAddress'] = $messagingBindingProjectedAddress;
+ $this->options['roleSid'] = $roleSid;
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
}
/**
- * A unique string identifier for the conversation participant as [Chat User](https://www.twilio.com/docs/chat/rest/user-resource). This parameter is non-null if (and only if) the participant is using the Programmable Chat SDK to communicate. Limited to 256 characters.
+ * A unique string identifier for the conversation participant as [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource). This parameter is non-null if (and only if) the participant is using the Conversations SDK to communicate. Limited to 256 characters.
*
- * @param string $identity A unique string identifier for the conversation
- * participant as Chat User.
+ * @param string $identity A unique string identifier for the conversation participant as [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource). This parameter is non-null if (and only if) the participant is using the Conversations SDK to communicate. Limited to 256 characters.
* @return $this Fluent Builder
*/
- public function setIdentity($identity)
+ public function setIdentity(string $identity): self
{
$this->options['identity'] = $identity;
return $this;
}
/**
- * The address of the participant's device, e.g. a phone number or Messenger ID. Together with the Proxy address, this determines a participant uniquely. This field (with proxy_address) is only null when the participant is interacting from a Chat endpoint (see the 'identity' field).
+ * The address of the participant's device, e.g. a phone or WhatsApp number. Together with the Proxy address, this determines a participant uniquely. This field (with proxy_address) is only null when the participant is interacting from an SDK endpoint (see the 'identity' field).
*
- * @param string $messagingBindingAddress The address of the participant's
- * device.
+ * @param string $messagingBindingAddress The address of the participant's device, e.g. a phone or WhatsApp number. Together with the Proxy address, this determines a participant uniquely. This field (with proxy_address) is only null when the participant is interacting from an SDK endpoint (see the 'identity' field).
* @return $this Fluent Builder
*/
- public function setMessagingBindingAddress($messagingBindingAddress)
+ public function setMessagingBindingAddress(string $messagingBindingAddress): self
{
$this->options['messagingBindingAddress'] = $messagingBindingAddress;
return $this;
}
/**
- * The address of the Twilio phone number (or WhatsApp number, or Messenger Page ID) that the participant is in contact with. This field, together with participant address, is only null when the participant is interacting from a Chat endpoint (see the 'identity' field).
+ * The address of the Twilio phone number (or WhatsApp number) that the participant is in contact with. This field, together with participant address, is only null when the participant is interacting from an SDK endpoint (see the 'identity' field).
*
- * @param string $messagingBindingProxyAddress The address of the Twilio phone
- * number that the participant is
- * in contact with.
+ * @param string $messagingBindingProxyAddress The address of the Twilio phone number (or WhatsApp number) that the participant is in contact with. This field, together with participant address, is only null when the participant is interacting from an SDK endpoint (see the 'identity' field).
* @return $this Fluent Builder
*/
- public function setMessagingBindingProxyAddress($messagingBindingProxyAddress)
+ public function setMessagingBindingProxyAddress(string $messagingBindingProxyAddress): self
{
$this->options['messagingBindingProxyAddress'] = $messagingBindingProxyAddress;
return $this;
@@ -127,7 +199,7 @@ public function setMessagingBindingProxyAddress($messagingBindingProxyAddress)
* @param \DateTime $dateCreated The date that this resource was created.
* @return $this Fluent Builder
*/
- public function setDateCreated($dateCreated)
+ public function setDateCreated(\DateTime $dateCreated): self
{
$this->options['dateCreated'] = $dateCreated;
return $this;
@@ -139,69 +211,149 @@ public function setDateCreated($dateCreated)
* @param \DateTime $dateUpdated The date that this resource was last updated.
* @return $this Fluent Builder
*/
- public function setDateUpdated($dateUpdated)
+ public function setDateUpdated(\DateTime $dateUpdated): self
{
$this->options['dateUpdated'] = $dateUpdated;
return $this;
}
/**
- * An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set "{}" will be returned.
+ * An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned.
*
- * @param string $attributes An optional string metadata field you can use to
- * store any data you wish.
+ * @param string $attributes An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned.
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setAttributes(string $attributes): self
{
$this->options['attributes'] = $attributes;
return $this;
}
/**
- * The address of the Twilio phone number that is used in Group MMS. Communication mask for the Chat participant with Identity.
+ * The address of the Twilio phone number that is used in Group MMS. Communication mask for the Conversation participant with Identity.
*
- * @param string $messagingBindingProjectedAddress The address of the Twilio
- * phone number that is used in
- * Group MMS.
+ * @param string $messagingBindingProjectedAddress The address of the Twilio phone number that is used in Group MMS. Communication mask for the Conversation participant with Identity.
* @return $this Fluent Builder
*/
- public function setMessagingBindingProjectedAddress($messagingBindingProjectedAddress)
+ public function setMessagingBindingProjectedAddress(string $messagingBindingProjectedAddress): self
{
$this->options['messagingBindingProjectedAddress'] = $messagingBindingProjectedAddress;
return $this;
}
+ /**
+ * The SID of a conversation-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the participant.
+ *
+ * @param string $roleSid The SID of a conversation-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the participant.
+ * @return $this Fluent Builder
+ */
+ public function setRoleSid(string $roleSid): self
+ {
+ $this->options['roleSid'] = $roleSid;
+ return $this;
+ }
+
+ /**
+ * The X-Twilio-Webhook-Enabled HTTP request header
+ *
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
+ * @return $this Fluent Builder
+ */
+ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self
+ {
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ return $this;
+ }
+
+ /**
+ * Provide a friendly representation
+ *
+ * @return string Machine friendly representation
+ */
+ public function __toString(): string
+ {
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Conversations.V1.CreateParticipantOptions ' . $options . ']';
+ }
+}
+
+class DeleteParticipantOptions extends Options
+ {
+ /**
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
+ */
+ public function __construct(
+
+ string $xTwilioWebhookEnabled = Values::NONE
+
+ ) {
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ }
+
+ /**
+ * The X-Twilio-Webhook-Enabled HTTP request header
+ *
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
+ * @return $this Fluent Builder
+ */
+ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self
+ {
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Conversations.V1.CreateParticipantOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Conversations.V1.DeleteParticipantOptions ' . $options . ']';
}
}
+
+
class UpdateParticipantOptions extends Options
-{
+ {
/**
* @param \DateTime $dateCreated The date that this resource was created.
* @param \DateTime $dateUpdated The date that this resource was last updated.
- * @param string $attributes An optional string metadata field you can use to
- * store any data you wish.
+ * @param string $attributes An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned.
+ * @param string $roleSid The SID of a conversation-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the participant.
+ * @param string $messagingBindingProxyAddress The address of the Twilio phone number that the participant is in contact with. 'null' value will remove it.
+ * @param string $messagingBindingProjectedAddress The address of the Twilio phone number that is used in Group MMS. 'null' value will remove it.
+ * @param string $identity A unique string identifier for the conversation participant as [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource). This parameter is non-null if (and only if) the participant is using the Conversations SDK to communicate. Limited to 256 characters.
+ * @param int $lastReadMessageIndex Index of last “read” message in the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for the Participant.
+ * @param string $lastReadTimestamp Timestamp of last “read” message in the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for the Participant.
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
*/
- public function __construct($dateCreated = Values::NONE, $dateUpdated = Values::NONE, $attributes = Values::NONE)
- {
+ public function __construct(
+
+ \DateTime $dateCreated = null,
+ \DateTime $dateUpdated = null,
+ string $attributes = Values::NONE,
+ string $roleSid = Values::NONE,
+ string $messagingBindingProxyAddress = Values::NONE,
+ string $messagingBindingProjectedAddress = Values::NONE,
+ string $identity = Values::NONE,
+ int $lastReadMessageIndex = Values::INT_NONE,
+ string $lastReadTimestamp = Values::NONE,
+ string $xTwilioWebhookEnabled = Values::NONE
+
+ ) {
$this->options['dateCreated'] = $dateCreated;
$this->options['dateUpdated'] = $dateUpdated;
$this->options['attributes'] = $attributes;
+ $this->options['roleSid'] = $roleSid;
+ $this->options['messagingBindingProxyAddress'] = $messagingBindingProxyAddress;
+ $this->options['messagingBindingProjectedAddress'] = $messagingBindingProjectedAddress;
+ $this->options['identity'] = $identity;
+ $this->options['lastReadMessageIndex'] = $lastReadMessageIndex;
+ $this->options['lastReadTimestamp'] = $lastReadTimestamp;
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
}
/**
@@ -210,7 +362,7 @@ public function __construct($dateCreated = Values::NONE, $dateUpdated = Values::
* @param \DateTime $dateCreated The date that this resource was created.
* @return $this Fluent Builder
*/
- public function setDateCreated($dateCreated)
+ public function setDateCreated(\DateTime $dateCreated): self
{
$this->options['dateCreated'] = $dateCreated;
return $this;
@@ -222,38 +374,117 @@ public function setDateCreated($dateCreated)
* @param \DateTime $dateUpdated The date that this resource was last updated.
* @return $this Fluent Builder
*/
- public function setDateUpdated($dateUpdated)
+ public function setDateUpdated(\DateTime $dateUpdated): self
{
$this->options['dateUpdated'] = $dateUpdated;
return $this;
}
/**
- * An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set "{}" will be returned.
+ * An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned.
*
- * @param string $attributes An optional string metadata field you can use to
- * store any data you wish.
+ * @param string $attributes An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned.
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setAttributes(string $attributes): self
{
$this->options['attributes'] = $attributes;
return $this;
}
+ /**
+ * The SID of a conversation-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the participant.
+ *
+ * @param string $roleSid The SID of a conversation-level [Role](https://www.twilio.com/docs/conversations/api/role-resource) to assign to the participant.
+ * @return $this Fluent Builder
+ */
+ public function setRoleSid(string $roleSid): self
+ {
+ $this->options['roleSid'] = $roleSid;
+ return $this;
+ }
+
+ /**
+ * The address of the Twilio phone number that the participant is in contact with. 'null' value will remove it.
+ *
+ * @param string $messagingBindingProxyAddress The address of the Twilio phone number that the participant is in contact with. 'null' value will remove it.
+ * @return $this Fluent Builder
+ */
+ public function setMessagingBindingProxyAddress(string $messagingBindingProxyAddress): self
+ {
+ $this->options['messagingBindingProxyAddress'] = $messagingBindingProxyAddress;
+ return $this;
+ }
+
+ /**
+ * The address of the Twilio phone number that is used in Group MMS. 'null' value will remove it.
+ *
+ * @param string $messagingBindingProjectedAddress The address of the Twilio phone number that is used in Group MMS. 'null' value will remove it.
+ * @return $this Fluent Builder
+ */
+ public function setMessagingBindingProjectedAddress(string $messagingBindingProjectedAddress): self
+ {
+ $this->options['messagingBindingProjectedAddress'] = $messagingBindingProjectedAddress;
+ return $this;
+ }
+
+ /**
+ * A unique string identifier for the conversation participant as [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource). This parameter is non-null if (and only if) the participant is using the Conversations SDK to communicate. Limited to 256 characters.
+ *
+ * @param string $identity A unique string identifier for the conversation participant as [Conversation User](https://www.twilio.com/docs/conversations/api/user-resource). This parameter is non-null if (and only if) the participant is using the Conversations SDK to communicate. Limited to 256 characters.
+ * @return $this Fluent Builder
+ */
+ public function setIdentity(string $identity): self
+ {
+ $this->options['identity'] = $identity;
+ return $this;
+ }
+
+ /**
+ * Index of last “read” message in the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for the Participant.
+ *
+ * @param int $lastReadMessageIndex Index of last “read” message in the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for the Participant.
+ * @return $this Fluent Builder
+ */
+ public function setLastReadMessageIndex(int $lastReadMessageIndex): self
+ {
+ $this->options['lastReadMessageIndex'] = $lastReadMessageIndex;
+ return $this;
+ }
+
+ /**
+ * Timestamp of last “read” message in the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for the Participant.
+ *
+ * @param string $lastReadTimestamp Timestamp of last “read” message in the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for the Participant.
+ * @return $this Fluent Builder
+ */
+ public function setLastReadTimestamp(string $lastReadTimestamp): self
+ {
+ $this->options['lastReadTimestamp'] = $lastReadTimestamp;
+ return $this;
+ }
+
+ /**
+ * The X-Twilio-Webhook-Enabled HTTP request header
+ *
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
+ * @return $this Fluent Builder
+ */
+ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self
+ {
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Conversations.V1.UpdateParticipantOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Conversations.V1.UpdateParticipantOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/ParticipantPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/ParticipantPage.php
index 1063640..883cd17 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/ParticipantPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/ParticipantPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return ParticipantInstance \Twilio\Rest\Conversations\V1\Conversation\ParticipantInstance
+ */
+ public function buildInstance(array $payload): ParticipantInstance
{
return new ParticipantInstance($this->version, $payload, $this->solution['conversationSid']);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Conversations.V1.ParticipantPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/WebhookContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/WebhookContext.php
index aec6c83..5f5ceb4 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/WebhookContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/WebhookContext.php
@@ -2,60 +2,83 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Conversations
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Conversations\V1\Conversation;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
class WebhookContext extends InstanceContext
-{
+ {
/**
* Initialize the WebhookContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $conversationSid The unique id of the Conversation for this
- * webhook.
- * @param string $sid A 34 character string that uniquely identifies this
- * resource.
- * @return \Twilio\Rest\Conversations\V1\Conversation\WebhookContext
+ * @param Version $version Version that contains the resource
+ * @param string $conversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this webhook.
+ * @param string $sid A 34 character string that uniquely identifies this resource.
*/
- public function __construct(Version $version, $conversationSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $conversationSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('conversationSid' => $conversationSid, 'sid' => $sid,);
+ $this->solution = [
+ 'conversationSid' =>
+ $conversationSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Conversations/' . \rawurlencode($conversationSid)
+ .'/Webhooks/' . \rawurlencode($sid)
+ .'';
+ }
+
+ /**
+ * Delete the WebhookInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Conversations/' . \rawurlencode($conversationSid) . '/Webhooks/' . \rawurlencode($sid) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a WebhookInstance
+ * Fetch the WebhookInstance
*
* @return WebhookInstance Fetched WebhookInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): WebhookInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new WebhookInstance(
$this->version,
@@ -65,6 +88,7 @@ public function fetch()
);
}
+
/**
* Update the WebhookInstance
*
@@ -72,28 +96,26 @@ public function fetch()
* @return WebhookInstance Updated WebhookInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): WebhookInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'Configuration.Url' => $options['configurationUrl'],
- 'Configuration.Method' => $options['configurationMethod'],
- 'Configuration.Filters' => Serialize::map($options['configurationFilters'], function ($e) {
- return $e;
- }),
- 'Configuration.Triggers' => Serialize::map($options['configurationTriggers'], function ($e) {
- return $e;
- }),
- 'Configuration.FlowSid' => $options['configurationFlowSid'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'Configuration.Url' =>
+ $options['configurationUrl'],
+ 'Configuration.Method' =>
+ $options['configurationMethod'],
+ 'Configuration.Filters' =>
+ Serialize::map($options['configurationFilters'], function ($e) { return $e; }),
+ 'Configuration.Triggers' =>
+ Serialize::map($options['configurationTriggers'], function ($e) { return $e; }),
+ 'Configuration.FlowSid' =>
+ $options['configurationFlowSid'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new WebhookInstance(
$this->version,
@@ -103,28 +125,18 @@ public function update($options = array())
);
}
- /**
- * Deletes the WebhookInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Conversations.V1.WebhookContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/WebhookInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/WebhookInstance.php
index 335bca9..978b56c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/WebhookInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/WebhookInstance.php
@@ -2,51 +2,55 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Conversations
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Conversations\V1\Conversation;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property string $sid
- * @property string $accountSid
- * @property string $conversationSid
- * @property string $target
- * @property string $url
- * @property array $configuration
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $conversationSid
+ * @property string|null $target
+ * @property string|null $url
+ * @property array|null $configuration
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
*/
class WebhookInstance extends InstanceResource
{
/**
* Initialize the WebhookInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $conversationSid The unique id of the Conversation for this
- * webhook.
- * @param string $sid A 34 character string that uniquely identifies this
- * resource.
- * @return \Twilio\Rest\Conversations\V1\Conversation\WebhookInstance
+ * @param string $conversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this webhook.
+ * @param string $sid A 34 character string that uniquely identifies this resource.
*/
- public function __construct(Version $version, array $payload, $conversationSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $conversationSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'conversationSid' => Values::array_get($payload, 'conversation_sid'),
@@ -55,23 +59,18 @@ public function __construct(Version $version, array $payload, $conversationSid,
'configuration' => Values::array_get($payload, 'configuration'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- );
+ ];
- $this->solution = array(
- 'conversationSid' => $conversationSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['conversationSid' => $conversationSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Conversations\V1\Conversation\WebhookContext Context
- * for this
- * WebhookInstance
+ * @return WebhookContext Context for this WebhookInstance
*/
- protected function proxy()
+ protected function proxy(): WebhookContext
{
if (!$this->context) {
$this->context = new WebhookContext(
@@ -85,37 +84,40 @@ protected function proxy()
}
/**
- * Fetch a WebhookInstance
+ * Delete the WebhookInstance
*
- * @return WebhookInstance Fetched WebhookInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Update the WebhookInstance
+ * Fetch the WebhookInstance
*
- * @param array|Options $options Optional Arguments
- * @return WebhookInstance Updated WebhookInstance
+ * @return WebhookInstance Fetched WebhookInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): WebhookInstance
{
- return $this->proxy()->update($options);
+
+ return $this->proxy()->fetch();
}
/**
- * Deletes the WebhookInstance
+ * Update the WebhookInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return WebhookInstance Updated WebhookInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): WebhookInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->update($options);
}
/**
@@ -125,7 +127,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -144,12 +146,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Conversations.V1.WebhookInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/WebhookList.php b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/WebhookList.php
index b2116e4..db9ed4d 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/WebhookList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/WebhookList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Conversations
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Conversations\V1\Conversation;
@@ -12,60 +19,78 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
class WebhookList extends ListResource
-{
+ {
/**
* Construct the WebhookList
*
* @param Version $version Version that contains the resource
- * @param string $conversationSid The unique id of the Conversation for this
- * webhook.
- * @return \Twilio\Rest\Conversations\V1\Conversation\WebhookList
+ * @param string $conversationSid The unique ID of the [Conversation](https://www.twilio.com/docs/conversations/api/conversation-resource) for this webhook.
*/
- public function __construct(Version $version, $conversationSid)
- {
+ public function __construct(
+ Version $version,
+ string $conversationSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('conversationSid' => $conversationSid,);
-
- $this->uri = '/Conversations/' . \rawurlencode($conversationSid) . '/Webhooks';
+ $this->solution = [
+ 'conversationSid' =>
+ $conversationSid,
+
+ ];
+
+ $this->uri = '/Conversations/' . \rawurlencode($conversationSid)
+ .'/Webhooks';
}
/**
- * Streams WebhookInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the WebhookInstance
*
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @param string $target
+ * @param array|Options $options Optional Arguments
+ * @return WebhookInstance Created WebhookInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($limit = null, $pageSize = null)
+ public function create(string $target, array $options = []): WebhookInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'Target' =>
+ $target,
+ 'Configuration.Url' =>
+ $options['configurationUrl'],
+ 'Configuration.Method' =>
+ $options['configurationMethod'],
+ 'Configuration.Filters' =>
+ Serialize::map($options['configurationFilters'], function ($e) { return $e; }),
+ 'Configuration.Triggers' =>
+ Serialize::map($options['configurationTriggers'], function ($e) { return $e; }),
+ 'Configuration.FlowSid' =>
+ $options['configurationFlowSid'],
+ 'Configuration.ReplayAfter' =>
+ $options['configurationReplayAfter'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new WebhookInstance(
+ $this->version,
+ $payload,
+ $this->solution['conversationSid']
+ );
}
+
/**
* Reads WebhookInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -81,11 +106,38 @@ public function stream($limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return WebhookInstance[] Array of results
*/
- public function read($limit = null, $pageSize = null)
+ public function read(int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($limit, $pageSize), false);
}
+ /**
+ * Streams WebhookInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of WebhookInstance records from the API.
* Request is executed immediately
@@ -93,21 +145,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of WebhookInstance
+ * @return WebhookPage Page of WebhookInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): WebhookPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new WebhookPage($this->version, $response, $this->solution);
}
@@ -117,9 +170,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of WebhookInstance
+ * @return WebhookPage Page of WebhookInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): WebhookPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -129,52 +182,22 @@ public function getPage($targetUrl)
return new WebhookPage($this->version, $response, $this->solution);
}
- /**
- * Create a new WebhookInstance
- *
- * @param string $target The target of this webhook.
- * @param array|Options $options Optional Arguments
- * @return WebhookInstance Newly created WebhookInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($target, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'Target' => $target,
- 'Configuration.Url' => $options['configurationUrl'],
- 'Configuration.Method' => $options['configurationMethod'],
- 'Configuration.Filters' => Serialize::map($options['configurationFilters'], function ($e) {
- return $e;
- }),
- 'Configuration.Triggers' => Serialize::map($options['configurationTriggers'], function ($e) {
- return $e;
- }),
- 'Configuration.FlowSid' => $options['configurationFlowSid'],
- 'Configuration.ReplayAfter' => $options['configurationReplayAfter'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new WebhookInstance($this->version, $payload, $this->solution['conversationSid']);
- }
/**
* Constructs a WebhookContext
*
- * @param string $sid A 34 character string that uniquely identifies this
- * resource.
- * @return \Twilio\Rest\Conversations\V1\Conversation\WebhookContext
+ * @param string $sid A 34 character string that uniquely identifies this resource.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): WebhookContext
{
- return new WebhookContext($this->version, $this->solution['conversationSid'], $sid);
+ return new WebhookContext(
+ $this->version,
+ $this->solution['conversationSid'],
+ $sid
+ );
}
/**
@@ -182,8 +205,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Conversations.V1.WebhookList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/WebhookOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/WebhookOptions.php
index 31aafd5..1ad0f0f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/WebhookOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/WebhookOptions.php
@@ -1,10 +1,16 @@
options['configurationUrl'] = $configurationUrl;
$this->options['configurationMethod'] = $configurationMethod;
$this->options['configurationFilters'] = $configurationFilters;
@@ -85,24 +113,20 @@ public function __construct($configurationUrl = Values::NONE, $configurationMeth
/**
* The absolute url the webhook request should be sent to.
*
- * @param string $configurationUrl The absolute url the webhook request should
- * be sent to.
+ * @param string $configurationUrl The absolute url the webhook request should be sent to.
* @return $this Fluent Builder
*/
- public function setConfigurationUrl($configurationUrl)
+ public function setConfigurationUrl(string $configurationUrl): self
{
$this->options['configurationUrl'] = $configurationUrl;
return $this;
}
/**
- * The HTTP method to be used when sending a webhook request.
- *
- * @param string $configurationMethod The HTTP method to be used when sending a
- * webhook request.
+ * @param string $configurationMethod
* @return $this Fluent Builder
*/
- public function setConfigurationMethod($configurationMethod)
+ public function setConfigurationMethod(string $configurationMethod): self
{
$this->options['configurationMethod'] = $configurationMethod;
return $this;
@@ -111,11 +135,10 @@ public function setConfigurationMethod($configurationMethod)
/**
* The list of events, firing webhook event for this Conversation.
*
- * @param string $configurationFilters The list of events, firing webhook event
- * for this Conversation.
+ * @param string[] $configurationFilters The list of events, firing webhook event for this Conversation.
* @return $this Fluent Builder
*/
- public function setConfigurationFilters($configurationFilters)
+ public function setConfigurationFilters(array $configurationFilters): self
{
$this->options['configurationFilters'] = $configurationFilters;
return $this;
@@ -124,24 +147,22 @@ public function setConfigurationFilters($configurationFilters)
/**
* The list of keywords, firing webhook event for this Conversation.
*
- * @param string $configurationTriggers The list of keywords, firing webhook
- * event for this Conversation.
+ * @param string[] $configurationTriggers The list of keywords, firing webhook event for this Conversation.
* @return $this Fluent Builder
*/
- public function setConfigurationTriggers($configurationTriggers)
+ public function setConfigurationTriggers(array $configurationTriggers): self
{
$this->options['configurationTriggers'] = $configurationTriggers;
return $this;
}
/**
- * The studio flow sid, where the webhook should be sent to.
+ * The studio flow SID, where the webhook should be sent to.
*
- * @param string $configurationFlowSid The studio flow sid, where the webhook
- * should be sent to.
+ * @param string $configurationFlowSid The studio flow SID, where the webhook should be sent to.
* @return $this Fluent Builder
*/
- public function setConfigurationFlowSid($configurationFlowSid)
+ public function setConfigurationFlowSid(string $configurationFlowSid): self
{
$this->options['configurationFlowSid'] = $configurationFlowSid;
return $this;
@@ -150,11 +171,10 @@ public function setConfigurationFlowSid($configurationFlowSid)
/**
* The message index for which and it's successors the webhook will be replayed. Not set by default
*
- * @param int $configurationReplayAfter The message index for which and it's
- * successors the webhook will be replayed.
+ * @param int $configurationReplayAfter The message index for which and it's successors the webhook will be replayed. Not set by default
* @return $this Fluent Builder
*/
- public function setConfigurationReplayAfter($configurationReplayAfter)
+ public function setConfigurationReplayAfter(int $configurationReplayAfter): self
{
$this->options['configurationReplayAfter'] = $configurationReplayAfter;
return $this;
@@ -165,34 +185,34 @@ public function setConfigurationReplayAfter($configurationReplayAfter)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Conversations.V1.CreateWebhookOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Conversations.V1.CreateWebhookOptions ' . $options . ']';
}
}
+
+
+
class UpdateWebhookOptions extends Options
-{
+ {
/**
- * @param string $configurationUrl The absolute url the webhook request should
- * be sent to.
- * @param string $configurationMethod The HTTP method to be used when sending a
- * webhook request.
- * @param string $configurationFilters The list of events, firing webhook event
- * for this Conversation.
- * @param string $configurationTriggers The list of keywords, firing webhook
- * event for this Conversation.
- * @param string $configurationFlowSid The studio flow sid, where the webhook
- * should be sent to.
+ * @param string $configurationUrl The absolute url the webhook request should be sent to.
+ * @param string $configurationMethod
+ * @param string[] $configurationFilters The list of events, firing webhook event for this Conversation.
+ * @param string[] $configurationTriggers The list of keywords, firing webhook event for this Conversation.
+ * @param string $configurationFlowSid The studio flow SID, where the webhook should be sent to.
*/
- public function __construct($configurationUrl = Values::NONE, $configurationMethod = Values::NONE, $configurationFilters = Values::NONE, $configurationTriggers = Values::NONE, $configurationFlowSid = Values::NONE)
- {
+ public function __construct(
+
+ string $configurationUrl = Values::NONE,
+ string $configurationMethod = Values::NONE,
+ array $configurationFilters = Values::ARRAY_NONE,
+ array $configurationTriggers = Values::ARRAY_NONE,
+ string $configurationFlowSid = Values::NONE
+
+ ) {
$this->options['configurationUrl'] = $configurationUrl;
$this->options['configurationMethod'] = $configurationMethod;
$this->options['configurationFilters'] = $configurationFilters;
@@ -203,24 +223,20 @@ public function __construct($configurationUrl = Values::NONE, $configurationMeth
/**
* The absolute url the webhook request should be sent to.
*
- * @param string $configurationUrl The absolute url the webhook request should
- * be sent to.
+ * @param string $configurationUrl The absolute url the webhook request should be sent to.
* @return $this Fluent Builder
*/
- public function setConfigurationUrl($configurationUrl)
+ public function setConfigurationUrl(string $configurationUrl): self
{
$this->options['configurationUrl'] = $configurationUrl;
return $this;
}
/**
- * The HTTP method to be used when sending a webhook request.
- *
- * @param string $configurationMethod The HTTP method to be used when sending a
- * webhook request.
+ * @param string $configurationMethod
* @return $this Fluent Builder
*/
- public function setConfigurationMethod($configurationMethod)
+ public function setConfigurationMethod(string $configurationMethod): self
{
$this->options['configurationMethod'] = $configurationMethod;
return $this;
@@ -229,11 +245,10 @@ public function setConfigurationMethod($configurationMethod)
/**
* The list of events, firing webhook event for this Conversation.
*
- * @param string $configurationFilters The list of events, firing webhook event
- * for this Conversation.
+ * @param string[] $configurationFilters The list of events, firing webhook event for this Conversation.
* @return $this Fluent Builder
*/
- public function setConfigurationFilters($configurationFilters)
+ public function setConfigurationFilters(array $configurationFilters): self
{
$this->options['configurationFilters'] = $configurationFilters;
return $this;
@@ -242,24 +257,22 @@ public function setConfigurationFilters($configurationFilters)
/**
* The list of keywords, firing webhook event for this Conversation.
*
- * @param string $configurationTriggers The list of keywords, firing webhook
- * event for this Conversation.
+ * @param string[] $configurationTriggers The list of keywords, firing webhook event for this Conversation.
* @return $this Fluent Builder
*/
- public function setConfigurationTriggers($configurationTriggers)
+ public function setConfigurationTriggers(array $configurationTriggers): self
{
$this->options['configurationTriggers'] = $configurationTriggers;
return $this;
}
/**
- * The studio flow sid, where the webhook should be sent to.
+ * The studio flow SID, where the webhook should be sent to.
*
- * @param string $configurationFlowSid The studio flow sid, where the webhook
- * should be sent to.
+ * @param string $configurationFlowSid The studio flow SID, where the webhook should be sent to.
* @return $this Fluent Builder
*/
- public function setConfigurationFlowSid($configurationFlowSid)
+ public function setConfigurationFlowSid(string $configurationFlowSid): self
{
$this->options['configurationFlowSid'] = $configurationFlowSid;
return $this;
@@ -270,14 +283,10 @@ public function setConfigurationFlowSid($configurationFlowSid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Conversations.V1.UpdateWebhookOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Conversations.V1.UpdateWebhookOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/WebhookPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/WebhookPage.php
index b4f3342..6b54178 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/WebhookPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/Conversation/WebhookPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return WebhookInstance \Twilio\Rest\Conversations\V1\Conversation\WebhookInstance
+ */
+ public function buildInstance(array $payload): WebhookInstance
{
return new WebhookInstance($this->version, $payload, $this->solution['conversationSid']);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Conversations.V1.WebhookPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/ConversationContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/ConversationContext.php
index e082adb..3917e57 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/ConversationContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/ConversationContext.php
@@ -2,125 +2,164 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Conversations
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Conversations\V1;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Conversations\V1\Conversation\MessageList;
-use Twilio\Rest\Conversations\V1\Conversation\ParticipantList;
-use Twilio\Rest\Conversations\V1\Conversation\WebhookList;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+use Twilio\Rest\Conversations\V1\Conversation\ParticipantList;
+use Twilio\Rest\Conversations\V1\Conversation\MessageList;
+use Twilio\Rest\Conversations\V1\Conversation\WebhookList;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property \Twilio\Rest\Conversations\V1\Conversation\ParticipantList $participants
- * @property \Twilio\Rest\Conversations\V1\Conversation\MessageList $messages
- * @property \Twilio\Rest\Conversations\V1\Conversation\WebhookList $webhooks
- * @method \Twilio\Rest\Conversations\V1\Conversation\ParticipantContext participants(string $sid)
+ * @property ParticipantList $participants
+ * @property MessageList $messages
+ * @property WebhookList $webhooks
* @method \Twilio\Rest\Conversations\V1\Conversation\MessageContext messages(string $sid)
+ * @method \Twilio\Rest\Conversations\V1\Conversation\ParticipantContext participants(string $sid)
* @method \Twilio\Rest\Conversations\V1\Conversation\WebhookContext webhooks(string $sid)
*/
class ConversationContext extends InstanceContext
-{
- protected $_participants = null;
- protected $_messages = null;
- protected $_webhooks = null;
+ {
+ protected $_participants;
+ protected $_messages;
+ protected $_webhooks;
/**
* Initialize the ConversationContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid A 34 character string that uniquely identifies this
- * resource.
- * @return \Twilio\Rest\Conversations\V1\ConversationContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid A 34 character string that uniquely identifies this resource. Can also be the `unique_name` of the Conversation.
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Conversations/' . \rawurlencode($sid) . '';
+ $this->uri = '/Conversations/' . \rawurlencode($sid)
+ .'';
}
/**
- * Update the ConversationInstance
+ * Delete the ConversationInstance
*
* @param array|Options $options Optional Arguments
- * @return ConversationInstance Updated ConversationInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function delete(array $options = []): bool
{
- $options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']),
- 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']),
- 'Attributes' => $options['attributes'],
- 'MessagingServiceSid' => $options['messagingServiceSid'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $options = new Values($options);
- return new ConversationInstance($this->version, $payload, $this->solution['sid']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled']]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Deletes the ConversationInstance
+ * Fetch the ConversationInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return ConversationInstance Fetched ConversationInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): ConversationInstance
{
- return $this->version->delete('delete', $this->uri);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
+
+ return new ConversationInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
- * Fetch a ConversationInstance
+ * Update the ConversationInstance
*
- * @return ConversationInstance Fetched ConversationInstance
+ * @param array|Options $options Optional Arguments
+ * @return ConversationInstance Updated ConversationInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function update(array $options = []): ConversationInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $options = new Values($options);
- return new ConversationInstance($this->version, $payload, $this->solution['sid']);
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'DateCreated' =>
+ Serialize::iso8601DateTime($options['dateCreated']),
+ 'DateUpdated' =>
+ Serialize::iso8601DateTime($options['dateUpdated']),
+ 'Attributes' =>
+ $options['attributes'],
+ 'MessagingServiceSid' =>
+ $options['messagingServiceSid'],
+ 'State' =>
+ $options['state'],
+ 'Timers.Inactive' =>
+ $options['timersInactive'],
+ 'Timers.Closed' =>
+ $options['timersClosed'],
+ 'UniqueName' =>
+ $options['uniqueName'],
+ 'Bindings.Email.Address' =>
+ $options['bindingsEmailAddress'],
+ 'Bindings.Email.Name' =>
+ $options['bindingsEmailName'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled']]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
+
+ return new ConversationInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Access the participants
- *
- * @return \Twilio\Rest\Conversations\V1\Conversation\ParticipantList
*/
- protected function getParticipants()
+ protected function getParticipants(): ParticipantList
{
if (!$this->_participants) {
- $this->_participants = new ParticipantList($this->version, $this->solution['sid']);
+ $this->_participants = new ParticipantList(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->_participants;
@@ -128,13 +167,14 @@ protected function getParticipants()
/**
* Access the messages
- *
- * @return \Twilio\Rest\Conversations\V1\Conversation\MessageList
*/
- protected function getMessages()
+ protected function getMessages(): MessageList
{
if (!$this->_messages) {
- $this->_messages = new MessageList($this->version, $this->solution['sid']);
+ $this->_messages = new MessageList(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->_messages;
@@ -142,13 +182,14 @@ protected function getMessages()
/**
* Access the webhooks
- *
- * @return \Twilio\Rest\Conversations\V1\Conversation\WebhookList
*/
- protected function getWebhooks()
+ protected function getWebhooks(): WebhookList
{
if (!$this->_webhooks) {
- $this->_webhooks = new WebhookList($this->version, $this->solution['sid']);
+ $this->_webhooks = new WebhookList(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->_webhooks;
@@ -158,10 +199,10 @@ protected function getWebhooks()
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -176,10 +217,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -194,12 +235,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Conversations.V1.ConversationContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/ConversationInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/ConversationInstance.php
index deb6a44..73609f5 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/ConversationInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/ConversationInstance.php
@@ -2,146 +2,162 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Conversations
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Conversations\V1;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Conversations\V1\Conversation\ParticipantList;
+use Twilio\Rest\Conversations\V1\Conversation\MessageList;
+use Twilio\Rest\Conversations\V1\Conversation\WebhookList;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property string $accountSid
- * @property string $chatServiceSid
- * @property string $messagingServiceSid
- * @property string $sid
- * @property string $friendlyName
- * @property string $attributes
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
- * @property array $links
+ * @property string|null $accountSid
+ * @property string|null $chatServiceSid
+ * @property string|null $messagingServiceSid
+ * @property string|null $sid
+ * @property string|null $friendlyName
+ * @property string|null $uniqueName
+ * @property string|null $attributes
+ * @property string $state
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property array|null $timers
+ * @property string|null $url
+ * @property array|null $links
+ * @property array|null $bindings
*/
class ConversationInstance extends InstanceResource
{
- protected $_participants = null;
- protected $_messages = null;
- protected $_webhooks = null;
+ protected $_participants;
+ protected $_messages;
+ protected $_webhooks;
/**
* Initialize the ConversationInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid A 34 character string that uniquely identifies this
- * resource.
- * @return \Twilio\Rest\Conversations\V1\ConversationInstance
+ * @param string $sid A 34 character string that uniquely identifies this resource. Can also be the `unique_name` of the Conversation.
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'chatServiceSid' => Values::array_get($payload, 'chat_service_sid'),
'messagingServiceSid' => Values::array_get($payload, 'messaging_service_sid'),
'sid' => Values::array_get($payload, 'sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
+ 'uniqueName' => Values::array_get($payload, 'unique_name'),
'attributes' => Values::array_get($payload, 'attributes'),
+ 'state' => Values::array_get($payload, 'state'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
+ 'timers' => Values::array_get($payload, 'timers'),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ 'bindings' => Values::array_get($payload, 'bindings'),
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Conversations\V1\ConversationContext Context for this
- * ConversationInstance
+ * @return ConversationContext Context for this ConversationInstance
*/
- protected function proxy()
+ protected function proxy(): ConversationContext
{
if (!$this->context) {
- $this->context = new ConversationContext($this->version, $this->solution['sid']);
+ $this->context = new ConversationContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Update the ConversationInstance
+ * Delete the ConversationInstance
*
* @param array|Options $options Optional Arguments
- * @return ConversationInstance Updated ConversationInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function delete(array $options = []): bool
{
- return $this->proxy()->update($options);
+
+ return $this->proxy()->delete($options);
}
/**
- * Deletes the ConversationInstance
+ * Fetch the ConversationInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return ConversationInstance Fetched ConversationInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): ConversationInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
- * Fetch a ConversationInstance
+ * Update the ConversationInstance
*
- * @return ConversationInstance Fetched ConversationInstance
+ * @param array|Options $options Optional Arguments
+ * @return ConversationInstance Updated ConversationInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function update(array $options = []): ConversationInstance
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->update($options);
}
/**
* Access the participants
- *
- * @return \Twilio\Rest\Conversations\V1\Conversation\ParticipantList
*/
- protected function getParticipants()
+ protected function getParticipants(): ParticipantList
{
return $this->proxy()->participants;
}
/**
* Access the messages
- *
- * @return \Twilio\Rest\Conversations\V1\Conversation\MessageList
*/
- protected function getMessages()
+ protected function getMessages(): MessageList
{
return $this->proxy()->messages;
}
/**
* Access the webhooks
- *
- * @return \Twilio\Rest\Conversations\V1\Conversation\WebhookList
*/
- protected function getWebhooks()
+ protected function getWebhooks(): WebhookList
{
return $this->proxy()->webhooks;
}
@@ -153,7 +169,7 @@ protected function getWebhooks()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -172,12 +188,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Conversations.V1.ConversationInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/ConversationList.php b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/ConversationList.php
index 9a5d8c5..654d165 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/ConversationList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/ConversationList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Conversations
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Conversations\V1;
@@ -12,58 +19,97 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
class ConversationList extends ListResource
-{
+ {
/**
* Construct the ConversationList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Conversations\V1\ConversationList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/Conversations';
}
/**
- * Create a new ConversationInstance
+ * Create the ConversationInstance
*
* @param array|Options $options Optional Arguments
- * @return ConversationInstance Newly created ConversationInstance
+ * @return ConversationInstance Created ConversationInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($options = array())
+ public function create(array $options = []): ConversationInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']),
- 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']),
- 'MessagingServiceSid' => $options['messagingServiceSid'],
- 'Attributes' => $options['attributes'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'UniqueName' =>
+ $options['uniqueName'],
+ 'DateCreated' =>
+ Serialize::iso8601DateTime($options['dateCreated']),
+ 'DateUpdated' =>
+ Serialize::iso8601DateTime($options['dateUpdated']),
+ 'MessagingServiceSid' =>
+ $options['messagingServiceSid'],
+ 'Attributes' =>
+ $options['attributes'],
+ 'State' =>
+ $options['state'],
+ 'Timers.Inactive' =>
+ $options['timersInactive'],
+ 'Timers.Closed' =>
+ $options['timersClosed'],
+ 'Bindings.Email.Address' =>
+ $options['bindingsEmailAddress'],
+ 'Bindings.Email.Name' =>
+ $options['bindingsEmailName'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled']]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new ConversationInstance(
+ $this->version,
+ $payload
);
+ }
+
- return new ConversationInstance($this->version, $payload);
+ /**
+ * Reads ConversationInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return ConversationInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -74,6 +120,7 @@ public function create($options = array())
* The results are returned as a generator, so this operation is memory
* efficient.
*
+ * @param array|Options $options Optional Arguments
* @param int $limit Upper limit for the number of records to return. stream()
* guarantees to never return more than limit. Default is no
* limit
@@ -82,37 +129,17 @@ public function create($options = array())
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($limits['pageSize']);
+ $page = $this->page($options, $limits['pageSize']);
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads ConversationInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return ConversationInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of ConversationInstance records from the API.
* Request is executed immediately
@@ -120,21 +147,30 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of ConversationInstance
+ * @return ConversationPage Page of ConversationInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): ConversationPage
{
- $params = Values::of(array(
+ $options = new Values($options);
+
+ $params = Values::of([
+ 'StartDate' =>
+ $options['startDate'],
+ 'EndDate' =>
+ $options['endDate'],
+ 'State' =>
+ $options['state'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new ConversationPage($this->version, $response, $this->solution);
}
@@ -144,9 +180,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of ConversationInstance
+ * @return ConversationPage Page of ConversationInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): ConversationPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -156,16 +192,21 @@ public function getPage($targetUrl)
return new ConversationPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a ConversationContext
*
- * @param string $sid A 34 character string that uniquely identifies this
- * resource.
- * @return \Twilio\Rest\Conversations\V1\ConversationContext
+ * @param string $sid A 34 character string that uniquely identifies this resource. Can also be the `unique_name` of the Conversation.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): ConversationContext
{
- return new ConversationContext($this->version, $sid);
+ return new ConversationContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -173,8 +214,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Conversations.V1.ConversationList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/ConversationOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/ConversationOptions.php
index 1ac9369..eaf8086 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/ConversationOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/ConversationOptions.php
@@ -1,10 +1,16 @@
options['friendlyName'] = $friendlyName;
+ $this->options['uniqueName'] = $uniqueName;
$this->options['dateCreated'] = $dateCreated;
$this->options['dateUpdated'] = $dateUpdated;
$this->options['messagingServiceSid'] = $messagingServiceSid;
$this->options['attributes'] = $attributes;
+ $this->options['state'] = $state;
+ $this->options['timersInactive'] = $timersInactive;
+ $this->options['timersClosed'] = $timersClosed;
+ $this->options['bindingsEmailAddress'] = $bindingsEmailAddress;
+ $this->options['bindingsEmailName'] = $bindingsEmailName;
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
}
/**
* The human-readable name of this conversation, limited to 256 characters. Optional.
*
- * @param string $friendlyName The human-readable name of this conversation.
+ * @param string $friendlyName The human-readable name of this conversation, limited to 256 characters. Optional.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
}
+ /**
+ * An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL.
+ *
+ * @param string $uniqueName An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL.
+ * @return $this Fluent Builder
+ */
+ public function setUniqueName(string $uniqueName): self
+ {
+ $this->options['uniqueName'] = $uniqueName;
+ return $this;
+ }
+
/**
* The date that this resource was created.
*
* @param \DateTime $dateCreated The date that this resource was created.
* @return $this Fluent Builder
*/
- public function setDateCreated($dateCreated)
+ public function setDateCreated(\DateTime $dateCreated): self
{
$this->options['dateCreated'] = $dateCreated;
return $this;
@@ -98,82 +243,276 @@ public function setDateCreated($dateCreated)
* @param \DateTime $dateUpdated The date that this resource was last updated.
* @return $this Fluent Builder
*/
- public function setDateUpdated($dateUpdated)
+ public function setDateUpdated(\DateTime $dateUpdated): self
{
$this->options['dateUpdated'] = $dateUpdated;
return $this;
}
/**
- * The unique id of the [SMS Service](https://www.twilio.com/docs/sms/services/api) this conversation belongs to.
+ * The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this conversation belongs to.
*
- * @param string $messagingServiceSid The unique id of the SMS Service this
- * conversation belongs to.
+ * @param string $messagingServiceSid The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this conversation belongs to.
* @return $this Fluent Builder
*/
- public function setMessagingServiceSid($messagingServiceSid)
+ public function setMessagingServiceSid(string $messagingServiceSid): self
{
$this->options['messagingServiceSid'] = $messagingServiceSid;
return $this;
}
/**
- * An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set "{}" will be returned.
+ * An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned.
*
- * @param string $attributes An optional string metadata field you can use to
- * store any data you wish.
+ * @param string $attributes An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned.
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setAttributes(string $attributes): self
{
$this->options['attributes'] = $attributes;
return $this;
}
+ /**
+ * @param string $state
+ * @return $this Fluent Builder
+ */
+ public function setState(string $state): self
+ {
+ $this->options['state'] = $state;
+ return $this;
+ }
+
+ /**
+ * ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute.
+ *
+ * @param string $timersInactive ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute.
+ * @return $this Fluent Builder
+ */
+ public function setTimersInactive(string $timersInactive): self
+ {
+ $this->options['timersInactive'] = $timersInactive;
+ return $this;
+ }
+
+ /**
+ * ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes.
+ *
+ * @param string $timersClosed ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes.
+ * @return $this Fluent Builder
+ */
+ public function setTimersClosed(string $timersClosed): self
+ {
+ $this->options['timersClosed'] = $timersClosed;
+ return $this;
+ }
+
+ /**
+ * The default email address that will be used when sending outbound emails in this conversation.
+ *
+ * @param string $bindingsEmailAddress The default email address that will be used when sending outbound emails in this conversation.
+ * @return $this Fluent Builder
+ */
+ public function setBindingsEmailAddress(string $bindingsEmailAddress): self
+ {
+ $this->options['bindingsEmailAddress'] = $bindingsEmailAddress;
+ return $this;
+ }
+
+ /**
+ * The default name that will be used when sending outbound emails in this conversation.
+ *
+ * @param string $bindingsEmailName The default name that will be used when sending outbound emails in this conversation.
+ * @return $this Fluent Builder
+ */
+ public function setBindingsEmailName(string $bindingsEmailName): self
+ {
+ $this->options['bindingsEmailName'] = $bindingsEmailName;
+ return $this;
+ }
+
+ /**
+ * The X-Twilio-Webhook-Enabled HTTP request header
+ *
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
+ * @return $this Fluent Builder
+ */
+ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self
+ {
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ return $this;
+ }
+
+ /**
+ * Provide a friendly representation
+ *
+ * @return string Machine friendly representation
+ */
+ public function __toString(): string
+ {
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Conversations.V1.CreateConversationOptions ' . $options . ']';
+ }
+}
+
+class DeleteConversationOptions extends Options
+ {
+ /**
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
+ */
+ public function __construct(
+
+ string $xTwilioWebhookEnabled = Values::NONE
+
+ ) {
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ }
+
+ /**
+ * The X-Twilio-Webhook-Enabled HTTP request header
+ *
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
+ * @return $this Fluent Builder
+ */
+ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self
+ {
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Conversations.V1.CreateConversationOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Conversations.V1.DeleteConversationOptions ' . $options . ']';
+ }
+}
+
+
+class ReadConversationOptions extends Options
+ {
+ /**
+ * @param string $startDate Specifies the beginning of the date range for filtering Conversations based on their creation date. Conversations that were created on or after this date will be included in the results. The date must be in ISO8601 format, specifically starting at the beginning of the specified date (YYYY-MM-DDT00:00:00Z), for precise filtering. This parameter can be combined with other filters. If this filter is used, the returned list is sorted by latest conversation creation date in descending order.
+ * @param string $endDate Defines the end of the date range for filtering conversations by their creation date. Only conversations that were created on or before this date will appear in the results. The date must be in ISO8601 format, specifically capturing up to the end of the specified date (YYYY-MM-DDT23:59:59Z), to ensure that conversations from the entire end day are included. This parameter can be combined with other filters. If this filter is used, the returned list is sorted by latest conversation creation date in descending order.
+ * @param string $state State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed`
+ */
+ public function __construct(
+
+ string $startDate = Values::NONE,
+ string $endDate = Values::NONE,
+ string $state = Values::NONE
+
+ ) {
+ $this->options['startDate'] = $startDate;
+ $this->options['endDate'] = $endDate;
+ $this->options['state'] = $state;
+ }
+
+ /**
+ * Specifies the beginning of the date range for filtering Conversations based on their creation date. Conversations that were created on or after this date will be included in the results. The date must be in ISO8601 format, specifically starting at the beginning of the specified date (YYYY-MM-DDT00:00:00Z), for precise filtering. This parameter can be combined with other filters. If this filter is used, the returned list is sorted by latest conversation creation date in descending order.
+ *
+ * @param string $startDate Specifies the beginning of the date range for filtering Conversations based on their creation date. Conversations that were created on or after this date will be included in the results. The date must be in ISO8601 format, specifically starting at the beginning of the specified date (YYYY-MM-DDT00:00:00Z), for precise filtering. This parameter can be combined with other filters. If this filter is used, the returned list is sorted by latest conversation creation date in descending order.
+ * @return $this Fluent Builder
+ */
+ public function setStartDate(string $startDate): self
+ {
+ $this->options['startDate'] = $startDate;
+ return $this;
+ }
+
+ /**
+ * Defines the end of the date range for filtering conversations by their creation date. Only conversations that were created on or before this date will appear in the results. The date must be in ISO8601 format, specifically capturing up to the end of the specified date (YYYY-MM-DDT23:59:59Z), to ensure that conversations from the entire end day are included. This parameter can be combined with other filters. If this filter is used, the returned list is sorted by latest conversation creation date in descending order.
+ *
+ * @param string $endDate Defines the end of the date range for filtering conversations by their creation date. Only conversations that were created on or before this date will appear in the results. The date must be in ISO8601 format, specifically capturing up to the end of the specified date (YYYY-MM-DDT23:59:59Z), to ensure that conversations from the entire end day are included. This parameter can be combined with other filters. If this filter is used, the returned list is sorted by latest conversation creation date in descending order.
+ * @return $this Fluent Builder
+ */
+ public function setEndDate(string $endDate): self
+ {
+ $this->options['endDate'] = $endDate;
+ return $this;
+ }
+
+ /**
+ * State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed`
+ *
+ * @param string $state State for sorting and filtering list of Conversations. Can be `active`, `inactive` or `closed`
+ * @return $this Fluent Builder
+ */
+ public function setState(string $state): self
+ {
+ $this->options['state'] = $state;
+ return $this;
+ }
+
+ /**
+ * Provide a friendly representation
+ *
+ * @return string Machine friendly representation
+ */
+ public function __toString(): string
+ {
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Conversations.V1.ReadConversationOptions ' . $options . ']';
}
}
class UpdateConversationOptions extends Options
-{
+ {
/**
- * @param string $friendlyName The human-readable name of this conversation.
+ * @param string $friendlyName The human-readable name of this conversation, limited to 256 characters. Optional.
* @param \DateTime $dateCreated The date that this resource was created.
* @param \DateTime $dateUpdated The date that this resource was last updated.
- * @param string $attributes An optional string metadata field you can use to
- * store any data you wish.
- * @param string $messagingServiceSid The unique id of the SMS Service this
- * conversation belongs to.
+ * @param string $attributes An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned.
+ * @param string $messagingServiceSid The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this conversation belongs to.
+ * @param string $state
+ * @param string $timersInactive ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute.
+ * @param string $timersClosed ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes.
+ * @param string $uniqueName An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL.
+ * @param string $bindingsEmailAddress The default email address that will be used when sending outbound emails in this conversation.
+ * @param string $bindingsEmailName The default name that will be used when sending outbound emails in this conversation.
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
*/
- public function __construct($friendlyName = Values::NONE, $dateCreated = Values::NONE, $dateUpdated = Values::NONE, $attributes = Values::NONE, $messagingServiceSid = Values::NONE)
- {
+ public function __construct(
+
+ string $friendlyName = Values::NONE,
+ \DateTime $dateCreated = null,
+ \DateTime $dateUpdated = null,
+ string $attributes = Values::NONE,
+ string $messagingServiceSid = Values::NONE,
+ string $state = Values::NONE,
+ string $timersInactive = Values::NONE,
+ string $timersClosed = Values::NONE,
+ string $uniqueName = Values::NONE,
+ string $bindingsEmailAddress = Values::NONE,
+ string $bindingsEmailName = Values::NONE,
+ string $xTwilioWebhookEnabled = Values::NONE
+
+ ) {
$this->options['friendlyName'] = $friendlyName;
$this->options['dateCreated'] = $dateCreated;
$this->options['dateUpdated'] = $dateUpdated;
$this->options['attributes'] = $attributes;
$this->options['messagingServiceSid'] = $messagingServiceSid;
+ $this->options['state'] = $state;
+ $this->options['timersInactive'] = $timersInactive;
+ $this->options['timersClosed'] = $timersClosed;
+ $this->options['uniqueName'] = $uniqueName;
+ $this->options['bindingsEmailAddress'] = $bindingsEmailAddress;
+ $this->options['bindingsEmailName'] = $bindingsEmailName;
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
}
/**
* The human-readable name of this conversation, limited to 256 characters. Optional.
*
- * @param string $friendlyName The human-readable name of this conversation.
+ * @param string $friendlyName The human-readable name of this conversation, limited to 256 characters. Optional.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -185,7 +524,7 @@ public function setFriendlyName($friendlyName)
* @param \DateTime $dateCreated The date that this resource was created.
* @return $this Fluent Builder
*/
- public function setDateCreated($dateCreated)
+ public function setDateCreated(\DateTime $dateCreated): self
{
$this->options['dateCreated'] = $dateCreated;
return $this;
@@ -197,51 +536,127 @@ public function setDateCreated($dateCreated)
* @param \DateTime $dateUpdated The date that this resource was last updated.
* @return $this Fluent Builder
*/
- public function setDateUpdated($dateUpdated)
+ public function setDateUpdated(\DateTime $dateUpdated): self
{
$this->options['dateUpdated'] = $dateUpdated;
return $this;
}
/**
- * An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set "{}" will be returned.
+ * An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned.
*
- * @param string $attributes An optional string metadata field you can use to
- * store any data you wish.
+ * @param string $attributes An optional string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned.
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setAttributes(string $attributes): self
{
$this->options['attributes'] = $attributes;
return $this;
}
/**
- * The unique id of the [SMS Service](https://www.twilio.com/docs/sms/services/api) this conversation belongs to.
+ * The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this conversation belongs to.
*
- * @param string $messagingServiceSid The unique id of the SMS Service this
- * conversation belongs to.
+ * @param string $messagingServiceSid The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this conversation belongs to.
* @return $this Fluent Builder
*/
- public function setMessagingServiceSid($messagingServiceSid)
+ public function setMessagingServiceSid(string $messagingServiceSid): self
{
$this->options['messagingServiceSid'] = $messagingServiceSid;
return $this;
}
+ /**
+ * @param string $state
+ * @return $this Fluent Builder
+ */
+ public function setState(string $state): self
+ {
+ $this->options['state'] = $state;
+ return $this;
+ }
+
+ /**
+ * ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute.
+ *
+ * @param string $timersInactive ISO8601 duration when conversation will be switched to `inactive` state. Minimum value for this timer is 1 minute.
+ * @return $this Fluent Builder
+ */
+ public function setTimersInactive(string $timersInactive): self
+ {
+ $this->options['timersInactive'] = $timersInactive;
+ return $this;
+ }
+
+ /**
+ * ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes.
+ *
+ * @param string $timersClosed ISO8601 duration when conversation will be switched to `closed` state. Minimum value for this timer is 10 minutes.
+ * @return $this Fluent Builder
+ */
+ public function setTimersClosed(string $timersClosed): self
+ {
+ $this->options['timersClosed'] = $timersClosed;
+ return $this;
+ }
+
+ /**
+ * An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL.
+ *
+ * @param string $uniqueName An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL.
+ * @return $this Fluent Builder
+ */
+ public function setUniqueName(string $uniqueName): self
+ {
+ $this->options['uniqueName'] = $uniqueName;
+ return $this;
+ }
+
+ /**
+ * The default email address that will be used when sending outbound emails in this conversation.
+ *
+ * @param string $bindingsEmailAddress The default email address that will be used when sending outbound emails in this conversation.
+ * @return $this Fluent Builder
+ */
+ public function setBindingsEmailAddress(string $bindingsEmailAddress): self
+ {
+ $this->options['bindingsEmailAddress'] = $bindingsEmailAddress;
+ return $this;
+ }
+
+ /**
+ * The default name that will be used when sending outbound emails in this conversation.
+ *
+ * @param string $bindingsEmailName The default name that will be used when sending outbound emails in this conversation.
+ * @return $this Fluent Builder
+ */
+ public function setBindingsEmailName(string $bindingsEmailName): self
+ {
+ $this->options['bindingsEmailName'] = $bindingsEmailName;
+ return $this;
+ }
+
+ /**
+ * The X-Twilio-Webhook-Enabled HTTP request header
+ *
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
+ * @return $this Fluent Builder
+ */
+ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self
+ {
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Conversations.V1.UpdateConversationOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Conversations.V1.UpdateConversationOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/ConversationPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/ConversationPage.php
index 579a2df..e4cb786 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/ConversationPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/ConversationPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return ConversationInstance \Twilio\Rest\Conversations\V1\ConversationInstance
+ */
+ public function buildInstance(array $payload): ConversationInstance
{
return new ConversationInstance($this->version, $payload);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Conversations.V1.ConversationPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/WebhookContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/WebhookContext.php
deleted file mode 100644
index 53440cc..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/WebhookContext.php
+++ /dev/null
@@ -1,103 +0,0 @@
-solution = array();
-
- $this->uri = '/Conversations/Webhooks';
- }
-
- /**
- * Fetch a WebhookInstance
- *
- * @return WebhookInstance Fetched WebhookInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new WebhookInstance($this->version, $payload);
- }
-
- /**
- * Update the WebhookInstance
- *
- * @param array|Options $options Optional Arguments
- * @return WebhookInstance Updated WebhookInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'Method' => $options['method'],
- 'Filters' => Serialize::map($options['filters'], function ($e) {
- return $e;
- }),
- 'PreWebhookUrl' => $options['preWebhookUrl'],
- 'PostWebhookUrl' => $options['postWebhookUrl'],
- 'Target' => $options['target'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new WebhookInstance($this->version, $payload);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Conversations.V1.WebhookContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/WebhookInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/WebhookInstance.php
deleted file mode 100644
index c082c79..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/WebhookInstance.php
+++ /dev/null
@@ -1,129 +0,0 @@
-properties = array(
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'method' => Values::array_get($payload, 'method'),
- 'filters' => Values::array_get($payload, 'filters'),
- 'preWebhookUrl' => Values::array_get($payload, 'pre_webhook_url'),
- 'postWebhookUrl' => Values::array_get($payload, 'post_webhook_url'),
- 'target' => Values::array_get($payload, 'target'),
- 'url' => Values::array_get($payload, 'url'),
- );
-
- $this->solution = array();
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Conversations\V1\WebhookContext Context for this
- * WebhookInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new WebhookContext($this->version);
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a WebhookInstance
- *
- * @return WebhookInstance Fetched WebhookInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Update the WebhookInstance
- *
- * @param array|Options $options Optional Arguments
- * @return WebhookInstance Updated WebhookInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- return $this->proxy()->update($options);
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Conversations.V1.WebhookInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/WebhookList.php b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/WebhookList.php
deleted file mode 100644
index 52fc459..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/WebhookList.php
+++ /dev/null
@@ -1,53 +0,0 @@
-solution = array();
- }
-
- /**
- * Constructs a WebhookContext
- *
- * @return \Twilio\Rest\Conversations\V1\WebhookContext
- */
- public function getContext()
- {
- return new WebhookContext($this->version);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Conversations.V1.WebhookList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/WebhookOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/WebhookOptions.php
deleted file mode 100644
index eb0ca7f..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/WebhookOptions.php
+++ /dev/null
@@ -1,139 +0,0 @@
-options['method'] = $method;
- $this->options['filters'] = $filters;
- $this->options['preWebhookUrl'] = $preWebhookUrl;
- $this->options['postWebhookUrl'] = $postWebhookUrl;
- $this->options['target'] = $target;
- }
-
- /**
- * The HTTP method to be used when sending a webhook request.
- *
- * @param string $method The HTTP method to be used when sending a webhook
- * request.
- * @return $this Fluent Builder
- */
- public function setMethod($method)
- {
- $this->options['method'] = $method;
- return $this;
- }
-
- /**
- * The list of webhook event triggers that are enabled for this Service: `onMessageAdded`, `onMessageUpdated`, `onMessageRemoved`, `onConversationUpdated`, `onConversationRemoved`, `onParticipantAdded`, `onParticipantUpdated`, `onParticipantRemoved`
- *
- * @param string $filters The list of webhook event triggers that are enabled
- * for this Service.
- * @return $this Fluent Builder
- */
- public function setFilters($filters)
- {
- $this->options['filters'] = $filters;
- return $this;
- }
-
- /**
- * The absolute url the pre-event webhook request should be sent to.
- *
- * @param string $preWebhookUrl The absolute url the pre-event webhook request
- * should be sent to.
- * @return $this Fluent Builder
- */
- public function setPreWebhookUrl($preWebhookUrl)
- {
- $this->options['preWebhookUrl'] = $preWebhookUrl;
- return $this;
- }
-
- /**
- * The absolute url the post-event webhook request should be sent to.
- *
- * @param string $postWebhookUrl The absolute url the post-event webhook
- * request should be sent to.
- * @return $this Fluent Builder
- */
- public function setPostWebhookUrl($postWebhookUrl)
- {
- $this->options['postWebhookUrl'] = $postWebhookUrl;
- return $this;
- }
-
- /**
- * The routing target of the webhook. Can be ordinary or route internally to Flex
- *
- * @param string $target The routing target of the webhook.
- * @return $this Fluent Builder
- */
- public function setTarget($target)
- {
- $this->options['target'] = $target;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Conversations.V1.UpdateWebhookOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/WebhookPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/WebhookPage.php
deleted file mode 100644
index 2fe3925..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Conversations/V1/WebhookPage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new WebhookInstance($this->version, $payload);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Conversations.V1.WebhookPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Fax.php b/vendor/twilio/sdk/src/Twilio/Rest/Fax.php
deleted file mode 100644
index b0a5ae1..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Fax.php
+++ /dev/null
@@ -1,111 +0,0 @@
-baseUrl = 'https://fax.twilio.com';
- }
-
- /**
- * @return \Twilio\Rest\Fax\V1 Version v1 of fax
- */
- protected function getV1()
- {
- if (!$this->_v1) {
- $this->_v1 = new V1($this);
- }
- return $this->_v1;
- }
-
- /**
- * Magic getter to lazy load version
- *
- * @param string $name Version to return
- * @return \Twilio\Version The requested version
- * @throws TwilioException For unknown versions
- */
- public function __get($name)
- {
- $method = 'get' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return $this->$method();
- }
-
- throw new TwilioException('Unknown version ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $method = 'context' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return \call_user_func_array(array($this, $method), $arguments);
- }
-
- throw new TwilioException('Unknown context ' . $name);
- }
-
- /**
- * @return \Twilio\Rest\Fax\V1\FaxList
- */
- protected function getFaxes()
- {
- return $this->v1->faxes;
- }
-
- /**
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Fax\V1\FaxContext
- */
- protected function contextFaxes($sid)
- {
- return $this->v1->faxes($sid);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Fax]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Fax/V1.php b/vendor/twilio/sdk/src/Twilio/Rest/Fax/V1.php
deleted file mode 100644
index 8a1fd33..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Fax/V1.php
+++ /dev/null
@@ -1,92 +0,0 @@
-version = 'v1';
- }
-
- /**
- * @return \Twilio\Rest\Fax\V1\FaxList
- */
- protected function getFaxes()
- {
- if (!$this->_faxes) {
- $this->_faxes = new FaxList($this);
- }
- return $this->_faxes;
- }
-
- /**
- * Magic getter to lazy load root resources
- *
- * @param string $name Resource to return
- * @return \Twilio\ListResource The requested resource
- * @throws TwilioException For unknown resource
- */
- public function __get($name)
- {
- $method = 'get' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return $this->$method();
- }
-
- throw new TwilioException('Unknown resource ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $property = $this->$name;
- if (\method_exists($property, 'getContext')) {
- return \call_user_func_array(array($property, 'getContext'), $arguments);
- }
-
- throw new TwilioException('Resource does not have a context');
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Fax.V1]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Fax/V1/Fax/FaxMediaContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Fax/V1/Fax/FaxMediaContext.php
deleted file mode 100644
index 65e3202..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Fax/V1/Fax/FaxMediaContext.php
+++ /dev/null
@@ -1,88 +0,0 @@
-solution = array('faxSid' => $faxSid, 'sid' => $sid,);
-
- $this->uri = '/Faxes/' . \rawurlencode($faxSid) . '/Media/' . \rawurlencode($sid) . '';
- }
-
- /**
- * Fetch a FaxMediaInstance
- *
- * @return FaxMediaInstance Fetched FaxMediaInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new FaxMediaInstance(
- $this->version,
- $payload,
- $this->solution['faxSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Deletes the FaxMediaInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Fax.V1.FaxMediaContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Fax/V1/Fax/FaxMediaInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Fax/V1/Fax/FaxMediaInstance.php
deleted file mode 100644
index dc19959..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Fax/V1/Fax/FaxMediaInstance.php
+++ /dev/null
@@ -1,135 +0,0 @@
-properties = array(
- 'sid' => Values::array_get($payload, 'sid'),
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'faxSid' => Values::array_get($payload, 'fax_sid'),
- 'contentType' => Values::array_get($payload, 'content_type'),
- 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- 'url' => Values::array_get($payload, 'url'),
- );
-
- $this->solution = array('faxSid' => $faxSid, 'sid' => $sid ?: $this->properties['sid'],);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Fax\V1\Fax\FaxMediaContext Context for this
- * FaxMediaInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new FaxMediaContext(
- $this->version,
- $this->solution['faxSid'],
- $this->solution['sid']
- );
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a FaxMediaInstance
- *
- * @return FaxMediaInstance Fetched FaxMediaInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Deletes the FaxMediaInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->proxy()->delete();
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Fax.V1.FaxMediaInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Fax/V1/Fax/FaxMediaList.php b/vendor/twilio/sdk/src/Twilio/Rest/Fax/V1/Fax/FaxMediaList.php
deleted file mode 100644
index 2910e11..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Fax/V1/Fax/FaxMediaList.php
+++ /dev/null
@@ -1,149 +0,0 @@
-solution = array('faxSid' => $faxSid,);
-
- $this->uri = '/Faxes/' . \rawurlencode($faxSid) . '/Media';
- }
-
- /**
- * Streams FaxMediaInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
- *
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
- */
- public function stream($limit = null, $pageSize = null)
- {
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
- }
-
- /**
- * Reads FaxMediaInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return FaxMediaInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
- /**
- * Retrieve a single page of FaxMediaInstance records from the API.
- * Request is executed immediately
- *
- * @param mixed $pageSize Number of records to return, defaults to 50
- * @param string $pageToken PageToken provided by the API
- * @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of FaxMediaInstance
- */
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
- {
- $params = Values::of(array(
- 'PageToken' => $pageToken,
- 'Page' => $pageNumber,
- 'PageSize' => $pageSize,
- ));
-
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
-
- return new FaxMediaPage($this->version, $response, $this->solution);
- }
-
- /**
- * Retrieve a specific page of FaxMediaInstance records from the API.
- * Request is executed immediately
- *
- * @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of FaxMediaInstance
- */
- public function getPage($targetUrl)
- {
- $response = $this->version->getDomain()->getClient()->request(
- 'GET',
- $targetUrl
- );
-
- return new FaxMediaPage($this->version, $response, $this->solution);
- }
-
- /**
- * Constructs a FaxMediaContext
- *
- * @param string $sid The unique string that identifies the resource to fetch
- * @return \Twilio\Rest\Fax\V1\Fax\FaxMediaContext
- */
- public function getContext($sid)
- {
- return new FaxMediaContext($this->version, $this->solution['faxSid'], $sid);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Fax.V1.FaxMediaList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Fax/V1/Fax/FaxMediaPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Fax/V1/Fax/FaxMediaPage.php
deleted file mode 100644
index f8010d0..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Fax/V1/Fax/FaxMediaPage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new FaxMediaInstance($this->version, $payload, $this->solution['faxSid']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Fax.V1.FaxMediaPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Fax/V1/FaxContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Fax/V1/FaxContext.php
deleted file mode 100644
index c758372..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Fax/V1/FaxContext.php
+++ /dev/null
@@ -1,161 +0,0 @@
-solution = array('sid' => $sid,);
-
- $this->uri = '/Faxes/' . \rawurlencode($sid) . '';
- }
-
- /**
- * Fetch a FaxInstance
- *
- * @return FaxInstance Fetched FaxInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new FaxInstance($this->version, $payload, $this->solution['sid']);
- }
-
- /**
- * Update the FaxInstance
- *
- * @param array|Options $options Optional Arguments
- * @return FaxInstance Updated FaxInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array('Status' => $options['status'],));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new FaxInstance($this->version, $payload, $this->solution['sid']);
- }
-
- /**
- * Deletes the FaxInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
-
- /**
- * Access the media
- *
- * @return \Twilio\Rest\Fax\V1\Fax\FaxMediaList
- */
- protected function getMedia()
- {
- if (!$this->_media) {
- $this->_media = new FaxMediaList($this->version, $this->solution['sid']);
- }
-
- return $this->_media;
- }
-
- /**
- * Magic getter to lazy load subresources
- *
- * @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
- * @throws TwilioException For unknown subresources
- */
- public function __get($name)
- {
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown subresource ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $property = $this->$name;
- if (\method_exists($property, 'getContext')) {
- return \call_user_func_array(array($property, 'getContext'), $arguments);
- }
-
- throw new TwilioException('Resource does not have a context');
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Fax.V1.FaxContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Fax/V1/FaxInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Fax/V1/FaxInstance.php
deleted file mode 100644
index e6e06dd..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Fax/V1/FaxInstance.php
+++ /dev/null
@@ -1,175 +0,0 @@
-properties = array(
- 'sid' => Values::array_get($payload, 'sid'),
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'from' => Values::array_get($payload, 'from'),
- 'to' => Values::array_get($payload, 'to'),
- 'quality' => Values::array_get($payload, 'quality'),
- 'mediaSid' => Values::array_get($payload, 'media_sid'),
- 'mediaUrl' => Values::array_get($payload, 'media_url'),
- 'numPages' => Values::array_get($payload, 'num_pages'),
- 'duration' => Values::array_get($payload, 'duration'),
- 'status' => Values::array_get($payload, 'status'),
- 'direction' => Values::array_get($payload, 'direction'),
- 'apiVersion' => Values::array_get($payload, 'api_version'),
- 'price' => Values::array_get($payload, 'price'),
- 'priceUnit' => Values::array_get($payload, 'price_unit'),
- 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- 'links' => Values::array_get($payload, 'links'),
- 'url' => Values::array_get($payload, 'url'),
- );
-
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Fax\V1\FaxContext Context for this FaxInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new FaxContext($this->version, $this->solution['sid']);
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a FaxInstance
- *
- * @return FaxInstance Fetched FaxInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Update the FaxInstance
- *
- * @param array|Options $options Optional Arguments
- * @return FaxInstance Updated FaxInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- return $this->proxy()->update($options);
- }
-
- /**
- * Deletes the FaxInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->proxy()->delete();
- }
-
- /**
- * Access the media
- *
- * @return \Twilio\Rest\Fax\V1\Fax\FaxMediaList
- */
- protected function getMedia()
- {
- return $this->proxy()->media;
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Fax.V1.FaxInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Fax/V1/FaxList.php b/vendor/twilio/sdk/src/Twilio/Rest/Fax/V1/FaxList.php
deleted file mode 100644
index 0af4a81..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Fax/V1/FaxList.php
+++ /dev/null
@@ -1,193 +0,0 @@
-solution = array();
-
- $this->uri = '/Faxes';
- }
-
- /**
- * Streams FaxInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
- */
- public function stream($options = array(), $limit = null, $pageSize = null)
- {
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($options, $limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
- }
-
- /**
- * Reads FaxInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return FaxInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
- /**
- * Retrieve a single page of FaxInstance records from the API.
- * Request is executed immediately
- *
- * @param array|Options $options Optional Arguments
- * @param mixed $pageSize Number of records to return, defaults to 50
- * @param string $pageToken PageToken provided by the API
- * @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of FaxInstance
- */
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
- {
- $options = new Values($options);
- $params = Values::of(array(
- 'From' => $options['from'],
- 'To' => $options['to'],
- 'DateCreatedOnOrBefore' => Serialize::iso8601DateTime($options['dateCreatedOnOrBefore']),
- 'DateCreatedAfter' => Serialize::iso8601DateTime($options['dateCreatedAfter']),
- 'PageToken' => $pageToken,
- 'Page' => $pageNumber,
- 'PageSize' => $pageSize,
- ));
-
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
-
- return new FaxPage($this->version, $response, $this->solution);
- }
-
- /**
- * Retrieve a specific page of FaxInstance records from the API.
- * Request is executed immediately
- *
- * @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of FaxInstance
- */
- public function getPage($targetUrl)
- {
- $response = $this->version->getDomain()->getClient()->request(
- 'GET',
- $targetUrl
- );
-
- return new FaxPage($this->version, $response, $this->solution);
- }
-
- /**
- * Create a new FaxInstance
- *
- * @param string $to The phone number to receive the fax
- * @param string $mediaUrl The URL of the PDF that contains the fax
- * @param array|Options $options Optional Arguments
- * @return FaxInstance Newly created FaxInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($to, $mediaUrl, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'To' => $to,
- 'MediaUrl' => $mediaUrl,
- 'Quality' => $options['quality'],
- 'StatusCallback' => $options['statusCallback'],
- 'From' => $options['from'],
- 'SipAuthUsername' => $options['sipAuthUsername'],
- 'SipAuthPassword' => $options['sipAuthPassword'],
- 'StoreMedia' => Serialize::booleanToString($options['storeMedia']),
- 'Ttl' => $options['ttl'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new FaxInstance($this->version, $payload);
- }
-
- /**
- * Constructs a FaxContext
- *
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Fax\V1\FaxContext
- */
- public function getContext($sid)
- {
- return new FaxContext($this->version, $sid);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Fax.V1.FaxList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Fax/V1/FaxOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Fax/V1/FaxOptions.php
deleted file mode 100644
index 21deb6f..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Fax/V1/FaxOptions.php
+++ /dev/null
@@ -1,307 +0,0 @@
-options['from'] = $from;
- $this->options['to'] = $to;
- $this->options['dateCreatedOnOrBefore'] = $dateCreatedOnOrBefore;
- $this->options['dateCreatedAfter'] = $dateCreatedAfter;
- }
-
- /**
- * Retrieve only those faxes sent from this phone number, specified in [E.164](https://www.twilio.com/docs/glossary/what-e164) format.
- *
- * @param string $from Retrieve only those faxes sent from this phone number
- * @return $this Fluent Builder
- */
- public function setFrom($from)
- {
- $this->options['from'] = $from;
- return $this;
- }
-
- /**
- * Retrieve only those faxes sent to this phone number, specified in [E.164](https://www.twilio.com/docs/glossary/what-e164) format.
- *
- * @param string $to Retrieve only those faxes sent to this phone number
- * @return $this Fluent Builder
- */
- public function setTo($to)
- {
- $this->options['to'] = $to;
- return $this;
- }
-
- /**
- * Retrieve only those faxes with a `date_created` that is before or equal to this value, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
- *
- * @param \DateTime $dateCreatedOnOrBefore Retrieve only faxes created on or
- * before this date
- * @return $this Fluent Builder
- */
- public function setDateCreatedOnOrBefore($dateCreatedOnOrBefore)
- {
- $this->options['dateCreatedOnOrBefore'] = $dateCreatedOnOrBefore;
- return $this;
- }
-
- /**
- * Retrieve only those faxes with a `date_created` that is later than this value, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
- *
- * @param \DateTime $dateCreatedAfter Retrieve only faxes created after this
- * date
- * @return $this Fluent Builder
- */
- public function setDateCreatedAfter($dateCreatedAfter)
- {
- $this->options['dateCreatedAfter'] = $dateCreatedAfter;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Fax.V1.ReadFaxOptions ' . \implode(' ', $options) . ']';
- }
-}
-
-class CreateFaxOptions extends Options
-{
- /**
- * @param string $quality The quality of this fax
- * @param string $statusCallback The URL we should call to send status
- * information to your application
- * @param string $from The number the fax was sent from
- * @param string $sipAuthUsername The username for SIP authentication
- * @param string $sipAuthPassword The password for SIP authentication
- * @param bool $storeMedia Whether to store a copy of the sent media
- * @param int $ttl How long in minutes to try to send the fax
- */
- public function __construct($quality = Values::NONE, $statusCallback = Values::NONE, $from = Values::NONE, $sipAuthUsername = Values::NONE, $sipAuthPassword = Values::NONE, $storeMedia = Values::NONE, $ttl = Values::NONE)
- {
- $this->options['quality'] = $quality;
- $this->options['statusCallback'] = $statusCallback;
- $this->options['from'] = $from;
- $this->options['sipAuthUsername'] = $sipAuthUsername;
- $this->options['sipAuthPassword'] = $sipAuthPassword;
- $this->options['storeMedia'] = $storeMedia;
- $this->options['ttl'] = $ttl;
- }
-
- /**
- * The [Fax Quality value](https://www.twilio.com/docs/fax/api/fax-resource#fax-quality-values) that describes the fax quality. Can be: `standard`, `fine`, or `superfine` and defaults to `fine`.
- *
- * @param string $quality The quality of this fax
- * @return $this Fluent Builder
- */
- public function setQuality($quality)
- {
- $this->options['quality'] = $quality;
- return $this;
- }
-
- /**
- * The URL we should call using the `POST` method to send [status information](https://www.twilio.com/docs/fax/api/fax-resource#fax-status-callback) to your application when the status of the fax changes.
- *
- * @param string $statusCallback The URL we should call to send status
- * information to your application
- * @return $this Fluent Builder
- */
- public function setStatusCallback($statusCallback)
- {
- $this->options['statusCallback'] = $statusCallback;
- return $this;
- }
-
- /**
- * The number the fax was sent from. Can be the phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format or the SIP `from` value. The caller ID displayed to the recipient uses this value. If this is a phone number, it must be a Twilio number or a verified outgoing caller id from your account. If `to` is a SIP address, this can be any alphanumeric string (and also the characters `+`, `_`, `.`, and `-`), which will be used in the `from` header of the SIP request.
- *
- * @param string $from The number the fax was sent from
- * @return $this Fluent Builder
- */
- public function setFrom($from)
- {
- $this->options['from'] = $from;
- return $this;
- }
-
- /**
- * The username to use with the `sip_auth_password` to authenticate faxes sent to a SIP address.
- *
- * @param string $sipAuthUsername The username for SIP authentication
- * @return $this Fluent Builder
- */
- public function setSipAuthUsername($sipAuthUsername)
- {
- $this->options['sipAuthUsername'] = $sipAuthUsername;
- return $this;
- }
-
- /**
- * The password to use with `sip_auth_username` to authenticate faxes sent to a SIP address.
- *
- * @param string $sipAuthPassword The password for SIP authentication
- * @return $this Fluent Builder
- */
- public function setSipAuthPassword($sipAuthPassword)
- {
- $this->options['sipAuthPassword'] = $sipAuthPassword;
- return $this;
- }
-
- /**
- * Whether to store a copy of the sent media on our servers for later retrieval. Can be: `true` or `false` and the default is `true`.
- *
- * @param bool $storeMedia Whether to store a copy of the sent media
- * @return $this Fluent Builder
- */
- public function setStoreMedia($storeMedia)
- {
- $this->options['storeMedia'] = $storeMedia;
- return $this;
- }
-
- /**
- * How long in minutes from when the fax is initiated that we should try to send the fax.
- *
- * @param int $ttl How long in minutes to try to send the fax
- * @return $this Fluent Builder
- */
- public function setTtl($ttl)
- {
- $this->options['ttl'] = $ttl;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Fax.V1.CreateFaxOptions ' . \implode(' ', $options) . ']';
- }
-}
-
-class UpdateFaxOptions extends Options
-{
- /**
- * @param string $status The new status of the resource
- */
- public function __construct($status = Values::NONE)
- {
- $this->options['status'] = $status;
- }
-
- /**
- * The new [status](https://www.twilio.com/docs/fax/api/fax-resource#fax-status-values) of the resource. Can be only `canceled`. This may fail if transmission has already started.
- *
- * @param string $status The new status of the resource
- * @return $this Fluent Builder
- */
- public function setStatus($status)
- {
- $this->options['status'] = $status;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Fax.V1.UpdateFaxOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Fax/V1/FaxPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Fax/V1/FaxPage.php
deleted file mode 100644
index cad7048..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Fax/V1/FaxPage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new FaxInstance($this->version, $payload);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Fax.V1.FaxPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi.php b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi.php
index cc36768..ebcebfe 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi.php
@@ -1,168 +1,118 @@
baseUrl = 'https://flex-api.twilio.com';
- }
-
- /**
- * @return \Twilio\Rest\FlexApi\V1 Version v1 of flex_api
- */
- protected function getV1()
- {
- if (!$this->_v1) {
- $this->_v1 = new V1($this);
- }
- return $this->_v1;
- }
+class FlexApi extends FlexApiBase {
/**
- * Magic getter to lazy load version
- *
- * @param string $name Version to return
- * @return \Twilio\Version The requested version
- * @throws TwilioException For unknown versions
+ * @deprecated Use v1->assessments instead.
*/
- public function __get($name)
- {
- $method = 'get' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return $this->$method();
- }
-
- throw new TwilioException('Unknown version ' . $name);
+ protected function getAssessments(): \Twilio\Rest\FlexApi\V1\AssessmentsList {
+ echo "assessments is deprecated. Use v1->assessments instead.";
+ return $this->v1->assessments;
}
/**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
+ * @deprecated Use v1->assessments() instead.
*/
- public function __call($name, $arguments)
- {
- $method = 'context' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return \call_user_func_array(array($this, $method), $arguments);
- }
-
- throw new TwilioException('Unknown context ' . $name);
+ protected function contextAssessments(): \Twilio\Rest\FlexApi\V1\AssessmentsContext {
+ echo "assessments() is deprecated. Use v1->assessments() instead.";
+ return $this->v1->assessments();
}
/**
- * @return \Twilio\Rest\FlexApi\V1\ChannelList
+ * @deprecated Use v1->channel instead.
*/
- protected function getChannel()
- {
+ protected function getChannel(): \Twilio\Rest\FlexApi\V1\ChannelList {
+ echo "channel is deprecated. Use v1->channel instead.";
return $this->v1->channel;
}
/**
+ * @deprecated Use v1->channel(\$sid) instead.
* @param string $sid The SID that identifies the Flex chat channel resource to
* fetch
- * @return \Twilio\Rest\FlexApi\V1\ChannelContext
*/
- protected function contextChannel($sid)
- {
+ protected function contextChannel(string $sid): \Twilio\Rest\FlexApi\V1\ChannelContext {
+ echo "channel(\$sid) is deprecated. Use v1->channel(\$sid) instead.";
return $this->v1->channel($sid);
}
/**
- * @return \Twilio\Rest\FlexApi\V1\ConfigurationList
+ * @deprecated Use v1->configuration instead.
*/
- protected function getConfiguration()
- {
+ protected function getConfiguration(): \Twilio\Rest\FlexApi\V1\ConfigurationList {
+ echo "configuration is deprecated. Use v1->configuration instead.";
return $this->v1->configuration;
}
/**
- * @return \Twilio\Rest\FlexApi\V1\ConfigurationContext
+ * @deprecated Use v1->configuration() instead.
*/
- protected function contextConfiguration()
- {
+ protected function contextConfiguration(): \Twilio\Rest\FlexApi\V1\ConfigurationContext {
+ echo "configuration() is deprecated. Use v1->configuration() instead.";
return $this->v1->configuration();
}
/**
- * @return \Twilio\Rest\FlexApi\V1\FlexFlowList
+ * @deprecated Use v1->flexFlow instead.
*/
- protected function getFlexFlow()
- {
+ protected function getFlexFlow(): \Twilio\Rest\FlexApi\V1\FlexFlowList {
+ echo "flexFlow is deprecated. Use v1->flexFlow instead.";
return $this->v1->flexFlow;
}
/**
+ * @deprecated Use v1->flexFlow(\$sid) instead.
* @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\FlexApi\V1\FlexFlowContext
*/
- protected function contextFlexFlow($sid)
- {
+ protected function contextFlexFlow(string $sid): \Twilio\Rest\FlexApi\V1\FlexFlowContext {
+ echo "flexFlow(\$sid) is deprecated. Use v1->flexFlow(\$sid) instead.";
return $this->v1->flexFlow($sid);
}
/**
- * @return \Twilio\Rest\FlexApi\V1\WebChannelList
+ * @deprecated Use v1->interaction instead.
+ */
+ protected function getInteraction(): \Twilio\Rest\FlexApi\V1\InteractionList {
+ echo "interaction is deprecated. Use v1->interaction instead.";
+ return $this->v1->interaction;
+ }
+
+ /**
+ * @deprecated Use v1->interaction(\$sid) instead.
+ * @param string $sid The SID that identifies the resource to fetch
+ */
+ protected function contextInteraction(string $sid): \Twilio\Rest\FlexApi\V1\InteractionContext {
+ echo "interaction(\$sid) is deprecated. Use v1->interaction(\$sid) instead.";
+ return $this->v1->interaction($sid);
+ }
+
+ /**
+ * @deprecated Use v1->webChannel instead.
*/
- protected function getWebChannel()
- {
+ protected function getWebChannel(): \Twilio\Rest\FlexApi\V1\WebChannelList {
+ echo "webChannel is deprecated. Use v1->webChannel instead.";
return $this->v1->webChannel;
}
/**
+ * @deprecated Use v1->webChannel(\$sid) instead.
* @param string $sid The SID of the WebChannel resource to fetch
- * @return \Twilio\Rest\FlexApi\V1\WebChannelContext
*/
- protected function contextWebChannel($sid)
- {
+ protected function contextWebChannel(string $sid): \Twilio\Rest\FlexApi\V1\WebChannelContext {
+ echo "webChannel(\$sid) is deprecated. Use v1->webChannel(\$sid) instead.";
return $this->v1->webChannel($sid);
}
/**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
+ * @deprecated Use v2->webChannels instead.
*/
- public function __toString()
- {
- return '[Twilio.FlexApi]';
+ protected function getWebChannels(): \Twilio\Rest\FlexApi\V2\WebChannelsList {
+ echo "webChannels is deprecated. Use v2->webChannels instead.";
+ return $this->v2->webChannels;
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1.php b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1.php
index a670711..8facb46 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1.php
@@ -1,43 +1,114 @@
version = 'v1';
}
- /**
- * @return \Twilio\Rest\FlexApi\V1\ChannelList
- */
- protected function getChannel()
+ protected function getAssessments(): AssessmentsList
+ {
+ if (!$this->_assessments) {
+ $this->_assessments = new AssessmentsList($this);
+ }
+ return $this->_assessments;
+ }
+
+ protected function getChannel(): ChannelList
{
if (!$this->_channel) {
$this->_channel = new ChannelList($this);
@@ -56,10 +132,7 @@ protected function getChannel()
return $this->_channel;
}
- /**
- * @return \Twilio\Rest\FlexApi\V1\ConfigurationList
- */
- protected function getConfiguration()
+ protected function getConfiguration(): ConfigurationList
{
if (!$this->_configuration) {
$this->_configuration = new ConfigurationList($this);
@@ -67,10 +140,7 @@ protected function getConfiguration()
return $this->_configuration;
}
- /**
- * @return \Twilio\Rest\FlexApi\V1\FlexFlowList
- */
- protected function getFlexFlow()
+ protected function getFlexFlow(): FlexFlowList
{
if (!$this->_flexFlow) {
$this->_flexFlow = new FlexFlowList($this);
@@ -78,10 +148,151 @@ protected function getFlexFlow()
return $this->_flexFlow;
}
- /**
- * @return \Twilio\Rest\FlexApi\V1\WebChannelList
- */
- protected function getWebChannel()
+ protected function getInsightsAssessmentsComment(): InsightsAssessmentsCommentList
+ {
+ if (!$this->_insightsAssessmentsComment) {
+ $this->_insightsAssessmentsComment = new InsightsAssessmentsCommentList($this);
+ }
+ return $this->_insightsAssessmentsComment;
+ }
+
+ protected function getInsightsConversations(): InsightsConversationsList
+ {
+ if (!$this->_insightsConversations) {
+ $this->_insightsConversations = new InsightsConversationsList($this);
+ }
+ return $this->_insightsConversations;
+ }
+
+ protected function getInsightsQuestionnaires(): InsightsQuestionnairesList
+ {
+ if (!$this->_insightsQuestionnaires) {
+ $this->_insightsQuestionnaires = new InsightsQuestionnairesList($this);
+ }
+ return $this->_insightsQuestionnaires;
+ }
+
+ protected function getInsightsQuestionnairesCategory(): InsightsQuestionnairesCategoryList
+ {
+ if (!$this->_insightsQuestionnairesCategory) {
+ $this->_insightsQuestionnairesCategory = new InsightsQuestionnairesCategoryList($this);
+ }
+ return $this->_insightsQuestionnairesCategory;
+ }
+
+ protected function getInsightsQuestionnairesQuestion(): InsightsQuestionnairesQuestionList
+ {
+ if (!$this->_insightsQuestionnairesQuestion) {
+ $this->_insightsQuestionnairesQuestion = new InsightsQuestionnairesQuestionList($this);
+ }
+ return $this->_insightsQuestionnairesQuestion;
+ }
+
+ protected function getInsightsSegments(): InsightsSegmentsList
+ {
+ if (!$this->_insightsSegments) {
+ $this->_insightsSegments = new InsightsSegmentsList($this);
+ }
+ return $this->_insightsSegments;
+ }
+
+ protected function getInsightsSession(): InsightsSessionList
+ {
+ if (!$this->_insightsSession) {
+ $this->_insightsSession = new InsightsSessionList($this);
+ }
+ return $this->_insightsSession;
+ }
+
+ protected function getInsightsSettingsAnswerSets(): InsightsSettingsAnswerSetsList
+ {
+ if (!$this->_insightsSettingsAnswerSets) {
+ $this->_insightsSettingsAnswerSets = new InsightsSettingsAnswerSetsList($this);
+ }
+ return $this->_insightsSettingsAnswerSets;
+ }
+
+ protected function getInsightsSettingsComment(): InsightsSettingsCommentList
+ {
+ if (!$this->_insightsSettingsComment) {
+ $this->_insightsSettingsComment = new InsightsSettingsCommentList($this);
+ }
+ return $this->_insightsSettingsComment;
+ }
+
+ protected function getInsightsUserRoles(): InsightsUserRolesList
+ {
+ if (!$this->_insightsUserRoles) {
+ $this->_insightsUserRoles = new InsightsUserRolesList($this);
+ }
+ return $this->_insightsUserRoles;
+ }
+
+ protected function getInteraction(): InteractionList
+ {
+ if (!$this->_interaction) {
+ $this->_interaction = new InteractionList($this);
+ }
+ return $this->_interaction;
+ }
+
+ protected function getPlugins(): PluginList
+ {
+ if (!$this->_plugins) {
+ $this->_plugins = new PluginList($this);
+ }
+ return $this->_plugins;
+ }
+
+ protected function getPluginArchive(): PluginArchiveList
+ {
+ if (!$this->_pluginArchive) {
+ $this->_pluginArchive = new PluginArchiveList($this);
+ }
+ return $this->_pluginArchive;
+ }
+
+ protected function getPluginConfigurations(): PluginConfigurationList
+ {
+ if (!$this->_pluginConfigurations) {
+ $this->_pluginConfigurations = new PluginConfigurationList($this);
+ }
+ return $this->_pluginConfigurations;
+ }
+
+ protected function getPluginConfigurationArchive(): PluginConfigurationArchiveList
+ {
+ if (!$this->_pluginConfigurationArchive) {
+ $this->_pluginConfigurationArchive = new PluginConfigurationArchiveList($this);
+ }
+ return $this->_pluginConfigurationArchive;
+ }
+
+ protected function getPluginReleases(): PluginReleaseList
+ {
+ if (!$this->_pluginReleases) {
+ $this->_pluginReleases = new PluginReleaseList($this);
+ }
+ return $this->_pluginReleases;
+ }
+
+ protected function getPluginVersionArchive(): PluginVersionArchiveList
+ {
+ if (!$this->_pluginVersionArchive) {
+ $this->_pluginVersionArchive = new PluginVersionArchiveList($this);
+ }
+ return $this->_pluginVersionArchive;
+ }
+
+ protected function getProvisioningStatus(): ProvisioningStatusList
+ {
+ if (!$this->_provisioningStatus) {
+ $this->_provisioningStatus = new ProvisioningStatusList($this);
+ }
+ return $this->_provisioningStatus;
+ }
+
+ protected function getWebChannel(): WebChannelList
{
if (!$this->_webChannel) {
$this->_webChannel = new WebChannelList($this);
@@ -96,7 +307,7 @@ protected function getWebChannel()
* @return \Twilio\ListResource The requested resource
* @throws TwilioException For unknown resource
*/
- public function __get($name)
+ public function __get(string $name)
{
$method = 'get' . \ucfirst($name);
if (\method_exists($this, $method)) {
@@ -111,10 +322,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -129,8 +340,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.FlexApi.V1]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/ChannelContext.php b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/ChannelContext.php
index 052ea29..103e3d4 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/ChannelContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/ChannelContext.php
@@ -2,79 +2,96 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Flex
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\FlexApi\V1;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class ChannelContext extends InstanceContext
-{
+ {
/**
* Initialize the ChannelContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The SID that identifies the Flex chat channel resource to
- * fetch
- * @return \Twilio\Rest\FlexApi\V1\ChannelContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid The SID of the Flex chat channel resource to delete.
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Channels/' . \rawurlencode($sid) . '';
+ $this->uri = '/Channels/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a ChannelInstance
+ * Delete the ChannelInstance
*
- * @return ChannelInstance Fetched ChannelInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new ChannelInstance($this->version, $payload, $this->solution['sid']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Deletes the ChannelInstance
+ * Fetch the ChannelInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return ChannelInstance Fetched ChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): ChannelInstance
{
- return $this->version->delete('delete', $this->uri);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
+
+ return new ChannelInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.FlexApi.V1.ChannelContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/ChannelInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/ChannelInstance.php
index fbd98c3..15ffe55 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/ChannelInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/ChannelInstance.php
@@ -2,46 +2,53 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Flex
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\FlexApi\V1;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property string $flexFlowSid
- * @property string $sid
- * @property string $userSid
- * @property string $taskSid
- * @property string $url
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
+ * @property string|null $accountSid
+ * @property string|null $flexFlowSid
+ * @property string|null $sid
+ * @property string|null $userSid
+ * @property string|null $taskSid
+ * @property string|null $url
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
*/
class ChannelInstance extends InstanceResource
{
/**
* Initialize the ChannelInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The SID that identifies the Flex chat channel resource to
- * fetch
- * @return \Twilio\Rest\FlexApi\V1\ChannelInstance
+ * @param string $sid The SID of the Flex chat channel resource to delete.
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'flexFlowSid' => Values::array_get($payload, 'flex_flow_sid'),
'sid' => Values::array_get($payload, 'sid'),
@@ -50,47 +57,51 @@ public function __construct(Version $version, array $payload, $sid = null)
'url' => Values::array_get($payload, 'url'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\FlexApi\V1\ChannelContext Context for this
- * ChannelInstance
+ * @return ChannelContext Context for this ChannelInstance
*/
- protected function proxy()
+ protected function proxy(): ChannelContext
{
if (!$this->context) {
- $this->context = new ChannelContext($this->version, $this->solution['sid']);
+ $this->context = new ChannelContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a ChannelInstance
+ * Delete the ChannelInstance
*
- * @return ChannelInstance Fetched ChannelInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the ChannelInstance
+ * Fetch the ChannelInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return ChannelInstance Fetched ChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): ChannelInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -100,7 +111,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -119,12 +130,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.FlexApi.V1.ChannelInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/ChannelList.php b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/ChannelList.php
index 494cda9..e703a25 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/ChannelList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/ChannelList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Flex
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\FlexApi\V1;
@@ -12,55 +19,80 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class ChannelList extends ListResource
-{
+ {
/**
* Construct the ChannelList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\FlexApi\V1\ChannelList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/Channels';
}
/**
- * Streams ChannelInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the ChannelInstance
*
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @param string $flexFlowSid The SID of the Flex Flow.
+ * @param string $identity The `identity` value that uniquely identifies the new resource's chat User.
+ * @param string $chatUserFriendlyName The chat participant's friendly name.
+ * @param string $chatFriendlyName The chat channel's friendly name.
+ * @param array|Options $options Optional Arguments
+ * @return ChannelInstance Created ChannelInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($limit = null, $pageSize = null)
+ public function create(string $flexFlowSid, string $identity, string $chatUserFriendlyName, string $chatFriendlyName, array $options = []): ChannelInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'FlexFlowSid' =>
+ $flexFlowSid,
+ 'Identity' =>
+ $identity,
+ 'ChatUserFriendlyName' =>
+ $chatUserFriendlyName,
+ 'ChatFriendlyName' =>
+ $chatFriendlyName,
+ 'Target' =>
+ $options['target'],
+ 'ChatUniqueName' =>
+ $options['chatUniqueName'],
+ 'PreEngagementData' =>
+ $options['preEngagementData'],
+ 'TaskSid' =>
+ $options['taskSid'],
+ 'TaskAttributes' =>
+ $options['taskAttributes'],
+ 'LongLived' =>
+ Serialize::booleanToString($options['longLived']),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new ChannelInstance(
+ $this->version,
+ $payload
+ );
}
+
/**
* Reads ChannelInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -76,11 +108,38 @@ public function stream($limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return ChannelInstance[] Array of results
*/
- public function read($limit = null, $pageSize = null)
+ public function read(int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($limit, $pageSize), false);
}
+ /**
+ * Streams ChannelInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of ChannelInstance records from the API.
* Request is executed immediately
@@ -88,21 +147,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of ChannelInstance
+ * @return ChannelPage Page of ChannelInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): ChannelPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new ChannelPage($this->version, $response, $this->solution);
}
@@ -112,9 +172,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of ChannelInstance
+ * @return ChannelPage Page of ChannelInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): ChannelPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -124,55 +184,21 @@ public function getPage($targetUrl)
return new ChannelPage($this->version, $response, $this->solution);
}
- /**
- * Create a new ChannelInstance
- *
- * @param string $flexFlowSid The SID of the FlexFlow
- * @param string $identity The identity value that identifies the new
- * resource's chat User
- * @param string $chatUserFriendlyName The chat participant's friendly name
- * @param string $chatFriendlyName The chat channel's friendly name
- * @param array|Options $options Optional Arguments
- * @return ChannelInstance Newly created ChannelInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($flexFlowSid, $identity, $chatUserFriendlyName, $chatFriendlyName, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'FlexFlowSid' => $flexFlowSid,
- 'Identity' => $identity,
- 'ChatUserFriendlyName' => $chatUserFriendlyName,
- 'ChatFriendlyName' => $chatFriendlyName,
- 'Target' => $options['target'],
- 'ChatUniqueName' => $options['chatUniqueName'],
- 'PreEngagementData' => $options['preEngagementData'],
- 'TaskSid' => $options['taskSid'],
- 'TaskAttributes' => $options['taskAttributes'],
- 'LongLived' => Serialize::booleanToString($options['longLived']),
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new ChannelInstance($this->version, $payload);
- }
/**
* Constructs a ChannelContext
*
- * @param string $sid The SID that identifies the Flex chat channel resource to
- * fetch
- * @return \Twilio\Rest\FlexApi\V1\ChannelContext
+ * @param string $sid The SID of the Flex chat channel resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): ChannelContext
{
- return new ChannelContext($this->version, $sid);
+ return new ChannelContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -180,8 +206,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.FlexApi.V1.ChannelList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/ChannelOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/ChannelOptions.php
index d54ab15..dfb94e3 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/ChannelOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/ChannelOptions.php
@@ -1,10 +1,16 @@
options['target'] = $target;
$this->options['chatUniqueName'] = $chatUniqueName;
$this->options['preEngagementData'] = $preEngagementData;
@@ -54,10 +86,10 @@ public function __construct($target = Values::NONE, $chatUniqueName = Values::NO
/**
* The Target Contact Identity, for example the phone number of an SMS.
*
- * @param string $target The Target Contact Identity
+ * @param string $target The Target Contact Identity, for example the phone number of an SMS.
* @return $this Fluent Builder
*/
- public function setTarget($target)
+ public function setTarget(string $target): self
{
$this->options['target'] = $target;
return $this;
@@ -66,10 +98,10 @@ public function setTarget($target)
/**
* The chat channel's unique name.
*
- * @param string $chatUniqueName The chat channel's unique name
+ * @param string $chatUniqueName The chat channel's unique name.
* @return $this Fluent Builder
*/
- public function setChatUniqueName($chatUniqueName)
+ public function setChatUniqueName(string $chatUniqueName): self
{
$this->options['chatUniqueName'] = $chatUniqueName;
return $this;
@@ -78,35 +110,34 @@ public function setChatUniqueName($chatUniqueName)
/**
* The pre-engagement data.
*
- * @param string $preEngagementData The pre-engagement data
+ * @param string $preEngagementData The pre-engagement data.
* @return $this Fluent Builder
*/
- public function setPreEngagementData($preEngagementData)
+ public function setPreEngagementData(string $preEngagementData): self
{
$this->options['preEngagementData'] = $preEngagementData;
return $this;
}
/**
- * The SID of the TaskRouter task.
+ * The SID of the TaskRouter Task. Only valid when integration type is `task`. `null` for integration types `studio` & `external`
*
- * @param string $taskSid The SID of the TaskRouter task
+ * @param string $taskSid The SID of the TaskRouter Task. Only valid when integration type is `task`. `null` for integration types `studio` & `external`
* @return $this Fluent Builder
*/
- public function setTaskSid($taskSid)
+ public function setTaskSid(string $taskSid): self
{
$this->options['taskSid'] = $taskSid;
return $this;
}
/**
- * The task attributes to be added for the TaskRouter Task.
+ * The Task attributes to be added for the TaskRouter Task.
*
- * @param string $taskAttributes The task attributes to be added for the
- * TaskRouter Task
+ * @param string $taskAttributes The Task attributes to be added for the TaskRouter Task.
* @return $this Fluent Builder
*/
- public function setTaskAttributes($taskAttributes)
+ public function setTaskAttributes(string $taskAttributes): self
{
$this->options['taskAttributes'] = $taskAttributes;
return $this;
@@ -115,10 +146,10 @@ public function setTaskAttributes($taskAttributes)
/**
* Whether to create the channel as long-lived.
*
- * @param bool $longLived Whether to create the channel as long-lived
+ * @param bool $longLived Whether to create the channel as long-lived.
* @return $this Fluent Builder
*/
- public function setLongLived($longLived)
+ public function setLongLived(bool $longLived): self
{
$this->options['longLived'] = $longLived;
return $this;
@@ -129,14 +160,13 @@ public function setLongLived($longLived)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.FlexApi.V1.CreateChannelOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.FlexApi.V1.CreateChannelOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
+
+
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/ChannelPage.php b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/ChannelPage.php
index 0ce4c34..5397292 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/ChannelPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/ChannelPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return ChannelInstance \Twilio\Rest\FlexApi\V1\ChannelInstance
+ */
+ public function buildInstance(array $payload): ChannelInstance
{
return new ChannelInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.FlexApi.V1.ChannelPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/ConfigurationContext.php b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/ConfigurationContext.php
index 7f3065f..71f7de0 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/ConfigurationContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/ConfigurationContext.php
@@ -2,110 +2,106 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Flex
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\FlexApi\V1;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class ConfigurationContext extends InstanceContext
-{
+ {
/**
* Initialize the ConfigurationContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @return \Twilio\Rest\FlexApi\V1\ConfigurationContext
+ * @param Version $version Version that contains the resource
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/Configuration';
}
/**
- * Fetch a ConfigurationInstance
+ * Fetch the ConfigurationInstance
*
* @param array|Options $options Optional Arguments
* @return ConfigurationInstance Fetched ConfigurationInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch($options = array())
+ public function fetch(array $options = []): ConfigurationInstance
{
+
$options = new Values($options);
- $params = Values::of(array('UiVersion' => $options['uiVersion'],));
+ $params = Values::of([
+ 'UiVersion' =>
+ $options['uiVersion'],
+ ]);
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, $params, [], $headers);
- return new ConfigurationInstance($this->version, $payload);
- }
-
- /**
- * Create a new ConfigurationInstance
- *
- * @return ConfigurationInstance Newly created ConfigurationInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create()
- {
- $data = Values::of(array());
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ return new ConfigurationInstance(
+ $this->version,
+ $payload
);
-
- return new ConfigurationInstance($this->version, $payload);
}
+
/**
* Update the ConfigurationInstance
*
* @return ConfigurationInstance Updated ConfigurationInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update()
+ public function update(): ConfigurationInstance
{
- $data = Values::of(array());
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $data = $body->toArray();
+ $headers['Content-Type'] = 'application/json';
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
- return new ConfigurationInstance($this->version, $payload);
+ return new ConfigurationInstance(
+ $this->version,
+ $payload
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.FlexApi.V1.ConfigurationContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/ConfigurationInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/ConfigurationInstance.php
index a4e4578..27b6747 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/ConfigurationInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/ConfigurationInstance.php
@@ -2,71 +2,94 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Flex
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\FlexApi\V1;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property array $attributes
+ * @property string|null $accountSid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property array|null $attributes
* @property string $status
- * @property string $taskrouterWorkspaceSid
- * @property string $taskrouterTargetWorkflowSid
- * @property string $taskrouterTargetTaskqueueSid
- * @property array $taskrouterTaskqueues
- * @property array $taskrouterSkills
- * @property array $taskrouterWorkerChannels
- * @property array $taskrouterWorkerAttributes
- * @property string $taskrouterOfflineActivitySid
- * @property string $runtimeDomain
- * @property string $messagingServiceInstanceSid
- * @property string $chatServiceInstanceSid
- * @property string $uiLanguage
- * @property array $uiAttributes
- * @property string $uiVersion
- * @property string $serviceVersion
- * @property bool $callRecordingEnabled
- * @property string $callRecordingWebhookUrl
- * @property bool $crmEnabled
- * @property string $crmType
- * @property string $crmCallbackUrl
- * @property string $crmFallbackUrl
- * @property array $crmAttributes
- * @property array $publicAttributes
- * @property bool $pluginServiceEnabled
- * @property array $pluginServiceAttributes
- * @property array $integrations
- * @property array $outboundCallFlows
- * @property string $serverlessServiceSids
- * @property string $url
+ * @property string|null $taskrouterWorkspaceSid
+ * @property string|null $taskrouterTargetWorkflowSid
+ * @property string|null $taskrouterTargetTaskqueueSid
+ * @property array[]|null $taskrouterTaskqueues
+ * @property array[]|null $taskrouterSkills
+ * @property array|null $taskrouterWorkerChannels
+ * @property array|null $taskrouterWorkerAttributes
+ * @property string|null $taskrouterOfflineActivitySid
+ * @property string|null $runtimeDomain
+ * @property string|null $messagingServiceInstanceSid
+ * @property string|null $chatServiceInstanceSid
+ * @property string|null $flexServiceInstanceSid
+ * @property string|null $flexInstanceSid
+ * @property string|null $uiLanguage
+ * @property array|null $uiAttributes
+ * @property array|null $uiDependencies
+ * @property string|null $uiVersion
+ * @property string|null $serviceVersion
+ * @property bool|null $callRecordingEnabled
+ * @property string|null $callRecordingWebhookUrl
+ * @property bool|null $crmEnabled
+ * @property string|null $crmType
+ * @property string|null $crmCallbackUrl
+ * @property string|null $crmFallbackUrl
+ * @property array|null $crmAttributes
+ * @property array|null $publicAttributes
+ * @property bool|null $pluginServiceEnabled
+ * @property array|null $pluginServiceAttributes
+ * @property array[]|null $integrations
+ * @property array|null $outboundCallFlows
+ * @property string[]|null $serverlessServiceSids
+ * @property array|null $queueStatsConfiguration
+ * @property array|null $notifications
+ * @property array|null $markdown
+ * @property string|null $url
+ * @property array|null $flexInsightsHr
+ * @property bool|null $flexInsightsDrilldown
+ * @property string|null $flexUrl
+ * @property array[]|null $channelConfigs
+ * @property array|null $debuggerIntegration
+ * @property array|null $flexUiStatusReport
+ * @property array|null $agentConvEndMethods
+ * @property array|null $citrixVoiceVdi
+ * @property array|null $offlineConfig
*/
class ConfigurationInstance extends InstanceResource
{
/**
* Initialize the ConfigurationInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @return \Twilio\Rest\FlexApi\V1\ConfigurationInstance
*/
public function __construct(Version $version, array $payload)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
@@ -83,8 +106,11 @@ public function __construct(Version $version, array $payload)
'runtimeDomain' => Values::array_get($payload, 'runtime_domain'),
'messagingServiceInstanceSid' => Values::array_get($payload, 'messaging_service_instance_sid'),
'chatServiceInstanceSid' => Values::array_get($payload, 'chat_service_instance_sid'),
+ 'flexServiceInstanceSid' => Values::array_get($payload, 'flex_service_instance_sid'),
+ 'flexInstanceSid' => Values::array_get($payload, 'flex_instance_sid'),
'uiLanguage' => Values::array_get($payload, 'ui_language'),
'uiAttributes' => Values::array_get($payload, 'ui_attributes'),
+ 'uiDependencies' => Values::array_get($payload, 'ui_dependencies'),
'uiVersion' => Values::array_get($payload, 'ui_version'),
'serviceVersion' => Values::array_get($payload, 'service_version'),
'callRecordingEnabled' => Values::array_get($payload, 'call_recording_enabled'),
@@ -100,49 +126,52 @@ public function __construct(Version $version, array $payload)
'integrations' => Values::array_get($payload, 'integrations'),
'outboundCallFlows' => Values::array_get($payload, 'outbound_call_flows'),
'serverlessServiceSids' => Values::array_get($payload, 'serverless_service_sids'),
+ 'queueStatsConfiguration' => Values::array_get($payload, 'queue_stats_configuration'),
+ 'notifications' => Values::array_get($payload, 'notifications'),
+ 'markdown' => Values::array_get($payload, 'markdown'),
'url' => Values::array_get($payload, 'url'),
- );
+ 'flexInsightsHr' => Values::array_get($payload, 'flex_insights_hr'),
+ 'flexInsightsDrilldown' => Values::array_get($payload, 'flex_insights_drilldown'),
+ 'flexUrl' => Values::array_get($payload, 'flex_url'),
+ 'channelConfigs' => Values::array_get($payload, 'channel_configs'),
+ 'debuggerIntegration' => Values::array_get($payload, 'debugger_integration'),
+ 'flexUiStatusReport' => Values::array_get($payload, 'flex_ui_status_report'),
+ 'agentConvEndMethods' => Values::array_get($payload, 'agent_conv_end_methods'),
+ 'citrixVoiceVdi' => Values::array_get($payload, 'citrix_voice_vdi'),
+ 'offlineConfig' => Values::array_get($payload, 'offline_config'),
+ ];
- $this->solution = array();
+ $this->solution = [];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\FlexApi\V1\ConfigurationContext Context for this
- * ConfigurationInstance
+ * @return ConfigurationContext Context for this ConfigurationInstance
*/
- protected function proxy()
+ protected function proxy(): ConfigurationContext
{
if (!$this->context) {
- $this->context = new ConfigurationContext($this->version);
+ $this->context = new ConfigurationContext(
+ $this->version
+ );
}
return $this->context;
}
/**
- * Fetch a ConfigurationInstance
+ * Fetch the ConfigurationInstance
*
* @param array|Options $options Optional Arguments
* @return ConfigurationInstance Fetched ConfigurationInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch($options = array())
+ public function fetch(array $options = []): ConfigurationInstance
{
- return $this->proxy()->fetch($options);
- }
- /**
- * Create a new ConfigurationInstance
- *
- * @return ConfigurationInstance Newly created ConfigurationInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create()
- {
- return $this->proxy()->create();
+ return $this->proxy()->fetch($options);
}
/**
@@ -151,8 +180,9 @@ public function create()
* @return ConfigurationInstance Updated ConfigurationInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update()
+ public function update(): ConfigurationInstance
{
+
return $this->proxy()->update();
}
@@ -163,7 +193,7 @@ public function update()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -182,12 +212,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.FlexApi.V1.ConfigurationInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/ConfigurationList.php b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/ConfigurationList.php
index e3478ad..a7e0452 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/ConfigurationList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/ConfigurationList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Flex
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\FlexApi\V1;
@@ -12,30 +19,34 @@
use Twilio\ListResource;
use Twilio\Version;
+
class ConfigurationList extends ListResource
-{
+ {
/**
* Construct the ConfigurationList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\FlexApi\V1\ConfigurationList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
}
/**
* Constructs a ConfigurationContext
- *
- * @return \Twilio\Rest\FlexApi\V1\ConfigurationContext
*/
- public function getContext()
+ public function getContext(
+
+ ): ConfigurationContext
{
- return new ConfigurationContext($this->version);
+ return new ConfigurationContext(
+ $this->version
+ );
}
/**
@@ -43,8 +54,8 @@ public function getContext()
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.FlexApi.V1.ConfigurationList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/ConfigurationOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/ConfigurationOptions.php
index 2c73055..48530ff 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/ConfigurationOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/ConfigurationOptions.php
@@ -1,10 +1,16 @@
options['uiVersion'] = $uiVersion;
}
/**
* The Pinned UI version of the Configuration resource to fetch.
*
- * @param string $uiVersion The Pinned UI version of the Configuration resource
- * to fetch
+ * @param string $uiVersion The Pinned UI version of the Configuration resource to fetch.
* @return $this Fluent Builder
*/
- public function setUiVersion($uiVersion)
+ public function setUiVersion(string $uiVersion): self
{
$this->options['uiVersion'] = $uiVersion;
return $this;
@@ -54,14 +68,11 @@ public function setUiVersion($uiVersion)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.FlexApi.V1.FetchConfigurationOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.FlexApi.V1.FetchConfigurationOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/ConfigurationPage.php b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/ConfigurationPage.php
index 07b684f..eebbdb1 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/ConfigurationPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/ConfigurationPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return ConfigurationInstance \Twilio\Rest\FlexApi\V1\ConfigurationInstance
+ */
+ public function buildInstance(array $payload): ConfigurationInstance
{
return new ConfigurationInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.FlexApi.V1.ConfigurationPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/FlexFlowContext.php b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/FlexFlowContext.php
index 1db35d0..3ab83cc 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/FlexFlowContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/FlexFlowContext.php
@@ -2,121 +2,158 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Flex
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\FlexApi\V1;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
class FlexFlowContext extends InstanceContext
-{
+ {
/**
* Initialize the FlexFlowContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\FlexApi\V1\FlexFlowContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid The SID of the Flex Flow resource to delete.
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/FlexFlows/' . \rawurlencode($sid) . '';
+ $this->uri = '/FlexFlows/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a FlexFlowInstance
+ * Delete the FlexFlowInstance
*
- * @return FlexFlowInstance Fetched FlexFlowInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
- return new FlexFlowInstance($this->version, $payload, $this->solution['sid']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Update the FlexFlowInstance
+ * Fetch the FlexFlowInstance
*
- * @param array|Options $options Optional Arguments
- * @return FlexFlowInstance Updated FlexFlowInstance
+ * @return FlexFlowInstance Fetched FlexFlowInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): FlexFlowInstance
{
- $options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'ChatServiceSid' => $options['chatServiceSid'],
- 'ChannelType' => $options['channelType'],
- 'ContactIdentity' => $options['contactIdentity'],
- 'Enabled' => Serialize::booleanToString($options['enabled']),
- 'IntegrationType' => $options['integrationType'],
- 'Integration.FlowSid' => $options['integrationFlowSid'],
- 'Integration.Url' => $options['integrationUrl'],
- 'Integration.WorkspaceSid' => $options['integrationWorkspaceSid'],
- 'Integration.WorkflowSid' => $options['integrationWorkflowSid'],
- 'Integration.Channel' => $options['integrationChannel'],
- 'Integration.Timeout' => $options['integrationTimeout'],
- 'Integration.Priority' => $options['integrationPriority'],
- 'Integration.CreationOnMessage' => Serialize::booleanToString($options['integrationCreationOnMessage']),
- 'LongLived' => Serialize::booleanToString($options['longLived']),
- 'JanitorEnabled' => Serialize::booleanToString($options['janitorEnabled']),
- 'Integration.RetryCount' => $options['integrationRetryCount'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
- return new FlexFlowInstance($this->version, $payload, $this->solution['sid']);
+ return new FlexFlowInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
- * Deletes the FlexFlowInstance
+ * Update the FlexFlowInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return FlexFlowInstance Updated FlexFlowInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): FlexFlowInstance
{
- return $this->version->delete('delete', $this->uri);
+
+ $options = new Values($options);
+
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'ChatServiceSid' =>
+ $options['chatServiceSid'],
+ 'ChannelType' =>
+ $options['channelType'],
+ 'ContactIdentity' =>
+ $options['contactIdentity'],
+ 'Enabled' =>
+ Serialize::booleanToString($options['enabled']),
+ 'IntegrationType' =>
+ $options['integrationType'],
+ 'Integration.FlowSid' =>
+ $options['integrationFlowSid'],
+ 'Integration.Url' =>
+ $options['integrationUrl'],
+ 'Integration.WorkspaceSid' =>
+ $options['integrationWorkspaceSid'],
+ 'Integration.WorkflowSid' =>
+ $options['integrationWorkflowSid'],
+ 'Integration.Channel' =>
+ $options['integrationChannel'],
+ 'Integration.Timeout' =>
+ $options['integrationTimeout'],
+ 'Integration.Priority' =>
+ $options['integrationPriority'],
+ 'Integration.CreationOnMessage' =>
+ Serialize::booleanToString($options['integrationCreationOnMessage']),
+ 'LongLived' =>
+ Serialize::booleanToString($options['longLived']),
+ 'JanitorEnabled' =>
+ Serialize::booleanToString($options['janitorEnabled']),
+ 'Integration.RetryCount' =>
+ $options['integrationRetryCount'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
+
+ return new FlexFlowInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.FlexApi.V1.FlexFlowContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/FlexFlowInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/FlexFlowInstance.php
index 3113dda..d068fa4 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/FlexFlowInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/FlexFlowInstance.php
@@ -2,52 +2,60 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Flex
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\FlexApi\V1;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $sid
- * @property string $friendlyName
- * @property string $chatServiceSid
+ * @property string|null $accountSid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $sid
+ * @property string|null $friendlyName
+ * @property string|null $chatServiceSid
* @property string $channelType
- * @property string $contactIdentity
- * @property bool $enabled
+ * @property string|null $contactIdentity
+ * @property bool|null $enabled
* @property string $integrationType
- * @property array $integration
- * @property bool $longLived
- * @property bool $janitorEnabled
- * @property string $url
+ * @property array|null $integration
+ * @property bool|null $longLived
+ * @property bool|null $janitorEnabled
+ * @property string|null $url
*/
class FlexFlowInstance extends InstanceResource
{
/**
* Initialize the FlexFlowInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\FlexApi\V1\FlexFlowInstance
+ * @param string $sid The SID of the Flex Flow resource to delete.
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
@@ -62,59 +70,64 @@ public function __construct(Version $version, array $payload, $sid = null)
'longLived' => Values::array_get($payload, 'long_lived'),
'janitorEnabled' => Values::array_get($payload, 'janitor_enabled'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\FlexApi\V1\FlexFlowContext Context for this
- * FlexFlowInstance
+ * @return FlexFlowContext Context for this FlexFlowInstance
*/
- protected function proxy()
+ protected function proxy(): FlexFlowContext
{
if (!$this->context) {
- $this->context = new FlexFlowContext($this->version, $this->solution['sid']);
+ $this->context = new FlexFlowContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a FlexFlowInstance
+ * Delete the FlexFlowInstance
*
- * @return FlexFlowInstance Fetched FlexFlowInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Update the FlexFlowInstance
+ * Fetch the FlexFlowInstance
*
- * @param array|Options $options Optional Arguments
- * @return FlexFlowInstance Updated FlexFlowInstance
+ * @return FlexFlowInstance Fetched FlexFlowInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): FlexFlowInstance
{
- return $this->proxy()->update($options);
+
+ return $this->proxy()->fetch();
}
/**
- * Deletes the FlexFlowInstance
+ * Update the FlexFlowInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return FlexFlowInstance Updated FlexFlowInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): FlexFlowInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->update($options);
}
/**
@@ -124,7 +137,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -143,12 +156,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.FlexApi.V1.FlexFlowInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/FlexFlowList.php b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/FlexFlowList.php
index b4d8dfe..c35e0c8 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/FlexFlowList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/FlexFlowList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Flex
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\FlexApi\V1;
@@ -12,56 +19,93 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class FlexFlowList extends ListResource
-{
+ {
/**
* Construct the FlexFlowList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\FlexApi\V1\FlexFlowList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/FlexFlows';
}
/**
- * Streams FlexFlowInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the FlexFlowInstance
*
+ * @param string $friendlyName A descriptive string that you create to describe the Flex Flow resource.
+ * @param string $chatServiceSid The SID of the chat service.
+ * @param string $channelType
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return FlexFlowInstance Created FlexFlowInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function create(string $friendlyName, string $chatServiceSid, string $channelType, array $options = []): FlexFlowInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($options, $limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'FriendlyName' =>
+ $friendlyName,
+ 'ChatServiceSid' =>
+ $chatServiceSid,
+ 'ChannelType' =>
+ $channelType,
+ 'ContactIdentity' =>
+ $options['contactIdentity'],
+ 'Enabled' =>
+ Serialize::booleanToString($options['enabled']),
+ 'IntegrationType' =>
+ $options['integrationType'],
+ 'Integration.FlowSid' =>
+ $options['integrationFlowSid'],
+ 'Integration.Url' =>
+ $options['integrationUrl'],
+ 'Integration.WorkspaceSid' =>
+ $options['integrationWorkspaceSid'],
+ 'Integration.WorkflowSid' =>
+ $options['integrationWorkflowSid'],
+ 'Integration.Channel' =>
+ $options['integrationChannel'],
+ 'Integration.Timeout' =>
+ $options['integrationTimeout'],
+ 'Integration.Priority' =>
+ $options['integrationPriority'],
+ 'Integration.CreationOnMessage' =>
+ Serialize::booleanToString($options['integrationCreationOnMessage']),
+ 'LongLived' =>
+ Serialize::booleanToString($options['longLived']),
+ 'JanitorEnabled' =>
+ Serialize::booleanToString($options['janitorEnabled']),
+ 'Integration.RetryCount' =>
+ $options['integrationRetryCount'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new FlexFlowInstance(
+ $this->version,
+ $payload
+ );
}
+
/**
* Reads FlexFlowInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -78,36 +122,66 @@ public function stream($options = array(), $limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return FlexFlowInstance[] Array of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
+ /**
+ * Streams FlexFlowInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of FlexFlowInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of FlexFlowInstance
+ * @return FlexFlowPage Page of FlexFlowInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): FlexFlowPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
+
+ $params = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new FlexFlowPage($this->version, $response, $this->solution);
}
@@ -117,9 +191,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of FlexFlowInstance
+ * @return FlexFlowPage Page of FlexFlowInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): FlexFlowPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -129,59 +203,21 @@ public function getPage($targetUrl)
return new FlexFlowPage($this->version, $response, $this->solution);
}
- /**
- * Create a new FlexFlowInstance
- *
- * @param string $friendlyName A string to describe the resource
- * @param string $chatServiceSid The SID of the chat service
- * @param string $channelType The channel type
- * @param array|Options $options Optional Arguments
- * @return FlexFlowInstance Newly created FlexFlowInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($friendlyName, $chatServiceSid, $channelType, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'FriendlyName' => $friendlyName,
- 'ChatServiceSid' => $chatServiceSid,
- 'ChannelType' => $channelType,
- 'ContactIdentity' => $options['contactIdentity'],
- 'Enabled' => Serialize::booleanToString($options['enabled']),
- 'IntegrationType' => $options['integrationType'],
- 'Integration.FlowSid' => $options['integrationFlowSid'],
- 'Integration.Url' => $options['integrationUrl'],
- 'Integration.WorkspaceSid' => $options['integrationWorkspaceSid'],
- 'Integration.WorkflowSid' => $options['integrationWorkflowSid'],
- 'Integration.Channel' => $options['integrationChannel'],
- 'Integration.Timeout' => $options['integrationTimeout'],
- 'Integration.Priority' => $options['integrationPriority'],
- 'Integration.CreationOnMessage' => Serialize::booleanToString($options['integrationCreationOnMessage']),
- 'LongLived' => Serialize::booleanToString($options['longLived']),
- 'JanitorEnabled' => Serialize::booleanToString($options['janitorEnabled']),
- 'Integration.RetryCount' => $options['integrationRetryCount'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new FlexFlowInstance($this->version, $payload);
- }
/**
* Constructs a FlexFlowContext
*
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\FlexApi\V1\FlexFlowContext
+ * @param string $sid The SID of the Flex Flow resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): FlexFlowContext
{
- return new FlexFlowContext($this->version, $sid);
+ return new FlexFlowContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -189,8 +225,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.FlexApi.V1.FlexFlowList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/FlexFlowOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/FlexFlowOptions.php
index 3e3ba05..8c58c31 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/FlexFlowOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/FlexFlowOptions.php
@@ -1,10 +1,16 @@
options['friendlyName'] = $friendlyName;
- }
-
- /**
- * The `friendly_name` of the FlexFlow resources to read.
- *
- * @param string $friendlyName The `friendly_name` of the FlexFlow resources to
- * read
- * @return $this Fluent Builder
+ public static function read(
+
+ string $friendlyName = Values::NONE
+
+ ): ReadFlexFlowOptions
+ {
+ return new ReadFlexFlowOptions(
+ $friendlyName
+ );
+ }
+
+ /**
+ * @param string $friendlyName A descriptive string that you create to describe the Flex Flow resource.
+ * @param string $chatServiceSid The SID of the chat service.
+ * @param string $channelType
+ * @param string $contactIdentity The channel contact's Identity.
+ * @param bool $enabled Whether the new Flex Flow is enabled.
+ * @param string $integrationType
+ * @param string $integrationFlowSid The SID of the Studio Flow. Required when `integrationType` is `studio`.
+ * @param string $integrationUrl The URL of the external webhook. Required when `integrationType` is `external`.
+ * @param string $integrationWorkspaceSid The Workspace SID for a new Task. Required when `integrationType` is `task`.
+ * @param string $integrationWorkflowSid The Workflow SID for a new Task. Required when `integrationType` is `task`.
+ * @param string $integrationChannel The Task Channel SID (TCXXXX) or unique name (e.g., `sms`) to use for the Task that will be created. Applicable and required when `integrationType` is `task`. The default value is `default`.
+ * @param int $integrationTimeout The Task timeout in seconds for a new Task. Default is 86,400 seconds (24 hours). Optional when `integrationType` is `task`, not applicable otherwise.
+ * @param int $integrationPriority The Task priority of a new Task. The default priority is 0. Optional when `integrationType` is `task`, not applicable otherwise.
+ * @param bool $integrationCreationOnMessage In the context of outbound messaging, defines whether to create a Task immediately (and therefore reserve the conversation to current agent), or delay Task creation until the customer sends the first response. Set to false to create immediately, true to delay Task creation. This setting is only applicable for outbound messaging.
+ * @param bool $longLived When enabled, Flex will keep the chat channel active so that it may be used for subsequent interactions with a contact identity. Defaults to `false`.
+ * @param bool $janitorEnabled When enabled, the Messaging Channel Janitor will remove active Proxy sessions if the associated Task is deleted outside of the Flex UI. Defaults to `false`.
+ * @param int $integrationRetryCount The number of times to retry the Studio Flow or webhook in case of failure. Takes integer values from 0 to 3 with the default being 3. Optional when `integrationType` is `studio` or `external`, not applicable otherwise.
+ * @return UpdateFlexFlowOptions Options builder
*/
- public function setFriendlyName($friendlyName)
- {
- $this->options['friendlyName'] = $friendlyName;
- return $this;
+ public static function update(
+
+ string $friendlyName = Values::NONE,
+ string $chatServiceSid = Values::NONE,
+ string $channelType = Values::NONE,
+ string $contactIdentity = Values::NONE,
+ bool $enabled = Values::BOOL_NONE,
+ string $integrationType = Values::NONE,
+ string $integrationFlowSid = Values::NONE,
+ string $integrationUrl = Values::NONE,
+ string $integrationWorkspaceSid = Values::NONE,
+ string $integrationWorkflowSid = Values::NONE,
+ string $integrationChannel = Values::NONE,
+ int $integrationTimeout = Values::INT_NONE,
+ int $integrationPriority = Values::INT_NONE,
+ bool $integrationCreationOnMessage = Values::BOOL_NONE,
+ bool $longLived = Values::BOOL_NONE,
+ bool $janitorEnabled = Values::BOOL_NONE,
+ int $integrationRetryCount = Values::INT_NONE
+
+ ): UpdateFlexFlowOptions
+ {
+ return new UpdateFlexFlowOptions(
+ $friendlyName,
+ $chatServiceSid,
+ $channelType,
+ $contactIdentity,
+ $enabled,
+ $integrationType,
+ $integrationFlowSid,
+ $integrationUrl,
+ $integrationWorkspaceSid,
+ $integrationWorkflowSid,
+ $integrationChannel,
+ $integrationTimeout,
+ $integrationPriority,
+ $integrationCreationOnMessage,
+ $longLived,
+ $janitorEnabled,
+ $integrationRetryCount
+ );
}
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.FlexApi.V1.ReadFlexFlowOptions ' . \implode(' ', $options) . ']';
- }
}
class CreateFlexFlowOptions extends Options
-{
- /**
- * @param string $contactIdentity The channel contact's Identity
- * @param bool $enabled Whether the new FlexFlow is enabled
- * @param string $integrationType The integration type
- * @param string $integrationFlowSid The SID of the Flow
- * @param string $integrationUrl The External Webhook URL
- * @param string $integrationWorkspaceSid The Workspace SID for a new task
- * @param string $integrationWorkflowSid The Workflow SID for a new task
- * @param string $integrationChannel The task channel for a new task
- * @param int $integrationTimeout The task timeout in seconds for a new task
- * @param int $integrationPriority The task priority of a new task
- * @param bool $integrationCreationOnMessage Whether to create a task when the
- * first message arrives
- * @param bool $longLived Whether new channels are long-lived
- * @param bool $janitorEnabled Boolean flag for enabling or disabling the
- * Janitor
- * @param int $integrationRetryCount The number of times to retry the webhook
- * if the first attempt fails
- */
- public function __construct($contactIdentity = Values::NONE, $enabled = Values::NONE, $integrationType = Values::NONE, $integrationFlowSid = Values::NONE, $integrationUrl = Values::NONE, $integrationWorkspaceSid = Values::NONE, $integrationWorkflowSid = Values::NONE, $integrationChannel = Values::NONE, $integrationTimeout = Values::NONE, $integrationPriority = Values::NONE, $integrationCreationOnMessage = Values::NONE, $longLived = Values::NONE, $janitorEnabled = Values::NONE, $integrationRetryCount = Values::NONE)
{
+ /**
+ * @param string $contactIdentity The channel contact's Identity.
+ * @param bool $enabled Whether the new Flex Flow is enabled.
+ * @param string $integrationType
+ * @param string $integrationFlowSid The SID of the Studio Flow. Required when `integrationType` is `studio`.
+ * @param string $integrationUrl The URL of the external webhook. Required when `integrationType` is `external`.
+ * @param string $integrationWorkspaceSid The Workspace SID for a new Task. Required when `integrationType` is `task`.
+ * @param string $integrationWorkflowSid The Workflow SID for a new Task. Required when `integrationType` is `task`.
+ * @param string $integrationChannel The Task Channel SID (TCXXXX) or unique name (e.g., `sms`) to use for the Task that will be created. Applicable and required when `integrationType` is `task`. The default value is `default`.
+ * @param int $integrationTimeout The Task timeout in seconds for a new Task. Default is 86,400 seconds (24 hours). Optional when `integrationType` is `task`, not applicable otherwise.
+ * @param int $integrationPriority The Task priority of a new Task. The default priority is 0. Optional when `integrationType` is `task`, not applicable otherwise.
+ * @param bool $integrationCreationOnMessage In the context of outbound messaging, defines whether to create a Task immediately (and therefore reserve the conversation to current agent), or delay Task creation until the customer sends the first response. Set to false to create immediately, true to delay Task creation. This setting is only applicable for outbound messaging.
+ * @param bool $longLived When enabled, Flex will keep the chat channel active so that it may be used for subsequent interactions with a contact identity. Defaults to `false`.
+ * @param bool $janitorEnabled When enabled, the Messaging Channel Janitor will remove active Proxy sessions if the associated Task is deleted outside of the Flex UI. Defaults to `false`.
+ * @param int $integrationRetryCount The number of times to retry the Studio Flow or webhook in case of failure. Takes integer values from 0 to 3 with the default being 3. Optional when `integrationType` is `studio` or `external`, not applicable otherwise.
+ */
+ public function __construct(
+
+ string $contactIdentity = Values::NONE,
+ bool $enabled = Values::BOOL_NONE,
+ string $integrationType = Values::NONE,
+ string $integrationFlowSid = Values::NONE,
+ string $integrationUrl = Values::NONE,
+ string $integrationWorkspaceSid = Values::NONE,
+ string $integrationWorkflowSid = Values::NONE,
+ string $integrationChannel = Values::NONE,
+ int $integrationTimeout = Values::INT_NONE,
+ int $integrationPriority = Values::INT_NONE,
+ bool $integrationCreationOnMessage = Values::BOOL_NONE,
+ bool $longLived = Values::BOOL_NONE,
+ bool $janitorEnabled = Values::BOOL_NONE,
+ int $integrationRetryCount = Values::INT_NONE
+
+ ) {
$this->options['contactIdentity'] = $contactIdentity;
$this->options['enabled'] = $enabled;
$this->options['integrationType'] = $integrationType;
@@ -161,169 +211,164 @@ public function __construct($contactIdentity = Values::NONE, $enabled = Values::
/**
* The channel contact's Identity.
*
- * @param string $contactIdentity The channel contact's Identity
+ * @param string $contactIdentity The channel contact's Identity.
* @return $this Fluent Builder
*/
- public function setContactIdentity($contactIdentity)
+ public function setContactIdentity(string $contactIdentity): self
{
$this->options['contactIdentity'] = $contactIdentity;
return $this;
}
/**
- * Whether the new FlexFlow is enabled.
+ * Whether the new Flex Flow is enabled.
*
- * @param bool $enabled Whether the new FlexFlow is enabled
+ * @param bool $enabled Whether the new Flex Flow is enabled.
* @return $this Fluent Builder
*/
- public function setEnabled($enabled)
+ public function setEnabled(bool $enabled): self
{
$this->options['enabled'] = $enabled;
return $this;
}
/**
- * The integration type. Can be: `studio`, `external`, or `task`.
- *
- * @param string $integrationType The integration type
+ * @param string $integrationType
* @return $this Fluent Builder
*/
- public function setIntegrationType($integrationType)
+ public function setIntegrationType(string $integrationType): self
{
$this->options['integrationType'] = $integrationType;
return $this;
}
/**
- * The SID of the Flow when `integration_type` is `studio`.
+ * The SID of the Studio Flow. Required when `integrationType` is `studio`.
*
- * @param string $integrationFlowSid The SID of the Flow
+ * @param string $integrationFlowSid The SID of the Studio Flow. Required when `integrationType` is `studio`.
* @return $this Fluent Builder
*/
- public function setIntegrationFlowSid($integrationFlowSid)
+ public function setIntegrationFlowSid(string $integrationFlowSid): self
{
$this->options['integrationFlowSid'] = $integrationFlowSid;
return $this;
}
/**
- * The External Webhook URL when `integration_type` is `external`.
+ * The URL of the external webhook. Required when `integrationType` is `external`.
*
- * @param string $integrationUrl The External Webhook URL
+ * @param string $integrationUrl The URL of the external webhook. Required when `integrationType` is `external`.
* @return $this Fluent Builder
*/
- public function setIntegrationUrl($integrationUrl)
+ public function setIntegrationUrl(string $integrationUrl): self
{
$this->options['integrationUrl'] = $integrationUrl;
return $this;
}
/**
- * The Workspace SID for a new task for Task `integration_type`.
+ * The Workspace SID for a new Task. Required when `integrationType` is `task`.
*
- * @param string $integrationWorkspaceSid The Workspace SID for a new task
+ * @param string $integrationWorkspaceSid The Workspace SID for a new Task. Required when `integrationType` is `task`.
* @return $this Fluent Builder
*/
- public function setIntegrationWorkspaceSid($integrationWorkspaceSid)
+ public function setIntegrationWorkspaceSid(string $integrationWorkspaceSid): self
{
$this->options['integrationWorkspaceSid'] = $integrationWorkspaceSid;
return $this;
}
/**
- * The Workflow SID for a new task when `integration_type` is `task`.
+ * The Workflow SID for a new Task. Required when `integrationType` is `task`.
*
- * @param string $integrationWorkflowSid The Workflow SID for a new task
+ * @param string $integrationWorkflowSid The Workflow SID for a new Task. Required when `integrationType` is `task`.
* @return $this Fluent Builder
*/
- public function setIntegrationWorkflowSid($integrationWorkflowSid)
+ public function setIntegrationWorkflowSid(string $integrationWorkflowSid): self
{
$this->options['integrationWorkflowSid'] = $integrationWorkflowSid;
return $this;
}
/**
- * The task channel for a new task when `integration_type` is `task`. The default is `default`.
+ * The Task Channel SID (TCXXXX) or unique name (e.g., `sms`) to use for the Task that will be created. Applicable and required when `integrationType` is `task`. The default value is `default`.
*
- * @param string $integrationChannel The task channel for a new task
+ * @param string $integrationChannel The Task Channel SID (TCXXXX) or unique name (e.g., `sms`) to use for the Task that will be created. Applicable and required when `integrationType` is `task`. The default value is `default`.
* @return $this Fluent Builder
*/
- public function setIntegrationChannel($integrationChannel)
+ public function setIntegrationChannel(string $integrationChannel): self
{
$this->options['integrationChannel'] = $integrationChannel;
return $this;
}
/**
- * The task timeout in seconds for a new task when `integration_type` is `task`. The default is `86,400` seconds (24 hours).
+ * The Task timeout in seconds for a new Task. Default is 86,400 seconds (24 hours). Optional when `integrationType` is `task`, not applicable otherwise.
*
- * @param int $integrationTimeout The task timeout in seconds for a new task
+ * @param int $integrationTimeout The Task timeout in seconds for a new Task. Default is 86,400 seconds (24 hours). Optional when `integrationType` is `task`, not applicable otherwise.
* @return $this Fluent Builder
*/
- public function setIntegrationTimeout($integrationTimeout)
+ public function setIntegrationTimeout(int $integrationTimeout): self
{
$this->options['integrationTimeout'] = $integrationTimeout;
return $this;
}
/**
- * The task priority of a new task when `integration_type` is `task`. The default priority is `0`.
+ * The Task priority of a new Task. The default priority is 0. Optional when `integrationType` is `task`, not applicable otherwise.
*
- * @param int $integrationPriority The task priority of a new task
+ * @param int $integrationPriority The Task priority of a new Task. The default priority is 0. Optional when `integrationType` is `task`, not applicable otherwise.
* @return $this Fluent Builder
*/
- public function setIntegrationPriority($integrationPriority)
+ public function setIntegrationPriority(int $integrationPriority): self
{
$this->options['integrationPriority'] = $integrationPriority;
return $this;
}
/**
- * Whether to create a task when the first message arrives when `integration_type` is `task`. If `false`, the task is created with the channel. **Note** that does not apply when channel type is `web`. Setting the value to `true` for channel type `web` will result in misconfigured Flex Flow and no tasks will be created.
+ * In the context of outbound messaging, defines whether to create a Task immediately (and therefore reserve the conversation to current agent), or delay Task creation until the customer sends the first response. Set to false to create immediately, true to delay Task creation. This setting is only applicable for outbound messaging.
*
- * @param bool $integrationCreationOnMessage Whether to create a task when the
- * first message arrives
+ * @param bool $integrationCreationOnMessage In the context of outbound messaging, defines whether to create a Task immediately (and therefore reserve the conversation to current agent), or delay Task creation until the customer sends the first response. Set to false to create immediately, true to delay Task creation. This setting is only applicable for outbound messaging.
* @return $this Fluent Builder
*/
- public function setIntegrationCreationOnMessage($integrationCreationOnMessage)
+ public function setIntegrationCreationOnMessage(bool $integrationCreationOnMessage): self
{
$this->options['integrationCreationOnMessage'] = $integrationCreationOnMessage;
return $this;
}
/**
- * Whether new channels are long-lived.
+ * When enabled, Flex will keep the chat channel active so that it may be used for subsequent interactions with a contact identity. Defaults to `false`.
*
- * @param bool $longLived Whether new channels are long-lived
+ * @param bool $longLived When enabled, Flex will keep the chat channel active so that it may be used for subsequent interactions with a contact identity. Defaults to `false`.
* @return $this Fluent Builder
*/
- public function setLongLived($longLived)
+ public function setLongLived(bool $longLived): self
{
$this->options['longLived'] = $longLived;
return $this;
}
/**
- * Boolean flag for enabling or disabling the Janitor.
+ * When enabled, the Messaging Channel Janitor will remove active Proxy sessions if the associated Task is deleted outside of the Flex UI. Defaults to `false`.
*
- * @param bool $janitorEnabled Boolean flag for enabling or disabling the
- * Janitor
+ * @param bool $janitorEnabled When enabled, the Messaging Channel Janitor will remove active Proxy sessions if the associated Task is deleted outside of the Flex UI. Defaults to `false`.
* @return $this Fluent Builder
*/
- public function setJanitorEnabled($janitorEnabled)
+ public function setJanitorEnabled(bool $janitorEnabled): self
{
$this->options['janitorEnabled'] = $janitorEnabled;
return $this;
}
/**
- * The number of times to retry the webhook if the first attempt fails. Can be an integer between 0 and 3, inclusive, and the default is 0.
+ * The number of times to retry the Studio Flow or webhook in case of failure. Takes integer values from 0 to 3 with the default being 3. Optional when `integrationType` is `studio` or `external`, not applicable otherwise.
*
- * @param int $integrationRetryCount The number of times to retry the webhook
- * if the first attempt fails
+ * @param int $integrationRetryCount The number of times to retry the Studio Flow or webhook in case of failure. Takes integer values from 0 to 3 with the default being 3. Optional when `integrationType` is `studio` or `external`, not applicable otherwise.
* @return $this Fluent Builder
*/
- public function setIntegrationRetryCount($integrationRetryCount)
+ public function setIntegrationRetryCount(int $integrationRetryCount): self
{
$this->options['integrationRetryCount'] = $integrationRetryCount;
return $this;
@@ -334,44 +379,94 @@ public function setIntegrationRetryCount($integrationRetryCount)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.FlexApi.V1.CreateFlexFlowOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.FlexApi.V1.CreateFlexFlowOptions ' . $options . ']';
}
}
-class UpdateFlexFlowOptions extends Options
-{
+
+
+class ReadFlexFlowOptions extends Options
+ {
+ /**
+ * @param string $friendlyName The `friendly_name` of the Flex Flow resources to read.
+ */
+ public function __construct(
+
+ string $friendlyName = Values::NONE
+
+ ) {
+ $this->options['friendlyName'] = $friendlyName;
+ }
+
/**
- * @param string $friendlyName A string to describe the resource
- * @param string $chatServiceSid The SID of the chat service
- * @param string $channelType The channel type
- * @param string $contactIdentity The channel contact's Identity
- * @param bool $enabled Whether the FlexFlow is enabled
- * @param string $integrationType The integration type
- * @param string $integrationFlowSid The SID of the Flow
- * @param string $integrationUrl The External Webhook URL
- * @param string $integrationWorkspaceSid The Workspace SID for a new task
- * @param string $integrationWorkflowSid The Workflow SID for a new task
- * @param string $integrationChannel task channel for a new task
- * @param int $integrationTimeout The task timeout in seconds for a new task
- * @param int $integrationPriority The task priority of a new task
- * @param bool $integrationCreationOnMessage Whether to create a task when the
- * first message arrives
- * @param bool $longLived Whether new channels created are long-lived
- * @param bool $janitorEnabled Boolean flag for enabling or disabling the
- * Janitor
- * @param int $integrationRetryCount The number of times to retry the webhook
- * if the first attempt fails
- */
- public function __construct($friendlyName = Values::NONE, $chatServiceSid = Values::NONE, $channelType = Values::NONE, $contactIdentity = Values::NONE, $enabled = Values::NONE, $integrationType = Values::NONE, $integrationFlowSid = Values::NONE, $integrationUrl = Values::NONE, $integrationWorkspaceSid = Values::NONE, $integrationWorkflowSid = Values::NONE, $integrationChannel = Values::NONE, $integrationTimeout = Values::NONE, $integrationPriority = Values::NONE, $integrationCreationOnMessage = Values::NONE, $longLived = Values::NONE, $janitorEnabled = Values::NONE, $integrationRetryCount = Values::NONE)
+ * The `friendly_name` of the Flex Flow resources to read.
+ *
+ * @param string $friendlyName The `friendly_name` of the Flex Flow resources to read.
+ * @return $this Fluent Builder
+ */
+ public function setFriendlyName(string $friendlyName): self
{
+ $this->options['friendlyName'] = $friendlyName;
+ return $this;
+ }
+
+ /**
+ * Provide a friendly representation
+ *
+ * @return string Machine friendly representation
+ */
+ public function __toString(): string
+ {
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.FlexApi.V1.ReadFlexFlowOptions ' . $options . ']';
+ }
+}
+
+class UpdateFlexFlowOptions extends Options
+ {
+ /**
+ * @param string $friendlyName A descriptive string that you create to describe the Flex Flow resource.
+ * @param string $chatServiceSid The SID of the chat service.
+ * @param string $channelType
+ * @param string $contactIdentity The channel contact's Identity.
+ * @param bool $enabled Whether the new Flex Flow is enabled.
+ * @param string $integrationType
+ * @param string $integrationFlowSid The SID of the Studio Flow. Required when `integrationType` is `studio`.
+ * @param string $integrationUrl The URL of the external webhook. Required when `integrationType` is `external`.
+ * @param string $integrationWorkspaceSid The Workspace SID for a new Task. Required when `integrationType` is `task`.
+ * @param string $integrationWorkflowSid The Workflow SID for a new Task. Required when `integrationType` is `task`.
+ * @param string $integrationChannel The Task Channel SID (TCXXXX) or unique name (e.g., `sms`) to use for the Task that will be created. Applicable and required when `integrationType` is `task`. The default value is `default`.
+ * @param int $integrationTimeout The Task timeout in seconds for a new Task. Default is 86,400 seconds (24 hours). Optional when `integrationType` is `task`, not applicable otherwise.
+ * @param int $integrationPriority The Task priority of a new Task. The default priority is 0. Optional when `integrationType` is `task`, not applicable otherwise.
+ * @param bool $integrationCreationOnMessage In the context of outbound messaging, defines whether to create a Task immediately (and therefore reserve the conversation to current agent), or delay Task creation until the customer sends the first response. Set to false to create immediately, true to delay Task creation. This setting is only applicable for outbound messaging.
+ * @param bool $longLived When enabled, Flex will keep the chat channel active so that it may be used for subsequent interactions with a contact identity. Defaults to `false`.
+ * @param bool $janitorEnabled When enabled, the Messaging Channel Janitor will remove active Proxy sessions if the associated Task is deleted outside of the Flex UI. Defaults to `false`.
+ * @param int $integrationRetryCount The number of times to retry the Studio Flow or webhook in case of failure. Takes integer values from 0 to 3 with the default being 3. Optional when `integrationType` is `studio` or `external`, not applicable otherwise.
+ */
+ public function __construct(
+
+ string $friendlyName = Values::NONE,
+ string $chatServiceSid = Values::NONE,
+ string $channelType = Values::NONE,
+ string $contactIdentity = Values::NONE,
+ bool $enabled = Values::BOOL_NONE,
+ string $integrationType = Values::NONE,
+ string $integrationFlowSid = Values::NONE,
+ string $integrationUrl = Values::NONE,
+ string $integrationWorkspaceSid = Values::NONE,
+ string $integrationWorkflowSid = Values::NONE,
+ string $integrationChannel = Values::NONE,
+ int $integrationTimeout = Values::INT_NONE,
+ int $integrationPriority = Values::INT_NONE,
+ bool $integrationCreationOnMessage = Values::BOOL_NONE,
+ bool $longLived = Values::BOOL_NONE,
+ bool $janitorEnabled = Values::BOOL_NONE,
+ int $integrationRetryCount = Values::INT_NONE
+
+ ) {
$this->options['friendlyName'] = $friendlyName;
$this->options['chatServiceSid'] = $chatServiceSid;
$this->options['channelType'] = $channelType;
@@ -392,12 +487,12 @@ public function __construct($friendlyName = Values::NONE, $chatServiceSid = Valu
}
/**
- * A descriptive string that you create to describe the FlexFlow resource.
+ * A descriptive string that you create to describe the Flex Flow resource.
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName A descriptive string that you create to describe the Flex Flow resource.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -406,22 +501,20 @@ public function setFriendlyName($friendlyName)
/**
* The SID of the chat service.
*
- * @param string $chatServiceSid The SID of the chat service
+ * @param string $chatServiceSid The SID of the chat service.
* @return $this Fluent Builder
*/
- public function setChatServiceSid($chatServiceSid)
+ public function setChatServiceSid(string $chatServiceSid): self
{
$this->options['chatServiceSid'] = $chatServiceSid;
return $this;
}
/**
- * The channel type. Can be: `web`, `facebook`, `sms`, `whatsapp`, `line` or `custom`.
- *
- * @param string $channelType The channel type
+ * @param string $channelType
* @return $this Fluent Builder
*/
- public function setChannelType($channelType)
+ public function setChannelType(string $channelType): self
{
$this->options['channelType'] = $channelType;
return $this;
@@ -430,169 +523,164 @@ public function setChannelType($channelType)
/**
* The channel contact's Identity.
*
- * @param string $contactIdentity The channel contact's Identity
+ * @param string $contactIdentity The channel contact's Identity.
* @return $this Fluent Builder
*/
- public function setContactIdentity($contactIdentity)
+ public function setContactIdentity(string $contactIdentity): self
{
$this->options['contactIdentity'] = $contactIdentity;
return $this;
}
/**
- * Whether the FlexFlow is enabled.
+ * Whether the new Flex Flow is enabled.
*
- * @param bool $enabled Whether the FlexFlow is enabled
+ * @param bool $enabled Whether the new Flex Flow is enabled.
* @return $this Fluent Builder
*/
- public function setEnabled($enabled)
+ public function setEnabled(bool $enabled): self
{
$this->options['enabled'] = $enabled;
return $this;
}
/**
- * The integration type. Can be: `studio`, `external`, or `task`.
- *
- * @param string $integrationType The integration type
+ * @param string $integrationType
* @return $this Fluent Builder
*/
- public function setIntegrationType($integrationType)
+ public function setIntegrationType(string $integrationType): self
{
$this->options['integrationType'] = $integrationType;
return $this;
}
/**
- * The SID of the Flow when `integration_type` is `studio`.
+ * The SID of the Studio Flow. Required when `integrationType` is `studio`.
*
- * @param string $integrationFlowSid The SID of the Flow
+ * @param string $integrationFlowSid The SID of the Studio Flow. Required when `integrationType` is `studio`.
* @return $this Fluent Builder
*/
- public function setIntegrationFlowSid($integrationFlowSid)
+ public function setIntegrationFlowSid(string $integrationFlowSid): self
{
$this->options['integrationFlowSid'] = $integrationFlowSid;
return $this;
}
/**
- * The External Webhook URL when `integration_type` is `external`.
+ * The URL of the external webhook. Required when `integrationType` is `external`.
*
- * @param string $integrationUrl The External Webhook URL
+ * @param string $integrationUrl The URL of the external webhook. Required when `integrationType` is `external`.
* @return $this Fluent Builder
*/
- public function setIntegrationUrl($integrationUrl)
+ public function setIntegrationUrl(string $integrationUrl): self
{
$this->options['integrationUrl'] = $integrationUrl;
return $this;
}
/**
- * The Workspace SID for a new task when `integration_type` is `task`.
+ * The Workspace SID for a new Task. Required when `integrationType` is `task`.
*
- * @param string $integrationWorkspaceSid The Workspace SID for a new task
+ * @param string $integrationWorkspaceSid The Workspace SID for a new Task. Required when `integrationType` is `task`.
* @return $this Fluent Builder
*/
- public function setIntegrationWorkspaceSid($integrationWorkspaceSid)
+ public function setIntegrationWorkspaceSid(string $integrationWorkspaceSid): self
{
$this->options['integrationWorkspaceSid'] = $integrationWorkspaceSid;
return $this;
}
/**
- * The Workflow SID for a new task when `integration_type` is `task`.
+ * The Workflow SID for a new Task. Required when `integrationType` is `task`.
*
- * @param string $integrationWorkflowSid The Workflow SID for a new task
+ * @param string $integrationWorkflowSid The Workflow SID for a new Task. Required when `integrationType` is `task`.
* @return $this Fluent Builder
*/
- public function setIntegrationWorkflowSid($integrationWorkflowSid)
+ public function setIntegrationWorkflowSid(string $integrationWorkflowSid): self
{
$this->options['integrationWorkflowSid'] = $integrationWorkflowSid;
return $this;
}
/**
- * The task channel for a new task when `integration_type` is `task`. The default is `default`.
+ * The Task Channel SID (TCXXXX) or unique name (e.g., `sms`) to use for the Task that will be created. Applicable and required when `integrationType` is `task`. The default value is `default`.
*
- * @param string $integrationChannel task channel for a new task
+ * @param string $integrationChannel The Task Channel SID (TCXXXX) or unique name (e.g., `sms`) to use for the Task that will be created. Applicable and required when `integrationType` is `task`. The default value is `default`.
* @return $this Fluent Builder
*/
- public function setIntegrationChannel($integrationChannel)
+ public function setIntegrationChannel(string $integrationChannel): self
{
$this->options['integrationChannel'] = $integrationChannel;
return $this;
}
/**
- * The task timeout in seconds for a new task when `integration_type` is `task`. The default is `86,400` seconds (24 hours).
+ * The Task timeout in seconds for a new Task. Default is 86,400 seconds (24 hours). Optional when `integrationType` is `task`, not applicable otherwise.
*
- * @param int $integrationTimeout The task timeout in seconds for a new task
+ * @param int $integrationTimeout The Task timeout in seconds for a new Task. Default is 86,400 seconds (24 hours). Optional when `integrationType` is `task`, not applicable otherwise.
* @return $this Fluent Builder
*/
- public function setIntegrationTimeout($integrationTimeout)
+ public function setIntegrationTimeout(int $integrationTimeout): self
{
$this->options['integrationTimeout'] = $integrationTimeout;
return $this;
}
/**
- * The task priority of a new task when `integration_type` is `task`. The default priority is `0`.
+ * The Task priority of a new Task. The default priority is 0. Optional when `integrationType` is `task`, not applicable otherwise.
*
- * @param int $integrationPriority The task priority of a new task
+ * @param int $integrationPriority The Task priority of a new Task. The default priority is 0. Optional when `integrationType` is `task`, not applicable otherwise.
* @return $this Fluent Builder
*/
- public function setIntegrationPriority($integrationPriority)
+ public function setIntegrationPriority(int $integrationPriority): self
{
$this->options['integrationPriority'] = $integrationPriority;
return $this;
}
/**
- * Whether to create a task when the first message arrives when `integration_type` is `task`. If `false`, the task is created with the channel. **Note** that does not apply when channel type is `web`. Setting the value to `true` for channel type `web` will result in misconfigured Flex Flow and no tasks will be created.
+ * In the context of outbound messaging, defines whether to create a Task immediately (and therefore reserve the conversation to current agent), or delay Task creation until the customer sends the first response. Set to false to create immediately, true to delay Task creation. This setting is only applicable for outbound messaging.
*
- * @param bool $integrationCreationOnMessage Whether to create a task when the
- * first message arrives
+ * @param bool $integrationCreationOnMessage In the context of outbound messaging, defines whether to create a Task immediately (and therefore reserve the conversation to current agent), or delay Task creation until the customer sends the first response. Set to false to create immediately, true to delay Task creation. This setting is only applicable for outbound messaging.
* @return $this Fluent Builder
*/
- public function setIntegrationCreationOnMessage($integrationCreationOnMessage)
+ public function setIntegrationCreationOnMessage(bool $integrationCreationOnMessage): self
{
$this->options['integrationCreationOnMessage'] = $integrationCreationOnMessage;
return $this;
}
/**
- * Whether new channels created are long-lived.
+ * When enabled, Flex will keep the chat channel active so that it may be used for subsequent interactions with a contact identity. Defaults to `false`.
*
- * @param bool $longLived Whether new channels created are long-lived
+ * @param bool $longLived When enabled, Flex will keep the chat channel active so that it may be used for subsequent interactions with a contact identity. Defaults to `false`.
* @return $this Fluent Builder
*/
- public function setLongLived($longLived)
+ public function setLongLived(bool $longLived): self
{
$this->options['longLived'] = $longLived;
return $this;
}
/**
- * Boolean flag for enabling or disabling the Janitor.
+ * When enabled, the Messaging Channel Janitor will remove active Proxy sessions if the associated Task is deleted outside of the Flex UI. Defaults to `false`.
*
- * @param bool $janitorEnabled Boolean flag for enabling or disabling the
- * Janitor
+ * @param bool $janitorEnabled When enabled, the Messaging Channel Janitor will remove active Proxy sessions if the associated Task is deleted outside of the Flex UI. Defaults to `false`.
* @return $this Fluent Builder
*/
- public function setJanitorEnabled($janitorEnabled)
+ public function setJanitorEnabled(bool $janitorEnabled): self
{
$this->options['janitorEnabled'] = $janitorEnabled;
return $this;
}
/**
- * The number of times to retry the webhook if the first attempt fails. Can be an integer between 0 and 3, inclusive, and the default is 0.
+ * The number of times to retry the Studio Flow or webhook in case of failure. Takes integer values from 0 to 3 with the default being 3. Optional when `integrationType` is `studio` or `external`, not applicable otherwise.
*
- * @param int $integrationRetryCount The number of times to retry the webhook
- * if the first attempt fails
+ * @param int $integrationRetryCount The number of times to retry the Studio Flow or webhook in case of failure. Takes integer values from 0 to 3 with the default being 3. Optional when `integrationType` is `studio` or `external`, not applicable otherwise.
* @return $this Fluent Builder
*/
- public function setIntegrationRetryCount($integrationRetryCount)
+ public function setIntegrationRetryCount(int $integrationRetryCount): self
{
$this->options['integrationRetryCount'] = $integrationRetryCount;
return $this;
@@ -603,14 +691,10 @@ public function setIntegrationRetryCount($integrationRetryCount)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.FlexApi.V1.UpdateFlexFlowOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.FlexApi.V1.UpdateFlexFlowOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/FlexFlowPage.php b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/FlexFlowPage.php
index f366200..5b1cee1 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/FlexFlowPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/FlexFlowPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return FlexFlowInstance \Twilio\Rest\FlexApi\V1\FlexFlowInstance
+ */
+ public function buildInstance(array $payload): FlexFlowInstance
{
return new FlexFlowInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.FlexApi.V1.FlexFlowPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/WebChannelContext.php b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/WebChannelContext.php
index 0dc66e6..e860bd1 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/WebChannelContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/WebChannelContext.php
@@ -2,105 +2,127 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Flex
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\FlexApi\V1;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class WebChannelContext extends InstanceContext
-{
+ {
/**
* Initialize the WebChannelContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The SID of the WebChannel resource to fetch
- * @return \Twilio\Rest\FlexApi\V1\WebChannelContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid The SID of the WebChannel resource to delete.
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/WebChannels/' . \rawurlencode($sid) . '';
+ $this->uri = '/WebChannels/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a WebChannelInstance
+ * Delete the WebChannelInstance
*
- * @return WebChannelInstance Fetched WebChannelInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new WebChannelInstance($this->version, $payload, $this->solution['sid']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Update the WebChannelInstance
+ * Fetch the WebChannelInstance
*
- * @param array|Options $options Optional Arguments
- * @return WebChannelInstance Updated WebChannelInstance
+ * @return WebChannelInstance Fetched WebChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): WebChannelInstance
{
- $options = new Values($options);
- $data = Values::of(array(
- 'ChatStatus' => $options['chatStatus'],
- 'PostEngagementData' => $options['postEngagementData'],
- ));
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
+ return new WebChannelInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
);
-
- return new WebChannelInstance($this->version, $payload, $this->solution['sid']);
}
+
/**
- * Deletes the WebChannelInstance
+ * Update the WebChannelInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return WebChannelInstance Updated WebChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): WebChannelInstance
{
- return $this->version->delete('delete', $this->uri);
+
+ $options = new Values($options);
+
+ $data = Values::of([
+ 'ChatStatus' =>
+ $options['chatStatus'],
+ 'PostEngagementData' =>
+ $options['postEngagementData'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
+
+ return new WebChannelInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.FlexApi.V1.WebChannelContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/WebChannelInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/WebChannelInstance.php
index 21cfe28..28394d6 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/WebChannelInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/WebChannelInstance.php
@@ -2,103 +2,116 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Flex
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\FlexApi\V1;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property string $flexFlowSid
- * @property string $sid
- * @property string $url
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
+ * @property string|null $accountSid
+ * @property string|null $flexFlowSid
+ * @property string|null $sid
+ * @property string|null $url
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
*/
class WebChannelInstance extends InstanceResource
{
/**
* Initialize the WebChannelInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The SID of the WebChannel resource to fetch
- * @return \Twilio\Rest\FlexApi\V1\WebChannelInstance
+ * @param string $sid The SID of the WebChannel resource to delete.
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'flexFlowSid' => Values::array_get($payload, 'flex_flow_sid'),
'sid' => Values::array_get($payload, 'sid'),
'url' => Values::array_get($payload, 'url'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\FlexApi\V1\WebChannelContext Context for this
- * WebChannelInstance
+ * @return WebChannelContext Context for this WebChannelInstance
*/
- protected function proxy()
+ protected function proxy(): WebChannelContext
{
if (!$this->context) {
- $this->context = new WebChannelContext($this->version, $this->solution['sid']);
+ $this->context = new WebChannelContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a WebChannelInstance
+ * Delete the WebChannelInstance
*
- * @return WebChannelInstance Fetched WebChannelInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Update the WebChannelInstance
+ * Fetch the WebChannelInstance
*
- * @param array|Options $options Optional Arguments
- * @return WebChannelInstance Updated WebChannelInstance
+ * @return WebChannelInstance Fetched WebChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): WebChannelInstance
{
- return $this->proxy()->update($options);
+
+ return $this->proxy()->fetch();
}
/**
- * Deletes the WebChannelInstance
+ * Update the WebChannelInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return WebChannelInstance Updated WebChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): WebChannelInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->update($options);
}
/**
@@ -108,7 +121,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -127,12 +140,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.FlexApi.V1.WebChannelInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/WebChannelList.php b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/WebChannelList.php
index f603351..c829f69 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/WebChannelList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/WebChannelList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Flex
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\FlexApi\V1;
@@ -12,54 +19,71 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class WebChannelList extends ListResource
-{
+ {
/**
* Construct the WebChannelList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\FlexApi\V1\WebChannelList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/WebChannels';
}
/**
- * Streams WebChannelInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the WebChannelInstance
*
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @param string $flexFlowSid The SID of the Flex Flow.
+ * @param string $identity The chat identity.
+ * @param string $customerFriendlyName The chat participant's friendly name.
+ * @param string $chatFriendlyName The chat channel's friendly name.
+ * @param array|Options $options Optional Arguments
+ * @return WebChannelInstance Created WebChannelInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($limit = null, $pageSize = null)
+ public function create(string $flexFlowSid, string $identity, string $customerFriendlyName, string $chatFriendlyName, array $options = []): WebChannelInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'FlexFlowSid' =>
+ $flexFlowSid,
+ 'Identity' =>
+ $identity,
+ 'CustomerFriendlyName' =>
+ $customerFriendlyName,
+ 'ChatFriendlyName' =>
+ $chatFriendlyName,
+ 'ChatUniqueName' =>
+ $options['chatUniqueName'],
+ 'PreEngagementData' =>
+ $options['preEngagementData'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new WebChannelInstance(
+ $this->version,
+ $payload
+ );
}
+
/**
* Reads WebChannelInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -75,11 +99,38 @@ public function stream($limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return WebChannelInstance[] Array of results
*/
- public function read($limit = null, $pageSize = null)
+ public function read(int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($limit, $pageSize), false);
}
+ /**
+ * Streams WebChannelInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of WebChannelInstance records from the API.
* Request is executed immediately
@@ -87,21 +138,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of WebChannelInstance
+ * @return WebChannelPage Page of WebChannelInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): WebChannelPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new WebChannelPage($this->version, $response, $this->solution);
}
@@ -111,9 +163,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of WebChannelInstance
+ * @return WebChannelPage Page of WebChannelInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): WebChannelPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -123,49 +175,21 @@ public function getPage($targetUrl)
return new WebChannelPage($this->version, $response, $this->solution);
}
- /**
- * Create a new WebChannelInstance
- *
- * @param string $flexFlowSid The SID of the FlexFlow
- * @param string $identity The chat identity
- * @param string $customerFriendlyName The chat participant's friendly name
- * @param string $chatFriendlyName The chat channel's friendly name
- * @param array|Options $options Optional Arguments
- * @return WebChannelInstance Newly created WebChannelInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($flexFlowSid, $identity, $customerFriendlyName, $chatFriendlyName, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'FlexFlowSid' => $flexFlowSid,
- 'Identity' => $identity,
- 'CustomerFriendlyName' => $customerFriendlyName,
- 'ChatFriendlyName' => $chatFriendlyName,
- 'ChatUniqueName' => $options['chatUniqueName'],
- 'PreEngagementData' => $options['preEngagementData'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new WebChannelInstance($this->version, $payload);
- }
/**
* Constructs a WebChannelContext
*
- * @param string $sid The SID of the WebChannel resource to fetch
- * @return \Twilio\Rest\FlexApi\V1\WebChannelContext
+ * @param string $sid The SID of the WebChannel resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): WebChannelContext
{
- return new WebChannelContext($this->version, $sid);
+ return new WebChannelContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -173,8 +197,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.FlexApi.V1.WebChannelList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/WebChannelOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/WebChannelOptions.php
index 605a476..29b4d6b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/WebChannelOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/WebChannelOptions.php
@@ -1,10 +1,16 @@
options['chatUniqueName'] = $chatUniqueName;
$this->options['preEngagementData'] = $preEngagementData;
}
@@ -50,10 +80,10 @@ public function __construct($chatUniqueName = Values::NONE, $preEngagementData =
/**
* The chat channel's unique name.
*
- * @param string $chatUniqueName The chat channel's unique name
+ * @param string $chatUniqueName The chat channel's unique name.
* @return $this Fluent Builder
*/
- public function setChatUniqueName($chatUniqueName)
+ public function setChatUniqueName(string $chatUniqueName): self
{
$this->options['chatUniqueName'] = $chatUniqueName;
return $this;
@@ -62,10 +92,10 @@ public function setChatUniqueName($chatUniqueName)
/**
* The pre-engagement data.
*
- * @param string $preEngagementData The pre-engagement data
+ * @param string $preEngagementData The pre-engagement data.
* @return $this Fluent Builder
*/
- public function setPreEngagementData($preEngagementData)
+ public function setPreEngagementData(string $preEngagementData): self
{
$this->options['preEngagementData'] = $preEngagementData;
return $this;
@@ -76,37 +106,37 @@ public function setPreEngagementData($preEngagementData)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.FlexApi.V1.CreateWebChannelOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.FlexApi.V1.CreateWebChannelOptions ' . $options . ']';
}
}
+
+
+
class UpdateWebChannelOptions extends Options
-{
+ {
/**
- * @param string $chatStatus The chat status
- * @param string $postEngagementData The post-engagement data
+ * @param string $chatStatus
+ * @param string $postEngagementData The post-engagement data.
*/
- public function __construct($chatStatus = Values::NONE, $postEngagementData = Values::NONE)
- {
+ public function __construct(
+
+ string $chatStatus = Values::NONE,
+ string $postEngagementData = Values::NONE
+
+ ) {
$this->options['chatStatus'] = $chatStatus;
$this->options['postEngagementData'] = $postEngagementData;
}
/**
- * The chat status. Can only be `inactive`.
- *
- * @param string $chatStatus The chat status
+ * @param string $chatStatus
* @return $this Fluent Builder
*/
- public function setChatStatus($chatStatus)
+ public function setChatStatus(string $chatStatus): self
{
$this->options['chatStatus'] = $chatStatus;
return $this;
@@ -115,10 +145,10 @@ public function setChatStatus($chatStatus)
/**
* The post-engagement data.
*
- * @param string $postEngagementData The post-engagement data
+ * @param string $postEngagementData The post-engagement data.
* @return $this Fluent Builder
*/
- public function setPostEngagementData($postEngagementData)
+ public function setPostEngagementData(string $postEngagementData): self
{
$this->options['postEngagementData'] = $postEngagementData;
return $this;
@@ -129,14 +159,10 @@ public function setPostEngagementData($postEngagementData)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.FlexApi.V1.UpdateWebChannelOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.FlexApi.V1.UpdateWebChannelOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/WebChannelPage.php b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/WebChannelPage.php
index b0362ee..7327016 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/WebChannelPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/FlexApi/V1/WebChannelPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return WebChannelInstance \Twilio\Rest\FlexApi\V1\WebChannelInstance
+ */
+ public function buildInstance(array $payload): WebChannelInstance
{
return new WebChannelInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.FlexApi.V1.WebChannelPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Insights.php b/vendor/twilio/sdk/src/Twilio/Rest/Insights.php
index b7438c9..63230de 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Insights.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Insights.php
@@ -1,111 +1,83 @@
settings instead.
*/
- public function __construct(Client $client)
- {
- parent::__construct($client);
-
- $this->baseUrl = 'https://insights.twilio.com';
+ protected function getSettings(): \Twilio\Rest\Insights\V1\SettingList {
+ echo "settings is deprecated. Use v1->settings instead.";
+ return $this->v1->settings;
}
/**
- * @return \Twilio\Rest\Insights\V1 Version v1 of insights
+ * @deprecated Use v1->settings() instead.
*/
- protected function getV1()
- {
- if (!$this->_v1) {
- $this->_v1 = new V1($this);
- }
- return $this->_v1;
+ protected function contextSettings(): \Twilio\Rest\Insights\V1\SettingContext {
+ echo "settings() is deprecated. Use v1->settings() instead.";
+ return $this->v1->settings();
}
/**
- * Magic getter to lazy load version
- *
- * @param string $name Version to return
- * @return \Twilio\Version The requested version
- * @throws TwilioException For unknown versions
+ * @deprecated Use v1->calls instead.
*/
- public function __get($name)
- {
- $method = 'get' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return $this->$method();
- }
+ protected function getCalls(): \Twilio\Rest\Insights\V1\CallList {
+ echo "calls is deprecated. Use v1->calls instead.";
+ return $this->v1->calls;
+ }
- throw new TwilioException('Unknown version ' . $name);
+ /**
+ * @deprecated Use v1->calls(\$sid) instead.
+ * @param string $sid The sid
+ */
+ protected function contextCalls(string $sid): \Twilio\Rest\Insights\V1\CallContext {
+ echo "calls(\$sid) is deprecated. Use v1->calls(\$sid) instead.";
+ return $this->v1->calls($sid);
}
/**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
+ * @deprecated Use v1->callSummaries instead.
*/
- public function __call($name, $arguments)
- {
- $method = 'context' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return \call_user_func_array(array($this, $method), $arguments);
- }
+ protected function getCallSummaries(): \Twilio\Rest\Insights\V1\CallSummariesList {
+ echo "callSummaries is deprecated. Use v1->callSummaries instead.";
+ return $this->v1->callSummaries;
+ }
- throw new TwilioException('Unknown context ' . $name);
+ /**
+ * @deprecated Use v1->conferences instead.
+ */
+ protected function getConferences(): \Twilio\Rest\Insights\V1\ConferenceList {
+ echo "conferences is deprecated. Use v1->conferences instead.";
+ return $this->v1->conferences;
}
/**
- * @return \Twilio\Rest\Insights\V1\CallList
+ * @deprecated Use v1->conferences(\$conferenceSid) instead.
+ * @param string $conferenceSid Conference SID.
*/
- protected function getCalls()
- {
- return $this->v1->calls;
+ protected function contextConferences(string $conferenceSid): \Twilio\Rest\Insights\V1\ConferenceContext {
+ echo "conferences(\$conferenceSid) is deprecated. Use v1->conferences(\$conferenceSid) instead.";
+ return $this->v1->conferences($conferenceSid);
}
/**
- * @param string $sid The sid
- * @return \Twilio\Rest\Insights\V1\CallContext
+ * @deprecated Use v1->rooms instead.
*/
- protected function contextCalls($sid)
- {
- return $this->v1->calls($sid);
+ protected function getRooms(): \Twilio\Rest\Insights\V1\RoomList {
+ echo "rooms is deprecated. Use v1->rooms instead.";
+ return $this->v1->rooms;
}
/**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
+ * @deprecated Use v1->rooms(\$roomSid) instead.
+ * @param string $roomSid The SID of the Room resource.
*/
- public function __toString()
- {
- return '[Twilio.Insights]';
+ protected function contextRooms(string $roomSid): \Twilio\Rest\Insights\V1\RoomContext {
+ echo "rooms(\$roomSid) is deprecated. Use v1->rooms(\$roomSid) instead.";
+ return $this->v1->rooms($roomSid);
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1.php b/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1.php
index 1dafc73..cf3f543 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1.php
@@ -1,32 +1,52 @@
version = 'v1';
}
- /**
- * @return \Twilio\Rest\Insights\V1\CallList
- */
- protected function getCalls()
+ protected function getCalls(): CallList
{
if (!$this->_calls) {
$this->_calls = new CallList($this);
@@ -45,6 +62,38 @@ protected function getCalls()
return $this->_calls;
}
+ protected function getCallSummaries(): CallSummariesList
+ {
+ if (!$this->_callSummaries) {
+ $this->_callSummaries = new CallSummariesList($this);
+ }
+ return $this->_callSummaries;
+ }
+
+ protected function getConferences(): ConferenceList
+ {
+ if (!$this->_conferences) {
+ $this->_conferences = new ConferenceList($this);
+ }
+ return $this->_conferences;
+ }
+
+ protected function getRooms(): RoomList
+ {
+ if (!$this->_rooms) {
+ $this->_rooms = new RoomList($this);
+ }
+ return $this->_rooms;
+ }
+
+ protected function getSettings(): SettingList
+ {
+ if (!$this->_settings) {
+ $this->_settings = new SettingList($this);
+ }
+ return $this->_settings;
+ }
+
/**
* Magic getter to lazy load root resources
*
@@ -52,7 +101,7 @@ protected function getCalls()
* @return \Twilio\ListResource The requested resource
* @throws TwilioException For unknown resource
*/
- public function __get($name)
+ public function __get(string $name)
{
$method = 'get' . \ucfirst($name);
if (\method_exists($this, $method)) {
@@ -67,10 +116,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -85,8 +134,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Insights.V1]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/CallSummaryContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/CallSummaryContext.php
index ca09a44..ebe8558 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/CallSummaryContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/CallSummaryContext.php
@@ -2,74 +2,91 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Insights
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Insights\V1\Call;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
class CallSummaryContext extends InstanceContext
-{
+ {
/**
* Initialize the CallSummaryContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $callSid The call_sid
- * @return \Twilio\Rest\Insights\V1\Call\CallSummaryContext
+ * @param Version $version Version that contains the resource
+ * @param string $callSid The unique SID identifier of the Call.
*/
- public function __construct(Version $version, $callSid)
- {
+ public function __construct(
+ Version $version,
+ $callSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('callSid' => $callSid,);
+ $this->solution = [
+ 'callSid' =>
+ $callSid,
+ ];
- $this->uri = '/Voice/' . \rawurlencode($callSid) . '/Summary';
+ $this->uri = '/Voice/' . \rawurlencode($callSid)
+ .'/Summary';
}
/**
- * Fetch a CallSummaryInstance
+ * Fetch the CallSummaryInstance
*
* @param array|Options $options Optional Arguments
* @return CallSummaryInstance Fetched CallSummaryInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch($options = array())
+ public function fetch(array $options = []): CallSummaryInstance
{
+
$options = new Values($options);
- $params = Values::of(array('ProcessingState' => $options['processingState'],));
+ $params = Values::of([
+ 'ProcessingState' =>
+ $options['processingState'],
+ ]);
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, $params, [], $headers);
- return new CallSummaryInstance($this->version, $payload, $this->solution['callSid']);
+ return new CallSummaryInstance(
+ $this->version,
+ $payload,
+ $this->solution['callSid']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Insights.V1.CallSummaryContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/CallSummaryInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/CallSummaryInstance.php
index abe9823..3c04549 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/CallSummaryInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/CallSummaryInstance.php
@@ -2,64 +2,76 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Insights
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Insights\V1\Call;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property string $accountSid
- * @property string $callSid
+ * @property string|null $accountSid
+ * @property string|null $callSid
* @property string $callType
* @property string $callState
+ * @property string $answeredBy
* @property string $processingState
- * @property \DateTime $startTime
- * @property \DateTime $endTime
- * @property int $duration
- * @property int $connectDuration
- * @property array $from
- * @property array $to
- * @property array $carrierEdge
- * @property array $clientEdge
- * @property array $sdkEdge
- * @property array $sipEdge
- * @property string $tags
- * @property string $url
- * @property array $attributes
- * @property array $properties
+ * @property \DateTime|null $createdTime
+ * @property \DateTime|null $startTime
+ * @property \DateTime|null $endTime
+ * @property int|null $duration
+ * @property int|null $connectDuration
+ * @property array|null $from
+ * @property array|null $to
+ * @property array|null $carrierEdge
+ * @property array|null $clientEdge
+ * @property array|null $sdkEdge
+ * @property array|null $sipEdge
+ * @property string[]|null $tags
+ * @property string|null $url
+ * @property array|null $attributes
+ * @property array|null $properties
+ * @property array|null $trust
+ * @property array|null $annotation
*/
class CallSummaryInstance extends InstanceResource
{
/**
* Initialize the CallSummaryInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $callSid The call_sid
- * @return \Twilio\Rest\Insights\V1\Call\CallSummaryInstance
+ * @param string $callSid The unique SID identifier of the Call.
*/
- public function __construct(Version $version, array $payload, $callSid)
+ public function __construct(Version $version, array $payload, string $callSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'callSid' => Values::array_get($payload, 'call_sid'),
'callType' => Values::array_get($payload, 'call_type'),
'callState' => Values::array_get($payload, 'call_state'),
+ 'answeredBy' => Values::array_get($payload, 'answered_by'),
'processingState' => Values::array_get($payload, 'processing_state'),
+ 'createdTime' => Deserialize::dateTime(Values::array_get($payload, 'created_time')),
'startTime' => Deserialize::dateTime(Values::array_get($payload, 'start_time')),
'endTime' => Deserialize::dateTime(Values::array_get($payload, 'end_time')),
'duration' => Values::array_get($payload, 'duration'),
@@ -74,36 +86,41 @@ public function __construct(Version $version, array $payload, $callSid)
'url' => Values::array_get($payload, 'url'),
'attributes' => Values::array_get($payload, 'attributes'),
'properties' => Values::array_get($payload, 'properties'),
- );
+ 'trust' => Values::array_get($payload, 'trust'),
+ 'annotation' => Values::array_get($payload, 'annotation'),
+ ];
- $this->solution = array('callSid' => $callSid,);
+ $this->solution = ['callSid' => $callSid, ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Insights\V1\Call\CallSummaryContext Context for this
- * CallSummaryInstance
+ * @return CallSummaryContext Context for this CallSummaryInstance
*/
- protected function proxy()
+ protected function proxy(): CallSummaryContext
{
if (!$this->context) {
- $this->context = new CallSummaryContext($this->version, $this->solution['callSid']);
+ $this->context = new CallSummaryContext(
+ $this->version,
+ $this->solution['callSid']
+ );
}
return $this->context;
}
/**
- * Fetch a CallSummaryInstance
+ * Fetch the CallSummaryInstance
*
* @param array|Options $options Optional Arguments
* @return CallSummaryInstance Fetched CallSummaryInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch($options = array())
+ public function fetch(array $options = []): CallSummaryInstance
{
+
return $this->proxy()->fetch($options);
}
@@ -114,7 +131,7 @@ public function fetch($options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -133,12 +150,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Insights.V1.CallSummaryInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/CallSummaryList.php b/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/CallSummaryList.php
index 85e43ab..e8c2531 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/CallSummaryList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/CallSummaryList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Insights
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Insights\V1\Call;
@@ -12,34 +19,40 @@
use Twilio\ListResource;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
+
class CallSummaryList extends ListResource
-{
+ {
/**
* Construct the CallSummaryList
*
* @param Version $version Version that contains the resource
- * @param string $callSid The call_sid
- * @return \Twilio\Rest\Insights\V1\Call\CallSummaryList
+ * @param string $callSid The unique SID identifier of the Call.
*/
- public function __construct(Version $version, $callSid)
- {
+ public function __construct(
+ Version $version,
+ string $callSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('callSid' => $callSid,);
+ $this->solution = [
+ 'callSid' =>
+ $callSid,
+
+ ];
}
/**
* Constructs a CallSummaryContext
- *
- * @return \Twilio\Rest\Insights\V1\Call\CallSummaryContext
*/
- public function getContext()
+ public function getContext(
+
+ ): CallSummaryContext
{
- return new CallSummaryContext($this->version, $this->solution['callSid']);
+ return new CallSummaryContext(
+ $this->version,
+ $this->solution['callSid']
+ );
}
/**
@@ -47,8 +60,8 @@ public function getContext()
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Insights.V1.CallSummaryList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/CallSummaryOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/CallSummaryOptions.php
index bd0396c..466ca9a 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/CallSummaryOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/CallSummaryOptions.php
@@ -1,10 +1,16 @@
options['processingState'] = $processingState;
}
/**
- * The processing_state
+ * The Processing State of this Call Summary. One of `complete`, `partial` or `all`.
*
- * @param string $processingState The processing_state
+ * @param string $processingState The Processing State of this Call Summary. One of `complete`, `partial` or `all`.
* @return $this Fluent Builder
*/
- public function setProcessingState($processingState)
+ public function setProcessingState(string $processingState): self
{
$this->options['processingState'] = $processingState;
return $this;
@@ -54,14 +67,10 @@ public function setProcessingState($processingState)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Insights.V1.FetchCallSummaryOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Insights.V1.FetchCallSummaryOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/CallSummaryPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/CallSummaryPage.php
index fe7d686..e5c7b5a 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/CallSummaryPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/CallSummaryPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return CallSummaryInstance \Twilio\Rest\Insights\V1\Call\CallSummaryInstance
+ */
+ public function buildInstance(array $payload): CallSummaryInstance
{
return new CallSummaryInstance($this->version, $payload, $this->solution['callSid']);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Insights.V1.CallSummaryPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/EventInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/EventInstance.php
index 0f1cd19..09c80b7 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/EventInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/EventInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Insights
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Insights\V1\Call;
use Twilio\Exceptions\TwilioException;
@@ -14,37 +22,35 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property string $timestamp
- * @property string $callSid
- * @property string $accountSid
+ * @property string|null $timestamp
+ * @property string|null $callSid
+ * @property string|null $accountSid
* @property string $edge
- * @property string $group
+ * @property string|null $group
* @property string $level
- * @property string $name
- * @property array $carrierEdge
- * @property array $sipEdge
- * @property array $sdkEdge
- * @property array $clientEdge
+ * @property string|null $name
+ * @property array|null $carrierEdge
+ * @property array|null $sipEdge
+ * @property array|null $sdkEdge
+ * @property array|null $clientEdge
*/
class EventInstance extends InstanceResource
{
/**
* Initialize the EventInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $callSid The call_sid
- * @return \Twilio\Rest\Insights\V1\Call\EventInstance
+ * @param string $callSid The unique SID identifier of the Call.
*/
- public function __construct(Version $version, array $payload, $callSid)
+ public function __construct(Version $version, array $payload, string $callSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'timestamp' => Values::array_get($payload, 'timestamp'),
'callSid' => Values::array_get($payload, 'call_sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
@@ -56,9 +62,9 @@ public function __construct(Version $version, array $payload, $callSid)
'sipEdge' => Values::array_get($payload, 'sip_edge'),
'sdkEdge' => Values::array_get($payload, 'sdk_edge'),
'clientEdge' => Values::array_get($payload, 'client_edge'),
- );
+ ];
- $this->solution = array('callSid' => $callSid,);
+ $this->solution = ['callSid' => $callSid, ];
}
/**
@@ -68,7 +74,7 @@ public function __construct(Version $version, array $payload, $callSid)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -87,8 +93,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Insights.V1.EventInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/EventList.php b/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/EventList.php
index 572989d..1f8b829 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/EventList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/EventList.php
@@ -2,38 +2,71 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Insights
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Insights\V1\Call;
use Twilio\ListResource;
use Twilio\Options;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
+
class EventList extends ListResource
-{
+ {
/**
* Construct the EventList
*
* @param Version $version Version that contains the resource
- * @param string $callSid The call_sid
- * @return \Twilio\Rest\Insights\V1\Call\EventList
+ * @param string $callSid The unique SID identifier of the Call.
*/
- public function __construct(Version $version, $callSid)
- {
+ public function __construct(
+ Version $version,
+ string $callSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('callSid' => $callSid,);
+ $this->solution = [
+ 'callSid' =>
+ $callSid,
+
+ ];
+
+ $this->uri = '/Voice/' . \rawurlencode($callSid)
+ .'/Events';
+ }
- $this->uri = '/Voice/' . \rawurlencode($callSid) . '/Events';
+ /**
+ * Reads EventInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return EventInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -53,9 +86,9 @@ public function __construct(Version $version, $callSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -64,52 +97,33 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads EventInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return EventInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of EventInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of EventInstance
+ * @return EventPage Page of EventInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): EventPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Edge' => $options['edge'],
+
+ $params = Values::of([
+ 'Edge' =>
+ $options['edge'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new EventPage($this->version, $response, $this->solution);
}
@@ -119,9 +133,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of EventInstance
+ * @return EventPage Page of EventInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): EventPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -131,13 +145,14 @@ public function getPage($targetUrl)
return new EventPage($this->version, $response, $this->solution);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Insights.V1.EventList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/EventOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/EventOptions.php
index ba0b417..d3f7798 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/EventOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/EventOptions.php
@@ -1,10 +1,16 @@
options['edge'] = $edge;
}
/**
- * The edge
+ * The Edge of this Event. One of `unknown_edge`, `carrier_edge`, `sip_edge`, `sdk_edge` or `client_edge`.
*
- * @param string $edge The edge
+ * @param string $edge The Edge of this Event. One of `unknown_edge`, `carrier_edge`, `sip_edge`, `sdk_edge` or `client_edge`.
* @return $this Fluent Builder
*/
- public function setEdge($edge)
+ public function setEdge(string $edge): self
{
$this->options['edge'] = $edge;
return $this;
@@ -54,14 +67,10 @@ public function setEdge($edge)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Insights.V1.ReadEventOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Insights.V1.ReadEventOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/EventPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/EventPage.php
index f8bd609..c6a4be3 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/EventPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/EventPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return EventInstance \Twilio\Rest\Insights\V1\Call\EventInstance
+ */
+ public function buildInstance(array $payload): EventInstance
{
return new EventInstance($this->version, $payload, $this->solution['callSid']);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Insights.V1.EventPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/MetricInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/MetricInstance.php
index 2b990b0..e621e42 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/MetricInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/MetricInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Insights
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Insights\V1\Call;
use Twilio\Exceptions\TwilioException;
@@ -14,35 +22,33 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property string $timestamp
- * @property string $callSid
- * @property string $accountSid
+ * @property string|null $timestamp
+ * @property string|null $callSid
+ * @property string|null $accountSid
* @property string $edge
* @property string $direction
- * @property array $carrierEdge
- * @property array $sipEdge
- * @property array $sdkEdge
- * @property array $clientEdge
+ * @property array|null $carrierEdge
+ * @property array|null $sipEdge
+ * @property array|null $sdkEdge
+ * @property array|null $clientEdge
*/
class MetricInstance extends InstanceResource
{
/**
* Initialize the MetricInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $callSid The call_sid
- * @return \Twilio\Rest\Insights\V1\Call\MetricInstance
+ * @param string $callSid The unique SID identifier of the Call.
*/
- public function __construct(Version $version, array $payload, $callSid)
+ public function __construct(Version $version, array $payload, string $callSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'timestamp' => Values::array_get($payload, 'timestamp'),
'callSid' => Values::array_get($payload, 'call_sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
@@ -52,9 +58,9 @@ public function __construct(Version $version, array $payload, $callSid)
'sipEdge' => Values::array_get($payload, 'sip_edge'),
'sdkEdge' => Values::array_get($payload, 'sdk_edge'),
'clientEdge' => Values::array_get($payload, 'client_edge'),
- );
+ ];
- $this->solution = array('callSid' => $callSid,);
+ $this->solution = ['callSid' => $callSid, ];
}
/**
@@ -64,7 +70,7 @@ public function __construct(Version $version, array $payload, $callSid)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -83,8 +89,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Insights.V1.MetricInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/MetricList.php b/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/MetricList.php
index f623057..f918e7c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/MetricList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/MetricList.php
@@ -2,38 +2,71 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Insights
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Insights\V1\Call;
use Twilio\ListResource;
use Twilio\Options;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
+
class MetricList extends ListResource
-{
+ {
/**
* Construct the MetricList
*
* @param Version $version Version that contains the resource
- * @param string $callSid The call_sid
- * @return \Twilio\Rest\Insights\V1\Call\MetricList
+ * @param string $callSid The unique SID identifier of the Call.
*/
- public function __construct(Version $version, $callSid)
- {
+ public function __construct(
+ Version $version,
+ string $callSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('callSid' => $callSid,);
+ $this->solution = [
+ 'callSid' =>
+ $callSid,
+
+ ];
+
+ $this->uri = '/Voice/' . \rawurlencode($callSid)
+ .'/Metrics';
+ }
- $this->uri = '/Voice/' . \rawurlencode($callSid) . '/Metrics';
+ /**
+ * Reads MetricInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return MetricInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -53,9 +86,9 @@ public function __construct(Version $version, $callSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -64,53 +97,35 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads MetricInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return MetricInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of MetricInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of MetricInstance
+ * @return MetricPage Page of MetricInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): MetricPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Edge' => $options['edge'],
- 'Direction' => $options['direction'],
+
+ $params = Values::of([
+ 'Edge' =>
+ $options['edge'],
+ 'Direction' =>
+ $options['direction'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new MetricPage($this->version, $response, $this->solution);
}
@@ -120,9 +135,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of MetricInstance
+ * @return MetricPage Page of MetricInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): MetricPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -132,13 +147,14 @@ public function getPage($targetUrl)
return new MetricPage($this->version, $response, $this->solution);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Insights.V1.MetricList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/MetricOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/MetricOptions.php
index 7663927..c2a2358 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/MetricOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/MetricOptions.php
@@ -1,10 +1,16 @@
options['edge'] = $edge;
$this->options['direction'] = $direction;
}
/**
- * The edge
+ * The Edge of this Metric. One of `unknown_edge`, `carrier_edge`, `sip_edge`, `sdk_edge` or `client_edge`.
*
- * @param string $edge The edge
+ * @param string $edge The Edge of this Metric. One of `unknown_edge`, `carrier_edge`, `sip_edge`, `sdk_edge` or `client_edge`.
* @return $this Fluent Builder
*/
- public function setEdge($edge)
+ public function setEdge(string $edge): self
{
$this->options['edge'] = $edge;
return $this;
}
/**
- * The direction
+ * The Direction of this Metric. One of `unknown`, `inbound`, `outbound` or `both`.
*
- * @param string $direction The direction
+ * @param string $direction The Direction of this Metric. One of `unknown`, `inbound`, `outbound` or `both`.
* @return $this Fluent Builder
*/
- public function setDirection($direction)
+ public function setDirection(string $direction): self
{
$this->options['direction'] = $direction;
return $this;
@@ -69,14 +85,10 @@ public function setDirection($direction)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Insights.V1.ReadMetricOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Insights.V1.ReadMetricOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/MetricPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/MetricPage.php
index 6c992f0..4477ce3 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/MetricPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/MetricPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return MetricInstance \Twilio\Rest\Insights\V1\Call\MetricInstance
+ */
+ public function buildInstance(array $payload): MetricInstance
{
return new MetricInstance($this->version, $payload, $this->solution['callSid']);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Insights.V1.MetricPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/CallContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/CallContext.php
index 690c643..c8df7f0 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/CallContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/CallContext.php
@@ -2,121 +2,157 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Insights
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Insights\V1;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
-use Twilio\Rest\Insights\V1\Call\CallSummaryList;
-use Twilio\Rest\Insights\V1\Call\EventList;
-use Twilio\Rest\Insights\V1\Call\MetricList;
+use Twilio\ListResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Insights\V1\Call\MetricList;
+use Twilio\Rest\Insights\V1\Call\EventList;
+use Twilio\Rest\Insights\V1\Call\CallSummaryList;
+use Twilio\Rest\Insights\V1\Call\AnnotationList;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property \Twilio\Rest\Insights\V1\Call\EventList $events
- * @property \Twilio\Rest\Insights\V1\Call\MetricList $metrics
- * @property \Twilio\Rest\Insights\V1\Call\CallSummaryList $summary
+ * @property MetricList $metrics
+ * @property EventList $events
+ * @property CallSummaryList $summary
+ * @property AnnotationList $annotation
* @method \Twilio\Rest\Insights\V1\Call\CallSummaryContext summary()
+ * @method \Twilio\Rest\Insights\V1\Call\AnnotationContext annotation()
*/
class CallContext extends InstanceContext
-{
- protected $_events = null;
- protected $_metrics = null;
- protected $_summary = null;
+ {
+ protected $_metrics;
+ protected $_events;
+ protected $_summary;
+ protected $_annotation;
/**
* Initialize the CallContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The sid
- * @return \Twilio\Rest\Insights\V1\CallContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Voice/' . \rawurlencode($sid) . '';
+ $this->uri = '/Voice/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a CallInstance
+ * Fetch the CallInstance
*
* @return CallInstance Fetched CallInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): CallInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
+
+ return new CallInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
);
+ }
+
+
+ /**
+ * Access the metrics
+ */
+ protected function getMetrics(): MetricList
+ {
+ if (!$this->_metrics) {
+ $this->_metrics = new MetricList(
+ $this->version,
+ $this->solution['sid']
+ );
+ }
- return new CallInstance($this->version, $payload, $this->solution['sid']);
+ return $this->_metrics;
}
/**
* Access the events
- *
- * @return \Twilio\Rest\Insights\V1\Call\EventList
*/
- protected function getEvents()
+ protected function getEvents(): EventList
{
if (!$this->_events) {
- $this->_events = new EventList($this->version, $this->solution['sid']);
+ $this->_events = new EventList(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->_events;
}
/**
- * Access the metrics
- *
- * @return \Twilio\Rest\Insights\V1\Call\MetricList
+ * Access the summary
*/
- protected function getMetrics()
+ protected function getSummary(): CallSummaryList
{
- if (!$this->_metrics) {
- $this->_metrics = new MetricList($this->version, $this->solution['sid']);
+ if (!$this->_summary) {
+ $this->_summary = new CallSummaryList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_metrics;
+ return $this->_summary;
}
/**
- * Access the summary
- *
- * @return \Twilio\Rest\Insights\V1\Call\CallSummaryList
+ * Access the annotation
*/
- protected function getSummary()
+ protected function getAnnotation(): AnnotationList
{
- if (!$this->_summary) {
- $this->_summary = new CallSummaryList($this->version, $this->solution['sid']);
+ if (!$this->_annotation) {
+ $this->_annotation = new AnnotationList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_summary;
+ return $this->_annotation;
}
/**
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -131,10 +167,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -149,12 +185,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Insights.V1.CallContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/CallInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/CallInstance.php
index 7dd1c47..0698617 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/CallInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/CallInstance.php
@@ -2,109 +2,126 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Insights
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Insights\V1;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Rest\Insights\V1\Call\MetricList;
+use Twilio\Rest\Insights\V1\Call\EventList;
+use Twilio\Rest\Insights\V1\Call\CallSummaryList;
+use Twilio\Rest\Insights\V1\Call\AnnotationList;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property string $sid
- * @property string $url
- * @property array $links
+ * @property string|null $sid
+ * @property string|null $url
+ * @property array|null $links
*/
class CallInstance extends InstanceResource
{
- protected $_events = null;
- protected $_metrics = null;
- protected $_summary = null;
+ protected $_metrics;
+ protected $_events;
+ protected $_summary;
+ protected $_annotation;
/**
* Initialize the CallInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The sid
- * @return \Twilio\Rest\Insights\V1\CallInstance
+ * @param string $sid
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Insights\V1\CallContext Context for this CallInstance
+ * @return CallContext Context for this CallInstance
*/
- protected function proxy()
+ protected function proxy(): CallContext
{
if (!$this->context) {
- $this->context = new CallContext($this->version, $this->solution['sid']);
+ $this->context = new CallContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a CallInstance
+ * Fetch the CallInstance
*
* @return CallInstance Fetched CallInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): CallInstance
{
+
return $this->proxy()->fetch();
}
/**
- * Access the events
- *
- * @return \Twilio\Rest\Insights\V1\Call\EventList
+ * Access the metrics
*/
- protected function getEvents()
+ protected function getMetrics(): MetricList
{
- return $this->proxy()->events;
+ return $this->proxy()->metrics;
}
/**
- * Access the metrics
- *
- * @return \Twilio\Rest\Insights\V1\Call\MetricList
+ * Access the events
*/
- protected function getMetrics()
+ protected function getEvents(): EventList
{
- return $this->proxy()->metrics;
+ return $this->proxy()->events;
}
/**
* Access the summary
- *
- * @return \Twilio\Rest\Insights\V1\Call\CallSummaryList
*/
- protected function getSummary()
+ protected function getSummary(): CallSummaryList
{
return $this->proxy()->summary;
}
+ /**
+ * Access the annotation
+ */
+ protected function getAnnotation(): AnnotationList
+ {
+ return $this->proxy()->annotation;
+ }
+
/**
* Magic getter to access properties
*
@@ -112,7 +129,7 @@ protected function getSummary()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -131,12 +148,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Insights.V1.CallInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/CallList.php b/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/CallList.php
index ba2dfce..02b0a42 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/CallList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/CallList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Insights
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Insights\V1;
@@ -12,34 +19,38 @@
use Twilio\ListResource;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
+
class CallList extends ListResource
-{
+ {
/**
* Construct the CallList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Insights\V1\CallList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
}
/**
* Constructs a CallContext
*
- * @param string $sid The sid
- * @return \Twilio\Rest\Insights\V1\CallContext
+ * @param string $sid
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): CallContext
{
- return new CallContext($this->version, $sid);
+ return new CallContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -47,8 +58,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Insights.V1.CallList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/CallPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/CallPage.php
index 7046ab3..d351eb3 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/CallPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/CallPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return CallInstance \Twilio\Rest\Insights\V1\CallInstance
+ */
+ public function buildInstance(array $payload): CallInstance
{
return new CallInstance($this->version, $payload);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Insights.V1.CallPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging.php
index dbed5f7..c8a848f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging.php
@@ -1,144 +1,42 @@
baseUrl = 'https://chat.twilio.com';
- }
-
- /**
- * @return \Twilio\Rest\IpMessaging\V1 Version v1 of ip_messaging
- */
- protected function getV1()
- {
- if (!$this->_v1) {
- $this->_v1 = new V1($this);
- }
- return $this->_v1;
- }
-
- /**
- * @return \Twilio\Rest\IpMessaging\V2 Version v2 of ip_messaging
- */
- protected function getV2()
- {
- if (!$this->_v2) {
- $this->_v2 = new V2($this);
- }
- return $this->_v2;
- }
-
- /**
- * Magic getter to lazy load version
- *
- * @param string $name Version to return
- * @return \Twilio\Version The requested version
- * @throws TwilioException For unknown versions
- */
- public function __get($name)
- {
- $method = 'get' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return $this->$method();
- }
-
- throw new TwilioException('Unknown version ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $method = 'context' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return \call_user_func_array(array($this, $method), $arguments);
- }
-
- throw new TwilioException('Unknown context ' . $name);
- }
+class IpMessaging extends IpMessagingBase {
/**
- * @return \Twilio\Rest\IpMessaging\V2\CredentialList
+ * @deprecated Use v2->credentials instead.
*/
- protected function getCredentials()
- {
+ protected function getCredentials(): \Twilio\Rest\IpMessaging\V2\CredentialList {
+ echo "credentials is deprecated. Use v2->credentials instead.";
return $this->v2->credentials;
}
/**
- * @param string $sid The SID of the Credential resource to fetch
- * @return \Twilio\Rest\IpMessaging\V2\CredentialContext
+ * @deprecated Use v2->credentials(\$sid) instead.
+ * @param string $sid The sid
*/
- protected function contextCredentials($sid)
- {
+ protected function contextCredentials(string $sid): \Twilio\Rest\IpMessaging\V2\CredentialContext {
+ echo "credentials(\$sid) is deprecated. Use v2->credentials(\$sid) instead.";
return $this->v2->credentials($sid);
}
/**
- * @return \Twilio\Rest\IpMessaging\V2\ServiceList
+ * @deprecated Use v2->services instead.
*/
- protected function getServices()
- {
+ protected function getServices(): \Twilio\Rest\IpMessaging\V2\ServiceList {
+ echo "services is deprecated. Use v2->services instead.";
return $this->v2->services;
}
/**
- * @param string $sid The SID of the Service resource to fetch
- * @return \Twilio\Rest\IpMessaging\V2\ServiceContext
+ * @deprecated Use v2->services(\$sid) instead.
+ * @param string $sid The sid
*/
- protected function contextServices($sid)
- {
+ protected function contextServices(string $sid): \Twilio\Rest\IpMessaging\V2\ServiceContext {
+ echo "services($sid) is deprecated. Use v2->services(\$sid) instead.";
return $this->v2->services($sid);
}
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.IpMessaging]';
- }
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1.php
index 6e16d39..8bdce1c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1.php
@@ -1,36 +1,42 @@
version = 'v1';
}
- /**
- * @return \Twilio\Rest\IpMessaging\V1\CredentialList
- */
- protected function getCredentials()
+ protected function getCredentials(): CredentialList
{
if (!$this->_credentials) {
$this->_credentials = new CredentialList($this);
@@ -49,10 +52,7 @@ protected function getCredentials()
return $this->_credentials;
}
- /**
- * @return \Twilio\Rest\IpMessaging\V1\ServiceList
- */
- protected function getServices()
+ protected function getServices(): ServiceList
{
if (!$this->_services) {
$this->_services = new ServiceList($this);
@@ -67,7 +67,7 @@ protected function getServices()
* @return \Twilio\ListResource The requested resource
* @throws TwilioException For unknown resource
*/
- public function __get($name)
+ public function __get(string $name)
{
$method = 'get' . \ucfirst($name);
if (\method_exists($this, $method)) {
@@ -82,10 +82,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -100,8 +100,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V1]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/CredentialContext.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/CredentialContext.php
index f4b4e3e..693ff64 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/CredentialContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/CredentialContext.php
@@ -2,110 +2,136 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\IpMessaging\V1;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
class CredentialContext extends InstanceContext
-{
+ {
/**
* Initialize the CredentialContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\IpMessaging\V1\CredentialContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Credentials/' . \rawurlencode($sid) . '';
+ $this->uri = '/Credentials/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a CredentialInstance
+ * Delete the CredentialInstance
*
- * @return CredentialInstance Fetched CredentialInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
- return new CredentialInstance($this->version, $payload, $this->solution['sid']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Update the CredentialInstance
+ * Fetch the CredentialInstance
*
- * @param array|Options $options Optional Arguments
- * @return CredentialInstance Updated CredentialInstance
+ * @return CredentialInstance Fetched CredentialInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): CredentialInstance
{
- $options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'Certificate' => $options['certificate'],
- 'PrivateKey' => $options['privateKey'],
- 'Sandbox' => Serialize::booleanToString($options['sandbox']),
- 'ApiKey' => $options['apiKey'],
- 'Secret' => $options['secret'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
- return new CredentialInstance($this->version, $payload, $this->solution['sid']);
+ return new CredentialInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
- * Deletes the CredentialInstance
+ * Update the CredentialInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return CredentialInstance Updated CredentialInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): CredentialInstance
{
- return $this->version->delete('delete', $this->uri);
+
+ $options = new Values($options);
+
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'Certificate' =>
+ $options['certificate'],
+ 'PrivateKey' =>
+ $options['privateKey'],
+ 'Sandbox' =>
+ Serialize::booleanToString($options['sandbox']),
+ 'ApiKey' =>
+ $options['apiKey'],
+ 'Secret' =>
+ $options['secret'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
+
+ return new CredentialInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.IpMessaging.V1.CredentialContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/CredentialInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/CredentialInstance.php
index 26aa10f..5d216b5 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/CredentialInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/CredentialInstance.php
@@ -2,46 +2,54 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\IpMessaging\V1;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $friendlyName
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $friendlyName
* @property string $type
- * @property string $sandbox
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
+ * @property string|null $sandbox
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
*/
class CredentialInstance extends InstanceResource
{
/**
* Initialize the CredentialInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\IpMessaging\V1\CredentialInstance
+ * @param string $sid
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
@@ -50,59 +58,64 @@ public function __construct(Version $version, array $payload, $sid = null)
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\IpMessaging\V1\CredentialContext Context for this
- * CredentialInstance
+ * @return CredentialContext Context for this CredentialInstance
*/
- protected function proxy()
+ protected function proxy(): CredentialContext
{
if (!$this->context) {
- $this->context = new CredentialContext($this->version, $this->solution['sid']);
+ $this->context = new CredentialContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a CredentialInstance
+ * Delete the CredentialInstance
*
- * @return CredentialInstance Fetched CredentialInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Update the CredentialInstance
+ * Fetch the CredentialInstance
*
- * @param array|Options $options Optional Arguments
- * @return CredentialInstance Updated CredentialInstance
+ * @return CredentialInstance Fetched CredentialInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): CredentialInstance
{
- return $this->proxy()->update($options);
+
+ return $this->proxy()->fetch();
}
/**
- * Deletes the CredentialInstance
+ * Update the CredentialInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return CredentialInstance Updated CredentialInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): CredentialInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->update($options);
}
/**
@@ -112,7 +125,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -131,12 +144,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.IpMessaging.V1.CredentialInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/CredentialList.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/CredentialList.php
index d9647a7..aa8bb9f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/CredentialList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/CredentialList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\IpMessaging\V1;
@@ -12,55 +19,71 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class CredentialList extends ListResource
-{
+ {
/**
* Construct the CredentialList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\IpMessaging\V1\CredentialList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/Credentials';
}
/**
- * Streams CredentialInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the CredentialInstance
*
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @param string $type
+ * @param array|Options $options Optional Arguments
+ * @return CredentialInstance Created CredentialInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($limit = null, $pageSize = null)
+ public function create(string $type, array $options = []): CredentialInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'Type' =>
+ $type,
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'Certificate' =>
+ $options['certificate'],
+ 'PrivateKey' =>
+ $options['privateKey'],
+ 'Sandbox' =>
+ Serialize::booleanToString($options['sandbox']),
+ 'ApiKey' =>
+ $options['apiKey'],
+ 'Secret' =>
+ $options['secret'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new CredentialInstance(
+ $this->version,
+ $payload
+ );
}
+
/**
* Reads CredentialInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -76,11 +99,38 @@ public function stream($limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return CredentialInstance[] Array of results
*/
- public function read($limit = null, $pageSize = null)
+ public function read(int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($limit, $pageSize), false);
}
+ /**
+ * Streams CredentialInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of CredentialInstance records from the API.
* Request is executed immediately
@@ -88,21 +138,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of CredentialInstance
+ * @return CredentialPage Page of CredentialInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): CredentialPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new CredentialPage($this->version, $response, $this->solution);
}
@@ -112,9 +163,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of CredentialInstance
+ * @return CredentialPage Page of CredentialInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): CredentialPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -124,48 +175,21 @@ public function getPage($targetUrl)
return new CredentialPage($this->version, $response, $this->solution);
}
- /**
- * Create a new CredentialInstance
- *
- * @param string $type The type of push-notification service the credential is
- * for
- * @param array|Options $options Optional Arguments
- * @return CredentialInstance Newly created CredentialInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($type, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'Type' => $type,
- 'FriendlyName' => $options['friendlyName'],
- 'Certificate' => $options['certificate'],
- 'PrivateKey' => $options['privateKey'],
- 'Sandbox' => Serialize::booleanToString($options['sandbox']),
- 'ApiKey' => $options['apiKey'],
- 'Secret' => $options['secret'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new CredentialInstance($this->version, $payload);
- }
/**
* Constructs a CredentialContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\IpMessaging\V1\CredentialContext
+ * @param string $sid
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): CredentialContext
{
- return new CredentialContext($this->version, $sid);
+ return new CredentialContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -173,8 +197,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V1.CredentialList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/CredentialOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/CredentialOptions.php
index d145bdc..5682a37 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/CredentialOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/CredentialOptions.php
@@ -1,10 +1,16 @@
options['friendlyName'] = $friendlyName;
$this->options['certificate'] = $certificate;
$this->options['privateKey'] = $privateKey;
@@ -82,84 +114,72 @@ public function __construct($friendlyName = Values::NONE, $certificate = Values:
}
/**
- * A descriptive string that you create to describe the new resource. It can be up to 64 characters long.
+ *
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
}
/**
- * [APN only] The URL encoded representation of the certificate. For example,
- * `-----BEGIN CERTIFICATE-----
- * MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==
- * -----END CERTIFICATE-----`
+ *
*
- * @param string $certificate [APN only] The URL encoded representation of the
- * certificate
+ * @param string $certificate
* @return $this Fluent Builder
*/
- public function setCertificate($certificate)
+ public function setCertificate(string $certificate): self
{
$this->options['certificate'] = $certificate;
return $this;
}
/**
- * [APN only] The URL encoded representation of the private key. For example,
- * `-----BEGIN RSA PRIVATE KEY-----
- * MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR.
- * -----END RSA PRIVATE KEY-----`
+ *
*
- * @param string $privateKey [APN only] The URL encoded representation of the
- * private key
+ * @param string $privateKey
* @return $this Fluent Builder
*/
- public function setPrivateKey($privateKey)
+ public function setPrivateKey(string $privateKey): self
{
$this->options['privateKey'] = $privateKey;
return $this;
}
/**
- * [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production.
+ *
*
- * @param bool $sandbox [APN only] Whether to send the credential to sandbox
- * APNs
+ * @param bool $sandbox
* @return $this Fluent Builder
*/
- public function setSandbox($sandbox)
+ public function setSandbox(bool $sandbox): self
{
$this->options['sandbox'] = $sandbox;
return $this;
}
/**
- * [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential.
+ *
*
- * @param string $apiKey [GCM only] The API key for the project that was
- * obtained from the Google Developer console for your
- * GCM Service application credential
+ * @param string $apiKey
* @return $this Fluent Builder
*/
- public function setApiKey($apiKey)
+ public function setApiKey(string $apiKey): self
{
$this->options['apiKey'] = $apiKey;
return $this;
}
/**
- * [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging.
+ *
*
- * @param string $secret [FCM only] The Server key of your project from
- * Firebase console
+ * @param string $secret
* @return $this Fluent Builder
*/
- public function setSecret($secret)
+ public function setSecret(string $secret): self
{
$this->options['secret'] = $secret;
return $this;
@@ -170,36 +190,36 @@ public function setSecret($secret)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.IpMessaging.V1.CreateCredentialOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.IpMessaging.V1.CreateCredentialOptions ' . $options . ']';
}
}
+
+
+
class UpdateCredentialOptions extends Options
-{
+ {
/**
- * @param string $friendlyName A string to describe the resource
- * @param string $certificate [APN only] The URL encoded representation of the
- * certificate
- * @param string $privateKey [APN only] The URL encoded representation of the
- * private key
- * @param bool $sandbox [APN only] Whether to send the credential to sandbox
- * APNs
- * @param string $apiKey [GCM only] The API key for the project that was
- * obtained from the Google Developer console for your
- * GCM Service application credential
- * @param string $secret [FCM only] The Server key of your project from
- * Firebase console
+ * @param string $friendlyName
+ * @param string $certificate
+ * @param string $privateKey
+ * @param bool $sandbox
+ * @param string $apiKey
+ * @param string $secret
*/
- public function __construct($friendlyName = Values::NONE, $certificate = Values::NONE, $privateKey = Values::NONE, $sandbox = Values::NONE, $apiKey = Values::NONE, $secret = Values::NONE)
- {
+ public function __construct(
+
+ string $friendlyName = Values::NONE,
+ string $certificate = Values::NONE,
+ string $privateKey = Values::NONE,
+ bool $sandbox = Values::BOOL_NONE,
+ string $apiKey = Values::NONE,
+ string $secret = Values::NONE
+
+ ) {
$this->options['friendlyName'] = $friendlyName;
$this->options['certificate'] = $certificate;
$this->options['privateKey'] = $privateKey;
@@ -209,84 +229,72 @@ public function __construct($friendlyName = Values::NONE, $certificate = Values:
}
/**
- * A descriptive string that you create to describe the resource. It can be up to 64 characters long.
+ *
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
}
/**
- * [APN only] The URL encoded representation of the certificate. For example,
- * `-----BEGIN CERTIFICATE-----
- * MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==
- * -----END CERTIFICATE-----`
+ *
*
- * @param string $certificate [APN only] The URL encoded representation of the
- * certificate
+ * @param string $certificate
* @return $this Fluent Builder
*/
- public function setCertificate($certificate)
+ public function setCertificate(string $certificate): self
{
$this->options['certificate'] = $certificate;
return $this;
}
/**
- * [APN only] The URL encoded representation of the private key. For example,
- * `-----BEGIN RSA PRIVATE KEY-----
- * MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR.
- * -----END RSA PRIVATE KEY-----`
+ *
*
- * @param string $privateKey [APN only] The URL encoded representation of the
- * private key
+ * @param string $privateKey
* @return $this Fluent Builder
*/
- public function setPrivateKey($privateKey)
+ public function setPrivateKey(string $privateKey): self
{
$this->options['privateKey'] = $privateKey;
return $this;
}
/**
- * [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production.
+ *
*
- * @param bool $sandbox [APN only] Whether to send the credential to sandbox
- * APNs
+ * @param bool $sandbox
* @return $this Fluent Builder
*/
- public function setSandbox($sandbox)
+ public function setSandbox(bool $sandbox): self
{
$this->options['sandbox'] = $sandbox;
return $this;
}
/**
- * [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential.
+ *
*
- * @param string $apiKey [GCM only] The API key for the project that was
- * obtained from the Google Developer console for your
- * GCM Service application credential
+ * @param string $apiKey
* @return $this Fluent Builder
*/
- public function setApiKey($apiKey)
+ public function setApiKey(string $apiKey): self
{
$this->options['apiKey'] = $apiKey;
return $this;
}
/**
- * [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging.
+ *
*
- * @param string $secret [FCM only] The Server key of your project from
- * Firebase console
+ * @param string $secret
* @return $this Fluent Builder
*/
- public function setSecret($secret)
+ public function setSecret(string $secret): self
{
$this->options['secret'] = $secret;
return $this;
@@ -297,14 +305,10 @@ public function setSecret($secret)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.IpMessaging.V1.UpdateCredentialOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.IpMessaging.V1.UpdateCredentialOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/CredentialPage.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/CredentialPage.php
index d977622..32a8f69 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/CredentialPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/CredentialPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return CredentialInstance \Twilio\Rest\IpMessaging\V1\CredentialInstance
+ */
+ public function buildInstance(array $payload): CredentialInstance
{
return new CredentialInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V1.CredentialPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/InviteContext.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/InviteContext.php
index ce2f413..4dd8bd1 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/InviteContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/InviteContext.php
@@ -2,55 +2,86 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\IpMessaging\V1\Service\Channel;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class InviteContext extends InstanceContext
-{
+ {
/**
* Initialize the InviteContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the resource from
- * @param string $channelSid The SID of the Channel the resource to fetch
- * belongs to
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\IpMessaging\V1\Service\Channel\InviteContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid
+ * @param string $channelSid
+ * @param string $sid
*/
- public function __construct(Version $version, $serviceSid, $channelSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $channelSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'channelSid' =>
+ $channelSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Channels/' . \rawurlencode($channelSid)
+ .'/Invites/' . \rawurlencode($sid)
+ .'';
+ }
+
+ /**
+ * Delete the InviteInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Invites/' . \rawurlencode($sid) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a InviteInstance
+ * Fetch the InviteInstance
*
* @return InviteInstance Fetched InviteInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): InviteInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new InviteInstance(
$this->version,
@@ -61,28 +92,18 @@ public function fetch()
);
}
- /**
- * Deletes the InviteInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.IpMessaging.V1.InviteContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/InviteInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/InviteInstance.php
index c6e1767..335521b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/InviteInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/InviteInstance.php
@@ -2,50 +2,57 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\IpMessaging\V1\Service\Channel;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $channelSid
- * @property string $serviceSid
- * @property string $identity
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $roleSid
- * @property string $createdBy
- * @property string $url
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $channelSid
+ * @property string|null $serviceSid
+ * @property string|null $identity
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $roleSid
+ * @property string|null $createdBy
+ * @property string|null $url
*/
class InviteInstance extends InstanceResource
{
/**
* Initialize the InviteInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $channelSid The SID of the Channel the new resource belongs to
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\IpMessaging\V1\Service\Channel\InviteInstance
+ * @param string $serviceSid
+ * @param string $channelSid
+ * @param string $sid
*/
- public function __construct(Version $version, array $payload, $serviceSid, $channelSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $channelSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'channelSid' => Values::array_get($payload, 'channel_sid'),
@@ -56,24 +63,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $chan
'roleSid' => Values::array_get($payload, 'role_sid'),
'createdBy' => Values::array_get($payload, 'created_by'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'channelSid' => $channelSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\IpMessaging\V1\Service\Channel\InviteContext Context
- * for this
- * InviteInstance
+ * @return InviteContext Context for this InviteInstance
*/
- protected function proxy()
+ protected function proxy(): InviteContext
{
if (!$this->context) {
$this->context = new InviteContext(
@@ -88,25 +89,27 @@ protected function proxy()
}
/**
- * Fetch a InviteInstance
+ * Delete the InviteInstance
*
- * @return InviteInstance Fetched InviteInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the InviteInstance
+ * Fetch the InviteInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return InviteInstance Fetched InviteInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): InviteInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -116,7 +119,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -135,12 +138,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.IpMessaging.V1.InviteInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/InviteList.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/InviteList.php
index 3627fda..3aeadfd 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/InviteList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/InviteList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\IpMessaging\V1\Service\Channel;
@@ -12,52 +19,65 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class InviteList extends ListResource
-{
+ {
/**
* Construct the InviteList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $channelSid The SID of the Channel the new resource belongs to
- * @return \Twilio\Rest\IpMessaging\V1\Service\Channel\InviteList
+ * @param string $serviceSid
+ * @param string $channelSid
*/
- public function __construct(Version $version, $serviceSid, $channelSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid,
+ string $channelSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'channelSid' => $channelSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Invites';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ 'channelSid' =>
+ $channelSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Channels/' . \rawurlencode($channelSid)
+ .'/Invites';
}
/**
- * Create a new InviteInstance
+ * Create the InviteInstance
*
- * @param string $identity The `identity` value that identifies the new
- * resource's User
+ * @param string $identity
* @param array|Options $options Optional Arguments
- * @return InviteInstance Newly created InviteInstance
+ * @return InviteInstance Created InviteInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($identity, $options = array())
+ public function create(string $identity, array $options = []): InviteInstance
{
+
$options = new Values($options);
- $data = Values::of(array('Identity' => $identity, 'RoleSid' => $options['roleSid'],));
+ $data = Values::of([
+ 'Identity' =>
+ $identity,
+ 'RoleSid' =>
+ $options['roleSid'],
+ ]);
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
return new InviteInstance(
$this->version,
@@ -67,82 +87,83 @@ public function create($identity, $options = array())
);
}
+
/**
- * Streams InviteInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Reads InviteInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
+ * @param int $limit Upper limit for the number of records to return. read()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
+ * page_size is defined but a limit is defined, read()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return InviteInstance[] Array of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($options, $limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
- * Reads InviteInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
+ * Streams InviteInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
+ * @param int $limit Upper limit for the number of records to return. stream()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
+ * page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return InviteInstance[] Array of results
+ * @return Stream stream of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
/**
* Retrieve a single page of InviteInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of InviteInstance
+ * @return InvitePage Page of InviteInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): InvitePage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Identity' => Serialize::map($options['identity'], function ($e) {
- return $e;
- }),
+
+ $params = Values::of([
+ 'Identity' =>
+ Serialize::map($options['identity'], function ($e) { return $e; }),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new InvitePage($this->version, $response, $this->solution);
}
@@ -152,9 +173,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of InviteInstance
+ * @return InvitePage Page of InviteInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): InvitePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -164,13 +185,16 @@ public function getPage($targetUrl)
return new InvitePage($this->version, $response, $this->solution);
}
+
/**
* Constructs a InviteContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\IpMessaging\V1\Service\Channel\InviteContext
+ * @param string $sid
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): InviteContext
{
return new InviteContext(
$this->version,
@@ -185,8 +209,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V1.InviteList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/InviteOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/InviteOptions.php
index 4a94b71..1e7602a 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/InviteOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/InviteOptions.php
@@ -1,10 +1,16 @@
options['roleSid'] = $roleSid;
}
/**
- * The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to the new member.
+ *
*
- * @param string $roleSid The Role assigned to the new member
+ * @param string $roleSid
* @return $this Fluent Builder
*/
- public function setRoleSid($roleSid)
+ public function setRoleSid(string $roleSid): self
{
$this->options['roleSid'] = $roleSid;
return $this;
@@ -60,35 +84,35 @@ public function setRoleSid($roleSid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.IpMessaging.V1.CreateInviteOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.IpMessaging.V1.CreateInviteOptions ' . $options . ']';
}
}
+
+
class ReadInviteOptions extends Options
-{
+ {
/**
- * @param string $identity The `identity` value of the resources to read
+ * @param string[] $identity
*/
- public function __construct($identity = Values::NONE)
- {
+ public function __construct(
+
+ array $identity = Values::ARRAY_NONE
+
+ ) {
$this->options['identity'] = $identity;
}
/**
- * The [User](https://www.twilio.com/docs/api/chat/rest/v1/user)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more details.
+ *
*
- * @param string $identity The `identity` value of the resources to read
+ * @param string[] $identity
* @return $this Fluent Builder
*/
- public function setIdentity($identity)
+ public function setIdentity(array $identity): self
{
$this->options['identity'] = $identity;
return $this;
@@ -99,14 +123,10 @@ public function setIdentity($identity)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.IpMessaging.V1.ReadInviteOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.IpMessaging.V1.ReadInviteOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/InvitePage.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/InvitePage.php
index d6612db..54537fb 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/InvitePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/InvitePage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return InviteInstance \Twilio\Rest\IpMessaging\V1\Service\Channel\InviteInstance
+ */
+ public function buildInstance(array $payload): InviteInstance
{
- return new InviteInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['channelSid']
- );
+ return new InviteInstance($this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V1.InvitePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MemberContext.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MemberContext.php
index b9b7584..d37652d 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MemberContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MemberContext.php
@@ -2,55 +2,87 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\IpMessaging\V1\Service\Channel;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class MemberContext extends InstanceContext
-{
+ {
/**
* Initialize the MemberContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the resource from
- * @param string $channelSid The unique ID of the channel the member belongs to
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\IpMessaging\V1\Service\Channel\MemberContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid
+ * @param string $channelSid
+ * @param string $sid
*/
- public function __construct(Version $version, $serviceSid, $channelSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $channelSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'channelSid' =>
+ $channelSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Members/' . \rawurlencode($sid) . '';
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Channels/' . \rawurlencode($channelSid)
+ .'/Members/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a MemberInstance
+ * Delete the MemberInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
+ }
+
+
+ /**
+ * Fetch the MemberInstance
*
* @return MemberInstance Fetched MemberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): MemberInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new MemberInstance(
$this->version,
@@ -61,16 +93,6 @@ public function fetch()
);
}
- /**
- * Deletes the MemberInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Update the MemberInstance
@@ -79,21 +101,20 @@ public function delete()
* @return MemberInstance Updated MemberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): MemberInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'RoleSid' => $options['roleSid'],
- 'LastConsumedMessageIndex' => $options['lastConsumedMessageIndex'],
- ));
+ $data = Values::of([
+ 'RoleSid' =>
+ $options['roleSid'],
+ 'LastConsumedMessageIndex' =>
+ $options['lastConsumedMessageIndex'],
+ ]);
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new MemberInstance(
$this->version,
@@ -104,17 +125,18 @@ public function update($options = array())
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.IpMessaging.V1.MemberContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MemberInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MemberInstance.php
index 58e50ac..c46b98f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MemberInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MemberInstance.php
@@ -2,52 +2,59 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\IpMessaging\V1\Service\Channel;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $channelSid
- * @property string $serviceSid
- * @property string $identity
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $roleSid
- * @property int $lastConsumedMessageIndex
- * @property \DateTime $lastConsumptionTimestamp
- * @property string $url
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $channelSid
+ * @property string|null $serviceSid
+ * @property string|null $identity
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $roleSid
+ * @property int|null $lastConsumedMessageIndex
+ * @property \DateTime|null $lastConsumptionTimestamp
+ * @property string|null $url
*/
class MemberInstance extends InstanceResource
{
/**
* Initialize the MemberInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $channelSid The unique ID of the Channel for the member
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\IpMessaging\V1\Service\Channel\MemberInstance
+ * @param string $serviceSid
+ * @param string $channelSid
+ * @param string $sid
*/
- public function __construct(Version $version, array $payload, $serviceSid, $channelSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $channelSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'channelSid' => Values::array_get($payload, 'channel_sid'),
@@ -59,24 +66,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $chan
'lastConsumedMessageIndex' => Values::array_get($payload, 'last_consumed_message_index'),
'lastConsumptionTimestamp' => Deserialize::dateTime(Values::array_get($payload, 'last_consumption_timestamp')),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'channelSid' => $channelSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\IpMessaging\V1\Service\Channel\MemberContext Context
- * for this
- * MemberInstance
+ * @return MemberContext Context for this MemberInstance
*/
- protected function proxy()
+ protected function proxy(): MemberContext
{
if (!$this->context) {
$this->context = new MemberContext(
@@ -91,25 +92,27 @@ protected function proxy()
}
/**
- * Fetch a MemberInstance
+ * Delete the MemberInstance
*
- * @return MemberInstance Fetched MemberInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the MemberInstance
+ * Fetch the MemberInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return MemberInstance Fetched MemberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): MemberInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -119,8 +122,9 @@ public function delete()
* @return MemberInstance Updated MemberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): MemberInstance
{
+
return $this->proxy()->update($options);
}
@@ -131,7 +135,7 @@ public function update($options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -150,12 +154,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.IpMessaging.V1.MemberInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MemberList.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MemberList.php
index e387660..27ca55a 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MemberList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MemberList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\IpMessaging\V1\Service\Channel;
@@ -12,52 +19,65 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class MemberList extends ListResource
-{
+ {
/**
* Construct the MemberList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $channelSid The unique ID of the Channel for the member
- * @return \Twilio\Rest\IpMessaging\V1\Service\Channel\MemberList
+ * @param string $serviceSid
+ * @param string $channelSid
*/
- public function __construct(Version $version, $serviceSid, $channelSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid,
+ string $channelSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'channelSid' => $channelSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Members';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ 'channelSid' =>
+ $channelSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Channels/' . \rawurlencode($channelSid)
+ .'/Members';
}
/**
- * Create a new MemberInstance
+ * Create the MemberInstance
*
- * @param string $identity The `identity` value that identifies the new
- * resource's User
+ * @param string $identity
* @param array|Options $options Optional Arguments
- * @return MemberInstance Newly created MemberInstance
+ * @return MemberInstance Created MemberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($identity, $options = array())
+ public function create(string $identity, array $options = []): MemberInstance
{
+
$options = new Values($options);
- $data = Values::of(array('Identity' => $identity, 'RoleSid' => $options['roleSid'],));
+ $data = Values::of([
+ 'Identity' =>
+ $identity,
+ 'RoleSid' =>
+ $options['roleSid'],
+ ]);
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
return new MemberInstance(
$this->version,
@@ -67,82 +87,83 @@ public function create($identity, $options = array())
);
}
+
/**
- * Streams MemberInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Reads MemberInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
+ * @param int $limit Upper limit for the number of records to return. read()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
+ * page_size is defined but a limit is defined, read()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return MemberInstance[] Array of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($options, $limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
- * Reads MemberInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
+ * Streams MemberInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
+ * @param int $limit Upper limit for the number of records to return. stream()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
+ * page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return MemberInstance[] Array of results
+ * @return Stream stream of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
/**
* Retrieve a single page of MemberInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of MemberInstance
+ * @return MemberPage Page of MemberInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): MemberPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Identity' => Serialize::map($options['identity'], function ($e) {
- return $e;
- }),
+
+ $params = Values::of([
+ 'Identity' =>
+ Serialize::map($options['identity'], function ($e) { return $e; }),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new MemberPage($this->version, $response, $this->solution);
}
@@ -152,9 +173,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of MemberInstance
+ * @return MemberPage Page of MemberInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): MemberPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -164,13 +185,16 @@ public function getPage($targetUrl)
return new MemberPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a MemberContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\IpMessaging\V1\Service\Channel\MemberContext
+ * @param string $sid
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): MemberContext
{
return new MemberContext(
$this->version,
@@ -185,8 +209,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V1.MemberList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MemberOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MemberOptions.php
index 1579eed..5b29dc0 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MemberOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MemberOptions.php
@@ -1,10 +1,16 @@
options['roleSid'] = $roleSid;
}
/**
- * The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/api/services).
+ *
*
- * @param string $roleSid The SID of the Role to assign to the member
+ * @param string $roleSid
* @return $this Fluent Builder
*/
- public function setRoleSid($roleSid)
+ public function setRoleSid(string $roleSid): self
{
$this->options['roleSid'] = $roleSid;
return $this;
@@ -71,35 +102,35 @@ public function setRoleSid($roleSid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.IpMessaging.V1.CreateMemberOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.IpMessaging.V1.CreateMemberOptions ' . $options . ']';
}
}
+
+
class ReadMemberOptions extends Options
-{
+ {
/**
- * @param string $identity The `identity` value of the resources to read
+ * @param string[] $identity
*/
- public function __construct($identity = Values::NONE)
- {
+ public function __construct(
+
+ array $identity = Values::ARRAY_NONE
+
+ ) {
$this->options['identity'] = $identity;
}
/**
- * The [User](https://www.twilio.com/docs/api/chat/rest/v1/user)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/api/chat/guides/create-tokens) for more details.
+ *
*
- * @param string $identity The `identity` value of the resources to read
+ * @param string[] $identity
* @return $this Fluent Builder
*/
- public function setIdentity($identity)
+ public function setIdentity(array $identity): self
{
$this->options['identity'] = $identity;
return $this;
@@ -110,51 +141,48 @@ public function setIdentity($identity)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.IpMessaging.V1.ReadMemberOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.IpMessaging.V1.ReadMemberOptions ' . $options . ']';
}
}
class UpdateMemberOptions extends Options
-{
+ {
/**
- * @param string $roleSid The SID of the Role to assign to the member
- * @param int $lastConsumedMessageIndex The index of the last consumed Message
- * for the Channel for the Member
+ * @param string $roleSid
+ * @param int $lastConsumedMessageIndex
*/
- public function __construct($roleSid = Values::NONE, $lastConsumedMessageIndex = Values::NONE)
- {
+ public function __construct(
+
+ string $roleSid = Values::NONE,
+ int $lastConsumedMessageIndex = Values::INT_NONE
+
+ ) {
$this->options['roleSid'] = $roleSid;
$this->options['lastConsumedMessageIndex'] = $lastConsumedMessageIndex;
}
/**
- * The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/api/services).
+ *
*
- * @param string $roleSid The SID of the Role to assign to the member
+ * @param string $roleSid
* @return $this Fluent Builder
*/
- public function setRoleSid($roleSid)
+ public function setRoleSid(string $roleSid): self
{
$this->options['roleSid'] = $roleSid;
return $this;
}
/**
- * The index of the last [Message](https://www.twilio.com/docs/api/chat/rest/messages) that the Member has read within the [Channel](https://www.twilio.com/docs/api/chat/rest/channels).
+ *
*
- * @param int $lastConsumedMessageIndex The index of the last consumed Message
- * for the Channel for the Member
+ * @param int $lastConsumedMessageIndex
* @return $this Fluent Builder
*/
- public function setLastConsumedMessageIndex($lastConsumedMessageIndex)
+ public function setLastConsumedMessageIndex(int $lastConsumedMessageIndex): self
{
$this->options['lastConsumedMessageIndex'] = $lastConsumedMessageIndex;
return $this;
@@ -165,14 +193,10 @@ public function setLastConsumedMessageIndex($lastConsumedMessageIndex)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.IpMessaging.V1.UpdateMemberOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.IpMessaging.V1.UpdateMemberOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MemberPage.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MemberPage.php
index 585012f..81fabbe 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MemberPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MemberPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return MemberInstance \Twilio\Rest\IpMessaging\V1\Service\Channel\MemberInstance
+ */
+ public function buildInstance(array $payload): MemberInstance
{
- return new MemberInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['channelSid']
- );
+ return new MemberInstance($this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V1.MemberPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MessageContext.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MessageContext.php
index 1dbddc1..d55dd02 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MessageContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MessageContext.php
@@ -2,56 +2,87 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\IpMessaging\V1\Service\Channel;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class MessageContext extends InstanceContext
-{
+ {
/**
* Initialize the MessageContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the resource from
- * @param string $channelSid The unique ID of the Channel the message to fetch
- * belongs to
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\IpMessaging\V1\Service\Channel\MessageContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid
+ * @param string $channelSid
+ * @param string $sid
*/
- public function __construct(Version $version, $serviceSid, $channelSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $channelSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'channelSid' =>
+ $channelSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Messages/' . \rawurlencode($sid) . '';
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Channels/' . \rawurlencode($channelSid)
+ .'/Messages/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a MessageInstance
+ * Delete the MessageInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
+ }
+
+
+ /**
+ * Fetch the MessageInstance
*
* @return MessageInstance Fetched MessageInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): MessageInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new MessageInstance(
$this->version,
@@ -62,16 +93,6 @@ public function fetch()
);
}
- /**
- * Deletes the MessageInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Update the MessageInstance
@@ -80,18 +101,20 @@ public function delete()
* @return MessageInstance Updated MessageInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): MessageInstance
{
+
$options = new Values($options);
- $data = Values::of(array('Body' => $options['body'], 'Attributes' => $options['attributes'],));
+ $data = Values::of([
+ 'Body' =>
+ $options['body'],
+ 'Attributes' =>
+ $options['attributes'],
+ ]);
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new MessageInstance(
$this->version,
@@ -102,17 +125,18 @@ public function update($options = array())
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.IpMessaging.V1.MessageContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MessageInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MessageInstance.php
index 663f50e..6a9b847 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MessageInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MessageInstance.php
@@ -2,55 +2,61 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\IpMessaging\V1\Service\Channel;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $attributes
- * @property string $serviceSid
- * @property string $to
- * @property string $channelSid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property bool $wasEdited
- * @property string $from
- * @property string $body
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $attributes
+ * @property string|null $serviceSid
+ * @property string|null $to
+ * @property string|null $channelSid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property bool|null $wasEdited
+ * @property string|null $from
+ * @property string|null $body
* @property int $index
- * @property string $url
+ * @property string|null $url
*/
class MessageInstance extends InstanceResource
{
/**
* Initialize the MessageInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $channelSid The unique ID of the Channel the Message resource
- * belongs to
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\IpMessaging\V1\Service\Channel\MessageInstance
+ * @param string $serviceSid
+ * @param string $channelSid
+ * @param string $sid
*/
- public function __construct(Version $version, array $payload, $serviceSid, $channelSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $channelSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'attributes' => Values::array_get($payload, 'attributes'),
@@ -64,24 +70,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $chan
'body' => Values::array_get($payload, 'body'),
'index' => Values::array_get($payload, 'index'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'channelSid' => $channelSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\IpMessaging\V1\Service\Channel\MessageContext Context
- * for this
- * MessageInstance
+ * @return MessageContext Context for this MessageInstance
*/
- protected function proxy()
+ protected function proxy(): MessageContext
{
if (!$this->context) {
$this->context = new MessageContext(
@@ -96,25 +96,27 @@ protected function proxy()
}
/**
- * Fetch a MessageInstance
+ * Delete the MessageInstance
*
- * @return MessageInstance Fetched MessageInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the MessageInstance
+ * Fetch the MessageInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return MessageInstance Fetched MessageInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): MessageInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -124,8 +126,9 @@ public function delete()
* @return MessageInstance Updated MessageInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): MessageInstance
{
+
return $this->proxy()->update($options);
}
@@ -136,7 +139,7 @@ public function update($options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -155,12 +158,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.IpMessaging.V1.MessageInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MessageList.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MessageList.php
index 499e9c6..e9d3db8 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MessageList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MessageList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\IpMessaging\V1\Service\Channel;
@@ -12,55 +19,66 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class MessageList extends ListResource
-{
+ {
/**
* Construct the MessageList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $channelSid The unique ID of the Channel the Message resource
- * belongs to
- * @return \Twilio\Rest\IpMessaging\V1\Service\Channel\MessageList
+ * @param string $serviceSid
+ * @param string $channelSid
*/
- public function __construct(Version $version, $serviceSid, $channelSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid,
+ string $channelSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'channelSid' => $channelSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Messages';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ 'channelSid' =>
+ $channelSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Channels/' . \rawurlencode($channelSid)
+ .'/Messages';
}
/**
- * Create a new MessageInstance
+ * Create the MessageInstance
*
- * @param string $body The message to send to the channel
+ * @param string $body
* @param array|Options $options Optional Arguments
- * @return MessageInstance Newly created MessageInstance
+ * @return MessageInstance Created MessageInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($body, $options = array())
+ public function create(string $body, array $options = []): MessageInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'Body' => $body,
- 'From' => $options['from'],
- 'Attributes' => $options['attributes'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'Body' =>
+ $body,
+ 'From' =>
+ $options['from'],
+ 'Attributes' =>
+ $options['attributes'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
return new MessageInstance(
$this->version,
@@ -70,80 +88,83 @@ public function create($body, $options = array())
);
}
+
/**
- * Streams MessageInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Reads MessageInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
+ * @param int $limit Upper limit for the number of records to return. read()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
+ * page_size is defined but a limit is defined, read()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return MessageInstance[] Array of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($options, $limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
- * Reads MessageInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
+ * Streams MessageInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
+ * @param int $limit Upper limit for the number of records to return. stream()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
+ * page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return MessageInstance[] Array of results
+ * @return Stream stream of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
/**
* Retrieve a single page of MessageInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of MessageInstance
+ * @return MessagePage Page of MessageInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): MessagePage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Order' => $options['order'],
+
+ $params = Values::of([
+ 'Order' =>
+ $options['order'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new MessagePage($this->version, $response, $this->solution);
}
@@ -153,9 +174,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of MessageInstance
+ * @return MessagePage Page of MessageInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): MessagePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -165,13 +186,16 @@ public function getPage($targetUrl)
return new MessagePage($this->version, $response, $this->solution);
}
+
/**
* Constructs a MessageContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\IpMessaging\V1\Service\Channel\MessageContext
+ * @param string $sid
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): MessageContext
{
return new MessageContext(
$this->version,
@@ -186,8 +210,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V1.MessageList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MessageOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MessageOptions.php
index 25ccf60..e138661 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MessageOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MessageOptions.php
@@ -1,10 +1,16 @@
options['from'] = $from;
$this->options['attributes'] = $attributes;
}
/**
- * The [identity](https://www.twilio.com/docs/api/chat/guides/identity) of the new message's author. The default value is `system`.
+ *
*
- * @param string $from The identity of the new message's author
+ * @param string $from
* @return $this Fluent Builder
*/
- public function setFrom($from)
+ public function setFrom(string $from): self
{
$this->options['from'] = $from;
return $this;
}
/**
- * A valid JSON string that contains application-specific data.
+ *
*
- * @param string $attributes A valid JSON string that contains
- * application-specific data
+ * @param string $attributes
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setAttributes(string $attributes): self
{
$this->options['attributes'] = $attributes;
return $this;
@@ -89,35 +120,35 @@ public function setAttributes($attributes)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.IpMessaging.V1.CreateMessageOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.IpMessaging.V1.CreateMessageOptions ' . $options . ']';
}
}
+
+
class ReadMessageOptions extends Options
-{
+ {
/**
- * @param string $order The sort order of the returned messages
+ * @param string $order
*/
- public function __construct($order = Values::NONE)
- {
+ public function __construct(
+
+ string $order = Values::NONE
+
+ ) {
$this->options['order'] = $order;
}
/**
- * The sort order of the returned messages. Can be: `asc` (ascending) or `desc` (descending) with `asc` as the default.
+ *
*
- * @param string $order The sort order of the returned messages
+ * @param string $order
* @return $this Fluent Builder
*/
- public function setOrder($order)
+ public function setOrder(string $order): self
{
$this->options['order'] = $order;
return $this;
@@ -128,51 +159,48 @@ public function setOrder($order)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.IpMessaging.V1.ReadMessageOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.IpMessaging.V1.ReadMessageOptions ' . $options . ']';
}
}
class UpdateMessageOptions extends Options
-{
+ {
/**
- * @param string $body The message to send to the channel
- * @param string $attributes A valid JSON string that contains
- * application-specific data
+ * @param string $body
+ * @param string $attributes
*/
- public function __construct($body = Values::NONE, $attributes = Values::NONE)
- {
+ public function __construct(
+
+ string $body = Values::NONE,
+ string $attributes = Values::NONE
+
+ ) {
$this->options['body'] = $body;
$this->options['attributes'] = $attributes;
}
/**
- * The message to send to the channel. Can also be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string.
+ *
*
- * @param string $body The message to send to the channel
+ * @param string $body
* @return $this Fluent Builder
*/
- public function setBody($body)
+ public function setBody(string $body): self
{
$this->options['body'] = $body;
return $this;
}
/**
- * A valid JSON string that contains application-specific data.
+ *
*
- * @param string $attributes A valid JSON string that contains
- * application-specific data
+ * @param string $attributes
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setAttributes(string $attributes): self
{
$this->options['attributes'] = $attributes;
return $this;
@@ -183,14 +211,10 @@ public function setAttributes($attributes)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.IpMessaging.V1.UpdateMessageOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.IpMessaging.V1.UpdateMessageOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MessagePage.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MessagePage.php
index d1b3ac0..8fd7c90 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MessagePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/Channel/MessagePage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return MessageInstance \Twilio\Rest\IpMessaging\V1\Service\Channel\MessageInstance
+ */
+ public function buildInstance(array $payload): MessageInstance
{
- return new MessageInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['channelSid']
- );
+ return new MessageInstance($this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V1.MessagePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/ChannelContext.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/ChannelContext.php
index 619d014..2b64f6e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/ChannelContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/ChannelContext.php
@@ -2,69 +2,98 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\IpMessaging\V1\Service;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\IpMessaging\V1\Service\Channel\InviteList;
-use Twilio\Rest\IpMessaging\V1\Service\Channel\MemberList;
-use Twilio\Rest\IpMessaging\V1\Service\Channel\MessageList;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\IpMessaging\V1\Service\Channel\MemberList;
+use Twilio\Rest\IpMessaging\V1\Service\Channel\InviteList;
+use Twilio\Rest\IpMessaging\V1\Service\Channel\MessageList;
+
/**
- * @property \Twilio\Rest\IpMessaging\V1\Service\Channel\MemberList $members
- * @property \Twilio\Rest\IpMessaging\V1\Service\Channel\MessageList $messages
- * @property \Twilio\Rest\IpMessaging\V1\Service\Channel\InviteList $invites
+ * @property MemberList $members
+ * @property InviteList $invites
+ * @property MessageList $messages
* @method \Twilio\Rest\IpMessaging\V1\Service\Channel\MemberContext members(string $sid)
* @method \Twilio\Rest\IpMessaging\V1\Service\Channel\MessageContext messages(string $sid)
* @method \Twilio\Rest\IpMessaging\V1\Service\Channel\InviteContext invites(string $sid)
*/
class ChannelContext extends InstanceContext
-{
- protected $_members = null;
- protected $_messages = null;
- protected $_invites = null;
+ {
+ protected $_members;
+ protected $_invites;
+ protected $_messages;
/**
* Initialize the ChannelContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the resource from
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\IpMessaging\V1\Service\ChannelContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid
+ * @param string $sid
*/
- public function __construct(Version $version, $serviceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Channels/' . \rawurlencode($sid)
+ .'';
+ }
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($sid) . '';
+ /**
+ * Delete the ChannelInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a ChannelInstance
+ * Fetch the ChannelInstance
*
* @return ChannelInstance Fetched ChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): ChannelInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new ChannelInstance(
$this->version,
@@ -74,16 +103,6 @@ public function fetch()
);
}
- /**
- * Deletes the ChannelInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Update the ChannelInstance
@@ -92,22 +111,22 @@ public function delete()
* @return ChannelInstance Updated ChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ChannelInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'UniqueName' => $options['uniqueName'],
- 'Attributes' => $options['attributes'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'UniqueName' =>
+ $options['uniqueName'],
+ 'Attributes' =>
+ $options['attributes'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new ChannelInstance(
$this->version,
@@ -117,12 +136,11 @@ public function update($options = array())
);
}
+
/**
* Access the members
- *
- * @return \Twilio\Rest\IpMessaging\V1\Service\Channel\MemberList
*/
- protected function getMembers()
+ protected function getMembers(): MemberList
{
if (!$this->_members) {
$this->_members = new MemberList(
@@ -136,49 +154,45 @@ protected function getMembers()
}
/**
- * Access the messages
- *
- * @return \Twilio\Rest\IpMessaging\V1\Service\Channel\MessageList
+ * Access the invites
*/
- protected function getMessages()
+ protected function getInvites(): InviteList
{
- if (!$this->_messages) {
- $this->_messages = new MessageList(
+ if (!$this->_invites) {
+ $this->_invites = new InviteList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sid']
);
}
- return $this->_messages;
+ return $this->_invites;
}
/**
- * Access the invites
- *
- * @return \Twilio\Rest\IpMessaging\V1\Service\Channel\InviteList
+ * Access the messages
*/
- protected function getInvites()
+ protected function getMessages(): MessageList
{
- if (!$this->_invites) {
- $this->_invites = new InviteList(
+ if (!$this->_messages) {
+ $this->_messages = new MessageList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sid']
);
}
- return $this->_invites;
+ return $this->_messages;
}
/**
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -193,10 +207,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -211,12 +225,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.IpMessaging.V1.ChannelContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/ChannelInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/ChannelInstance.php
index 648c119..efbf9bf 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/ChannelInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/ChannelInstance.php
@@ -2,58 +2,68 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\IpMessaging\V1\Service;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\IpMessaging\V1\Service\Channel\MemberList;
+use Twilio\Rest\IpMessaging\V1\Service\Channel\InviteList;
+use Twilio\Rest\IpMessaging\V1\Service\Channel\MessageList;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $friendlyName
- * @property string $uniqueName
- * @property string $attributes
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $friendlyName
+ * @property string|null $uniqueName
+ * @property string|null $attributes
* @property string $type
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $createdBy
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $createdBy
* @property int $membersCount
* @property int $messagesCount
- * @property string $url
- * @property array $links
+ * @property string|null $url
+ * @property array|null $links
*/
class ChannelInstance extends InstanceResource
{
- protected $_members = null;
- protected $_messages = null;
- protected $_invites = null;
+ protected $_members;
+ protected $_invites;
+ protected $_messages;
/**
* Initialize the ChannelInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\IpMessaging\V1\Service\ChannelInstance
+ * @param string $serviceSid
+ * @param string $sid
*/
- public function __construct(Version $version, array $payload, $serviceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
@@ -68,19 +78,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $sid
'messagesCount' => Values::array_get($payload, 'messages_count'),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\IpMessaging\V1\Service\ChannelContext Context for this
- * ChannelInstance
+ * @return ChannelContext Context for this ChannelInstance
*/
- protected function proxy()
+ protected function proxy(): ChannelContext
{
if (!$this->context) {
$this->context = new ChannelContext(
@@ -94,25 +103,27 @@ protected function proxy()
}
/**
- * Fetch a ChannelInstance
+ * Delete the ChannelInstance
*
- * @return ChannelInstance Fetched ChannelInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the ChannelInstance
+ * Fetch the ChannelInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return ChannelInstance Fetched ChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): ChannelInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -122,39 +133,34 @@ public function delete()
* @return ChannelInstance Updated ChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ChannelInstance
{
+
return $this->proxy()->update($options);
}
/**
* Access the members
- *
- * @return \Twilio\Rest\IpMessaging\V1\Service\Channel\MemberList
*/
- protected function getMembers()
+ protected function getMembers(): MemberList
{
return $this->proxy()->members;
}
/**
- * Access the messages
- *
- * @return \Twilio\Rest\IpMessaging\V1\Service\Channel\MessageList
+ * Access the invites
*/
- protected function getMessages()
+ protected function getInvites(): InviteList
{
- return $this->proxy()->messages;
+ return $this->proxy()->invites;
}
/**
- * Access the invites
- *
- * @return \Twilio\Rest\IpMessaging\V1\Service\Channel\InviteList
+ * Access the messages
*/
- protected function getInvites()
+ protected function getMessages(): MessageList
{
- return $this->proxy()->invites;
+ return $this->proxy()->messages;
}
/**
@@ -164,7 +170,7 @@ protected function getInvites()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -183,12 +189,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.IpMessaging.V1.ChannelInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/ChannelList.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/ChannelList.php
index 236e358..b8e7fa9 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/ChannelList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/ChannelList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\IpMessaging\V1\Service;
@@ -12,56 +19,89 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class ChannelList extends ListResource
-{
+ {
/**
* Construct the ChannelList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @return \Twilio\Rest\IpMessaging\V1\Service\ChannelList
+ * @param string $serviceSid
*/
- public function __construct(Version $version, $serviceSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Channels';
}
/**
- * Create a new ChannelInstance
+ * Create the ChannelInstance
*
* @param array|Options $options Optional Arguments
- * @return ChannelInstance Newly created ChannelInstance
+ * @return ChannelInstance Created ChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($options = array())
+ public function create(array $options = []): ChannelInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'UniqueName' => $options['uniqueName'],
- 'Attributes' => $options['attributes'],
- 'Type' => $options['type'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'UniqueName' =>
+ $options['uniqueName'],
+ 'Attributes' =>
+ $options['attributes'],
+ 'Type' =>
+ $options['type'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new ChannelInstance(
+ $this->version,
+ $payload,
+ $this->solution['serviceSid']
);
+ }
+
- return new ChannelInstance($this->version, $payload, $this->solution['serviceSid']);
+ /**
+ * Reads ChannelInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return ChannelInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -81,9 +121,9 @@ public function create($options = array())
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -92,54 +132,33 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads ChannelInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return ChannelInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of ChannelInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of ChannelInstance
+ * @return ChannelPage Page of ChannelInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): ChannelPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Type' => Serialize::map($options['type'], function ($e) {
- return $e;
- }),
+
+ $params = Values::of([
+ 'Type' =>
+ $options['type'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new ChannelPage($this->version, $response, $this->solution);
}
@@ -149,9 +168,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of ChannelInstance
+ * @return ChannelPage Page of ChannelInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): ChannelPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -161,15 +180,22 @@ public function getPage($targetUrl)
return new ChannelPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a ChannelContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\IpMessaging\V1\Service\ChannelContext
+ * @param string $sid
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): ChannelContext
{
- return new ChannelContext($this->version, $this->solution['serviceSid'], $sid);
+ return new ChannelContext(
+ $this->version,
+ $this->solution['serviceSid'],
+ $sid
+ );
}
/**
@@ -177,8 +203,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V1.ChannelList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/ChannelOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/ChannelOptions.php
index 2f04fc7..252f116 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/ChannelOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/ChannelOptions.php
@@ -1,10 +1,16 @@
options['friendlyName'] = $friendlyName;
$this->options['uniqueName'] = $uniqueName;
$this->options['attributes'] = $attributes;
@@ -70,50 +107,46 @@ public function __construct($friendlyName = Values::NONE, $uniqueName = Values::
}
/**
- * A descriptive string that you create to describe the new resource. It can be up to 64 characters long.
+ *
*
- * @param string $friendlyName A string to describe the new resource
+ * @param string $friendlyName
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
}
/**
- * An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. This value must be 64 characters or less in length and be unique within the Service.
+ *
*
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the resource
+ * @param string $uniqueName
* @return $this Fluent Builder
*/
- public function setUniqueName($uniqueName)
+ public function setUniqueName(string $uniqueName): self
{
$this->options['uniqueName'] = $uniqueName;
return $this;
}
/**
- * A valid JSON string that contains application-specific data.
+ *
*
- * @param string $attributes A valid JSON string that contains
- * application-specific data
+ * @param string $attributes
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setAttributes(string $attributes): self
{
$this->options['attributes'] = $attributes;
return $this;
}
/**
- * The visibility of the channel. Can be: `public` or `private` and defaults to `public`.
- *
- * @param string $type The visibility of the channel
+ * @param string $type
* @return $this Fluent Builder
*/
- public function setType($type)
+ public function setType(string $type): self
{
$this->options['type'] = $type;
return $this;
@@ -124,35 +157,35 @@ public function setType($type)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.IpMessaging.V1.CreateChannelOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.IpMessaging.V1.CreateChannelOptions ' . $options . ']';
}
}
+
+
class ReadChannelOptions extends Options
-{
+ {
/**
- * @param string $type The visibility of the channel to read
+ * @param string $type
*/
- public function __construct($type = Values::NONE)
- {
+ public function __construct(
+
+ array $type = Values::ARRAY_NONE
+
+ ) {
$this->options['type'] = $type;
}
/**
- * The visibility of the Channels to read. Can be: `public` or `private` and defaults to `public`.
+ *
*
- * @param string $type The visibility of the channel to read
+ * @param string $type
* @return $this Fluent Builder
*/
- public function setType($type)
+ public function setType(array $type): self
{
$this->options['type'] = $type;
return $this;
@@ -163,67 +196,63 @@ public function setType($type)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.IpMessaging.V1.ReadChannelOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.IpMessaging.V1.ReadChannelOptions ' . $options . ']';
}
}
class UpdateChannelOptions extends Options
-{
+ {
/**
- * @param string $friendlyName A string to describe the resource
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the resource
- * @param string $attributes A valid JSON string that contains
- * application-specific data
+ * @param string $friendlyName
+ * @param string $uniqueName
+ * @param string $attributes
*/
- public function __construct($friendlyName = Values::NONE, $uniqueName = Values::NONE, $attributes = Values::NONE)
- {
+ public function __construct(
+
+ string $friendlyName = Values::NONE,
+ string $uniqueName = Values::NONE,
+ string $attributes = Values::NONE
+
+ ) {
$this->options['friendlyName'] = $friendlyName;
$this->options['uniqueName'] = $uniqueName;
$this->options['attributes'] = $attributes;
}
/**
- * A descriptive string that you create to describe the resource. It can be up to 64 characters long.
+ *
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
}
/**
- * An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. This value must be 64 characters or less in length and be unique within the Service.
+ *
*
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the resource
+ * @param string $uniqueName
* @return $this Fluent Builder
*/
- public function setUniqueName($uniqueName)
+ public function setUniqueName(string $uniqueName): self
{
$this->options['uniqueName'] = $uniqueName;
return $this;
}
/**
- * A valid JSON string that contains application-specific data.
+ *
*
- * @param string $attributes A valid JSON string that contains
- * application-specific data
+ * @param string $attributes
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setAttributes(string $attributes): self
{
$this->options['attributes'] = $attributes;
return $this;
@@ -234,14 +263,10 @@ public function setAttributes($attributes)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.IpMessaging.V1.UpdateChannelOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.IpMessaging.V1.UpdateChannelOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/ChannelPage.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/ChannelPage.php
index 9d69591..acfb450 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/ChannelPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/ChannelPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return ChannelInstance \Twilio\Rest\IpMessaging\V1\Service\ChannelInstance
+ */
+ public function buildInstance(array $payload): ChannelInstance
{
return new ChannelInstance($this->version, $payload, $this->solution['serviceSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V1.ChannelPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/RoleContext.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/RoleContext.php
index 76a5f01..69909c2 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/RoleContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/RoleContext.php
@@ -2,54 +2,82 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\IpMessaging\V1\Service;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
class RoleContext extends InstanceContext
-{
+ {
/**
* Initialize the RoleContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the resource from
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\IpMessaging\V1\Service\RoleContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid
+ * @param string $sid
*/
- public function __construct(Version $version, $serviceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Roles/' . \rawurlencode($sid)
+ .'';
+ }
+
+ /**
+ * Delete the RoleInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Roles/' . \rawurlencode($sid) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a RoleInstance
+ * Fetch the RoleInstance
*
* @return RoleInstance Fetched RoleInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): RoleInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new RoleInstance(
$this->version,
@@ -59,36 +87,24 @@ public function fetch()
);
}
- /**
- * Deletes the RoleInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Update the RoleInstance
*
- * @param string $permission A permission the role should have
+ * @param string[] $permission
* @return RoleInstance Updated RoleInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($permission)
+ public function update(array $permission): RoleInstance
{
- $data = Values::of(array('Permission' => Serialize::map($permission, function ($e) {
- return $e;
- }),));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+
+ $data = Values::of([
+ 'Permission' =>
+ Serialize::map($permission,function ($e) { return $e; }),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new RoleInstance(
$this->version,
@@ -98,17 +114,18 @@ public function update($permission)
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.IpMessaging.V1.RoleContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/RoleInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/RoleInstance.php
index bd83932..0d7f3a3 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/RoleInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/RoleInstance.php
@@ -2,48 +2,55 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\IpMessaging\V1\Service;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $friendlyName
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $friendlyName
* @property string $type
- * @property string $permissions
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
+ * @property string[]|null $permissions
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
*/
class RoleInstance extends InstanceResource
{
/**
* Initialize the RoleInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\IpMessaging\V1\Service\RoleInstance
+ * @param string $serviceSid
+ * @param string $sid
*/
- public function __construct(Version $version, array $payload, $serviceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
@@ -53,19 +60,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $sid
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\IpMessaging\V1\Service\RoleContext Context for this
- * RoleInstance
+ * @return RoleContext Context for this RoleInstance
*/
- protected function proxy()
+ protected function proxy(): RoleContext
{
if (!$this->context) {
$this->context = new RoleContext(
@@ -79,36 +85,39 @@ protected function proxy()
}
/**
- * Fetch a RoleInstance
+ * Delete the RoleInstance
*
- * @return RoleInstance Fetched RoleInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the RoleInstance
+ * Fetch the RoleInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return RoleInstance Fetched RoleInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): RoleInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
* Update the RoleInstance
*
- * @param string $permission A permission the role should have
+ * @param string[] $permission
* @return RoleInstance Updated RoleInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($permission)
+ public function update(array $permission): RoleInstance
{
+
return $this->proxy()->update($permission);
}
@@ -119,7 +128,7 @@ public function update($permission)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -138,12 +147,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.IpMessaging.V1.RoleInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/RoleList.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/RoleList.php
index ef4aa09..a9594aa 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/RoleList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/RoleList.php
@@ -2,66 +2,103 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\IpMessaging\V1\Service;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class RoleList extends ListResource
-{
+ {
/**
* Construct the RoleList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @return \Twilio\Rest\IpMessaging\V1\Service\RoleList
+ * @param string $serviceSid
*/
- public function __construct(Version $version, $serviceSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Roles';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Roles';
}
/**
- * Create a new RoleInstance
+ * Create the RoleInstance
*
- * @param string $friendlyName A string to describe the new resource
- * @param string $type The type of role
- * @param string $permission A permission the role should have
- * @return RoleInstance Newly created RoleInstance
+ * @param string $friendlyName
+ * @param string $type
+ * @param string[] $permission
+ * @return RoleInstance Created RoleInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($friendlyName, $type, $permission)
+ public function create(string $friendlyName, string $type, array $permission): RoleInstance
{
- $data = Values::of(array(
- 'FriendlyName' => $friendlyName,
- 'Type' => $type,
- 'Permission' => Serialize::map($permission, function ($e) {
- return $e;
- }),
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+
+ $data = Values::of([
+ 'FriendlyName' =>
+ $friendlyName,
+ 'Type' =>
+ $type,
+ 'Permission' =>
+ Serialize::map($permission,function ($e) { return $e; }),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new RoleInstance(
+ $this->version,
+ $payload,
+ $this->solution['serviceSid']
);
+ }
+
- return new RoleInstance($this->version, $payload, $this->solution['serviceSid']);
+ /**
+ * Reads RoleInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return RoleInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -80,9 +117,9 @@ public function create($friendlyName, $type, $permission)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -91,26 +128,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads RoleInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return RoleInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of RoleInstance records from the API.
* Request is executed immediately
@@ -118,21 +135,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of RoleInstance
+ * @return RolePage Page of RoleInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): RolePage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new RolePage($this->version, $response, $this->solution);
}
@@ -142,9 +160,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of RoleInstance
+ * @return RolePage Page of RoleInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): RolePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -154,15 +172,22 @@ public function getPage($targetUrl)
return new RolePage($this->version, $response, $this->solution);
}
+
/**
* Constructs a RoleContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\IpMessaging\V1\Service\RoleContext
+ * @param string $sid
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): RoleContext
{
- return new RoleContext($this->version, $this->solution['serviceSid'], $sid);
+ return new RoleContext(
+ $this->version,
+ $this->solution['serviceSid'],
+ $sid
+ );
}
/**
@@ -170,8 +195,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V1.RoleList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/RolePage.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/RolePage.php
index 218fae8..f4727d1 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/RolePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/RolePage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return RoleInstance \Twilio\Rest\IpMessaging\V1\Service\RoleInstance
+ */
+ public function buildInstance(array $payload): RoleInstance
{
return new RoleInstance($this->version, $payload, $this->solution['serviceSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V1.RolePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/User/UserChannelInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/User/UserChannelInstance.php
index b8e72f7..56714b7 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/User/UserChannelInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/User/UserChannelInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\IpMessaging\V1\Service\User;
use Twilio\Exceptions\TwilioException;
@@ -14,34 +22,33 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $channelSid
- * @property string $memberSid
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $channelSid
+ * @property string|null $memberSid
* @property string $status
- * @property int $lastConsumedMessageIndex
- * @property int $unreadMessagesCount
- * @property array $links
+ * @property int|null $lastConsumedMessageIndex
+ * @property int|null $unreadMessagesCount
+ * @property array|null $links
*/
class UserChannelInstance extends InstanceResource
{
/**
* Initialize the UserChannelInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $userSid The unique string that identifies the resource
- * @return \Twilio\Rest\IpMessaging\V1\Service\User\UserChannelInstance
+ * @param string $serviceSid
+ * @param string $userSid
*/
- public function __construct(Version $version, array $payload, $serviceSid, $userSid)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $userSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
'channelSid' => Values::array_get($payload, 'channel_sid'),
@@ -50,9 +57,9 @@ public function __construct(Version $version, array $payload, $serviceSid, $user
'lastConsumedMessageIndex' => Values::array_get($payload, 'last_consumed_message_index'),
'unreadMessagesCount' => Values::array_get($payload, 'unread_messages_count'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('serviceSid' => $serviceSid, 'userSid' => $userSid,);
+ $this->solution = ['serviceSid' => $serviceSid, 'userSid' => $userSid, ];
}
/**
@@ -62,7 +69,7 @@ public function __construct(Version $version, array $payload, $serviceSid, $user
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -81,8 +88,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V1.UserChannelInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/User/UserChannelList.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/User/UserChannelList.php
index b37a3af..6034b75 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/User/UserChannelList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/User/UserChannelList.php
@@ -2,36 +2,75 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\IpMessaging\V1\Service\User;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class UserChannelList extends ListResource
-{
+ {
/**
* Construct the UserChannelList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $userSid The unique string that identifies the resource
- * @return \Twilio\Rest\IpMessaging\V1\Service\User\UserChannelList
+ * @param string $serviceSid
+ * @param string $userSid
*/
- public function __construct(Version $version, $serviceSid, $userSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid,
+ string $userSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'userSid' => $userSid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ 'userSid' =>
+ $userSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Users/' . \rawurlencode($userSid)
+ .'/Channels';
+ }
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Users/' . \rawurlencode($userSid) . '/Channels';
+ /**
+ * Reads UserChannelInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return UserChannelInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -50,9 +89,9 @@ public function __construct(Version $version, $serviceSid, $userSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -61,26 +100,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads UserChannelInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return UserChannelInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of UserChannelInstance records from the API.
* Request is executed immediately
@@ -88,21 +107,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of UserChannelInstance
+ * @return UserChannelPage Page of UserChannelInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): UserChannelPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new UserChannelPage($this->version, $response, $this->solution);
}
@@ -112,9 +132,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of UserChannelInstance
+ * @return UserChannelPage Page of UserChannelInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): UserChannelPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -124,13 +144,14 @@ public function getPage($targetUrl)
return new UserChannelPage($this->version, $response, $this->solution);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V1.UserChannelList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/User/UserChannelPage.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/User/UserChannelPage.php
index c4a791f..3ffcc8f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/User/UserChannelPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/User/UserChannelPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return UserChannelInstance \Twilio\Rest\IpMessaging\V1\Service\User\UserChannelInstance
+ */
+ public function buildInstance(array $payload): UserChannelInstance
{
- return new UserChannelInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['userSid']
- );
+ return new UserChannelInstance($this->version, $payload, $this->solution['serviceSid'], $this->solution['userSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V1.UserChannelPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/UserContext.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/UserContext.php
index 1ac5ff5..bda8d09 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/UserContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/UserContext.php
@@ -2,60 +2,89 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\IpMessaging\V1\Service;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\IpMessaging\V1\Service\User\UserChannelList;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\IpMessaging\V1\Service\User\UserChannelList;
+
/**
- * @property \Twilio\Rest\IpMessaging\V1\Service\User\UserChannelList $userChannels
+ * @property UserChannelList $userChannels
*/
class UserContext extends InstanceContext
-{
- protected $_userChannels = null;
+ {
+ protected $_userChannels;
/**
* Initialize the UserContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the resource from
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\IpMessaging\V1\Service\UserContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid
+ * @param string $sid
*/
- public function __construct(Version $version, $serviceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Users/' . \rawurlencode($sid)
+ .'';
+ }
+
+ /**
+ * Delete the UserInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Users/' . \rawurlencode($sid) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a UserInstance
+ * Fetch the UserInstance
*
* @return UserInstance Fetched UserInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): UserInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new UserInstance(
$this->version,
@@ -65,16 +94,6 @@ public function fetch()
);
}
- /**
- * Deletes the UserInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Update the UserInstance
@@ -83,22 +102,22 @@ public function delete()
* @return UserInstance Updated UserInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): UserInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'RoleSid' => $options['roleSid'],
- 'Attributes' => $options['attributes'],
- 'FriendlyName' => $options['friendlyName'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'RoleSid' =>
+ $options['roleSid'],
+ 'Attributes' =>
+ $options['attributes'],
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new UserInstance(
$this->version,
@@ -108,12 +127,11 @@ public function update($options = array())
);
}
+
/**
* Access the userChannels
- *
- * @return \Twilio\Rest\IpMessaging\V1\Service\User\UserChannelList
*/
- protected function getUserChannels()
+ protected function getUserChannels(): UserChannelList
{
if (!$this->_userChannels) {
$this->_userChannels = new UserChannelList(
@@ -130,10 +148,10 @@ protected function getUserChannels()
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -148,10 +166,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -166,12 +184,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.IpMessaging.V1.UserContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/UserInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/UserInstance.php
index cb71e22..5bfd891 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/UserInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/UserInstance.php
@@ -2,56 +2,64 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\IpMessaging\V1\Service;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\IpMessaging\V1\Service\User\UserChannelList;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $attributes
- * @property string $friendlyName
- * @property string $roleSid
- * @property string $identity
- * @property bool $isOnline
- * @property bool $isNotifiable
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $attributes
+ * @property string|null $friendlyName
+ * @property string|null $roleSid
+ * @property string|null $identity
+ * @property bool|null $isOnline
+ * @property bool|null $isNotifiable
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
* @property int $joinedChannelsCount
- * @property array $links
- * @property string $url
+ * @property array|null $links
+ * @property string|null $url
*/
class UserInstance extends InstanceResource
{
- protected $_userChannels = null;
+ protected $_userChannels;
/**
* Initialize the UserInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\IpMessaging\V1\Service\UserInstance
+ * @param string $serviceSid
+ * @param string $sid
*/
- public function __construct(Version $version, array $payload, $serviceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
@@ -66,19 +74,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $sid
'joinedChannelsCount' => Values::array_get($payload, 'joined_channels_count'),
'links' => Values::array_get($payload, 'links'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\IpMessaging\V1\Service\UserContext Context for this
- * UserInstance
+ * @return UserContext Context for this UserInstance
*/
- protected function proxy()
+ protected function proxy(): UserContext
{
if (!$this->context) {
$this->context = new UserContext(
@@ -92,25 +99,27 @@ protected function proxy()
}
/**
- * Fetch a UserInstance
+ * Delete the UserInstance
*
- * @return UserInstance Fetched UserInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the UserInstance
+ * Fetch the UserInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return UserInstance Fetched UserInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): UserInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -120,17 +129,16 @@ public function delete()
* @return UserInstance Updated UserInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): UserInstance
{
+
return $this->proxy()->update($options);
}
/**
* Access the userChannels
- *
- * @return \Twilio\Rest\IpMessaging\V1\Service\User\UserChannelList
*/
- protected function getUserChannels()
+ protected function getUserChannels(): UserChannelList
{
return $this->proxy()->userChannels;
}
@@ -142,7 +150,7 @@ protected function getUserChannels()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -161,12 +169,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.IpMessaging.V1.UserInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/UserList.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/UserList.php
index e65497f..3c54966 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/UserList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/UserList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\IpMessaging\V1\Service;
@@ -12,57 +19,89 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class UserList extends ListResource
-{
+ {
/**
* Construct the UserList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @return \Twilio\Rest\IpMessaging\V1\Service\UserList
+ * @param string $serviceSid
*/
- public function __construct(Version $version, $serviceSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Users';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Users';
}
/**
- * Create a new UserInstance
+ * Create the UserInstance
*
- * @param string $identity The `identity` value that identifies the new
- * resource's User
+ * @param string $identity
* @param array|Options $options Optional Arguments
- * @return UserInstance Newly created UserInstance
+ * @return UserInstance Created UserInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($identity, $options = array())
+ public function create(string $identity, array $options = []): UserInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'Identity' => $identity,
- 'RoleSid' => $options['roleSid'],
- 'Attributes' => $options['attributes'],
- 'FriendlyName' => $options['friendlyName'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'Identity' =>
+ $identity,
+ 'RoleSid' =>
+ $options['roleSid'],
+ 'Attributes' =>
+ $options['attributes'],
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new UserInstance(
+ $this->version,
+ $payload,
+ $this->solution['serviceSid']
);
+ }
- return new UserInstance($this->version, $payload, $this->solution['serviceSid']);
+
+ /**
+ * Reads UserInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return UserInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -81,9 +120,9 @@ public function create($identity, $options = array())
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -92,26 +131,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads UserInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return UserInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of UserInstance records from the API.
* Request is executed immediately
@@ -119,21 +138,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of UserInstance
+ * @return UserPage Page of UserInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): UserPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new UserPage($this->version, $response, $this->solution);
}
@@ -143,9 +163,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of UserInstance
+ * @return UserPage Page of UserInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): UserPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -155,15 +175,22 @@ public function getPage($targetUrl)
return new UserPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a UserContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\IpMessaging\V1\Service\UserContext
+ * @param string $sid
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): UserContext
{
- return new UserContext($this->version, $this->solution['serviceSid'], $sid);
+ return new UserContext(
+ $this->version,
+ $this->solution['serviceSid'],
+ $sid
+ );
}
/**
@@ -171,8 +198,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V1.UserList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/UserOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/UserOptions.php
index 49e2887..53f9770 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/UserOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/UserOptions.php
@@ -1,10 +1,16 @@
options['roleSid'] = $roleSid;
$this->options['attributes'] = $attributes;
$this->options['friendlyName'] = $friendlyName;
}
/**
- * The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to the new User.
+ *
*
- * @param string $roleSid The SID of the Role assigned to this user
+ * @param string $roleSid
* @return $this Fluent Builder
*/
- public function setRoleSid($roleSid)
+ public function setRoleSid(string $roleSid): self
{
$this->options['roleSid'] = $roleSid;
return $this;
}
/**
- * A valid JSON string that contains application-specific data.
+ *
*
- * @param string $attributes A valid JSON string that contains
- * application-specific data
+ * @param string $attributes
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setAttributes(string $attributes): self
{
$this->options['attributes'] = $attributes;
return $this;
}
/**
- * A descriptive string that you create to describe the new resource. This value is often used for display purposes.
+ *
*
- * @param string $friendlyName A string to describe the new resource
+ * @param string $friendlyName
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -96,65 +127,66 @@ public function setFriendlyName($friendlyName)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.IpMessaging.V1.CreateUserOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.IpMessaging.V1.CreateUserOptions ' . $options . ']';
}
}
+
+
+
class UpdateUserOptions extends Options
-{
+ {
/**
- * @param string $roleSid The SID id of the Role assigned to this user
- * @param string $attributes A valid JSON string that contains
- * application-specific data
- * @param string $friendlyName A string to describe the resource
+ * @param string $roleSid
+ * @param string $attributes
+ * @param string $friendlyName
*/
- public function __construct($roleSid = Values::NONE, $attributes = Values::NONE, $friendlyName = Values::NONE)
- {
+ public function __construct(
+
+ string $roleSid = Values::NONE,
+ string $attributes = Values::NONE,
+ string $friendlyName = Values::NONE
+
+ ) {
$this->options['roleSid'] = $roleSid;
$this->options['attributes'] = $attributes;
$this->options['friendlyName'] = $friendlyName;
}
/**
- * The SID of the [Role](https://www.twilio.com/docs/api/chat/rest/roles) assigned to this user.
+ *
*
- * @param string $roleSid The SID id of the Role assigned to this user
+ * @param string $roleSid
* @return $this Fluent Builder
*/
- public function setRoleSid($roleSid)
+ public function setRoleSid(string $roleSid): self
{
$this->options['roleSid'] = $roleSid;
return $this;
}
/**
- * A valid JSON string that contains application-specific data.
+ *
*
- * @param string $attributes A valid JSON string that contains
- * application-specific data
+ * @param string $attributes
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setAttributes(string $attributes): self
{
$this->options['attributes'] = $attributes;
return $this;
}
/**
- * A descriptive string that you create to describe the resource. It is often used for display purposes.
+ *
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -165,14 +197,10 @@ public function setFriendlyName($friendlyName)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.IpMessaging.V1.UpdateUserOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.IpMessaging.V1.UpdateUserOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/UserPage.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/UserPage.php
index cf4183d..bd3cb15 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/UserPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/Service/UserPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return UserInstance \Twilio\Rest\IpMessaging\V1\Service\UserInstance
+ */
+ public function buildInstance(array $payload): UserInstance
{
return new UserInstance($this->version, $payload, $this->solution['serviceSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V1.UserPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/ServiceContext.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/ServiceContext.php
index bc76acb..37f0a37 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/ServiceContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/ServiceContext.php
@@ -2,84 +2,103 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\IpMessaging\V1;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
+use Twilio\Values;
+use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
use Twilio\Rest\IpMessaging\V1\Service\ChannelList;
use Twilio\Rest\IpMessaging\V1\Service\RoleList;
use Twilio\Rest\IpMessaging\V1\Service\UserList;
-use Twilio\Serialize;
-use Twilio\Values;
-use Twilio\Version;
+
/**
- * @property \Twilio\Rest\IpMessaging\V1\Service\ChannelList $channels
- * @property \Twilio\Rest\IpMessaging\V1\Service\RoleList $roles
- * @property \Twilio\Rest\IpMessaging\V1\Service\UserList $users
+ * @property ChannelList $channels
+ * @property RoleList $roles
+ * @property UserList $users
* @method \Twilio\Rest\IpMessaging\V1\Service\ChannelContext channels(string $sid)
* @method \Twilio\Rest\IpMessaging\V1\Service\RoleContext roles(string $sid)
* @method \Twilio\Rest\IpMessaging\V1\Service\UserContext users(string $sid)
*/
class ServiceContext extends InstanceContext
-{
- protected $_channels = null;
- protected $_roles = null;
- protected $_users = null;
+ {
+ protected $_channels;
+ protected $_roles;
+ protected $_users;
/**
* Initialize the ServiceContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\IpMessaging\V1\ServiceContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Services/' . \rawurlencode($sid) . '';
+ $this->uri = '/Services/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a ServiceInstance
+ * Delete the ServiceInstance
*
- * @return ServiceInstance Fetched ServiceInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
- return new ServiceInstance($this->version, $payload, $this->solution['sid']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Deletes the ServiceInstance
+ * Fetch the ServiceInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return ServiceInstance Fetched ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): ServiceInstance
{
- return $this->version->delete('delete', $this->uri);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
+
+ return new ServiceInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Update the ServiceInstance
*
@@ -87,88 +106,143 @@ public function delete()
* @return ServiceInstance Updated ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ServiceInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'DefaultServiceRoleSid' => $options['defaultServiceRoleSid'],
- 'DefaultChannelRoleSid' => $options['defaultChannelRoleSid'],
- 'DefaultChannelCreatorRoleSid' => $options['defaultChannelCreatorRoleSid'],
- 'ReadStatusEnabled' => Serialize::booleanToString($options['readStatusEnabled']),
- 'ReachabilityEnabled' => Serialize::booleanToString($options['reachabilityEnabled']),
- 'TypingIndicatorTimeout' => $options['typingIndicatorTimeout'],
- 'ConsumptionReportInterval' => $options['consumptionReportInterval'],
- 'Notifications.NewMessage.Enabled' => Serialize::booleanToString($options['notificationsNewMessageEnabled']),
- 'Notifications.NewMessage.Template' => $options['notificationsNewMessageTemplate'],
- 'Notifications.AddedToChannel.Enabled' => Serialize::booleanToString($options['notificationsAddedToChannelEnabled']),
- 'Notifications.AddedToChannel.Template' => $options['notificationsAddedToChannelTemplate'],
- 'Notifications.RemovedFromChannel.Enabled' => Serialize::booleanToString($options['notificationsRemovedFromChannelEnabled']),
- 'Notifications.RemovedFromChannel.Template' => $options['notificationsRemovedFromChannelTemplate'],
- 'Notifications.InvitedToChannel.Enabled' => Serialize::booleanToString($options['notificationsInvitedToChannelEnabled']),
- 'Notifications.InvitedToChannel.Template' => $options['notificationsInvitedToChannelTemplate'],
- 'PreWebhookUrl' => $options['preWebhookUrl'],
- 'PostWebhookUrl' => $options['postWebhookUrl'],
- 'WebhookMethod' => $options['webhookMethod'],
- 'WebhookFilters' => Serialize::map($options['webhookFilters'], function ($e) {
- return $e;
- }),
- 'Webhooks.OnMessageSend.Url' => $options['webhooksOnMessageSendUrl'],
- 'Webhooks.OnMessageSend.Method' => $options['webhooksOnMessageSendMethod'],
- 'Webhooks.OnMessageUpdate.Url' => $options['webhooksOnMessageUpdateUrl'],
- 'Webhooks.OnMessageUpdate.Method' => $options['webhooksOnMessageUpdateMethod'],
- 'Webhooks.OnMessageRemove.Url' => $options['webhooksOnMessageRemoveUrl'],
- 'Webhooks.OnMessageRemove.Method' => $options['webhooksOnMessageRemoveMethod'],
- 'Webhooks.OnChannelAdd.Url' => $options['webhooksOnChannelAddUrl'],
- 'Webhooks.OnChannelAdd.Method' => $options['webhooksOnChannelAddMethod'],
- 'Webhooks.OnChannelDestroy.Url' => $options['webhooksOnChannelDestroyUrl'],
- 'Webhooks.OnChannelDestroy.Method' => $options['webhooksOnChannelDestroyMethod'],
- 'Webhooks.OnChannelUpdate.Url' => $options['webhooksOnChannelUpdateUrl'],
- 'Webhooks.OnChannelUpdate.Method' => $options['webhooksOnChannelUpdateMethod'],
- 'Webhooks.OnMemberAdd.Url' => $options['webhooksOnMemberAddUrl'],
- 'Webhooks.OnMemberAdd.Method' => $options['webhooksOnMemberAddMethod'],
- 'Webhooks.OnMemberRemove.Url' => $options['webhooksOnMemberRemoveUrl'],
- 'Webhooks.OnMemberRemove.Method' => $options['webhooksOnMemberRemoveMethod'],
- 'Webhooks.OnMessageSent.Url' => $options['webhooksOnMessageSentUrl'],
- 'Webhooks.OnMessageSent.Method' => $options['webhooksOnMessageSentMethod'],
- 'Webhooks.OnMessageUpdated.Url' => $options['webhooksOnMessageUpdatedUrl'],
- 'Webhooks.OnMessageUpdated.Method' => $options['webhooksOnMessageUpdatedMethod'],
- 'Webhooks.OnMessageRemoved.Url' => $options['webhooksOnMessageRemovedUrl'],
- 'Webhooks.OnMessageRemoved.Method' => $options['webhooksOnMessageRemovedMethod'],
- 'Webhooks.OnChannelAdded.Url' => $options['webhooksOnChannelAddedUrl'],
- 'Webhooks.OnChannelAdded.Method' => $options['webhooksOnChannelAddedMethod'],
- 'Webhooks.OnChannelDestroyed.Url' => $options['webhooksOnChannelDestroyedUrl'],
- 'Webhooks.OnChannelDestroyed.Method' => $options['webhooksOnChannelDestroyedMethod'],
- 'Webhooks.OnChannelUpdated.Url' => $options['webhooksOnChannelUpdatedUrl'],
- 'Webhooks.OnChannelUpdated.Method' => $options['webhooksOnChannelUpdatedMethod'],
- 'Webhooks.OnMemberAdded.Url' => $options['webhooksOnMemberAddedUrl'],
- 'Webhooks.OnMemberAdded.Method' => $options['webhooksOnMemberAddedMethod'],
- 'Webhooks.OnMemberRemoved.Url' => $options['webhooksOnMemberRemovedUrl'],
- 'Webhooks.OnMemberRemoved.Method' => $options['webhooksOnMemberRemovedMethod'],
- 'Limits.ChannelMembers' => $options['limitsChannelMembers'],
- 'Limits.UserChannels' => $options['limitsUserChannels'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'DefaultServiceRoleSid' =>
+ $options['defaultServiceRoleSid'],
+ 'DefaultChannelRoleSid' =>
+ $options['defaultChannelRoleSid'],
+ 'DefaultChannelCreatorRoleSid' =>
+ $options['defaultChannelCreatorRoleSid'],
+ 'ReadStatusEnabled' =>
+ Serialize::booleanToString($options['readStatusEnabled']),
+ 'ReachabilityEnabled' =>
+ Serialize::booleanToString($options['reachabilityEnabled']),
+ 'TypingIndicatorTimeout' =>
+ $options['typingIndicatorTimeout'],
+ 'ConsumptionReportInterval' =>
+ $options['consumptionReportInterval'],
+ 'Notifications.NewMessage.Enabled' =>
+ Serialize::booleanToString($options['notificationsNewMessageEnabled']),
+ 'Notifications.NewMessage.Template' =>
+ $options['notificationsNewMessageTemplate'],
+ 'Notifications.AddedToChannel.Enabled' =>
+ Serialize::booleanToString($options['notificationsAddedToChannelEnabled']),
+ 'Notifications.AddedToChannel.Template' =>
+ $options['notificationsAddedToChannelTemplate'],
+ 'Notifications.RemovedFromChannel.Enabled' =>
+ Serialize::booleanToString($options['notificationsRemovedFromChannelEnabled']),
+ 'Notifications.RemovedFromChannel.Template' =>
+ $options['notificationsRemovedFromChannelTemplate'],
+ 'Notifications.InvitedToChannel.Enabled' =>
+ Serialize::booleanToString($options['notificationsInvitedToChannelEnabled']),
+ 'Notifications.InvitedToChannel.Template' =>
+ $options['notificationsInvitedToChannelTemplate'],
+ 'PreWebhookUrl' =>
+ $options['preWebhookUrl'],
+ 'PostWebhookUrl' =>
+ $options['postWebhookUrl'],
+ 'WebhookMethod' =>
+ $options['webhookMethod'],
+ 'WebhookFilters' =>
+ Serialize::map($options['webhookFilters'], function ($e) { return $e; }),
+ 'Webhooks.OnMessageSend.Url' =>
+ $options['webhooksOnMessageSendUrl'],
+ 'Webhooks.OnMessageSend.Method' =>
+ $options['webhooksOnMessageSendMethod'],
+ 'Webhooks.OnMessageUpdate.Url' =>
+ $options['webhooksOnMessageUpdateUrl'],
+ 'Webhooks.OnMessageUpdate.Method' =>
+ $options['webhooksOnMessageUpdateMethod'],
+ 'Webhooks.OnMessageRemove.Url' =>
+ $options['webhooksOnMessageRemoveUrl'],
+ 'Webhooks.OnMessageRemove.Method' =>
+ $options['webhooksOnMessageRemoveMethod'],
+ 'Webhooks.OnChannelAdd.Url' =>
+ $options['webhooksOnChannelAddUrl'],
+ 'Webhooks.OnChannelAdd.Method' =>
+ $options['webhooksOnChannelAddMethod'],
+ 'Webhooks.OnChannelDestroy.Url' =>
+ $options['webhooksOnChannelDestroyUrl'],
+ 'Webhooks.OnChannelDestroy.Method' =>
+ $options['webhooksOnChannelDestroyMethod'],
+ 'Webhooks.OnChannelUpdate.Url' =>
+ $options['webhooksOnChannelUpdateUrl'],
+ 'Webhooks.OnChannelUpdate.Method' =>
+ $options['webhooksOnChannelUpdateMethod'],
+ 'Webhooks.OnMemberAdd.Url' =>
+ $options['webhooksOnMemberAddUrl'],
+ 'Webhooks.OnMemberAdd.Method' =>
+ $options['webhooksOnMemberAddMethod'],
+ 'Webhooks.OnMemberRemove.Url' =>
+ $options['webhooksOnMemberRemoveUrl'],
+ 'Webhooks.OnMemberRemove.Method' =>
+ $options['webhooksOnMemberRemoveMethod'],
+ 'Webhooks.OnMessageSent.Url' =>
+ $options['webhooksOnMessageSentUrl'],
+ 'Webhooks.OnMessageSent.Method' =>
+ $options['webhooksOnMessageSentMethod'],
+ 'Webhooks.OnMessageUpdated.Url' =>
+ $options['webhooksOnMessageUpdatedUrl'],
+ 'Webhooks.OnMessageUpdated.Method' =>
+ $options['webhooksOnMessageUpdatedMethod'],
+ 'Webhooks.OnMessageRemoved.Url' =>
+ $options['webhooksOnMessageRemovedUrl'],
+ 'Webhooks.OnMessageRemoved.Method' =>
+ $options['webhooksOnMessageRemovedMethod'],
+ 'Webhooks.OnChannelAdded.Url' =>
+ $options['webhooksOnChannelAddedUrl'],
+ 'Webhooks.OnChannelAdded.Method' =>
+ $options['webhooksOnChannelAddedMethod'],
+ 'Webhooks.OnChannelDestroyed.Url' =>
+ $options['webhooksOnChannelDestroyedUrl'],
+ 'Webhooks.OnChannelDestroyed.Method' =>
+ $options['webhooksOnChannelDestroyedMethod'],
+ 'Webhooks.OnChannelUpdated.Url' =>
+ $options['webhooksOnChannelUpdatedUrl'],
+ 'Webhooks.OnChannelUpdated.Method' =>
+ $options['webhooksOnChannelUpdatedMethod'],
+ 'Webhooks.OnMemberAdded.Url' =>
+ $options['webhooksOnMemberAddedUrl'],
+ 'Webhooks.OnMemberAdded.Method' =>
+ $options['webhooksOnMemberAddedMethod'],
+ 'Webhooks.OnMemberRemoved.Url' =>
+ $options['webhooksOnMemberRemovedUrl'],
+ 'Webhooks.OnMemberRemoved.Method' =>
+ $options['webhooksOnMemberRemovedMethod'],
+ 'Limits.ChannelMembers' =>
+ $options['limitsChannelMembers'],
+ 'Limits.UserChannels' =>
+ $options['limitsUserChannels'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
- return new ServiceInstance($this->version, $payload, $this->solution['sid']);
+ return new ServiceInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Access the channels
- *
- * @return \Twilio\Rest\IpMessaging\V1\Service\ChannelList
*/
- protected function getChannels()
+ protected function getChannels(): ChannelList
{
if (!$this->_channels) {
- $this->_channels = new ChannelList($this->version, $this->solution['sid']);
+ $this->_channels = new ChannelList(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->_channels;
@@ -176,13 +250,14 @@ protected function getChannels()
/**
* Access the roles
- *
- * @return \Twilio\Rest\IpMessaging\V1\Service\RoleList
*/
- protected function getRoles()
+ protected function getRoles(): RoleList
{
if (!$this->_roles) {
- $this->_roles = new RoleList($this->version, $this->solution['sid']);
+ $this->_roles = new RoleList(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->_roles;
@@ -190,13 +265,14 @@ protected function getRoles()
/**
* Access the users
- *
- * @return \Twilio\Rest\IpMessaging\V1\Service\UserList
*/
- protected function getUsers()
+ protected function getUsers(): UserList
{
if (!$this->_users) {
- $this->_users = new UserList($this->version, $this->solution['sid']);
+ $this->_users = new UserList(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->_users;
@@ -206,10 +282,10 @@ protected function getUsers()
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -224,10 +300,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -242,12 +318,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.IpMessaging.V1.ServiceContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/ServiceInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/ServiceInstance.php
index 54cf4b9..6956f85 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/ServiceInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/ServiceInstance.php
@@ -2,63 +2,74 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\IpMessaging\V1;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\IpMessaging\V1\Service\ChannelList;
+use Twilio\Rest\IpMessaging\V1\Service\RoleList;
+use Twilio\Rest\IpMessaging\V1\Service\UserList;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $friendlyName
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $defaultServiceRoleSid
- * @property string $defaultChannelRoleSid
- * @property string $defaultChannelCreatorRoleSid
- * @property bool $readStatusEnabled
- * @property bool $reachabilityEnabled
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $friendlyName
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $defaultServiceRoleSid
+ * @property string|null $defaultChannelRoleSid
+ * @property string|null $defaultChannelCreatorRoleSid
+ * @property bool|null $readStatusEnabled
+ * @property bool|null $reachabilityEnabled
* @property int $typingIndicatorTimeout
* @property int $consumptionReportInterval
- * @property array $limits
- * @property array $webhooks
- * @property string $preWebhookUrl
- * @property string $postWebhookUrl
- * @property string $webhookMethod
- * @property string $webhookFilters
- * @property array $notifications
- * @property string $url
- * @property array $links
+ * @property array|null $limits
+ * @property array|null $webhooks
+ * @property string|null $preWebhookUrl
+ * @property string|null $postWebhookUrl
+ * @property string|null $webhookMethod
+ * @property string[]|null $webhookFilters
+ * @property array|null $notifications
+ * @property string|null $url
+ * @property array|null $links
*/
class ServiceInstance extends InstanceResource
{
- protected $_channels = null;
- protected $_roles = null;
- protected $_users = null;
+ protected $_channels;
+ protected $_roles;
+ protected $_users;
/**
* Initialize the ServiceInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\IpMessaging\V1\ServiceInstance
+ * @param string $sid
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
@@ -80,47 +91,51 @@ public function __construct(Version $version, array $payload, $sid = null)
'notifications' => Values::array_get($payload, 'notifications'),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\IpMessaging\V1\ServiceContext Context for this
- * ServiceInstance
+ * @return ServiceContext Context for this ServiceInstance
*/
- protected function proxy()
+ protected function proxy(): ServiceContext
{
if (!$this->context) {
- $this->context = new ServiceContext($this->version, $this->solution['sid']);
+ $this->context = new ServiceContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a ServiceInstance
+ * Delete the ServiceInstance
*
- * @return ServiceInstance Fetched ServiceInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the ServiceInstance
+ * Fetch the ServiceInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return ServiceInstance Fetched ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): ServiceInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -130,37 +145,32 @@ public function delete()
* @return ServiceInstance Updated ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ServiceInstance
{
+
return $this->proxy()->update($options);
}
/**
* Access the channels
- *
- * @return \Twilio\Rest\IpMessaging\V1\Service\ChannelList
*/
- protected function getChannels()
+ protected function getChannels(): ChannelList
{
return $this->proxy()->channels;
}
/**
* Access the roles
- *
- * @return \Twilio\Rest\IpMessaging\V1\Service\RoleList
*/
- protected function getRoles()
+ protected function getRoles(): RoleList
{
return $this->proxy()->roles;
}
/**
* Access the users
- *
- * @return \Twilio\Rest\IpMessaging\V1\Service\UserList
*/
- protected function getUsers()
+ protected function getUsers(): UserList
{
return $this->proxy()->users;
}
@@ -172,7 +182,7 @@ protected function getUsers()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -191,12 +201,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.IpMessaging.V1.ServiceInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/ServiceList.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/ServiceList.php
index b8d4632..35c51c8 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/ServiceList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/ServiceList.php
@@ -2,55 +2,89 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\IpMessaging\V1;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class ServiceList extends ListResource
-{
+ {
/**
* Construct the ServiceList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\IpMessaging\V1\ServiceList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/Services';
}
/**
- * Create a new ServiceInstance
+ * Create the ServiceInstance
*
- * @param string $friendlyName A string to describe the resource
- * @return ServiceInstance Newly created ServiceInstance
+ * @param string $friendlyName
+ * @return ServiceInstance Created ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($friendlyName)
+ public function create(string $friendlyName): ServiceInstance
{
- $data = Values::of(array('FriendlyName' => $friendlyName,));
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'FriendlyName' =>
+ $friendlyName,
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new ServiceInstance(
+ $this->version,
+ $payload
);
+ }
- return new ServiceInstance($this->version, $payload);
+
+ /**
+ * Reads ServiceInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return ServiceInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -69,9 +103,9 @@ public function create($friendlyName)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -80,26 +114,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads ServiceInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return ServiceInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of ServiceInstance records from the API.
* Request is executed immediately
@@ -107,21 +121,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of ServiceInstance
+ * @return ServicePage Page of ServiceInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): ServicePage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new ServicePage($this->version, $response, $this->solution);
}
@@ -131,9 +146,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of ServiceInstance
+ * @return ServicePage Page of ServiceInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): ServicePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -143,15 +158,21 @@ public function getPage($targetUrl)
return new ServicePage($this->version, $response, $this->solution);
}
+
/**
* Constructs a ServiceContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\IpMessaging\V1\ServiceContext
+ * @param string $sid
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): ServiceContext
{
- return new ServiceContext($this->version, $sid);
+ return new ServiceContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -159,8 +180,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V1.ServiceList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/ServiceOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/ServiceOptions.php
index 6399cea..202514c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/ServiceOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/ServiceOptions.php
@@ -1,10 +1,16 @@
options['friendlyName'] = $friendlyName;
$this->options['defaultServiceRoleSid'] = $defaultServiceRoleSid;
$this->options['defaultChannelRoleSid'] = $defaultChannelRoleSid;
@@ -382,742 +377,648 @@ public function __construct($friendlyName = Values::NONE, $defaultServiceRoleSid
}
/**
- * A descriptive string that you create to describe the resource. It can be up to 64 characters long.
+ *
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
}
/**
- * The service role assigned to users when they are added to the service. See the [Roles endpoint](https://www.twilio.com/docs/chat/api/roles) for more details.
+ *
*
- * @param string $defaultServiceRoleSid The service role assigned to users when
- * they are added to the service
+ * @param string $defaultServiceRoleSid
* @return $this Fluent Builder
*/
- public function setDefaultServiceRoleSid($defaultServiceRoleSid)
+ public function setDefaultServiceRoleSid(string $defaultServiceRoleSid): self
{
$this->options['defaultServiceRoleSid'] = $defaultServiceRoleSid;
return $this;
}
/**
- * The channel role assigned to users when they are added to a channel. See the [Roles endpoint](https://www.twilio.com/docs/chat/api/roles) for more details.
+ *
*
- * @param string $defaultChannelRoleSid The channel role assigned to users when
- * they are added to a channel
+ * @param string $defaultChannelRoleSid
* @return $this Fluent Builder
*/
- public function setDefaultChannelRoleSid($defaultChannelRoleSid)
+ public function setDefaultChannelRoleSid(string $defaultChannelRoleSid): self
{
$this->options['defaultChannelRoleSid'] = $defaultChannelRoleSid;
return $this;
}
/**
- * The channel role assigned to a channel creator when they join a new channel. See the [Roles endpoint](https://www.twilio.com/docs/chat/api/roles) for more details.
+ *
*
- * @param string $defaultChannelCreatorRoleSid The channel role assigned to a
- * channel creator when they join a
- * new channel
+ * @param string $defaultChannelCreatorRoleSid
* @return $this Fluent Builder
*/
- public function setDefaultChannelCreatorRoleSid($defaultChannelCreatorRoleSid)
+ public function setDefaultChannelCreatorRoleSid(string $defaultChannelCreatorRoleSid): self
{
$this->options['defaultChannelCreatorRoleSid'] = $defaultChannelCreatorRoleSid;
return $this;
}
/**
- * Whether to enable the [Message Consumption Horizon](https://www.twilio.com/docs/chat/consumption-horizon) feature. The default is `true`.
+ *
*
- * @param bool $readStatusEnabled Whether to enable the Message Consumption
- * Horizon feature
+ * @param bool $readStatusEnabled
* @return $this Fluent Builder
*/
- public function setReadStatusEnabled($readStatusEnabled)
+ public function setReadStatusEnabled(bool $readStatusEnabled): self
{
$this->options['readStatusEnabled'] = $readStatusEnabled;
return $this;
}
/**
- * Whether to enable the [Reachability Indicator](https://www.twilio.com/docs/chat/reachability-indicator) for this Service instance. The default is `false`.
+ *
*
- * @param bool $reachabilityEnabled Whether to enable the Reachability
- * Indicator feature for this Service instance
+ * @param bool $reachabilityEnabled
* @return $this Fluent Builder
*/
- public function setReachabilityEnabled($reachabilityEnabled)
+ public function setReachabilityEnabled(bool $reachabilityEnabled): self
{
$this->options['reachabilityEnabled'] = $reachabilityEnabled;
return $this;
}
/**
- * How long in seconds after a `started typing` event until clients should assume that user is no longer typing, even if no `ended typing` message was received. The default is 5 seconds.
+ *
*
- * @param int $typingIndicatorTimeout How long in seconds to wait before
- * assuming the user is no longer typing
+ * @param int $typingIndicatorTimeout
* @return $this Fluent Builder
*/
- public function setTypingIndicatorTimeout($typingIndicatorTimeout)
+ public function setTypingIndicatorTimeout(int $typingIndicatorTimeout): self
{
$this->options['typingIndicatorTimeout'] = $typingIndicatorTimeout;
return $this;
}
/**
- * DEPRECATED. The interval in seconds between consumption reports submission batches from client endpoints.
+ *
*
- * @param int $consumptionReportInterval DEPRECATED
+ * @param int $consumptionReportInterval
* @return $this Fluent Builder
*/
- public function setConsumptionReportInterval($consumptionReportInterval)
+ public function setConsumptionReportInterval(int $consumptionReportInterval): self
{
$this->options['consumptionReportInterval'] = $consumptionReportInterval;
return $this;
}
/**
- * Whether to send a notification when a new message is added to a channel. Can be: `true` or `false` and the default is `false`.
+ *
*
- * @param bool $notificationsNewMessageEnabled Whether to send a notification
- * when a new message is added to a
- * channel
+ * @param bool $notificationsNewMessageEnabled
* @return $this Fluent Builder
*/
- public function setNotificationsNewMessageEnabled($notificationsNewMessageEnabled)
+ public function setNotificationsNewMessageEnabled(bool $notificationsNewMessageEnabled): self
{
$this->options['notificationsNewMessageEnabled'] = $notificationsNewMessageEnabled;
return $this;
}
/**
- * The template to use to create the notification text displayed when a new message is added to a channel and `notifications.new_message.enabled` is `true`.
+ *
*
- * @param string $notificationsNewMessageTemplate The template to use to create
- * the notification text
- * displayed when a new message
- * is added to a channel
+ * @param string $notificationsNewMessageTemplate
* @return $this Fluent Builder
*/
- public function setNotificationsNewMessageTemplate($notificationsNewMessageTemplate)
+ public function setNotificationsNewMessageTemplate(string $notificationsNewMessageTemplate): self
{
$this->options['notificationsNewMessageTemplate'] = $notificationsNewMessageTemplate;
return $this;
}
/**
- * Whether to send a notification when a member is added to a channel. Can be: `true` or `false` and the default is `false`.
+ *
*
- * @param bool $notificationsAddedToChannelEnabled Whether to send a
- * notification when a member
- * is added to a channel
+ * @param bool $notificationsAddedToChannelEnabled
* @return $this Fluent Builder
*/
- public function setNotificationsAddedToChannelEnabled($notificationsAddedToChannelEnabled)
+ public function setNotificationsAddedToChannelEnabled(bool $notificationsAddedToChannelEnabled): self
{
$this->options['notificationsAddedToChannelEnabled'] = $notificationsAddedToChannelEnabled;
return $this;
}
/**
- * The template to use to create the notification text displayed when a member is added to a channel and `notifications.added_to_channel.enabled` is `true`.
+ *
*
- * @param string $notificationsAddedToChannelTemplate The template to use to
- * create the notification
- * text displayed when a
- * member is added to a
- * channel
+ * @param string $notificationsAddedToChannelTemplate
* @return $this Fluent Builder
*/
- public function setNotificationsAddedToChannelTemplate($notificationsAddedToChannelTemplate)
+ public function setNotificationsAddedToChannelTemplate(string $notificationsAddedToChannelTemplate): self
{
$this->options['notificationsAddedToChannelTemplate'] = $notificationsAddedToChannelTemplate;
return $this;
}
/**
- * Whether to send a notification to a user when they are removed from a channel. Can be: `true` or `false` and the default is `false`.
+ *
*
- * @param bool $notificationsRemovedFromChannelEnabled Whether to send a
- * notification to a user
- * when they are removed
- * from a channel
+ * @param bool $notificationsRemovedFromChannelEnabled
* @return $this Fluent Builder
*/
- public function setNotificationsRemovedFromChannelEnabled($notificationsRemovedFromChannelEnabled)
+ public function setNotificationsRemovedFromChannelEnabled(bool $notificationsRemovedFromChannelEnabled): self
{
$this->options['notificationsRemovedFromChannelEnabled'] = $notificationsRemovedFromChannelEnabled;
return $this;
}
/**
- * The template to use to create the notification text displayed to a user when they are removed from a channel and `notifications.removed_from_channel.enabled` is `true`.
+ *
*
- * @param string $notificationsRemovedFromChannelTemplate The template to use
- * to create the
- * notification text
- * displayed to a user
- * when they are removed
+ * @param string $notificationsRemovedFromChannelTemplate
* @return $this Fluent Builder
*/
- public function setNotificationsRemovedFromChannelTemplate($notificationsRemovedFromChannelTemplate)
+ public function setNotificationsRemovedFromChannelTemplate(string $notificationsRemovedFromChannelTemplate): self
{
$this->options['notificationsRemovedFromChannelTemplate'] = $notificationsRemovedFromChannelTemplate;
return $this;
}
/**
- * Whether to send a notification when a user is invited to a channel. Can be: `true` or `false` and the default is `false`.
+ *
*
- * @param bool $notificationsInvitedToChannelEnabled Whether to send a
- * notification when a user
- * is invited to a channel
+ * @param bool $notificationsInvitedToChannelEnabled
* @return $this Fluent Builder
*/
- public function setNotificationsInvitedToChannelEnabled($notificationsInvitedToChannelEnabled)
+ public function setNotificationsInvitedToChannelEnabled(bool $notificationsInvitedToChannelEnabled): self
{
$this->options['notificationsInvitedToChannelEnabled'] = $notificationsInvitedToChannelEnabled;
return $this;
}
/**
- * The template to use to create the notification text displayed when a user is invited to a channel and `notifications.invited_to_channel.enabled` is `true`.
+ *
*
- * @param string $notificationsInvitedToChannelTemplate The template to use to
- * create the notification
- * text displayed when a
- * user is invited to a
- * channel
+ * @param string $notificationsInvitedToChannelTemplate
* @return $this Fluent Builder
*/
- public function setNotificationsInvitedToChannelTemplate($notificationsInvitedToChannelTemplate)
+ public function setNotificationsInvitedToChannelTemplate(string $notificationsInvitedToChannelTemplate): self
{
$this->options['notificationsInvitedToChannelTemplate'] = $notificationsInvitedToChannelTemplate;
return $this;
}
/**
- * The URL for pre-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/api/chat/webhooks) for more details.
+ *
*
- * @param string $preWebhookUrl The webhook URL for pre-event webhooks
+ * @param string $preWebhookUrl
* @return $this Fluent Builder
*/
- public function setPreWebhookUrl($preWebhookUrl)
+ public function setPreWebhookUrl(string $preWebhookUrl): self
{
$this->options['preWebhookUrl'] = $preWebhookUrl;
return $this;
}
/**
- * The URL for post-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/api/chat/webhooks) for more details.
+ *
*
- * @param string $postWebhookUrl The URL for post-event webhooks
+ * @param string $postWebhookUrl
* @return $this Fluent Builder
*/
- public function setPostWebhookUrl($postWebhookUrl)
+ public function setPostWebhookUrl(string $postWebhookUrl): self
{
$this->options['postWebhookUrl'] = $postWebhookUrl;
return $this;
}
/**
- * The HTTP method to use for calls to the `pre_webhook_url` and `post_webhook_url` webhooks. Can be: `POST` or `GET` and the default is `POST`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details.
+ *
*
- * @param string $webhookMethod The HTTP method to use for both PRE and POST
- * webhooks
+ * @param string $webhookMethod
* @return $this Fluent Builder
*/
- public function setWebhookMethod($webhookMethod)
+ public function setWebhookMethod(string $webhookMethod): self
{
$this->options['webhookMethod'] = $webhookMethod;
return $this;
}
/**
- * The list of WebHook events that are enabled for this Service instance. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details.
+ *
*
- * @param string $webhookFilters The list of WebHook events that are enabled
- * for this Service instance
+ * @param string[] $webhookFilters
* @return $this Fluent Builder
*/
- public function setWebhookFilters($webhookFilters)
+ public function setWebhookFilters(array $webhookFilters): self
{
$this->options['webhookFilters'] = $webhookFilters;
return $this;
}
/**
- * The URL of the webhook to call in response to the `on_message_send` event using the `webhooks.on_message_send.method` HTTP method.
+ *
*
- * @param string $webhooksOnMessageSendUrl The URL of the webhook to call in
- * response to the on_message_send event
+ * @param string $webhooksOnMessageSendUrl
* @return $this Fluent Builder
*/
- public function setWebhooksOnMessageSendUrl($webhooksOnMessageSendUrl)
+ public function setWebhooksOnMessageSendUrl(string $webhooksOnMessageSendUrl): self
{
$this->options['webhooksOnMessageSendUrl'] = $webhooksOnMessageSendUrl;
return $this;
}
/**
- * The HTTP method to use when calling the `webhooks.on_message_send.url`.
+ *
*
- * @param string $webhooksOnMessageSendMethod The HTTP method to use when
- * calling the
- * webhooks.on_message_send.url
+ * @param string $webhooksOnMessageSendMethod
* @return $this Fluent Builder
*/
- public function setWebhooksOnMessageSendMethod($webhooksOnMessageSendMethod)
+ public function setWebhooksOnMessageSendMethod(string $webhooksOnMessageSendMethod): self
{
$this->options['webhooksOnMessageSendMethod'] = $webhooksOnMessageSendMethod;
return $this;
}
/**
- * The URL of the webhook to call in response to the `on_message_update` event using the `webhooks.on_message_update.method` HTTP method.
+ *
*
- * @param string $webhooksOnMessageUpdateUrl The URL of the webhook to call in
- * response to the on_message_update
- * event
+ * @param string $webhooksOnMessageUpdateUrl
* @return $this Fluent Builder
*/
- public function setWebhooksOnMessageUpdateUrl($webhooksOnMessageUpdateUrl)
+ public function setWebhooksOnMessageUpdateUrl(string $webhooksOnMessageUpdateUrl): self
{
$this->options['webhooksOnMessageUpdateUrl'] = $webhooksOnMessageUpdateUrl;
return $this;
}
/**
- * The HTTP method to use when calling the `webhooks.on_message_update.url`.
+ *
*
- * @param string $webhooksOnMessageUpdateMethod The HTTP method to use when
- * calling the
- * webhooks.on_message_update.url
+ * @param string $webhooksOnMessageUpdateMethod
* @return $this Fluent Builder
*/
- public function setWebhooksOnMessageUpdateMethod($webhooksOnMessageUpdateMethod)
+ public function setWebhooksOnMessageUpdateMethod(string $webhooksOnMessageUpdateMethod): self
{
$this->options['webhooksOnMessageUpdateMethod'] = $webhooksOnMessageUpdateMethod;
return $this;
}
/**
- * The URL of the webhook to call in response to the `on_message_remove` event using the `webhooks.on_message_remove.method` HTTP method.
+ *
*
- * @param string $webhooksOnMessageRemoveUrl The URL of the webhook to call in
- * response to the on_message_remove
- * event
+ * @param string $webhooksOnMessageRemoveUrl
* @return $this Fluent Builder
*/
- public function setWebhooksOnMessageRemoveUrl($webhooksOnMessageRemoveUrl)
+ public function setWebhooksOnMessageRemoveUrl(string $webhooksOnMessageRemoveUrl): self
{
$this->options['webhooksOnMessageRemoveUrl'] = $webhooksOnMessageRemoveUrl;
return $this;
}
/**
- * The HTTP method to use when calling the `webhooks.on_message_remove.url`.
+ *
*
- * @param string $webhooksOnMessageRemoveMethod The HTTP method to use when
- * calling the
- * webhooks.on_message_remove.url
+ * @param string $webhooksOnMessageRemoveMethod
* @return $this Fluent Builder
*/
- public function setWebhooksOnMessageRemoveMethod($webhooksOnMessageRemoveMethod)
+ public function setWebhooksOnMessageRemoveMethod(string $webhooksOnMessageRemoveMethod): self
{
$this->options['webhooksOnMessageRemoveMethod'] = $webhooksOnMessageRemoveMethod;
return $this;
}
/**
- * The URL of the webhook to call in response to the `on_channel_add` event using the `webhooks.on_channel_add.method` HTTP method.
+ *
*
- * @param string $webhooksOnChannelAddUrl The URL of the webhook to call in
- * response to the on_channel_add event
+ * @param string $webhooksOnChannelAddUrl
* @return $this Fluent Builder
*/
- public function setWebhooksOnChannelAddUrl($webhooksOnChannelAddUrl)
+ public function setWebhooksOnChannelAddUrl(string $webhooksOnChannelAddUrl): self
{
$this->options['webhooksOnChannelAddUrl'] = $webhooksOnChannelAddUrl;
return $this;
}
/**
- * The HTTP method to use when calling the `webhooks.on_channel_add.url`.
+ *
*
- * @param string $webhooksOnChannelAddMethod The HTTP method to use when
- * calling the
- * webhooks.on_channel_add.url
+ * @param string $webhooksOnChannelAddMethod
* @return $this Fluent Builder
*/
- public function setWebhooksOnChannelAddMethod($webhooksOnChannelAddMethod)
+ public function setWebhooksOnChannelAddMethod(string $webhooksOnChannelAddMethod): self
{
$this->options['webhooksOnChannelAddMethod'] = $webhooksOnChannelAddMethod;
return $this;
}
/**
- * The URL of the webhook to call in response to the `on_channel_destroy` event using the `webhooks.on_channel_destroy.method` HTTP method.
+ *
*
- * @param string $webhooksOnChannelDestroyUrl The URL of the webhook to call in
- * response to the
- * on_channel_destroy event
+ * @param string $webhooksOnChannelDestroyUrl
* @return $this Fluent Builder
*/
- public function setWebhooksOnChannelDestroyUrl($webhooksOnChannelDestroyUrl)
+ public function setWebhooksOnChannelDestroyUrl(string $webhooksOnChannelDestroyUrl): self
{
$this->options['webhooksOnChannelDestroyUrl'] = $webhooksOnChannelDestroyUrl;
return $this;
}
/**
- * The HTTP method to use when calling the `webhooks.on_channel_destroy.url`.
+ *
*
- * @param string $webhooksOnChannelDestroyMethod The HTTP method to use when
- * calling the
- * webhooks.on_channel_destroy.url
+ * @param string $webhooksOnChannelDestroyMethod
* @return $this Fluent Builder
*/
- public function setWebhooksOnChannelDestroyMethod($webhooksOnChannelDestroyMethod)
+ public function setWebhooksOnChannelDestroyMethod(string $webhooksOnChannelDestroyMethod): self
{
$this->options['webhooksOnChannelDestroyMethod'] = $webhooksOnChannelDestroyMethod;
return $this;
}
/**
- * The URL of the webhook to call in response to the `on_channel_update` event using the `webhooks.on_channel_update.method` HTTP method.
+ *
*
- * @param string $webhooksOnChannelUpdateUrl The URL of the webhook to call in
- * response to the on_channel_update
- * event
+ * @param string $webhooksOnChannelUpdateUrl
* @return $this Fluent Builder
*/
- public function setWebhooksOnChannelUpdateUrl($webhooksOnChannelUpdateUrl)
+ public function setWebhooksOnChannelUpdateUrl(string $webhooksOnChannelUpdateUrl): self
{
$this->options['webhooksOnChannelUpdateUrl'] = $webhooksOnChannelUpdateUrl;
return $this;
}
/**
- * The HTTP method to use when calling the `webhooks.on_channel_update.url`.
+ *
*
- * @param string $webhooksOnChannelUpdateMethod The HTTP method to use when
- * calling the
- * webhooks.on_channel_update.url
+ * @param string $webhooksOnChannelUpdateMethod
* @return $this Fluent Builder
*/
- public function setWebhooksOnChannelUpdateMethod($webhooksOnChannelUpdateMethod)
+ public function setWebhooksOnChannelUpdateMethod(string $webhooksOnChannelUpdateMethod): self
{
$this->options['webhooksOnChannelUpdateMethod'] = $webhooksOnChannelUpdateMethod;
return $this;
}
/**
- * The URL of the webhook to call in response to the `on_member_add` event using the `webhooks.on_member_add.method` HTTP method.
+ *
*
- * @param string $webhooksOnMemberAddUrl The URL of the webhook to call in
- * response to the on_member_add event
+ * @param string $webhooksOnMemberAddUrl
* @return $this Fluent Builder
*/
- public function setWebhooksOnMemberAddUrl($webhooksOnMemberAddUrl)
+ public function setWebhooksOnMemberAddUrl(string $webhooksOnMemberAddUrl): self
{
$this->options['webhooksOnMemberAddUrl'] = $webhooksOnMemberAddUrl;
return $this;
}
/**
- * The HTTP method to use when calling the `webhooks.on_member_add.url`.
+ *
*
- * @param string $webhooksOnMemberAddMethod The HTTP method to use when calling
- * the webhooks.on_member_add.url
+ * @param string $webhooksOnMemberAddMethod
* @return $this Fluent Builder
*/
- public function setWebhooksOnMemberAddMethod($webhooksOnMemberAddMethod)
+ public function setWebhooksOnMemberAddMethod(string $webhooksOnMemberAddMethod): self
{
$this->options['webhooksOnMemberAddMethod'] = $webhooksOnMemberAddMethod;
return $this;
}
/**
- * The URL of the webhook to call in response to the `on_member_remove` event using the `webhooks.on_member_remove.method` HTTP method.
+ *
*
- * @param string $webhooksOnMemberRemoveUrl The URL of the webhook to call in
- * response to the on_member_remove
- * event
+ * @param string $webhooksOnMemberRemoveUrl
* @return $this Fluent Builder
*/
- public function setWebhooksOnMemberRemoveUrl($webhooksOnMemberRemoveUrl)
+ public function setWebhooksOnMemberRemoveUrl(string $webhooksOnMemberRemoveUrl): self
{
$this->options['webhooksOnMemberRemoveUrl'] = $webhooksOnMemberRemoveUrl;
return $this;
}
/**
- * The HTTP method to use when calling the `webhooks.on_member_remove.url`.
+ *
*
- * @param string $webhooksOnMemberRemoveMethod The HTTP method to use when
- * calling the
- * webhooks.on_member_remove.url
+ * @param string $webhooksOnMemberRemoveMethod
* @return $this Fluent Builder
*/
- public function setWebhooksOnMemberRemoveMethod($webhooksOnMemberRemoveMethod)
+ public function setWebhooksOnMemberRemoveMethod(string $webhooksOnMemberRemoveMethod): self
{
$this->options['webhooksOnMemberRemoveMethod'] = $webhooksOnMemberRemoveMethod;
return $this;
}
/**
- * The URL of the webhook to call in response to the `on_message_sent` event using the `webhooks.on_message_sent.method` HTTP method.
+ *
*
- * @param string $webhooksOnMessageSentUrl The URL of the webhook to call in
- * response to the on_message_sent event
+ * @param string $webhooksOnMessageSentUrl
* @return $this Fluent Builder
*/
- public function setWebhooksOnMessageSentUrl($webhooksOnMessageSentUrl)
+ public function setWebhooksOnMessageSentUrl(string $webhooksOnMessageSentUrl): self
{
$this->options['webhooksOnMessageSentUrl'] = $webhooksOnMessageSentUrl;
return $this;
}
/**
- * The URL of the webhook to call in response to the `on_message_sent` event`.
+ *
*
- * @param string $webhooksOnMessageSentMethod The URL of the webhook to call in
- * response to the on_message_sent
- * event
+ * @param string $webhooksOnMessageSentMethod
* @return $this Fluent Builder
*/
- public function setWebhooksOnMessageSentMethod($webhooksOnMessageSentMethod)
+ public function setWebhooksOnMessageSentMethod(string $webhooksOnMessageSentMethod): self
{
$this->options['webhooksOnMessageSentMethod'] = $webhooksOnMessageSentMethod;
return $this;
}
/**
- * The URL of the webhook to call in response to the `on_message_updated` event using the `webhooks.on_message_updated.method` HTTP method.
+ *
*
- * @param string $webhooksOnMessageUpdatedUrl The URL of the webhook to call in
- * response to the
- * on_message_updated event
+ * @param string $webhooksOnMessageUpdatedUrl
* @return $this Fluent Builder
*/
- public function setWebhooksOnMessageUpdatedUrl($webhooksOnMessageUpdatedUrl)
+ public function setWebhooksOnMessageUpdatedUrl(string $webhooksOnMessageUpdatedUrl): self
{
$this->options['webhooksOnMessageUpdatedUrl'] = $webhooksOnMessageUpdatedUrl;
return $this;
}
/**
- * The HTTP method to use when calling the `webhooks.on_message_updated.url`.
+ *
*
- * @param string $webhooksOnMessageUpdatedMethod The HTTP method to use when
- * calling the
- * webhooks.on_message_updated.url
+ * @param string $webhooksOnMessageUpdatedMethod
* @return $this Fluent Builder
*/
- public function setWebhooksOnMessageUpdatedMethod($webhooksOnMessageUpdatedMethod)
+ public function setWebhooksOnMessageUpdatedMethod(string $webhooksOnMessageUpdatedMethod): self
{
$this->options['webhooksOnMessageUpdatedMethod'] = $webhooksOnMessageUpdatedMethod;
return $this;
}
/**
- * The URL of the webhook to call in response to the `on_message_removed` event using the `webhooks.on_message_removed.method` HTTP method.
+ *
*
- * @param string $webhooksOnMessageRemovedUrl The URL of the webhook to call in
- * response to the
- * on_message_removed event
+ * @param string $webhooksOnMessageRemovedUrl
* @return $this Fluent Builder
*/
- public function setWebhooksOnMessageRemovedUrl($webhooksOnMessageRemovedUrl)
+ public function setWebhooksOnMessageRemovedUrl(string $webhooksOnMessageRemovedUrl): self
{
$this->options['webhooksOnMessageRemovedUrl'] = $webhooksOnMessageRemovedUrl;
return $this;
}
/**
- * The HTTP method to use when calling the `webhooks.on_message_removed.url`.
+ *
*
- * @param string $webhooksOnMessageRemovedMethod The HTTP method to use when
- * calling the
- * webhooks.on_message_removed.url
+ * @param string $webhooksOnMessageRemovedMethod
* @return $this Fluent Builder
*/
- public function setWebhooksOnMessageRemovedMethod($webhooksOnMessageRemovedMethod)
+ public function setWebhooksOnMessageRemovedMethod(string $webhooksOnMessageRemovedMethod): self
{
$this->options['webhooksOnMessageRemovedMethod'] = $webhooksOnMessageRemovedMethod;
return $this;
}
/**
- * The URL of the webhook to call in response to the `on_channel_added` event using the `webhooks.on_channel_added.method` HTTP method.
+ *
*
- * @param string $webhooksOnChannelAddedUrl The URL of the webhook to call in
- * response to the on_channel_added
- * event
+ * @param string $webhooksOnChannelAddedUrl
* @return $this Fluent Builder
*/
- public function setWebhooksOnChannelAddedUrl($webhooksOnChannelAddedUrl)
+ public function setWebhooksOnChannelAddedUrl(string $webhooksOnChannelAddedUrl): self
{
$this->options['webhooksOnChannelAddedUrl'] = $webhooksOnChannelAddedUrl;
return $this;
}
/**
- * The URL of the webhook to call in response to the `on_channel_added` event`.
+ *
*
- * @param string $webhooksOnChannelAddedMethod The URL of the webhook to call
- * in response to the
- * on_channel_added event
+ * @param string $webhooksOnChannelAddedMethod
* @return $this Fluent Builder
*/
- public function setWebhooksOnChannelAddedMethod($webhooksOnChannelAddedMethod)
+ public function setWebhooksOnChannelAddedMethod(string $webhooksOnChannelAddedMethod): self
{
$this->options['webhooksOnChannelAddedMethod'] = $webhooksOnChannelAddedMethod;
return $this;
}
/**
- * The URL of the webhook to call in response to the `on_channel_added` event using the `webhooks.on_channel_destroyed.method` HTTP method.
+ *
*
- * @param string $webhooksOnChannelDestroyedUrl The URL of the webhook to call
- * in response to the
- * on_channel_added event
+ * @param string $webhooksOnChannelDestroyedUrl
* @return $this Fluent Builder
*/
- public function setWebhooksOnChannelDestroyedUrl($webhooksOnChannelDestroyedUrl)
+ public function setWebhooksOnChannelDestroyedUrl(string $webhooksOnChannelDestroyedUrl): self
{
$this->options['webhooksOnChannelDestroyedUrl'] = $webhooksOnChannelDestroyedUrl;
return $this;
}
/**
- * The HTTP method to use when calling the `webhooks.on_channel_destroyed.url`.
+ *
*
- * @param string $webhooksOnChannelDestroyedMethod The HTTP method to use when
- * calling the
- * webhooks.on_channel_destroyed.url
+ * @param string $webhooksOnChannelDestroyedMethod
* @return $this Fluent Builder
*/
- public function setWebhooksOnChannelDestroyedMethod($webhooksOnChannelDestroyedMethod)
+ public function setWebhooksOnChannelDestroyedMethod(string $webhooksOnChannelDestroyedMethod): self
{
$this->options['webhooksOnChannelDestroyedMethod'] = $webhooksOnChannelDestroyedMethod;
return $this;
}
/**
- * The URL of the webhook to call in response to the `on_channel_updated` event using the `webhooks.on_channel_updated.method` HTTP method.
+ *
*
- * @param string $webhooksOnChannelUpdatedUrl he URL of the webhook to call in
- * response to the
- * on_channel_updated event
+ * @param string $webhooksOnChannelUpdatedUrl
* @return $this Fluent Builder
*/
- public function setWebhooksOnChannelUpdatedUrl($webhooksOnChannelUpdatedUrl)
+ public function setWebhooksOnChannelUpdatedUrl(string $webhooksOnChannelUpdatedUrl): self
{
$this->options['webhooksOnChannelUpdatedUrl'] = $webhooksOnChannelUpdatedUrl;
return $this;
}
/**
- * The HTTP method to use when calling the `webhooks.on_channel_updated.url`.
+ *
*
- * @param string $webhooksOnChannelUpdatedMethod The HTTP method to use when
- * calling the
- * webhooks.on_channel_updated.url
+ * @param string $webhooksOnChannelUpdatedMethod
* @return $this Fluent Builder
*/
- public function setWebhooksOnChannelUpdatedMethod($webhooksOnChannelUpdatedMethod)
+ public function setWebhooksOnChannelUpdatedMethod(string $webhooksOnChannelUpdatedMethod): self
{
$this->options['webhooksOnChannelUpdatedMethod'] = $webhooksOnChannelUpdatedMethod;
return $this;
}
/**
- * The URL of the webhook to call in response to the `on_channel_updated` event using the `webhooks.on_channel_updated.method` HTTP method.
+ *
*
- * @param string $webhooksOnMemberAddedUrl The URL of the webhook to call in
- * response to the on_channel_updated
- * event
+ * @param string $webhooksOnMemberAddedUrl
* @return $this Fluent Builder
*/
- public function setWebhooksOnMemberAddedUrl($webhooksOnMemberAddedUrl)
+ public function setWebhooksOnMemberAddedUrl(string $webhooksOnMemberAddedUrl): self
{
$this->options['webhooksOnMemberAddedUrl'] = $webhooksOnMemberAddedUrl;
return $this;
}
/**
- * The HTTP method to use when calling the `webhooks.on_channel_updated.url`.
+ *
*
- * @param string $webhooksOnMemberAddedMethod he HTTP method to use when
- * calling the
- * webhooks.on_channel_updated.url
+ * @param string $webhooksOnMemberAddedMethod
* @return $this Fluent Builder
*/
- public function setWebhooksOnMemberAddedMethod($webhooksOnMemberAddedMethod)
+ public function setWebhooksOnMemberAddedMethod(string $webhooksOnMemberAddedMethod): self
{
$this->options['webhooksOnMemberAddedMethod'] = $webhooksOnMemberAddedMethod;
return $this;
}
/**
- * The URL of the webhook to call in response to the `on_member_removed` event using the `webhooks.on_member_removed.method` HTTP method.
+ *
*
- * @param string $webhooksOnMemberRemovedUrl The URL of the webhook to call in
- * response to the on_member_removed
- * event
+ * @param string $webhooksOnMemberRemovedUrl
* @return $this Fluent Builder
*/
- public function setWebhooksOnMemberRemovedUrl($webhooksOnMemberRemovedUrl)
+ public function setWebhooksOnMemberRemovedUrl(string $webhooksOnMemberRemovedUrl): self
{
$this->options['webhooksOnMemberRemovedUrl'] = $webhooksOnMemberRemovedUrl;
return $this;
}
/**
- * The HTTP method to use when calling the `webhooks.on_member_removed.url`.
+ *
*
- * @param string $webhooksOnMemberRemovedMethod The HTTP method to use when
- * calling the
- * webhooks.on_member_removed.url
+ * @param string $webhooksOnMemberRemovedMethod
* @return $this Fluent Builder
*/
- public function setWebhooksOnMemberRemovedMethod($webhooksOnMemberRemovedMethod)
+ public function setWebhooksOnMemberRemovedMethod(string $webhooksOnMemberRemovedMethod): self
{
$this->options['webhooksOnMemberRemovedMethod'] = $webhooksOnMemberRemovedMethod;
return $this;
}
/**
- * The maximum number of Members that can be added to Channels within this Service. Can be up to 1,000.
+ *
*
- * @param int $limitsChannelMembers The maximum number of Members that can be
- * added to Channels within this Service
+ * @param int $limitsChannelMembers
* @return $this Fluent Builder
*/
- public function setLimitsChannelMembers($limitsChannelMembers)
+ public function setLimitsChannelMembers(int $limitsChannelMembers): self
{
$this->options['limitsChannelMembers'] = $limitsChannelMembers;
return $this;
}
/**
- * The maximum number of Channels Users can be a Member of within this Service. Can be up to 1,000.
+ *
*
- * @param int $limitsUserChannels The maximum number of Channels Users can be a
- * Member of within this Service
+ * @param int $limitsUserChannels
* @return $this Fluent Builder
*/
- public function setLimitsUserChannels($limitsUserChannels)
+ public function setLimitsUserChannels(int $limitsUserChannels): self
{
$this->options['limitsUserChannels'] = $limitsUserChannels;
return $this;
@@ -1128,14 +1029,10 @@ public function setLimitsUserChannels($limitsUserChannels)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.IpMessaging.V1.UpdateServiceOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.IpMessaging.V1.UpdateServiceOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/ServicePage.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/ServicePage.php
index 0572975..947c774 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/ServicePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V1/ServicePage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return ServiceInstance \Twilio\Rest\IpMessaging\V1\ServiceInstance
+ */
+ public function buildInstance(array $payload): ServiceInstance
{
return new ServiceInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V1.ServicePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2.php
index 5548551..f3bf241 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2.php
@@ -1,36 +1,42 @@
version = 'v2';
}
- /**
- * @return \Twilio\Rest\IpMessaging\V2\CredentialList
- */
- protected function getCredentials()
+ protected function getCredentials(): CredentialList
{
if (!$this->_credentials) {
$this->_credentials = new CredentialList($this);
@@ -49,10 +52,7 @@ protected function getCredentials()
return $this->_credentials;
}
- /**
- * @return \Twilio\Rest\IpMessaging\V2\ServiceList
- */
- protected function getServices()
+ protected function getServices(): ServiceList
{
if (!$this->_services) {
$this->_services = new ServiceList($this);
@@ -67,7 +67,7 @@ protected function getServices()
* @return \Twilio\ListResource The requested resource
* @throws TwilioException For unknown resource
*/
- public function __get($name)
+ public function __get(string $name)
{
$method = 'get' . \ucfirst($name);
if (\method_exists($this, $method)) {
@@ -82,10 +82,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -100,8 +100,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V2]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/CredentialContext.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/CredentialContext.php
index b368120..c703a02 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/CredentialContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/CredentialContext.php
@@ -2,110 +2,136 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\IpMessaging\V2;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
class CredentialContext extends InstanceContext
-{
+ {
/**
* Initialize the CredentialContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The SID of the Credential resource to fetch
- * @return \Twilio\Rest\IpMessaging\V2\CredentialContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Credentials/' . \rawurlencode($sid) . '';
+ $this->uri = '/Credentials/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a CredentialInstance
+ * Delete the CredentialInstance
*
- * @return CredentialInstance Fetched CredentialInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
- return new CredentialInstance($this->version, $payload, $this->solution['sid']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Update the CredentialInstance
+ * Fetch the CredentialInstance
*
- * @param array|Options $options Optional Arguments
- * @return CredentialInstance Updated CredentialInstance
+ * @return CredentialInstance Fetched CredentialInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): CredentialInstance
{
- $options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'Certificate' => $options['certificate'],
- 'PrivateKey' => $options['privateKey'],
- 'Sandbox' => Serialize::booleanToString($options['sandbox']),
- 'ApiKey' => $options['apiKey'],
- 'Secret' => $options['secret'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
- return new CredentialInstance($this->version, $payload, $this->solution['sid']);
+ return new CredentialInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
- * Deletes the CredentialInstance
+ * Update the CredentialInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return CredentialInstance Updated CredentialInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): CredentialInstance
{
- return $this->version->delete('delete', $this->uri);
+
+ $options = new Values($options);
+
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'Certificate' =>
+ $options['certificate'],
+ 'PrivateKey' =>
+ $options['privateKey'],
+ 'Sandbox' =>
+ Serialize::booleanToString($options['sandbox']),
+ 'ApiKey' =>
+ $options['apiKey'],
+ 'Secret' =>
+ $options['secret'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
+
+ return new CredentialInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.IpMessaging.V2.CredentialContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/CredentialInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/CredentialInstance.php
index 951e345..b511b50 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/CredentialInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/CredentialInstance.php
@@ -2,46 +2,54 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\IpMessaging\V2;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $friendlyName
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $friendlyName
* @property string $type
- * @property string $sandbox
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
+ * @property string|null $sandbox
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
*/
class CredentialInstance extends InstanceResource
{
/**
* Initialize the CredentialInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The SID of the Credential resource to fetch
- * @return \Twilio\Rest\IpMessaging\V2\CredentialInstance
+ * @param string $sid
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
@@ -50,59 +58,64 @@ public function __construct(Version $version, array $payload, $sid = null)
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\IpMessaging\V2\CredentialContext Context for this
- * CredentialInstance
+ * @return CredentialContext Context for this CredentialInstance
*/
- protected function proxy()
+ protected function proxy(): CredentialContext
{
if (!$this->context) {
- $this->context = new CredentialContext($this->version, $this->solution['sid']);
+ $this->context = new CredentialContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a CredentialInstance
+ * Delete the CredentialInstance
*
- * @return CredentialInstance Fetched CredentialInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Update the CredentialInstance
+ * Fetch the CredentialInstance
*
- * @param array|Options $options Optional Arguments
- * @return CredentialInstance Updated CredentialInstance
+ * @return CredentialInstance Fetched CredentialInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): CredentialInstance
{
- return $this->proxy()->update($options);
+
+ return $this->proxy()->fetch();
}
/**
- * Deletes the CredentialInstance
+ * Update the CredentialInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return CredentialInstance Updated CredentialInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): CredentialInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->update($options);
}
/**
@@ -112,7 +125,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -131,12 +144,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.IpMessaging.V2.CredentialInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/CredentialList.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/CredentialList.php
index acbb8f3..10d2fa8 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/CredentialList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/CredentialList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\IpMessaging\V2;
@@ -12,55 +19,71 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class CredentialList extends ListResource
-{
+ {
/**
* Construct the CredentialList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\IpMessaging\V2\CredentialList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/Credentials';
}
/**
- * Streams CredentialInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the CredentialInstance
*
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @param string $type
+ * @param array|Options $options Optional Arguments
+ * @return CredentialInstance Created CredentialInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($limit = null, $pageSize = null)
+ public function create(string $type, array $options = []): CredentialInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'Type' =>
+ $type,
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'Certificate' =>
+ $options['certificate'],
+ 'PrivateKey' =>
+ $options['privateKey'],
+ 'Sandbox' =>
+ Serialize::booleanToString($options['sandbox']),
+ 'ApiKey' =>
+ $options['apiKey'],
+ 'Secret' =>
+ $options['secret'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new CredentialInstance(
+ $this->version,
+ $payload
+ );
}
+
/**
* Reads CredentialInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -76,11 +99,38 @@ public function stream($limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return CredentialInstance[] Array of results
*/
- public function read($limit = null, $pageSize = null)
+ public function read(int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($limit, $pageSize), false);
}
+ /**
+ * Streams CredentialInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of CredentialInstance records from the API.
* Request is executed immediately
@@ -88,21 +138,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of CredentialInstance
+ * @return CredentialPage Page of CredentialInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): CredentialPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new CredentialPage($this->version, $response, $this->solution);
}
@@ -112,9 +163,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of CredentialInstance
+ * @return CredentialPage Page of CredentialInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): CredentialPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -124,48 +175,21 @@ public function getPage($targetUrl)
return new CredentialPage($this->version, $response, $this->solution);
}
- /**
- * Create a new CredentialInstance
- *
- * @param string $type The type of push-notification service the credential is
- * for
- * @param array|Options $options Optional Arguments
- * @return CredentialInstance Newly created CredentialInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($type, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'Type' => $type,
- 'FriendlyName' => $options['friendlyName'],
- 'Certificate' => $options['certificate'],
- 'PrivateKey' => $options['privateKey'],
- 'Sandbox' => Serialize::booleanToString($options['sandbox']),
- 'ApiKey' => $options['apiKey'],
- 'Secret' => $options['secret'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new CredentialInstance($this->version, $payload);
- }
/**
* Constructs a CredentialContext
*
- * @param string $sid The SID of the Credential resource to fetch
- * @return \Twilio\Rest\IpMessaging\V2\CredentialContext
+ * @param string $sid
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): CredentialContext
{
- return new CredentialContext($this->version, $sid);
+ return new CredentialContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -173,8 +197,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V2.CredentialList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/CredentialOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/CredentialOptions.php
index 26ffc77..fe4d265 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/CredentialOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/CredentialOptions.php
@@ -1,10 +1,16 @@
options['friendlyName'] = $friendlyName;
$this->options['certificate'] = $certificate;
$this->options['privateKey'] = $privateKey;
@@ -82,84 +114,72 @@ public function __construct($friendlyName = Values::NONE, $certificate = Values:
}
/**
- * A descriptive string that you create to describe the new resource. It can be up to 64 characters long.
+ *
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
}
/**
- * [APN only] The URL encoded representation of the certificate. For example,
- * `-----BEGIN CERTIFICATE-----
- * MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A==
- * -----END CERTIFICATE-----`
+ *
*
- * @param string $certificate [APN only] The URL encoded representation of the
- * certificate
+ * @param string $certificate
* @return $this Fluent Builder
*/
- public function setCertificate($certificate)
+ public function setCertificate(string $certificate): self
{
$this->options['certificate'] = $certificate;
return $this;
}
/**
- * [APN only] The URL encoded representation of the private key. For example,
- * `-----BEGIN RSA PRIVATE KEY-----
- * MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fG...
- * -----END RSA PRIVATE KEY-----`
+ *
*
- * @param string $privateKey [APN only] The URL encoded representation of the
- * private key
+ * @param string $privateKey
* @return $this Fluent Builder
*/
- public function setPrivateKey($privateKey)
+ public function setPrivateKey(string $privateKey): self
{
$this->options['privateKey'] = $privateKey;
return $this;
}
/**
- * [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production.
+ *
*
- * @param bool $sandbox [APN only] Whether to send the credential to sandbox
- * APNs
+ * @param bool $sandbox
* @return $this Fluent Builder
*/
- public function setSandbox($sandbox)
+ public function setSandbox(bool $sandbox): self
{
$this->options['sandbox'] = $sandbox;
return $this;
}
/**
- * [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential.
+ *
*
- * @param string $apiKey [GCM only] The API key for the project that was
- * obtained from the Google Developer console for your
- * GCM Service application credential
+ * @param string $apiKey
* @return $this Fluent Builder
*/
- public function setApiKey($apiKey)
+ public function setApiKey(string $apiKey): self
{
$this->options['apiKey'] = $apiKey;
return $this;
}
/**
- * [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging.
+ *
*
- * @param string $secret [FCM only] The Server key of your project from
- * Firebase console
+ * @param string $secret
* @return $this Fluent Builder
*/
- public function setSecret($secret)
+ public function setSecret(string $secret): self
{
$this->options['secret'] = $secret;
return $this;
@@ -170,36 +190,36 @@ public function setSecret($secret)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.IpMessaging.V2.CreateCredentialOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.IpMessaging.V2.CreateCredentialOptions ' . $options . ']';
}
}
+
+
+
class UpdateCredentialOptions extends Options
-{
+ {
/**
- * @param string $friendlyName A string to describe the resource
- * @param string $certificate [APN only] The URL encoded representation of the
- * certificate
- * @param string $privateKey [APN only] The URL encoded representation of the
- * private key
- * @param bool $sandbox [APN only] Whether to send the credential to sandbox
- * APNs
- * @param string $apiKey [GCM only] The API key for the project that was
- * obtained from the Google Developer console for your
- * GCM Service application credential
- * @param string $secret [FCM only] The Server key of your project from
- * Firebase console
+ * @param string $friendlyName
+ * @param string $certificate
+ * @param string $privateKey
+ * @param bool $sandbox
+ * @param string $apiKey
+ * @param string $secret
*/
- public function __construct($friendlyName = Values::NONE, $certificate = Values::NONE, $privateKey = Values::NONE, $sandbox = Values::NONE, $apiKey = Values::NONE, $secret = Values::NONE)
- {
+ public function __construct(
+
+ string $friendlyName = Values::NONE,
+ string $certificate = Values::NONE,
+ string $privateKey = Values::NONE,
+ bool $sandbox = Values::BOOL_NONE,
+ string $apiKey = Values::NONE,
+ string $secret = Values::NONE
+
+ ) {
$this->options['friendlyName'] = $friendlyName;
$this->options['certificate'] = $certificate;
$this->options['privateKey'] = $privateKey;
@@ -209,84 +229,72 @@ public function __construct($friendlyName = Values::NONE, $certificate = Values:
}
/**
- * A descriptive string that you create to describe the resource. It can be up to 64 characters long.
+ *
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
}
/**
- * [APN only] The URL encoded representation of the certificate. For example,
- * `-----BEGIN CERTIFICATE-----
- * MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEF.....A==
- * -----END CERTIFICATE-----`
+ *
*
- * @param string $certificate [APN only] The URL encoded representation of the
- * certificate
+ * @param string $certificate
* @return $this Fluent Builder
*/
- public function setCertificate($certificate)
+ public function setCertificate(string $certificate): self
{
$this->options['certificate'] = $certificate;
return $this;
}
/**
- * [APN only] The URL encoded representation of the private key. For example,
- * `-----BEGIN RSA PRIVATE KEY-----
- * MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fG...
- * -----END RSA PRIVATE KEY-----`
+ *
*
- * @param string $privateKey [APN only] The URL encoded representation of the
- * private key
+ * @param string $privateKey
* @return $this Fluent Builder
*/
- public function setPrivateKey($privateKey)
+ public function setPrivateKey(string $privateKey): self
{
$this->options['privateKey'] = $privateKey;
return $this;
}
/**
- * [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production.
+ *
*
- * @param bool $sandbox [APN only] Whether to send the credential to sandbox
- * APNs
+ * @param bool $sandbox
* @return $this Fluent Builder
*/
- public function setSandbox($sandbox)
+ public function setSandbox(bool $sandbox): self
{
$this->options['sandbox'] = $sandbox;
return $this;
}
/**
- * [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential.
+ *
*
- * @param string $apiKey [GCM only] The API key for the project that was
- * obtained from the Google Developer console for your
- * GCM Service application credential
+ * @param string $apiKey
* @return $this Fluent Builder
*/
- public function setApiKey($apiKey)
+ public function setApiKey(string $apiKey): self
{
$this->options['apiKey'] = $apiKey;
return $this;
}
/**
- * [FCM only] The **Server key** of your project from the Firebase console, found under Settings / Cloud messaging.
+ *
*
- * @param string $secret [FCM only] The Server key of your project from
- * Firebase console
+ * @param string $secret
* @return $this Fluent Builder
*/
- public function setSecret($secret)
+ public function setSecret(string $secret): self
{
$this->options['secret'] = $secret;
return $this;
@@ -297,14 +305,10 @@ public function setSecret($secret)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.IpMessaging.V2.UpdateCredentialOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.IpMessaging.V2.UpdateCredentialOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/CredentialPage.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/CredentialPage.php
index 1877ec9..e1f2236 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/CredentialPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/CredentialPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return CredentialInstance \Twilio\Rest\IpMessaging\V2\CredentialInstance
+ */
+ public function buildInstance(array $payload): CredentialInstance
{
return new CredentialInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V2.CredentialPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/BindingContext.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/BindingContext.php
index 2d9b7fe..fe22b05 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/BindingContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/BindingContext.php
@@ -2,53 +2,81 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\IpMessaging\V2\Service;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class BindingContext extends InstanceContext
-{
+ {
/**
* Initialize the BindingContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the resource from
- * @param string $sid The SID of the resource to fetch
- * @return \Twilio\Rest\IpMessaging\V2\Service\BindingContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid
+ * @param string $sid
*/
- public function __construct(Version $version, $serviceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Bindings/' . \rawurlencode($sid)
+ .'';
+ }
+
+ /**
+ * Delete the BindingInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Bindings/' . \rawurlencode($sid) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a BindingInstance
+ * Fetch the BindingInstance
*
* @return BindingInstance Fetched BindingInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): BindingInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new BindingInstance(
$this->version,
@@ -58,28 +86,18 @@ public function fetch()
);
}
- /**
- * Deletes the BindingInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.IpMessaging.V2.BindingContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/BindingInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/BindingInstance.php
index 3452104..213895e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/BindingInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/BindingInstance.php
@@ -2,51 +2,58 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\IpMessaging\V2\Service;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $serviceSid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $endpoint
- * @property string $identity
- * @property string $credentialSid
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $endpoint
+ * @property string|null $identity
+ * @property string|null $credentialSid
* @property string $bindingType
- * @property string $messageTypes
- * @property string $url
- * @property array $links
+ * @property string[]|null $messageTypes
+ * @property string|null $url
+ * @property array|null $links
*/
class BindingInstance extends InstanceResource
{
/**
* Initialize the BindingInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the Binding resource
- * is associated with
- * @param string $sid The SID of the resource to fetch
- * @return \Twilio\Rest\IpMessaging\V2\Service\BindingInstance
+ * @param string $serviceSid
+ * @param string $sid
*/
- public function __construct(Version $version, array $payload, $serviceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
@@ -59,19 +66,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $sid
'messageTypes' => Values::array_get($payload, 'message_types'),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\IpMessaging\V2\Service\BindingContext Context for this
- * BindingInstance
+ * @return BindingContext Context for this BindingInstance
*/
- protected function proxy()
+ protected function proxy(): BindingContext
{
if (!$this->context) {
$this->context = new BindingContext(
@@ -85,25 +91,27 @@ protected function proxy()
}
/**
- * Fetch a BindingInstance
+ * Delete the BindingInstance
*
- * @return BindingInstance Fetched BindingInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the BindingInstance
+ * Fetch the BindingInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return BindingInstance Fetched BindingInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): BindingInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -113,7 +121,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -132,12 +140,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.IpMessaging.V2.BindingInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/BindingList.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/BindingList.php
index a12220a..5be73d8 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/BindingList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/BindingList.php
@@ -2,37 +2,72 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\IpMessaging\V2\Service;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class BindingList extends ListResource
-{
+ {
/**
* Construct the BindingList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the Binding resource
- * is associated with
- * @return \Twilio\Rest\IpMessaging\V2\Service\BindingList
+ * @param string $serviceSid
*/
- public function __construct(Version $version, $serviceSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Bindings';
+ }
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Bindings';
+ /**
+ * Reads BindingInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return BindingInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -52,9 +87,9 @@ public function __construct(Version $version, $serviceSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -63,57 +98,35 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads BindingInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return BindingInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of BindingInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of BindingInstance
+ * @return BindingPage Page of BindingInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): BindingPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'BindingType' => Serialize::map($options['bindingType'], function ($e) {
- return $e;
- }),
- 'Identity' => Serialize::map($options['identity'], function ($e) {
- return $e;
- }),
+
+ $params = Values::of([
+ 'BindingType' =>
+ $options['bindingType'],
+ 'Identity' =>
+ Serialize::map($options['identity'], function ($e) { return $e; }),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new BindingPage($this->version, $response, $this->solution);
}
@@ -123,9 +136,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of BindingInstance
+ * @return BindingPage Page of BindingInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): BindingPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -135,15 +148,22 @@ public function getPage($targetUrl)
return new BindingPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a BindingContext
*
- * @param string $sid The SID of the resource to fetch
- * @return \Twilio\Rest\IpMessaging\V2\Service\BindingContext
+ * @param string $sid
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): BindingContext
{
- return new BindingContext($this->version, $this->solution['serviceSid'], $sid);
+ return new BindingContext(
+ $this->version,
+ $this->solution['serviceSid'],
+ $sid
+ );
}
/**
@@ -151,8 +171,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V2.BindingList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/BindingOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/BindingOptions.php
index 436bad8..86dd074 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/BindingOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/BindingOptions.php
@@ -1,10 +1,16 @@
options['bindingType'] = $bindingType;
$this->options['identity'] = $identity;
}
/**
- * The push technology used by the Binding resources to read. Can be: `apn`, `gcm`, or `fcm`. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info.
+ *
*
- * @param string $bindingType The push technology used by the Binding resources
- * to read
+ * @param string $bindingType
* @return $this Fluent Builder
*/
- public function setBindingType($bindingType)
+ public function setBindingType(array $bindingType): self
{
$this->options['bindingType'] = $bindingType;
return $this;
}
/**
- * The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more details.
+ *
*
- * @param string $identity The `identity` value of the resources to read
+ * @param string[] $identity
* @return $this Fluent Builder
*/
- public function setIdentity($identity)
+ public function setIdentity(array $identity): self
{
$this->options['identity'] = $identity;
return $this;
@@ -69,14 +89,10 @@ public function setIdentity($identity)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.IpMessaging.V2.ReadBindingOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.IpMessaging.V2.ReadBindingOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/BindingPage.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/BindingPage.php
index 15a629c..2763796 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/BindingPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/BindingPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return BindingInstance \Twilio\Rest\IpMessaging\V2\Service\BindingInstance
+ */
+ public function buildInstance(array $payload): BindingInstance
{
return new BindingInstance($this->version, $payload, $this->solution['serviceSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V2.BindingPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/InviteContext.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/InviteContext.php
index 4b7c2f7..9cc0b27 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/InviteContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/InviteContext.php
@@ -2,55 +2,86 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\IpMessaging\V2\Service\Channel;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class InviteContext extends InstanceContext
-{
+ {
/**
* Initialize the InviteContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the resource from
- * @param string $channelSid The SID of the Channel the resource to fetch
- * belongs to
- * @param string $sid The SID of the Invite resource to fetch
- * @return \Twilio\Rest\IpMessaging\V2\Service\Channel\InviteContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid
+ * @param string $channelSid
+ * @param string $sid
*/
- public function __construct(Version $version, $serviceSid, $channelSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $channelSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'channelSid' =>
+ $channelSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Channels/' . \rawurlencode($channelSid)
+ .'/Invites/' . \rawurlencode($sid)
+ .'';
+ }
+
+ /**
+ * Delete the InviteInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Invites/' . \rawurlencode($sid) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a InviteInstance
+ * Fetch the InviteInstance
*
* @return InviteInstance Fetched InviteInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): InviteInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new InviteInstance(
$this->version,
@@ -61,28 +92,18 @@ public function fetch()
);
}
- /**
- * Deletes the InviteInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.IpMessaging.V2.InviteContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/InviteInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/InviteInstance.php
index 15bfe50..3b0a7ee 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/InviteInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/InviteInstance.php
@@ -2,50 +2,57 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\IpMessaging\V2\Service\Channel;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $channelSid
- * @property string $serviceSid
- * @property string $identity
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $roleSid
- * @property string $createdBy
- * @property string $url
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $channelSid
+ * @property string|null $serviceSid
+ * @property string|null $identity
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $roleSid
+ * @property string|null $createdBy
+ * @property string|null $url
*/
class InviteInstance extends InstanceResource
{
/**
* Initialize the InviteInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $channelSid The SID of the Channel the new resource belongs to
- * @param string $sid The SID of the Invite resource to fetch
- * @return \Twilio\Rest\IpMessaging\V2\Service\Channel\InviteInstance
+ * @param string $serviceSid
+ * @param string $channelSid
+ * @param string $sid
*/
- public function __construct(Version $version, array $payload, $serviceSid, $channelSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $channelSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'channelSid' => Values::array_get($payload, 'channel_sid'),
@@ -56,24 +63,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $chan
'roleSid' => Values::array_get($payload, 'role_sid'),
'createdBy' => Values::array_get($payload, 'created_by'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'channelSid' => $channelSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\IpMessaging\V2\Service\Channel\InviteContext Context
- * for this
- * InviteInstance
+ * @return InviteContext Context for this InviteInstance
*/
- protected function proxy()
+ protected function proxy(): InviteContext
{
if (!$this->context) {
$this->context = new InviteContext(
@@ -88,25 +89,27 @@ protected function proxy()
}
/**
- * Fetch a InviteInstance
+ * Delete the InviteInstance
*
- * @return InviteInstance Fetched InviteInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the InviteInstance
+ * Fetch the InviteInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return InviteInstance Fetched InviteInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): InviteInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -116,7 +119,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -135,12 +138,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.IpMessaging.V2.InviteInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/InviteList.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/InviteList.php
index b53bcc7..663266e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/InviteList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/InviteList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\IpMessaging\V2\Service\Channel;
@@ -12,52 +19,65 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class InviteList extends ListResource
-{
+ {
/**
* Construct the InviteList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $channelSid The SID of the Channel the new resource belongs to
- * @return \Twilio\Rest\IpMessaging\V2\Service\Channel\InviteList
+ * @param string $serviceSid
+ * @param string $channelSid
*/
- public function __construct(Version $version, $serviceSid, $channelSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid,
+ string $channelSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'channelSid' => $channelSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Invites';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ 'channelSid' =>
+ $channelSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Channels/' . \rawurlencode($channelSid)
+ .'/Invites';
}
/**
- * Create a new InviteInstance
+ * Create the InviteInstance
*
- * @param string $identity The `identity` value that identifies the new
- * resource's User
+ * @param string $identity
* @param array|Options $options Optional Arguments
- * @return InviteInstance Newly created InviteInstance
+ * @return InviteInstance Created InviteInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($identity, $options = array())
+ public function create(string $identity, array $options = []): InviteInstance
{
+
$options = new Values($options);
- $data = Values::of(array('Identity' => $identity, 'RoleSid' => $options['roleSid'],));
+ $data = Values::of([
+ 'Identity' =>
+ $identity,
+ 'RoleSid' =>
+ $options['roleSid'],
+ ]);
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
return new InviteInstance(
$this->version,
@@ -67,82 +87,83 @@ public function create($identity, $options = array())
);
}
+
/**
- * Streams InviteInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Reads InviteInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
+ * @param int $limit Upper limit for the number of records to return. read()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
+ * page_size is defined but a limit is defined, read()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return InviteInstance[] Array of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($options, $limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
- * Reads InviteInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
+ * Streams InviteInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
+ * @param int $limit Upper limit for the number of records to return. stream()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
+ * page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return InviteInstance[] Array of results
+ * @return Stream stream of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
/**
* Retrieve a single page of InviteInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of InviteInstance
+ * @return InvitePage Page of InviteInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): InvitePage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Identity' => Serialize::map($options['identity'], function ($e) {
- return $e;
- }),
+
+ $params = Values::of([
+ 'Identity' =>
+ Serialize::map($options['identity'], function ($e) { return $e; }),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new InvitePage($this->version, $response, $this->solution);
}
@@ -152,9 +173,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of InviteInstance
+ * @return InvitePage Page of InviteInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): InvitePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -164,13 +185,16 @@ public function getPage($targetUrl)
return new InvitePage($this->version, $response, $this->solution);
}
+
/**
* Constructs a InviteContext
*
- * @param string $sid The SID of the Invite resource to fetch
- * @return \Twilio\Rest\IpMessaging\V2\Service\Channel\InviteContext
+ * @param string $sid
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): InviteContext
{
return new InviteContext(
$this->version,
@@ -185,8 +209,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V2.InviteList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/InviteOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/InviteOptions.php
index b47a5f8..debab9a 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/InviteOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/InviteOptions.php
@@ -1,10 +1,16 @@
options['roleSid'] = $roleSid;
}
/**
- * The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) assigned to the new member.
+ *
*
- * @param string $roleSid The Role assigned to the new member
+ * @param string $roleSid
* @return $this Fluent Builder
*/
- public function setRoleSid($roleSid)
+ public function setRoleSid(string $roleSid): self
{
$this->options['roleSid'] = $roleSid;
return $this;
@@ -60,35 +84,35 @@ public function setRoleSid($roleSid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.IpMessaging.V2.CreateInviteOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.IpMessaging.V2.CreateInviteOptions ' . $options . ']';
}
}
+
+
class ReadInviteOptions extends Options
-{
+ {
/**
- * @param string $identity The `identity` value of the resources to read
+ * @param string[] $identity
*/
- public function __construct($identity = Values::NONE)
- {
+ public function __construct(
+
+ array $identity = Values::ARRAY_NONE
+
+ ) {
$this->options['identity'] = $identity;
}
/**
- * The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the resources to read. See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more details.
+ *
*
- * @param string $identity The `identity` value of the resources to read
+ * @param string[] $identity
* @return $this Fluent Builder
*/
- public function setIdentity($identity)
+ public function setIdentity(array $identity): self
{
$this->options['identity'] = $identity;
return $this;
@@ -99,14 +123,10 @@ public function setIdentity($identity)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.IpMessaging.V2.ReadInviteOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.IpMessaging.V2.ReadInviteOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/InvitePage.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/InvitePage.php
index d58febc..434e696 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/InvitePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/InvitePage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return InviteInstance \Twilio\Rest\IpMessaging\V2\Service\Channel\InviteInstance
+ */
+ public function buildInstance(array $payload): InviteInstance
{
- return new InviteInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['channelSid']
- );
+ return new InviteInstance($this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V2.InvitePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MemberContext.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MemberContext.php
index 2f954a6..9b498da 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MemberContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MemberContext.php
@@ -2,56 +2,91 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\IpMessaging\V2\Service\Channel;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
class MemberContext extends InstanceContext
-{
+ {
/**
* Initialize the MemberContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the resource from
- * @param string $channelSid The SID of the channel the member belongs to
- * @param string $sid The SID of the Member resource to fetch
- * @return \Twilio\Rest\IpMessaging\V2\Service\Channel\MemberContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid
+ * @param string $channelSid
+ * @param string $sid
*/
- public function __construct(Version $version, $serviceSid, $channelSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $channelSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'channelSid' =>
+ $channelSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Members/' . \rawurlencode($sid) . '';
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Channels/' . \rawurlencode($channelSid)
+ .'/Members/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a MemberInstance
+ * Delete the MemberInstance
+ *
+ * @param array|Options $options Optional Arguments
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(array $options = []): bool
+ {
+
+ $options = new Values($options);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled']]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
+ }
+
+
+ /**
+ * Fetch the MemberInstance
*
* @return MemberInstance Fetched MemberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): MemberInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new MemberInstance(
$this->version,
@@ -62,16 +97,6 @@ public function fetch()
);
}
- /**
- * Deletes the MemberInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Update the MemberInstance
@@ -80,25 +105,28 @@ public function delete()
* @return MemberInstance Updated MemberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): MemberInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'RoleSid' => $options['roleSid'],
- 'LastConsumedMessageIndex' => $options['lastConsumedMessageIndex'],
- 'LastConsumptionTimestamp' => Serialize::iso8601DateTime($options['lastConsumptionTimestamp']),
- 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']),
- 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']),
- 'Attributes' => $options['attributes'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'RoleSid' =>
+ $options['roleSid'],
+ 'LastConsumedMessageIndex' =>
+ $options['lastConsumedMessageIndex'],
+ 'LastConsumptionTimestamp' =>
+ Serialize::iso8601DateTime($options['lastConsumptionTimestamp']),
+ 'DateCreated' =>
+ Serialize::iso8601DateTime($options['dateCreated']),
+ 'DateUpdated' =>
+ Serialize::iso8601DateTime($options['dateUpdated']),
+ 'Attributes' =>
+ $options['attributes'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled']]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new MemberInstance(
$this->version,
@@ -109,17 +137,18 @@ public function update($options = array())
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.IpMessaging.V2.MemberContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MemberInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MemberInstance.php
index 5dcf33b..9a394cc 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MemberInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MemberInstance.php
@@ -2,53 +2,60 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\IpMessaging\V2\Service\Channel;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $channelSid
- * @property string $serviceSid
- * @property string $identity
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $roleSid
- * @property int $lastConsumedMessageIndex
- * @property \DateTime $lastConsumptionTimestamp
- * @property string $url
- * @property string $attributes
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $channelSid
+ * @property string|null $serviceSid
+ * @property string|null $identity
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $roleSid
+ * @property int|null $lastConsumedMessageIndex
+ * @property \DateTime|null $lastConsumptionTimestamp
+ * @property string|null $url
+ * @property string|null $attributes
*/
class MemberInstance extends InstanceResource
{
/**
* Initialize the MemberInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $channelSid The SID of the Channel for the member
- * @param string $sid The SID of the Member resource to fetch
- * @return \Twilio\Rest\IpMessaging\V2\Service\Channel\MemberInstance
+ * @param string $serviceSid
+ * @param string $channelSid
+ * @param string $sid
*/
- public function __construct(Version $version, array $payload, $serviceSid, $channelSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $channelSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'channelSid' => Values::array_get($payload, 'channel_sid'),
@@ -61,24 +68,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $chan
'lastConsumptionTimestamp' => Deserialize::dateTime(Values::array_get($payload, 'last_consumption_timestamp')),
'url' => Values::array_get($payload, 'url'),
'attributes' => Values::array_get($payload, 'attributes'),
- );
+ ];
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'channelSid' => $channelSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\IpMessaging\V2\Service\Channel\MemberContext Context
- * for this
- * MemberInstance
+ * @return MemberContext Context for this MemberInstance
*/
- protected function proxy()
+ protected function proxy(): MemberContext
{
if (!$this->context) {
$this->context = new MemberContext(
@@ -93,25 +94,28 @@ protected function proxy()
}
/**
- * Fetch a MemberInstance
+ * Delete the MemberInstance
*
- * @return MemberInstance Fetched MemberInstance
+ * @param array|Options $options Optional Arguments
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(array $options = []): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete($options);
}
/**
- * Deletes the MemberInstance
+ * Fetch the MemberInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return MemberInstance Fetched MemberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): MemberInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -121,8 +125,9 @@ public function delete()
* @return MemberInstance Updated MemberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): MemberInstance
{
+
return $this->proxy()->update($options);
}
@@ -133,7 +138,7 @@ public function update($options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -152,12 +157,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.IpMessaging.V2.MemberInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MemberList.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MemberList.php
index 790ffc8..5eca4bd 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MemberList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MemberList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\IpMessaging\V2\Service\Channel;
@@ -12,60 +19,75 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class MemberList extends ListResource
-{
+ {
/**
* Construct the MemberList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $channelSid The SID of the Channel for the member
- * @return \Twilio\Rest\IpMessaging\V2\Service\Channel\MemberList
+ * @param string $serviceSid
+ * @param string $channelSid
*/
- public function __construct(Version $version, $serviceSid, $channelSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid,
+ string $channelSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'channelSid' => $channelSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Members';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ 'channelSid' =>
+ $channelSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Channels/' . \rawurlencode($channelSid)
+ .'/Members';
}
/**
- * Create a new MemberInstance
+ * Create the MemberInstance
*
- * @param string $identity The `identity` value that identifies the new
- * resource's User
+ * @param string $identity
* @param array|Options $options Optional Arguments
- * @return MemberInstance Newly created MemberInstance
+ * @return MemberInstance Created MemberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($identity, $options = array())
+ public function create(string $identity, array $options = []): MemberInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'Identity' => $identity,
- 'RoleSid' => $options['roleSid'],
- 'LastConsumedMessageIndex' => $options['lastConsumedMessageIndex'],
- 'LastConsumptionTimestamp' => Serialize::iso8601DateTime($options['lastConsumptionTimestamp']),
- 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']),
- 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']),
- 'Attributes' => $options['attributes'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'Identity' =>
+ $identity,
+ 'RoleSid' =>
+ $options['roleSid'],
+ 'LastConsumedMessageIndex' =>
+ $options['lastConsumedMessageIndex'],
+ 'LastConsumptionTimestamp' =>
+ Serialize::iso8601DateTime($options['lastConsumptionTimestamp']),
+ 'DateCreated' =>
+ Serialize::iso8601DateTime($options['dateCreated']),
+ 'DateUpdated' =>
+ Serialize::iso8601DateTime($options['dateUpdated']),
+ 'Attributes' =>
+ $options['attributes'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled']]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
return new MemberInstance(
$this->version,
@@ -75,82 +97,83 @@ public function create($identity, $options = array())
);
}
+
/**
- * Streams MemberInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Reads MemberInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
+ * @param int $limit Upper limit for the number of records to return. read()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
+ * page_size is defined but a limit is defined, read()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return MemberInstance[] Array of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($options, $limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
- * Reads MemberInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
+ * Streams MemberInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
+ * @param int $limit Upper limit for the number of records to return. stream()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
+ * page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return MemberInstance[] Array of results
+ * @return Stream stream of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
/**
* Retrieve a single page of MemberInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of MemberInstance
+ * @return MemberPage Page of MemberInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): MemberPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Identity' => Serialize::map($options['identity'], function ($e) {
- return $e;
- }),
+
+ $params = Values::of([
+ 'Identity' =>
+ Serialize::map($options['identity'], function ($e) { return $e; }),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new MemberPage($this->version, $response, $this->solution);
}
@@ -160,9 +183,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of MemberInstance
+ * @return MemberPage Page of MemberInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): MemberPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -172,13 +195,16 @@ public function getPage($targetUrl)
return new MemberPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a MemberContext
*
- * @param string $sid The SID of the Member resource to fetch
- * @return \Twilio\Rest\IpMessaging\V2\Service\Channel\MemberContext
+ * @param string $sid
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): MemberContext
{
return new MemberContext(
$this->version,
@@ -193,8 +219,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V2.MemberList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MemberOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MemberOptions.php
index b96e18d..8465c05 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MemberOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MemberOptions.php
@@ -1,10 +1,16 @@
options['roleSid'] = $roleSid;
$this->options['lastConsumedMessageIndex'] = $lastConsumedMessageIndex;
$this->options['lastConsumptionTimestamp'] = $lastConsumptionTimestamp;
$this->options['dateCreated'] = $dateCreated;
$this->options['dateUpdated'] = $dateUpdated;
$this->options['attributes'] = $attributes;
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
}
/**
- * The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/rest/service-resource).
+ *
*
- * @param string $roleSid The SID of the Role to assign to the member
+ * @param string $roleSid
* @return $this Fluent Builder
*/
- public function setRoleSid($roleSid)
+ public function setRoleSid(string $roleSid): self
{
$this->options['roleSid'] = $roleSid;
return $this;
}
/**
- * The index of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) in the [Channel](https://www.twilio.com/docs/chat/channels) that the Member has read. This parameter should only be used when recreating a Member from a backup/separate source.
+ *
*
- * @param int $lastConsumedMessageIndex The index of the last Message in the
- * Channel the Member has read
+ * @param int $lastConsumedMessageIndex
* @return $this Fluent Builder
*/
- public function setLastConsumedMessageIndex($lastConsumedMessageIndex)
+ public function setLastConsumedMessageIndex(int $lastConsumedMessageIndex): self
{
$this->options['lastConsumedMessageIndex'] = $lastConsumedMessageIndex;
return $this;
}
/**
- * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) read event for the Member within the [Channel](https://www.twilio.com/docs/chat/channels).
+ *
*
- * @param \DateTime $lastConsumptionTimestamp The ISO 8601 based timestamp
- * string representing the datetime
- * of the last Message read event
- * for the member within the Channel
+ * @param \DateTime $lastConsumptionTimestamp
* @return $this Fluent Builder
*/
- public function setLastConsumptionTimestamp($lastConsumptionTimestamp)
+ public function setLastConsumptionTimestamp(\DateTime $lastConsumptionTimestamp): self
{
$this->options['lastConsumptionTimestamp'] = $lastConsumptionTimestamp;
return $this;
}
/**
- * The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this parameter should only be used when a Member is being recreated from a backup/separate source.
+ *
*
- * @param \DateTime $dateCreated The ISO 8601 date and time in GMT when the
- * resource was created
+ * @param \DateTime $dateCreated
* @return $this Fluent Builder
*/
- public function setDateCreated($dateCreated)
+ public function setDateCreated(\DateTime $dateCreated): self
{
$this->options['dateCreated'] = $dateCreated;
return $this;
}
/**
- * The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. The default value is `null`. Note that this parameter should only be used when a Member is being recreated from a backup/separate source and where a Member was previously updated.
+ *
*
- * @param \DateTime $dateUpdated The ISO 8601 date and time in GMT when the
- * resource was updated
+ * @param \DateTime $dateUpdated
* @return $this Fluent Builder
*/
- public function setDateUpdated($dateUpdated)
+ public function setDateUpdated(\DateTime $dateUpdated): self
{
$this->options['dateUpdated'] = $dateUpdated;
return $this;
}
/**
- * A valid JSON string that contains application-specific data.
+ *
*
- * @param string $attributes A valid JSON string that contains
- * application-specific data
+ * @param string $attributes
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setAttributes(string $attributes): self
{
$this->options['attributes'] = $attributes;
return $this;
}
+ /**
+ * The X-Twilio-Webhook-Enabled HTTP request header
+ *
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
+ * @return $this Fluent Builder
+ */
+ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self
+ {
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.IpMessaging.V2.CreateMemberOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.IpMessaging.V2.CreateMemberOptions ' . $options . ']';
}
}
-class ReadMemberOptions extends Options
-{
+class DeleteMemberOptions extends Options
+ {
+ /**
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
+ */
+ public function __construct(
+
+ string $xTwilioWebhookEnabled = Values::NONE
+
+ ) {
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ }
+
+ /**
+ * The X-Twilio-Webhook-Enabled HTTP request header
+ *
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
+ * @return $this Fluent Builder
+ */
+ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self
+ {
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ return $this;
+ }
+
/**
- * @param string $identity The `identity` value of the resources to read
+ * Provide a friendly representation
+ *
+ * @return string Machine friendly representation
*/
- public function __construct($identity = Values::NONE)
+ public function __toString(): string
+ {
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.IpMessaging.V2.DeleteMemberOptions ' . $options . ']';
+ }
+}
+
+
+class ReadMemberOptions extends Options
{
+ /**
+ * @param string[] $identity
+ */
+ public function __construct(
+
+ array $identity = Values::ARRAY_NONE
+
+ ) {
$this->options['identity'] = $identity;
}
/**
- * The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the Member resources to read. See [access tokens](https://www.twilio.com/docs/chat/create-tokens) for more details.
+ *
*
- * @param string $identity The `identity` value of the resources to read
+ * @param string[] $identity
* @return $this Fluent Builder
*/
- public function setIdentity($identity)
+ public function setIdentity(array $identity): self
{
$this->options['identity'] = $identity;
return $this;
@@ -216,137 +314,137 @@ public function setIdentity($identity)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.IpMessaging.V2.ReadMemberOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.IpMessaging.V2.ReadMemberOptions ' . $options . ']';
}
}
class UpdateMemberOptions extends Options
-{
+ {
/**
- * @param string $roleSid The SID of the Role to assign to the member
- * @param int $lastConsumedMessageIndex The index of the last consumed Message
- * for the Channel for the Member
- * @param \DateTime $lastConsumptionTimestamp The ISO 8601 based timestamp
- * string representing the datetime
- * of the last Message read event
- * for the Member within the Channel
- * @param \DateTime $dateCreated The ISO 8601 date and time in GMT when the
- * resource was created
- * @param \DateTime $dateUpdated The ISO 8601 date and time in GMT when the
- * resource was updated
- * @param string $attributes A valid JSON string that contains
- * application-specific data
+ * @param string $roleSid
+ * @param int $lastConsumedMessageIndex
+ * @param \DateTime $lastConsumptionTimestamp
+ * @param \DateTime $dateCreated
+ * @param \DateTime $dateUpdated
+ * @param string $attributes
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
*/
- public function __construct($roleSid = Values::NONE, $lastConsumedMessageIndex = Values::NONE, $lastConsumptionTimestamp = Values::NONE, $dateCreated = Values::NONE, $dateUpdated = Values::NONE, $attributes = Values::NONE)
- {
+ public function __construct(
+
+ string $roleSid = Values::NONE,
+ int $lastConsumedMessageIndex = Values::INT_NONE,
+ \DateTime $lastConsumptionTimestamp = null,
+ \DateTime $dateCreated = null,
+ \DateTime $dateUpdated = null,
+ string $attributes = Values::NONE,
+ string $xTwilioWebhookEnabled = Values::NONE
+
+ ) {
$this->options['roleSid'] = $roleSid;
$this->options['lastConsumedMessageIndex'] = $lastConsumedMessageIndex;
$this->options['lastConsumptionTimestamp'] = $lastConsumptionTimestamp;
$this->options['dateCreated'] = $dateCreated;
$this->options['dateUpdated'] = $dateUpdated;
$this->options['attributes'] = $attributes;
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
}
/**
- * The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/rest/service-resource).
+ *
*
- * @param string $roleSid The SID of the Role to assign to the member
+ * @param string $roleSid
* @return $this Fluent Builder
*/
- public function setRoleSid($roleSid)
+ public function setRoleSid(string $roleSid): self
{
$this->options['roleSid'] = $roleSid;
return $this;
}
/**
- * The index of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) that the Member has read within the [Channel](https://www.twilio.com/docs/chat/channels).
+ *
*
- * @param int $lastConsumedMessageIndex The index of the last consumed Message
- * for the Channel for the Member
+ * @param int $lastConsumedMessageIndex
* @return $this Fluent Builder
*/
- public function setLastConsumedMessageIndex($lastConsumedMessageIndex)
+ public function setLastConsumedMessageIndex(int $lastConsumedMessageIndex): self
{
$this->options['lastConsumedMessageIndex'] = $lastConsumedMessageIndex;
return $this;
}
/**
- * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) read event for the Member within the [Channel](https://www.twilio.com/docs/chat/channels).
+ *
*
- * @param \DateTime $lastConsumptionTimestamp The ISO 8601 based timestamp
- * string representing the datetime
- * of the last Message read event
- * for the Member within the Channel
+ * @param \DateTime $lastConsumptionTimestamp
* @return $this Fluent Builder
*/
- public function setLastConsumptionTimestamp($lastConsumptionTimestamp)
+ public function setLastConsumptionTimestamp(\DateTime $lastConsumptionTimestamp): self
{
$this->options['lastConsumptionTimestamp'] = $lastConsumptionTimestamp;
return $this;
}
/**
- * The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this parameter should only be used when a Member is being recreated from a backup/separate source.
+ *
*
- * @param \DateTime $dateCreated The ISO 8601 date and time in GMT when the
- * resource was created
+ * @param \DateTime $dateCreated
* @return $this Fluent Builder
*/
- public function setDateCreated($dateCreated)
+ public function setDateCreated(\DateTime $dateCreated): self
{
$this->options['dateCreated'] = $dateCreated;
return $this;
}
/**
- * The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated.
+ *
*
- * @param \DateTime $dateUpdated The ISO 8601 date and time in GMT when the
- * resource was updated
+ * @param \DateTime $dateUpdated
* @return $this Fluent Builder
*/
- public function setDateUpdated($dateUpdated)
+ public function setDateUpdated(\DateTime $dateUpdated): self
{
$this->options['dateUpdated'] = $dateUpdated;
return $this;
}
/**
- * A valid JSON string that contains application-specific data.
+ *
*
- * @param string $attributes A valid JSON string that contains
- * application-specific data
+ * @param string $attributes
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setAttributes(string $attributes): self
{
$this->options['attributes'] = $attributes;
return $this;
}
+ /**
+ * The X-Twilio-Webhook-Enabled HTTP request header
+ *
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
+ * @return $this Fluent Builder
+ */
+ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self
+ {
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.IpMessaging.V2.UpdateMemberOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.IpMessaging.V2.UpdateMemberOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MemberPage.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MemberPage.php
index 6a1742f..6d476d9 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MemberPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MemberPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return MemberInstance \Twilio\Rest\IpMessaging\V2\Service\Channel\MemberInstance
+ */
+ public function buildInstance(array $payload): MemberInstance
{
- return new MemberInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['channelSid']
- );
+ return new MemberInstance($this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V2.MemberPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MessageContext.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MessageContext.php
index df31e48..53fe93c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MessageContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MessageContext.php
@@ -2,57 +2,91 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\IpMessaging\V2\Service\Channel;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
class MessageContext extends InstanceContext
-{
+ {
/**
* Initialize the MessageContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the resource from
- * @param string $channelSid The SID of the Channel the message to fetch
- * belongs to
- * @param string $sid The SID of the Message resource to fetch
- * @return \Twilio\Rest\IpMessaging\V2\Service\Channel\MessageContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid
+ * @param string $channelSid
+ * @param string $sid
*/
- public function __construct(Version $version, $serviceSid, $channelSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $channelSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'channelSid' =>
+ $channelSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Messages/' . \rawurlencode($sid) . '';
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Channels/' . \rawurlencode($channelSid)
+ .'/Messages/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a MessageInstance
+ * Delete the MessageInstance
+ *
+ * @param array|Options $options Optional Arguments
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(array $options = []): bool
+ {
+
+ $options = new Values($options);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled']]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
+ }
+
+
+ /**
+ * Fetch the MessageInstance
*
* @return MessageInstance Fetched MessageInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): MessageInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new MessageInstance(
$this->version,
@@ -63,16 +97,6 @@ public function fetch()
);
}
- /**
- * Deletes the MessageInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Update the MessageInstance
@@ -81,25 +105,28 @@ public function delete()
* @return MessageInstance Updated MessageInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): MessageInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'Body' => $options['body'],
- 'Attributes' => $options['attributes'],
- 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']),
- 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']),
- 'LastUpdatedBy' => $options['lastUpdatedBy'],
- 'From' => $options['from'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'Body' =>
+ $options['body'],
+ 'Attributes' =>
+ $options['attributes'],
+ 'DateCreated' =>
+ Serialize::iso8601DateTime($options['dateCreated']),
+ 'DateUpdated' =>
+ Serialize::iso8601DateTime($options['dateUpdated']),
+ 'LastUpdatedBy' =>
+ $options['lastUpdatedBy'],
+ 'From' =>
+ $options['from'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled']]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new MessageInstance(
$this->version,
@@ -110,17 +137,18 @@ public function update($options = array())
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.IpMessaging.V2.MessageContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MessageInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MessageInstance.php
index 39723cb..ef8c75e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MessageInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MessageInstance.php
@@ -2,58 +2,64 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\IpMessaging\V2\Service\Channel;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $attributes
- * @property string $serviceSid
- * @property string $to
- * @property string $channelSid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $lastUpdatedBy
- * @property bool $wasEdited
- * @property string $from
- * @property string $body
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $attributes
+ * @property string|null $serviceSid
+ * @property string|null $to
+ * @property string|null $channelSid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $lastUpdatedBy
+ * @property bool|null $wasEdited
+ * @property string|null $from
+ * @property string|null $body
* @property int $index
- * @property string $type
- * @property array $media
- * @property string $url
+ * @property string|null $type
+ * @property array|null $media
+ * @property string|null $url
*/
class MessageInstance extends InstanceResource
{
/**
* Initialize the MessageInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $channelSid The SID of the Channel the Message resource
- * belongs to
- * @param string $sid The SID of the Message resource to fetch
- * @return \Twilio\Rest\IpMessaging\V2\Service\Channel\MessageInstance
+ * @param string $serviceSid
+ * @param string $channelSid
+ * @param string $sid
*/
- public function __construct(Version $version, array $payload, $serviceSid, $channelSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $channelSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'attributes' => Values::array_get($payload, 'attributes'),
@@ -70,24 +76,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $chan
'type' => Values::array_get($payload, 'type'),
'media' => Values::array_get($payload, 'media'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'channelSid' => $channelSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\IpMessaging\V2\Service\Channel\MessageContext Context
- * for this
- * MessageInstance
+ * @return MessageContext Context for this MessageInstance
*/
- protected function proxy()
+ protected function proxy(): MessageContext
{
if (!$this->context) {
$this->context = new MessageContext(
@@ -102,25 +102,28 @@ protected function proxy()
}
/**
- * Fetch a MessageInstance
+ * Delete the MessageInstance
*
- * @return MessageInstance Fetched MessageInstance
+ * @param array|Options $options Optional Arguments
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(array $options = []): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete($options);
}
/**
- * Deletes the MessageInstance
+ * Fetch the MessageInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return MessageInstance Fetched MessageInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): MessageInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -130,8 +133,9 @@ public function delete()
* @return MessageInstance Updated MessageInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): MessageInstance
{
+
return $this->proxy()->update($options);
}
@@ -142,7 +146,7 @@ public function update($options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -161,12 +165,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.IpMessaging.V2.MessageInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MessageList.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MessageList.php
index 3dbf98a..e33b514 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MessageList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MessageList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\IpMessaging\V2\Service\Channel;
@@ -12,59 +19,74 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class MessageList extends ListResource
-{
+ {
/**
* Construct the MessageList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $channelSid The SID of the Channel the Message resource
- * belongs to
- * @return \Twilio\Rest\IpMessaging\V2\Service\Channel\MessageList
+ * @param string $serviceSid
+ * @param string $channelSid
*/
- public function __construct(Version $version, $serviceSid, $channelSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid,
+ string $channelSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'channelSid' => $channelSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Messages';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ 'channelSid' =>
+ $channelSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Channels/' . \rawurlencode($channelSid)
+ .'/Messages';
}
/**
- * Create a new MessageInstance
+ * Create the MessageInstance
*
* @param array|Options $options Optional Arguments
- * @return MessageInstance Newly created MessageInstance
+ * @return MessageInstance Created MessageInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($options = array())
+ public function create(array $options = []): MessageInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'From' => $options['from'],
- 'Attributes' => $options['attributes'],
- 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']),
- 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']),
- 'LastUpdatedBy' => $options['lastUpdatedBy'],
- 'Body' => $options['body'],
- 'MediaSid' => $options['mediaSid'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'From' =>
+ $options['from'],
+ 'Attributes' =>
+ $options['attributes'],
+ 'DateCreated' =>
+ Serialize::iso8601DateTime($options['dateCreated']),
+ 'DateUpdated' =>
+ Serialize::iso8601DateTime($options['dateUpdated']),
+ 'LastUpdatedBy' =>
+ $options['lastUpdatedBy'],
+ 'Body' =>
+ $options['body'],
+ 'MediaSid' =>
+ $options['mediaSid'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled']]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
return new MessageInstance(
$this->version,
@@ -74,80 +96,83 @@ public function create($options = array())
);
}
+
/**
- * Streams MessageInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Reads MessageInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
+ * @param int $limit Upper limit for the number of records to return. read()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
+ * page_size is defined but a limit is defined, read()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return MessageInstance[] Array of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($options, $limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
- * Reads MessageInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
+ * Streams MessageInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
+ * @param int $limit Upper limit for the number of records to return. stream()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
+ * page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return MessageInstance[] Array of results
+ * @return Stream stream of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
/**
* Retrieve a single page of MessageInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of MessageInstance
+ * @return MessagePage Page of MessageInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): MessagePage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Order' => $options['order'],
+
+ $params = Values::of([
+ 'Order' =>
+ $options['order'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new MessagePage($this->version, $response, $this->solution);
}
@@ -157,9 +182,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of MessageInstance
+ * @return MessagePage Page of MessageInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): MessagePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -169,13 +194,16 @@ public function getPage($targetUrl)
return new MessagePage($this->version, $response, $this->solution);
}
+
/**
* Constructs a MessageContext
*
- * @param string $sid The SID of the Message resource to fetch
- * @return \Twilio\Rest\IpMessaging\V2\Service\Channel\MessageContext
+ * @param string $sid
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): MessageContext
{
return new MessageContext(
$this->version,
@@ -190,8 +218,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V2.MessageList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MessageOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MessageOptions.php
index c34166e..394bc12 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MessageOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MessageOptions.php
@@ -1,10 +1,16 @@
options['from'] = $from;
$this->options['attributes'] = $attributes;
$this->options['dateCreated'] = $dateCreated;
@@ -85,130 +153,175 @@ public function __construct($from = Values::NONE, $attributes = Values::NONE, $d
$this->options['lastUpdatedBy'] = $lastUpdatedBy;
$this->options['body'] = $body;
$this->options['mediaSid'] = $mediaSid;
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
}
/**
- * The [Identity](https://www.twilio.com/docs/chat/identity) of the new message's author. The default value is `system`.
+ *
*
- * @param string $from The Identity of the new message's author
+ * @param string $from
* @return $this Fluent Builder
*/
- public function setFrom($from)
+ public function setFrom(string $from): self
{
$this->options['from'] = $from;
return $this;
}
/**
- * A valid JSON string that contains application-specific data.
+ *
*
- * @param string $attributes A valid JSON string that contains
- * application-specific data
+ * @param string $attributes
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setAttributes(string $attributes): self
{
$this->options['attributes'] = $attributes;
return $this;
}
/**
- * The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. This parameter should only be used when a Chat's history is being recreated from a backup/separate source.
+ *
*
- * @param \DateTime $dateCreated The ISO 8601 date and time in GMT when the
- * resource was created
+ * @param \DateTime $dateCreated
* @return $this Fluent Builder
*/
- public function setDateCreated($dateCreated)
+ public function setDateCreated(\DateTime $dateCreated): self
{
$this->options['dateCreated'] = $dateCreated;
return $this;
}
/**
- * The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated.
+ *
*
- * @param \DateTime $dateUpdated The ISO 8601 date and time in GMT when the
- * resource was updated
+ * @param \DateTime $dateUpdated
* @return $this Fluent Builder
*/
- public function setDateUpdated($dateUpdated)
+ public function setDateUpdated(\DateTime $dateUpdated): self
{
$this->options['dateUpdated'] = $dateUpdated;
return $this;
}
/**
- * The [Identity](https://www.twilio.com/docs/chat/identity) of the User who last updated the Message, if applicable.
+ *
*
- * @param string $lastUpdatedBy The Identity of the User who last updated the
- * Message
+ * @param string $lastUpdatedBy
* @return $this Fluent Builder
*/
- public function setLastUpdatedBy($lastUpdatedBy)
+ public function setLastUpdatedBy(string $lastUpdatedBy): self
{
$this->options['lastUpdatedBy'] = $lastUpdatedBy;
return $this;
}
/**
- * The message to send to the channel. Can be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string.
+ *
*
- * @param string $body The message to send to the channel
+ * @param string $body
* @return $this Fluent Builder
*/
- public function setBody($body)
+ public function setBody(string $body): self
{
$this->options['body'] = $body;
return $this;
}
/**
- * The SID of the [Media](https://www.twilio.com/docs/chat/rest/media) to attach to the new Message.
+ *
*
- * @param string $mediaSid The Media Sid to be attached to the new Message
+ * @param string $mediaSid
* @return $this Fluent Builder
*/
- public function setMediaSid($mediaSid)
+ public function setMediaSid(string $mediaSid): self
{
$this->options['mediaSid'] = $mediaSid;
return $this;
}
+ /**
+ * The X-Twilio-Webhook-Enabled HTTP request header
+ *
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
+ * @return $this Fluent Builder
+ */
+ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self
+ {
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.IpMessaging.V2.CreateMessageOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.IpMessaging.V2.CreateMessageOptions ' . $options . ']';
}
}
-class ReadMessageOptions extends Options
-{
+class DeleteMessageOptions extends Options
+ {
+ /**
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
+ */
+ public function __construct(
+
+ string $xTwilioWebhookEnabled = Values::NONE
+
+ ) {
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ }
+
+ /**
+ * The X-Twilio-Webhook-Enabled HTTP request header
+ *
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
+ * @return $this Fluent Builder
+ */
+ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self
+ {
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ return $this;
+ }
+
/**
- * @param string $order The sort order of the returned messages
+ * Provide a friendly representation
+ *
+ * @return string Machine friendly representation
*/
- public function __construct($order = Values::NONE)
+ public function __toString(): string
+ {
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.IpMessaging.V2.DeleteMessageOptions ' . $options . ']';
+ }
+}
+
+
+class ReadMessageOptions extends Options
{
+ /**
+ * @param string $order
+ */
+ public function __construct(
+
+ string $order = Values::NONE
+
+ ) {
$this->options['order'] = $order;
}
/**
- * The sort order of the returned messages. Can be: `asc` (ascending) or `desc` (descending) with `asc` as the default.
+ *
*
- * @param string $order The sort order of the returned messages
+ * @param string $order
* @return $this Fluent Builder
*/
- public function setOrder($order)
+ public function setOrder(string $order): self
{
$this->options['order'] = $order;
return $this;
@@ -219,131 +332,137 @@ public function setOrder($order)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.IpMessaging.V2.ReadMessageOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.IpMessaging.V2.ReadMessageOptions ' . $options . ']';
}
}
class UpdateMessageOptions extends Options
-{
+ {
/**
- * @param string $body The message to send to the channel
- * @param string $attributes A valid JSON string that contains
- * application-specific data
- * @param \DateTime $dateCreated The ISO 8601 date and time in GMT when the
- * resource was created
- * @param \DateTime $dateUpdated The ISO 8601 date and time in GMT when the
- * resource was updated
- * @param string $lastUpdatedBy The Identity of the User who last updated the
- * Message, if applicable
- * @param string $from The Identity of the message's author
+ * @param string $body
+ * @param string $attributes
+ * @param \DateTime $dateCreated
+ * @param \DateTime $dateUpdated
+ * @param string $lastUpdatedBy
+ * @param string $from
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
*/
- public function __construct($body = Values::NONE, $attributes = Values::NONE, $dateCreated = Values::NONE, $dateUpdated = Values::NONE, $lastUpdatedBy = Values::NONE, $from = Values::NONE)
- {
+ public function __construct(
+
+ string $body = Values::NONE,
+ string $attributes = Values::NONE,
+ \DateTime $dateCreated = null,
+ \DateTime $dateUpdated = null,
+ string $lastUpdatedBy = Values::NONE,
+ string $from = Values::NONE,
+ string $xTwilioWebhookEnabled = Values::NONE
+
+ ) {
$this->options['body'] = $body;
$this->options['attributes'] = $attributes;
$this->options['dateCreated'] = $dateCreated;
$this->options['dateUpdated'] = $dateUpdated;
$this->options['lastUpdatedBy'] = $lastUpdatedBy;
$this->options['from'] = $from;
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
}
/**
- * The message to send to the channel. Can be an empty string or `null`, which sets the value as an empty string. You can send structured data in the body by serializing it as a string.
+ *
*
- * @param string $body The message to send to the channel
+ * @param string $body
* @return $this Fluent Builder
*/
- public function setBody($body)
+ public function setBody(string $body): self
{
$this->options['body'] = $body;
return $this;
}
/**
- * A valid JSON string that contains application-specific data.
+ *
*
- * @param string $attributes A valid JSON string that contains
- * application-specific data
+ * @param string $attributes
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setAttributes(string $attributes): self
{
$this->options['attributes'] = $attributes;
return $this;
}
/**
- * The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. This parameter should only be used when a Chat's history is being recreated from a backup/separate source.
+ *
*
- * @param \DateTime $dateCreated The ISO 8601 date and time in GMT when the
- * resource was created
+ * @param \DateTime $dateCreated
* @return $this Fluent Builder
*/
- public function setDateCreated($dateCreated)
+ public function setDateCreated(\DateTime $dateCreated): self
{
$this->options['dateCreated'] = $dateCreated;
return $this;
}
/**
- * The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated.
+ *
*
- * @param \DateTime $dateUpdated The ISO 8601 date and time in GMT when the
- * resource was updated
+ * @param \DateTime $dateUpdated
* @return $this Fluent Builder
*/
- public function setDateUpdated($dateUpdated)
+ public function setDateUpdated(\DateTime $dateUpdated): self
{
$this->options['dateUpdated'] = $dateUpdated;
return $this;
}
/**
- * The [Identity](https://www.twilio.com/docs/chat/identity) of the User who last updated the Message, if applicable.
+ *
*
- * @param string $lastUpdatedBy The Identity of the User who last updated the
- * Message, if applicable
+ * @param string $lastUpdatedBy
* @return $this Fluent Builder
*/
- public function setLastUpdatedBy($lastUpdatedBy)
+ public function setLastUpdatedBy(string $lastUpdatedBy): self
{
$this->options['lastUpdatedBy'] = $lastUpdatedBy;
return $this;
}
/**
- * The [Identity](https://www.twilio.com/docs/chat/identity) of the message's author.
+ *
*
- * @param string $from The Identity of the message's author
+ * @param string $from
* @return $this Fluent Builder
*/
- public function setFrom($from)
+ public function setFrom(string $from): self
{
$this->options['from'] = $from;
return $this;
}
+ /**
+ * The X-Twilio-Webhook-Enabled HTTP request header
+ *
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
+ * @return $this Fluent Builder
+ */
+ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self
+ {
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.IpMessaging.V2.UpdateMessageOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.IpMessaging.V2.UpdateMessageOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MessagePage.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MessagePage.php
index b42955a..4d8d088 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MessagePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/MessagePage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return MessageInstance \Twilio\Rest\IpMessaging\V2\Service\Channel\MessageInstance
+ */
+ public function buildInstance(array $payload): MessageInstance
{
- return new MessageInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['channelSid']
- );
+ return new MessageInstance($this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V2.MessagePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookContext.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookContext.php
index cc85cd8..af89767 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookContext.php
@@ -2,58 +2,88 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\IpMessaging\V2\Service\Channel;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
class WebhookContext extends InstanceContext
-{
+ {
/**
* Initialize the WebhookContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service with the Channel to fetch
- * the Webhook resource from
- * @param string $channelSid The SID of the Channel the resource to fetch
- * belongs to
- * @param string $sid The SID of the Channel Webhook resource to fetch
- * @return \Twilio\Rest\IpMessaging\V2\Service\Channel\WebhookContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid
+ * @param string $channelSid
+ * @param string $sid
*/
- public function __construct(Version $version, $serviceSid, $channelSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $channelSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'channelSid' =>
+ $channelSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Channels/' . \rawurlencode($channelSid)
+ .'/Webhooks/' . \rawurlencode($sid)
+ .'';
+ }
+
+ /**
+ * Delete the WebhookInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Webhooks/' . \rawurlencode($sid) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a WebhookInstance
+ * Fetch the WebhookInstance
*
* @return WebhookInstance Fetched WebhookInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): WebhookInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new WebhookInstance(
$this->version,
@@ -64,6 +94,7 @@ public function fetch()
);
}
+
/**
* Update the WebhookInstance
*
@@ -71,29 +102,28 @@ public function fetch()
* @return WebhookInstance Updated WebhookInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): WebhookInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'Configuration.Url' => $options['configurationUrl'],
- 'Configuration.Method' => $options['configurationMethod'],
- 'Configuration.Filters' => Serialize::map($options['configurationFilters'], function ($e) {
- return $e;
- }),
- 'Configuration.Triggers' => Serialize::map($options['configurationTriggers'], function ($e) {
- return $e;
- }),
- 'Configuration.FlowSid' => $options['configurationFlowSid'],
- 'Configuration.RetryCount' => $options['configurationRetryCount'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'Configuration.Url' =>
+ $options['configurationUrl'],
+ 'Configuration.Method' =>
+ $options['configurationMethod'],
+ 'Configuration.Filters' =>
+ Serialize::map($options['configurationFilters'], function ($e) { return $e; }),
+ 'Configuration.Triggers' =>
+ Serialize::map($options['configurationTriggers'], function ($e) { return $e; }),
+ 'Configuration.FlowSid' =>
+ $options['configurationFlowSid'],
+ 'Configuration.RetryCount' =>
+ $options['configurationRetryCount'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new WebhookInstance(
$this->version,
@@ -104,28 +134,18 @@ public function update($options = array())
);
}
- /**
- * Deletes the WebhookInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.IpMessaging.V2.WebhookContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookInstance.php
index 30fd41b..60c4783 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookInstance.php
@@ -2,51 +2,57 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\IpMessaging\V2\Service\Channel;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $channelSid
- * @property string $type
- * @property string $url
- * @property array $configuration
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $channelSid
+ * @property string|null $type
+ * @property string|null $url
+ * @property array|null $configuration
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
*/
class WebhookInstance extends InstanceResource
{
/**
* Initialize the WebhookInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the Channel Webhook
- * resource is associated with
- * @param string $channelSid The SID of the Channel the Channel Webhook
- * resource belongs to
- * @param string $sid The SID of the Channel Webhook resource to fetch
- * @return \Twilio\Rest\IpMessaging\V2\Service\Channel\WebhookInstance
+ * @param string $serviceSid
+ * @param string $channelSid
+ * @param string $sid
*/
- public function __construct(Version $version, array $payload, $serviceSid, $channelSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $channelSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
@@ -56,24 +62,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $chan
'configuration' => Values::array_get($payload, 'configuration'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- );
+ ];
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'channelSid' => $channelSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['serviceSid' => $serviceSid, 'channelSid' => $channelSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\IpMessaging\V2\Service\Channel\WebhookContext Context
- * for this
- * WebhookInstance
+ * @return WebhookContext Context for this WebhookInstance
*/
- protected function proxy()
+ protected function proxy(): WebhookContext
{
if (!$this->context) {
$this->context = new WebhookContext(
@@ -88,37 +88,40 @@ protected function proxy()
}
/**
- * Fetch a WebhookInstance
+ * Delete the WebhookInstance
*
- * @return WebhookInstance Fetched WebhookInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Update the WebhookInstance
+ * Fetch the WebhookInstance
*
- * @param array|Options $options Optional Arguments
- * @return WebhookInstance Updated WebhookInstance
+ * @return WebhookInstance Fetched WebhookInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): WebhookInstance
{
- return $this->proxy()->update($options);
+
+ return $this->proxy()->fetch();
}
/**
- * Deletes the WebhookInstance
+ * Update the WebhookInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return WebhookInstance Updated WebhookInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): WebhookInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->update($options);
}
/**
@@ -128,7 +131,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -147,12 +150,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.IpMessaging.V2.WebhookInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookList.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookList.php
index 9bd58b3..ed26981 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\IpMessaging\V2\Service\Channel;
@@ -12,59 +19,85 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class WebhookList extends ListResource
-{
+ {
/**
* Construct the WebhookList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the Channel Webhook
- * resource is associated with
- * @param string $channelSid The SID of the Channel the Channel Webhook
- * resource belongs to
- * @return \Twilio\Rest\IpMessaging\V2\Service\Channel\WebhookList
+ * @param string $serviceSid
+ * @param string $channelSid
*/
- public function __construct(Version $version, $serviceSid, $channelSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid,
+ string $channelSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'channelSid' => $channelSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($channelSid) . '/Webhooks';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ 'channelSid' =>
+ $channelSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Channels/' . \rawurlencode($channelSid)
+ .'/Webhooks';
}
/**
- * Streams WebhookInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the WebhookInstance
*
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @param string $type
+ * @param array|Options $options Optional Arguments
+ * @return WebhookInstance Created WebhookInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($limit = null, $pageSize = null)
+ public function create(string $type, array $options = []): WebhookInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'Type' =>
+ $type,
+ 'Configuration.Url' =>
+ $options['configurationUrl'],
+ 'Configuration.Method' =>
+ $options['configurationMethod'],
+ 'Configuration.Filters' =>
+ Serialize::map($options['configurationFilters'], function ($e) { return $e; }),
+ 'Configuration.Triggers' =>
+ Serialize::map($options['configurationTriggers'], function ($e) { return $e; }),
+ 'Configuration.FlowSid' =>
+ $options['configurationFlowSid'],
+ 'Configuration.RetryCount' =>
+ $options['configurationRetryCount'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new WebhookInstance(
+ $this->version,
+ $payload,
+ $this->solution['serviceSid'],
+ $this->solution['channelSid']
+ );
}
+
/**
* Reads WebhookInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -80,11 +113,38 @@ public function stream($limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return WebhookInstance[] Array of results
*/
- public function read($limit = null, $pageSize = null)
+ public function read(int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($limit, $pageSize), false);
}
+ /**
+ * Streams WebhookInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of WebhookInstance records from the API.
* Request is executed immediately
@@ -92,21 +152,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of WebhookInstance
+ * @return WebhookPage Page of WebhookInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): WebhookPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new WebhookPage($this->version, $response, $this->solution);
}
@@ -116,9 +177,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of WebhookInstance
+ * @return WebhookPage Page of WebhookInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): WebhookPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -128,54 +189,16 @@ public function getPage($targetUrl)
return new WebhookPage($this->version, $response, $this->solution);
}
- /**
- * Create a new WebhookInstance
- *
- * @param string $type The type of webhook
- * @param array|Options $options Optional Arguments
- * @return WebhookInstance Newly created WebhookInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($type, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'Type' => $type,
- 'Configuration.Url' => $options['configurationUrl'],
- 'Configuration.Method' => $options['configurationMethod'],
- 'Configuration.Filters' => Serialize::map($options['configurationFilters'], function ($e) {
- return $e;
- }),
- 'Configuration.Triggers' => Serialize::map($options['configurationTriggers'], function ($e) {
- return $e;
- }),
- 'Configuration.FlowSid' => $options['configurationFlowSid'],
- 'Configuration.RetryCount' => $options['configurationRetryCount'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new WebhookInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['channelSid']
- );
- }
/**
* Constructs a WebhookContext
*
- * @param string $sid The SID of the Channel Webhook resource to fetch
- * @return \Twilio\Rest\IpMessaging\V2\Service\Channel\WebhookContext
+ * @param string $sid
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): WebhookContext
{
return new WebhookContext(
$this->version,
@@ -190,8 +213,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V2.WebhookList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookOptions.php
index ccb7092..bf70282 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookOptions.php
@@ -1,10 +1,16 @@
options['configurationUrl'] = $configurationUrl;
$this->options['configurationMethod'] = $configurationMethod;
$this->options['configurationFilters'] = $configurationFilters;
@@ -82,78 +114,70 @@ public function __construct($configurationUrl = Values::NONE, $configurationMeth
}
/**
- * The URL of the webhook to call using the `configuration.method`.
+ *
*
- * @param string $configurationUrl The URL of the webhook to call
+ * @param string $configurationUrl
* @return $this Fluent Builder
*/
- public function setConfigurationUrl($configurationUrl)
+ public function setConfigurationUrl(string $configurationUrl): self
{
$this->options['configurationUrl'] = $configurationUrl;
return $this;
}
/**
- * The HTTP method used to call `configuration.url`. Can be: `GET` or `POST` and the default is `POST`.
- *
- * @param string $configurationMethod The HTTP method used to call
- * `configuration.url`
+ * @param string $configurationMethod
* @return $this Fluent Builder
*/
- public function setConfigurationMethod($configurationMethod)
+ public function setConfigurationMethod(string $configurationMethod): self
{
$this->options['configurationMethod'] = $configurationMethod;
return $this;
}
/**
- * The events that cause us to call the Channel Webhook. Used when `type` is `webhook`. This parameter takes only one event. To specify more than one event, repeat this parameter for each event. For the list of possible events, see [Webhook Event Triggers](https://www.twilio.com/docs/chat/webhook-events#webhook-event-trigger).
+ *
*
- * @param string $configurationFilters The events that cause us to call the
- * Channel Webhook
+ * @param string[] $configurationFilters
* @return $this Fluent Builder
*/
- public function setConfigurationFilters($configurationFilters)
+ public function setConfigurationFilters(array $configurationFilters): self
{
$this->options['configurationFilters'] = $configurationFilters;
return $this;
}
/**
- * A string that will cause us to call the webhook when it is present in a message body. This parameter takes only one trigger string. To specify more than one, repeat this parameter for each trigger string up to a total of 5 trigger strings. Used only when `type` = `trigger`.
+ *
*
- * @param string $configurationTriggers A string that will cause us to call the
- * webhook when it is found in a message
- * body
+ * @param string[] $configurationTriggers
* @return $this Fluent Builder
*/
- public function setConfigurationTriggers($configurationTriggers)
+ public function setConfigurationTriggers(array $configurationTriggers): self
{
$this->options['configurationTriggers'] = $configurationTriggers;
return $this;
}
/**
- * The SID of the Studio [Flow](https://www.twilio.com/docs/studio/rest-api/flow) to call when an event in `configuration.filters` occurs. Used only when `type` is `studio`.
+ *
*
- * @param string $configurationFlowSid The SID of the Studio Flow to call when
- * an event occurs
+ * @param string $configurationFlowSid
* @return $this Fluent Builder
*/
- public function setConfigurationFlowSid($configurationFlowSid)
+ public function setConfigurationFlowSid(string $configurationFlowSid): self
{
$this->options['configurationFlowSid'] = $configurationFlowSid;
return $this;
}
/**
- * The number of times to retry the webhook if the first attempt fails. Can be an integer between 0 and 3, inclusive, and the default is 0.
+ *
*
- * @param int $configurationRetryCount The number of times to retry the webhook
- * if the first attempt fails
+ * @param int $configurationRetryCount
* @return $this Fluent Builder
*/
- public function setConfigurationRetryCount($configurationRetryCount)
+ public function setConfigurationRetryCount(int $configurationRetryCount): self
{
$this->options['configurationRetryCount'] = $configurationRetryCount;
return $this;
@@ -164,36 +188,36 @@ public function setConfigurationRetryCount($configurationRetryCount)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.IpMessaging.V2.CreateWebhookOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.IpMessaging.V2.CreateWebhookOptions ' . $options . ']';
}
}
+
+
+
class UpdateWebhookOptions extends Options
-{
+ {
/**
- * @param string $configurationUrl The URL of the webhook to call
- * @param string $configurationMethod The HTTP method used to call
- * `configuration.url`
- * @param string $configurationFilters The events that cause us to call the
- * Channel Webhook
- * @param string $configurationTriggers A string that will cause us to call the
- * webhook when it is found in a message
- * body
- * @param string $configurationFlowSid The SID of the Studio Flow to call when
- * an event occurs
- * @param int $configurationRetryCount The number of times to retry the webhook
- * if the first attempt fails
+ * @param string $configurationUrl
+ * @param string $configurationMethod
+ * @param string[] $configurationFilters
+ * @param string[] $configurationTriggers
+ * @param string $configurationFlowSid
+ * @param int $configurationRetryCount
*/
- public function __construct($configurationUrl = Values::NONE, $configurationMethod = Values::NONE, $configurationFilters = Values::NONE, $configurationTriggers = Values::NONE, $configurationFlowSid = Values::NONE, $configurationRetryCount = Values::NONE)
- {
+ public function __construct(
+
+ string $configurationUrl = Values::NONE,
+ string $configurationMethod = Values::NONE,
+ array $configurationFilters = Values::ARRAY_NONE,
+ array $configurationTriggers = Values::ARRAY_NONE,
+ string $configurationFlowSid = Values::NONE,
+ int $configurationRetryCount = Values::INT_NONE
+
+ ) {
$this->options['configurationUrl'] = $configurationUrl;
$this->options['configurationMethod'] = $configurationMethod;
$this->options['configurationFilters'] = $configurationFilters;
@@ -203,78 +227,70 @@ public function __construct($configurationUrl = Values::NONE, $configurationMeth
}
/**
- * The URL of the webhook to call using the `configuration.method`.
+ *
*
- * @param string $configurationUrl The URL of the webhook to call
+ * @param string $configurationUrl
* @return $this Fluent Builder
*/
- public function setConfigurationUrl($configurationUrl)
+ public function setConfigurationUrl(string $configurationUrl): self
{
$this->options['configurationUrl'] = $configurationUrl;
return $this;
}
/**
- * The HTTP method used to call `configuration.url`. Can be: `GET` or `POST` and the default is `POST`.
- *
- * @param string $configurationMethod The HTTP method used to call
- * `configuration.url`
+ * @param string $configurationMethod
* @return $this Fluent Builder
*/
- public function setConfigurationMethod($configurationMethod)
+ public function setConfigurationMethod(string $configurationMethod): self
{
$this->options['configurationMethod'] = $configurationMethod;
return $this;
}
/**
- * The events that cause us to call the Channel Webhook. Used when `type` is `webhook`. This parameter takes only one event. To specify more than one event, repeat this parameter for each event. For the list of possible events, see [Webhook Event Triggers](https://www.twilio.com/docs/chat/webhook-events#webhook-event-trigger).
+ *
*
- * @param string $configurationFilters The events that cause us to call the
- * Channel Webhook
+ * @param string[] $configurationFilters
* @return $this Fluent Builder
*/
- public function setConfigurationFilters($configurationFilters)
+ public function setConfigurationFilters(array $configurationFilters): self
{
$this->options['configurationFilters'] = $configurationFilters;
return $this;
}
/**
- * A string that will cause us to call the webhook when it is present in a message body. This parameter takes only one trigger string. To specify more than one, repeat this parameter for each trigger string up to a total of 5 trigger strings. Used only when `type` = `trigger`.
+ *
*
- * @param string $configurationTriggers A string that will cause us to call the
- * webhook when it is found in a message
- * body
+ * @param string[] $configurationTriggers
* @return $this Fluent Builder
*/
- public function setConfigurationTriggers($configurationTriggers)
+ public function setConfigurationTriggers(array $configurationTriggers): self
{
$this->options['configurationTriggers'] = $configurationTriggers;
return $this;
}
/**
- * The SID of the Studio [Flow](https://www.twilio.com/docs/studio/rest-api/flow) to call when an event in `configuration.filters` occurs. Used only when `type` = `studio`.
+ *
*
- * @param string $configurationFlowSid The SID of the Studio Flow to call when
- * an event occurs
+ * @param string $configurationFlowSid
* @return $this Fluent Builder
*/
- public function setConfigurationFlowSid($configurationFlowSid)
+ public function setConfigurationFlowSid(string $configurationFlowSid): self
{
$this->options['configurationFlowSid'] = $configurationFlowSid;
return $this;
}
/**
- * The number of times to retry the webhook if the first attempt fails. Can be an integer between 0 and 3, inclusive, and the default is 0.
+ *
*
- * @param int $configurationRetryCount The number of times to retry the webhook
- * if the first attempt fails
+ * @param int $configurationRetryCount
* @return $this Fluent Builder
*/
- public function setConfigurationRetryCount($configurationRetryCount)
+ public function setConfigurationRetryCount(int $configurationRetryCount): self
{
$this->options['configurationRetryCount'] = $configurationRetryCount;
return $this;
@@ -285,14 +301,10 @@ public function setConfigurationRetryCount($configurationRetryCount)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.IpMessaging.V2.UpdateWebhookOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.IpMessaging.V2.UpdateWebhookOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookPage.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookPage.php
index 08c7f96..72482ca 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/Channel/WebhookPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return WebhookInstance \Twilio\Rest\IpMessaging\V2\Service\Channel\WebhookInstance
+ */
+ public function buildInstance(array $payload): WebhookInstance
{
- return new WebhookInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['channelSid']
- );
+ return new WebhookInstance($this->version, $payload, $this->solution['serviceSid'], $this->solution['channelSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V2.WebhookPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/ChannelContext.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/ChannelContext.php
index 7ef617d..84bfdda 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/ChannelContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/ChannelContext.php
@@ -2,74 +2,106 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\IpMessaging\V2\Service;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\IpMessaging\V2\Service\Channel\InviteList;
-use Twilio\Rest\IpMessaging\V2\Service\Channel\MemberList;
-use Twilio\Rest\IpMessaging\V2\Service\Channel\MessageList;
-use Twilio\Rest\IpMessaging\V2\Service\Channel\WebhookList;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+use Twilio\Rest\IpMessaging\V2\Service\Channel\MemberList;
+use Twilio\Rest\IpMessaging\V2\Service\Channel\InviteList;
+use Twilio\Rest\IpMessaging\V2\Service\Channel\WebhookList;
+use Twilio\Rest\IpMessaging\V2\Service\Channel\MessageList;
+
/**
- * @property \Twilio\Rest\IpMessaging\V2\Service\Channel\MemberList $members
- * @property \Twilio\Rest\IpMessaging\V2\Service\Channel\MessageList $messages
- * @property \Twilio\Rest\IpMessaging\V2\Service\Channel\InviteList $invites
- * @property \Twilio\Rest\IpMessaging\V2\Service\Channel\WebhookList $webhooks
+ * @property MemberList $members
+ * @property InviteList $invites
+ * @property WebhookList $webhooks
+ * @property MessageList $messages
+ * @method \Twilio\Rest\IpMessaging\V2\Service\Channel\WebhookContext webhooks(string $sid)
* @method \Twilio\Rest\IpMessaging\V2\Service\Channel\MemberContext members(string $sid)
* @method \Twilio\Rest\IpMessaging\V2\Service\Channel\MessageContext messages(string $sid)
* @method \Twilio\Rest\IpMessaging\V2\Service\Channel\InviteContext invites(string $sid)
- * @method \Twilio\Rest\IpMessaging\V2\Service\Channel\WebhookContext webhooks(string $sid)
*/
class ChannelContext extends InstanceContext
-{
- protected $_members = null;
- protected $_messages = null;
- protected $_invites = null;
- protected $_webhooks = null;
+ {
+ protected $_members;
+ protected $_invites;
+ protected $_webhooks;
+ protected $_messages;
/**
* Initialize the ChannelContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the resource from
- * @param string $sid The SID of the resource
- * @return \Twilio\Rest\IpMessaging\V2\Service\ChannelContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid
+ * @param string $sid
*/
- public function __construct(Version $version, $serviceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels/' . \rawurlencode($sid) . '';
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Channels/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a ChannelInstance
+ * Delete the ChannelInstance
+ *
+ * @param array|Options $options Optional Arguments
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(array $options = []): bool
+ {
+
+ $options = new Values($options);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled']]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
+ }
+
+
+ /**
+ * Fetch the ChannelInstance
*
* @return ChannelInstance Fetched ChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): ChannelInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new ChannelInstance(
$this->version,
@@ -79,16 +111,6 @@ public function fetch()
);
}
- /**
- * Deletes the ChannelInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Update the ChannelInstance
@@ -97,25 +119,28 @@ public function delete()
* @return ChannelInstance Updated ChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ChannelInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'UniqueName' => $options['uniqueName'],
- 'Attributes' => $options['attributes'],
- 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']),
- 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']),
- 'CreatedBy' => $options['createdBy'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'UniqueName' =>
+ $options['uniqueName'],
+ 'Attributes' =>
+ $options['attributes'],
+ 'DateCreated' =>
+ Serialize::iso8601DateTime($options['dateCreated']),
+ 'DateUpdated' =>
+ Serialize::iso8601DateTime($options['dateUpdated']),
+ 'CreatedBy' =>
+ $options['createdBy'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled']]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new ChannelInstance(
$this->version,
@@ -125,12 +150,11 @@ public function update($options = array())
);
}
+
/**
* Access the members
- *
- * @return \Twilio\Rest\IpMessaging\V2\Service\Channel\MemberList
*/
- protected function getMembers()
+ protected function getMembers(): MemberList
{
if (!$this->_members) {
$this->_members = new MemberList(
@@ -144,67 +168,61 @@ protected function getMembers()
}
/**
- * Access the messages
- *
- * @return \Twilio\Rest\IpMessaging\V2\Service\Channel\MessageList
+ * Access the invites
*/
- protected function getMessages()
+ protected function getInvites(): InviteList
{
- if (!$this->_messages) {
- $this->_messages = new MessageList(
+ if (!$this->_invites) {
+ $this->_invites = new InviteList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sid']
);
}
- return $this->_messages;
+ return $this->_invites;
}
/**
- * Access the invites
- *
- * @return \Twilio\Rest\IpMessaging\V2\Service\Channel\InviteList
+ * Access the webhooks
*/
- protected function getInvites()
+ protected function getWebhooks(): WebhookList
{
- if (!$this->_invites) {
- $this->_invites = new InviteList(
+ if (!$this->_webhooks) {
+ $this->_webhooks = new WebhookList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sid']
);
}
- return $this->_invites;
+ return $this->_webhooks;
}
/**
- * Access the webhooks
- *
- * @return \Twilio\Rest\IpMessaging\V2\Service\Channel\WebhookList
+ * Access the messages
*/
- protected function getWebhooks()
+ protected function getMessages(): MessageList
{
- if (!$this->_webhooks) {
- $this->_webhooks = new WebhookList(
+ if (!$this->_messages) {
+ $this->_messages = new MessageList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sid']
);
}
- return $this->_webhooks;
+ return $this->_messages;
}
/**
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -219,10 +237,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -237,12 +255,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.IpMessaging.V2.ChannelContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/ChannelInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/ChannelInstance.php
index a5104d0..b8ba709 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/ChannelInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/ChannelInstance.php
@@ -2,59 +2,70 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\IpMessaging\V2\Service;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\IpMessaging\V2\Service\Channel\MemberList;
+use Twilio\Rest\IpMessaging\V2\Service\Channel\InviteList;
+use Twilio\Rest\IpMessaging\V2\Service\Channel\WebhookList;
+use Twilio\Rest\IpMessaging\V2\Service\Channel\MessageList;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $friendlyName
- * @property string $uniqueName
- * @property string $attributes
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $friendlyName
+ * @property string|null $uniqueName
+ * @property string|null $attributes
* @property string $type
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $createdBy
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $createdBy
* @property int $membersCount
* @property int $messagesCount
- * @property string $url
- * @property array $links
+ * @property string|null $url
+ * @property array|null $links
*/
class ChannelInstance extends InstanceResource
{
- protected $_members = null;
- protected $_messages = null;
- protected $_invites = null;
- protected $_webhooks = null;
+ protected $_members;
+ protected $_invites;
+ protected $_webhooks;
+ protected $_messages;
/**
* Initialize the ChannelInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $sid The SID of the resource
- * @return \Twilio\Rest\IpMessaging\V2\Service\ChannelInstance
+ * @param string $serviceSid
+ * @param string $sid
*/
- public function __construct(Version $version, array $payload, $serviceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
@@ -69,19 +80,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $sid
'messagesCount' => Values::array_get($payload, 'messages_count'),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\IpMessaging\V2\Service\ChannelContext Context for this
- * ChannelInstance
+ * @return ChannelContext Context for this ChannelInstance
*/
- protected function proxy()
+ protected function proxy(): ChannelContext
{
if (!$this->context) {
$this->context = new ChannelContext(
@@ -95,25 +105,28 @@ protected function proxy()
}
/**
- * Fetch a ChannelInstance
+ * Delete the ChannelInstance
*
- * @return ChannelInstance Fetched ChannelInstance
+ * @param array|Options $options Optional Arguments
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(array $options = []): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete($options);
}
/**
- * Deletes the ChannelInstance
+ * Fetch the ChannelInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return ChannelInstance Fetched ChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): ChannelInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -123,49 +136,42 @@ public function delete()
* @return ChannelInstance Updated ChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ChannelInstance
{
+
return $this->proxy()->update($options);
}
/**
* Access the members
- *
- * @return \Twilio\Rest\IpMessaging\V2\Service\Channel\MemberList
*/
- protected function getMembers()
+ protected function getMembers(): MemberList
{
return $this->proxy()->members;
}
/**
- * Access the messages
- *
- * @return \Twilio\Rest\IpMessaging\V2\Service\Channel\MessageList
+ * Access the invites
*/
- protected function getMessages()
+ protected function getInvites(): InviteList
{
- return $this->proxy()->messages;
+ return $this->proxy()->invites;
}
/**
- * Access the invites
- *
- * @return \Twilio\Rest\IpMessaging\V2\Service\Channel\InviteList
+ * Access the webhooks
*/
- protected function getInvites()
+ protected function getWebhooks(): WebhookList
{
- return $this->proxy()->invites;
+ return $this->proxy()->webhooks;
}
/**
- * Access the webhooks
- *
- * @return \Twilio\Rest\IpMessaging\V2\Service\Channel\WebhookList
+ * Access the messages
*/
- protected function getWebhooks()
+ protected function getMessages(): MessageList
{
- return $this->proxy()->webhooks;
+ return $this->proxy()->messages;
}
/**
@@ -175,7 +181,7 @@ protected function getWebhooks()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -194,12 +200,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.IpMessaging.V2.ChannelInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/ChannelList.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/ChannelList.php
index 6bccb94..2cbebcc 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/ChannelList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/ChannelList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\IpMessaging\V2\Service;
@@ -12,59 +19,96 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class ChannelList extends ListResource
-{
+ {
/**
* Construct the ChannelList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @return \Twilio\Rest\IpMessaging\V2\Service\ChannelList
+ * @param string $serviceSid
*/
- public function __construct(Version $version, $serviceSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Channels';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Channels';
}
/**
- * Create a new ChannelInstance
+ * Create the ChannelInstance
*
* @param array|Options $options Optional Arguments
- * @return ChannelInstance Newly created ChannelInstance
+ * @return ChannelInstance Created ChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($options = array())
+ public function create(array $options = []): ChannelInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'UniqueName' => $options['uniqueName'],
- 'Attributes' => $options['attributes'],
- 'Type' => $options['type'],
- 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']),
- 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']),
- 'CreatedBy' => $options['createdBy'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'UniqueName' =>
+ $options['uniqueName'],
+ 'Attributes' =>
+ $options['attributes'],
+ 'Type' =>
+ $options['type'],
+ 'DateCreated' =>
+ Serialize::iso8601DateTime($options['dateCreated']),
+ 'DateUpdated' =>
+ Serialize::iso8601DateTime($options['dateUpdated']),
+ 'CreatedBy' =>
+ $options['createdBy'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled']]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new ChannelInstance(
+ $this->version,
+ $payload,
+ $this->solution['serviceSid']
);
+ }
+
- return new ChannelInstance($this->version, $payload, $this->solution['serviceSid']);
+ /**
+ * Reads ChannelInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return ChannelInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -84,9 +128,9 @@ public function create($options = array())
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -95,54 +139,33 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads ChannelInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return ChannelInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of ChannelInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of ChannelInstance
+ * @return ChannelPage Page of ChannelInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): ChannelPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Type' => Serialize::map($options['type'], function ($e) {
- return $e;
- }),
+
+ $params = Values::of([
+ 'Type' =>
+ $options['type'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new ChannelPage($this->version, $response, $this->solution);
}
@@ -152,9 +175,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of ChannelInstance
+ * @return ChannelPage Page of ChannelInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): ChannelPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -164,15 +187,22 @@ public function getPage($targetUrl)
return new ChannelPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a ChannelContext
*
- * @param string $sid The SID of the resource
- * @return \Twilio\Rest\IpMessaging\V2\Service\ChannelContext
+ * @param string $sid
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): ChannelContext
{
- return new ChannelContext($this->version, $this->solution['serviceSid'], $sid);
+ return new ChannelContext(
+ $this->version,
+ $this->solution['serviceSid'],
+ $sid
+ );
}
/**
@@ -180,8 +210,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V2.ChannelList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/ChannelOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/ChannelOptions.php
index b494624..e47702f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/ChannelOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/ChannelOptions.php
@@ -1,10 +1,16 @@
options['friendlyName'] = $friendlyName;
$this->options['uniqueName'] = $uniqueName;
$this->options['attributes'] = $attributes;
@@ -85,130 +153,173 @@ public function __construct($friendlyName = Values::NONE, $uniqueName = Values::
$this->options['dateCreated'] = $dateCreated;
$this->options['dateUpdated'] = $dateUpdated;
$this->options['createdBy'] = $createdBy;
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
}
/**
- * A descriptive string that you create to describe the new resource. It can be up to 64 characters long.
+ *
*
- * @param string $friendlyName A string to describe the new resource
+ * @param string $friendlyName
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
}
/**
- * An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the Channel resource's `sid` in the URL. This value must be 64 characters or less in length and be unique within the Service.
+ *
*
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the Channel resource
+ * @param string $uniqueName
* @return $this Fluent Builder
*/
- public function setUniqueName($uniqueName)
+ public function setUniqueName(string $uniqueName): self
{
$this->options['uniqueName'] = $uniqueName;
return $this;
}
/**
- * A valid JSON string that contains application-specific data.
+ *
*
- * @param string $attributes A valid JSON string that contains
- * application-specific data
+ * @param string $attributes
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setAttributes(string $attributes): self
{
$this->options['attributes'] = $attributes;
return $this;
}
/**
- * The visibility of the channel. Can be: `public` or `private` and defaults to `public`.
- *
- * @param string $type The visibility of the channel
+ * @param string $type
* @return $this Fluent Builder
*/
- public function setType($type)
+ public function setType(string $type): self
{
$this->options['type'] = $type;
return $this;
}
/**
- * The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this should only be used in cases where a Channel is being recreated from a backup/separate source.
+ *
*
- * @param \DateTime $dateCreated The ISO 8601 date and time in GMT when the
- * resource was created
+ * @param \DateTime $dateCreated
* @return $this Fluent Builder
*/
- public function setDateCreated($dateCreated)
+ public function setDateCreated(\DateTime $dateCreated): self
{
$this->options['dateCreated'] = $dateCreated;
return $this;
}
/**
- * The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. The default value is `null`. Note that this parameter should only be used in cases where a Channel is being recreated from a backup/separate source and where a Message was previously updated.
+ *
*
- * @param \DateTime $dateUpdated The ISO 8601 date and time in GMT when the
- * resource was updated
+ * @param \DateTime $dateUpdated
* @return $this Fluent Builder
*/
- public function setDateUpdated($dateUpdated)
+ public function setDateUpdated(\DateTime $dateUpdated): self
{
$this->options['dateUpdated'] = $dateUpdated;
return $this;
}
/**
- * The `identity` of the User that created the channel. Default is: `system`.
+ *
*
- * @param string $createdBy The identity of the User that created the Channel
+ * @param string $createdBy
* @return $this Fluent Builder
*/
- public function setCreatedBy($createdBy)
+ public function setCreatedBy(string $createdBy): self
{
$this->options['createdBy'] = $createdBy;
return $this;
}
+ /**
+ * The X-Twilio-Webhook-Enabled HTTP request header
+ *
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
+ * @return $this Fluent Builder
+ */
+ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self
+ {
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.IpMessaging.V2.CreateChannelOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.IpMessaging.V2.CreateChannelOptions ' . $options . ']';
}
}
-class ReadChannelOptions extends Options
-{
+class DeleteChannelOptions extends Options
+ {
/**
- * @param string $type The visibility of the channel to read
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
*/
- public function __construct($type = Values::NONE)
+ public function __construct(
+
+ string $xTwilioWebhookEnabled = Values::NONE
+
+ ) {
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ }
+
+ /**
+ * The X-Twilio-Webhook-Enabled HTTP request header
+ *
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
+ * @return $this Fluent Builder
+ */
+ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self
{
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ return $this;
+ }
+
+ /**
+ * Provide a friendly representation
+ *
+ * @return string Machine friendly representation
+ */
+ public function __toString(): string
+ {
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.IpMessaging.V2.DeleteChannelOptions ' . $options . ']';
+ }
+}
+
+
+class ReadChannelOptions extends Options
+ {
+ /**
+ * @param string $type
+ */
+ public function __construct(
+
+ array $type = Values::ARRAY_NONE
+
+ ) {
$this->options['type'] = $type;
}
/**
- * The visibility of the Channels to read. Can be: `public` or `private` and defaults to `public`.
+ *
*
- * @param string $type The visibility of the channel to read
+ * @param string $type
* @return $this Fluent Builder
*/
- public function setType($type)
+ public function setType(array $type): self
{
$this->options['type'] = $type;
return $this;
@@ -219,131 +330,137 @@ public function setType($type)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.IpMessaging.V2.ReadChannelOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.IpMessaging.V2.ReadChannelOptions ' . $options . ']';
}
}
class UpdateChannelOptions extends Options
-{
+ {
/**
- * @param string $friendlyName A string to describe the resource
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the resource
- * @param string $attributes A valid JSON string that contains
- * application-specific data
- * @param \DateTime $dateCreated The ISO 8601 date and time in GMT when the
- * resource was created
- * @param \DateTime $dateUpdated The ISO 8601 date and time in GMT when the
- * resource was updated
- * @param string $createdBy The identity of the User that created the Channel
+ * @param string $friendlyName
+ * @param string $uniqueName
+ * @param string $attributes
+ * @param \DateTime $dateCreated
+ * @param \DateTime $dateUpdated
+ * @param string $createdBy
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
*/
- public function __construct($friendlyName = Values::NONE, $uniqueName = Values::NONE, $attributes = Values::NONE, $dateCreated = Values::NONE, $dateUpdated = Values::NONE, $createdBy = Values::NONE)
- {
+ public function __construct(
+
+ string $friendlyName = Values::NONE,
+ string $uniqueName = Values::NONE,
+ string $attributes = Values::NONE,
+ \DateTime $dateCreated = null,
+ \DateTime $dateUpdated = null,
+ string $createdBy = Values::NONE,
+ string $xTwilioWebhookEnabled = Values::NONE
+
+ ) {
$this->options['friendlyName'] = $friendlyName;
$this->options['uniqueName'] = $uniqueName;
$this->options['attributes'] = $attributes;
$this->options['dateCreated'] = $dateCreated;
$this->options['dateUpdated'] = $dateUpdated;
$this->options['createdBy'] = $createdBy;
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
}
/**
- * A descriptive string that you create to describe the resource. It can be up to 256 characters long.
+ *
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
}
/**
- * An application-defined string that uniquely identifies the resource. It can be used to address the resource in place of the resource's `sid` in the URL. This value must be 256 characters or less in length and unique within the Service.
+ *
*
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the resource
+ * @param string $uniqueName
* @return $this Fluent Builder
*/
- public function setUniqueName($uniqueName)
+ public function setUniqueName(string $uniqueName): self
{
$this->options['uniqueName'] = $uniqueName;
return $this;
}
/**
- * A valid JSON string that contains application-specific data.
+ *
*
- * @param string $attributes A valid JSON string that contains
- * application-specific data
+ * @param string $attributes
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setAttributes(string $attributes): self
{
$this->options['attributes'] = $attributes;
return $this;
}
/**
- * The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this should only be used in cases where a Channel is being recreated from a backup/separate source.
+ *
*
- * @param \DateTime $dateCreated The ISO 8601 date and time in GMT when the
- * resource was created
+ * @param \DateTime $dateCreated
* @return $this Fluent Builder
*/
- public function setDateCreated($dateCreated)
+ public function setDateCreated(\DateTime $dateCreated): self
{
$this->options['dateCreated'] = $dateCreated;
return $this;
}
/**
- * The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated.
+ *
*
- * @param \DateTime $dateUpdated The ISO 8601 date and time in GMT when the
- * resource was updated
+ * @param \DateTime $dateUpdated
* @return $this Fluent Builder
*/
- public function setDateUpdated($dateUpdated)
+ public function setDateUpdated(\DateTime $dateUpdated): self
{
$this->options['dateUpdated'] = $dateUpdated;
return $this;
}
/**
- * The `identity` of the User that created the channel. Default is: `system`.
+ *
*
- * @param string $createdBy The identity of the User that created the Channel
+ * @param string $createdBy
* @return $this Fluent Builder
*/
- public function setCreatedBy($createdBy)
+ public function setCreatedBy(string $createdBy): self
{
$this->options['createdBy'] = $createdBy;
return $this;
}
+ /**
+ * The X-Twilio-Webhook-Enabled HTTP request header
+ *
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
+ * @return $this Fluent Builder
+ */
+ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self
+ {
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.IpMessaging.V2.UpdateChannelOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.IpMessaging.V2.UpdateChannelOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/ChannelPage.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/ChannelPage.php
index 15d47a9..95a9150 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/ChannelPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/ChannelPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return ChannelInstance \Twilio\Rest\IpMessaging\V2\Service\ChannelInstance
+ */
+ public function buildInstance(array $payload): ChannelInstance
{
return new ChannelInstance($this->version, $payload, $this->solution['serviceSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V2.ChannelPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/RoleContext.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/RoleContext.php
index 813a11c..608eb30 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/RoleContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/RoleContext.php
@@ -2,54 +2,82 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\IpMessaging\V2\Service;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
class RoleContext extends InstanceContext
-{
+ {
/**
* Initialize the RoleContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the resource from
- * @param string $sid The SID of the Role resource to fetch
- * @return \Twilio\Rest\IpMessaging\V2\Service\RoleContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid
+ * @param string $sid
*/
- public function __construct(Version $version, $serviceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Roles/' . \rawurlencode($sid)
+ .'';
+ }
+
+ /**
+ * Delete the RoleInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Roles/' . \rawurlencode($sid) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a RoleInstance
+ * Fetch the RoleInstance
*
* @return RoleInstance Fetched RoleInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): RoleInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new RoleInstance(
$this->version,
@@ -59,36 +87,24 @@ public function fetch()
);
}
- /**
- * Deletes the RoleInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Update the RoleInstance
*
- * @param string $permission A permission the role should have
+ * @param string[] $permission
* @return RoleInstance Updated RoleInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($permission)
+ public function update(array $permission): RoleInstance
{
- $data = Values::of(array('Permission' => Serialize::map($permission, function ($e) {
- return $e;
- }),));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+
+ $data = Values::of([
+ 'Permission' =>
+ Serialize::map($permission,function ($e) { return $e; }),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new RoleInstance(
$this->version,
@@ -98,17 +114,18 @@ public function update($permission)
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.IpMessaging.V2.RoleContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/RoleInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/RoleInstance.php
index 30d49d6..e821fab 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/RoleInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/RoleInstance.php
@@ -2,48 +2,55 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\IpMessaging\V2\Service;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $friendlyName
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $friendlyName
* @property string $type
- * @property string $permissions
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
+ * @property string[]|null $permissions
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
*/
class RoleInstance extends InstanceResource
{
/**
* Initialize the RoleInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $sid The SID of the Role resource to fetch
- * @return \Twilio\Rest\IpMessaging\V2\Service\RoleInstance
+ * @param string $serviceSid
+ * @param string $sid
*/
- public function __construct(Version $version, array $payload, $serviceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
@@ -53,19 +60,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $sid
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\IpMessaging\V2\Service\RoleContext Context for this
- * RoleInstance
+ * @return RoleContext Context for this RoleInstance
*/
- protected function proxy()
+ protected function proxy(): RoleContext
{
if (!$this->context) {
$this->context = new RoleContext(
@@ -79,36 +85,39 @@ protected function proxy()
}
/**
- * Fetch a RoleInstance
+ * Delete the RoleInstance
*
- * @return RoleInstance Fetched RoleInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the RoleInstance
+ * Fetch the RoleInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return RoleInstance Fetched RoleInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): RoleInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
* Update the RoleInstance
*
- * @param string $permission A permission the role should have
+ * @param string[] $permission
* @return RoleInstance Updated RoleInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($permission)
+ public function update(array $permission): RoleInstance
{
+
return $this->proxy()->update($permission);
}
@@ -119,7 +128,7 @@ public function update($permission)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -138,12 +147,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.IpMessaging.V2.RoleInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/RoleList.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/RoleList.php
index 44d11b9..1945dac 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/RoleList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/RoleList.php
@@ -2,66 +2,103 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\IpMessaging\V2\Service;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class RoleList extends ListResource
-{
+ {
/**
* Construct the RoleList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @return \Twilio\Rest\IpMessaging\V2\Service\RoleList
+ * @param string $serviceSid
*/
- public function __construct(Version $version, $serviceSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Roles';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Roles';
}
/**
- * Create a new RoleInstance
+ * Create the RoleInstance
*
- * @param string $friendlyName A string to describe the new resource
- * @param string $type The type of role
- * @param string $permission A permission the role should have
- * @return RoleInstance Newly created RoleInstance
+ * @param string $friendlyName
+ * @param string $type
+ * @param string[] $permission
+ * @return RoleInstance Created RoleInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($friendlyName, $type, $permission)
+ public function create(string $friendlyName, string $type, array $permission): RoleInstance
{
- $data = Values::of(array(
- 'FriendlyName' => $friendlyName,
- 'Type' => $type,
- 'Permission' => Serialize::map($permission, function ($e) {
- return $e;
- }),
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+
+ $data = Values::of([
+ 'FriendlyName' =>
+ $friendlyName,
+ 'Type' =>
+ $type,
+ 'Permission' =>
+ Serialize::map($permission,function ($e) { return $e; }),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new RoleInstance(
+ $this->version,
+ $payload,
+ $this->solution['serviceSid']
);
+ }
+
- return new RoleInstance($this->version, $payload, $this->solution['serviceSid']);
+ /**
+ * Reads RoleInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return RoleInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -80,9 +117,9 @@ public function create($friendlyName, $type, $permission)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -91,26 +128,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads RoleInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return RoleInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of RoleInstance records from the API.
* Request is executed immediately
@@ -118,21 +135,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of RoleInstance
+ * @return RolePage Page of RoleInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): RolePage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new RolePage($this->version, $response, $this->solution);
}
@@ -142,9 +160,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of RoleInstance
+ * @return RolePage Page of RoleInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): RolePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -154,15 +172,22 @@ public function getPage($targetUrl)
return new RolePage($this->version, $response, $this->solution);
}
+
/**
* Constructs a RoleContext
*
- * @param string $sid The SID of the Role resource to fetch
- * @return \Twilio\Rest\IpMessaging\V2\Service\RoleContext
+ * @param string $sid
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): RoleContext
{
- return new RoleContext($this->version, $this->solution['serviceSid'], $sid);
+ return new RoleContext(
+ $this->version,
+ $this->solution['serviceSid'],
+ $sid
+ );
}
/**
@@ -170,8 +195,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V2.RoleList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/RolePage.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/RolePage.php
index 34c806e..172091c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/RolePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/RolePage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return RoleInstance \Twilio\Rest\IpMessaging\V2\Service\RoleInstance
+ */
+ public function buildInstance(array $payload): RoleInstance
{
return new RoleInstance($this->version, $payload, $this->solution['serviceSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V2.RolePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/User/UserBindingContext.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/User/UserBindingContext.php
index 7f57edd..04f3163 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/User/UserBindingContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/User/UserBindingContext.php
@@ -2,54 +2,86 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\IpMessaging\V2\Service\User;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class UserBindingContext extends InstanceContext
-{
+ {
/**
* Initialize the UserBindingContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the resource from
- * @param string $userSid The SID of the User with the binding
- * @param string $sid The SID of the User Binding resource to fetch
- * @return \Twilio\Rest\IpMessaging\V2\Service\User\UserBindingContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid
+ * @param string $userSid
+ * @param string $sid
*/
- public function __construct(Version $version, $serviceSid, $userSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $userSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'userSid' => $userSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'userSid' =>
+ $userSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Users/' . \rawurlencode($userSid)
+ .'/Bindings/' . \rawurlencode($sid)
+ .'';
+ }
+
+ /**
+ * Delete the UserBindingInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Users/' . \rawurlencode($userSid) . '/Bindings/' . \rawurlencode($sid) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a UserBindingInstance
+ * Fetch the UserBindingInstance
*
* @return UserBindingInstance Fetched UserBindingInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): UserBindingInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new UserBindingInstance(
$this->version,
@@ -60,28 +92,18 @@ public function fetch()
);
}
- /**
- * Deletes the UserBindingInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.IpMessaging.V2.UserBindingContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/User/UserBindingInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/User/UserBindingInstance.php
index 7e09b35..e0ae2aa 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/User/UserBindingInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/User/UserBindingInstance.php
@@ -2,52 +2,59 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\IpMessaging\V2\Service\User;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $serviceSid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $endpoint
- * @property string $identity
- * @property string $userSid
- * @property string $credentialSid
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $endpoint
+ * @property string|null $identity
+ * @property string|null $userSid
+ * @property string|null $credentialSid
* @property string $bindingType
- * @property string $messageTypes
- * @property string $url
+ * @property string[]|null $messageTypes
+ * @property string|null $url
*/
class UserBindingInstance extends InstanceResource
{
/**
* Initialize the UserBindingInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $userSid The SID of the User with the binding
- * @param string $sid The SID of the User Binding resource to fetch
- * @return \Twilio\Rest\IpMessaging\V2\Service\User\UserBindingInstance
+ * @param string $serviceSid
+ * @param string $userSid
+ * @param string $sid
*/
- public function __construct(Version $version, array $payload, $serviceSid, $userSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $userSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
@@ -60,24 +67,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $user
'bindingType' => Values::array_get($payload, 'binding_type'),
'messageTypes' => Values::array_get($payload, 'message_types'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'userSid' => $userSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['serviceSid' => $serviceSid, 'userSid' => $userSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\IpMessaging\V2\Service\User\UserBindingContext Context
- * for this
- * UserBindingInstance
+ * @return UserBindingContext Context for this UserBindingInstance
*/
- protected function proxy()
+ protected function proxy(): UserBindingContext
{
if (!$this->context) {
$this->context = new UserBindingContext(
@@ -92,25 +93,27 @@ protected function proxy()
}
/**
- * Fetch a UserBindingInstance
+ * Delete the UserBindingInstance
*
- * @return UserBindingInstance Fetched UserBindingInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the UserBindingInstance
+ * Fetch the UserBindingInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return UserBindingInstance Fetched UserBindingInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): UserBindingInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -120,7 +123,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -139,12 +142,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.IpMessaging.V2.UserBindingInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/User/UserBindingList.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/User/UserBindingList.php
index a15d9eb..ee4d6c1 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/User/UserBindingList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/User/UserBindingList.php
@@ -2,38 +2,77 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\IpMessaging\V2\Service\User;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class UserBindingList extends ListResource
-{
+ {
/**
* Construct the UserBindingList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $userSid The SID of the User with the binding
- * @return \Twilio\Rest\IpMessaging\V2\Service\User\UserBindingList
+ * @param string $serviceSid
+ * @param string $userSid
*/
- public function __construct(Version $version, $serviceSid, $userSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid,
+ string $userSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'userSid' => $userSid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ 'userSid' =>
+ $userSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Users/' . \rawurlencode($userSid)
+ .'/Bindings';
+ }
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Users/' . \rawurlencode($userSid) . '/Bindings';
+ /**
+ * Reads UserBindingInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return UserBindingInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -53,9 +92,9 @@ public function __construct(Version $version, $serviceSid, $userSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -64,54 +103,33 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads UserBindingInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return UserBindingInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of UserBindingInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of UserBindingInstance
+ * @return UserBindingPage Page of UserBindingInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): UserBindingPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'BindingType' => Serialize::map($options['bindingType'], function ($e) {
- return $e;
- }),
+
+ $params = Values::of([
+ 'BindingType' =>
+ $options['bindingType'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new UserBindingPage($this->version, $response, $this->solution);
}
@@ -121,9 +139,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of UserBindingInstance
+ * @return UserBindingPage Page of UserBindingInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): UserBindingPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -133,13 +151,16 @@ public function getPage($targetUrl)
return new UserBindingPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a UserBindingContext
*
- * @param string $sid The SID of the User Binding resource to fetch
- * @return \Twilio\Rest\IpMessaging\V2\Service\User\UserBindingContext
+ * @param string $sid
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): UserBindingContext
{
return new UserBindingContext(
$this->version,
@@ -154,8 +175,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V2.UserBindingList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/User/UserBindingOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/User/UserBindingOptions.php
index 8f63917..7bfc069 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/User/UserBindingOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/User/UserBindingOptions.php
@@ -1,10 +1,16 @@
options['bindingType'] = $bindingType;
}
/**
- * The push technology used by the User Binding resources to read. Can be: `apn`, `gcm`, or `fcm`. See [push notification configuration](https://www.twilio.com/docs/chat/push-notification-configuration) for more info.
+ *
*
- * @param string $bindingType The push technology used by the User Binding
- * resources to read
+ * @param string $bindingType
* @return $this Fluent Builder
*/
- public function setBindingType($bindingType)
+ public function setBindingType(array $bindingType): self
{
$this->options['bindingType'] = $bindingType;
return $this;
@@ -54,14 +71,10 @@ public function setBindingType($bindingType)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.IpMessaging.V2.ReadUserBindingOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.IpMessaging.V2.ReadUserBindingOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/User/UserBindingPage.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/User/UserBindingPage.php
index a67a13a..1c9a24d 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/User/UserBindingPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/User/UserBindingPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return UserBindingInstance \Twilio\Rest\IpMessaging\V2\Service\User\UserBindingInstance
+ */
+ public function buildInstance(array $payload): UserBindingInstance
{
- return new UserBindingInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['userSid']
- );
+ return new UserBindingInstance($this->version, $payload, $this->solution['serviceSid'], $this->solution['userSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V2.UserBindingPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/User/UserChannelContext.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/User/UserChannelContext.php
index 4afbfa8..e2498c9 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/User/UserChannelContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/User/UserChannelContext.php
@@ -2,63 +2,88 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\IpMessaging\V2\Service\User;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
class UserChannelContext extends InstanceContext
-{
+ {
/**
* Initialize the UserChannelContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the User Channel
- * resource from
- * @param string $userSid The SID of the User to fetch the User Channel
- * resource from
- * @param string $channelSid The SID of the Channel that has the User Channel
- * to fetch
- * @return \Twilio\Rest\IpMessaging\V2\Service\User\UserChannelContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid
+ * @param string $userSid
+ * @param string $channelSid
*/
- public function __construct(Version $version, $serviceSid, $userSid, $channelSid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $userSid,
+ $channelSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'userSid' => $userSid,
- 'channelSid' => $channelSid,
- );
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'userSid' =>
+ $userSid,
+ 'channelSid' =>
+ $channelSid,
+ ];
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Users/' . \rawurlencode($userSid) . '/Channels/' . \rawurlencode($channelSid) . '';
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Users/' . \rawurlencode($userSid)
+ .'/Channels/' . \rawurlencode($channelSid)
+ .'';
}
/**
- * Fetch a UserChannelInstance
+ * Delete the UserChannelInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
+ }
+
+
+ /**
+ * Fetch the UserChannelInstance
*
* @return UserChannelInstance Fetched UserChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): UserChannelInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new UserChannelInstance(
$this->version,
@@ -69,16 +94,6 @@ public function fetch()
);
}
- /**
- * Deletes the UserChannelInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Update the UserChannelInstance
@@ -87,22 +102,22 @@ public function delete()
* @return UserChannelInstance Updated UserChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): UserChannelInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'NotificationLevel' => $options['notificationLevel'],
- 'LastConsumedMessageIndex' => $options['lastConsumedMessageIndex'],
- 'LastConsumptionTimestamp' => Serialize::iso8601DateTime($options['lastConsumptionTimestamp']),
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'NotificationLevel' =>
+ $options['notificationLevel'],
+ 'LastConsumedMessageIndex' =>
+ $options['lastConsumedMessageIndex'],
+ 'LastConsumptionTimestamp' =>
+ Serialize::iso8601DateTime($options['lastConsumptionTimestamp']),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new UserChannelInstance(
$this->version,
@@ -113,17 +128,18 @@ public function update($options = array())
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.IpMessaging.V2.UserChannelContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/User/UserChannelInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/User/UserChannelInstance.php
index 698b4ab..a273c21 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/User/UserChannelInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/User/UserChannelInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\IpMessaging\V2\Service\User;
use Twilio\Exceptions\TwilioException;
@@ -15,17 +23,18 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $channelSid
- * @property string $userSid
- * @property string $memberSid
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $channelSid
+ * @property string|null $userSid
+ * @property string|null $memberSid
* @property string $status
- * @property int $lastConsumedMessageIndex
- * @property int $unreadMessagesCount
- * @property array $links
- * @property string $url
+ * @property int|null $lastConsumedMessageIndex
+ * @property int|null $unreadMessagesCount
+ * @property array|null $links
+ * @property string|null $url
* @property string $notificationLevel
*/
class UserChannelInstance extends InstanceResource
@@ -33,21 +42,18 @@ class UserChannelInstance extends InstanceResource
/**
* Initialize the UserChannelInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $userSid The SID of the User the User Channel belongs to
- * @param string $channelSid The SID of the Channel that has the User Channel
- * to fetch
- * @return \Twilio\Rest\IpMessaging\V2\Service\User\UserChannelInstance
+ * @param string $serviceSid
+ * @param string $userSid
+ * @param string $channelSid
*/
- public function __construct(Version $version, array $payload, $serviceSid, $userSid, $channelSid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $userSid, string $channelSid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
'channelSid' => Values::array_get($payload, 'channel_sid'),
@@ -59,24 +65,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $user
'links' => Values::array_get($payload, 'links'),
'url' => Values::array_get($payload, 'url'),
'notificationLevel' => Values::array_get($payload, 'notification_level'),
- );
+ ];
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'userSid' => $userSid,
- 'channelSid' => $channelSid ?: $this->properties['channelSid'],
- );
+ $this->solution = ['serviceSid' => $serviceSid, 'userSid' => $userSid, 'channelSid' => $channelSid ?: $this->properties['channelSid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\IpMessaging\V2\Service\User\UserChannelContext Context
- * for this
- * UserChannelInstance
+ * @return UserChannelContext Context for this UserChannelInstance
*/
- protected function proxy()
+ protected function proxy(): UserChannelContext
{
if (!$this->context) {
$this->context = new UserChannelContext(
@@ -91,25 +91,27 @@ protected function proxy()
}
/**
- * Fetch a UserChannelInstance
+ * Delete the UserChannelInstance
*
- * @return UserChannelInstance Fetched UserChannelInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the UserChannelInstance
+ * Fetch the UserChannelInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return UserChannelInstance Fetched UserChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): UserChannelInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -119,8 +121,9 @@ public function delete()
* @return UserChannelInstance Updated UserChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): UserChannelInstance
{
+
return $this->proxy()->update($options);
}
@@ -131,7 +134,7 @@ public function update($options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -150,12 +153,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.IpMessaging.V2.UserChannelInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/User/UserChannelList.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/User/UserChannelList.php
index ebc5cb1..8958229 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/User/UserChannelList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/User/UserChannelList.php
@@ -2,36 +2,75 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\IpMessaging\V2\Service\User;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class UserChannelList extends ListResource
-{
+ {
/**
* Construct the UserChannelList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $userSid The SID of the User the User Channel belongs to
- * @return \Twilio\Rest\IpMessaging\V2\Service\User\UserChannelList
+ * @param string $serviceSid
+ * @param string $userSid
*/
- public function __construct(Version $version, $serviceSid, $userSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid,
+ string $userSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'userSid' => $userSid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ 'userSid' =>
+ $userSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Users/' . \rawurlencode($userSid)
+ .'/Channels';
+ }
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Users/' . \rawurlencode($userSid) . '/Channels';
+ /**
+ * Reads UserChannelInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return UserChannelInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -50,9 +89,9 @@ public function __construct(Version $version, $serviceSid, $userSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -61,26 +100,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads UserChannelInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return UserChannelInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of UserChannelInstance records from the API.
* Request is executed immediately
@@ -88,21 +107,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of UserChannelInstance
+ * @return UserChannelPage Page of UserChannelInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): UserChannelPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new UserChannelPage($this->version, $response, $this->solution);
}
@@ -112,9 +132,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of UserChannelInstance
+ * @return UserChannelPage Page of UserChannelInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): UserChannelPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -124,14 +144,16 @@ public function getPage($targetUrl)
return new UserChannelPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a UserChannelContext
*
- * @param string $channelSid The SID of the Channel that has the User Channel
- * to fetch
- * @return \Twilio\Rest\IpMessaging\V2\Service\User\UserChannelContext
+ * @param string $channelSid
*/
- public function getContext($channelSid)
+ public function getContext(
+ string $channelSid
+
+ ): UserChannelContext
{
return new UserChannelContext(
$this->version,
@@ -146,8 +168,8 @@ public function getContext($channelSid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V2.UserChannelList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/User/UserChannelOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/User/UserChannelOptions.php
index c90b2b8..4b0b37f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/User/UserChannelOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/User/UserChannelOptions.php
@@ -1,10 +1,16 @@
options['notificationLevel'] = $notificationLevel;
$this->options['lastConsumedMessageIndex'] = $lastConsumedMessageIndex;
$this->options['lastConsumptionTimestamp'] = $lastConsumptionTimestamp;
}
/**
- * The push notification level to assign to the User Channel. Can be: `default` or `muted`.
- *
- * @param string $notificationLevel The push notification level to assign to
- * the User Channel
+ * @param string $notificationLevel
* @return $this Fluent Builder
*/
- public function setNotificationLevel($notificationLevel)
+ public function setNotificationLevel(string $notificationLevel): self
{
$this->options['notificationLevel'] = $notificationLevel;
return $this;
}
/**
- * The index of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) in the [Channel](https://www.twilio.com/docs/chat/channels) that the Member has read.
+ *
*
- * @param int $lastConsumedMessageIndex The index of the last Message that the
- * Member has read within the Channel
+ * @param int $lastConsumedMessageIndex
* @return $this Fluent Builder
*/
- public function setLastConsumedMessageIndex($lastConsumedMessageIndex)
+ public function setLastConsumedMessageIndex(int $lastConsumedMessageIndex): self
{
$this->options['lastConsumedMessageIndex'] = $lastConsumedMessageIndex;
return $this;
}
/**
- * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of the last [Message](https://www.twilio.com/docs/chat/rest/message-resource) read event for the Member within the [Channel](https://www.twilio.com/docs/chat/channels).
+ *
*
- * @param \DateTime $lastConsumptionTimestamp The ISO 8601 based timestamp
- * string that represents the
- * datetime of the last Message read
- * event for the Member within the
- * Channel
+ * @param \DateTime $lastConsumptionTimestamp
* @return $this Fluent Builder
*/
- public function setLastConsumptionTimestamp($lastConsumptionTimestamp)
+ public function setLastConsumptionTimestamp(\DateTime $lastConsumptionTimestamp): self
{
$this->options['lastConsumptionTimestamp'] = $lastConsumptionTimestamp;
return $this;
@@ -99,14 +107,10 @@ public function setLastConsumptionTimestamp($lastConsumptionTimestamp)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.IpMessaging.V2.UpdateUserChannelOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.IpMessaging.V2.UpdateUserChannelOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/User/UserChannelPage.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/User/UserChannelPage.php
index 0084d67..ebf10e3 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/User/UserChannelPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/User/UserChannelPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return UserChannelInstance \Twilio\Rest\IpMessaging\V2\Service\User\UserChannelInstance
+ */
+ public function buildInstance(array $payload): UserChannelInstance
{
- return new UserChannelInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['userSid']
- );
+ return new UserChannelInstance($this->version, $payload, $this->solution['serviceSid'], $this->solution['userSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V2.UserChannelPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/UserContext.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/UserContext.php
index b53002d..e0ad183 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/UserContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/UserContext.php
@@ -2,65 +2,94 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\IpMessaging\V2\Service;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\IpMessaging\V2\Service\User\UserBindingList;
-use Twilio\Rest\IpMessaging\V2\Service\User\UserChannelList;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\IpMessaging\V2\Service\User\UserBindingList;
+use Twilio\Rest\IpMessaging\V2\Service\User\UserChannelList;
+
/**
- * @property \Twilio\Rest\IpMessaging\V2\Service\User\UserChannelList $userChannels
- * @property \Twilio\Rest\IpMessaging\V2\Service\User\UserBindingList $userBindings
+ * @property UserBindingList $userBindings
+ * @property UserChannelList $userChannels
* @method \Twilio\Rest\IpMessaging\V2\Service\User\UserChannelContext userChannels(string $channelSid)
* @method \Twilio\Rest\IpMessaging\V2\Service\User\UserBindingContext userBindings(string $sid)
*/
class UserContext extends InstanceContext
-{
- protected $_userChannels = null;
- protected $_userBindings = null;
+ {
+ protected $_userBindings;
+ protected $_userChannels;
/**
* Initialize the UserContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the resource from
- * @param string $sid The SID of the User resource to fetch
- * @return \Twilio\Rest\IpMessaging\V2\Service\UserContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid
+ * @param string $sid
*/
- public function __construct(Version $version, $serviceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Users/' . \rawurlencode($sid)
+ .'';
+ }
+
+ /**
+ * Delete the UserInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Users/' . \rawurlencode($sid) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a UserInstance
+ * Fetch the UserInstance
*
* @return UserInstance Fetched UserInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): UserInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new UserInstance(
$this->version,
@@ -70,16 +99,6 @@ public function fetch()
);
}
- /**
- * Deletes the UserInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Update the UserInstance
@@ -88,22 +107,22 @@ public function delete()
* @return UserInstance Updated UserInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): UserInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'RoleSid' => $options['roleSid'],
- 'Attributes' => $options['attributes'],
- 'FriendlyName' => $options['friendlyName'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'RoleSid' =>
+ $options['roleSid'],
+ 'Attributes' =>
+ $options['attributes'],
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled']]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new UserInstance(
$this->version,
@@ -113,50 +132,47 @@ public function update($options = array())
);
}
+
/**
- * Access the userChannels
- *
- * @return \Twilio\Rest\IpMessaging\V2\Service\User\UserChannelList
+ * Access the userBindings
*/
- protected function getUserChannels()
+ protected function getUserBindings(): UserBindingList
{
- if (!$this->_userChannels) {
- $this->_userChannels = new UserChannelList(
+ if (!$this->_userBindings) {
+ $this->_userBindings = new UserBindingList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sid']
);
}
- return $this->_userChannels;
+ return $this->_userBindings;
}
/**
- * Access the userBindings
- *
- * @return \Twilio\Rest\IpMessaging\V2\Service\User\UserBindingList
+ * Access the userChannels
*/
- protected function getUserBindings()
+ protected function getUserChannels(): UserChannelList
{
- if (!$this->_userBindings) {
- $this->_userBindings = new UserBindingList(
+ if (!$this->_userChannels) {
+ $this->_userChannels = new UserChannelList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sid']
);
}
- return $this->_userBindings;
+ return $this->_userChannels;
}
/**
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -171,10 +187,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -189,12 +205,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.IpMessaging.V2.UserContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/UserInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/UserInstance.php
index 9f60c2a..4f67705 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/UserInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/UserInstance.php
@@ -2,57 +2,66 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\IpMessaging\V2\Service;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\IpMessaging\V2\Service\User\UserBindingList;
+use Twilio\Rest\IpMessaging\V2\Service\User\UserChannelList;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $attributes
- * @property string $friendlyName
- * @property string $roleSid
- * @property string $identity
- * @property bool $isOnline
- * @property bool $isNotifiable
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $attributes
+ * @property string|null $friendlyName
+ * @property string|null $roleSid
+ * @property string|null $identity
+ * @property bool|null $isOnline
+ * @property bool|null $isNotifiable
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
* @property int $joinedChannelsCount
- * @property array $links
- * @property string $url
+ * @property array|null $links
+ * @property string|null $url
*/
class UserInstance extends InstanceResource
{
- protected $_userChannels = null;
- protected $_userBindings = null;
+ protected $_userBindings;
+ protected $_userChannels;
/**
* Initialize the UserInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $sid The SID of the User resource to fetch
- * @return \Twilio\Rest\IpMessaging\V2\Service\UserInstance
+ * @param string $serviceSid
+ * @param string $sid
*/
- public function __construct(Version $version, array $payload, $serviceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
@@ -67,19 +76,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $sid
'joinedChannelsCount' => Values::array_get($payload, 'joined_channels_count'),
'links' => Values::array_get($payload, 'links'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\IpMessaging\V2\Service\UserContext Context for this
- * UserInstance
+ * @return UserContext Context for this UserInstance
*/
- protected function proxy()
+ protected function proxy(): UserContext
{
if (!$this->context) {
$this->context = new UserContext(
@@ -93,25 +101,27 @@ protected function proxy()
}
/**
- * Fetch a UserInstance
+ * Delete the UserInstance
*
- * @return UserInstance Fetched UserInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the UserInstance
+ * Fetch the UserInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return UserInstance Fetched UserInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): UserInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -121,29 +131,26 @@ public function delete()
* @return UserInstance Updated UserInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): UserInstance
{
+
return $this->proxy()->update($options);
}
/**
- * Access the userChannels
- *
- * @return \Twilio\Rest\IpMessaging\V2\Service\User\UserChannelList
+ * Access the userBindings
*/
- protected function getUserChannels()
+ protected function getUserBindings(): UserBindingList
{
- return $this->proxy()->userChannels;
+ return $this->proxy()->userBindings;
}
/**
- * Access the userBindings
- *
- * @return \Twilio\Rest\IpMessaging\V2\Service\User\UserBindingList
+ * Access the userChannels
*/
- protected function getUserBindings()
+ protected function getUserChannels(): UserChannelList
{
- return $this->proxy()->userBindings;
+ return $this->proxy()->userChannels;
}
/**
@@ -153,7 +160,7 @@ protected function getUserBindings()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -172,12 +179,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.IpMessaging.V2.UserInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/UserList.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/UserList.php
index b9deecc..7010420 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/UserList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/UserList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\IpMessaging\V2\Service;
@@ -12,57 +19,89 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class UserList extends ListResource
-{
+ {
/**
* Construct the UserList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @return \Twilio\Rest\IpMessaging\V2\Service\UserList
+ * @param string $serviceSid
*/
- public function __construct(Version $version, $serviceSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Users';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Users';
}
/**
- * Create a new UserInstance
+ * Create the UserInstance
*
- * @param string $identity The `identity` value that identifies the new
- * resource's User
+ * @param string $identity
* @param array|Options $options Optional Arguments
- * @return UserInstance Newly created UserInstance
+ * @return UserInstance Created UserInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($identity, $options = array())
+ public function create(string $identity, array $options = []): UserInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'Identity' => $identity,
- 'RoleSid' => $options['roleSid'],
- 'Attributes' => $options['attributes'],
- 'FriendlyName' => $options['friendlyName'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'Identity' =>
+ $identity,
+ 'RoleSid' =>
+ $options['roleSid'],
+ 'Attributes' =>
+ $options['attributes'],
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'X-Twilio-Webhook-Enabled' => $options['xTwilioWebhookEnabled']]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new UserInstance(
+ $this->version,
+ $payload,
+ $this->solution['serviceSid']
);
+ }
- return new UserInstance($this->version, $payload, $this->solution['serviceSid']);
+
+ /**
+ * Reads UserInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return UserInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -81,9 +120,9 @@ public function create($identity, $options = array())
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -92,26 +131,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads UserInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return UserInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of UserInstance records from the API.
* Request is executed immediately
@@ -119,21 +138,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of UserInstance
+ * @return UserPage Page of UserInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): UserPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new UserPage($this->version, $response, $this->solution);
}
@@ -143,9 +163,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of UserInstance
+ * @return UserPage Page of UserInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): UserPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -155,15 +175,22 @@ public function getPage($targetUrl)
return new UserPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a UserContext
*
- * @param string $sid The SID of the User resource to fetch
- * @return \Twilio\Rest\IpMessaging\V2\Service\UserContext
+ * @param string $sid
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): UserContext
{
- return new UserContext($this->version, $this->solution['serviceSid'], $sid);
+ return new UserContext(
+ $this->version,
+ $this->solution['serviceSid'],
+ $sid
+ );
}
/**
@@ -171,8 +198,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V2.UserList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/UserOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/UserOptions.php
index 8ae6ec5..67c4d3c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/UserOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/UserOptions.php
@@ -1,10 +1,16 @@
options['roleSid'] = $roleSid;
$this->options['attributes'] = $attributes;
$this->options['friendlyName'] = $friendlyName;
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
}
/**
- * The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the new User.
+ *
*
- * @param string $roleSid The SID of the Role assigned to this user
+ * @param string $roleSid
* @return $this Fluent Builder
*/
- public function setRoleSid($roleSid)
+ public function setRoleSid(string $roleSid): self
{
$this->options['roleSid'] = $roleSid;
return $this;
}
/**
- * A valid JSON string that contains application-specific data.
+ *
*
- * @param string $attributes A valid JSON string that contains
- * application-specific data
+ * @param string $attributes
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setAttributes(string $attributes): self
{
$this->options['attributes'] = $attributes;
return $this;
}
/**
- * A descriptive string that you create to describe the new resource. This value is often used for display purposes.
+ *
*
- * @param string $friendlyName A string to describe the new resource
+ * @param string $friendlyName
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
}
+ /**
+ * The X-Twilio-Webhook-Enabled HTTP request header
+ *
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
+ * @return $this Fluent Builder
+ */
+ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self
+ {
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.IpMessaging.V2.CreateUserOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.IpMessaging.V2.CreateUserOptions ' . $options . ']';
}
}
+
+
+
class UpdateUserOptions extends Options
-{
+ {
/**
- * @param string $roleSid The SID id of the Role assigned to this user
- * @param string $attributes A valid JSON string that contains
- * application-specific data
- * @param string $friendlyName A string to describe the resource
+ * @param string $roleSid
+ * @param string $attributes
+ * @param string $friendlyName
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
*/
- public function __construct($roleSid = Values::NONE, $attributes = Values::NONE, $friendlyName = Values::NONE)
- {
+ public function __construct(
+
+ string $roleSid = Values::NONE,
+ string $attributes = Values::NONE,
+ string $friendlyName = Values::NONE,
+ string $xTwilioWebhookEnabled = Values::NONE
+
+ ) {
$this->options['roleSid'] = $roleSid;
$this->options['attributes'] = $attributes;
$this->options['friendlyName'] = $friendlyName;
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
}
/**
- * The SID of the [Role](https://www.twilio.com/docs/chat/rest/role-resource) to assign to the User.
+ *
*
- * @param string $roleSid The SID id of the Role assigned to this user
+ * @param string $roleSid
* @return $this Fluent Builder
*/
- public function setRoleSid($roleSid)
+ public function setRoleSid(string $roleSid): self
{
$this->options['roleSid'] = $roleSid;
return $this;
}
/**
- * A valid JSON string that contains application-specific data.
+ *
*
- * @param string $attributes A valid JSON string that contains
- * application-specific data
+ * @param string $attributes
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setAttributes(string $attributes): self
{
$this->options['attributes'] = $attributes;
return $this;
}
/**
- * A descriptive string that you create to describe the resource. It is often used for display purposes.
+ *
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
}
+ /**
+ * The X-Twilio-Webhook-Enabled HTTP request header
+ *
+ * @param string $xTwilioWebhookEnabled The X-Twilio-Webhook-Enabled HTTP request header
+ * @return $this Fluent Builder
+ */
+ public function setXTwilioWebhookEnabled(string $xTwilioWebhookEnabled): self
+ {
+ $this->options['xTwilioWebhookEnabled'] = $xTwilioWebhookEnabled;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.IpMessaging.V2.UpdateUserOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.IpMessaging.V2.UpdateUserOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/UserPage.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/UserPage.php
index cb97dca..1d105d8 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/UserPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/Service/UserPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return UserInstance \Twilio\Rest\IpMessaging\V2\Service\UserInstance
+ */
+ public function buildInstance(array $payload): UserInstance
{
return new UserInstance($this->version, $payload, $this->solution['serviceSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V2.UserPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/ServiceContext.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/ServiceContext.php
index 8cd493d..5fb7219 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/ServiceContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/ServiceContext.php
@@ -2,88 +2,107 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\IpMessaging\V2;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\IpMessaging\V2\Service\BindingList;
+use Twilio\Values;
+use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
use Twilio\Rest\IpMessaging\V2\Service\ChannelList;
+use Twilio\Rest\IpMessaging\V2\Service\BindingList;
use Twilio\Rest\IpMessaging\V2\Service\RoleList;
use Twilio\Rest\IpMessaging\V2\Service\UserList;
-use Twilio\Serialize;
-use Twilio\Values;
-use Twilio\Version;
+
/**
- * @property \Twilio\Rest\IpMessaging\V2\Service\ChannelList $channels
- * @property \Twilio\Rest\IpMessaging\V2\Service\RoleList $roles
- * @property \Twilio\Rest\IpMessaging\V2\Service\UserList $users
- * @property \Twilio\Rest\IpMessaging\V2\Service\BindingList $bindings
+ * @property ChannelList $channels
+ * @property BindingList $bindings
+ * @property RoleList $roles
+ * @property UserList $users
+ * @method \Twilio\Rest\IpMessaging\V2\Service\BindingContext bindings(string $sid)
* @method \Twilio\Rest\IpMessaging\V2\Service\ChannelContext channels(string $sid)
* @method \Twilio\Rest\IpMessaging\V2\Service\RoleContext roles(string $sid)
* @method \Twilio\Rest\IpMessaging\V2\Service\UserContext users(string $sid)
- * @method \Twilio\Rest\IpMessaging\V2\Service\BindingContext bindings(string $sid)
*/
class ServiceContext extends InstanceContext
-{
- protected $_channels = null;
- protected $_roles = null;
- protected $_users = null;
- protected $_bindings = null;
+ {
+ protected $_channels;
+ protected $_bindings;
+ protected $_roles;
+ protected $_users;
/**
* Initialize the ServiceContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The SID of the Service resource to fetch
- * @return \Twilio\Rest\IpMessaging\V2\ServiceContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Services/' . \rawurlencode($sid) . '';
+ $this->uri = '/Services/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a ServiceInstance
+ * Delete the ServiceInstance
*
- * @return ServiceInstance Fetched ServiceInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new ServiceInstance($this->version, $payload, $this->solution['sid']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Deletes the ServiceInstance
+ * Fetch the ServiceInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return ServiceInstance Fetched ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): ServiceInstance
{
- return $this->version->delete('delete', $this->uri);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
+
+ return new ServiceInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Update the ServiceInstance
*
@@ -91,120 +110,155 @@ public function delete()
* @return ServiceInstance Updated ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ServiceInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'DefaultServiceRoleSid' => $options['defaultServiceRoleSid'],
- 'DefaultChannelRoleSid' => $options['defaultChannelRoleSid'],
- 'DefaultChannelCreatorRoleSid' => $options['defaultChannelCreatorRoleSid'],
- 'ReadStatusEnabled' => Serialize::booleanToString($options['readStatusEnabled']),
- 'ReachabilityEnabled' => Serialize::booleanToString($options['reachabilityEnabled']),
- 'TypingIndicatorTimeout' => $options['typingIndicatorTimeout'],
- 'ConsumptionReportInterval' => $options['consumptionReportInterval'],
- 'Notifications.NewMessage.Enabled' => Serialize::booleanToString($options['notificationsNewMessageEnabled']),
- 'Notifications.NewMessage.Template' => $options['notificationsNewMessageTemplate'],
- 'Notifications.NewMessage.Sound' => $options['notificationsNewMessageSound'],
- 'Notifications.NewMessage.BadgeCountEnabled' => Serialize::booleanToString($options['notificationsNewMessageBadgeCountEnabled']),
- 'Notifications.AddedToChannel.Enabled' => Serialize::booleanToString($options['notificationsAddedToChannelEnabled']),
- 'Notifications.AddedToChannel.Template' => $options['notificationsAddedToChannelTemplate'],
- 'Notifications.AddedToChannel.Sound' => $options['notificationsAddedToChannelSound'],
- 'Notifications.RemovedFromChannel.Enabled' => Serialize::booleanToString($options['notificationsRemovedFromChannelEnabled']),
- 'Notifications.RemovedFromChannel.Template' => $options['notificationsRemovedFromChannelTemplate'],
- 'Notifications.RemovedFromChannel.Sound' => $options['notificationsRemovedFromChannelSound'],
- 'Notifications.InvitedToChannel.Enabled' => Serialize::booleanToString($options['notificationsInvitedToChannelEnabled']),
- 'Notifications.InvitedToChannel.Template' => $options['notificationsInvitedToChannelTemplate'],
- 'Notifications.InvitedToChannel.Sound' => $options['notificationsInvitedToChannelSound'],
- 'PreWebhookUrl' => $options['preWebhookUrl'],
- 'PostWebhookUrl' => $options['postWebhookUrl'],
- 'WebhookMethod' => $options['webhookMethod'],
- 'WebhookFilters' => Serialize::map($options['webhookFilters'], function ($e) {
- return $e;
- }),
- 'Limits.ChannelMembers' => $options['limitsChannelMembers'],
- 'Limits.UserChannels' => $options['limitsUserChannels'],
- 'Media.CompatibilityMessage' => $options['mediaCompatibilityMessage'],
- 'PreWebhookRetryCount' => $options['preWebhookRetryCount'],
- 'PostWebhookRetryCount' => $options['postWebhookRetryCount'],
- 'Notifications.LogEnabled' => Serialize::booleanToString($options['notificationsLogEnabled']),
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'DefaultServiceRoleSid' =>
+ $options['defaultServiceRoleSid'],
+ 'DefaultChannelRoleSid' =>
+ $options['defaultChannelRoleSid'],
+ 'DefaultChannelCreatorRoleSid' =>
+ $options['defaultChannelCreatorRoleSid'],
+ 'ReadStatusEnabled' =>
+ Serialize::booleanToString($options['readStatusEnabled']),
+ 'ReachabilityEnabled' =>
+ Serialize::booleanToString($options['reachabilityEnabled']),
+ 'TypingIndicatorTimeout' =>
+ $options['typingIndicatorTimeout'],
+ 'ConsumptionReportInterval' =>
+ $options['consumptionReportInterval'],
+ 'Notifications.NewMessage.Enabled' =>
+ Serialize::booleanToString($options['notificationsNewMessageEnabled']),
+ 'Notifications.NewMessage.Template' =>
+ $options['notificationsNewMessageTemplate'],
+ 'Notifications.NewMessage.Sound' =>
+ $options['notificationsNewMessageSound'],
+ 'Notifications.NewMessage.BadgeCountEnabled' =>
+ Serialize::booleanToString($options['notificationsNewMessageBadgeCountEnabled']),
+ 'Notifications.AddedToChannel.Enabled' =>
+ Serialize::booleanToString($options['notificationsAddedToChannelEnabled']),
+ 'Notifications.AddedToChannel.Template' =>
+ $options['notificationsAddedToChannelTemplate'],
+ 'Notifications.AddedToChannel.Sound' =>
+ $options['notificationsAddedToChannelSound'],
+ 'Notifications.RemovedFromChannel.Enabled' =>
+ Serialize::booleanToString($options['notificationsRemovedFromChannelEnabled']),
+ 'Notifications.RemovedFromChannel.Template' =>
+ $options['notificationsRemovedFromChannelTemplate'],
+ 'Notifications.RemovedFromChannel.Sound' =>
+ $options['notificationsRemovedFromChannelSound'],
+ 'Notifications.InvitedToChannel.Enabled' =>
+ Serialize::booleanToString($options['notificationsInvitedToChannelEnabled']),
+ 'Notifications.InvitedToChannel.Template' =>
+ $options['notificationsInvitedToChannelTemplate'],
+ 'Notifications.InvitedToChannel.Sound' =>
+ $options['notificationsInvitedToChannelSound'],
+ 'PreWebhookUrl' =>
+ $options['preWebhookUrl'],
+ 'PostWebhookUrl' =>
+ $options['postWebhookUrl'],
+ 'WebhookMethod' =>
+ $options['webhookMethod'],
+ 'WebhookFilters' =>
+ Serialize::map($options['webhookFilters'], function ($e) { return $e; }),
+ 'Limits.ChannelMembers' =>
+ $options['limitsChannelMembers'],
+ 'Limits.UserChannels' =>
+ $options['limitsUserChannels'],
+ 'Media.CompatibilityMessage' =>
+ $options['mediaCompatibilityMessage'],
+ 'PreWebhookRetryCount' =>
+ $options['preWebhookRetryCount'],
+ 'PostWebhookRetryCount' =>
+ $options['postWebhookRetryCount'],
+ 'Notifications.LogEnabled' =>
+ Serialize::booleanToString($options['notificationsLogEnabled']),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
- return new ServiceInstance($this->version, $payload, $this->solution['sid']);
+ return new ServiceInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Access the channels
- *
- * @return \Twilio\Rest\IpMessaging\V2\Service\ChannelList
*/
- protected function getChannels()
+ protected function getChannels(): ChannelList
{
if (!$this->_channels) {
- $this->_channels = new ChannelList($this->version, $this->solution['sid']);
+ $this->_channels = new ChannelList(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->_channels;
}
/**
- * Access the roles
- *
- * @return \Twilio\Rest\IpMessaging\V2\Service\RoleList
+ * Access the bindings
*/
- protected function getRoles()
+ protected function getBindings(): BindingList
{
- if (!$this->_roles) {
- $this->_roles = new RoleList($this->version, $this->solution['sid']);
+ if (!$this->_bindings) {
+ $this->_bindings = new BindingList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_roles;
+ return $this->_bindings;
}
/**
- * Access the users
- *
- * @return \Twilio\Rest\IpMessaging\V2\Service\UserList
+ * Access the roles
*/
- protected function getUsers()
+ protected function getRoles(): RoleList
{
- if (!$this->_users) {
- $this->_users = new UserList($this->version, $this->solution['sid']);
+ if (!$this->_roles) {
+ $this->_roles = new RoleList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_users;
+ return $this->_roles;
}
/**
- * Access the bindings
- *
- * @return \Twilio\Rest\IpMessaging\V2\Service\BindingList
+ * Access the users
*/
- protected function getBindings()
+ protected function getUsers(): UserList
{
- if (!$this->_bindings) {
- $this->_bindings = new BindingList($this->version, $this->solution['sid']);
+ if (!$this->_users) {
+ $this->_users = new UserList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_bindings;
+ return $this->_users;
}
/**
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -219,10 +273,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -237,12 +291,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.IpMessaging.V2.ServiceContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/ServiceInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/ServiceInstance.php
index 5c7a9b4..86bb09a 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/ServiceInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/ServiceInstance.php
@@ -2,66 +2,78 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\IpMessaging\V2;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\IpMessaging\V2\Service\ChannelList;
+use Twilio\Rest\IpMessaging\V2\Service\BindingList;
+use Twilio\Rest\IpMessaging\V2\Service\RoleList;
+use Twilio\Rest\IpMessaging\V2\Service\UserList;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $friendlyName
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $defaultServiceRoleSid
- * @property string $defaultChannelRoleSid
- * @property string $defaultChannelCreatorRoleSid
- * @property bool $readStatusEnabled
- * @property bool $reachabilityEnabled
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $friendlyName
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $defaultServiceRoleSid
+ * @property string|null $defaultChannelRoleSid
+ * @property string|null $defaultChannelCreatorRoleSid
+ * @property bool|null $readStatusEnabled
+ * @property bool|null $reachabilityEnabled
* @property int $typingIndicatorTimeout
* @property int $consumptionReportInterval
- * @property array $limits
- * @property string $preWebhookUrl
- * @property string $postWebhookUrl
- * @property string $webhookMethod
- * @property string $webhookFilters
+ * @property array|null $limits
+ * @property string|null $preWebhookUrl
+ * @property string|null $postWebhookUrl
+ * @property string|null $webhookMethod
+ * @property string[]|null $webhookFilters
* @property int $preWebhookRetryCount
* @property int $postWebhookRetryCount
- * @property array $notifications
- * @property array $media
- * @property string $url
- * @property array $links
+ * @property array|null $notifications
+ * @property array|null $media
+ * @property string|null $url
+ * @property array|null $links
*/
class ServiceInstance extends InstanceResource
{
- protected $_channels = null;
- protected $_roles = null;
- protected $_users = null;
- protected $_bindings = null;
+ protected $_channels;
+ protected $_bindings;
+ protected $_roles;
+ protected $_users;
/**
* Initialize the ServiceInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The SID of the Service resource to fetch
- * @return \Twilio\Rest\IpMessaging\V2\ServiceInstance
+ * @param string $sid
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
@@ -85,47 +97,51 @@ public function __construct(Version $version, array $payload, $sid = null)
'media' => Values::array_get($payload, 'media'),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\IpMessaging\V2\ServiceContext Context for this
- * ServiceInstance
+ * @return ServiceContext Context for this ServiceInstance
*/
- protected function proxy()
+ protected function proxy(): ServiceContext
{
if (!$this->context) {
- $this->context = new ServiceContext($this->version, $this->solution['sid']);
+ $this->context = new ServiceContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a ServiceInstance
+ * Delete the ServiceInstance
*
- * @return ServiceInstance Fetched ServiceInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the ServiceInstance
+ * Fetch the ServiceInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return ServiceInstance Fetched ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): ServiceInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -135,49 +151,42 @@ public function delete()
* @return ServiceInstance Updated ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ServiceInstance
{
+
return $this->proxy()->update($options);
}
/**
* Access the channels
- *
- * @return \Twilio\Rest\IpMessaging\V2\Service\ChannelList
*/
- protected function getChannels()
+ protected function getChannels(): ChannelList
{
return $this->proxy()->channels;
}
/**
- * Access the roles
- *
- * @return \Twilio\Rest\IpMessaging\V2\Service\RoleList
+ * Access the bindings
*/
- protected function getRoles()
+ protected function getBindings(): BindingList
{
- return $this->proxy()->roles;
+ return $this->proxy()->bindings;
}
/**
- * Access the users
- *
- * @return \Twilio\Rest\IpMessaging\V2\Service\UserList
+ * Access the roles
*/
- protected function getUsers()
+ protected function getRoles(): RoleList
{
- return $this->proxy()->users;
+ return $this->proxy()->roles;
}
/**
- * Access the bindings
- *
- * @return \Twilio\Rest\IpMessaging\V2\Service\BindingList
+ * Access the users
*/
- protected function getBindings()
+ protected function getUsers(): UserList
{
- return $this->proxy()->bindings;
+ return $this->proxy()->users;
}
/**
@@ -187,7 +196,7 @@ protected function getBindings()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -206,12 +215,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.IpMessaging.V2.ServiceInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/ServiceList.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/ServiceList.php
index 1852872..4ecd224 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/ServiceList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/ServiceList.php
@@ -2,55 +2,89 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Ip_messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\IpMessaging\V2;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class ServiceList extends ListResource
-{
+ {
/**
* Construct the ServiceList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\IpMessaging\V2\ServiceList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/Services';
}
/**
- * Create a new ServiceInstance
+ * Create the ServiceInstance
*
- * @param string $friendlyName A string to describe the resource
- * @return ServiceInstance Newly created ServiceInstance
+ * @param string $friendlyName
+ * @return ServiceInstance Created ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($friendlyName)
+ public function create(string $friendlyName): ServiceInstance
{
- $data = Values::of(array('FriendlyName' => $friendlyName,));
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'FriendlyName' =>
+ $friendlyName,
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new ServiceInstance(
+ $this->version,
+ $payload
);
+ }
- return new ServiceInstance($this->version, $payload);
+
+ /**
+ * Reads ServiceInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return ServiceInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -69,9 +103,9 @@ public function create($friendlyName)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -80,26 +114,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads ServiceInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return ServiceInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of ServiceInstance records from the API.
* Request is executed immediately
@@ -107,21 +121,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of ServiceInstance
+ * @return ServicePage Page of ServiceInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): ServicePage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new ServicePage($this->version, $response, $this->solution);
}
@@ -131,9 +146,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of ServiceInstance
+ * @return ServicePage Page of ServiceInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): ServicePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -143,15 +158,21 @@ public function getPage($targetUrl)
return new ServicePage($this->version, $response, $this->solution);
}
+
/**
* Constructs a ServiceContext
*
- * @param string $sid The SID of the Service resource to fetch
- * @return \Twilio\Rest\IpMessaging\V2\ServiceContext
+ * @param string $sid
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): ServiceContext
{
- return new ServiceContext($this->version, $sid);
+ return new ServiceContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -159,8 +180,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V2.ServiceList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/ServiceOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/ServiceOptions.php
index 6c3c5cb..ffa4c75 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/ServiceOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/ServiceOptions.php
@@ -1,10 +1,16 @@
options['friendlyName'] = $friendlyName;
$this->options['defaultServiceRoleSid'] = $defaultServiceRoleSid;
$this->options['defaultChannelRoleSid'] = $defaultChannelRoleSid;
@@ -225,422 +239,372 @@ public function __construct($friendlyName = Values::NONE, $defaultServiceRoleSid
}
/**
- * A descriptive string that you create to describe the resource.
+ *
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
}
/**
- * The service role assigned to users when they are added to the service. See the [Role resource](https://www.twilio.com/docs/chat/rest/role-resource) for more info about roles.
+ *
*
- * @param string $defaultServiceRoleSid The service role assigned to users when
- * they are added to the service
+ * @param string $defaultServiceRoleSid
* @return $this Fluent Builder
*/
- public function setDefaultServiceRoleSid($defaultServiceRoleSid)
+ public function setDefaultServiceRoleSid(string $defaultServiceRoleSid): self
{
$this->options['defaultServiceRoleSid'] = $defaultServiceRoleSid;
return $this;
}
/**
- * The channel role assigned to users when they are added to a channel. See the [Role resource](https://www.twilio.com/docs/chat/rest/role-resource) for more info about roles.
+ *
*
- * @param string $defaultChannelRoleSid The channel role assigned to users when
- * they are added to a channel
+ * @param string $defaultChannelRoleSid
* @return $this Fluent Builder
*/
- public function setDefaultChannelRoleSid($defaultChannelRoleSid)
+ public function setDefaultChannelRoleSid(string $defaultChannelRoleSid): self
{
$this->options['defaultChannelRoleSid'] = $defaultChannelRoleSid;
return $this;
}
/**
- * The channel role assigned to a channel creator when they join a new channel. See the [Role resource](https://www.twilio.com/docs/chat/rest/role-resource) for more info about roles.
+ *
*
- * @param string $defaultChannelCreatorRoleSid The channel role assigned to a
- * channel creator when they join a
- * new channel
+ * @param string $defaultChannelCreatorRoleSid
* @return $this Fluent Builder
*/
- public function setDefaultChannelCreatorRoleSid($defaultChannelCreatorRoleSid)
+ public function setDefaultChannelCreatorRoleSid(string $defaultChannelCreatorRoleSid): self
{
$this->options['defaultChannelCreatorRoleSid'] = $defaultChannelCreatorRoleSid;
return $this;
}
/**
- * Whether to enable the [Message Consumption Horizon](https://www.twilio.com/docs/chat/consumption-horizon) feature. The default is `true`.
+ *
*
- * @param bool $readStatusEnabled Whether to enable the Message Consumption
- * Horizon feature
+ * @param bool $readStatusEnabled
* @return $this Fluent Builder
*/
- public function setReadStatusEnabled($readStatusEnabled)
+ public function setReadStatusEnabled(bool $readStatusEnabled): self
{
$this->options['readStatusEnabled'] = $readStatusEnabled;
return $this;
}
/**
- * Whether to enable the [Reachability Indicator](https://www.twilio.com/docs/chat/reachability-indicator) for this Service instance. The default is `false`.
+ *
*
- * @param bool $reachabilityEnabled Whether to enable the Reachability
- * Indicator feature for this Service instance
+ * @param bool $reachabilityEnabled
* @return $this Fluent Builder
*/
- public function setReachabilityEnabled($reachabilityEnabled)
+ public function setReachabilityEnabled(bool $reachabilityEnabled): self
{
$this->options['reachabilityEnabled'] = $reachabilityEnabled;
return $this;
}
/**
- * How long in seconds after a `started typing` event until clients should assume that user is no longer typing, even if no `ended typing` message was received. The default is 5 seconds.
+ *
*
- * @param int $typingIndicatorTimeout How long in seconds to wait before
- * assuming the user is no longer typing
+ * @param int $typingIndicatorTimeout
* @return $this Fluent Builder
*/
- public function setTypingIndicatorTimeout($typingIndicatorTimeout)
+ public function setTypingIndicatorTimeout(int $typingIndicatorTimeout): self
{
$this->options['typingIndicatorTimeout'] = $typingIndicatorTimeout;
return $this;
}
/**
- * DEPRECATED. The interval in seconds between consumption reports submission batches from client endpoints.
+ *
*
- * @param int $consumptionReportInterval DEPRECATED
+ * @param int $consumptionReportInterval
* @return $this Fluent Builder
*/
- public function setConsumptionReportInterval($consumptionReportInterval)
+ public function setConsumptionReportInterval(int $consumptionReportInterval): self
{
$this->options['consumptionReportInterval'] = $consumptionReportInterval;
return $this;
}
/**
- * Whether to send a notification when a new message is added to a channel. The default is `false`.
+ *
*
- * @param bool $notificationsNewMessageEnabled Whether to send a notification
- * when a new message is added to a
- * channel
+ * @param bool $notificationsNewMessageEnabled
* @return $this Fluent Builder
*/
- public function setNotificationsNewMessageEnabled($notificationsNewMessageEnabled)
+ public function setNotificationsNewMessageEnabled(bool $notificationsNewMessageEnabled): self
{
$this->options['notificationsNewMessageEnabled'] = $notificationsNewMessageEnabled;
return $this;
}
/**
- * The template to use to create the notification text displayed when a new message is added to a channel and `notifications.new_message.enabled` is `true`.
+ *
*
- * @param string $notificationsNewMessageTemplate The template to use to create
- * the notification text
- * displayed when a new message
- * is added to a channel
+ * @param string $notificationsNewMessageTemplate
* @return $this Fluent Builder
*/
- public function setNotificationsNewMessageTemplate($notificationsNewMessageTemplate)
+ public function setNotificationsNewMessageTemplate(string $notificationsNewMessageTemplate): self
{
$this->options['notificationsNewMessageTemplate'] = $notificationsNewMessageTemplate;
return $this;
}
/**
- * The name of the sound to play when a new message is added to a channel and `notifications.new_message.enabled` is `true`.
+ *
*
- * @param string $notificationsNewMessageSound The name of the sound to play
- * when a new message is added to a
- * channel
+ * @param string $notificationsNewMessageSound
* @return $this Fluent Builder
*/
- public function setNotificationsNewMessageSound($notificationsNewMessageSound)
+ public function setNotificationsNewMessageSound(string $notificationsNewMessageSound): self
{
$this->options['notificationsNewMessageSound'] = $notificationsNewMessageSound;
return $this;
}
/**
- * Whether the new message badge is enabled. The default is `false`.
+ *
*
- * @param bool $notificationsNewMessageBadgeCountEnabled Whether the new
- * message badge is
- * enabled
+ * @param bool $notificationsNewMessageBadgeCountEnabled
* @return $this Fluent Builder
*/
- public function setNotificationsNewMessageBadgeCountEnabled($notificationsNewMessageBadgeCountEnabled)
+ public function setNotificationsNewMessageBadgeCountEnabled(bool $notificationsNewMessageBadgeCountEnabled): self
{
$this->options['notificationsNewMessageBadgeCountEnabled'] = $notificationsNewMessageBadgeCountEnabled;
return $this;
}
/**
- * Whether to send a notification when a member is added to a channel. The default is `false`.
+ *
*
- * @param bool $notificationsAddedToChannelEnabled Whether to send a
- * notification when a member
- * is added to a channel
+ * @param bool $notificationsAddedToChannelEnabled
* @return $this Fluent Builder
*/
- public function setNotificationsAddedToChannelEnabled($notificationsAddedToChannelEnabled)
+ public function setNotificationsAddedToChannelEnabled(bool $notificationsAddedToChannelEnabled): self
{
$this->options['notificationsAddedToChannelEnabled'] = $notificationsAddedToChannelEnabled;
return $this;
}
/**
- * The template to use to create the notification text displayed when a member is added to a channel and `notifications.added_to_channel.enabled` is `true`.
+ *
*
- * @param string $notificationsAddedToChannelTemplate The template to use to
- * create the notification
- * text displayed when a
- * member is added to a
- * channel
+ * @param string $notificationsAddedToChannelTemplate
* @return $this Fluent Builder
*/
- public function setNotificationsAddedToChannelTemplate($notificationsAddedToChannelTemplate)
+ public function setNotificationsAddedToChannelTemplate(string $notificationsAddedToChannelTemplate): self
{
$this->options['notificationsAddedToChannelTemplate'] = $notificationsAddedToChannelTemplate;
return $this;
}
/**
- * The name of the sound to play when a member is added to a channel and `notifications.added_to_channel.enabled` is `true`.
+ *
*
- * @param string $notificationsAddedToChannelSound The name of the sound to
- * play when a member is added
- * to a channel
+ * @param string $notificationsAddedToChannelSound
* @return $this Fluent Builder
*/
- public function setNotificationsAddedToChannelSound($notificationsAddedToChannelSound)
+ public function setNotificationsAddedToChannelSound(string $notificationsAddedToChannelSound): self
{
$this->options['notificationsAddedToChannelSound'] = $notificationsAddedToChannelSound;
return $this;
}
/**
- * Whether to send a notification to a user when they are removed from a channel. The default is `false`.
+ *
*
- * @param bool $notificationsRemovedFromChannelEnabled Whether to send a
- * notification to a user
- * when they are removed
- * from a channel
+ * @param bool $notificationsRemovedFromChannelEnabled
* @return $this Fluent Builder
*/
- public function setNotificationsRemovedFromChannelEnabled($notificationsRemovedFromChannelEnabled)
+ public function setNotificationsRemovedFromChannelEnabled(bool $notificationsRemovedFromChannelEnabled): self
{
$this->options['notificationsRemovedFromChannelEnabled'] = $notificationsRemovedFromChannelEnabled;
return $this;
}
/**
- * The template to use to create the notification text displayed to a user when they are removed from a channel and `notifications.removed_from_channel.enabled` is `true`.
+ *
*
- * @param string $notificationsRemovedFromChannelTemplate The template to use
- * to create the
- * notification text
- * displayed to a user
- * when they are removed
+ * @param string $notificationsRemovedFromChannelTemplate
* @return $this Fluent Builder
*/
- public function setNotificationsRemovedFromChannelTemplate($notificationsRemovedFromChannelTemplate)
+ public function setNotificationsRemovedFromChannelTemplate(string $notificationsRemovedFromChannelTemplate): self
{
$this->options['notificationsRemovedFromChannelTemplate'] = $notificationsRemovedFromChannelTemplate;
return $this;
}
/**
- * The name of the sound to play to a user when they are removed from a channel and `notifications.removed_from_channel.enabled` is `true`.
+ *
*
- * @param string $notificationsRemovedFromChannelSound The name of the sound to
- * play to a user when they
- * are removed from a
- * channel
+ * @param string $notificationsRemovedFromChannelSound
* @return $this Fluent Builder
*/
- public function setNotificationsRemovedFromChannelSound($notificationsRemovedFromChannelSound)
+ public function setNotificationsRemovedFromChannelSound(string $notificationsRemovedFromChannelSound): self
{
$this->options['notificationsRemovedFromChannelSound'] = $notificationsRemovedFromChannelSound;
return $this;
}
/**
- * Whether to send a notification when a user is invited to a channel. The default is `false`.
+ *
*
- * @param bool $notificationsInvitedToChannelEnabled Whether to send a
- * notification when a user
- * is invited to a channel
+ * @param bool $notificationsInvitedToChannelEnabled
* @return $this Fluent Builder
*/
- public function setNotificationsInvitedToChannelEnabled($notificationsInvitedToChannelEnabled)
+ public function setNotificationsInvitedToChannelEnabled(bool $notificationsInvitedToChannelEnabled): self
{
$this->options['notificationsInvitedToChannelEnabled'] = $notificationsInvitedToChannelEnabled;
return $this;
}
/**
- * The template to use to create the notification text displayed when a user is invited to a channel and `notifications.invited_to_channel.enabled` is `true`.
+ *
*
- * @param string $notificationsInvitedToChannelTemplate The template to use to
- * create the notification
- * text displayed when a
- * user is invited to a
- * channel
+ * @param string $notificationsInvitedToChannelTemplate
* @return $this Fluent Builder
*/
- public function setNotificationsInvitedToChannelTemplate($notificationsInvitedToChannelTemplate)
+ public function setNotificationsInvitedToChannelTemplate(string $notificationsInvitedToChannelTemplate): self
{
$this->options['notificationsInvitedToChannelTemplate'] = $notificationsInvitedToChannelTemplate;
return $this;
}
/**
- * The name of the sound to play when a user is invited to a channel and `notifications.invited_to_channel.enabled` is `true`.
+ *
*
- * @param string $notificationsInvitedToChannelSound The name of the sound to
- * play when a user is
- * invited to a channel
+ * @param string $notificationsInvitedToChannelSound
* @return $this Fluent Builder
*/
- public function setNotificationsInvitedToChannelSound($notificationsInvitedToChannelSound)
+ public function setNotificationsInvitedToChannelSound(string $notificationsInvitedToChannelSound): self
{
$this->options['notificationsInvitedToChannelSound'] = $notificationsInvitedToChannelSound;
return $this;
}
/**
- * The URL for pre-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details.
+ *
*
- * @param string $preWebhookUrl The webhook URL for pre-event webhooks
+ * @param string $preWebhookUrl
* @return $this Fluent Builder
*/
- public function setPreWebhookUrl($preWebhookUrl)
+ public function setPreWebhookUrl(string $preWebhookUrl): self
{
$this->options['preWebhookUrl'] = $preWebhookUrl;
return $this;
}
/**
- * The URL for post-event webhooks, which are called by using the `webhook_method`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details.
+ *
*
- * @param string $postWebhookUrl The URL for post-event webhooks
+ * @param string $postWebhookUrl
* @return $this Fluent Builder
*/
- public function setPostWebhookUrl($postWebhookUrl)
+ public function setPostWebhookUrl(string $postWebhookUrl): self
{
$this->options['postWebhookUrl'] = $postWebhookUrl;
return $this;
}
/**
- * The HTTP method to use for calls to the `pre_webhook_url` and `post_webhook_url` webhooks. Can be: `POST` or `GET` and the default is `POST`. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details.
+ *
*
- * @param string $webhookMethod The HTTP method to use for both PRE and POST
- * webhooks
+ * @param string $webhookMethod
* @return $this Fluent Builder
*/
- public function setWebhookMethod($webhookMethod)
+ public function setWebhookMethod(string $webhookMethod): self
{
$this->options['webhookMethod'] = $webhookMethod;
return $this;
}
/**
- * The list of webhook events that are enabled for this Service instance. See [Webhook Events](https://www.twilio.com/docs/chat/webhook-events) for more details.
+ *
*
- * @param string $webhookFilters The list of webhook events that are enabled
- * for this Service instance
+ * @param string[] $webhookFilters
* @return $this Fluent Builder
*/
- public function setWebhookFilters($webhookFilters)
+ public function setWebhookFilters(array $webhookFilters): self
{
$this->options['webhookFilters'] = $webhookFilters;
return $this;
}
/**
- * The maximum number of Members that can be added to Channels within this Service. Can be up to 1,000.
+ *
*
- * @param int $limitsChannelMembers The maximum number of Members that can be
- * added to Channels within this Service
+ * @param int $limitsChannelMembers
* @return $this Fluent Builder
*/
- public function setLimitsChannelMembers($limitsChannelMembers)
+ public function setLimitsChannelMembers(int $limitsChannelMembers): self
{
$this->options['limitsChannelMembers'] = $limitsChannelMembers;
return $this;
}
/**
- * The maximum number of Channels Users can be a Member of within this Service. Can be up to 1,000.
+ *
*
- * @param int $limitsUserChannels The maximum number of Channels Users can be a
- * Member of within this Service
+ * @param int $limitsUserChannels
* @return $this Fluent Builder
*/
- public function setLimitsUserChannels($limitsUserChannels)
+ public function setLimitsUserChannels(int $limitsUserChannels): self
{
$this->options['limitsUserChannels'] = $limitsUserChannels;
return $this;
}
/**
- * The message to send when a media message has no text. Can be used as placeholder message.
+ *
*
- * @param string $mediaCompatibilityMessage The message to send when a media
- * message has no text
+ * @param string $mediaCompatibilityMessage
* @return $this Fluent Builder
*/
- public function setMediaCompatibilityMessage($mediaCompatibilityMessage)
+ public function setMediaCompatibilityMessage(string $mediaCompatibilityMessage): self
{
$this->options['mediaCompatibilityMessage'] = $mediaCompatibilityMessage;
return $this;
}
/**
- * The number of times to retry a call to the `pre_webhook_url` if the request times out (after 5 seconds) or it receives a 429, 503, or 504 HTTP response. Default retry count is 0 times, which means the call won't be retried.
+ *
*
- * @param int $preWebhookRetryCount Count of times webhook will be retried in
- * case of timeout or 429/503/504 HTTP
- * responses
+ * @param int $preWebhookRetryCount
* @return $this Fluent Builder
*/
- public function setPreWebhookRetryCount($preWebhookRetryCount)
+ public function setPreWebhookRetryCount(int $preWebhookRetryCount): self
{
$this->options['preWebhookRetryCount'] = $preWebhookRetryCount;
return $this;
}
/**
- * The number of times to retry a call to the `post_webhook_url` if the request times out (after 5 seconds) or it receives a 429, 503, or 504 HTTP response. The default is 0, which means the call won't be retried.
+ *
*
- * @param int $postWebhookRetryCount The number of times calls to the
- * `post_webhook_url` will be retried
+ * @param int $postWebhookRetryCount
* @return $this Fluent Builder
*/
- public function setPostWebhookRetryCount($postWebhookRetryCount)
+ public function setPostWebhookRetryCount(int $postWebhookRetryCount): self
{
$this->options['postWebhookRetryCount'] = $postWebhookRetryCount;
return $this;
}
/**
- * Whether to log notifications. The default is `false`.
+ *
*
- * @param bool $notificationsLogEnabled Whether to log notifications
+ * @param bool $notificationsLogEnabled
* @return $this Fluent Builder
*/
- public function setNotificationsLogEnabled($notificationsLogEnabled)
+ public function setNotificationsLogEnabled(bool $notificationsLogEnabled): self
{
$this->options['notificationsLogEnabled'] = $notificationsLogEnabled;
return $this;
@@ -651,14 +615,10 @@ public function setNotificationsLogEnabled($notificationsLogEnabled)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.IpMessaging.V2.UpdateServiceOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.IpMessaging.V2.UpdateServiceOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/ServicePage.php b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/ServicePage.php
index 16d5737..e203053 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/ServicePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/IpMessaging/V2/ServicePage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return ServiceInstance \Twilio\Rest\IpMessaging\V2\ServiceInstance
+ */
+ public function buildInstance(array $payload): ServiceInstance
{
return new ServiceInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.IpMessaging.V2.ServicePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Lookups.php b/vendor/twilio/sdk/src/Twilio/Rest/Lookups.php
index 2a5370e..3762721 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Lookups.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Lookups.php
@@ -1,111 +1,25 @@
baseUrl = 'https://lookups.twilio.com';
- }
-
- /**
- * @return \Twilio\Rest\Lookups\V1 Version v1 of lookups
- */
- protected function getV1()
- {
- if (!$this->_v1) {
- $this->_v1 = new V1($this);
- }
- return $this->_v1;
- }
-
- /**
- * Magic getter to lazy load version
- *
- * @param string $name Version to return
- * @return \Twilio\Version The requested version
- * @throws TwilioException For unknown versions
- */
- public function __get($name)
- {
- $method = 'get' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return $this->$method();
- }
-
- throw new TwilioException('Unknown version ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $method = 'context' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return \call_user_func_array(array($this, $method), $arguments);
- }
-
- throw new TwilioException('Unknown context ' . $name);
- }
+class Lookups extends LookupsBase {
/**
- * @return \Twilio\Rest\Lookups\V1\PhoneNumberList
+ * @deprecated Use v1->phoneNumbers instead.
*/
- protected function getPhoneNumbers()
- {
+ protected function getPhoneNumbers(): \Twilio\Rest\Lookups\V1\PhoneNumberList {
+ echo "phoneNumbers is deprecated. Use v1->phoneNumbers instead.";
return $this->v1->phoneNumbers;
}
/**
+ * @deprecated Use v1->phoneNumbers(\$phoneNumber) instead.
* @param string $phoneNumber The phone number to fetch in E.164 format
- * @return \Twilio\Rest\Lookups\V1\PhoneNumberContext
*/
- protected function contextPhoneNumbers($phoneNumber)
- {
+ protected function contextPhoneNumbers(string $phoneNumber): \Twilio\Rest\Lookups\V1\PhoneNumberContext {
+ echo "phoneNumbers(\$phoneNumber) is deprecated. Use v1->phoneNumbers(\$phoneNumber) instead.";
return $this->v1->phoneNumbers($phoneNumber);
}
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Lookups]';
- }
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Lookups/V1.php b/vendor/twilio/sdk/src/Twilio/Rest/Lookups/V1.php
index 37a4b29..60a0506 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Lookups/V1.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Lookups/V1.php
@@ -1,32 +1,38 @@
version = 'v1';
}
- /**
- * @return \Twilio\Rest\Lookups\V1\PhoneNumberList
- */
- protected function getPhoneNumbers()
+ protected function getPhoneNumbers(): PhoneNumberList
{
if (!$this->_phoneNumbers) {
$this->_phoneNumbers = new PhoneNumberList($this);
@@ -52,7 +55,7 @@ protected function getPhoneNumbers()
* @return \Twilio\ListResource The requested resource
* @throws TwilioException For unknown resource
*/
- public function __get($name)
+ public function __get(string $name)
{
$method = 'get' . \ucfirst($name);
if (\method_exists($this, $method)) {
@@ -67,10 +70,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -85,8 +88,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Lookups.V1]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Lookups/V1/PhoneNumberContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Lookups/V1/PhoneNumberContext.php
index e23c7e7..93dd2a4 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Lookups/V1/PhoneNumberContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Lookups/V1/PhoneNumberContext.php
@@ -2,81 +2,97 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Lookups
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Lookups\V1;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
class PhoneNumberContext extends InstanceContext
-{
+ {
/**
* Initialize the PhoneNumberContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $phoneNumber The phone number to fetch in E.164 format
- * @return \Twilio\Rest\Lookups\V1\PhoneNumberContext
+ * @param Version $version Version that contains the resource
+ * @param string $phoneNumber The phone number to lookup in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, which consists of a + followed by the country code and subscriber number.
*/
- public function __construct(Version $version, $phoneNumber)
- {
+ public function __construct(
+ Version $version,
+ $phoneNumber
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('phoneNumber' => $phoneNumber,);
+ $this->solution = [
+ 'phoneNumber' =>
+ $phoneNumber,
+ ];
- $this->uri = '/PhoneNumbers/' . \rawurlencode($phoneNumber) . '';
+ $this->uri = '/PhoneNumbers/' . \rawurlencode($phoneNumber)
+ .'';
}
/**
- * Fetch a PhoneNumberInstance
+ * Fetch the PhoneNumberInstance
*
* @param array|Options $options Optional Arguments
* @return PhoneNumberInstance Fetched PhoneNumberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch($options = array())
+ public function fetch(array $options = []): PhoneNumberInstance
{
- $options = new Values($options);
- $params = Values::of(array(
- 'CountryCode' => $options['countryCode'],
- 'Type' => Serialize::map($options['type'], function ($e) {
- return $e;
- }),
- 'AddOns' => Serialize::map($options['addOns'], function ($e) {
- return $e;
- }),
- ));
+ $options = new Values($options);
+ $params = Values::of([
+ 'CountryCode' =>
+ $options['countryCode'],
+ 'Type' =>
+ Serialize::map($options['type'], function ($e) { return $e; }),
+ 'AddOns' =>
+ Serialize::map($options['addOns'], function ($e) { return $e; }),
+ ]);
$params = \array_merge($params, Serialize::prefixedCollapsibleMap($options['addOnsData'], 'AddOns'));
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
- return new PhoneNumberInstance($this->version, $payload, $this->solution['phoneNumber']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, $params, [], $headers);
+
+ return new PhoneNumberInstance(
+ $this->version,
+ $payload,
+ $this->solution['phoneNumber']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Lookups.V1.PhoneNumberContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Lookups/V1/PhoneNumberInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Lookups/V1/PhoneNumberInstance.php
index 6f266d2..9630b09 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Lookups/V1/PhoneNumberInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Lookups/V1/PhoneNumberInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Lookups
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Lookups\V1;
use Twilio\Exceptions\TwilioException;
@@ -15,31 +23,31 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * @property array $callerName
- * @property string $countryCode
- * @property string $phoneNumber
- * @property string $nationalFormat
- * @property array $carrier
- * @property array $addOns
- * @property string $url
+ * @property array|null $callerName
+ * @property string|null $countryCode
+ * @property string|null $phoneNumber
+ * @property string|null $nationalFormat
+ * @property array|null $carrier
+ * @property array|null $addOns
+ * @property string|null $url
*/
class PhoneNumberInstance extends InstanceResource
{
/**
* Initialize the PhoneNumberInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $phoneNumber The phone number to fetch in E.164 format
- * @return \Twilio\Rest\Lookups\V1\PhoneNumberInstance
+ * @param string $phoneNumber The phone number to lookup in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, which consists of a + followed by the country code and subscriber number.
*/
- public function __construct(Version $version, array $payload, $phoneNumber = null)
+ public function __construct(Version $version, array $payload, string $phoneNumber = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'callerName' => Values::array_get($payload, 'caller_name'),
'countryCode' => Values::array_get($payload, 'country_code'),
'phoneNumber' => Values::array_get($payload, 'phone_number'),
@@ -47,36 +55,39 @@ public function __construct(Version $version, array $payload, $phoneNumber = nul
'carrier' => Values::array_get($payload, 'carrier'),
'addOns' => Values::array_get($payload, 'add_ons'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('phoneNumber' => $phoneNumber ?: $this->properties['phoneNumber'],);
+ $this->solution = ['phoneNumber' => $phoneNumber ?: $this->properties['phoneNumber'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Lookups\V1\PhoneNumberContext Context for this
- * PhoneNumberInstance
+ * @return PhoneNumberContext Context for this PhoneNumberInstance
*/
- protected function proxy()
+ protected function proxy(): PhoneNumberContext
{
if (!$this->context) {
- $this->context = new PhoneNumberContext($this->version, $this->solution['phoneNumber']);
+ $this->context = new PhoneNumberContext(
+ $this->version,
+ $this->solution['phoneNumber']
+ );
}
return $this->context;
}
/**
- * Fetch a PhoneNumberInstance
+ * Fetch the PhoneNumberInstance
*
* @param array|Options $options Optional Arguments
* @return PhoneNumberInstance Fetched PhoneNumberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch($options = array())
+ public function fetch(array $options = []): PhoneNumberInstance
{
+
return $this->proxy()->fetch($options);
}
@@ -87,7 +98,7 @@ public function fetch($options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -106,12 +117,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Lookups.V1.PhoneNumberInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Lookups/V1/PhoneNumberList.php b/vendor/twilio/sdk/src/Twilio/Rest/Lookups/V1/PhoneNumberList.php
index bead202..fc69096 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Lookups/V1/PhoneNumberList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Lookups/V1/PhoneNumberList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Lookups
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Lookups\V1;
@@ -12,31 +19,38 @@
use Twilio\ListResource;
use Twilio\Version;
+
class PhoneNumberList extends ListResource
-{
+ {
/**
* Construct the PhoneNumberList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Lookups\V1\PhoneNumberList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
}
/**
* Constructs a PhoneNumberContext
*
- * @param string $phoneNumber The phone number to fetch in E.164 format
- * @return \Twilio\Rest\Lookups\V1\PhoneNumberContext
+ * @param string $phoneNumber The phone number to lookup in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, which consists of a + followed by the country code and subscriber number.
*/
- public function getContext($phoneNumber)
+ public function getContext(
+ string $phoneNumber
+
+ ): PhoneNumberContext
{
- return new PhoneNumberContext($this->version, $phoneNumber);
+ return new PhoneNumberContext(
+ $this->version,
+ $phoneNumber
+ );
}
/**
@@ -44,8 +58,8 @@ public function getContext($phoneNumber)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Lookups.V1.PhoneNumberList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Lookups/V1/PhoneNumberOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Lookups/V1/PhoneNumberOptions.php
index 5496a71..c2e5289 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Lookups/V1/PhoneNumberOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Lookups/V1/PhoneNumberOptions.php
@@ -1,10 +1,16 @@
options['countryCode'] = $countryCode;
$this->options['type'] = $type;
$this->options['addOns'] = $addOns;
@@ -48,10 +71,10 @@ public function __construct($countryCode = Values::NONE, $type = Values::NONE, $
/**
* The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the phone number to fetch. This is used to specify the country when the phone number is provided in a national format.
*
- * @param string $countryCode The ISO country code of the phone number
+ * @param string $countryCode The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the phone number to fetch. This is used to specify the country when the phone number is provided in a national format.
* @return $this Fluent Builder
*/
- public function setCountryCode($countryCode)
+ public function setCountryCode(string $countryCode): self
{
$this->options['countryCode'] = $countryCode;
return $this;
@@ -60,10 +83,10 @@ public function setCountryCode($countryCode)
/**
* The type of information to return. Can be: `carrier` or `caller-name`. The default is null. Carrier information costs $0.005 per phone number looked up. Caller Name information is currently available only in the US and costs $0.01 per phone number looked up. To retrieve both types on information, specify this parameter twice; once with `carrier` and once with `caller-name` as the value.
*
- * @param string $type The type of information to return
+ * @param string[] $type The type of information to return. Can be: `carrier` or `caller-name`. The default is null. Carrier information costs $0.005 per phone number looked up. Caller Name information is currently available only in the US and costs $0.01 per phone number looked up. To retrieve both types on information, specify this parameter twice; once with `carrier` and once with `caller-name` as the value.
* @return $this Fluent Builder
*/
- public function setType($type)
+ public function setType(array $type): self
{
$this->options['type'] = $type;
return $this;
@@ -72,10 +95,10 @@ public function setType($type)
/**
* The `unique_name` of an Add-on you would like to invoke. Can be the `unique_name` of an Add-on that is installed on your account. You can specify multiple instances of this parameter to invoke multiple Add-ons. For more information about Add-ons, see the [Add-ons documentation](https://www.twilio.com/docs/add-ons).
*
- * @param string $addOns The unique_name of an Add-on you would like to invoke
+ * @param string[] $addOns The `unique_name` of an Add-on you would like to invoke. Can be the `unique_name` of an Add-on that is installed on your account. You can specify multiple instances of this parameter to invoke multiple Add-ons. For more information about Add-ons, see the [Add-ons documentation](https://www.twilio.com/docs/add-ons).
* @return $this Fluent Builder
*/
- public function setAddOns($addOns)
+ public function setAddOns(array $addOns): self
{
$this->options['addOns'] = $addOns;
return $this;
@@ -84,11 +107,10 @@ public function setAddOns($addOns)
/**
* Data specific to the add-on you would like to invoke. The content and format of this value depends on the add-on.
*
- * @param string $addOnsData Data specific to the add-on you would like to
- * invoke
+ * @param string $addOnsData Data specific to the add-on you would like to invoke. The content and format of this value depends on the add-on.
* @return $this Fluent Builder
*/
- public function setAddOnsData($addOnsData)
+ public function setAddOnsData(string $addOnsData): self
{
$this->options['addOnsData'] = $addOnsData;
return $this;
@@ -99,14 +121,10 @@ public function setAddOnsData($addOnsData)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Lookups.V1.FetchPhoneNumberOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Lookups.V1.FetchPhoneNumberOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Lookups/V1/PhoneNumberPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Lookups/V1/PhoneNumberPage.php
index 158e48e..9ce861e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Lookups/V1/PhoneNumberPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Lookups/V1/PhoneNumberPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return PhoneNumberInstance \Twilio\Rest\Lookups\V1\PhoneNumberInstance
+ */
+ public function buildInstance(array $payload): PhoneNumberInstance
{
return new PhoneNumberInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Lookups.V1.PhoneNumberPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging.php
index 0089581..0312a49 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Messaging.php
@@ -1,148 +1,126 @@
brandRegistrations instead.";
+ return $this->v1->brandRegistrations;
+ }
/**
- * Construct the Messaging Domain
- *
- * @param \Twilio\Rest\Client $client Twilio\Rest\Client to communicate with
- * Twilio
- * @return \Twilio\Rest\Messaging Domain for Messaging
+ * @deprecated
+ * @param string $sid The SID that identifies the resource to fetch
*/
- public function __construct(Client $client)
- {
- parent::__construct($client);
+ protected function contextBrandRegistrations(string $sid): \Twilio\Rest\Messaging\V1\BrandRegistrationContext {
+ echo "brandRegistrations(\$sid) is deprecated. Use v1->brandRegistrations(\$sid) instead.";
+ return $this->v1->brandRegistrations($sid);
+ }
- $this->baseUrl = 'https://messaging.twilio.com';
+ /**
+ * @deprecated
+ */
+ protected function getDeactivations(): \Twilio\Rest\Messaging\V1\DeactivationsList {
+ echo "deactivations is deprecated. Use v1->deactivations instead.";
+ return $this->v1->deactivations;
}
/**
- * @return \Twilio\Rest\Messaging\V1 Version v1 of messaging
+ * @deprecated Use v1->deactivations() instead.
*/
- protected function getV1()
- {
- if (!$this->_v1) {
- $this->_v1 = new V1($this);
- }
- return $this->_v1;
+ protected function contextDeactivations(): \Twilio\Rest\Messaging\V1\DeactivationsContext {
+ echo "deactivations() is deprecated. Use v1->deactivations() instead.";
+ return $this->v1->deactivations();
}
/**
- * Magic getter to lazy load version
- *
- * @param string $name Version to return
- * @return \Twilio\Version The requested version
- * @throws TwilioException For unknown versions
+ * @deprecated Use v1->domainCerts instead.
*/
- public function __get($name)
- {
- $method = 'get' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return $this->$method();
- }
-
- throw new TwilioException('Unknown version ' . $name);
+ protected function getDomainCerts(): \Twilio\Rest\Messaging\V1\DomainCertsList {
+ echo "domainCerts is deprecated. Use v1->domainCerts instead.";
+ return $this->v1->domainCerts;
}
/**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
+ * @deprecated Use v1->domainCerts(\$domainSid) instead.
+ * @param string $domainSid Unique string used to identify the domain that this
+ * certificate should be associated with.
*/
- public function __call($name, $arguments)
- {
- $method = 'context' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return \call_user_func_array(array($this, $method), $arguments);
- }
-
- throw new TwilioException('Unknown context ' . $name);
+ protected function contextDomainCerts(string $domainSid): \Twilio\Rest\Messaging\V1\DomainCertsContext {
+ echo "domainCerts(\$domainSid) is deprecated. Use v1->domainCerts(\$domainSid) instead.";
+ return $this->v1->domainCerts($domainSid);
}
/**
- * @return \Twilio\Rest\Messaging\V1\ServiceList
+ * @deprecated Use v1->domainConfig instead.
*/
- protected function getServices()
- {
- return $this->v1->services;
+ protected function getDomainConfig(): \Twilio\Rest\Messaging\V1\DomainConfigList {
+ echo "domainConfig is deprecated. Use v1->domainConfig instead.";
+ return $this->v1->domainConfig;
}
/**
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Messaging\V1\ServiceContext
+ * @deprecated Use v1->domainConfig(\$domainSid) instead.
+ * @param string $domainSid Unique string used to identify the domain that this
+ * config should be associated with.
*/
- protected function contextServices($sid)
- {
- return $this->v1->services($sid);
+ protected function contextDomainConfig(string $domainSid): \Twilio\Rest\Messaging\V1\DomainConfigContext {
+ echo "domainConfig(\$domainSid) is deprecated. Use v1->domainConfig(\$domainSid) instead.";
+ return $this->v1->domainConfig($domainSid);
+ }
+
+ /**
+ * @deprecated Use v1->externalCampaign instead.
+ */
+ protected function getExternalCampaign(): \Twilio\Rest\Messaging\V1\ExternalCampaignList {
+ echo "externalCampaign is deprecated. Use v1->externalCampaign instead.";
+ return $this->v1->externalCampaign;
}
/**
- * @return \Twilio\Rest\Messaging\V1\SessionList
+ * @deprecated Use v1->services instead.
*/
- protected function getSessions()
- {
- return $this->v1->sessions;
+ protected function getServices(): \Twilio\Rest\Messaging\V1\ServiceList {
+ echo "services is deprecated. Use v1->services instead.";
+ return $this->v1->services;
}
/**
+ * @deprecated Use v1->services(\$sid) instead.
* @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Messaging\V1\SessionContext
*/
- protected function contextSessions($sid)
- {
- return $this->v1->sessions($sid);
+ protected function contextServices(string $sid): \Twilio\Rest\Messaging\V1\ServiceContext {
+ echo "services(\$sid) is deprecated. Use v1->services(\$sid) instead.";
+ return $this->v1->services($sid);
}
/**
- * @return \Twilio\Rest\Messaging\V1\WebhookList
+ * @deprecated Use v1->tollfreeVerifications instead.
*/
- protected function getWebhooks()
- {
- return $this->v1->webhooks;
+ protected function getTollfreeVerifications(): \Twilio\Rest\Messaging\V1\TollfreeVerificationList {
+ echo "tollfreeVerifications is deprecated. Use v1->tollfreeVerifications instead.";
+ return $this->v1->tollfreeVerifications;
}
/**
- * @return \Twilio\Rest\Messaging\V1\WebhookContext
+ * @deprecated Use v1->tollfreeVerifications(\$sid) instead.
+ * @param string $sid Tollfree Verification Sid
*/
- protected function contextWebhooks()
- {
- return $this->v1->webhooks();
+ protected function contextTollfreeVerifications(string $sid): \Twilio\Rest\Messaging\V1\TollfreeVerificationContext {
+ echo "tollfreeVerifications(\$sid) is deprecated. Use v1->tollfreeVerifications(\$sid) instead.";
+ return $this->v1->tollfreeVerifications($sid);
}
/**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
+ * @deprecated Use v1->usecases instead.
*/
- public function __toString()
- {
- return '[Twilio.Messaging]';
+ protected function getUsecases(): \Twilio\Rest\Messaging\V1\UsecaseList {
+ echo "usecases is deprecated. Use v1->usecases instead.";
+ return $this->v1->usecases;
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1.php
index 4c985b2..757ac2a 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1.php
@@ -1,39 +1,74 @@
version = 'v1';
}
- /**
- * @return \Twilio\Rest\Messaging\V1\ServiceList
- */
- protected function getServices()
+ protected function getBrandRegistrations(): BrandRegistrationList
+ {
+ if (!$this->_brandRegistrations) {
+ $this->_brandRegistrations = new BrandRegistrationList($this);
+ }
+ return $this->_brandRegistrations;
+ }
+
+ protected function getDeactivations(): DeactivationsList
+ {
+ if (!$this->_deactivations) {
+ $this->_deactivations = new DeactivationsList($this);
+ }
+ return $this->_deactivations;
+ }
+
+ protected function getDomainCerts(): DomainCertsList
+ {
+ if (!$this->_domainCerts) {
+ $this->_domainCerts = new DomainCertsList($this);
+ }
+ return $this->_domainCerts;
+ }
+
+ protected function getDomainConfig(): DomainConfigList
+ {
+ if (!$this->_domainConfig) {
+ $this->_domainConfig = new DomainConfigList($this);
+ }
+ return $this->_domainConfig;
+ }
+
+ protected function getDomainConfigMessagingService(): DomainConfigMessagingServiceList
+ {
+ if (!$this->_domainConfigMessagingService) {
+ $this->_domainConfigMessagingService = new DomainConfigMessagingServiceList($this);
+ }
+ return $this->_domainConfigMessagingService;
+ }
+
+ protected function getExternalCampaign(): ExternalCampaignList
+ {
+ if (!$this->_externalCampaign) {
+ $this->_externalCampaign = new ExternalCampaignList($this);
+ }
+ return $this->_externalCampaign;
+ }
+
+ protected function getLinkshorteningMessagingService(): LinkshorteningMessagingServiceList
+ {
+ if (!$this->_linkshorteningMessagingService) {
+ $this->_linkshorteningMessagingService = new LinkshorteningMessagingServiceList($this);
+ }
+ return $this->_linkshorteningMessagingService;
+ }
+
+ protected function getLinkshorteningMessagingServiceDomainAssociation(): LinkshorteningMessagingServiceDomainAssociationList
+ {
+ if (!$this->_linkshorteningMessagingServiceDomainAssociation) {
+ $this->_linkshorteningMessagingServiceDomainAssociation = new LinkshorteningMessagingServiceDomainAssociationList($this);
+ }
+ return $this->_linkshorteningMessagingServiceDomainAssociation;
+ }
+
+ protected function getRequestManagedCert(): RequestManagedCertList
+ {
+ if (!$this->_requestManagedCert) {
+ $this->_requestManagedCert = new RequestManagedCertList($this);
+ }
+ return $this->_requestManagedCert;
+ }
+
+ protected function getServices(): ServiceList
{
if (!$this->_services) {
$this->_services = new ServiceList($this);
@@ -52,26 +156,20 @@ protected function getServices()
return $this->_services;
}
- /**
- * @return \Twilio\Rest\Messaging\V1\SessionList
- */
- protected function getSessions()
+ protected function getTollfreeVerifications(): TollfreeVerificationList
{
- if (!$this->_sessions) {
- $this->_sessions = new SessionList($this);
+ if (!$this->_tollfreeVerifications) {
+ $this->_tollfreeVerifications = new TollfreeVerificationList($this);
}
- return $this->_sessions;
+ return $this->_tollfreeVerifications;
}
- /**
- * @return \Twilio\Rest\Messaging\V1\WebhookList
- */
- protected function getWebhooks()
+ protected function getUsecases(): UsecaseList
{
- if (!$this->_webhooks) {
- $this->_webhooks = new WebhookList($this);
+ if (!$this->_usecases) {
+ $this->_usecases = new UsecaseList($this);
}
- return $this->_webhooks;
+ return $this->_usecases;
}
/**
@@ -81,7 +179,7 @@ protected function getWebhooks()
* @return \Twilio\ListResource The requested resource
* @throws TwilioException For unknown resource
*/
- public function __get($name)
+ public function __get(string $name)
{
$method = 'get' . \ucfirst($name);
if (\method_exists($this, $method)) {
@@ -96,10 +194,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -114,8 +212,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Messaging.V1]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/AlphaSenderContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/AlphaSenderContext.php
index 6b4e784..bab8c1a 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/AlphaSenderContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/AlphaSenderContext.php
@@ -2,57 +2,81 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Messaging\V1\Service;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
class AlphaSenderContext extends InstanceContext
-{
+ {
/**
* Initialize the AlphaSenderContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Messaging Service to fetch the
- * resource from
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Messaging\V1\Service\AlphaSenderContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the resource under.
+ * @param string $sid The SID of the AlphaSender resource to delete.
*/
- public function __construct(Version $version, $serviceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/AlphaSenders/' . \rawurlencode($sid)
+ .'';
+ }
+
+ /**
+ * Delete the AlphaSenderInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/AlphaSenders/' . \rawurlencode($sid) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a AlphaSenderInstance
+ * Fetch the AlphaSenderInstance
*
* @return AlphaSenderInstance Fetched AlphaSenderInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): AlphaSenderInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new AlphaSenderInstance(
$this->version,
@@ -62,28 +86,18 @@ public function fetch()
);
}
- /**
- * Deletes the AlphaSenderInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Messaging.V1.AlphaSenderContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/AlphaSenderInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/AlphaSenderInstance.php
index 7283661..5a11b1c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/AlphaSenderInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/AlphaSenderInstance.php
@@ -2,49 +2,54 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Messaging\V1\Service;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property string $sid
- * @property string $accountSid
- * @property string $serviceSid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $alphaSender
- * @property array $capabilities
- * @property string $url
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $alphaSender
+ * @property string[]|null $capabilities
+ * @property string|null $url
*/
class AlphaSenderInstance extends InstanceResource
{
/**
* Initialize the AlphaSenderInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Messaging\V1\Service\AlphaSenderInstance
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the resource under.
+ * @param string $sid The SID of the AlphaSender resource to delete.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
@@ -53,20 +58,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $sid
'alphaSender' => Values::array_get($payload, 'alpha_sender'),
'capabilities' => Values::array_get($payload, 'capabilities'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Messaging\V1\Service\AlphaSenderContext Context for
- * this
- * AlphaSenderInstance
+ * @return AlphaSenderContext Context for this AlphaSenderInstance
*/
- protected function proxy()
+ protected function proxy(): AlphaSenderContext
{
if (!$this->context) {
$this->context = new AlphaSenderContext(
@@ -80,25 +83,27 @@ protected function proxy()
}
/**
- * Fetch a AlphaSenderInstance
+ * Delete the AlphaSenderInstance
*
- * @return AlphaSenderInstance Fetched AlphaSenderInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the AlphaSenderInstance
+ * Fetch the AlphaSenderInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return AlphaSenderInstance Fetched AlphaSenderInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): AlphaSenderInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -108,7 +113,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -127,12 +132,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Messaging.V1.AlphaSenderInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/AlphaSenderList.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/AlphaSenderList.php
index ec757e4..948c397 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/AlphaSenderList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/AlphaSenderList.php
@@ -2,60 +2,96 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Messaging\V1\Service;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
+
class AlphaSenderList extends ListResource
-{
+ {
/**
* Construct the AlphaSenderList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @return \Twilio\Rest\Messaging\V1\Service\AlphaSenderList
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the resource under.
*/
- public function __construct(Version $version, $serviceSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/AlphaSenders';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/AlphaSenders';
}
/**
- * Create a new AlphaSenderInstance
+ * Create the AlphaSenderInstance
*
- * @param string $alphaSender The Alphanumeric Sender ID string
- * @return AlphaSenderInstance Newly created AlphaSenderInstance
+ * @param string $alphaSender The Alphanumeric Sender ID string. Can be up to 11 characters long. Valid characters are A-Z, a-z, 0-9, space, hyphen `-`, plus `+`, underscore `_` and ampersand `&`. This value cannot contain only numbers.
+ * @return AlphaSenderInstance Created AlphaSenderInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($alphaSender)
+ public function create(string $alphaSender): AlphaSenderInstance
{
- $data = Values::of(array('AlphaSender' => $alphaSender,));
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'AlphaSender' =>
+ $alphaSender,
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new AlphaSenderInstance(
+ $this->version,
+ $payload,
+ $this->solution['serviceSid']
);
+ }
+
- return new AlphaSenderInstance($this->version, $payload, $this->solution['serviceSid']);
+ /**
+ * Reads AlphaSenderInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return AlphaSenderInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -74,9 +110,9 @@ public function create($alphaSender)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -85,26 +121,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads AlphaSenderInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return AlphaSenderInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of AlphaSenderInstance records from the API.
* Request is executed immediately
@@ -112,21 +128,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of AlphaSenderInstance
+ * @return AlphaSenderPage Page of AlphaSenderInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): AlphaSenderPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new AlphaSenderPage($this->version, $response, $this->solution);
}
@@ -136,9 +153,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of AlphaSenderInstance
+ * @return AlphaSenderPage Page of AlphaSenderInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): AlphaSenderPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -148,15 +165,22 @@ public function getPage($targetUrl)
return new AlphaSenderPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a AlphaSenderContext
*
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Messaging\V1\Service\AlphaSenderContext
+ * @param string $sid The SID of the AlphaSender resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): AlphaSenderContext
{
- return new AlphaSenderContext($this->version, $this->solution['serviceSid'], $sid);
+ return new AlphaSenderContext(
+ $this->version,
+ $this->solution['serviceSid'],
+ $sid
+ );
}
/**
@@ -164,8 +188,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Messaging.V1.AlphaSenderList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/AlphaSenderPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/AlphaSenderPage.php
index 9d76c83..a74fc77 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/AlphaSenderPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/AlphaSenderPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return AlphaSenderInstance \Twilio\Rest\Messaging\V1\Service\AlphaSenderInstance
+ */
+ public function buildInstance(array $payload): AlphaSenderInstance
{
return new AlphaSenderInstance($this->version, $payload, $this->solution['serviceSid']);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Messaging.V1.AlphaSenderPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/PhoneNumberContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/PhoneNumberContext.php
index 97f3838..d3e3a2a 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/PhoneNumberContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/PhoneNumberContext.php
@@ -2,67 +2,81 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Messaging\V1\Service;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
class PhoneNumberContext extends InstanceContext
-{
+ {
/**
* Initialize the PhoneNumberContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the resource from
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Messaging\V1\Service\PhoneNumberContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the resource under.
+ * @param string $sid The SID of the PhoneNumber resource to delete.
*/
- public function __construct(Version $version, $serviceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/PhoneNumbers/' . \rawurlencode($sid) . '';
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/PhoneNumbers/' . \rawurlencode($sid)
+ .'';
}
/**
- * Deletes the PhoneNumberInstance
+ * Delete the PhoneNumberInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function delete(): bool
{
- return $this->version->delete('delete', $this->uri);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a PhoneNumberInstance
+ * Fetch the PhoneNumberInstance
*
* @return PhoneNumberInstance Fetched PhoneNumberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): PhoneNumberInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new PhoneNumberInstance(
$this->version,
@@ -72,17 +86,18 @@ public function fetch()
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Messaging.V1.PhoneNumberContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/PhoneNumberInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/PhoneNumberInstance.php
index 1dcab9b..d0d642c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/PhoneNumberInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/PhoneNumberInstance.php
@@ -2,50 +2,55 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Messaging\V1\Service;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property string $sid
- * @property string $accountSid
- * @property string $serviceSid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $phoneNumber
- * @property string $countryCode
- * @property string $capabilities
- * @property string $url
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $phoneNumber
+ * @property string|null $countryCode
+ * @property string[]|null $capabilities
+ * @property string|null $url
*/
class PhoneNumberInstance extends InstanceResource
{
/**
* Initialize the PhoneNumberInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Messaging\V1\Service\PhoneNumberInstance
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the resource under.
+ * @param string $sid The SID of the PhoneNumber resource to delete.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
@@ -55,20 +60,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $sid
'countryCode' => Values::array_get($payload, 'country_code'),
'capabilities' => Values::array_get($payload, 'capabilities'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Messaging\V1\Service\PhoneNumberContext Context for
- * this
- * PhoneNumberInstance
+ * @return PhoneNumberContext Context for this PhoneNumberInstance
*/
- protected function proxy()
+ protected function proxy(): PhoneNumberContext
{
if (!$this->context) {
$this->context = new PhoneNumberContext(
@@ -82,24 +85,26 @@ protected function proxy()
}
/**
- * Deletes the PhoneNumberInstance
+ * Delete the PhoneNumberInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function delete(): bool
{
+
return $this->proxy()->delete();
}
/**
- * Fetch a PhoneNumberInstance
+ * Fetch the PhoneNumberInstance
*
* @return PhoneNumberInstance Fetched PhoneNumberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): PhoneNumberInstance
{
+
return $this->proxy()->fetch();
}
@@ -110,7 +115,7 @@ public function fetch()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -129,12 +134,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Messaging.V1.PhoneNumberInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/PhoneNumberList.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/PhoneNumberList.php
index 3ee6bd1..802e5b7 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/PhoneNumberList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/PhoneNumberList.php
@@ -2,61 +2,96 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Messaging\V1\Service;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
+
class PhoneNumberList extends ListResource
-{
+ {
/**
* Construct the PhoneNumberList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @return \Twilio\Rest\Messaging\V1\Service\PhoneNumberList
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the resource under.
*/
- public function __construct(Version $version, $serviceSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/PhoneNumbers';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/PhoneNumbers';
}
/**
- * Create a new PhoneNumberInstance
+ * Create the PhoneNumberInstance
*
- * @param string $phoneNumberSid The SID of the Phone Number being added to the
- * Service
- * @return PhoneNumberInstance Newly created PhoneNumberInstance
+ * @param string $phoneNumberSid The SID of the Phone Number being added to the Service.
+ * @return PhoneNumberInstance Created PhoneNumberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($phoneNumberSid)
+ public function create(string $phoneNumberSid): PhoneNumberInstance
{
- $data = Values::of(array('PhoneNumberSid' => $phoneNumberSid,));
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'PhoneNumberSid' =>
+ $phoneNumberSid,
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new PhoneNumberInstance(
+ $this->version,
+ $payload,
+ $this->solution['serviceSid']
);
+ }
+
- return new PhoneNumberInstance($this->version, $payload, $this->solution['serviceSid']);
+ /**
+ * Reads PhoneNumberInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return PhoneNumberInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -75,9 +110,9 @@ public function create($phoneNumberSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -86,26 +121,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads PhoneNumberInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return PhoneNumberInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of PhoneNumberInstance records from the API.
* Request is executed immediately
@@ -113,21 +128,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of PhoneNumberInstance
+ * @return PhoneNumberPage Page of PhoneNumberInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): PhoneNumberPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new PhoneNumberPage($this->version, $response, $this->solution);
}
@@ -137,9 +153,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of PhoneNumberInstance
+ * @return PhoneNumberPage Page of PhoneNumberInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): PhoneNumberPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -149,15 +165,22 @@ public function getPage($targetUrl)
return new PhoneNumberPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a PhoneNumberContext
*
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Messaging\V1\Service\PhoneNumberContext
+ * @param string $sid The SID of the PhoneNumber resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): PhoneNumberContext
{
- return new PhoneNumberContext($this->version, $this->solution['serviceSid'], $sid);
+ return new PhoneNumberContext(
+ $this->version,
+ $this->solution['serviceSid'],
+ $sid
+ );
}
/**
@@ -165,8 +188,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Messaging.V1.PhoneNumberList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/PhoneNumberPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/PhoneNumberPage.php
index e394875..d916819 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/PhoneNumberPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/PhoneNumberPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return PhoneNumberInstance \Twilio\Rest\Messaging\V1\Service\PhoneNumberInstance
+ */
+ public function buildInstance(array $payload): PhoneNumberInstance
{
return new PhoneNumberInstance($this->version, $payload, $this->solution['serviceSid']);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Messaging.V1.PhoneNumberPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/ShortCodeContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/ShortCodeContext.php
index c0b125b..ffbb73e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/ShortCodeContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/ShortCodeContext.php
@@ -2,67 +2,81 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Messaging\V1\Service;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
class ShortCodeContext extends InstanceContext
-{
+ {
/**
* Initialize the ShortCodeContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the resource from
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Messaging\V1\Service\ShortCodeContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the resource under.
+ * @param string $sid The SID of the ShortCode resource to delete.
*/
- public function __construct(Version $version, $serviceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/ShortCodes/' . \rawurlencode($sid) . '';
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/ShortCodes/' . \rawurlencode($sid)
+ .'';
}
/**
- * Deletes the ShortCodeInstance
+ * Delete the ShortCodeInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function delete(): bool
{
- return $this->version->delete('delete', $this->uri);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a ShortCodeInstance
+ * Fetch the ShortCodeInstance
*
* @return ShortCodeInstance Fetched ShortCodeInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): ShortCodeInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new ShortCodeInstance(
$this->version,
@@ -72,17 +86,18 @@ public function fetch()
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Messaging.V1.ShortCodeContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/ShortCodeInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/ShortCodeInstance.php
index 0ccc3d4..bd96cce 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/ShortCodeInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/ShortCodeInstance.php
@@ -2,50 +2,55 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Messaging\V1\Service;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property string $sid
- * @property string $accountSid
- * @property string $serviceSid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $shortCode
- * @property string $countryCode
- * @property string $capabilities
- * @property string $url
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $shortCode
+ * @property string|null $countryCode
+ * @property string[]|null $capabilities
+ * @property string|null $url
*/
class ShortCodeInstance extends InstanceResource
{
/**
* Initialize the ShortCodeInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Messaging\V1\Service\ShortCodeInstance
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the resource under.
+ * @param string $sid The SID of the ShortCode resource to delete.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
@@ -55,19 +60,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $sid
'countryCode' => Values::array_get($payload, 'country_code'),
'capabilities' => Values::array_get($payload, 'capabilities'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Messaging\V1\Service\ShortCodeContext Context for this
- * ShortCodeInstance
+ * @return ShortCodeContext Context for this ShortCodeInstance
*/
- protected function proxy()
+ protected function proxy(): ShortCodeContext
{
if (!$this->context) {
$this->context = new ShortCodeContext(
@@ -81,24 +85,26 @@ protected function proxy()
}
/**
- * Deletes the ShortCodeInstance
+ * Delete the ShortCodeInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function delete(): bool
{
+
return $this->proxy()->delete();
}
/**
- * Fetch a ShortCodeInstance
+ * Fetch the ShortCodeInstance
*
* @return ShortCodeInstance Fetched ShortCodeInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): ShortCodeInstance
{
+
return $this->proxy()->fetch();
}
@@ -109,7 +115,7 @@ public function fetch()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -128,12 +134,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Messaging.V1.ShortCodeInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/ShortCodeList.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/ShortCodeList.php
index 70ffea1..c1dec2f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/ShortCodeList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/ShortCodeList.php
@@ -2,61 +2,96 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Messaging\V1\Service;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
+
class ShortCodeList extends ListResource
-{
+ {
/**
* Construct the ShortCodeList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @return \Twilio\Rest\Messaging\V1\Service\ShortCodeList
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/chat/rest/service-resource) to create the resource under.
*/
- public function __construct(Version $version, $serviceSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/ShortCodes';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/ShortCodes';
}
/**
- * Create a new ShortCodeInstance
+ * Create the ShortCodeInstance
*
- * @param string $shortCodeSid The SID of the ShortCode being added to the
- * Service
- * @return ShortCodeInstance Newly created ShortCodeInstance
+ * @param string $shortCodeSid The SID of the ShortCode resource being added to the Service.
+ * @return ShortCodeInstance Created ShortCodeInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($shortCodeSid)
+ public function create(string $shortCodeSid): ShortCodeInstance
{
- $data = Values::of(array('ShortCodeSid' => $shortCodeSid,));
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'ShortCodeSid' =>
+ $shortCodeSid,
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new ShortCodeInstance(
+ $this->version,
+ $payload,
+ $this->solution['serviceSid']
);
+ }
+
- return new ShortCodeInstance($this->version, $payload, $this->solution['serviceSid']);
+ /**
+ * Reads ShortCodeInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return ShortCodeInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -75,9 +110,9 @@ public function create($shortCodeSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -86,26 +121,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads ShortCodeInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return ShortCodeInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of ShortCodeInstance records from the API.
* Request is executed immediately
@@ -113,21 +128,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of ShortCodeInstance
+ * @return ShortCodePage Page of ShortCodeInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): ShortCodePage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new ShortCodePage($this->version, $response, $this->solution);
}
@@ -137,9 +153,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of ShortCodeInstance
+ * @return ShortCodePage Page of ShortCodeInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): ShortCodePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -149,15 +165,22 @@ public function getPage($targetUrl)
return new ShortCodePage($this->version, $response, $this->solution);
}
+
/**
* Constructs a ShortCodeContext
*
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Messaging\V1\Service\ShortCodeContext
+ * @param string $sid The SID of the ShortCode resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): ShortCodeContext
{
- return new ShortCodeContext($this->version, $this->solution['serviceSid'], $sid);
+ return new ShortCodeContext(
+ $this->version,
+ $this->solution['serviceSid'],
+ $sid
+ );
}
/**
@@ -165,8 +188,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Messaging.V1.ShortCodeList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/ShortCodePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/ShortCodePage.php
index 15f6e8f..2b67551 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/ShortCodePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Service/ShortCodePage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return ShortCodeInstance \Twilio\Rest\Messaging\V1\Service\ShortCodeInstance
+ */
+ public function buildInstance(array $payload): ShortCodeInstance
{
return new ShortCodeInstance($this->version, $payload, $this->solution['serviceSid']);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Messaging.V1.ShortCodePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/ServiceContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/ServiceContext.php
index d826f06..d7ea84d 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/ServiceContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/ServiceContext.php
@@ -2,174 +2,270 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Messaging\V1;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
+use Twilio\Values;
+use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
use Twilio\Rest\Messaging\V1\Service\AlphaSenderList;
use Twilio\Rest\Messaging\V1\Service\PhoneNumberList;
+use Twilio\Rest\Messaging\V1\Service\UsAppToPersonUsecaseList;
+use Twilio\Rest\Messaging\V1\Service\ChannelSenderList;
use Twilio\Rest\Messaging\V1\Service\ShortCodeList;
-use Twilio\Serialize;
-use Twilio\Values;
-use Twilio\Version;
+use Twilio\Rest\Messaging\V1\Service\UsAppToPersonList;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property \Twilio\Rest\Messaging\V1\Service\PhoneNumberList $phoneNumbers
- * @property \Twilio\Rest\Messaging\V1\Service\ShortCodeList $shortCodes
- * @property \Twilio\Rest\Messaging\V1\Service\AlphaSenderList $alphaSenders
- * @method \Twilio\Rest\Messaging\V1\Service\PhoneNumberContext phoneNumbers(string $sid)
+ * @property AlphaSenderList $alphaSenders
+ * @property PhoneNumberList $phoneNumbers
+ * @property UsAppToPersonUsecaseList $usAppToPersonUsecases
+ * @property ChannelSenderList $channelSenders
+ * @property ShortCodeList $shortCodes
+ * @property UsAppToPersonList $usAppToPerson
* @method \Twilio\Rest\Messaging\V1\Service\ShortCodeContext shortCodes(string $sid)
+ * @method \Twilio\Rest\Messaging\V1\Service\UsAppToPersonContext usAppToPerson(string $sid)
+ * @method \Twilio\Rest\Messaging\V1\Service\PhoneNumberContext phoneNumbers(string $sid)
* @method \Twilio\Rest\Messaging\V1\Service\AlphaSenderContext alphaSenders(string $sid)
+ * @method \Twilio\Rest\Messaging\V1\Service\ChannelSenderContext channelSenders(string $sid)
*/
class ServiceContext extends InstanceContext
-{
- protected $_phoneNumbers = null;
- protected $_shortCodes = null;
- protected $_alphaSenders = null;
+ {
+ protected $_alphaSenders;
+ protected $_phoneNumbers;
+ protected $_usAppToPersonUsecases;
+ protected $_channelSenders;
+ protected $_shortCodes;
+ protected $_usAppToPerson;
/**
* Initialize the ServiceContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Messaging\V1\ServiceContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid The SID of the Service resource to delete.
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Services/' . \rawurlencode($sid) . '';
+ $this->uri = '/Services/' . \rawurlencode($sid)
+ .'';
}
/**
- * Update the ServiceInstance
+ * Delete the ServiceInstance
*
- * @param array|Options $options Optional Arguments
- * @return ServiceInstance Updated ServiceInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function delete(): bool
{
- $options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'InboundRequestUrl' => $options['inboundRequestUrl'],
- 'InboundMethod' => $options['inboundMethod'],
- 'FallbackUrl' => $options['fallbackUrl'],
- 'FallbackMethod' => $options['fallbackMethod'],
- 'StatusCallback' => $options['statusCallback'],
- 'StickySender' => Serialize::booleanToString($options['stickySender']),
- 'MmsConverter' => Serialize::booleanToString($options['mmsConverter']),
- 'SmartEncoding' => Serialize::booleanToString($options['smartEncoding']),
- 'ScanMessageContent' => $options['scanMessageContent'],
- 'FallbackToLongCode' => Serialize::booleanToString($options['fallbackToLongCode']),
- 'AreaCodeGeomatch' => Serialize::booleanToString($options['areaCodeGeomatch']),
- 'ValidityPeriod' => $options['validityPeriod'],
- 'SynchronousValidation' => Serialize::booleanToString($options['synchronousValidation']),
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new ServiceInstance($this->version, $payload, $this->solution['sid']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a ServiceInstance
+ * Fetch the ServiceInstance
*
* @return ServiceInstance Fetched ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): ServiceInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
- return new ServiceInstance($this->version, $payload, $this->solution['sid']);
+ return new ServiceInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
- * Deletes the ServiceInstance
+ * Update the ServiceInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return ServiceInstance Updated ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): ServiceInstance
{
- return $this->version->delete('delete', $this->uri);
+
+ $options = new Values($options);
+
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'InboundRequestUrl' =>
+ $options['inboundRequestUrl'],
+ 'InboundMethod' =>
+ $options['inboundMethod'],
+ 'FallbackUrl' =>
+ $options['fallbackUrl'],
+ 'FallbackMethod' =>
+ $options['fallbackMethod'],
+ 'StatusCallback' =>
+ $options['statusCallback'],
+ 'StickySender' =>
+ Serialize::booleanToString($options['stickySender']),
+ 'MmsConverter' =>
+ Serialize::booleanToString($options['mmsConverter']),
+ 'SmartEncoding' =>
+ Serialize::booleanToString($options['smartEncoding']),
+ 'ScanMessageContent' =>
+ $options['scanMessageContent'],
+ 'FallbackToLongCode' =>
+ Serialize::booleanToString($options['fallbackToLongCode']),
+ 'AreaCodeGeomatch' =>
+ Serialize::booleanToString($options['areaCodeGeomatch']),
+ 'ValidityPeriod' =>
+ $options['validityPeriod'],
+ 'SynchronousValidation' =>
+ Serialize::booleanToString($options['synchronousValidation']),
+ 'Usecase' =>
+ $options['usecase'],
+ 'UseInboundWebhookOnNumber' =>
+ Serialize::booleanToString($options['useInboundWebhookOnNumber']),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
+
+ return new ServiceInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
+ }
+
+
+ /**
+ * Access the alphaSenders
+ */
+ protected function getAlphaSenders(): AlphaSenderList
+ {
+ if (!$this->_alphaSenders) {
+ $this->_alphaSenders = new AlphaSenderList(
+ $this->version,
+ $this->solution['sid']
+ );
+ }
+
+ return $this->_alphaSenders;
}
/**
* Access the phoneNumbers
- *
- * @return \Twilio\Rest\Messaging\V1\Service\PhoneNumberList
*/
- protected function getPhoneNumbers()
+ protected function getPhoneNumbers(): PhoneNumberList
{
if (!$this->_phoneNumbers) {
- $this->_phoneNumbers = new PhoneNumberList($this->version, $this->solution['sid']);
+ $this->_phoneNumbers = new PhoneNumberList(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->_phoneNumbers;
}
+ /**
+ * Access the usAppToPersonUsecases
+ */
+ protected function getUsAppToPersonUsecases(): UsAppToPersonUsecaseList
+ {
+ if (!$this->_usAppToPersonUsecases) {
+ $this->_usAppToPersonUsecases = new UsAppToPersonUsecaseList(
+ $this->version,
+ $this->solution['sid']
+ );
+ }
+
+ return $this->_usAppToPersonUsecases;
+ }
+
+ /**
+ * Access the channelSenders
+ */
+ protected function getChannelSenders(): ChannelSenderList
+ {
+ if (!$this->_channelSenders) {
+ $this->_channelSenders = new ChannelSenderList(
+ $this->version,
+ $this->solution['sid']
+ );
+ }
+
+ return $this->_channelSenders;
+ }
+
/**
* Access the shortCodes
- *
- * @return \Twilio\Rest\Messaging\V1\Service\ShortCodeList
*/
- protected function getShortCodes()
+ protected function getShortCodes(): ShortCodeList
{
if (!$this->_shortCodes) {
- $this->_shortCodes = new ShortCodeList($this->version, $this->solution['sid']);
+ $this->_shortCodes = new ShortCodeList(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->_shortCodes;
}
/**
- * Access the alphaSenders
- *
- * @return \Twilio\Rest\Messaging\V1\Service\AlphaSenderList
+ * Access the usAppToPerson
*/
- protected function getAlphaSenders()
+ protected function getUsAppToPerson(): UsAppToPersonList
{
- if (!$this->_alphaSenders) {
- $this->_alphaSenders = new AlphaSenderList($this->version, $this->solution['sid']);
+ if (!$this->_usAppToPerson) {
+ $this->_usAppToPerson = new UsAppToPersonList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_alphaSenders;
+ return $this->_usAppToPerson;
}
/**
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -184,10 +280,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -202,12 +298,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Messaging.V1.ServiceContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/ServiceInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/ServiceInstance.php
index 27adbba..b6ad1f3 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/ServiceInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/ServiceInstance.php
@@ -2,64 +2,82 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Messaging\V1;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Messaging\V1\Service\AlphaSenderList;
+use Twilio\Rest\Messaging\V1\Service\PhoneNumberList;
+use Twilio\Rest\Messaging\V1\Service\UsAppToPersonUsecaseList;
+use Twilio\Rest\Messaging\V1\Service\ChannelSenderList;
+use Twilio\Rest\Messaging\V1\Service\ShortCodeList;
+use Twilio\Rest\Messaging\V1\Service\UsAppToPersonList;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property string $sid
- * @property string $accountSid
- * @property string $friendlyName
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $inboundRequestUrl
- * @property string $inboundMethod
- * @property string $fallbackUrl
- * @property string $fallbackMethod
- * @property string $statusCallback
- * @property bool $stickySender
- * @property bool $mmsConverter
- * @property bool $smartEncoding
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $friendlyName
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $inboundRequestUrl
+ * @property string|null $inboundMethod
+ * @property string|null $fallbackUrl
+ * @property string|null $fallbackMethod
+ * @property string|null $statusCallback
+ * @property bool|null $stickySender
+ * @property bool|null $mmsConverter
+ * @property bool|null $smartEncoding
* @property string $scanMessageContent
- * @property bool $fallbackToLongCode
- * @property bool $areaCodeGeomatch
- * @property bool $synchronousValidation
+ * @property bool|null $fallbackToLongCode
+ * @property bool|null $areaCodeGeomatch
+ * @property bool|null $synchronousValidation
* @property int $validityPeriod
- * @property string $url
- * @property array $links
+ * @property string|null $url
+ * @property array|null $links
+ * @property string|null $usecase
+ * @property bool|null $usAppToPersonRegistered
+ * @property bool|null $useInboundWebhookOnNumber
*/
class ServiceInstance extends InstanceResource
{
- protected $_phoneNumbers = null;
- protected $_shortCodes = null;
- protected $_alphaSenders = null;
+ protected $_alphaSenders;
+ protected $_phoneNumbers;
+ protected $_usAppToPersonUsecases;
+ protected $_channelSenders;
+ protected $_shortCodes;
+ protected $_usAppToPerson;
/**
* Initialize the ServiceInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Messaging\V1\ServiceInstance
+ * @param string $sid The SID of the Service resource to delete.
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
@@ -80,89 +98,115 @@ public function __construct(Version $version, array $payload, $sid = null)
'validityPeriod' => Values::array_get($payload, 'validity_period'),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ 'usecase' => Values::array_get($payload, 'usecase'),
+ 'usAppToPersonRegistered' => Values::array_get($payload, 'us_app_to_person_registered'),
+ 'useInboundWebhookOnNumber' => Values::array_get($payload, 'use_inbound_webhook_on_number'),
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Messaging\V1\ServiceContext Context for this
- * ServiceInstance
+ * @return ServiceContext Context for this ServiceInstance
*/
- protected function proxy()
+ protected function proxy(): ServiceContext
{
if (!$this->context) {
- $this->context = new ServiceContext($this->version, $this->solution['sid']);
+ $this->context = new ServiceContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Update the ServiceInstance
+ * Delete the ServiceInstance
*
- * @param array|Options $options Optional Arguments
- * @return ServiceInstance Updated ServiceInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function delete(): bool
{
- return $this->proxy()->update($options);
+
+ return $this->proxy()->delete();
}
/**
- * Fetch a ServiceInstance
+ * Fetch the ServiceInstance
*
* @return ServiceInstance Fetched ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): ServiceInstance
{
+
return $this->proxy()->fetch();
}
/**
- * Deletes the ServiceInstance
+ * Update the ServiceInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return ServiceInstance Updated ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): ServiceInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->update($options);
+ }
+
+ /**
+ * Access the alphaSenders
+ */
+ protected function getAlphaSenders(): AlphaSenderList
+ {
+ return $this->proxy()->alphaSenders;
}
/**
* Access the phoneNumbers
- *
- * @return \Twilio\Rest\Messaging\V1\Service\PhoneNumberList
*/
- protected function getPhoneNumbers()
+ protected function getPhoneNumbers(): PhoneNumberList
{
return $this->proxy()->phoneNumbers;
}
+ /**
+ * Access the usAppToPersonUsecases
+ */
+ protected function getUsAppToPersonUsecases(): UsAppToPersonUsecaseList
+ {
+ return $this->proxy()->usAppToPersonUsecases;
+ }
+
+ /**
+ * Access the channelSenders
+ */
+ protected function getChannelSenders(): ChannelSenderList
+ {
+ return $this->proxy()->channelSenders;
+ }
+
/**
* Access the shortCodes
- *
- * @return \Twilio\Rest\Messaging\V1\Service\ShortCodeList
*/
- protected function getShortCodes()
+ protected function getShortCodes(): ShortCodeList
{
return $this->proxy()->shortCodes;
}
/**
- * Access the alphaSenders
- *
- * @return \Twilio\Rest\Messaging\V1\Service\AlphaSenderList
+ * Access the usAppToPerson
*/
- protected function getAlphaSenders()
+ protected function getUsAppToPerson(): UsAppToPersonList
{
- return $this->proxy()->alphaSenders;
+ return $this->proxy()->usAppToPerson;
}
/**
@@ -172,7 +216,7 @@ protected function getAlphaSenders()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -191,12 +235,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Messaging.V1.ServiceInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/ServiceList.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/ServiceList.php
index 7dd5ebe..6c23983 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/ServiceList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/ServiceList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Messaging
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Messaging\V1;
@@ -12,68 +19,107 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
class ServiceList extends ListResource
-{
+ {
/**
* Construct the ServiceList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Messaging\V1\ServiceList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/Services';
}
/**
- * Create a new ServiceInstance
+ * Create the ServiceInstance
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
* @param array|Options $options Optional Arguments
- * @return ServiceInstance Newly created ServiceInstance
+ * @return ServiceInstance Created ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($friendlyName, $options = array())
+ public function create(string $friendlyName, array $options = []): ServiceInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $friendlyName,
- 'InboundRequestUrl' => $options['inboundRequestUrl'],
- 'InboundMethod' => $options['inboundMethod'],
- 'FallbackUrl' => $options['fallbackUrl'],
- 'FallbackMethod' => $options['fallbackMethod'],
- 'StatusCallback' => $options['statusCallback'],
- 'StickySender' => Serialize::booleanToString($options['stickySender']),
- 'MmsConverter' => Serialize::booleanToString($options['mmsConverter']),
- 'SmartEncoding' => Serialize::booleanToString($options['smartEncoding']),
- 'ScanMessageContent' => $options['scanMessageContent'],
- 'FallbackToLongCode' => Serialize::booleanToString($options['fallbackToLongCode']),
- 'AreaCodeGeomatch' => Serialize::booleanToString($options['areaCodeGeomatch']),
- 'ValidityPeriod' => $options['validityPeriod'],
- 'SynchronousValidation' => Serialize::booleanToString($options['synchronousValidation']),
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'FriendlyName' =>
+ $friendlyName,
+ 'InboundRequestUrl' =>
+ $options['inboundRequestUrl'],
+ 'InboundMethod' =>
+ $options['inboundMethod'],
+ 'FallbackUrl' =>
+ $options['fallbackUrl'],
+ 'FallbackMethod' =>
+ $options['fallbackMethod'],
+ 'StatusCallback' =>
+ $options['statusCallback'],
+ 'StickySender' =>
+ Serialize::booleanToString($options['stickySender']),
+ 'MmsConverter' =>
+ Serialize::booleanToString($options['mmsConverter']),
+ 'SmartEncoding' =>
+ Serialize::booleanToString($options['smartEncoding']),
+ 'ScanMessageContent' =>
+ $options['scanMessageContent'],
+ 'FallbackToLongCode' =>
+ Serialize::booleanToString($options['fallbackToLongCode']),
+ 'AreaCodeGeomatch' =>
+ Serialize::booleanToString($options['areaCodeGeomatch']),
+ 'ValidityPeriod' =>
+ $options['validityPeriod'],
+ 'SynchronousValidation' =>
+ Serialize::booleanToString($options['synchronousValidation']),
+ 'Usecase' =>
+ $options['usecase'],
+ 'UseInboundWebhookOnNumber' =>
+ Serialize::booleanToString($options['useInboundWebhookOnNumber']),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new ServiceInstance(
+ $this->version,
+ $payload
);
+ }
+
- return new ServiceInstance($this->version, $payload);
+ /**
+ * Reads ServiceInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return ServiceInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -92,9 +138,9 @@ public function create($friendlyName, $options = array())
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -103,26 +149,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads ServiceInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return ServiceInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of ServiceInstance records from the API.
* Request is executed immediately
@@ -130,21 +156,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of ServiceInstance
+ * @return ServicePage Page of ServiceInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): ServicePage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new ServicePage($this->version, $response, $this->solution);
}
@@ -154,9 +181,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of ServiceInstance
+ * @return ServicePage Page of ServiceInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): ServicePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -166,15 +193,21 @@ public function getPage($targetUrl)
return new ServicePage($this->version, $response, $this->solution);
}
+
/**
* Constructs a ServiceContext
*
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Messaging\V1\ServiceContext
+ * @param string $sid The SID of the Service resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): ServiceContext
{
- return new ServiceContext($this->version, $sid);
+ return new ServiceContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -182,8 +215,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Messaging.V1.ServiceList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/ServiceOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/ServiceOptions.php
index 95017bb..ca9c5e9 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/ServiceOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/ServiceOptions.php
@@ -1,10 +1,16 @@
options['inboundRequestUrl'] = $inboundRequestUrl;
$this->options['inboundMethod'] = $inboundMethod;
$this->options['fallbackUrl'] = $fallbackUrl;
@@ -132,17 +193,17 @@ public function __construct($inboundRequestUrl = Values::NONE, $inboundMethod =
$this->options['areaCodeGeomatch'] = $areaCodeGeomatch;
$this->options['validityPeriod'] = $validityPeriod;
$this->options['synchronousValidation'] = $synchronousValidation;
+ $this->options['usecase'] = $usecase;
+ $this->options['useInboundWebhookOnNumber'] = $useInboundWebhookOnNumber;
}
/**
- * The URL we should call using `inbound_method` when a message is received by any phone number or short code in the Service. When this property is `null`, receiving inbound messages is disabled.
+ * The URL we call using `inbound_method` when a message is received by any phone number or short code in the Service. When this property is `null`, receiving inbound messages is disabled. All messages sent to the Twilio phone number or short code will not be logged and received on the Account. If the `use_inbound_webhook_on_number` field is enabled then the webhook url defined on the phone number will override the `inbound_request_url` defined for the Messaging Service.
*
- * @param string $inboundRequestUrl The URL we call using inbound_method when a
- * message is received by any phone number or
- * short code in the Service
+ * @param string $inboundRequestUrl The URL we call using `inbound_method` when a message is received by any phone number or short code in the Service. When this property is `null`, receiving inbound messages is disabled. All messages sent to the Twilio phone number or short code will not be logged and received on the Account. If the `use_inbound_webhook_on_number` field is enabled then the webhook url defined on the phone number will override the `inbound_request_url` defined for the Messaging Service.
* @return $this Fluent Builder
*/
- public function setInboundRequestUrl($inboundRequestUrl)
+ public function setInboundRequestUrl(string $inboundRequestUrl): self
{
$this->options['inboundRequestUrl'] = $inboundRequestUrl;
return $this;
@@ -151,25 +212,22 @@ public function setInboundRequestUrl($inboundRequestUrl)
/**
* The HTTP method we should use to call `inbound_request_url`. Can be `GET` or `POST` and the default is `POST`.
*
- * @param string $inboundMethod The HTTP method we should use to call
- * inbound_request_url
+ * @param string $inboundMethod The HTTP method we should use to call `inbound_request_url`. Can be `GET` or `POST` and the default is `POST`.
* @return $this Fluent Builder
*/
- public function setInboundMethod($inboundMethod)
+ public function setInboundMethod(string $inboundMethod): self
{
$this->options['inboundMethod'] = $inboundMethod;
return $this;
}
/**
- * The URL that we should call using `fallback_method` if an error occurs while retrieving or executing the TwiML from the Inbound Request URL.
+ * The URL that we call using `fallback_method` if an error occurs while retrieving or executing the TwiML from the Inbound Request URL. If the `use_inbound_webhook_on_number` field is enabled then the webhook url defined on the phone number will override the `fallback_url` defined for the Messaging Service.
*
- * @param string $fallbackUrl The URL that we call using fallback_method if an
- * error occurs while retrieving or executing the
- * TwiML from the Inbound Request URL
+ * @param string $fallbackUrl The URL that we call using `fallback_method` if an error occurs while retrieving or executing the TwiML from the Inbound Request URL. If the `use_inbound_webhook_on_number` field is enabled then the webhook url defined on the phone number will override the `fallback_url` defined for the Messaging Service.
* @return $this Fluent Builder
*/
- public function setFallbackUrl($fallbackUrl)
+ public function setFallbackUrl(string $fallbackUrl): self
{
$this->options['fallbackUrl'] = $fallbackUrl;
return $this;
@@ -178,11 +236,10 @@ public function setFallbackUrl($fallbackUrl)
/**
* The HTTP method we should use to call `fallback_url`. Can be: `GET` or `POST`.
*
- * @param string $fallbackMethod The HTTP method we should use to call
- * fallback_url
+ * @param string $fallbackMethod The HTTP method we should use to call `fallback_url`. Can be: `GET` or `POST`.
* @return $this Fluent Builder
*/
- public function setFallbackMethod($fallbackMethod)
+ public function setFallbackMethod(string $fallbackMethod): self
{
$this->options['fallbackMethod'] = $fallbackMethod;
return $this;
@@ -191,88 +248,80 @@ public function setFallbackMethod($fallbackMethod)
/**
* The URL we should call to [pass status updates](https://www.twilio.com/docs/sms/api/message-resource#message-status-values) about message delivery.
*
- * @param string $statusCallback The URL we should call to pass status updates
- * about message delivery
+ * @param string $statusCallback The URL we should call to [pass status updates](https://www.twilio.com/docs/sms/api/message-resource#message-status-values) about message delivery.
* @return $this Fluent Builder
*/
- public function setStatusCallback($statusCallback)
+ public function setStatusCallback(string $statusCallback): self
{
$this->options['statusCallback'] = $statusCallback;
return $this;
}
/**
- * Whether to enable [Sticky Sender](https://www.twilio.com/docs/sms/services#sticky-sender) on the Service instance.
+ * Whether to enable [Sticky Sender](https://www.twilio.com/docs/messaging/services#sticky-sender) on the Service instance.
*
- * @param bool $stickySender Whether to enable Sticky Sender on the Service
- * instance
+ * @param bool $stickySender Whether to enable [Sticky Sender](https://www.twilio.com/docs/messaging/services#sticky-sender) on the Service instance.
* @return $this Fluent Builder
*/
- public function setStickySender($stickySender)
+ public function setStickySender(bool $stickySender): self
{
$this->options['stickySender'] = $stickySender;
return $this;
}
/**
- * Whether to enable the [MMS Converter](https://www.twilio.com/docs/sms/services#mms-converter) for messages sent through the Service instance.
+ * Whether to enable the [MMS Converter](https://www.twilio.com/docs/messaging/services#mms-converter) for messages sent through the Service instance.
*
- * @param bool $mmsConverter Whether to enable the MMS Converter for messages
- * sent through the Service instance
+ * @param bool $mmsConverter Whether to enable the [MMS Converter](https://www.twilio.com/docs/messaging/services#mms-converter) for messages sent through the Service instance.
* @return $this Fluent Builder
*/
- public function setMmsConverter($mmsConverter)
+ public function setMmsConverter(bool $mmsConverter): self
{
$this->options['mmsConverter'] = $mmsConverter;
return $this;
}
/**
- * Whether to enable [Smart Encoding](https://www.twilio.com/docs/sms/services#smart-encoding) for messages sent through the Service instance.
+ * Whether to enable [Smart Encoding](https://www.twilio.com/docs/messaging/services#smart-encoding) for messages sent through the Service instance.
*
- * @param bool $smartEncoding Whether to enable Encoding for messages sent
- * through the Service instance
+ * @param bool $smartEncoding Whether to enable [Smart Encoding](https://www.twilio.com/docs/messaging/services#smart-encoding) for messages sent through the Service instance.
* @return $this Fluent Builder
*/
- public function setSmartEncoding($smartEncoding)
+ public function setSmartEncoding(bool $smartEncoding): self
{
$this->options['smartEncoding'] = $smartEncoding;
return $this;
}
/**
- * Reserved.
- *
- * @param string $scanMessageContent Reserved
+ * @param string $scanMessageContent
* @return $this Fluent Builder
*/
- public function setScanMessageContent($scanMessageContent)
+ public function setScanMessageContent(string $scanMessageContent): self
{
$this->options['scanMessageContent'] = $scanMessageContent;
return $this;
}
/**
- * Whether to enable [Fallback to Long Code](https://www.twilio.com/docs/sms/services#fallback-to-long-code) for messages sent through the Service instance.
+ * [OBSOLETE] Former feature used to fallback to long code sender after certain short code message failures.
*
- * @param bool $fallbackToLongCode Whether to enable Fallback to Long Code for
- * messages sent through the Service instance
+ * @param bool $fallbackToLongCode [OBSOLETE] Former feature used to fallback to long code sender after certain short code message failures.
* @return $this Fluent Builder
*/
- public function setFallbackToLongCode($fallbackToLongCode)
+ public function setFallbackToLongCode(bool $fallbackToLongCode): self
{
$this->options['fallbackToLongCode'] = $fallbackToLongCode;
return $this;
}
/**
- * Whether to enable [Area Code Geomatch](https://www.twilio.com/docs/sms/services#area-code-geomatch) on the Service Instance.
+ * Whether to enable [Area Code Geomatch](https://www.twilio.com/docs/messaging/services#area-code-geomatch) on the Service Instance.
*
- * @param bool $areaCodeGeomatch Whether to enable Area Code Geomatch on the
- * Service Instance
+ * @param bool $areaCodeGeomatch Whether to enable [Area Code Geomatch](https://www.twilio.com/docs/messaging/services#area-code-geomatch) on the Service Instance.
* @return $this Fluent Builder
*/
- public function setAreaCodeGeomatch($areaCodeGeomatch)
+ public function setAreaCodeGeomatch(bool $areaCodeGeomatch): self
{
$this->options['areaCodeGeomatch'] = $areaCodeGeomatch;
return $this;
@@ -281,11 +330,10 @@ public function setAreaCodeGeomatch($areaCodeGeomatch)
/**
* How long, in seconds, messages sent from the Service are valid. Can be an integer from `1` to `14,400`.
*
- * @param int $validityPeriod How long, in seconds, messages sent from the
- * Service are valid
+ * @param int $validityPeriod How long, in seconds, messages sent from the Service are valid. Can be an integer from `1` to `14,400`.
* @return $this Fluent Builder
*/
- public function setValidityPeriod($validityPeriod)
+ public function setValidityPeriod(int $validityPeriod): self
{
$this->options['validityPeriod'] = $validityPeriod;
return $this;
@@ -294,65 +342,94 @@ public function setValidityPeriod($validityPeriod)
/**
* Reserved.
*
- * @param bool $synchronousValidation Reserved
+ * @param bool $synchronousValidation Reserved.
* @return $this Fluent Builder
*/
- public function setSynchronousValidation($synchronousValidation)
+ public function setSynchronousValidation(bool $synchronousValidation): self
{
$this->options['synchronousValidation'] = $synchronousValidation;
return $this;
}
+ /**
+ * A string that describes the scenario in which the Messaging Service will be used. Possible values are `notifications`, `marketing`, `verification`, `discussion`, `poll`, `undeclared`.
+ *
+ * @param string $usecase A string that describes the scenario in which the Messaging Service will be used. Possible values are `notifications`, `marketing`, `verification`, `discussion`, `poll`, `undeclared`.
+ * @return $this Fluent Builder
+ */
+ public function setUsecase(string $usecase): self
+ {
+ $this->options['usecase'] = $usecase;
+ return $this;
+ }
+
+ /**
+ * A boolean value that indicates either the webhook url configured on the phone number will be used or `inbound_request_url`/`fallback_url` url will be called when a message is received from the phone number. If this field is enabled then the webhook url defined on the phone number will override the `inbound_request_url`/`fallback_url` defined for the Messaging Service.
+ *
+ * @param bool $useInboundWebhookOnNumber A boolean value that indicates either the webhook url configured on the phone number will be used or `inbound_request_url`/`fallback_url` url will be called when a message is received from the phone number. If this field is enabled then the webhook url defined on the phone number will override the `inbound_request_url`/`fallback_url` defined for the Messaging Service.
+ * @return $this Fluent Builder
+ */
+ public function setUseInboundWebhookOnNumber(bool $useInboundWebhookOnNumber): self
+ {
+ $this->options['useInboundWebhookOnNumber'] = $useInboundWebhookOnNumber;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Messaging.V1.CreateServiceOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Messaging.V1.CreateServiceOptions ' . $options . ']';
}
}
+
+
+
class UpdateServiceOptions extends Options
-{
- /**
- * @param string $friendlyName A string to describe the resource
- * @param string $inboundRequestUrl The URL we call using inbound_method when a
- * message is received by any phone number or
- * short code in the Service
- * @param string $inboundMethod The HTTP method we should use to call
- * inbound_request_url
- * @param string $fallbackUrl The URL that we call using fallback_method if an
- * error occurs while retrieving or executing the
- * TwiML from the Inbound Request URL
- * @param string $fallbackMethod The HTTP method we should use to call
- * fallback_url
- * @param string $statusCallback The URL we should call to pass status updates
- * about message delivery
- * @param bool $stickySender Whether to enable Sticky Sender on the Service
- * instance
- * @param bool $mmsConverter Whether to enable the MMS Converter for messages
- * sent through the Service instance
- * @param bool $smartEncoding Whether to enable Encoding for messages sent
- * through the Service instance
- * @param string $scanMessageContent Reserved
- * @param bool $fallbackToLongCode Whether to enable Fallback to Long Code for
- * messages sent through the Service instance
- * @param bool $areaCodeGeomatch Whether to enable Area Code Geomatch on the
- * Service Instance
- * @param int $validityPeriod How long, in seconds, messages sent from the
- * Service are valid
- * @param bool $synchronousValidation Reserved
- */
- public function __construct($friendlyName = Values::NONE, $inboundRequestUrl = Values::NONE, $inboundMethod = Values::NONE, $fallbackUrl = Values::NONE, $fallbackMethod = Values::NONE, $statusCallback = Values::NONE, $stickySender = Values::NONE, $mmsConverter = Values::NONE, $smartEncoding = Values::NONE, $scanMessageContent = Values::NONE, $fallbackToLongCode = Values::NONE, $areaCodeGeomatch = Values::NONE, $validityPeriod = Values::NONE, $synchronousValidation = Values::NONE)
{
+ /**
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
+ * @param string $inboundRequestUrl The URL we call using `inbound_method` when a message is received by any phone number or short code in the Service. When this property is `null`, receiving inbound messages is disabled. All messages sent to the Twilio phone number or short code will not be logged and received on the Account. If the `use_inbound_webhook_on_number` field is enabled then the webhook url defined on the phone number will override the `inbound_request_url` defined for the Messaging Service.
+ * @param string $inboundMethod The HTTP method we should use to call `inbound_request_url`. Can be `GET` or `POST` and the default is `POST`.
+ * @param string $fallbackUrl The URL that we call using `fallback_method` if an error occurs while retrieving or executing the TwiML from the Inbound Request URL. If the `use_inbound_webhook_on_number` field is enabled then the webhook url defined on the phone number will override the `fallback_url` defined for the Messaging Service.
+ * @param string $fallbackMethod The HTTP method we should use to call `fallback_url`. Can be: `GET` or `POST`.
+ * @param string $statusCallback The URL we should call to [pass status updates](https://www.twilio.com/docs/sms/api/message-resource#message-status-values) about message delivery.
+ * @param bool $stickySender Whether to enable [Sticky Sender](https://www.twilio.com/docs/messaging/services#sticky-sender) on the Service instance.
+ * @param bool $mmsConverter Whether to enable the [MMS Converter](https://www.twilio.com/docs/messaging/services#mms-converter) for messages sent through the Service instance.
+ * @param bool $smartEncoding Whether to enable [Smart Encoding](https://www.twilio.com/docs/messaging/services#smart-encoding) for messages sent through the Service instance.
+ * @param string $scanMessageContent
+ * @param bool $fallbackToLongCode [OBSOLETE] Former feature used to fallback to long code sender after certain short code message failures.
+ * @param bool $areaCodeGeomatch Whether to enable [Area Code Geomatch](https://www.twilio.com/docs/messaging/services#area-code-geomatch) on the Service Instance.
+ * @param int $validityPeriod How long, in seconds, messages sent from the Service are valid. Can be an integer from `1` to `14,400`.
+ * @param bool $synchronousValidation Reserved.
+ * @param string $usecase A string that describes the scenario in which the Messaging Service will be used. Possible values are `notifications`, `marketing`, `verification`, `discussion`, `poll`, `undeclared`.
+ * @param bool $useInboundWebhookOnNumber A boolean value that indicates either the webhook url configured on the phone number will be used or `inbound_request_url`/`fallback_url` url will be called when a message is received from the phone number. If this field is enabled then the webhook url defined on the phone number will override the `inbound_request_url`/`fallback_url` defined for the Messaging Service.
+ */
+ public function __construct(
+
+ string $friendlyName = Values::NONE,
+ string $inboundRequestUrl = Values::NONE,
+ string $inboundMethod = Values::NONE,
+ string $fallbackUrl = Values::NONE,
+ string $fallbackMethod = Values::NONE,
+ string $statusCallback = Values::NONE,
+ bool $stickySender = Values::BOOL_NONE,
+ bool $mmsConverter = Values::BOOL_NONE,
+ bool $smartEncoding = Values::BOOL_NONE,
+ string $scanMessageContent = Values::NONE,
+ bool $fallbackToLongCode = Values::BOOL_NONE,
+ bool $areaCodeGeomatch = Values::BOOL_NONE,
+ int $validityPeriod = Values::INT_NONE,
+ bool $synchronousValidation = Values::BOOL_NONE,
+ string $usecase = Values::NONE,
+ bool $useInboundWebhookOnNumber = Values::BOOL_NONE
+
+ ) {
$this->options['friendlyName'] = $friendlyName;
$this->options['inboundRequestUrl'] = $inboundRequestUrl;
$this->options['inboundMethod'] = $inboundMethod;
@@ -367,29 +444,29 @@ public function __construct($friendlyName = Values::NONE, $inboundRequestUrl = V
$this->options['areaCodeGeomatch'] = $areaCodeGeomatch;
$this->options['validityPeriod'] = $validityPeriod;
$this->options['synchronousValidation'] = $synchronousValidation;
+ $this->options['usecase'] = $usecase;
+ $this->options['useInboundWebhookOnNumber'] = $useInboundWebhookOnNumber;
}
/**
* A descriptive string that you create to describe the resource. It can be up to 64 characters long.
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
}
/**
- * The URL we should call using `inbound_method` when a message is received by any phone number or short code in the Service. When this property is `null`, receiving inbound messages is disabled.
+ * The URL we call using `inbound_method` when a message is received by any phone number or short code in the Service. When this property is `null`, receiving inbound messages is disabled. All messages sent to the Twilio phone number or short code will not be logged and received on the Account. If the `use_inbound_webhook_on_number` field is enabled then the webhook url defined on the phone number will override the `inbound_request_url` defined for the Messaging Service.
*
- * @param string $inboundRequestUrl The URL we call using inbound_method when a
- * message is received by any phone number or
- * short code in the Service
+ * @param string $inboundRequestUrl The URL we call using `inbound_method` when a message is received by any phone number or short code in the Service. When this property is `null`, receiving inbound messages is disabled. All messages sent to the Twilio phone number or short code will not be logged and received on the Account. If the `use_inbound_webhook_on_number` field is enabled then the webhook url defined on the phone number will override the `inbound_request_url` defined for the Messaging Service.
* @return $this Fluent Builder
*/
- public function setInboundRequestUrl($inboundRequestUrl)
+ public function setInboundRequestUrl(string $inboundRequestUrl): self
{
$this->options['inboundRequestUrl'] = $inboundRequestUrl;
return $this;
@@ -398,25 +475,22 @@ public function setInboundRequestUrl($inboundRequestUrl)
/**
* The HTTP method we should use to call `inbound_request_url`. Can be `GET` or `POST` and the default is `POST`.
*
- * @param string $inboundMethod The HTTP method we should use to call
- * inbound_request_url
+ * @param string $inboundMethod The HTTP method we should use to call `inbound_request_url`. Can be `GET` or `POST` and the default is `POST`.
* @return $this Fluent Builder
*/
- public function setInboundMethod($inboundMethod)
+ public function setInboundMethod(string $inboundMethod): self
{
$this->options['inboundMethod'] = $inboundMethod;
return $this;
}
/**
- * The URL that we should call using `fallback_method` if an error occurs while retrieving or executing the TwiML from the Inbound Request URL.
+ * The URL that we call using `fallback_method` if an error occurs while retrieving or executing the TwiML from the Inbound Request URL. If the `use_inbound_webhook_on_number` field is enabled then the webhook url defined on the phone number will override the `fallback_url` defined for the Messaging Service.
*
- * @param string $fallbackUrl The URL that we call using fallback_method if an
- * error occurs while retrieving or executing the
- * TwiML from the Inbound Request URL
+ * @param string $fallbackUrl The URL that we call using `fallback_method` if an error occurs while retrieving or executing the TwiML from the Inbound Request URL. If the `use_inbound_webhook_on_number` field is enabled then the webhook url defined on the phone number will override the `fallback_url` defined for the Messaging Service.
* @return $this Fluent Builder
*/
- public function setFallbackUrl($fallbackUrl)
+ public function setFallbackUrl(string $fallbackUrl): self
{
$this->options['fallbackUrl'] = $fallbackUrl;
return $this;
@@ -425,11 +499,10 @@ public function setFallbackUrl($fallbackUrl)
/**
* The HTTP method we should use to call `fallback_url`. Can be: `GET` or `POST`.
*
- * @param string $fallbackMethod The HTTP method we should use to call
- * fallback_url
+ * @param string $fallbackMethod The HTTP method we should use to call `fallback_url`. Can be: `GET` or `POST`.
* @return $this Fluent Builder
*/
- public function setFallbackMethod($fallbackMethod)
+ public function setFallbackMethod(string $fallbackMethod): self
{
$this->options['fallbackMethod'] = $fallbackMethod;
return $this;
@@ -438,88 +511,80 @@ public function setFallbackMethod($fallbackMethod)
/**
* The URL we should call to [pass status updates](https://www.twilio.com/docs/sms/api/message-resource#message-status-values) about message delivery.
*
- * @param string $statusCallback The URL we should call to pass status updates
- * about message delivery
+ * @param string $statusCallback The URL we should call to [pass status updates](https://www.twilio.com/docs/sms/api/message-resource#message-status-values) about message delivery.
* @return $this Fluent Builder
*/
- public function setStatusCallback($statusCallback)
+ public function setStatusCallback(string $statusCallback): self
{
$this->options['statusCallback'] = $statusCallback;
return $this;
}
/**
- * Whether to enable [Sticky Sender](https://www.twilio.com/docs/sms/services#sticky-sender) on the Service instance.
+ * Whether to enable [Sticky Sender](https://www.twilio.com/docs/messaging/services#sticky-sender) on the Service instance.
*
- * @param bool $stickySender Whether to enable Sticky Sender on the Service
- * instance
+ * @param bool $stickySender Whether to enable [Sticky Sender](https://www.twilio.com/docs/messaging/services#sticky-sender) on the Service instance.
* @return $this Fluent Builder
*/
- public function setStickySender($stickySender)
+ public function setStickySender(bool $stickySender): self
{
$this->options['stickySender'] = $stickySender;
return $this;
}
/**
- * Whether to enable the [MMS Converter](https://www.twilio.com/docs/sms/services#mms-converter) for messages sent through the Service instance.
+ * Whether to enable the [MMS Converter](https://www.twilio.com/docs/messaging/services#mms-converter) for messages sent through the Service instance.
*
- * @param bool $mmsConverter Whether to enable the MMS Converter for messages
- * sent through the Service instance
+ * @param bool $mmsConverter Whether to enable the [MMS Converter](https://www.twilio.com/docs/messaging/services#mms-converter) for messages sent through the Service instance.
* @return $this Fluent Builder
*/
- public function setMmsConverter($mmsConverter)
+ public function setMmsConverter(bool $mmsConverter): self
{
$this->options['mmsConverter'] = $mmsConverter;
return $this;
}
/**
- * Whether to enable [Smart Encoding](https://www.twilio.com/docs/sms/services#smart-encoding) for messages sent through the Service instance.
+ * Whether to enable [Smart Encoding](https://www.twilio.com/docs/messaging/services#smart-encoding) for messages sent through the Service instance.
*
- * @param bool $smartEncoding Whether to enable Encoding for messages sent
- * through the Service instance
+ * @param bool $smartEncoding Whether to enable [Smart Encoding](https://www.twilio.com/docs/messaging/services#smart-encoding) for messages sent through the Service instance.
* @return $this Fluent Builder
*/
- public function setSmartEncoding($smartEncoding)
+ public function setSmartEncoding(bool $smartEncoding): self
{
$this->options['smartEncoding'] = $smartEncoding;
return $this;
}
/**
- * Reserved.
- *
- * @param string $scanMessageContent Reserved
+ * @param string $scanMessageContent
* @return $this Fluent Builder
*/
- public function setScanMessageContent($scanMessageContent)
+ public function setScanMessageContent(string $scanMessageContent): self
{
$this->options['scanMessageContent'] = $scanMessageContent;
return $this;
}
/**
- * Whether to enable [Fallback to Long Code](https://www.twilio.com/docs/sms/services#fallback-to-long-code) for messages sent through the Service instance.
+ * [OBSOLETE] Former feature used to fallback to long code sender after certain short code message failures.
*
- * @param bool $fallbackToLongCode Whether to enable Fallback to Long Code for
- * messages sent through the Service instance
+ * @param bool $fallbackToLongCode [OBSOLETE] Former feature used to fallback to long code sender after certain short code message failures.
* @return $this Fluent Builder
*/
- public function setFallbackToLongCode($fallbackToLongCode)
+ public function setFallbackToLongCode(bool $fallbackToLongCode): self
{
$this->options['fallbackToLongCode'] = $fallbackToLongCode;
return $this;
}
/**
- * Whether to enable [Area Code Geomatch](https://www.twilio.com/docs/sms/services#area-code-geomatch) on the Service Instance.
+ * Whether to enable [Area Code Geomatch](https://www.twilio.com/docs/messaging/services#area-code-geomatch) on the Service Instance.
*
- * @param bool $areaCodeGeomatch Whether to enable Area Code Geomatch on the
- * Service Instance
+ * @param bool $areaCodeGeomatch Whether to enable [Area Code Geomatch](https://www.twilio.com/docs/messaging/services#area-code-geomatch) on the Service Instance.
* @return $this Fluent Builder
*/
- public function setAreaCodeGeomatch($areaCodeGeomatch)
+ public function setAreaCodeGeomatch(bool $areaCodeGeomatch): self
{
$this->options['areaCodeGeomatch'] = $areaCodeGeomatch;
return $this;
@@ -528,11 +593,10 @@ public function setAreaCodeGeomatch($areaCodeGeomatch)
/**
* How long, in seconds, messages sent from the Service are valid. Can be an integer from `1` to `14,400`.
*
- * @param int $validityPeriod How long, in seconds, messages sent from the
- * Service are valid
+ * @param int $validityPeriod How long, in seconds, messages sent from the Service are valid. Can be an integer from `1` to `14,400`.
* @return $this Fluent Builder
*/
- public function setValidityPeriod($validityPeriod)
+ public function setValidityPeriod(int $validityPeriod): self
{
$this->options['validityPeriod'] = $validityPeriod;
return $this;
@@ -541,28 +605,48 @@ public function setValidityPeriod($validityPeriod)
/**
* Reserved.
*
- * @param bool $synchronousValidation Reserved
+ * @param bool $synchronousValidation Reserved.
* @return $this Fluent Builder
*/
- public function setSynchronousValidation($synchronousValidation)
+ public function setSynchronousValidation(bool $synchronousValidation): self
{
$this->options['synchronousValidation'] = $synchronousValidation;
return $this;
}
+ /**
+ * A string that describes the scenario in which the Messaging Service will be used. Possible values are `notifications`, `marketing`, `verification`, `discussion`, `poll`, `undeclared`.
+ *
+ * @param string $usecase A string that describes the scenario in which the Messaging Service will be used. Possible values are `notifications`, `marketing`, `verification`, `discussion`, `poll`, `undeclared`.
+ * @return $this Fluent Builder
+ */
+ public function setUsecase(string $usecase): self
+ {
+ $this->options['usecase'] = $usecase;
+ return $this;
+ }
+
+ /**
+ * A boolean value that indicates either the webhook url configured on the phone number will be used or `inbound_request_url`/`fallback_url` url will be called when a message is received from the phone number. If this field is enabled then the webhook url defined on the phone number will override the `inbound_request_url`/`fallback_url` defined for the Messaging Service.
+ *
+ * @param bool $useInboundWebhookOnNumber A boolean value that indicates either the webhook url configured on the phone number will be used or `inbound_request_url`/`fallback_url` url will be called when a message is received from the phone number. If this field is enabled then the webhook url defined on the phone number will override the `inbound_request_url`/`fallback_url` defined for the Messaging Service.
+ * @return $this Fluent Builder
+ */
+ public function setUseInboundWebhookOnNumber(bool $useInboundWebhookOnNumber): self
+ {
+ $this->options['useInboundWebhookOnNumber'] = $useInboundWebhookOnNumber;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Messaging.V1.UpdateServiceOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Messaging.V1.UpdateServiceOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/ServicePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/ServicePage.php
index fdcfd6b..4a15a87 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/ServicePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/ServicePage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return ServiceInstance \Twilio\Rest\Messaging\V1\ServiceInstance
+ */
+ public function buildInstance(array $payload): ServiceInstance
{
return new ServiceInstance($this->version, $payload);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Messaging.V1.ServicePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/MessageContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/MessageContext.php
deleted file mode 100644
index e0e301c..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/MessageContext.php
+++ /dev/null
@@ -1,124 +0,0 @@
-solution = array('sessionSid' => $sessionSid, 'sid' => $sid,);
-
- $this->uri = '/Sessions/' . \rawurlencode($sessionSid) . '/Messages/' . \rawurlencode($sid) . '';
- }
-
- /**
- * Fetch a MessageInstance
- *
- * @return MessageInstance Fetched MessageInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new MessageInstance(
- $this->version,
- $payload,
- $this->solution['sessionSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Update the MessageInstance
- *
- * @param array|Options $options Optional Arguments
- * @return MessageInstance Updated MessageInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'Author' => $options['author'],
- 'Attributes' => $options['attributes'],
- 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']),
- 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']),
- 'Body' => $options['body'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new MessageInstance(
- $this->version,
- $payload,
- $this->solution['sessionSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Deletes the MessageInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Messaging.V1.MessageContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/MessageInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/MessageInstance.php
deleted file mode 100644
index 79ad65b..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/MessageInstance.php
+++ /dev/null
@@ -1,157 +0,0 @@
-properties = array(
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'serviceSid' => Values::array_get($payload, 'service_sid'),
- 'messagingServiceSid' => Values::array_get($payload, 'messaging_service_sid'),
- 'sessionSid' => Values::array_get($payload, 'session_sid'),
- 'sid' => Values::array_get($payload, 'sid'),
- 'index' => Values::array_get($payload, 'index'),
- 'author' => Values::array_get($payload, 'author'),
- 'body' => Values::array_get($payload, 'body'),
- 'attributes' => Values::array_get($payload, 'attributes'),
- 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- 'url' => Values::array_get($payload, 'url'),
- );
-
- $this->solution = array('sessionSid' => $sessionSid, 'sid' => $sid ?: $this->properties['sid'],);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Messaging\V1\Session\MessageContext Context for this
- * MessageInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new MessageContext(
- $this->version,
- $this->solution['sessionSid'],
- $this->solution['sid']
- );
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a MessageInstance
- *
- * @return MessageInstance Fetched MessageInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Update the MessageInstance
- *
- * @param array|Options $options Optional Arguments
- * @return MessageInstance Updated MessageInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- return $this->proxy()->update($options);
- }
-
- /**
- * Deletes the MessageInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->proxy()->delete();
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Messaging.V1.MessageInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/MessageList.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/MessageList.php
deleted file mode 100644
index b1c8fbc..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/MessageList.php
+++ /dev/null
@@ -1,180 +0,0 @@
-solution = array('sessionSid' => $sessionSid,);
-
- $this->uri = '/Sessions/' . \rawurlencode($sessionSid) . '/Messages';
- }
-
- /**
- * Create a new MessageInstance
- *
- * @param array|Options $options Optional Arguments
- * @return MessageInstance Newly created MessageInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'Author' => $options['author'],
- 'Attributes' => $options['attributes'],
- 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']),
- 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']),
- 'Body' => $options['body'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new MessageInstance($this->version, $payload, $this->solution['sessionSid']);
- }
-
- /**
- * Streams MessageInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
- *
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
- */
- public function stream($limit = null, $pageSize = null)
- {
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
- }
-
- /**
- * Reads MessageInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return MessageInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
- /**
- * Retrieve a single page of MessageInstance records from the API.
- * Request is executed immediately
- *
- * @param mixed $pageSize Number of records to return, defaults to 50
- * @param string $pageToken PageToken provided by the API
- * @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of MessageInstance
- */
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
- {
- $params = Values::of(array(
- 'PageToken' => $pageToken,
- 'Page' => $pageNumber,
- 'PageSize' => $pageSize,
- ));
-
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
-
- return new MessagePage($this->version, $response, $this->solution);
- }
-
- /**
- * Retrieve a specific page of MessageInstance records from the API.
- * Request is executed immediately
- *
- * @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of MessageInstance
- */
- public function getPage($targetUrl)
- {
- $response = $this->version->getDomain()->getClient()->request(
- 'GET',
- $targetUrl
- );
-
- return new MessagePage($this->version, $response, $this->solution);
- }
-
- /**
- * Constructs a MessageContext
- *
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Messaging\V1\Session\MessageContext
- */
- public function getContext($sid)
- {
- return new MessageContext($this->version, $this->solution['sessionSid'], $sid);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Messaging.V1.MessageList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/MessageOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/MessageOptions.php
deleted file mode 100644
index b8a2a84..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/MessageOptions.php
+++ /dev/null
@@ -1,247 +0,0 @@
-options['author'] = $author;
- $this->options['attributes'] = $attributes;
- $this->options['dateCreated'] = $dateCreated;
- $this->options['dateUpdated'] = $dateUpdated;
- $this->options['body'] = $body;
- }
-
- /**
- * The [identity](https://www.twilio.com/docs/chat/identity) of the message's author. Defaults to `system`.
- *
- * @param string $author The identity of the message's author
- * @return $this Fluent Builder
- */
- public function setAuthor($author)
- {
- $this->options['author'] = $author;
- return $this;
- }
-
- /**
- * A JSON string that stores application-specific data.
- *
- * @param string $attributes A JSON string that stores application-specific data
- * @return $this Fluent Builder
- */
- public function setAttributes($attributes)
- {
- $this->options['attributes'] = $attributes;
- return $this;
- }
-
- /**
- * The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created.
- *
- * @param \DateTime $dateCreated The ISO 8601 date and time in GMT when the
- * resource was created
- * @return $this Fluent Builder
- */
- public function setDateCreated($dateCreated)
- {
- $this->options['dateCreated'] = $dateCreated;
- return $this;
- }
-
- /**
- * The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated.
- *
- * @param \DateTime $dateUpdated The ISO 8601 date and time in GMT when the
- * resource was updated
- * @return $this Fluent Builder
- */
- public function setDateUpdated($dateUpdated)
- {
- $this->options['dateUpdated'] = $dateUpdated;
- return $this;
- }
-
- /**
- * The message body.
- *
- * @param string $body The message body
- * @return $this Fluent Builder
- */
- public function setBody($body)
- {
- $this->options['body'] = $body;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Messaging.V1.CreateMessageOptions ' . \implode(' ', $options) . ']';
- }
-}
-
-class UpdateMessageOptions extends Options
-{
- /**
- * @param string $author The identity of the message's author
- * @param string $attributes A JSON string that stores application-specific data
- * @param \DateTime $dateCreated The ISO 8601 date and time in GMT when the
- * resource was created
- * @param \DateTime $dateUpdated The ISO 8601 date and time in GMT when the
- * resource was updated
- * @param string $body The message body
- */
- public function __construct($author = Values::NONE, $attributes = Values::NONE, $dateCreated = Values::NONE, $dateUpdated = Values::NONE, $body = Values::NONE)
- {
- $this->options['author'] = $author;
- $this->options['attributes'] = $attributes;
- $this->options['dateCreated'] = $dateCreated;
- $this->options['dateUpdated'] = $dateUpdated;
- $this->options['body'] = $body;
- }
-
- /**
- * The [identity](https://www.twilio.com/docs/chat/identity) of the message's author. Defaults to `system`.
- *
- * @param string $author The identity of the message's author
- * @return $this Fluent Builder
- */
- public function setAuthor($author)
- {
- $this->options['author'] = $author;
- return $this;
- }
-
- /**
- * A JSON string that stores application-specific data.
- *
- * @param string $attributes A JSON string that stores application-specific data
- * @return $this Fluent Builder
- */
- public function setAttributes($attributes)
- {
- $this->options['attributes'] = $attributes;
- return $this;
- }
-
- /**
- * The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created.
- *
- * @param \DateTime $dateCreated The ISO 8601 date and time in GMT when the
- * resource was created
- * @return $this Fluent Builder
- */
- public function setDateCreated($dateCreated)
- {
- $this->options['dateCreated'] = $dateCreated;
- return $this;
- }
-
- /**
- * The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated.
- *
- * @param \DateTime $dateUpdated The ISO 8601 date and time in GMT when the
- * resource was updated
- * @return $this Fluent Builder
- */
- public function setDateUpdated($dateUpdated)
- {
- $this->options['dateUpdated'] = $dateUpdated;
- return $this;
- }
-
- /**
- * The message body.
- *
- * @param string $body The message body
- * @return $this Fluent Builder
- */
- public function setBody($body)
- {
- $this->options['body'] = $body;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Messaging.V1.UpdateMessageOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/MessagePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/MessagePage.php
deleted file mode 100644
index 33f8537..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/MessagePage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new MessageInstance($this->version, $payload, $this->solution['sessionSid']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Messaging.V1.MessagePage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/ParticipantContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/ParticipantContext.php
deleted file mode 100644
index d372fdd..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/ParticipantContext.php
+++ /dev/null
@@ -1,123 +0,0 @@
-solution = array('sessionSid' => $sessionSid, 'sid' => $sid,);
-
- $this->uri = '/Sessions/' . \rawurlencode($sessionSid) . '/Participants/' . \rawurlencode($sid) . '';
- }
-
- /**
- * Update the ParticipantInstance
- *
- * @param array|Options $options Optional Arguments
- * @return ParticipantInstance Updated ParticipantInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'Attributes' => $options['attributes'],
- 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']),
- 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']),
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new ParticipantInstance(
- $this->version,
- $payload,
- $this->solution['sessionSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Fetch a ParticipantInstance
- *
- * @return ParticipantInstance Fetched ParticipantInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new ParticipantInstance(
- $this->version,
- $payload,
- $this->solution['sessionSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Deletes the ParticipantInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Messaging.V1.ParticipantContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/ParticipantInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/ParticipantInstance.php
deleted file mode 100644
index 6d23456..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/ParticipantInstance.php
+++ /dev/null
@@ -1,160 +0,0 @@
-properties = array(
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'serviceSid' => Values::array_get($payload, 'service_sid'),
- 'messagingServiceSid' => Values::array_get($payload, 'messaging_service_sid'),
- 'sessionSid' => Values::array_get($payload, 'session_sid'),
- 'sid' => Values::array_get($payload, 'sid'),
- 'identity' => Values::array_get($payload, 'identity'),
- 'twilioAddress' => Values::array_get($payload, 'twilio_address'),
- 'userAddress' => Values::array_get($payload, 'user_address'),
- 'attributes' => Values::array_get($payload, 'attributes'),
- 'type' => Values::array_get($payload, 'type'),
- 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- 'url' => Values::array_get($payload, 'url'),
- );
-
- $this->solution = array('sessionSid' => $sessionSid, 'sid' => $sid ?: $this->properties['sid'],);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Messaging\V1\Session\ParticipantContext Context for
- * this
- * ParticipantInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new ParticipantContext(
- $this->version,
- $this->solution['sessionSid'],
- $this->solution['sid']
- );
- }
-
- return $this->context;
- }
-
- /**
- * Update the ParticipantInstance
- *
- * @param array|Options $options Optional Arguments
- * @return ParticipantInstance Updated ParticipantInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- return $this->proxy()->update($options);
- }
-
- /**
- * Fetch a ParticipantInstance
- *
- * @return ParticipantInstance Fetched ParticipantInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Deletes the ParticipantInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->proxy()->delete();
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Messaging.V1.ParticipantInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/ParticipantList.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/ParticipantList.php
deleted file mode 100644
index 2a52f56..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/ParticipantList.php
+++ /dev/null
@@ -1,181 +0,0 @@
-solution = array('sessionSid' => $sessionSid,);
-
- $this->uri = '/Sessions/' . \rawurlencode($sessionSid) . '/Participants';
- }
-
- /**
- * Create a new ParticipantInstance
- *
- * @param array|Options $options Optional Arguments
- * @return ParticipantInstance Newly created ParticipantInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'Identity' => $options['identity'],
- 'UserAddress' => $options['userAddress'],
- 'Attributes' => $options['attributes'],
- 'TwilioAddress' => $options['twilioAddress'],
- 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']),
- 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']),
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new ParticipantInstance($this->version, $payload, $this->solution['sessionSid']);
- }
-
- /**
- * Streams ParticipantInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
- *
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
- */
- public function stream($limit = null, $pageSize = null)
- {
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
- }
-
- /**
- * Reads ParticipantInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return ParticipantInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
- /**
- * Retrieve a single page of ParticipantInstance records from the API.
- * Request is executed immediately
- *
- * @param mixed $pageSize Number of records to return, defaults to 50
- * @param string $pageToken PageToken provided by the API
- * @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of ParticipantInstance
- */
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
- {
- $params = Values::of(array(
- 'PageToken' => $pageToken,
- 'Page' => $pageNumber,
- 'PageSize' => $pageSize,
- ));
-
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
-
- return new ParticipantPage($this->version, $response, $this->solution);
- }
-
- /**
- * Retrieve a specific page of ParticipantInstance records from the API.
- * Request is executed immediately
- *
- * @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of ParticipantInstance
- */
- public function getPage($targetUrl)
- {
- $response = $this->version->getDomain()->getClient()->request(
- 'GET',
- $targetUrl
- );
-
- return new ParticipantPage($this->version, $response, $this->solution);
- }
-
- /**
- * Constructs a ParticipantContext
- *
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Messaging\V1\Session\ParticipantContext
- */
- public function getContext($sid)
- {
- return new ParticipantContext($this->version, $this->solution['sessionSid'], $sid);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Messaging.V1.ParticipantList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/ParticipantOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/ParticipantOptions.php
deleted file mode 100644
index 914ed71..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/ParticipantOptions.php
+++ /dev/null
@@ -1,235 +0,0 @@
-options['identity'] = $identity;
- $this->options['userAddress'] = $userAddress;
- $this->options['attributes'] = $attributes;
- $this->options['twilioAddress'] = $twilioAddress;
- $this->options['dateCreated'] = $dateCreated;
- $this->options['dateUpdated'] = $dateUpdated;
- }
-
- /**
- * The application-defined string that uniquely identifies the [Chat User](https://www.twilio.com/docs/chat/rest/user-resource) as the session participant. This parameter is null unless the participant is using the Programmable Chat SDK to communicate.
- *
- * @param string $identity The string that identifies the resource's User
- * @return $this Fluent Builder
- */
- public function setIdentity($identity)
- {
- $this->options['identity'] = $identity;
- return $this;
- }
-
- /**
- * The address of the participant's device. Can be a phone number or Messenger ID. Together with the Twilio Address, this determines a participant uniquely. This field (with twilio_address) is null when the participant is interacting from a Chat endpoint (see the `identity` field).
- *
- * @param string $userAddress The address of the participant's device
- * @return $this Fluent Builder
- */
- public function setUserAddress($userAddress)
- {
- $this->options['userAddress'] = $userAddress;
- return $this;
- }
-
- /**
- * A JSON string that stores application-specific data.
- *
- * @param string $attributes A JSON string that stores application-specific data
- * @return $this Fluent Builder
- */
- public function setAttributes($attributes)
- {
- $this->options['attributes'] = $attributes;
- return $this;
- }
-
- /**
- * The address of the Twilio phone number, WhatsApp number, or Messenger Page ID that the participant is in contact with. This field, together with user_address, is only null when the participant is interacting from a Chat endpoint (see the 'identity' field).
- *
- * @param string $twilioAddress The address of the Twilio phone number that the
- * participant is in contact with
- * @return $this Fluent Builder
- */
- public function setTwilioAddress($twilioAddress)
- {
- $this->options['twilioAddress'] = $twilioAddress;
- return $this;
- }
-
- /**
- * The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. This is used when importing messages from another system, as the provided value will be trusted and displayed on SDK clients.
- *
- * @param \DateTime $dateCreated The ISO 8601 date and time in GMT when the
- * resource was created
- * @return $this Fluent Builder
- */
- public function setDateCreated($dateCreated)
- {
- $this->options['dateCreated'] = $dateCreated;
- return $this;
- }
-
- /**
- * The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. This is used when importing messages from another system, as the provided value will be trusted and displayed on SDK clients.
- *
- * @param \DateTime $dateUpdated The ISO 8601 date and time in GMT when the
- * resource was updated
- * @return $this Fluent Builder
- */
- public function setDateUpdated($dateUpdated)
- {
- $this->options['dateUpdated'] = $dateUpdated;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Messaging.V1.CreateParticipantOptions ' . \implode(' ', $options) . ']';
- }
-}
-
-class UpdateParticipantOptions extends Options
-{
- /**
- * @param string $attributes A JSON string that stores application-specific data
- * @param \DateTime $dateCreated The ISO 8601 date and time in GMT when the
- * resource was created
- * @param \DateTime $dateUpdated The ISO 8601 date and time in GMT when the
- * resource was updated
- */
- public function __construct($attributes = Values::NONE, $dateCreated = Values::NONE, $dateUpdated = Values::NONE)
- {
- $this->options['attributes'] = $attributes;
- $this->options['dateCreated'] = $dateCreated;
- $this->options['dateUpdated'] = $dateUpdated;
- }
-
- /**
- * A JSON string that stores application-specific data.
- *
- * @param string $attributes A JSON string that stores application-specific data
- * @return $this Fluent Builder
- */
- public function setAttributes($attributes)
- {
- $this->options['attributes'] = $attributes;
- return $this;
- }
-
- /**
- * The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. This is used when importing messages from another system, as the provided value will be trusted and displayed on SDK clients.
- *
- * @param \DateTime $dateCreated The ISO 8601 date and time in GMT when the
- * resource was created
- * @return $this Fluent Builder
- */
- public function setDateCreated($dateCreated)
- {
- $this->options['dateCreated'] = $dateCreated;
- return $this;
- }
-
- /**
- * The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated.
- *
- * @param \DateTime $dateUpdated The ISO 8601 date and time in GMT when the
- * resource was updated
- * @return $this Fluent Builder
- */
- public function setDateUpdated($dateUpdated)
- {
- $this->options['dateUpdated'] = $dateUpdated;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Messaging.V1.UpdateParticipantOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/ParticipantPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/ParticipantPage.php
deleted file mode 100644
index 3bf281d..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/ParticipantPage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new ParticipantInstance($this->version, $payload, $this->solution['sessionSid']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Messaging.V1.ParticipantPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/WebhookContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/WebhookContext.php
deleted file mode 100644
index d36c24d..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/WebhookContext.php
+++ /dev/null
@@ -1,132 +0,0 @@
-solution = array('sessionSid' => $sessionSid, 'sid' => $sid,);
-
- $this->uri = '/Sessions/' . \rawurlencode($sessionSid) . '/Webhooks/' . \rawurlencode($sid) . '';
- }
-
- /**
- * Fetch a WebhookInstance
- *
- * @return WebhookInstance Fetched WebhookInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new WebhookInstance(
- $this->version,
- $payload,
- $this->solution['sessionSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Update the WebhookInstance
- *
- * @param array|Options $options Optional Arguments
- * @return WebhookInstance Updated WebhookInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'Configuration.Url' => $options['configurationUrl'],
- 'Configuration.Method' => $options['configurationMethod'],
- 'Configuration.Filters' => Serialize::map($options['configurationFilters'], function ($e) {
- return $e;
- }),
- 'Configuration.Triggers' => Serialize::map($options['configurationTriggers'], function ($e) {
- return $e;
- }),
- 'Configuration.FlowSid' => $options['configurationFlowSid'],
- 'Configuration.RetryCount' => $options['configurationRetryCount'],
- 'Configuration.BufferMessages' => Serialize::booleanToString($options['configurationBufferMessages']),
- 'Configuration.BufferWindow' => $options['configurationBufferWindow'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new WebhookInstance(
- $this->version,
- $payload,
- $this->solution['sessionSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Deletes the WebhookInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Messaging.V1.WebhookContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/WebhookInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/WebhookInstance.php
deleted file mode 100644
index 30d8f8f..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/WebhookInstance.php
+++ /dev/null
@@ -1,149 +0,0 @@
-properties = array(
- 'sid' => Values::array_get($payload, 'sid'),
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'sessionSid' => Values::array_get($payload, 'session_sid'),
- 'target' => Values::array_get($payload, 'target'),
- 'url' => Values::array_get($payload, 'url'),
- 'configuration' => Values::array_get($payload, 'configuration'),
- 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- );
-
- $this->solution = array('sessionSid' => $sessionSid, 'sid' => $sid ?: $this->properties['sid'],);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Messaging\V1\Session\WebhookContext Context for this
- * WebhookInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new WebhookContext(
- $this->version,
- $this->solution['sessionSid'],
- $this->solution['sid']
- );
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a WebhookInstance
- *
- * @return WebhookInstance Fetched WebhookInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Update the WebhookInstance
- *
- * @param array|Options $options Optional Arguments
- * @return WebhookInstance Updated WebhookInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- return $this->proxy()->update($options);
- }
-
- /**
- * Deletes the WebhookInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->proxy()->delete();
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Messaging.V1.WebhookInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/WebhookList.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/WebhookList.php
deleted file mode 100644
index 63e4314..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/WebhookList.php
+++ /dev/null
@@ -1,190 +0,0 @@
-solution = array('sessionSid' => $sessionSid,);
-
- $this->uri = '/Sessions/' . \rawurlencode($sessionSid) . '/Webhooks';
- }
-
- /**
- * Streams WebhookInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
- *
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
- */
- public function stream($limit = null, $pageSize = null)
- {
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
- }
-
- /**
- * Reads WebhookInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return WebhookInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
- /**
- * Retrieve a single page of WebhookInstance records from the API.
- * Request is executed immediately
- *
- * @param mixed $pageSize Number of records to return, defaults to 50
- * @param string $pageToken PageToken provided by the API
- * @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of WebhookInstance
- */
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
- {
- $params = Values::of(array(
- 'PageToken' => $pageToken,
- 'Page' => $pageNumber,
- 'PageSize' => $pageSize,
- ));
-
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
-
- return new WebhookPage($this->version, $response, $this->solution);
- }
-
- /**
- * Retrieve a specific page of WebhookInstance records from the API.
- * Request is executed immediately
- *
- * @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of WebhookInstance
- */
- public function getPage($targetUrl)
- {
- $response = $this->version->getDomain()->getClient()->request(
- 'GET',
- $targetUrl
- );
-
- return new WebhookPage($this->version, $response, $this->solution);
- }
-
- /**
- * Create a new WebhookInstance
- *
- * @param string $target The target of the webhook
- * @param array|Options $options Optional Arguments
- * @return WebhookInstance Newly created WebhookInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($target, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'Target' => $target,
- 'Configuration.Url' => $options['configurationUrl'],
- 'Configuration.Method' => $options['configurationMethod'],
- 'Configuration.Filters' => Serialize::map($options['configurationFilters'], function ($e) {
- return $e;
- }),
- 'Configuration.Triggers' => Serialize::map($options['configurationTriggers'], function ($e) {
- return $e;
- }),
- 'Configuration.FlowSid' => $options['configurationFlowSid'],
- 'Configuration.RetryCount' => $options['configurationRetryCount'],
- 'Configuration.ReplayAfter' => $options['configurationReplayAfter'],
- 'Configuration.BufferMessages' => Serialize::booleanToString($options['configurationBufferMessages']),
- 'Configuration.BufferWindow' => $options['configurationBufferWindow'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new WebhookInstance($this->version, $payload, $this->solution['sessionSid']);
- }
-
- /**
- * Constructs a WebhookContext
- *
- * @param string $sid The SID of the resource to fetch
- * @return \Twilio\Rest\Messaging\V1\Session\WebhookContext
- */
- public function getContext($sid)
- {
- return new WebhookContext($this->version, $this->solution['sessionSid'], $sid);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Messaging.V1.WebhookList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/WebhookOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/WebhookOptions.php
deleted file mode 100644
index 8d11c89..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/WebhookOptions.php
+++ /dev/null
@@ -1,385 +0,0 @@
-options['configurationUrl'] = $configurationUrl;
- $this->options['configurationMethod'] = $configurationMethod;
- $this->options['configurationFilters'] = $configurationFilters;
- $this->options['configurationTriggers'] = $configurationTriggers;
- $this->options['configurationFlowSid'] = $configurationFlowSid;
- $this->options['configurationRetryCount'] = $configurationRetryCount;
- $this->options['configurationReplayAfter'] = $configurationReplayAfter;
- $this->options['configurationBufferMessages'] = $configurationBufferMessages;
- $this->options['configurationBufferWindow'] = $configurationBufferWindow;
- }
-
- /**
- * The absolute URL the webhook request should be sent to.
- *
- * @param string $configurationUrl The absolute URL the webhook request should
- * be sent to
- * @return $this Fluent Builder
- */
- public function setConfigurationUrl($configurationUrl)
- {
- $this->options['configurationUrl'] = $configurationUrl;
- return $this;
- }
-
- /**
- * The HTTP method we should use when sending a webhook request to `url`. Can be `POST` or `GET`.
- *
- * @param string $configurationMethod The HTTP method we should use when
- * sending a webhook request to url
- * @return $this Fluent Builder
- */
- public function setConfigurationMethod($configurationMethod)
- {
- $this->options['configurationMethod'] = $configurationMethod;
- return $this;
- }
-
- /**
- * The list of events that trigger a webhook event for the Session.
- *
- * @param string $configurationFilters The list of events that trigger a
- * webhook event for the Session
- * @return $this Fluent Builder
- */
- public function setConfigurationFilters($configurationFilters)
- {
- $this->options['configurationFilters'] = $configurationFilters;
- return $this;
- }
-
- /**
- * The list of keywords, firing webhook event for the Session.
- *
- * @param string $configurationTriggers The list of keywords, firing webhook
- * event for the Session
- * @return $this Fluent Builder
- */
- public function setConfigurationTriggers($configurationTriggers)
- {
- $this->options['configurationTriggers'] = $configurationTriggers;
- return $this;
- }
-
- /**
- * The SID of the studio flow where the webhook should be sent to.
- *
- * @param string $configurationFlowSid The SID of the studio flow where the
- * webhook should be sent to
- * @return $this Fluent Builder
- */
- public function setConfigurationFlowSid($configurationFlowSid)
- {
- $this->options['configurationFlowSid'] = $configurationFlowSid;
- return $this;
- }
-
- /**
- * The number of times to call the webhook request if the first attempt fails. Can be up to 3 and the default is 0.
- *
- * @param int $configurationRetryCount The number of times to call the webhook
- * request if the first attempt fails
- * @return $this Fluent Builder
- */
- public function setConfigurationRetryCount($configurationRetryCount)
- {
- $this->options['configurationRetryCount'] = $configurationRetryCount;
- return $this;
- }
-
- /**
- * The message index for which and its successors the webhook will be replayed. Not set by default.
- *
- * @param int $configurationReplayAfter The message index for which and its
- * successors the webhook will be replayed
- * @return $this Fluent Builder
- */
- public function setConfigurationReplayAfter($configurationReplayAfter)
- {
- $this->options['configurationReplayAfter'] = $configurationReplayAfter;
- return $this;
- }
-
- /**
- * Whether buffering should be applied to messages. Not set by default.
- *
- * @param bool $configurationBufferMessages Whether buffering should be applied
- * to messages
- * @return $this Fluent Builder
- */
- public function setConfigurationBufferMessages($configurationBufferMessages)
- {
- $this->options['configurationBufferMessages'] = $configurationBufferMessages;
- return $this;
- }
-
- /**
- * The period to buffer messages in milliseconds. Default is 3,000 ms.
- *
- * @param int $configurationBufferWindow The period to buffer messages
- * @return $this Fluent Builder
- */
- public function setConfigurationBufferWindow($configurationBufferWindow)
- {
- $this->options['configurationBufferWindow'] = $configurationBufferWindow;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Messaging.V1.CreateWebhookOptions ' . \implode(' ', $options) . ']';
- }
-}
-
-class UpdateWebhookOptions extends Options
-{
- /**
- * @param string $configurationUrl The absolute URL the webhook request should
- * be sent to
- * @param string $configurationMethod The HTTP method we should use when
- * sending a webhook request to url
- * @param string $configurationFilters The list of events that trigger a
- * webhook event for the Session
- * @param string $configurationTriggers The list of keywords, that trigger a
- * webhook event for the Session
- * @param string $configurationFlowSid The SID of the studio flow where the
- * webhook should be sent to
- * @param int $configurationRetryCount The number of times to try the webhook
- * request if the first attempt fails
- * @param bool $configurationBufferMessages Whether buffering should be applied
- * to messages
- * @param int $configurationBufferWindow The period to buffer messages
- */
- public function __construct($configurationUrl = Values::NONE, $configurationMethod = Values::NONE, $configurationFilters = Values::NONE, $configurationTriggers = Values::NONE, $configurationFlowSid = Values::NONE, $configurationRetryCount = Values::NONE, $configurationBufferMessages = Values::NONE, $configurationBufferWindow = Values::NONE)
- {
- $this->options['configurationUrl'] = $configurationUrl;
- $this->options['configurationMethod'] = $configurationMethod;
- $this->options['configurationFilters'] = $configurationFilters;
- $this->options['configurationTriggers'] = $configurationTriggers;
- $this->options['configurationFlowSid'] = $configurationFlowSid;
- $this->options['configurationRetryCount'] = $configurationRetryCount;
- $this->options['configurationBufferMessages'] = $configurationBufferMessages;
- $this->options['configurationBufferWindow'] = $configurationBufferWindow;
- }
-
- /**
- * The absolute URL the webhook request should be sent to.
- *
- * @param string $configurationUrl The absolute URL the webhook request should
- * be sent to
- * @return $this Fluent Builder
- */
- public function setConfigurationUrl($configurationUrl)
- {
- $this->options['configurationUrl'] = $configurationUrl;
- return $this;
- }
-
- /**
- * The HTTP method we should use when sending a webhook request to `url`. Can be `POST` or `GET`.
- *
- * @param string $configurationMethod The HTTP method we should use when
- * sending a webhook request to url
- * @return $this Fluent Builder
- */
- public function setConfigurationMethod($configurationMethod)
- {
- $this->options['configurationMethod'] = $configurationMethod;
- return $this;
- }
-
- /**
- * The list of events that trigger a webhook event for the Session.
- *
- * @param string $configurationFilters The list of events that trigger a
- * webhook event for the Session
- * @return $this Fluent Builder
- */
- public function setConfigurationFilters($configurationFilters)
- {
- $this->options['configurationFilters'] = $configurationFilters;
- return $this;
- }
-
- /**
- * The list of keywords that trigger a webhook event for the Session.
- *
- * @param string $configurationTriggers The list of keywords, that trigger a
- * webhook event for the Session
- * @return $this Fluent Builder
- */
- public function setConfigurationTriggers($configurationTriggers)
- {
- $this->options['configurationTriggers'] = $configurationTriggers;
- return $this;
- }
-
- /**
- * The SID of the studio flow where the webhook should be sent to.
- *
- * @param string $configurationFlowSid The SID of the studio flow where the
- * webhook should be sent to
- * @return $this Fluent Builder
- */
- public function setConfigurationFlowSid($configurationFlowSid)
- {
- $this->options['configurationFlowSid'] = $configurationFlowSid;
- return $this;
- }
-
- /**
- * The number of times to try the webhook request if the first attempt fails. Can be up to 3 and the default is 0.
- *
- * @param int $configurationRetryCount The number of times to try the webhook
- * request if the first attempt fails
- * @return $this Fluent Builder
- */
- public function setConfigurationRetryCount($configurationRetryCount)
- {
- $this->options['configurationRetryCount'] = $configurationRetryCount;
- return $this;
- }
-
- /**
- * Whether buffering should be applied to messages. Not set by default.
- *
- * @param bool $configurationBufferMessages Whether buffering should be applied
- * to messages
- * @return $this Fluent Builder
- */
- public function setConfigurationBufferMessages($configurationBufferMessages)
- {
- $this->options['configurationBufferMessages'] = $configurationBufferMessages;
- return $this;
- }
-
- /**
- * The period to buffer messages in milliseconds. Default is 3,000 ms.
- *
- * @param int $configurationBufferWindow The period to buffer messages
- * @return $this Fluent Builder
- */
- public function setConfigurationBufferWindow($configurationBufferWindow)
- {
- $this->options['configurationBufferWindow'] = $configurationBufferWindow;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Messaging.V1.UpdateWebhookOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/WebhookPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/WebhookPage.php
deleted file mode 100644
index 40c86a2..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/Session/WebhookPage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new WebhookInstance($this->version, $payload, $this->solution['sessionSid']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Messaging.V1.WebhookPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/SessionContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/SessionContext.php
deleted file mode 100644
index a9ef0e9..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/SessionContext.php
+++ /dev/null
@@ -1,204 +0,0 @@
-solution = array('sid' => $sid,);
-
- $this->uri = '/Sessions/' . \rawurlencode($sid) . '';
- }
-
- /**
- * Fetch a SessionInstance
- *
- * @return SessionInstance Fetched SessionInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new SessionInstance($this->version, $payload, $this->solution['sid']);
- }
-
- /**
- * Deletes the SessionInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
-
- /**
- * Update the SessionInstance
- *
- * @param array|Options $options Optional Arguments
- * @return SessionInstance Updated SessionInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'Attributes' => $options['attributes'],
- 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']),
- 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']),
- 'CreatedBy' => $options['createdBy'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new SessionInstance($this->version, $payload, $this->solution['sid']);
- }
-
- /**
- * Access the participants
- *
- * @return \Twilio\Rest\Messaging\V1\Session\ParticipantList
- */
- protected function getParticipants()
- {
- if (!$this->_participants) {
- $this->_participants = new ParticipantList($this->version, $this->solution['sid']);
- }
-
- return $this->_participants;
- }
-
- /**
- * Access the messages
- *
- * @return \Twilio\Rest\Messaging\V1\Session\MessageList
- */
- protected function getMessages()
- {
- if (!$this->_messages) {
- $this->_messages = new MessageList($this->version, $this->solution['sid']);
- }
-
- return $this->_messages;
- }
-
- /**
- * Access the webhooks
- *
- * @return \Twilio\Rest\Messaging\V1\Session\WebhookList
- */
- protected function getWebhooks()
- {
- if (!$this->_webhooks) {
- $this->_webhooks = new WebhookList($this->version, $this->solution['sid']);
- }
-
- return $this->_webhooks;
- }
-
- /**
- * Magic getter to lazy load subresources
- *
- * @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
- * @throws TwilioException For unknown subresources
- */
- public function __get($name)
- {
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown subresource ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $property = $this->$name;
- if (\method_exists($property, 'getContext')) {
- return \call_user_func_array(array($property, 'getContext'), $arguments);
- }
-
- throw new TwilioException('Resource does not have a context');
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Messaging.V1.SessionContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/SessionInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/SessionInstance.php
deleted file mode 100644
index 7dbe9ad..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/SessionInstance.php
+++ /dev/null
@@ -1,184 +0,0 @@
-properties = array(
- 'sid' => Values::array_get($payload, 'sid'),
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'serviceSid' => Values::array_get($payload, 'service_sid'),
- 'messagingServiceSid' => Values::array_get($payload, 'messaging_service_sid'),
- 'friendlyName' => Values::array_get($payload, 'friendly_name'),
- 'attributes' => Values::array_get($payload, 'attributes'),
- 'createdBy' => Values::array_get($payload, 'created_by'),
- 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- 'url' => Values::array_get($payload, 'url'),
- 'links' => Values::array_get($payload, 'links'),
- );
-
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Messaging\V1\SessionContext Context for this
- * SessionInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new SessionContext($this->version, $this->solution['sid']);
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a SessionInstance
- *
- * @return SessionInstance Fetched SessionInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Deletes the SessionInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->proxy()->delete();
- }
-
- /**
- * Update the SessionInstance
- *
- * @param array|Options $options Optional Arguments
- * @return SessionInstance Updated SessionInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- return $this->proxy()->update($options);
- }
-
- /**
- * Access the participants
- *
- * @return \Twilio\Rest\Messaging\V1\Session\ParticipantList
- */
- protected function getParticipants()
- {
- return $this->proxy()->participants;
- }
-
- /**
- * Access the messages
- *
- * @return \Twilio\Rest\Messaging\V1\Session\MessageList
- */
- protected function getMessages()
- {
- return $this->proxy()->messages;
- }
-
- /**
- * Access the webhooks
- *
- * @return \Twilio\Rest\Messaging\V1\Session\WebhookList
- */
- protected function getWebhooks()
- {
- return $this->proxy()->webhooks;
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Messaging.V1.SessionInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/SessionList.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/SessionList.php
deleted file mode 100644
index 154bb88..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/SessionList.php
+++ /dev/null
@@ -1,182 +0,0 @@
-solution = array();
-
- $this->uri = '/Sessions';
- }
-
- /**
- * Create a new SessionInstance
- *
- * @param string $messagingServiceSid The SID of the SMS Service the session
- * belongs to
- * @param array|Options $options Optional Arguments
- * @return SessionInstance Newly created SessionInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($messagingServiceSid, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'MessagingServiceSid' => $messagingServiceSid,
- 'FriendlyName' => $options['friendlyName'],
- 'Attributes' => $options['attributes'],
- 'DateCreated' => Serialize::iso8601DateTime($options['dateCreated']),
- 'DateUpdated' => Serialize::iso8601DateTime($options['dateUpdated']),
- 'CreatedBy' => $options['createdBy'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new SessionInstance($this->version, $payload);
- }
-
- /**
- * Streams SessionInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
- *
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
- */
- public function stream($limit = null, $pageSize = null)
- {
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
- }
-
- /**
- * Reads SessionInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return SessionInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
- /**
- * Retrieve a single page of SessionInstance records from the API.
- * Request is executed immediately
- *
- * @param mixed $pageSize Number of records to return, defaults to 50
- * @param string $pageToken PageToken provided by the API
- * @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of SessionInstance
- */
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
- {
- $params = Values::of(array(
- 'PageToken' => $pageToken,
- 'Page' => $pageNumber,
- 'PageSize' => $pageSize,
- ));
-
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
-
- return new SessionPage($this->version, $response, $this->solution);
- }
-
- /**
- * Retrieve a specific page of SessionInstance records from the API.
- * Request is executed immediately
- *
- * @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of SessionInstance
- */
- public function getPage($targetUrl)
- {
- $response = $this->version->getDomain()->getClient()->request(
- 'GET',
- $targetUrl
- );
-
- return new SessionPage($this->version, $response, $this->solution);
- }
-
- /**
- * Constructs a SessionContext
- *
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Messaging\V1\SessionContext
- */
- public function getContext($sid)
- {
- return new SessionContext($this->version, $sid);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Messaging.V1.SessionList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/SessionOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/SessionOptions.php
deleted file mode 100644
index 605893f..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/SessionOptions.php
+++ /dev/null
@@ -1,247 +0,0 @@
-options['friendlyName'] = $friendlyName;
- $this->options['attributes'] = $attributes;
- $this->options['dateCreated'] = $dateCreated;
- $this->options['dateUpdated'] = $dateUpdated;
- $this->options['createdBy'] = $createdBy;
- }
-
- /**
- * A descriptive string that you create to describe the resource. It can be up to 64 characters long.
- *
- * @param string $friendlyName A string to describe the resource
- * @return $this Fluent Builder
- */
- public function setFriendlyName($friendlyName)
- {
- $this->options['friendlyName'] = $friendlyName;
- return $this;
- }
-
- /**
- * A JSON string that stores application-specific data.
- *
- * @param string $attributes A JSON string that stores application-specific data
- * @return $this Fluent Builder
- */
- public function setAttributes($attributes)
- {
- $this->options['attributes'] = $attributes;
- return $this;
- }
-
- /**
- * The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created.
- *
- * @param \DateTime $dateCreated The ISO 8601 date and time in GMT when the
- * resource was created
- * @return $this Fluent Builder
- */
- public function setDateCreated($dateCreated)
- {
- $this->options['dateCreated'] = $dateCreated;
- return $this;
- }
-
- /**
- * The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated.
- *
- * @param \DateTime $dateUpdated The ISO 8601 date and time in GMT when the
- * resource was updated
- * @return $this Fluent Builder
- */
- public function setDateUpdated($dateUpdated)
- {
- $this->options['dateUpdated'] = $dateUpdated;
- return $this;
- }
-
- /**
- * The Identity of the session's creator. If the Session was created through the API, the value will be `system`
- *
- * @param string $createdBy The Identity of the session's creator
- * @return $this Fluent Builder
- */
- public function setCreatedBy($createdBy)
- {
- $this->options['createdBy'] = $createdBy;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Messaging.V1.CreateSessionOptions ' . \implode(' ', $options) . ']';
- }
-}
-
-class UpdateSessionOptions extends Options
-{
- /**
- * @param string $friendlyName A string to describe the resource
- * @param string $attributes A JSON string that stores application-specific data
- * @param \DateTime $dateCreated The ISO 8601 date and time in GMT when the
- * resource was created
- * @param \DateTime $dateUpdated The ISO 8601 date and time in GMT when the
- * resource was updated
- * @param string $createdBy The Identity of the session's creator
- */
- public function __construct($friendlyName = Values::NONE, $attributes = Values::NONE, $dateCreated = Values::NONE, $dateUpdated = Values::NONE, $createdBy = Values::NONE)
- {
- $this->options['friendlyName'] = $friendlyName;
- $this->options['attributes'] = $attributes;
- $this->options['dateCreated'] = $dateCreated;
- $this->options['dateUpdated'] = $dateUpdated;
- $this->options['createdBy'] = $createdBy;
- }
-
- /**
- * A descriptive string that you create to describe the resource. It can be up to 64 characters long.
- *
- * @param string $friendlyName A string to describe the resource
- * @return $this Fluent Builder
- */
- public function setFriendlyName($friendlyName)
- {
- $this->options['friendlyName'] = $friendlyName;
- return $this;
- }
-
- /**
- * A JSON string that stores application-specific data.
- *
- * @param string $attributes A JSON string that stores application-specific data
- * @return $this Fluent Builder
- */
- public function setAttributes($attributes)
- {
- $this->options['attributes'] = $attributes;
- return $this;
- }
-
- /**
- * The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created.
- *
- * @param \DateTime $dateCreated The ISO 8601 date and time in GMT when the
- * resource was created
- * @return $this Fluent Builder
- */
- public function setDateCreated($dateCreated)
- {
- $this->options['dateCreated'] = $dateCreated;
- return $this;
- }
-
- /**
- * The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated.
- *
- * @param \DateTime $dateUpdated The ISO 8601 date and time in GMT when the
- * resource was updated
- * @return $this Fluent Builder
- */
- public function setDateUpdated($dateUpdated)
- {
- $this->options['dateUpdated'] = $dateUpdated;
- return $this;
- }
-
- /**
- * The Identity of the session's creator. If the Session was created through the API, the value will be `system`
- *
- * @param string $createdBy The Identity of the session's creator
- * @return $this Fluent Builder
- */
- public function setCreatedBy($createdBy)
- {
- $this->options['createdBy'] = $createdBy;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Messaging.V1.UpdateSessionOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/SessionPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/SessionPage.php
deleted file mode 100644
index e181d60..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/SessionPage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new SessionInstance($this->version, $payload);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Messaging.V1.SessionPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/WebhookContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/WebhookContext.php
deleted file mode 100644
index aecd7c8..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/WebhookContext.php
+++ /dev/null
@@ -1,105 +0,0 @@
-solution = array();
-
- $this->uri = '/Sessions/Webhooks';
- }
-
- /**
- * Fetch a WebhookInstance
- *
- * @return WebhookInstance Fetched WebhookInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new WebhookInstance($this->version, $payload);
- }
-
- /**
- * Update the WebhookInstance
- *
- * @param array|Options $options Optional Arguments
- * @return WebhookInstance Updated WebhookInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'WebhookMethod' => $options['webhookMethod'],
- 'WebhookFilters' => Serialize::map($options['webhookFilters'], function ($e) {
- return $e;
- }),
- 'PreWebhookUrl' => $options['preWebhookUrl'],
- 'PostWebhookUrl' => $options['postWebhookUrl'],
- 'PreWebhookRetryCount' => $options['preWebhookRetryCount'],
- 'PostWebhookRetryCount' => $options['postWebhookRetryCount'],
- 'Target' => $options['target'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new WebhookInstance($this->version, $payload);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Messaging.V1.WebhookContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/WebhookInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/WebhookInstance.php
deleted file mode 100644
index 24099bb..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/WebhookInstance.php
+++ /dev/null
@@ -1,135 +0,0 @@
-properties = array(
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'serviceSid' => Values::array_get($payload, 'service_sid'),
- 'webhookMethod' => Values::array_get($payload, 'webhook_method'),
- 'webhookFilters' => Values::array_get($payload, 'webhook_filters'),
- 'preWebhookUrl' => Values::array_get($payload, 'pre_webhook_url'),
- 'postWebhookUrl' => Values::array_get($payload, 'post_webhook_url'),
- 'preWebhookRetryCount' => Values::array_get($payload, 'pre_webhook_retry_count'),
- 'postWebhookRetryCount' => Values::array_get($payload, 'post_webhook_retry_count'),
- 'target' => Values::array_get($payload, 'target'),
- 'url' => Values::array_get($payload, 'url'),
- );
-
- $this->solution = array();
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Messaging\V1\WebhookContext Context for this
- * WebhookInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new WebhookContext($this->version);
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a WebhookInstance
- *
- * @return WebhookInstance Fetched WebhookInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Update the WebhookInstance
- *
- * @param array|Options $options Optional Arguments
- * @return WebhookInstance Updated WebhookInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- return $this->proxy()->update($options);
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Messaging.V1.WebhookInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/WebhookList.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/WebhookList.php
deleted file mode 100644
index 9de56b7..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/WebhookList.php
+++ /dev/null
@@ -1,53 +0,0 @@
-solution = array();
- }
-
- /**
- * Constructs a WebhookContext
- *
- * @return \Twilio\Rest\Messaging\V1\WebhookContext
- */
- public function getContext()
- {
- return new WebhookContext($this->version);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Messaging.V1.WebhookList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/WebhookOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/WebhookOptions.php
deleted file mode 100644
index 1974e58..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/WebhookOptions.php
+++ /dev/null
@@ -1,169 +0,0 @@
-options['webhookMethod'] = $webhookMethod;
- $this->options['webhookFilters'] = $webhookFilters;
- $this->options['preWebhookUrl'] = $preWebhookUrl;
- $this->options['postWebhookUrl'] = $postWebhookUrl;
- $this->options['preWebhookRetryCount'] = $preWebhookRetryCount;
- $this->options['postWebhookRetryCount'] = $postWebhookRetryCount;
- $this->options['target'] = $target;
- }
-
- /**
- * The HTTP method to use when sending a webhook request.
- *
- * @param string $webhookMethod The HTTP method to use when sending a webhook
- * request
- * @return $this Fluent Builder
- */
- public function setWebhookMethod($webhookMethod)
- {
- $this->options['webhookMethod'] = $webhookMethod;
- return $this;
- }
-
- /**
- * The list of webhook event triggers that are enabled for the Service.
- *
- * @param string $webhookFilters The list of webhook event triggers that are
- * enabled for the Service
- * @return $this Fluent Builder
- */
- public function setWebhookFilters($webhookFilters)
- {
- $this->options['webhookFilters'] = $webhookFilters;
- return $this;
- }
-
- /**
- * The absolute URL of the pre-event webhook.
- *
- * @param string $preWebhookUrl The absolute URL of the pre-event webhook
- * @return $this Fluent Builder
- */
- public function setPreWebhookUrl($preWebhookUrl)
- {
- $this->options['preWebhookUrl'] = $preWebhookUrl;
- return $this;
- }
-
- /**
- * The absolute URL of the post-event webhook.
- *
- * @param string $postWebhookUrl The absolute URL of the post-event webhook
- * @return $this Fluent Builder
- */
- public function setPostWebhookUrl($postWebhookUrl)
- {
- $this->options['postWebhookUrl'] = $postWebhookUrl;
- return $this;
- }
-
- /**
- * The number of times to try the pre-event webhook request if the first attempt fails. Can be up to 3 and the default is 0.
- *
- * @param int $preWebhookRetryCount The number of times to try the pre-event
- * webhook request if the first attempt fails
- * @return $this Fluent Builder
- */
- public function setPreWebhookRetryCount($preWebhookRetryCount)
- {
- $this->options['preWebhookRetryCount'] = $preWebhookRetryCount;
- return $this;
- }
-
- /**
- * The number of times to try the post-event webhook request if the first attempt fails. Can be up to 3 and the default is 0.
- *
- * @param int $postWebhookRetryCount The number of times to try the post-event
- * webhook request if the first attempt fails
- * @return $this Fluent Builder
- */
- public function setPostWebhookRetryCount($postWebhookRetryCount)
- {
- $this->options['postWebhookRetryCount'] = $postWebhookRetryCount;
- return $this;
- }
-
- /**
- * The routing target of the webhook. Can be ordinary or routed internally to Flex
- *
- * @param string $target The routing target of the webhook
- * @return $this Fluent Builder
- */
- public function setTarget($target)
- {
- $this->options['target'] = $target;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Messaging.V1.UpdateWebhookOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/WebhookPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/WebhookPage.php
deleted file mode 100644
index c9b6421..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Messaging/V1/WebhookPage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new WebhookInstance($this->version, $payload);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Messaging.V1.WebhookPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Monitor.php b/vendor/twilio/sdk/src/Twilio/Rest/Monitor.php
index bbcb89c..a1f9291 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Monitor.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Monitor.php
@@ -1,130 +1,41 @@
baseUrl = 'https://monitor.twilio.com';
- }
-
+class Monitor extends MonitorBase {
/**
- * @return \Twilio\Rest\Monitor\V1 Version v1 of monitor
+ * @deprecated Use v1->alerts instead.
*/
- protected function getV1()
- {
- if (!$this->_v1) {
- $this->_v1 = new V1($this);
- }
- return $this->_v1;
- }
-
- /**
- * Magic getter to lazy load version
- *
- * @param string $name Version to return
- * @return \Twilio\Version The requested version
- * @throws TwilioException For unknown versions
- */
- public function __get($name)
- {
- $method = 'get' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return $this->$method();
- }
-
- throw new TwilioException('Unknown version ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $method = 'context' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return \call_user_func_array(array($this, $method), $arguments);
- }
-
- throw new TwilioException('Unknown context ' . $name);
- }
-
- /**
- * @return \Twilio\Rest\Monitor\V1\AlertList
- */
- protected function getAlerts()
- {
+ protected function getAlerts(): \Twilio\Rest\Monitor\V1\AlertList {
+ echo "alerts is deprecated. Use v1->alerts instead.";
return $this->v1->alerts;
}
/**
+ * @deprecated Use v1->alerts(\$sid) instead.
* @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Monitor\V1\AlertContext
*/
- protected function contextAlerts($sid)
- {
+ protected function contextAlerts(string $sid): \Twilio\Rest\Monitor\V1\AlertContext {
+ echo "alerts(\$sid) is deprecated. Use v1->alerts(\$sid) instead.";
return $this->v1->alerts($sid);
}
/**
- * @return \Twilio\Rest\Monitor\V1\EventList
+ * @deprecated Use v1->events instead.
*/
- protected function getEvents()
- {
+ protected function getEvents(): \Twilio\Rest\Monitor\V1\EventList {
+ echo "events is deprecated. Use v1->events instead.";
return $this->v1->events;
}
/**
+ * @deprecated Use v1->events(\$sid) instead.
* @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Monitor\V1\EventContext
*/
- protected function contextEvents($sid)
- {
+ protected function contextEvents(string $sid): \Twilio\Rest\Monitor\V1\EventContext {
+ echo "events(\$sid) is deprecated. Use v1->events(\$sid) instead.";
return $this->v1->events($sid);
}
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Monitor]';
- }
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1.php b/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1.php
index b8a1b26..36c7af5 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1.php
@@ -1,36 +1,42 @@
version = 'v1';
}
- /**
- * @return \Twilio\Rest\Monitor\V1\AlertList
- */
- protected function getAlerts()
+ protected function getAlerts(): AlertList
{
if (!$this->_alerts) {
$this->_alerts = new AlertList($this);
@@ -49,10 +52,7 @@ protected function getAlerts()
return $this->_alerts;
}
- /**
- * @return \Twilio\Rest\Monitor\V1\EventList
- */
- protected function getEvents()
+ protected function getEvents(): EventList
{
if (!$this->_events) {
$this->_events = new EventList($this);
@@ -67,7 +67,7 @@ protected function getEvents()
* @return \Twilio\ListResource The requested resource
* @throws TwilioException For unknown resource
*/
- public function __get($name)
+ public function __get(string $name)
{
$method = 'get' . \ucfirst($name);
if (\method_exists($this, $method)) {
@@ -82,10 +82,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -100,8 +100,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Monitor.V1]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1/AlertContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1/AlertContext.php
index 9fb5c85..d7c0e3f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1/AlertContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1/AlertContext.php
@@ -2,67 +2,82 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Monitor
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Monitor\V1;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class AlertContext extends InstanceContext
-{
+ {
/**
* Initialize the AlertContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Monitor\V1\AlertContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid The SID of the Alert resource to fetch.
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Alerts/' . \rawurlencode($sid) . '';
+ $this->uri = '/Alerts/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a AlertInstance
+ * Fetch the AlertInstance
*
* @return AlertInstance Fetched AlertInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): AlertInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
- return new AlertInstance($this->version, $payload, $this->solution['sid']);
+ return new AlertInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Monitor.V1.AlertContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1/AlertInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1/AlertInstance.php
index 3b86a7b..f687fc5 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1/AlertInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1/AlertInstance.php
@@ -2,56 +2,64 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Monitor
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Monitor\V1;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property string $alertText
- * @property string $apiVersion
- * @property \DateTime $dateCreated
- * @property \DateTime $dateGenerated
- * @property \DateTime $dateUpdated
- * @property string $errorCode
- * @property string $logLevel
- * @property string $moreInfo
- * @property string $requestMethod
- * @property string $requestUrl
- * @property string $requestVariables
- * @property string $resourceSid
- * @property string $responseBody
- * @property string $responseHeaders
- * @property string $sid
- * @property string $url
- * @property string $requestHeaders
- * @property string $serviceSid
+ * @property string|null $accountSid
+ * @property string|null $alertText
+ * @property string|null $apiVersion
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateGenerated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $errorCode
+ * @property string|null $logLevel
+ * @property string|null $moreInfo
+ * @property string|null $requestMethod
+ * @property string|null $requestUrl
+ * @property string|null $requestVariables
+ * @property string|null $resourceSid
+ * @property string|null $responseBody
+ * @property string|null $responseHeaders
+ * @property string|null $sid
+ * @property string|null $url
+ * @property string|null $requestHeaders
+ * @property string|null $serviceSid
*/
class AlertInstance extends InstanceResource
{
/**
* Initialize the AlertInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Monitor\V1\AlertInstance
+ * @param string $sid The SID of the Alert resource to fetch.
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'alertText' => Values::array_get($payload, 'alert_text'),
'apiVersion' => Values::array_get($payload, 'api_version'),
@@ -71,34 +79,38 @@ public function __construct(Version $version, array $payload, $sid = null)
'url' => Values::array_get($payload, 'url'),
'requestHeaders' => Values::array_get($payload, 'request_headers'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Monitor\V1\AlertContext Context for this AlertInstance
+ * @return AlertContext Context for this AlertInstance
*/
- protected function proxy()
+ protected function proxy(): AlertContext
{
if (!$this->context) {
- $this->context = new AlertContext($this->version, $this->solution['sid']);
+ $this->context = new AlertContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a AlertInstance
+ * Fetch the AlertInstance
*
* @return AlertInstance Fetched AlertInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): AlertInstance
{
+
return $this->proxy()->fetch();
}
@@ -109,7 +121,7 @@ public function fetch()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -128,12 +140,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Monitor.V1.AlertInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1/AlertList.php b/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1/AlertList.php
index 07c8904..1d244eb 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1/AlertList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1/AlertList.php
@@ -2,113 +2,127 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Monitor
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Monitor\V1;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class AlertList extends ListResource
-{
+ {
/**
* Construct the AlertList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Monitor\V1\AlertList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/Alerts';
}
/**
- * Streams AlertInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Reads AlertInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
+ * @param int $limit Upper limit for the number of records to return. read()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
+ * page_size is defined but a limit is defined, read()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return AlertInstance[] Array of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($options, $limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
- * Reads AlertInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
+ * Streams AlertInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
+ * @param int $limit Upper limit for the number of records to return. stream()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
+ * page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return AlertInstance[] Array of results
+ * @return Stream stream of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
/**
* Retrieve a single page of AlertInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of AlertInstance
+ * @return AlertPage Page of AlertInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): AlertPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'LogLevel' => $options['logLevel'],
- 'StartDate' => Serialize::iso8601Date($options['startDate']),
- 'EndDate' => Serialize::iso8601Date($options['endDate']),
+
+ $params = Values::of([
+ 'LogLevel' =>
+ $options['logLevel'],
+ 'StartDate' =>
+ Serialize::iso8601DateTime($options['startDate']),
+ 'EndDate' =>
+ Serialize::iso8601DateTime($options['endDate']),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new AlertPage($this->version, $response, $this->solution);
}
@@ -118,9 +132,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of AlertInstance
+ * @return AlertPage Page of AlertInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): AlertPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -130,15 +144,21 @@ public function getPage($targetUrl)
return new AlertPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a AlertContext
*
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Monitor\V1\AlertContext
+ * @param string $sid The SID of the Alert resource to fetch.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): AlertContext
{
- return new AlertContext($this->version, $sid);
+ return new AlertContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -146,8 +166,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Monitor.V1.AlertList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1/AlertOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1/AlertOptions.php
index 6abc8dd..1ceaa62 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1/AlertOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1/AlertOptions.php
@@ -1,10 +1,16 @@
options['logLevel'] = $logLevel;
$this->options['startDate'] = $startDate;
$this->options['endDate'] = $endDate;
@@ -47,10 +67,10 @@ public function __construct($logLevel = Values::NONE, $startDate = Values::NONE,
/**
* Only show alerts for this log-level. Can be: `error`, `warning`, `notice`, or `debug`.
*
- * @param string $logLevel Only show alerts for this log-level
+ * @param string $logLevel Only show alerts for this log-level. Can be: `error`, `warning`, `notice`, or `debug`.
* @return $this Fluent Builder
*/
- public function setLogLevel($logLevel)
+ public function setLogLevel(string $logLevel): self
{
$this->options['logLevel'] = $logLevel;
return $this;
@@ -59,11 +79,10 @@ public function setLogLevel($logLevel)
/**
* Only include alerts that occurred on or after this date and time. Specify the date and time in GMT and format as `YYYY-MM-DD` or `YYYY-MM-DDThh:mm:ssZ`. Queries for alerts older than 30 days are not supported.
*
- * @param \DateTime $startDate Only include alerts that occurred on or after
- * this date and time
+ * @param \DateTime $startDate Only include alerts that occurred on or after this date and time. Specify the date and time in GMT and format as `YYYY-MM-DD` or `YYYY-MM-DDThh:mm:ssZ`. Queries for alerts older than 30 days are not supported.
* @return $this Fluent Builder
*/
- public function setStartDate($startDate)
+ public function setStartDate(\DateTime $startDate): self
{
$this->options['startDate'] = $startDate;
return $this;
@@ -72,11 +91,10 @@ public function setStartDate($startDate)
/**
* Only include alerts that occurred on or before this date and time. Specify the date and time in GMT and format as `YYYY-MM-DD` or `YYYY-MM-DDThh:mm:ssZ`. Queries for alerts older than 30 days are not supported.
*
- * @param \DateTime $endDate Only include alerts that occurred on or before
- * this date and time
+ * @param \DateTime $endDate Only include alerts that occurred on or before this date and time. Specify the date and time in GMT and format as `YYYY-MM-DD` or `YYYY-MM-DDThh:mm:ssZ`. Queries for alerts older than 30 days are not supported.
* @return $this Fluent Builder
*/
- public function setEndDate($endDate)
+ public function setEndDate(\DateTime $endDate): self
{
$this->options['endDate'] = $endDate;
return $this;
@@ -87,14 +105,10 @@ public function setEndDate($endDate)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Monitor.V1.ReadAlertOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Monitor.V1.ReadAlertOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1/AlertPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1/AlertPage.php
index 4891457..65c082b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1/AlertPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1/AlertPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return AlertInstance \Twilio\Rest\Monitor\V1\AlertInstance
+ */
+ public function buildInstance(array $payload): AlertInstance
{
return new AlertInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Monitor.V1.AlertPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1/EventContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1/EventContext.php
index 4784da0..5dc7d24 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1/EventContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1/EventContext.php
@@ -2,67 +2,82 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Monitor
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Monitor\V1;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class EventContext extends InstanceContext
-{
+ {
/**
* Initialize the EventContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Monitor\V1\EventContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid The SID of the Event resource to fetch.
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Events/' . \rawurlencode($sid) . '';
+ $this->uri = '/Events/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a EventInstance
+ * Fetch the EventInstance
*
* @return EventInstance Fetched EventInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): EventInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
- return new EventInstance($this->version, $payload, $this->solution['sid']);
+ return new EventInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Monitor.V1.EventContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1/EventInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1/EventInstance.php
index b3e64a6..c55f04e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1/EventInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1/EventInstance.php
@@ -2,51 +2,59 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Monitor
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Monitor\V1;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property string $actorSid
- * @property string $actorType
- * @property string $description
- * @property array $eventData
- * @property \DateTime $eventDate
- * @property string $eventType
- * @property string $resourceSid
- * @property string $resourceType
- * @property string $sid
- * @property string $source
- * @property string $sourceIpAddress
- * @property string $url
- * @property array $links
+ * @property string|null $accountSid
+ * @property string|null $actorSid
+ * @property string|null $actorType
+ * @property string|null $description
+ * @property array|null $eventData
+ * @property \DateTime|null $eventDate
+ * @property string|null $eventType
+ * @property string|null $resourceSid
+ * @property string|null $resourceType
+ * @property string|null $sid
+ * @property string|null $source
+ * @property string|null $sourceIpAddress
+ * @property string|null $url
+ * @property array|null $links
*/
class EventInstance extends InstanceResource
{
/**
* Initialize the EventInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Monitor\V1\EventInstance
+ * @param string $sid The SID of the Event resource to fetch.
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'actorSid' => Values::array_get($payload, 'actor_sid'),
'actorType' => Values::array_get($payload, 'actor_type'),
@@ -61,34 +69,38 @@ public function __construct(Version $version, array $payload, $sid = null)
'sourceIpAddress' => Values::array_get($payload, 'source_ip_address'),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Monitor\V1\EventContext Context for this EventInstance
+ * @return EventContext Context for this EventInstance
*/
- protected function proxy()
+ protected function proxy(): EventContext
{
if (!$this->context) {
- $this->context = new EventContext($this->version, $this->solution['sid']);
+ $this->context = new EventContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a EventInstance
+ * Fetch the EventInstance
*
* @return EventInstance Fetched EventInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): EventInstance
{
+
return $this->proxy()->fetch();
}
@@ -99,7 +111,7 @@ public function fetch()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -118,12 +130,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Monitor.V1.EventInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1/EventList.php b/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1/EventList.php
index 64926f5..3edfc77 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1/EventList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1/EventList.php
@@ -2,116 +2,133 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Monitor
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Monitor\V1;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class EventList extends ListResource
-{
+ {
/**
* Construct the EventList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Monitor\V1\EventList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/Events';
}
/**
- * Streams EventInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Reads EventInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
+ * @param int $limit Upper limit for the number of records to return. read()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
+ * page_size is defined but a limit is defined, read()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return EventInstance[] Array of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($options, $limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
- * Reads EventInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
+ * Streams EventInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
+ * @param int $limit Upper limit for the number of records to return. stream()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
+ * page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return EventInstance[] Array of results
+ * @return Stream stream of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
/**
* Retrieve a single page of EventInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of EventInstance
+ * @return EventPage Page of EventInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): EventPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'ActorSid' => $options['actorSid'],
- 'EventType' => $options['eventType'],
- 'ResourceSid' => $options['resourceSid'],
- 'SourceIpAddress' => $options['sourceIpAddress'],
- 'StartDate' => Serialize::iso8601DateTime($options['startDate']),
- 'EndDate' => Serialize::iso8601DateTime($options['endDate']),
+
+ $params = Values::of([
+ 'ActorSid' =>
+ $options['actorSid'],
+ 'EventType' =>
+ $options['eventType'],
+ 'ResourceSid' =>
+ $options['resourceSid'],
+ 'SourceIpAddress' =>
+ $options['sourceIpAddress'],
+ 'StartDate' =>
+ Serialize::iso8601DateTime($options['startDate']),
+ 'EndDate' =>
+ Serialize::iso8601DateTime($options['endDate']),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new EventPage($this->version, $response, $this->solution);
}
@@ -121,9 +138,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of EventInstance
+ * @return EventPage Page of EventInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): EventPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -133,15 +150,21 @@ public function getPage($targetUrl)
return new EventPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a EventContext
*
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Monitor\V1\EventContext
+ * @param string $sid The SID of the Event resource to fetch.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): EventContext
{
- return new EventContext($this->version, $sid);
+ return new EventContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -149,8 +172,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Monitor.V1.EventList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1/EventOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1/EventOptions.php
index d75bcab..ce8b9c3 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1/EventOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1/EventOptions.php
@@ -1,10 +1,16 @@
options['actorSid'] = $actorSid;
$this->options['eventType'] = $eventType;
$this->options['resourceSid'] = $resourceSid;
@@ -58,10 +85,10 @@ public function __construct($actorSid = Values::NONE, $eventType = Values::NONE,
/**
* Only include events initiated by this Actor. Useful for auditing actions taken by specific users or API credentials.
*
- * @param string $actorSid Only include events initiated by this Actor
+ * @param string $actorSid Only include events initiated by this Actor. Useful for auditing actions taken by specific users or API credentials.
* @return $this Fluent Builder
*/
- public function setActorSid($actorSid)
+ public function setActorSid(string $actorSid): self
{
$this->options['actorSid'] = $actorSid;
return $this;
@@ -70,10 +97,10 @@ public function setActorSid($actorSid)
/**
* Only include events of this [Event Type](https://www.twilio.com/docs/usage/monitor-events#event-types).
*
- * @param string $eventType Only include events of this Event Type
+ * @param string $eventType Only include events of this [Event Type](https://www.twilio.com/docs/usage/monitor-events#event-types).
* @return $this Fluent Builder
*/
- public function setEventType($eventType)
+ public function setEventType(string $eventType): self
{
$this->options['eventType'] = $eventType;
return $this;
@@ -82,10 +109,10 @@ public function setEventType($eventType)
/**
* Only include events that refer to this resource. Useful for discovering the history of a specific resource.
*
- * @param string $resourceSid Only include events that refer to this resource
+ * @param string $resourceSid Only include events that refer to this resource. Useful for discovering the history of a specific resource.
* @return $this Fluent Builder
*/
- public function setResourceSid($resourceSid)
+ public function setResourceSid(string $resourceSid): self
{
$this->options['resourceSid'] = $resourceSid;
return $this;
@@ -94,11 +121,10 @@ public function setResourceSid($resourceSid)
/**
* Only include events that originated from this IP address. Useful for tracking suspicious activity originating from the API or the Twilio Console.
*
- * @param string $sourceIpAddress Only include events that originated from this
- * IP address
+ * @param string $sourceIpAddress Only include events that originated from this IP address. Useful for tracking suspicious activity originating from the API or the Twilio Console.
* @return $this Fluent Builder
*/
- public function setSourceIpAddress($sourceIpAddress)
+ public function setSourceIpAddress(string $sourceIpAddress): self
{
$this->options['sourceIpAddress'] = $sourceIpAddress;
return $this;
@@ -107,11 +133,10 @@ public function setSourceIpAddress($sourceIpAddress)
/**
* Only include events that occurred on or after this date. Specify the date in GMT and [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
*
- * @param \DateTime $startDate Only include events that occurred on or after
- * this date
+ * @param \DateTime $startDate Only include events that occurred on or after this date. Specify the date in GMT and [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
* @return $this Fluent Builder
*/
- public function setStartDate($startDate)
+ public function setStartDate(\DateTime $startDate): self
{
$this->options['startDate'] = $startDate;
return $this;
@@ -120,11 +145,10 @@ public function setStartDate($startDate)
/**
* Only include events that occurred on or before this date. Specify the date in GMT and [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
*
- * @param \DateTime $endDate Only include events that occurred on or before
- * this date
+ * @param \DateTime $endDate Only include events that occurred on or before this date. Specify the date in GMT and [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
* @return $this Fluent Builder
*/
- public function setEndDate($endDate)
+ public function setEndDate(\DateTime $endDate): self
{
$this->options['endDate'] = $endDate;
return $this;
@@ -135,14 +159,10 @@ public function setEndDate($endDate)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Monitor.V1.ReadEventOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Monitor.V1.ReadEventOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1/EventPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1/EventPage.php
index 431799e..0288578 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1/EventPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Monitor/V1/EventPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return EventInstance \Twilio\Rest\Monitor\V1\EventInstance
+ */
+ public function buildInstance(array $payload): EventInstance
{
return new EventInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Monitor.V1.EventPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Notify.php b/vendor/twilio/sdk/src/Twilio/Rest/Notify.php
index d095665..f2bcfbb 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Notify.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Notify.php
@@ -1,130 +1,41 @@
baseUrl = 'https://notify.twilio.com';
- }
-
+class Notify extends NotifyBase {
/**
- * @return \Twilio\Rest\Notify\V1 Version v1 of notify
+ * @deprecated Use v1->credentials instead.
*/
- protected function getV1()
- {
- if (!$this->_v1) {
- $this->_v1 = new V1($this);
- }
- return $this->_v1;
- }
-
- /**
- * Magic getter to lazy load version
- *
- * @param string $name Version to return
- * @return \Twilio\Version The requested version
- * @throws TwilioException For unknown versions
- */
- public function __get($name)
- {
- $method = 'get' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return $this->$method();
- }
-
- throw new TwilioException('Unknown version ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $method = 'context' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return \call_user_func_array(array($this, $method), $arguments);
- }
-
- throw new TwilioException('Unknown context ' . $name);
- }
-
- /**
- * @return \Twilio\Rest\Notify\V1\CredentialList
- */
- protected function getCredentials()
- {
+ protected function getCredentials(): \Twilio\Rest\Notify\V1\CredentialList {
+ echo "credentials is deprecated. Use v1->credentials instead.";
return $this->v1->credentials;
}
/**
+ * @deprecated Use v1->credentials(\$sid) instead.
* @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Notify\V1\CredentialContext
*/
- protected function contextCredentials($sid)
- {
+ protected function contextCredentials(string $sid): \Twilio\Rest\Notify\V1\CredentialContext {
+ echo "credentials(\$sid) is deprecated. Use v1->credentials(\$sid) instead.";
return $this->v1->credentials($sid);
}
/**
- * @return \Twilio\Rest\Notify\V1\ServiceList
+ * @deprecated Use v1->services instead.
*/
- protected function getServices()
- {
+ protected function getServices(): \Twilio\Rest\Notify\V1\ServiceList {
+ echo "services is deprecated. Use v1->services instead.";
return $this->v1->services;
}
/**
+ * @deprecated Use v1->services(\$sid) instead.
* @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Notify\V1\ServiceContext
*/
- protected function contextServices($sid)
- {
+ protected function contextServices(string $sid): \Twilio\Rest\Notify\V1\ServiceContext {
+ echo "services(\$sid) is deprecated. Use v1->services(\$sid) instead.";
return $this->v1->services($sid);
}
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Notify]';
- }
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1.php b/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1.php
index ec9997c..35d718f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1.php
@@ -1,36 +1,42 @@
version = 'v1';
}
- /**
- * @return \Twilio\Rest\Notify\V1\CredentialList
- */
- protected function getCredentials()
+ protected function getCredentials(): CredentialList
{
if (!$this->_credentials) {
$this->_credentials = new CredentialList($this);
@@ -49,10 +52,7 @@ protected function getCredentials()
return $this->_credentials;
}
- /**
- * @return \Twilio\Rest\Notify\V1\ServiceList
- */
- protected function getServices()
+ protected function getServices(): ServiceList
{
if (!$this->_services) {
$this->_services = new ServiceList($this);
@@ -67,7 +67,7 @@ protected function getServices()
* @return \Twilio\ListResource The requested resource
* @throws TwilioException For unknown resource
*/
- public function __get($name)
+ public function __get(string $name)
{
$method = 'get' . \ucfirst($name);
if (\method_exists($this, $method)) {
@@ -82,10 +82,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -100,8 +100,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Notify.V1]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/CredentialContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/CredentialContext.php
index 435aa95..8bb59c6 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/CredentialContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/CredentialContext.php
@@ -2,113 +2,136 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Notify
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Notify\V1;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
class CredentialContext extends InstanceContext
-{
+ {
/**
* Initialize the CredentialContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Notify\V1\CredentialContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid The Twilio-provided string that uniquely identifies the Credential resource to delete.
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Credentials/' . \rawurlencode($sid) . '';
+ $this->uri = '/Credentials/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a CredentialInstance
+ * Delete the CredentialInstance
*
- * @return CredentialInstance Fetched CredentialInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
- return new CredentialInstance($this->version, $payload, $this->solution['sid']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Update the CredentialInstance
+ * Fetch the CredentialInstance
*
- * @param array|Options $options Optional Arguments
- * @return CredentialInstance Updated CredentialInstance
+ * @return CredentialInstance Fetched CredentialInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): CredentialInstance
{
- $options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'Certificate' => $options['certificate'],
- 'PrivateKey' => $options['privateKey'],
- 'Sandbox' => Serialize::booleanToString($options['sandbox']),
- 'ApiKey' => $options['apiKey'],
- 'Secret' => $options['secret'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
- return new CredentialInstance($this->version, $payload, $this->solution['sid']);
+ return new CredentialInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
- * Deletes the CredentialInstance
+ * Update the CredentialInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return CredentialInstance Updated CredentialInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): CredentialInstance
{
- return $this->version->delete('delete', $this->uri);
+
+ $options = new Values($options);
+
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'Certificate' =>
+ $options['certificate'],
+ 'PrivateKey' =>
+ $options['privateKey'],
+ 'Sandbox' =>
+ Serialize::booleanToString($options['sandbox']),
+ 'ApiKey' =>
+ $options['apiKey'],
+ 'Secret' =>
+ $options['secret'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
+
+ return new CredentialInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Notify.V1.CredentialContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/CredentialInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/CredentialInstance.php
index d6be4df..1d0282c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/CredentialInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/CredentialInstance.php
@@ -2,48 +2,54 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Notify
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Notify\V1;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property string $sid
- * @property string $accountSid
- * @property string $friendlyName
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $friendlyName
* @property string $type
- * @property string $sandbox
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
+ * @property string|null $sandbox
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
*/
class CredentialInstance extends InstanceResource
{
/**
* Initialize the CredentialInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Notify\V1\CredentialInstance
+ * @param string $sid The Twilio-provided string that uniquely identifies the Credential resource to delete.
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
@@ -52,59 +58,64 @@ public function __construct(Version $version, array $payload, $sid = null)
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Notify\V1\CredentialContext Context for this
- * CredentialInstance
+ * @return CredentialContext Context for this CredentialInstance
*/
- protected function proxy()
+ protected function proxy(): CredentialContext
{
if (!$this->context) {
- $this->context = new CredentialContext($this->version, $this->solution['sid']);
+ $this->context = new CredentialContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a CredentialInstance
+ * Delete the CredentialInstance
*
- * @return CredentialInstance Fetched CredentialInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Update the CredentialInstance
+ * Fetch the CredentialInstance
*
- * @param array|Options $options Optional Arguments
- * @return CredentialInstance Updated CredentialInstance
+ * @return CredentialInstance Fetched CredentialInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): CredentialInstance
{
- return $this->proxy()->update($options);
+
+ return $this->proxy()->fetch();
}
/**
- * Deletes the CredentialInstance
+ * Update the CredentialInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return CredentialInstance Updated CredentialInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): CredentialInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->update($options);
}
/**
@@ -114,7 +125,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -133,12 +144,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Notify.V1.CredentialInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/CredentialList.php b/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/CredentialList.php
index 0a9d14d..d95d93b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/CredentialList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/CredentialList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Notify
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Notify\V1;
@@ -12,58 +19,71 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
class CredentialList extends ListResource
-{
+ {
/**
* Construct the CredentialList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Notify\V1\CredentialList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/Credentials';
}
/**
- * Streams CredentialInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the CredentialInstance
*
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @param string $type
+ * @param array|Options $options Optional Arguments
+ * @return CredentialInstance Created CredentialInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($limit = null, $pageSize = null)
+ public function create(string $type, array $options = []): CredentialInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'Type' =>
+ $type,
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'Certificate' =>
+ $options['certificate'],
+ 'PrivateKey' =>
+ $options['privateKey'],
+ 'Sandbox' =>
+ Serialize::booleanToString($options['sandbox']),
+ 'ApiKey' =>
+ $options['apiKey'],
+ 'Secret' =>
+ $options['secret'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new CredentialInstance(
+ $this->version,
+ $payload
+ );
}
+
/**
* Reads CredentialInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -79,11 +99,38 @@ public function stream($limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return CredentialInstance[] Array of results
*/
- public function read($limit = null, $pageSize = null)
+ public function read(int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($limit, $pageSize), false);
}
+ /**
+ * Streams CredentialInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of CredentialInstance records from the API.
* Request is executed immediately
@@ -91,21 +138,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of CredentialInstance
+ * @return CredentialPage Page of CredentialInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): CredentialPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new CredentialPage($this->version, $response, $this->solution);
}
@@ -115,9 +163,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of CredentialInstance
+ * @return CredentialPage Page of CredentialInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): CredentialPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -127,47 +175,21 @@ public function getPage($targetUrl)
return new CredentialPage($this->version, $response, $this->solution);
}
- /**
- * Create a new CredentialInstance
- *
- * @param string $type The Credential type
- * @param array|Options $options Optional Arguments
- * @return CredentialInstance Newly created CredentialInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($type, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'Type' => $type,
- 'FriendlyName' => $options['friendlyName'],
- 'Certificate' => $options['certificate'],
- 'PrivateKey' => $options['privateKey'],
- 'Sandbox' => Serialize::booleanToString($options['sandbox']),
- 'ApiKey' => $options['apiKey'],
- 'Secret' => $options['secret'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new CredentialInstance($this->version, $payload);
- }
/**
* Constructs a CredentialContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Notify\V1\CredentialContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the Credential resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): CredentialContext
{
- return new CredentialContext($this->version, $sid);
+ return new CredentialContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -175,8 +197,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Notify.V1.CredentialList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/CredentialOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/CredentialOptions.php
index 463dee1..083fc67 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/CredentialOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/CredentialOptions.php
@@ -1,10 +1,16 @@
options['friendlyName'] = $friendlyName;
$this->options['certificate'] = $certificate;
$this->options['privateKey'] = $privateKey;
@@ -84,10 +116,10 @@ public function __construct($friendlyName = Values::NONE, $certificate = Values:
/**
* A descriptive string that you create to describe the resource. It can be up to 64 characters long.
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -96,24 +128,22 @@ public function setFriendlyName($friendlyName)
/**
* [APN only] The URL-encoded representation of the certificate. Strip everything outside of the headers, e.g. `-----BEGIN CERTIFICATE-----MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==-----END CERTIFICATE-----`
*
- * @param string $certificate [APN only] The URL-encoded representation of the
- * certificate
+ * @param string $certificate [APN only] The URL-encoded representation of the certificate. Strip everything outside of the headers, e.g. `-----BEGIN CERTIFICATE-----MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==-----END CERTIFICATE-----`
* @return $this Fluent Builder
*/
- public function setCertificate($certificate)
+ public function setCertificate(string $certificate): self
{
$this->options['certificate'] = $certificate;
return $this;
}
/**
- * [APN only] The URL-encoded representation of the private key. Strip everything outside of the headers, e.g. `-----BEGIN RSA PRIVATE KEY-----MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR\n.-----END RSA PRIVATE KEY-----`
+ * [APN only] The URL-encoded representation of the private key. Strip everything outside of the headers, e.g. `-----BEGIN RSA PRIVATE KEY-----MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR\\\\n.-----END RSA PRIVATE KEY-----`
*
- * @param string $privateKey [APN only] URL-encoded representation of the
- * private key
+ * @param string $privateKey [APN only] The URL-encoded representation of the private key. Strip everything outside of the headers, e.g. `-----BEGIN RSA PRIVATE KEY-----MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR\\\\n.-----END RSA PRIVATE KEY-----`
* @return $this Fluent Builder
*/
- public function setPrivateKey($privateKey)
+ public function setPrivateKey(string $privateKey): self
{
$this->options['privateKey'] = $privateKey;
return $this;
@@ -122,11 +152,10 @@ public function setPrivateKey($privateKey)
/**
* [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production.
*
- * @param bool $sandbox [APN only] Whether to send the credential to sandbox
- * APNs
+ * @param bool $sandbox [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production.
* @return $this Fluent Builder
*/
- public function setSandbox($sandbox)
+ public function setSandbox(bool $sandbox): self
{
$this->options['sandbox'] = $sandbox;
return $this;
@@ -135,11 +164,10 @@ public function setSandbox($sandbox)
/**
* [GCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging.
*
- * @param string $apiKey [GCM only] The `Server key` of your project from
- * Firebase console under Settings / Cloud messaging
+ * @param string $apiKey [GCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging.
* @return $this Fluent Builder
*/
- public function setApiKey($apiKey)
+ public function setApiKey(string $apiKey): self
{
$this->options['apiKey'] = $apiKey;
return $this;
@@ -148,11 +176,10 @@ public function setApiKey($apiKey)
/**
* [FCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging.
*
- * @param string $secret [FCM only] The `Server key` of your project from
- * Firebase console under Settings / Cloud messaging
+ * @param string $secret [FCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging.
* @return $this Fluent Builder
*/
- public function setSecret($secret)
+ public function setSecret(string $secret): self
{
$this->options['secret'] = $secret;
return $this;
@@ -163,35 +190,36 @@ public function setSecret($secret)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Notify.V1.CreateCredentialOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Notify.V1.CreateCredentialOptions ' . $options . ']';
}
}
+
+
+
class UpdateCredentialOptions extends Options
-{
+ {
/**
- * @param string $friendlyName A string to describe the resource
- * @param string $certificate [APN only] The URL-encoded representation of the
- * certificate
- * @param string $privateKey [APN only] URL-encoded representation of the
- * private key
- * @param bool $sandbox [APN only] Whether to send the credential to sandbox
- * APNs
- * @param string $apiKey [GCM only] The `Server key` of your project from
- * Firebase console under Settings / Cloud messaging
- * @param string $secret [FCM only] The `Server key` of your project from
- * Firebase console under Settings / Cloud messaging
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
+ * @param string $certificate [APN only] The URL-encoded representation of the certificate. Strip everything outside of the headers, e.g. `-----BEGIN CERTIFICATE-----MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==-----END CERTIFICATE-----`
+ * @param string $privateKey [APN only] The URL-encoded representation of the private key. Strip everything outside of the headers, e.g. `-----BEGIN RSA PRIVATE KEY-----MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR\\\\n.-----END RSA PRIVATE KEY-----`
+ * @param bool $sandbox [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production.
+ * @param string $apiKey [GCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging.
+ * @param string $secret [FCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging.
*/
- public function __construct($friendlyName = Values::NONE, $certificate = Values::NONE, $privateKey = Values::NONE, $sandbox = Values::NONE, $apiKey = Values::NONE, $secret = Values::NONE)
- {
+ public function __construct(
+
+ string $friendlyName = Values::NONE,
+ string $certificate = Values::NONE,
+ string $privateKey = Values::NONE,
+ bool $sandbox = Values::BOOL_NONE,
+ string $apiKey = Values::NONE,
+ string $secret = Values::NONE
+
+ ) {
$this->options['friendlyName'] = $friendlyName;
$this->options['certificate'] = $certificate;
$this->options['privateKey'] = $privateKey;
@@ -203,10 +231,10 @@ public function __construct($friendlyName = Values::NONE, $certificate = Values:
/**
* A descriptive string that you create to describe the resource. It can be up to 64 characters long.
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -215,24 +243,22 @@ public function setFriendlyName($friendlyName)
/**
* [APN only] The URL-encoded representation of the certificate. Strip everything outside of the headers, e.g. `-----BEGIN CERTIFICATE-----MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==-----END CERTIFICATE-----`
*
- * @param string $certificate [APN only] The URL-encoded representation of the
- * certificate
+ * @param string $certificate [APN only] The URL-encoded representation of the certificate. Strip everything outside of the headers, e.g. `-----BEGIN CERTIFICATE-----MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==-----END CERTIFICATE-----`
* @return $this Fluent Builder
*/
- public function setCertificate($certificate)
+ public function setCertificate(string $certificate): self
{
$this->options['certificate'] = $certificate;
return $this;
}
/**
- * [APN only] The URL-encoded representation of the private key. Strip everything outside of the headers, e.g. `-----BEGIN RSA PRIVATE KEY-----MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR\n.-----END RSA PRIVATE KEY-----`
+ * [APN only] The URL-encoded representation of the private key. Strip everything outside of the headers, e.g. `-----BEGIN RSA PRIVATE KEY-----MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR\\\\n.-----END RSA PRIVATE KEY-----`
*
- * @param string $privateKey [APN only] URL-encoded representation of the
- * private key
+ * @param string $privateKey [APN only] The URL-encoded representation of the private key. Strip everything outside of the headers, e.g. `-----BEGIN RSA PRIVATE KEY-----MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR\\\\n.-----END RSA PRIVATE KEY-----`
* @return $this Fluent Builder
*/
- public function setPrivateKey($privateKey)
+ public function setPrivateKey(string $privateKey): self
{
$this->options['privateKey'] = $privateKey;
return $this;
@@ -241,11 +267,10 @@ public function setPrivateKey($privateKey)
/**
* [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production.
*
- * @param bool $sandbox [APN only] Whether to send the credential to sandbox
- * APNs
+ * @param bool $sandbox [APN only] Whether to send the credential to sandbox APNs. Can be `true` to send to sandbox APNs or `false` to send to production.
* @return $this Fluent Builder
*/
- public function setSandbox($sandbox)
+ public function setSandbox(bool $sandbox): self
{
$this->options['sandbox'] = $sandbox;
return $this;
@@ -254,11 +279,10 @@ public function setSandbox($sandbox)
/**
* [GCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging.
*
- * @param string $apiKey [GCM only] The `Server key` of your project from
- * Firebase console under Settings / Cloud messaging
+ * @param string $apiKey [GCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging.
* @return $this Fluent Builder
*/
- public function setApiKey($apiKey)
+ public function setApiKey(string $apiKey): self
{
$this->options['apiKey'] = $apiKey;
return $this;
@@ -267,11 +291,10 @@ public function setApiKey($apiKey)
/**
* [FCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging.
*
- * @param string $secret [FCM only] The `Server key` of your project from
- * Firebase console under Settings / Cloud messaging
+ * @param string $secret [FCM only] The `Server key` of your project from Firebase console under Settings / Cloud messaging.
* @return $this Fluent Builder
*/
- public function setSecret($secret)
+ public function setSecret(string $secret): self
{
$this->options['secret'] = $secret;
return $this;
@@ -282,14 +305,10 @@ public function setSecret($secret)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Notify.V1.UpdateCredentialOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Notify.V1.UpdateCredentialOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/CredentialPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/CredentialPage.php
index 788427c..8a9e2de 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/CredentialPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/CredentialPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return CredentialInstance \Twilio\Rest\Notify\V1\CredentialInstance
+ */
+ public function buildInstance(array $payload): CredentialInstance
{
return new CredentialInstance($this->version, $payload);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Notify.V1.CredentialPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/Service/BindingContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/Service/BindingContext.php
index 97b3e8e..b0c3759 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/Service/BindingContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/Service/BindingContext.php
@@ -2,56 +2,81 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Notify
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Notify\V1\Service;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
class BindingContext extends InstanceContext
-{
+ {
/**
* Initialize the BindingContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the resource from
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Notify\V1\Service\BindingContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/notify/api/service-resource) to create the resource under.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Binding resource to delete.
*/
- public function __construct(Version $version, $serviceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Bindings/' . \rawurlencode($sid)
+ .'';
+ }
+
+ /**
+ * Delete the BindingInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Bindings/' . \rawurlencode($sid) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a BindingInstance
+ * Fetch the BindingInstance
*
* @return BindingInstance Fetched BindingInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): BindingInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new BindingInstance(
$this->version,
@@ -61,28 +86,18 @@ public function fetch()
);
}
- /**
- * Deletes the BindingInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Notify.V1.BindingContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/Service/BindingInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/Service/BindingInstance.php
index c515610..9bca8c6 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/Service/BindingInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/Service/BindingInstance.php
@@ -2,55 +2,60 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Notify
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Notify\V1\Service;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property string $sid
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $credentialSid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $notificationProtocolVersion
- * @property string $endpoint
- * @property string $identity
- * @property string $bindingType
- * @property string $address
- * @property string $tags
- * @property string $url
- * @property array $links
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $credentialSid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $notificationProtocolVersion
+ * @property string|null $endpoint
+ * @property string|null $identity
+ * @property string|null $bindingType
+ * @property string|null $address
+ * @property string[]|null $tags
+ * @property string|null $url
+ * @property array|null $links
*/
class BindingInstance extends InstanceResource
{
/**
* Initialize the BindingInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Notify\V1\Service\BindingInstance
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/notify/api/service-resource) to create the resource under.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Binding resource to delete.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
@@ -65,19 +70,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $sid
'tags' => Values::array_get($payload, 'tags'),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Notify\V1\Service\BindingContext Context for this
- * BindingInstance
+ * @return BindingContext Context for this BindingInstance
*/
- protected function proxy()
+ protected function proxy(): BindingContext
{
if (!$this->context) {
$this->context = new BindingContext(
@@ -91,25 +95,27 @@ protected function proxy()
}
/**
- * Fetch a BindingInstance
+ * Delete the BindingInstance
*
- * @return BindingInstance Fetched BindingInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the BindingInstance
+ * Fetch the BindingInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return BindingInstance Fetched BindingInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): BindingInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -119,7 +125,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -138,12 +144,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Notify.V1.BindingInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/Service/BindingList.php b/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/Service/BindingList.php
index 9ef0da8..131e715 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/Service/BindingList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/Service/BindingList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Notify
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Notify\V1\Service;
@@ -12,68 +19,99 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
class BindingList extends ListResource
-{
+ {
/**
* Construct the BindingList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @return \Twilio\Rest\Notify\V1\Service\BindingList
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/notify/api/service-resource) to create the resource under.
*/
- public function __construct(Version $version, $serviceSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Bindings';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Bindings';
}
/**
- * Create a new BindingInstance
+ * Create the BindingInstance
*
- * @param string $identity The `identity` value that identifies the new
- * resource's User
- * @param string $bindingType The type of the Binding
- * @param string $address The channel-specific address
+ * @param string $identity The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/notify/api/service-resource). Up to 20 Bindings can be created for the same Identity in a given Service.
+ * @param string $bindingType
+ * @param string $address The channel-specific address. For APNS, the device token. For FCM and GCM, the registration token. For SMS, a phone number in E.164 format. For Facebook Messenger, the Messenger ID of the user or a phone number in E.164 format.
* @param array|Options $options Optional Arguments
- * @return BindingInstance Newly created BindingInstance
+ * @return BindingInstance Created BindingInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($identity, $bindingType, $address, $options = array())
+ public function create(string $identity, string $bindingType, string $address, array $options = []): BindingInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'Identity' => $identity,
- 'BindingType' => $bindingType,
- 'Address' => $address,
- 'Tag' => Serialize::map($options['tag'], function ($e) {
- return $e;
- }),
- 'NotificationProtocolVersion' => $options['notificationProtocolVersion'],
- 'CredentialSid' => $options['credentialSid'],
- 'Endpoint' => $options['endpoint'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'Identity' =>
+ $identity,
+ 'BindingType' =>
+ $bindingType,
+ 'Address' =>
+ $address,
+ 'Tag' =>
+ Serialize::map($options['tag'], function ($e) { return $e; }),
+ 'NotificationProtocolVersion' =>
+ $options['notificationProtocolVersion'],
+ 'CredentialSid' =>
+ $options['credentialSid'],
+ 'Endpoint' =>
+ $options['endpoint'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new BindingInstance(
+ $this->version,
+ $payload,
+ $this->solution['serviceSid']
);
+ }
+
- return new BindingInstance($this->version, $payload, $this->solution['serviceSid']);
+ /**
+ * Reads BindingInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return BindingInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -93,9 +131,9 @@ public function create($identity, $bindingType, $address, $options = array())
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -104,59 +142,39 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads BindingInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return BindingInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of BindingInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of BindingInstance
+ * @return BindingPage Page of BindingInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): BindingPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'StartDate' => Serialize::iso8601Date($options['startDate']),
- 'EndDate' => Serialize::iso8601Date($options['endDate']),
- 'Identity' => Serialize::map($options['identity'], function ($e) {
- return $e;
- }),
- 'Tag' => Serialize::map($options['tag'], function ($e) {
- return $e;
- }),
+
+ $params = Values::of([
+ 'StartDate' =>
+ Serialize::iso8601Date($options['startDate']),
+ 'EndDate' =>
+ Serialize::iso8601Date($options['endDate']),
+ 'Identity' =>
+ Serialize::map($options['identity'], function ($e) { return $e; }),
+ 'Tag' =>
+ Serialize::map($options['tag'], function ($e) { return $e; }),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new BindingPage($this->version, $response, $this->solution);
}
@@ -166,9 +184,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of BindingInstance
+ * @return BindingPage Page of BindingInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): BindingPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -178,15 +196,22 @@ public function getPage($targetUrl)
return new BindingPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a BindingContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Notify\V1\Service\BindingContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the Binding resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): BindingContext
{
- return new BindingContext($this->version, $this->solution['serviceSid'], $sid);
+ return new BindingContext(
+ $this->version,
+ $this->solution['serviceSid'],
+ $sid
+ );
}
/**
@@ -194,8 +219,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Notify.V1.BindingList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/Service/BindingOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/Service/BindingOptions.php
index 55e6206..81070e5 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/Service/BindingOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/Service/BindingOptions.php
@@ -1,10 +1,16 @@
options['tag'] = $tag;
$this->options['notificationProtocolVersion'] = $notificationProtocolVersion;
$this->options['credentialSid'] = $credentialSid;
@@ -67,23 +97,22 @@ public function __construct($tag = Values::NONE, $notificationProtocolVersion =
/**
* A tag that can be used to select the Bindings to notify. Repeat this parameter to specify more than one tag, up to a total of 20 tags.
*
- * @param string $tag A tag that can be used to select the Bindings to notify
+ * @param string[] $tag A tag that can be used to select the Bindings to notify. Repeat this parameter to specify more than one tag, up to a total of 20 tags.
* @return $this Fluent Builder
*/
- public function setTag($tag)
+ public function setTag(array $tag): self
{
$this->options['tag'] = $tag;
return $this;
}
/**
- * The protocol version to use to send the notification. This defaults to the value of `default_xxxx_notification_protocol_version` for the protocol in the [Service](https://www.twilio.com/docs/notify/api/service-resource). The current version is `"3"` for `apn`, `fcm`, and `gcm` type Bindings. The parameter is not applicable to `sms` and `facebook-messenger` type Bindings as the data format is fixed.
+ * The protocol version to use to send the notification. This defaults to the value of `default_xxxx_notification_protocol_version` for the protocol in the [Service](https://www.twilio.com/docs/notify/api/service-resource). The current version is `\\\"3\\\"` for `apn`, `fcm`, and `gcm` type Bindings. The parameter is not applicable to `sms` and `facebook-messenger` type Bindings as the data format is fixed.
*
- * @param string $notificationProtocolVersion The protocol version to use to
- * send the notification
+ * @param string $notificationProtocolVersion The protocol version to use to send the notification. This defaults to the value of `default_xxxx_notification_protocol_version` for the protocol in the [Service](https://www.twilio.com/docs/notify/api/service-resource). The current version is `\\\"3\\\"` for `apn`, `fcm`, and `gcm` type Bindings. The parameter is not applicable to `sms` and `facebook-messenger` type Bindings as the data format is fixed.
* @return $this Fluent Builder
*/
- public function setNotificationProtocolVersion($notificationProtocolVersion)
+ public function setNotificationProtocolVersion(string $notificationProtocolVersion): self
{
$this->options['notificationProtocolVersion'] = $notificationProtocolVersion;
return $this;
@@ -92,11 +121,10 @@ public function setNotificationProtocolVersion($notificationProtocolVersion)
/**
* The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) resource to be used to send notifications to this Binding. If present, this overrides the Credential specified in the Service resource. Applies to only `apn`, `fcm`, and `gcm` type Bindings.
*
- * @param string $credentialSid The SID of the Credential resource to be used
- * to send notifications to this Binding
+ * @param string $credentialSid The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) resource to be used to send notifications to this Binding. If present, this overrides the Credential specified in the Service resource. Applies to only `apn`, `fcm`, and `gcm` type Bindings.
* @return $this Fluent Builder
*/
- public function setCredentialSid($credentialSid)
+ public function setCredentialSid(string $credentialSid): self
{
$this->options['credentialSid'] = $credentialSid;
return $this;
@@ -105,10 +133,10 @@ public function setCredentialSid($credentialSid)
/**
* Deprecated.
*
- * @param string $endpoint Deprecated
+ * @param string $endpoint Deprecated.
* @return $this Fluent Builder
*/
- public function setEndpoint($endpoint)
+ public function setEndpoint(string $endpoint): self
{
$this->options['endpoint'] = $endpoint;
return $this;
@@ -119,30 +147,31 @@ public function setEndpoint($endpoint)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Notify.V1.CreateBindingOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Notify.V1.CreateBindingOptions ' . $options . ']';
}
}
+
+
class ReadBindingOptions extends Options
-{
+ {
/**
- * @param \DateTime $startDate Only include usage that has occurred on or after
- * this date
- * @param \DateTime $endDate Only include usage that occurred on or before this
- * date
- * @param string $identity The `identity` value of the resources to read
- * @param string $tag Only list Bindings that have all of the specified Tags
+ * @param \DateTime $startDate Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`.
+ * @param \DateTime $endDate Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`.
+ * @param string[] $identity The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the resources to read.
+ * @param string[] $tag Only list Bindings that have all of the specified Tags. The following implicit tags are available: `all`, `apn`, `fcm`, `gcm`, `sms`, `facebook-messenger`. Up to 5 tags are allowed.
*/
- public function __construct($startDate = Values::NONE, $endDate = Values::NONE, $identity = Values::NONE, $tag = Values::NONE)
- {
+ public function __construct(
+
+ \DateTime $startDate = null,
+ \DateTime $endDate = null,
+ array $identity = Values::ARRAY_NONE,
+ array $tag = Values::ARRAY_NONE
+
+ ) {
$this->options['startDate'] = $startDate;
$this->options['endDate'] = $endDate;
$this->options['identity'] = $identity;
@@ -152,11 +181,10 @@ public function __construct($startDate = Values::NONE, $endDate = Values::NONE,
/**
* Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`.
*
- * @param \DateTime $startDate Only include usage that has occurred on or after
- * this date
+ * @param \DateTime $startDate Only include usage that has occurred on or after this date. Specify the date in GMT and format as `YYYY-MM-DD`.
* @return $this Fluent Builder
*/
- public function setStartDate($startDate)
+ public function setStartDate(\DateTime $startDate): self
{
$this->options['startDate'] = $startDate;
return $this;
@@ -165,11 +193,10 @@ public function setStartDate($startDate)
/**
* Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`.
*
- * @param \DateTime $endDate Only include usage that occurred on or before this
- * date
+ * @param \DateTime $endDate Only include usage that occurred on or before this date. Specify the date in GMT and format as `YYYY-MM-DD`.
* @return $this Fluent Builder
*/
- public function setEndDate($endDate)
+ public function setEndDate(\DateTime $endDate): self
{
$this->options['endDate'] = $endDate;
return $this;
@@ -178,10 +205,10 @@ public function setEndDate($endDate)
/**
* The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the resources to read.
*
- * @param string $identity The `identity` value of the resources to read
+ * @param string[] $identity The [User](https://www.twilio.com/docs/chat/rest/user-resource)'s `identity` value of the resources to read.
* @return $this Fluent Builder
*/
- public function setIdentity($identity)
+ public function setIdentity(array $identity): self
{
$this->options['identity'] = $identity;
return $this;
@@ -190,10 +217,10 @@ public function setIdentity($identity)
/**
* Only list Bindings that have all of the specified Tags. The following implicit tags are available: `all`, `apn`, `fcm`, `gcm`, `sms`, `facebook-messenger`. Up to 5 tags are allowed.
*
- * @param string $tag Only list Bindings that have all of the specified Tags
+ * @param string[] $tag Only list Bindings that have all of the specified Tags. The following implicit tags are available: `all`, `apn`, `fcm`, `gcm`, `sms`, `facebook-messenger`. Up to 5 tags are allowed.
* @return $this Fluent Builder
*/
- public function setTag($tag)
+ public function setTag(array $tag): self
{
$this->options['tag'] = $tag;
return $this;
@@ -204,14 +231,10 @@ public function setTag($tag)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Notify.V1.ReadBindingOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Notify.V1.ReadBindingOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/Service/BindingPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/Service/BindingPage.php
index fc68c3c..15dab16 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/Service/BindingPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/Service/BindingPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return BindingInstance \Twilio\Rest\Notify\V1\Service\BindingInstance
+ */
+ public function buildInstance(array $payload): BindingInstance
{
return new BindingInstance($this->version, $payload, $this->solution['serviceSid']);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Notify.V1.BindingPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/Service/NotificationInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/Service/NotificationInstance.php
index fdc905a..2daa540 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/Service/NotificationInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/Service/NotificationInstance.php
@@ -2,60 +2,65 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Notify
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Notify\V1\Service;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property string $sid
- * @property string $accountSid
- * @property string $serviceSid
- * @property \DateTime $dateCreated
- * @property string $identities
- * @property string $tags
- * @property string $segments
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property \DateTime|null $dateCreated
+ * @property string[]|null $identities
+ * @property string[]|null $tags
+ * @property string[]|null $segments
* @property string $priority
* @property int $ttl
- * @property string $title
- * @property string $body
- * @property string $sound
- * @property string $action
- * @property array $data
- * @property array $apn
- * @property array $gcm
- * @property array $fcm
- * @property array $sms
- * @property array $facebookMessenger
- * @property array $alexa
+ * @property string|null $title
+ * @property string|null $body
+ * @property string|null $sound
+ * @property string|null $action
+ * @property array|null $data
+ * @property array|null $apn
+ * @property array|null $gcm
+ * @property array|null $fcm
+ * @property array|null $sms
+ * @property array|null $facebookMessenger
+ * @property array|null $alexa
*/
class NotificationInstance extends InstanceResource
{
/**
* Initialize the NotificationInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @return \Twilio\Rest\Notify\V1\Service\NotificationInstance
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/notify/api/service-resource) to create the resource under.
*/
- public function __construct(Version $version, array $payload, $serviceSid)
+ public function __construct(Version $version, array $payload, string $serviceSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
@@ -76,9 +81,9 @@ public function __construct(Version $version, array $payload, $serviceSid)
'sms' => Values::array_get($payload, 'sms'),
'facebookMessenger' => Values::array_get($payload, 'facebook_messenger'),
'alexa' => Values::array_get($payload, 'alexa'),
- );
+ ];
- $this->solution = array('serviceSid' => $serviceSid,);
+ $this->solution = ['serviceSid' => $serviceSid, ];
}
/**
@@ -88,7 +93,7 @@ public function __construct(Version $version, array $payload, $serviceSid)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -107,8 +112,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Notify.V1.NotificationInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/Service/NotificationList.php b/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/Service/NotificationList.php
index 1c87e77..8756960 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/Service/NotificationList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/Service/NotificationList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Notify
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Notify\V1\Service;
@@ -12,90 +19,105 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
class NotificationList extends ListResource
-{
+ {
/**
* Construct the NotificationList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @return \Twilio\Rest\Notify\V1\Service\NotificationList
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/notify/api/service-resource) to create the resource under.
*/
- public function __construct(Version $version, $serviceSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ ];
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Notifications';
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Notifications';
}
/**
- * Create a new NotificationInstance
+ * Create the NotificationInstance
*
* @param array|Options $options Optional Arguments
- * @return NotificationInstance Newly created NotificationInstance
+ * @return NotificationInstance Created NotificationInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($options = array())
+ public function create(array $options = []): NotificationInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'Identity' => Serialize::map($options['identity'], function ($e) {
- return $e;
- }),
- 'Tag' => Serialize::map($options['tag'], function ($e) {
- return $e;
- }),
- 'Body' => $options['body'],
- 'Priority' => $options['priority'],
- 'Ttl' => $options['ttl'],
- 'Title' => $options['title'],
- 'Sound' => $options['sound'],
- 'Action' => $options['action'],
- 'Data' => Serialize::jsonObject($options['data']),
- 'Apn' => Serialize::jsonObject($options['apn']),
- 'Gcm' => Serialize::jsonObject($options['gcm']),
- 'Sms' => Serialize::jsonObject($options['sms']),
- 'FacebookMessenger' => Serialize::jsonObject($options['facebookMessenger']),
- 'Fcm' => Serialize::jsonObject($options['fcm']),
- 'Segment' => Serialize::map($options['segment'], function ($e) {
- return $e;
- }),
- 'Alexa' => Serialize::jsonObject($options['alexa']),
- 'ToBinding' => Serialize::map($options['toBinding'], function ($e) {
- return $e;
- }),
- 'DeliveryCallbackUrl' => $options['deliveryCallbackUrl'],
- ));
+ $data = Values::of([
+ 'Body' =>
+ $options['body'],
+ 'Priority' =>
+ $options['priority'],
+ 'Ttl' =>
+ $options['ttl'],
+ 'Title' =>
+ $options['title'],
+ 'Sound' =>
+ $options['sound'],
+ 'Action' =>
+ $options['action'],
+ 'Data' =>
+ Serialize::jsonObject($options['data']),
+ 'Apn' =>
+ Serialize::jsonObject($options['apn']),
+ 'Gcm' =>
+ Serialize::jsonObject($options['gcm']),
+ 'Sms' =>
+ Serialize::jsonObject($options['sms']),
+ 'FacebookMessenger' =>
+ Serialize::jsonObject($options['facebookMessenger']),
+ 'Fcm' =>
+ Serialize::jsonObject($options['fcm']),
+ 'Segment' =>
+ Serialize::map($options['segment'], function ($e) { return $e; }),
+ 'Alexa' =>
+ Serialize::jsonObject($options['alexa']),
+ 'ToBinding' =>
+ Serialize::map($options['toBinding'], function ($e) { return $e; }),
+ 'DeliveryCallbackUrl' =>
+ $options['deliveryCallbackUrl'],
+ 'Identity' =>
+ Serialize::map($options['identity'], function ($e) { return $e; }),
+ 'Tag' =>
+ Serialize::map($options['tag'], function ($e) { return $e; }),
+ ]);
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
- return new NotificationInstance($this->version, $payload, $this->solution['serviceSid']);
+ return new NotificationInstance(
+ $this->version,
+ $payload,
+ $this->solution['serviceSid']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Notify.V1.NotificationList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/Service/NotificationOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/Service/NotificationOptions.php
index ecb9046..fe7c760 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/Service/NotificationOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/Service/NotificationOptions.php
@@ -1,10 +1,16 @@
options['identity'] = $identity;
$this->options['tag'] = $tag;
$this->options['body'] = $body;
@@ -101,11 +155,10 @@ public function __construct($identity = Values::NONE, $tag = Values::NONE, $body
/**
* The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/notify/api/service-resource). Delivery will be attempted only to Bindings with an Identity in this list. No more than 20 items are allowed in this list.
*
- * @param string $identity The `identity` value that identifies the new
- * resource's User
+ * @param string[] $identity The `identity` value that uniquely identifies the new resource's [User](https://www.twilio.com/docs/chat/rest/user-resource) within the [Service](https://www.twilio.com/docs/notify/api/service-resource). Delivery will be attempted only to Bindings with an Identity in this list. No more than 20 items are allowed in this list.
* @return $this Fluent Builder
*/
- public function setIdentity($identity)
+ public function setIdentity(array $identity): self
{
$this->options['identity'] = $identity;
return $this;
@@ -114,10 +167,10 @@ public function setIdentity($identity)
/**
* A tag that selects the Bindings to notify. Repeat this parameter to specify more than one tag, up to a total of 5 tags. The implicit tag `all` is available to notify all Bindings in a Service instance. Similarly, the implicit tags `apn`, `fcm`, `gcm`, `sms` and `facebook-messenger` are available to notify all Bindings in a specific channel.
*
- * @param string $tag A tag that selects the Bindings to notify
+ * @param string[] $tag A tag that selects the Bindings to notify. Repeat this parameter to specify more than one tag, up to a total of 5 tags. The implicit tag `all` is available to notify all Bindings in a Service instance. Similarly, the implicit tags `apn`, `fcm`, `gcm`, `sms` and `facebook-messenger` are available to notify all Bindings in a specific channel.
* @return $this Fluent Builder
*/
- public function setTag($tag)
+ public function setTag(array $tag): self
{
$this->options['tag'] = $tag;
return $this;
@@ -126,22 +179,20 @@ public function setTag($tag)
/**
* The notification text. For FCM and GCM, translates to `data.twi_body`. For APNS, translates to `aps.alert.body`. For SMS, translates to `body`. SMS requires either this `body` value, or `media_urls` attribute defined in the `sms` parameter of the notification.
*
- * @param string $body The notification body text
+ * @param string $body The notification text. For FCM and GCM, translates to `data.twi_body`. For APNS, translates to `aps.alert.body`. For SMS, translates to `body`. SMS requires either this `body` value, or `media_urls` attribute defined in the `sms` parameter of the notification.
* @return $this Fluent Builder
*/
- public function setBody($body)
+ public function setBody(string $body): self
{
$this->options['body'] = $body;
return $this;
}
/**
- * The priority of the notification. Can be: `low` or `high` and the default is `high`. A value of `low` optimizes the client app's battery consumption; however, notifications may be delivered with unspecified delay. For FCM and GCM, `low` priority is the same as `Normal` priority. For APNS `low` priority is the same as `5`. A value of `high` sends the notification immediately, and can wake up a sleeping device. For FCM and GCM, `high` is the same as `High` priority. For APNS, `high` is a priority `10`. SMS does not support this property.
- *
- * @param string $priority The priority of the notification
+ * @param string $priority
* @return $this Fluent Builder
*/
- public function setPriority($priority)
+ public function setPriority(string $priority): self
{
$this->options['priority'] = $priority;
return $this;
@@ -150,10 +201,10 @@ public function setPriority($priority)
/**
* How long, in seconds, the notification is valid. Can be an integer between 0 and 2,419,200, which is 4 weeks, the default and the maximum supported time to live (TTL). Delivery should be attempted if the device is offline until the TTL elapses. Zero means that the notification delivery is attempted immediately, only once, and is not stored for future delivery. SMS does not support this property.
*
- * @param int $ttl How long, in seconds, the notification is valid
+ * @param int $ttl How long, in seconds, the notification is valid. Can be an integer between 0 and 2,419,200, which is 4 weeks, the default and the maximum supported time to live (TTL). Delivery should be attempted if the device is offline until the TTL elapses. Zero means that the notification delivery is attempted immediately, only once, and is not stored for future delivery. SMS does not support this property.
* @return $this Fluent Builder
*/
- public function setTtl($ttl)
+ public function setTtl(int $ttl): self
{
$this->options['ttl'] = $ttl;
return $this;
@@ -162,10 +213,10 @@ public function setTtl($ttl)
/**
* The notification title. For FCM and GCM, this translates to the `data.twi_title` value. For APNS, this translates to the `aps.alert.title` value. SMS does not support this property. This field is not visible on iOS phones and tablets but appears on Apple Watch and Android devices.
*
- * @param string $title The notification title
+ * @param string $title The notification title. For FCM and GCM, this translates to the `data.twi_title` value. For APNS, this translates to the `aps.alert.title` value. SMS does not support this property. This field is not visible on iOS phones and tablets but appears on Apple Watch and Android devices.
* @return $this Fluent Builder
*/
- public function setTitle($title)
+ public function setTitle(string $title): self
{
$this->options['title'] = $title;
return $this;
@@ -174,10 +225,10 @@ public function setTitle($title)
/**
* The name of the sound to be played for the notification. For FCM and GCM, this Translates to `data.twi_sound`. For APNS, this translates to `aps.sound`. SMS does not support this property.
*
- * @param string $sound The name of the sound to be played for the notification
+ * @param string $sound The name of the sound to be played for the notification. For FCM and GCM, this Translates to `data.twi_sound`. For APNS, this translates to `aps.sound`. SMS does not support this property.
* @return $this Fluent Builder
*/
- public function setSound($sound)
+ public function setSound(string $sound): self
{
$this->options['sound'] = $sound;
return $this;
@@ -186,10 +237,10 @@ public function setSound($sound)
/**
* The actions to display for the notification. For APNS, translates to the `aps.category` value. For GCM, translates to the `data.twi_action` value. For SMS, this parameter is not supported and is omitted from deliveries to those channels.
*
- * @param string $action The actions to display for the notification
+ * @param string $action The actions to display for the notification. For APNS, translates to the `aps.category` value. For GCM, translates to the `data.twi_action` value. For SMS, this parameter is not supported and is omitted from deliveries to those channels.
* @return $this Fluent Builder
*/
- public function setAction($action)
+ public function setAction(string $action): self
{
$this->options['action'] = $action;
return $this;
@@ -198,10 +249,10 @@ public function setAction($action)
/**
* The custom key-value pairs of the notification's payload. For FCM and GCM, this value translates to `data` in the FCM and GCM payloads. FCM and GCM [reserve certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref) that cannot be used in those channels. For APNS, attributes of `data` are inserted into the APNS payload as custom properties outside of the `aps` dictionary. In all channels, we reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed and are rejected as 400 Bad request with no delivery attempted. For SMS, this parameter is not supported and is omitted from deliveries to those channels.
*
- * @param array $data The custom key-value pairs of the notification's payload
+ * @param array $data The custom key-value pairs of the notification's payload. For FCM and GCM, this value translates to `data` in the FCM and GCM payloads. FCM and GCM [reserve certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref) that cannot be used in those channels. For APNS, attributes of `data` are inserted into the APNS payload as custom properties outside of the `aps` dictionary. In all channels, we reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed and are rejected as 400 Bad request with no delivery attempted. For SMS, this parameter is not supported and is omitted from deliveries to those channels.
* @return $this Fluent Builder
*/
- public function setData($data)
+ public function setData(array $data): self
{
$this->options['data'] = $data;
return $this;
@@ -210,11 +261,10 @@ public function setData($data)
/**
* The APNS-specific payload that overrides corresponding attributes in the generic payload for APNS Bindings. This property maps to the APNS `Payload` item, therefore the `aps` key must be used to change standard attributes. Adds custom key-value pairs to the root of the dictionary. See the [APNS documentation](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html) for more details. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed.
*
- * @param array $apn The APNS-specific payload that overrides corresponding
- * attributes in a generic payload for APNS Bindings
+ * @param array $apn The APNS-specific payload that overrides corresponding attributes in the generic payload for APNS Bindings. This property maps to the APNS `Payload` item, therefore the `aps` key must be used to change standard attributes. Adds custom key-value pairs to the root of the dictionary. See the [APNS documentation](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html) for more details. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed.
* @return $this Fluent Builder
*/
- public function setApn($apn)
+ public function setApn(array $apn): self
{
$this->options['apn'] = $apn;
return $this;
@@ -223,24 +273,22 @@ public function setApn($apn)
/**
* The GCM-specific payload that overrides corresponding attributes in the generic payload for GCM Bindings. This property maps to the root JSON dictionary. See the [GCM documentation](https://firebase.google.com/docs/cloud-messaging/http-server-ref) for more details. Target parameters `to`, `registration_ids`, and `notification_key` are not allowed. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. GCM also [reserves certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref).
*
- * @param array $gcm The GCM-specific payload that overrides corresponding
- * attributes in generic payload for GCM Bindings
+ * @param array $gcm The GCM-specific payload that overrides corresponding attributes in the generic payload for GCM Bindings. This property maps to the root JSON dictionary. See the [GCM documentation](https://firebase.google.com/docs/cloud-messaging/http-server-ref) for more details. Target parameters `to`, `registration_ids`, and `notification_key` are not allowed. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. GCM also [reserves certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref).
* @return $this Fluent Builder
*/
- public function setGcm($gcm)
+ public function setGcm(array $gcm): self
{
$this->options['gcm'] = $gcm;
return $this;
}
/**
- * The SMS-specific payload that overrides corresponding attributes in the generic payload for SMS Bindings. Each attribute in this value maps to the corresponding `form` parameter of the Twilio [Message](https://www.twilio.com/docs/sms/send-messages) resource. These parameters of the Message resource are supported in snake case format: `body`, `media_urls`, `status_callback`, and `max_price`. The `status_callback` parameter overrides the corresponding parameter in the messaging service, if configured. The `media_urls` property expects a JSON array.
+ * The SMS-specific payload that overrides corresponding attributes in the generic payload for SMS Bindings. Each attribute in this value maps to the corresponding `form` parameter of the Twilio [Message](https://www.twilio.com/docs/sms/quickstart) resource. These parameters of the Message resource are supported in snake case format: `body`, `media_urls`, `status_callback`, and `max_price`. The `status_callback` parameter overrides the corresponding parameter in the messaging service, if configured. The `media_urls` property expects a JSON array.
*
- * @param array $sms The SMS-specific payload that overrides corresponding
- * attributes in generic payload for SMS Bindings
+ * @param array $sms The SMS-specific payload that overrides corresponding attributes in the generic payload for SMS Bindings. Each attribute in this value maps to the corresponding `form` parameter of the Twilio [Message](https://www.twilio.com/docs/sms/quickstart) resource. These parameters of the Message resource are supported in snake case format: `body`, `media_urls`, `status_callback`, and `max_price`. The `status_callback` parameter overrides the corresponding parameter in the messaging service, if configured. The `media_urls` property expects a JSON array.
* @return $this Fluent Builder
*/
- public function setSms($sms)
+ public function setSms(array $sms): self
{
$this->options['sms'] = $sms;
return $this;
@@ -249,10 +297,10 @@ public function setSms($sms)
/**
* Deprecated.
*
- * @param array $facebookMessenger Deprecated
+ * @param array $facebookMessenger Deprecated.
* @return $this Fluent Builder
*/
- public function setFacebookMessenger($facebookMessenger)
+ public function setFacebookMessenger(array $facebookMessenger): self
{
$this->options['facebookMessenger'] = $facebookMessenger;
return $this;
@@ -261,11 +309,10 @@ public function setFacebookMessenger($facebookMessenger)
/**
* The FCM-specific payload that overrides corresponding attributes in the generic payload for FCM Bindings. This property maps to the root JSON dictionary. See the [FCM documentation](https://firebase.google.com/docs/cloud-messaging/http-server-ref#downstream) for more details. Target parameters `to`, `registration_ids`, `condition`, and `notification_key` are not allowed in this parameter. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. FCM also [reserves certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref), which cannot be used in that channel.
*
- * @param array $fcm The FCM-specific payload that overrides corresponding
- * attributes in generic payload for FCM Bindings
+ * @param array $fcm The FCM-specific payload that overrides corresponding attributes in the generic payload for FCM Bindings. This property maps to the root JSON dictionary. See the [FCM documentation](https://firebase.google.com/docs/cloud-messaging/http-server-ref#downstream) for more details. Target parameters `to`, `registration_ids`, `condition`, and `notification_key` are not allowed in this parameter. We reserve keys that start with `twi_` for future use. Custom keys that start with `twi_` are not allowed. FCM also [reserves certain keys](https://firebase.google.com/docs/cloud-messaging/http-server-ref), which cannot be used in that channel.
* @return $this Fluent Builder
*/
- public function setFcm($fcm)
+ public function setFcm(array $fcm): self
{
$this->options['fcm'] = $fcm;
return $this;
@@ -274,10 +321,10 @@ public function setFcm($fcm)
/**
* The Segment resource is deprecated. Use the `tag` parameter, instead.
*
- * @param string $segment A Segment to notify
+ * @param string[] $segment The Segment resource is deprecated. Use the `tag` parameter, instead.
* @return $this Fluent Builder
*/
- public function setSegment($segment)
+ public function setSegment(array $segment): self
{
$this->options['segment'] = $segment;
return $this;
@@ -286,10 +333,10 @@ public function setSegment($segment)
/**
* Deprecated.
*
- * @param array $alexa Deprecated
+ * @param array $alexa Deprecated.
* @return $this Fluent Builder
*/
- public function setAlexa($alexa)
+ public function setAlexa(array $alexa): self
{
$this->options['alexa'] = $alexa;
return $this;
@@ -298,10 +345,10 @@ public function setAlexa($alexa)
/**
* The destination address specified as a JSON string. Multiple `to_binding` parameters can be included but the total size of the request entity should not exceed 1MB. This is typically sufficient for 10,000 phone numbers.
*
- * @param string $toBinding The destination address specified as a JSON string
+ * @param string[] $toBinding The destination address specified as a JSON string. Multiple `to_binding` parameters can be included but the total size of the request entity should not exceed 1MB. This is typically sufficient for 10,000 phone numbers.
* @return $this Fluent Builder
*/
- public function setToBinding($toBinding)
+ public function setToBinding(array $toBinding): self
{
$this->options['toBinding'] = $toBinding;
return $this;
@@ -310,10 +357,10 @@ public function setToBinding($toBinding)
/**
* URL to send webhooks.
*
- * @param string $deliveryCallbackUrl URL to send webhooks
+ * @param string $deliveryCallbackUrl URL to send webhooks.
* @return $this Fluent Builder
*/
- public function setDeliveryCallbackUrl($deliveryCallbackUrl)
+ public function setDeliveryCallbackUrl(string $deliveryCallbackUrl): self
{
$this->options['deliveryCallbackUrl'] = $deliveryCallbackUrl;
return $this;
@@ -324,14 +371,10 @@ public function setDeliveryCallbackUrl($deliveryCallbackUrl)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Notify.V1.CreateNotificationOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Notify.V1.CreateNotificationOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/Service/NotificationPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/Service/NotificationPage.php
index de195df..b73d417 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/Service/NotificationPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/Service/NotificationPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return NotificationInstance \Twilio\Rest\Notify\V1\Service\NotificationInstance
+ */
+ public function buildInstance(array $payload): NotificationInstance
{
return new NotificationInstance($this->version, $payload, $this->solution['serviceSid']);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Notify.V1.NotificationPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/ServiceContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/ServiceContext.php
index ce58a12..c379c99 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/ServiceContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/ServiceContext.php
@@ -2,81 +2,98 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Notify
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Notify\V1;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Notify\V1\Service\BindingList;
-use Twilio\Rest\Notify\V1\Service\NotificationList;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+use Twilio\Rest\Notify\V1\Service\NotificationList;
+use Twilio\Rest\Notify\V1\Service\BindingList;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property \Twilio\Rest\Notify\V1\Service\BindingList $bindings
- * @property \Twilio\Rest\Notify\V1\Service\NotificationList $notifications
+ * @property NotificationList $notifications
+ * @property BindingList $bindings
* @method \Twilio\Rest\Notify\V1\Service\BindingContext bindings(string $sid)
*/
class ServiceContext extends InstanceContext
-{
- protected $_bindings = null;
- protected $_notifications = null;
+ {
+ protected $_notifications;
+ protected $_bindings;
/**
* Initialize the ServiceContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Notify\V1\ServiceContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid The Twilio-provided string that uniquely identifies the Service resource to delete.
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Services/' . \rawurlencode($sid) . '';
+ $this->uri = '/Services/' . \rawurlencode($sid)
+ .'';
}
/**
- * Deletes the ServiceInstance
+ * Delete the ServiceInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function delete(): bool
{
- return $this->version->delete('delete', $this->uri);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a ServiceInstance
+ * Fetch the ServiceInstance
*
* @return ServiceInstance Fetched ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): ServiceInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
- return new ServiceInstance($this->version, $payload, $this->solution['sid']);
+ return new ServiceInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Update the ServiceInstance
*
@@ -84,73 +101,91 @@ public function fetch()
* @return ServiceInstance Updated ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ServiceInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'ApnCredentialSid' => $options['apnCredentialSid'],
- 'GcmCredentialSid' => $options['gcmCredentialSid'],
- 'MessagingServiceSid' => $options['messagingServiceSid'],
- 'FacebookMessengerPageId' => $options['facebookMessengerPageId'],
- 'DefaultApnNotificationProtocolVersion' => $options['defaultApnNotificationProtocolVersion'],
- 'DefaultGcmNotificationProtocolVersion' => $options['defaultGcmNotificationProtocolVersion'],
- 'FcmCredentialSid' => $options['fcmCredentialSid'],
- 'DefaultFcmNotificationProtocolVersion' => $options['defaultFcmNotificationProtocolVersion'],
- 'LogEnabled' => Serialize::booleanToString($options['logEnabled']),
- 'AlexaSkillId' => $options['alexaSkillId'],
- 'DefaultAlexaNotificationProtocolVersion' => $options['defaultAlexaNotificationProtocolVersion'],
- 'DeliveryCallbackUrl' => $options['deliveryCallbackUrl'],
- 'DeliveryCallbackEnabled' => Serialize::booleanToString($options['deliveryCallbackEnabled']),
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'ApnCredentialSid' =>
+ $options['apnCredentialSid'],
+ 'GcmCredentialSid' =>
+ $options['gcmCredentialSid'],
+ 'MessagingServiceSid' =>
+ $options['messagingServiceSid'],
+ 'FacebookMessengerPageId' =>
+ $options['facebookMessengerPageId'],
+ 'DefaultApnNotificationProtocolVersion' =>
+ $options['defaultApnNotificationProtocolVersion'],
+ 'DefaultGcmNotificationProtocolVersion' =>
+ $options['defaultGcmNotificationProtocolVersion'],
+ 'FcmCredentialSid' =>
+ $options['fcmCredentialSid'],
+ 'DefaultFcmNotificationProtocolVersion' =>
+ $options['defaultFcmNotificationProtocolVersion'],
+ 'LogEnabled' =>
+ Serialize::booleanToString($options['logEnabled']),
+ 'AlexaSkillId' =>
+ $options['alexaSkillId'],
+ 'DefaultAlexaNotificationProtocolVersion' =>
+ $options['defaultAlexaNotificationProtocolVersion'],
+ 'DeliveryCallbackUrl' =>
+ $options['deliveryCallbackUrl'],
+ 'DeliveryCallbackEnabled' =>
+ Serialize::booleanToString($options['deliveryCallbackEnabled']),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
+
+ return new ServiceInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
);
-
- return new ServiceInstance($this->version, $payload, $this->solution['sid']);
}
+
/**
- * Access the bindings
- *
- * @return \Twilio\Rest\Notify\V1\Service\BindingList
+ * Access the notifications
*/
- protected function getBindings()
+ protected function getNotifications(): NotificationList
{
- if (!$this->_bindings) {
- $this->_bindings = new BindingList($this->version, $this->solution['sid']);
+ if (!$this->_notifications) {
+ $this->_notifications = new NotificationList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_bindings;
+ return $this->_notifications;
}
/**
- * Access the notifications
- *
- * @return \Twilio\Rest\Notify\V1\Service\NotificationList
+ * Access the bindings
*/
- protected function getNotifications()
+ protected function getBindings(): BindingList
{
- if (!$this->_notifications) {
- $this->_notifications = new NotificationList($this->version, $this->solution['sid']);
+ if (!$this->_bindings) {
+ $this->_bindings = new BindingList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_notifications;
+ return $this->_bindings;
}
/**
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -165,10 +200,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -183,12 +218,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Notify.V1.ServiceContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/ServiceInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/ServiceInstance.php
index 583e913..59e5ff7 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/ServiceInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/ServiceInstance.php
@@ -2,61 +2,71 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Notify
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Notify\V1;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Notify\V1\Service\NotificationList;
+use Twilio\Rest\Notify\V1\Service\BindingList;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property string $sid
- * @property string $accountSid
- * @property string $friendlyName
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $apnCredentialSid
- * @property string $gcmCredentialSid
- * @property string $fcmCredentialSid
- * @property string $messagingServiceSid
- * @property string $facebookMessengerPageId
- * @property string $defaultApnNotificationProtocolVersion
- * @property string $defaultGcmNotificationProtocolVersion
- * @property string $defaultFcmNotificationProtocolVersion
- * @property bool $logEnabled
- * @property string $url
- * @property array $links
- * @property string $alexaSkillId
- * @property string $defaultAlexaNotificationProtocolVersion
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $friendlyName
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $apnCredentialSid
+ * @property string|null $gcmCredentialSid
+ * @property string|null $fcmCredentialSid
+ * @property string|null $messagingServiceSid
+ * @property string|null $facebookMessengerPageId
+ * @property string|null $defaultApnNotificationProtocolVersion
+ * @property string|null $defaultGcmNotificationProtocolVersion
+ * @property string|null $defaultFcmNotificationProtocolVersion
+ * @property bool|null $logEnabled
+ * @property string|null $url
+ * @property array|null $links
+ * @property string|null $alexaSkillId
+ * @property string|null $defaultAlexaNotificationProtocolVersion
+ * @property string|null $deliveryCallbackUrl
+ * @property bool|null $deliveryCallbackEnabled
*/
class ServiceInstance extends InstanceResource
{
- protected $_bindings = null;
- protected $_notifications = null;
+ protected $_notifications;
+ protected $_bindings;
/**
* Initialize the ServiceInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Notify\V1\ServiceInstance
+ * @param string $sid The Twilio-provided string that uniquely identifies the Service resource to delete.
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
@@ -75,46 +85,52 @@ public function __construct(Version $version, array $payload, $sid = null)
'links' => Values::array_get($payload, 'links'),
'alexaSkillId' => Values::array_get($payload, 'alexa_skill_id'),
'defaultAlexaNotificationProtocolVersion' => Values::array_get($payload, 'default_alexa_notification_protocol_version'),
- );
+ 'deliveryCallbackUrl' => Values::array_get($payload, 'delivery_callback_url'),
+ 'deliveryCallbackEnabled' => Values::array_get($payload, 'delivery_callback_enabled'),
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Notify\V1\ServiceContext Context for this
- * ServiceInstance
+ * @return ServiceContext Context for this ServiceInstance
*/
- protected function proxy()
+ protected function proxy(): ServiceContext
{
if (!$this->context) {
- $this->context = new ServiceContext($this->version, $this->solution['sid']);
+ $this->context = new ServiceContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Deletes the ServiceInstance
+ * Delete the ServiceInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function delete(): bool
{
+
return $this->proxy()->delete();
}
/**
- * Fetch a ServiceInstance
+ * Fetch the ServiceInstance
*
* @return ServiceInstance Fetched ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): ServiceInstance
{
+
return $this->proxy()->fetch();
}
@@ -125,29 +141,26 @@ public function fetch()
* @return ServiceInstance Updated ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ServiceInstance
{
+
return $this->proxy()->update($options);
}
/**
- * Access the bindings
- *
- * @return \Twilio\Rest\Notify\V1\Service\BindingList
+ * Access the notifications
*/
- protected function getBindings()
+ protected function getNotifications(): NotificationList
{
- return $this->proxy()->bindings;
+ return $this->proxy()->notifications;
}
/**
- * Access the notifications
- *
- * @return \Twilio\Rest\Notify\V1\Service\NotificationList
+ * Access the bindings
*/
- protected function getNotifications()
+ protected function getBindings(): BindingList
{
- return $this->proxy()->notifications;
+ return $this->proxy()->bindings;
}
/**
@@ -157,7 +170,7 @@ protected function getNotifications()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -176,12 +189,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Notify.V1.ServiceInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/ServiceList.php b/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/ServiceList.php
index a15f8b6..c144e88 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/ServiceList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/ServiceList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Notify
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Notify\V1;
@@ -12,65 +19,103 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
class ServiceList extends ListResource
-{
+ {
/**
* Construct the ServiceList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Notify\V1\ServiceList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/Services';
}
/**
- * Create a new ServiceInstance
+ * Create the ServiceInstance
*
* @param array|Options $options Optional Arguments
- * @return ServiceInstance Newly created ServiceInstance
+ * @return ServiceInstance Created ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($options = array())
+ public function create(array $options = []): ServiceInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'ApnCredentialSid' => $options['apnCredentialSid'],
- 'GcmCredentialSid' => $options['gcmCredentialSid'],
- 'MessagingServiceSid' => $options['messagingServiceSid'],
- 'FacebookMessengerPageId' => $options['facebookMessengerPageId'],
- 'DefaultApnNotificationProtocolVersion' => $options['defaultApnNotificationProtocolVersion'],
- 'DefaultGcmNotificationProtocolVersion' => $options['defaultGcmNotificationProtocolVersion'],
- 'FcmCredentialSid' => $options['fcmCredentialSid'],
- 'DefaultFcmNotificationProtocolVersion' => $options['defaultFcmNotificationProtocolVersion'],
- 'LogEnabled' => Serialize::booleanToString($options['logEnabled']),
- 'AlexaSkillId' => $options['alexaSkillId'],
- 'DefaultAlexaNotificationProtocolVersion' => $options['defaultAlexaNotificationProtocolVersion'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'ApnCredentialSid' =>
+ $options['apnCredentialSid'],
+ 'GcmCredentialSid' =>
+ $options['gcmCredentialSid'],
+ 'MessagingServiceSid' =>
+ $options['messagingServiceSid'],
+ 'FacebookMessengerPageId' =>
+ $options['facebookMessengerPageId'],
+ 'DefaultApnNotificationProtocolVersion' =>
+ $options['defaultApnNotificationProtocolVersion'],
+ 'DefaultGcmNotificationProtocolVersion' =>
+ $options['defaultGcmNotificationProtocolVersion'],
+ 'FcmCredentialSid' =>
+ $options['fcmCredentialSid'],
+ 'DefaultFcmNotificationProtocolVersion' =>
+ $options['defaultFcmNotificationProtocolVersion'],
+ 'LogEnabled' =>
+ Serialize::booleanToString($options['logEnabled']),
+ 'AlexaSkillId' =>
+ $options['alexaSkillId'],
+ 'DefaultAlexaNotificationProtocolVersion' =>
+ $options['defaultAlexaNotificationProtocolVersion'],
+ 'DeliveryCallbackUrl' =>
+ $options['deliveryCallbackUrl'],
+ 'DeliveryCallbackEnabled' =>
+ Serialize::booleanToString($options['deliveryCallbackEnabled']),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new ServiceInstance(
+ $this->version,
+ $payload
);
+ }
- return new ServiceInstance($this->version, $payload);
+
+ /**
+ * Reads ServiceInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return ServiceInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -90,9 +135,9 @@ public function create($options = array())
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -101,52 +146,33 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads ServiceInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return ServiceInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of ServiceInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of ServiceInstance
+ * @return ServicePage Page of ServiceInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): ServicePage
{
$options = new Values($options);
- $params = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
+
+ $params = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new ServicePage($this->version, $response, $this->solution);
}
@@ -156,9 +182,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of ServiceInstance
+ * @return ServicePage Page of ServiceInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): ServicePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -168,15 +194,21 @@ public function getPage($targetUrl)
return new ServicePage($this->version, $response, $this->solution);
}
+
/**
* Constructs a ServiceContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Notify\V1\ServiceContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the Service resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): ServiceContext
{
- return new ServiceContext($this->version, $sid);
+ return new ServiceContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -184,8 +216,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Notify.V1.ServiceList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/ServiceOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/ServiceOptions.php
index 32cf310..29717bd 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/ServiceOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/ServiceOptions.php
@@ -1,10 +1,16 @@
options['friendlyName'] = $friendlyName;
$this->options['apnCredentialSid'] = $apnCredentialSid;
$this->options['gcmCredentialSid'] = $gcmCredentialSid;
@@ -130,15 +195,17 @@ public function __construct($friendlyName = Values::NONE, $apnCredentialSid = Va
$this->options['logEnabled'] = $logEnabled;
$this->options['alexaSkillId'] = $alexaSkillId;
$this->options['defaultAlexaNotificationProtocolVersion'] = $defaultAlexaNotificationProtocolVersion;
+ $this->options['deliveryCallbackUrl'] = $deliveryCallbackUrl;
+ $this->options['deliveryCallbackEnabled'] = $deliveryCallbackEnabled;
}
/**
* A descriptive string that you create to describe the resource. It can be up to 64 characters long.
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -147,11 +214,10 @@ public function setFriendlyName($friendlyName)
/**
* The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for APN Bindings.
*
- * @param string $apnCredentialSid The SID of the Credential to use for APN
- * Bindings
+ * @param string $apnCredentialSid The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for APN Bindings.
* @return $this Fluent Builder
*/
- public function setApnCredentialSid($apnCredentialSid)
+ public function setApnCredentialSid(string $apnCredentialSid): self
{
$this->options['apnCredentialSid'] = $apnCredentialSid;
return $this;
@@ -160,24 +226,22 @@ public function setApnCredentialSid($apnCredentialSid)
/**
* The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for GCM Bindings.
*
- * @param string $gcmCredentialSid The SID of the Credential to use for GCM
- * Bindings
+ * @param string $gcmCredentialSid The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for GCM Bindings.
* @return $this Fluent Builder
*/
- public function setGcmCredentialSid($gcmCredentialSid)
+ public function setGcmCredentialSid(string $gcmCredentialSid): self
{
$this->options['gcmCredentialSid'] = $gcmCredentialSid;
return $this;
}
/**
- * The SID of the [Messaging Service](https://www.twilio.com/docs/sms/send-messages#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications.
+ * The SID of the [Messaging Service](https://www.twilio.com/docs/sms/quickstart#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications.
*
- * @param string $messagingServiceSid The SID of the Messaging Service to use
- * for SMS Bindings
+ * @param string $messagingServiceSid The SID of the [Messaging Service](https://www.twilio.com/docs/sms/quickstart#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications.
* @return $this Fluent Builder
*/
- public function setMessagingServiceSid($messagingServiceSid)
+ public function setMessagingServiceSid(string $messagingServiceSid): self
{
$this->options['messagingServiceSid'] = $messagingServiceSid;
return $this;
@@ -186,10 +250,10 @@ public function setMessagingServiceSid($messagingServiceSid)
/**
* Deprecated.
*
- * @param string $facebookMessengerPageId Deprecated
+ * @param string $facebookMessengerPageId Deprecated.
* @return $this Fluent Builder
*/
- public function setFacebookMessengerPageId($facebookMessengerPageId)
+ public function setFacebookMessengerPageId(string $facebookMessengerPageId): self
{
$this->options['facebookMessengerPageId'] = $facebookMessengerPageId;
return $this;
@@ -198,12 +262,10 @@ public function setFacebookMessengerPageId($facebookMessengerPageId)
/**
* The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource.
*
- * @param string $defaultApnNotificationProtocolVersion The protocol version to
- * use for sending APNS
- * notifications
+ * @param string $defaultApnNotificationProtocolVersion The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource.
* @return $this Fluent Builder
*/
- public function setDefaultApnNotificationProtocolVersion($defaultApnNotificationProtocolVersion)
+ public function setDefaultApnNotificationProtocolVersion(string $defaultApnNotificationProtocolVersion): self
{
$this->options['defaultApnNotificationProtocolVersion'] = $defaultApnNotificationProtocolVersion;
return $this;
@@ -212,12 +274,10 @@ public function setDefaultApnNotificationProtocolVersion($defaultApnNotification
/**
* The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource.
*
- * @param string $defaultGcmNotificationProtocolVersion The protocol version to
- * use for sending GCM
- * notifications
+ * @param string $defaultGcmNotificationProtocolVersion The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource.
* @return $this Fluent Builder
*/
- public function setDefaultGcmNotificationProtocolVersion($defaultGcmNotificationProtocolVersion)
+ public function setDefaultGcmNotificationProtocolVersion(string $defaultGcmNotificationProtocolVersion): self
{
$this->options['defaultGcmNotificationProtocolVersion'] = $defaultGcmNotificationProtocolVersion;
return $this;
@@ -226,11 +286,10 @@ public function setDefaultGcmNotificationProtocolVersion($defaultGcmNotification
/**
* The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for FCM Bindings.
*
- * @param string $fcmCredentialSid The SID of the Credential to use for FCM
- * Bindings
+ * @param string $fcmCredentialSid The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for FCM Bindings.
* @return $this Fluent Builder
*/
- public function setFcmCredentialSid($fcmCredentialSid)
+ public function setFcmCredentialSid(string $fcmCredentialSid): self
{
$this->options['fcmCredentialSid'] = $fcmCredentialSid;
return $this;
@@ -239,12 +298,10 @@ public function setFcmCredentialSid($fcmCredentialSid)
/**
* The protocol version to use for sending FCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource.
*
- * @param string $defaultFcmNotificationProtocolVersion The protocol version to
- * use for sending FCM
- * notifications
+ * @param string $defaultFcmNotificationProtocolVersion The protocol version to use for sending FCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource.
* @return $this Fluent Builder
*/
- public function setDefaultFcmNotificationProtocolVersion($defaultFcmNotificationProtocolVersion)
+ public function setDefaultFcmNotificationProtocolVersion(string $defaultFcmNotificationProtocolVersion): self
{
$this->options['defaultFcmNotificationProtocolVersion'] = $defaultFcmNotificationProtocolVersion;
return $this;
@@ -253,10 +310,10 @@ public function setDefaultFcmNotificationProtocolVersion($defaultFcmNotification
/**
* Whether to log notifications. Can be: `true` or `false` and the default is `true`.
*
- * @param bool $logEnabled Whether to log notifications
+ * @param bool $logEnabled Whether to log notifications. Can be: `true` or `false` and the default is `true`.
* @return $this Fluent Builder
*/
- public function setLogEnabled($logEnabled)
+ public function setLogEnabled(bool $logEnabled): self
{
$this->options['logEnabled'] = $logEnabled;
return $this;
@@ -265,10 +322,10 @@ public function setLogEnabled($logEnabled)
/**
* Deprecated.
*
- * @param string $alexaSkillId Deprecated
+ * @param string $alexaSkillId Deprecated.
* @return $this Fluent Builder
*/
- public function setAlexaSkillId($alexaSkillId)
+ public function setAlexaSkillId(string $alexaSkillId): self
{
$this->options['alexaSkillId'] = $alexaSkillId;
return $this;
@@ -277,51 +334,73 @@ public function setAlexaSkillId($alexaSkillId)
/**
* Deprecated.
*
- * @param string $defaultAlexaNotificationProtocolVersion Deprecated
+ * @param string $defaultAlexaNotificationProtocolVersion Deprecated.
* @return $this Fluent Builder
*/
- public function setDefaultAlexaNotificationProtocolVersion($defaultAlexaNotificationProtocolVersion)
+ public function setDefaultAlexaNotificationProtocolVersion(string $defaultAlexaNotificationProtocolVersion): self
{
$this->options['defaultAlexaNotificationProtocolVersion'] = $defaultAlexaNotificationProtocolVersion;
return $this;
}
+ /**
+ * URL to send delivery status callback.
+ *
+ * @param string $deliveryCallbackUrl URL to send delivery status callback.
+ * @return $this Fluent Builder
+ */
+ public function setDeliveryCallbackUrl(string $deliveryCallbackUrl): self
+ {
+ $this->options['deliveryCallbackUrl'] = $deliveryCallbackUrl;
+ return $this;
+ }
+
+ /**
+ * Callback configuration that enables delivery callbacks, default false
+ *
+ * @param bool $deliveryCallbackEnabled Callback configuration that enables delivery callbacks, default false
+ * @return $this Fluent Builder
+ */
+ public function setDeliveryCallbackEnabled(bool $deliveryCallbackEnabled): self
+ {
+ $this->options['deliveryCallbackEnabled'] = $deliveryCallbackEnabled;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Notify.V1.CreateServiceOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Notify.V1.CreateServiceOptions ' . $options . ']';
}
}
+
+
class ReadServiceOptions extends Options
-{
+ {
/**
- * @param string $friendlyName The string that identifies the Service resources
- * to read
+ * @param string $friendlyName The string that identifies the Service resources to read.
*/
- public function __construct($friendlyName = Values::NONE)
- {
+ public function __construct(
+
+ string $friendlyName = Values::NONE
+
+ ) {
$this->options['friendlyName'] = $friendlyName;
}
/**
* The string that identifies the Service resources to read.
*
- * @param string $friendlyName The string that identifies the Service resources
- * to read
+ * @param string $friendlyName The string that identifies the Service resources to read.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -332,48 +411,49 @@ public function setFriendlyName($friendlyName)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Notify.V1.ReadServiceOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Notify.V1.ReadServiceOptions ' . $options . ']';
}
}
class UpdateServiceOptions extends Options
-{
- /**
- * @param string $friendlyName A string to describe the resource
- * @param string $apnCredentialSid The SID of the Credential to use for APN
- * Bindings
- * @param string $gcmCredentialSid The SID of the Credential to use for GCM
- * Bindings
- * @param string $messagingServiceSid The SID of the Messaging Service to use
- * for SMS Bindings
- * @param string $facebookMessengerPageId Deprecated
- * @param string $defaultApnNotificationProtocolVersion The protocol version to
- * use for sending APNS
- * notifications
- * @param string $defaultGcmNotificationProtocolVersion The protocol version to
- * use for sending GCM
- * notifications
- * @param string $fcmCredentialSid The SID of the Credential to use for FCM
- * Bindings
- * @param string $defaultFcmNotificationProtocolVersion The protocol version to
- * use for sending FCM
- * notifications
- * @param bool $logEnabled Whether to log notifications
- * @param string $alexaSkillId Deprecated
- * @param string $defaultAlexaNotificationProtocolVersion Deprecated
- * @param string $deliveryCallbackUrl Webhook URL
- * @param bool $deliveryCallbackEnabled Enable delivery callbacks
- */
- public function __construct($friendlyName = Values::NONE, $apnCredentialSid = Values::NONE, $gcmCredentialSid = Values::NONE, $messagingServiceSid = Values::NONE, $facebookMessengerPageId = Values::NONE, $defaultApnNotificationProtocolVersion = Values::NONE, $defaultGcmNotificationProtocolVersion = Values::NONE, $fcmCredentialSid = Values::NONE, $defaultFcmNotificationProtocolVersion = Values::NONE, $logEnabled = Values::NONE, $alexaSkillId = Values::NONE, $defaultAlexaNotificationProtocolVersion = Values::NONE, $deliveryCallbackUrl = Values::NONE, $deliveryCallbackEnabled = Values::NONE)
{
+ /**
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
+ * @param string $apnCredentialSid The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for APN Bindings.
+ * @param string $gcmCredentialSid The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for GCM Bindings.
+ * @param string $messagingServiceSid The SID of the [Messaging Service](https://www.twilio.com/docs/sms/quickstart#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications.
+ * @param string $facebookMessengerPageId Deprecated.
+ * @param string $defaultApnNotificationProtocolVersion The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource.
+ * @param string $defaultGcmNotificationProtocolVersion The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource.
+ * @param string $fcmCredentialSid The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for FCM Bindings.
+ * @param string $defaultFcmNotificationProtocolVersion The protocol version to use for sending FCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource.
+ * @param bool $logEnabled Whether to log notifications. Can be: `true` or `false` and the default is `true`.
+ * @param string $alexaSkillId Deprecated.
+ * @param string $defaultAlexaNotificationProtocolVersion Deprecated.
+ * @param string $deliveryCallbackUrl URL to send delivery status callback.
+ * @param bool $deliveryCallbackEnabled Callback configuration that enables delivery callbacks, default false
+ */
+ public function __construct(
+
+ string $friendlyName = Values::NONE,
+ string $apnCredentialSid = Values::NONE,
+ string $gcmCredentialSid = Values::NONE,
+ string $messagingServiceSid = Values::NONE,
+ string $facebookMessengerPageId = Values::NONE,
+ string $defaultApnNotificationProtocolVersion = Values::NONE,
+ string $defaultGcmNotificationProtocolVersion = Values::NONE,
+ string $fcmCredentialSid = Values::NONE,
+ string $defaultFcmNotificationProtocolVersion = Values::NONE,
+ bool $logEnabled = Values::BOOL_NONE,
+ string $alexaSkillId = Values::NONE,
+ string $defaultAlexaNotificationProtocolVersion = Values::NONE,
+ string $deliveryCallbackUrl = Values::NONE,
+ bool $deliveryCallbackEnabled = Values::BOOL_NONE
+
+ ) {
$this->options['friendlyName'] = $friendlyName;
$this->options['apnCredentialSid'] = $apnCredentialSid;
$this->options['gcmCredentialSid'] = $gcmCredentialSid;
@@ -393,10 +473,10 @@ public function __construct($friendlyName = Values::NONE, $apnCredentialSid = Va
/**
* A descriptive string that you create to describe the resource. It can be up to 64 characters long.
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -405,11 +485,10 @@ public function setFriendlyName($friendlyName)
/**
* The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for APN Bindings.
*
- * @param string $apnCredentialSid The SID of the Credential to use for APN
- * Bindings
+ * @param string $apnCredentialSid The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for APN Bindings.
* @return $this Fluent Builder
*/
- public function setApnCredentialSid($apnCredentialSid)
+ public function setApnCredentialSid(string $apnCredentialSid): self
{
$this->options['apnCredentialSid'] = $apnCredentialSid;
return $this;
@@ -418,24 +497,22 @@ public function setApnCredentialSid($apnCredentialSid)
/**
* The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for GCM Bindings.
*
- * @param string $gcmCredentialSid The SID of the Credential to use for GCM
- * Bindings
+ * @param string $gcmCredentialSid The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for GCM Bindings.
* @return $this Fluent Builder
*/
- public function setGcmCredentialSid($gcmCredentialSid)
+ public function setGcmCredentialSid(string $gcmCredentialSid): self
{
$this->options['gcmCredentialSid'] = $gcmCredentialSid;
return $this;
}
/**
- * The SID of the [Messaging Service](https://www.twilio.com/docs/sms/send-messages#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications.
+ * The SID of the [Messaging Service](https://www.twilio.com/docs/sms/quickstart#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications.
*
- * @param string $messagingServiceSid The SID of the Messaging Service to use
- * for SMS Bindings
+ * @param string $messagingServiceSid The SID of the [Messaging Service](https://www.twilio.com/docs/sms/quickstart#messaging-services) to use for SMS Bindings. This parameter must be set in order to send SMS notifications.
* @return $this Fluent Builder
*/
- public function setMessagingServiceSid($messagingServiceSid)
+ public function setMessagingServiceSid(string $messagingServiceSid): self
{
$this->options['messagingServiceSid'] = $messagingServiceSid;
return $this;
@@ -444,10 +521,10 @@ public function setMessagingServiceSid($messagingServiceSid)
/**
* Deprecated.
*
- * @param string $facebookMessengerPageId Deprecated
+ * @param string $facebookMessengerPageId Deprecated.
* @return $this Fluent Builder
*/
- public function setFacebookMessengerPageId($facebookMessengerPageId)
+ public function setFacebookMessengerPageId(string $facebookMessengerPageId): self
{
$this->options['facebookMessengerPageId'] = $facebookMessengerPageId;
return $this;
@@ -456,12 +533,10 @@ public function setFacebookMessengerPageId($facebookMessengerPageId)
/**
* The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource.
*
- * @param string $defaultApnNotificationProtocolVersion The protocol version to
- * use for sending APNS
- * notifications
+ * @param string $defaultApnNotificationProtocolVersion The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource.
* @return $this Fluent Builder
*/
- public function setDefaultApnNotificationProtocolVersion($defaultApnNotificationProtocolVersion)
+ public function setDefaultApnNotificationProtocolVersion(string $defaultApnNotificationProtocolVersion): self
{
$this->options['defaultApnNotificationProtocolVersion'] = $defaultApnNotificationProtocolVersion;
return $this;
@@ -470,12 +545,10 @@ public function setDefaultApnNotificationProtocolVersion($defaultApnNotification
/**
* The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource.
*
- * @param string $defaultGcmNotificationProtocolVersion The protocol version to
- * use for sending GCM
- * notifications
+ * @param string $defaultGcmNotificationProtocolVersion The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource.
* @return $this Fluent Builder
*/
- public function setDefaultGcmNotificationProtocolVersion($defaultGcmNotificationProtocolVersion)
+ public function setDefaultGcmNotificationProtocolVersion(string $defaultGcmNotificationProtocolVersion): self
{
$this->options['defaultGcmNotificationProtocolVersion'] = $defaultGcmNotificationProtocolVersion;
return $this;
@@ -484,11 +557,10 @@ public function setDefaultGcmNotificationProtocolVersion($defaultGcmNotification
/**
* The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for FCM Bindings.
*
- * @param string $fcmCredentialSid The SID of the Credential to use for FCM
- * Bindings
+ * @param string $fcmCredentialSid The SID of the [Credential](https://www.twilio.com/docs/notify/api/credential-resource) to use for FCM Bindings.
* @return $this Fluent Builder
*/
- public function setFcmCredentialSid($fcmCredentialSid)
+ public function setFcmCredentialSid(string $fcmCredentialSid): self
{
$this->options['fcmCredentialSid'] = $fcmCredentialSid;
return $this;
@@ -497,12 +569,10 @@ public function setFcmCredentialSid($fcmCredentialSid)
/**
* The protocol version to use for sending FCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource.
*
- * @param string $defaultFcmNotificationProtocolVersion The protocol version to
- * use for sending FCM
- * notifications
+ * @param string $defaultFcmNotificationProtocolVersion The protocol version to use for sending FCM notifications. Can be overridden on a Binding by Binding basis when creating a [Binding](https://www.twilio.com/docs/notify/api/binding-resource) resource.
* @return $this Fluent Builder
*/
- public function setDefaultFcmNotificationProtocolVersion($defaultFcmNotificationProtocolVersion)
+ public function setDefaultFcmNotificationProtocolVersion(string $defaultFcmNotificationProtocolVersion): self
{
$this->options['defaultFcmNotificationProtocolVersion'] = $defaultFcmNotificationProtocolVersion;
return $this;
@@ -511,10 +581,10 @@ public function setDefaultFcmNotificationProtocolVersion($defaultFcmNotification
/**
* Whether to log notifications. Can be: `true` or `false` and the default is `true`.
*
- * @param bool $logEnabled Whether to log notifications
+ * @param bool $logEnabled Whether to log notifications. Can be: `true` or `false` and the default is `true`.
* @return $this Fluent Builder
*/
- public function setLogEnabled($logEnabled)
+ public function setLogEnabled(bool $logEnabled): self
{
$this->options['logEnabled'] = $logEnabled;
return $this;
@@ -523,10 +593,10 @@ public function setLogEnabled($logEnabled)
/**
* Deprecated.
*
- * @param string $alexaSkillId Deprecated
+ * @param string $alexaSkillId Deprecated.
* @return $this Fluent Builder
*/
- public function setAlexaSkillId($alexaSkillId)
+ public function setAlexaSkillId(string $alexaSkillId): self
{
$this->options['alexaSkillId'] = $alexaSkillId;
return $this;
@@ -535,10 +605,10 @@ public function setAlexaSkillId($alexaSkillId)
/**
* Deprecated.
*
- * @param string $defaultAlexaNotificationProtocolVersion Deprecated
+ * @param string $defaultAlexaNotificationProtocolVersion Deprecated.
* @return $this Fluent Builder
*/
- public function setDefaultAlexaNotificationProtocolVersion($defaultAlexaNotificationProtocolVersion)
+ public function setDefaultAlexaNotificationProtocolVersion(string $defaultAlexaNotificationProtocolVersion): self
{
$this->options['defaultAlexaNotificationProtocolVersion'] = $defaultAlexaNotificationProtocolVersion;
return $this;
@@ -547,10 +617,10 @@ public function setDefaultAlexaNotificationProtocolVersion($defaultAlexaNotifica
/**
* URL to send delivery status callback.
*
- * @param string $deliveryCallbackUrl Webhook URL
+ * @param string $deliveryCallbackUrl URL to send delivery status callback.
* @return $this Fluent Builder
*/
- public function setDeliveryCallbackUrl($deliveryCallbackUrl)
+ public function setDeliveryCallbackUrl(string $deliveryCallbackUrl): self
{
$this->options['deliveryCallbackUrl'] = $deliveryCallbackUrl;
return $this;
@@ -559,10 +629,10 @@ public function setDeliveryCallbackUrl($deliveryCallbackUrl)
/**
* Callback configuration that enables delivery callbacks, default false
*
- * @param bool $deliveryCallbackEnabled Enable delivery callbacks
+ * @param bool $deliveryCallbackEnabled Callback configuration that enables delivery callbacks, default false
* @return $this Fluent Builder
*/
- public function setDeliveryCallbackEnabled($deliveryCallbackEnabled)
+ public function setDeliveryCallbackEnabled(bool $deliveryCallbackEnabled): self
{
$this->options['deliveryCallbackEnabled'] = $deliveryCallbackEnabled;
return $this;
@@ -573,14 +643,10 @@ public function setDeliveryCallbackEnabled($deliveryCallbackEnabled)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Notify.V1.UpdateServiceOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Notify.V1.UpdateServiceOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/ServicePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/ServicePage.php
index 8603d0e..186643f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/ServicePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Notify/V1/ServicePage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return ServiceInstance \Twilio\Rest\Notify\V1\ServiceInstance
+ */
+ public function buildInstance(array $payload): ServiceInstance
{
return new ServiceInstance($this->version, $payload);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Notify.V1.ServicePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Numbers.php b/vendor/twilio/sdk/src/Twilio/Rest/Numbers.php
index be4f2a1..eff942d 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Numbers.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Numbers.php
@@ -1,101 +1,16 @@
baseUrl = 'https://numbers.twilio.com';
- }
-
- /**
- * @return \Twilio\Rest\Numbers\V2 Version v2 of numbers
- */
- protected function getV2()
- {
- if (!$this->_v2) {
- $this->_v2 = new V2($this);
- }
- return $this->_v2;
- }
-
- /**
- * Magic getter to lazy load version
- *
- * @param string $name Version to return
- * @return \Twilio\Version The requested version
- * @throws TwilioException For unknown versions
- */
- public function __get($name)
- {
- $method = 'get' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return $this->$method();
- }
-
- throw new TwilioException('Unknown version ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $method = 'context' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return \call_user_func_array(array($this, $method), $arguments);
- }
-
- throw new TwilioException('Unknown context ' . $name);
- }
-
+class Numbers extends NumbersBase {
/**
- * @return \Twilio\Rest\Numbers\V2\RegulatoryComplianceList
+ * @deprecated Use v2->regulatoryCompliance instead.
*/
- protected function getRegulatoryCompliance()
- {
+ protected function getRegulatoryCompliance(): \Twilio\Rest\Numbers\V2\RegulatoryComplianceList {
+ echo "regulatoryCompliance is deprecated. Use v2->regulatoryCompliance instead.";
return $this->v2->regulatoryCompliance;
}
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Numbers]';
- }
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2.php b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2.php
index 2503aa3..c040a71 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2.php
@@ -1,31 +1,52 @@
version = 'v2';
}
- /**
- * @return \Twilio\Rest\Numbers\V2\RegulatoryComplianceList
- */
- protected function getRegulatoryCompliance()
+ protected function getAuthorizationDocuments(): AuthorizationDocumentList
+ {
+ if (!$this->_authorizationDocuments) {
+ $this->_authorizationDocuments = new AuthorizationDocumentList($this);
+ }
+ return $this->_authorizationDocuments;
+ }
+
+ protected function getBulkHostedNumberOrders(): BulkHostedNumberOrderList
+ {
+ if (!$this->_bulkHostedNumberOrders) {
+ $this->_bulkHostedNumberOrders = new BulkHostedNumberOrderList($this);
+ }
+ return $this->_bulkHostedNumberOrders;
+ }
+
+ protected function getBundleClone(): BundleCloneList
+ {
+ if (!$this->_bundleClone) {
+ $this->_bundleClone = new BundleCloneList($this);
+ }
+ return $this->_bundleClone;
+ }
+
+ protected function getHostedNumberOrders(): HostedNumberOrderList
+ {
+ if (!$this->_hostedNumberOrders) {
+ $this->_hostedNumberOrders = new HostedNumberOrderList($this);
+ }
+ return $this->_hostedNumberOrders;
+ }
+
+ protected function getRegulatoryCompliance(): RegulatoryComplianceList
{
if (!$this->_regulatoryCompliance) {
$this->_regulatoryCompliance = new RegulatoryComplianceList($this);
@@ -51,7 +101,7 @@ protected function getRegulatoryCompliance()
* @return \Twilio\ListResource The requested resource
* @throws TwilioException For unknown resource
*/
- public function __get($name)
+ public function __get(string $name)
{
$method = 'get' . \ucfirst($name);
if (\method_exists($this, $method)) {
@@ -66,10 +116,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -84,8 +134,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Numbers.V2]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/ItemAssignmentContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/ItemAssignmentContext.php
index 8815e7f..b39915c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/ItemAssignmentContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/ItemAssignmentContext.php
@@ -2,53 +2,81 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Numbers
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Numbers\V2\RegulatoryCompliance\Bundle;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class ItemAssignmentContext extends InstanceContext
-{
+ {
/**
* Initialize the ItemAssignmentContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $bundleSid The unique string that identifies the resource.
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Numbers\V2\RegulatoryCompliance\Bundle\ItemAssignmentContext
+ * @param Version $version Version that contains the resource
+ * @param string $bundleSid The unique string that we created to identify the Bundle resource.
+ * @param string $sid The unique string that we created to identify the Identity resource.
*/
- public function __construct(Version $version, $bundleSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $bundleSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('bundleSid' => $bundleSid, 'sid' => $sid,);
+ $this->solution = [
+ 'bundleSid' =>
+ $bundleSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/RegulatoryCompliance/Bundles/' . \rawurlencode($bundleSid)
+ .'/ItemAssignments/' . \rawurlencode($sid)
+ .'';
+ }
+
+ /**
+ * Delete the ItemAssignmentInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/RegulatoryCompliance/Bundles/' . \rawurlencode($bundleSid) . '/ItemAssignments/' . \rawurlencode($sid) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a ItemAssignmentInstance
+ * Fetch the ItemAssignmentInstance
*
* @return ItemAssignmentInstance Fetched ItemAssignmentInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): ItemAssignmentInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new ItemAssignmentInstance(
$this->version,
@@ -58,28 +86,18 @@ public function fetch()
);
}
- /**
- * Deletes the ItemAssignmentInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Numbers.V2.ItemAssignmentContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/ItemAssignmentInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/ItemAssignmentInstance.php
index 0b4f7db..716de08 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/ItemAssignmentInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/ItemAssignmentInstance.php
@@ -2,64 +2,70 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Numbers
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Numbers\V2\RegulatoryCompliance\Bundle;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $bundleSid
- * @property string $accountSid
- * @property string $objectSid
- * @property \DateTime $dateCreated
- * @property string $url
+ * @property string|null $sid
+ * @property string|null $bundleSid
+ * @property string|null $accountSid
+ * @property string|null $objectSid
+ * @property \DateTime|null $dateCreated
+ * @property string|null $url
*/
class ItemAssignmentInstance extends InstanceResource
{
/**
* Initialize the ItemAssignmentInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $bundleSid The unique string that identifies the Bundle
- * resource.
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Numbers\V2\RegulatoryCompliance\Bundle\ItemAssignmentInstance
+ * @param string $bundleSid The unique string that we created to identify the Bundle resource.
+ * @param string $sid The unique string that we created to identify the Identity resource.
*/
- public function __construct(Version $version, array $payload, $bundleSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $bundleSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'bundleSid' => Values::array_get($payload, 'bundle_sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'objectSid' => Values::array_get($payload, 'object_sid'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('bundleSid' => $bundleSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['bundleSid' => $bundleSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Numbers\V2\RegulatoryCompliance\Bundle\ItemAssignmentContext Context for this
- * ItemAssignmentInstance
+ * @return ItemAssignmentContext Context for this ItemAssignmentInstance
*/
- protected function proxy()
+ protected function proxy(): ItemAssignmentContext
{
if (!$this->context) {
$this->context = new ItemAssignmentContext(
@@ -73,25 +79,27 @@ protected function proxy()
}
/**
- * Fetch a ItemAssignmentInstance
+ * Delete the ItemAssignmentInstance
*
- * @return ItemAssignmentInstance Fetched ItemAssignmentInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the ItemAssignmentInstance
+ * Fetch the ItemAssignmentInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return ItemAssignmentInstance Fetched ItemAssignmentInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): ItemAssignmentInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -101,7 +109,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -120,12 +128,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Numbers.V2.ItemAssignmentInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/ItemAssignmentList.php b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/ItemAssignmentList.php
index cd517c8..5eca914 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/ItemAssignmentList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/ItemAssignmentList.php
@@ -2,57 +2,96 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Numbers
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Numbers\V2\RegulatoryCompliance\Bundle;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class ItemAssignmentList extends ListResource
-{
+ {
/**
* Construct the ItemAssignmentList
*
* @param Version $version Version that contains the resource
- * @param string $bundleSid The unique string that identifies the Bundle
- * resource.
- * @return \Twilio\Rest\Numbers\V2\RegulatoryCompliance\Bundle\ItemAssignmentList
+ * @param string $bundleSid The unique string that we created to identify the Bundle resource.
*/
- public function __construct(Version $version, $bundleSid)
- {
+ public function __construct(
+ Version $version,
+ string $bundleSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('bundleSid' => $bundleSid,);
-
- $this->uri = '/RegulatoryCompliance/Bundles/' . \rawurlencode($bundleSid) . '/ItemAssignments';
+ $this->solution = [
+ 'bundleSid' =>
+ $bundleSid,
+
+ ];
+
+ $this->uri = '/RegulatoryCompliance/Bundles/' . \rawurlencode($bundleSid)
+ .'/ItemAssignments';
}
/**
- * Create a new ItemAssignmentInstance
+ * Create the ItemAssignmentInstance
*
- * @param string $objectSid The sid of an object bag
- * @return ItemAssignmentInstance Newly created ItemAssignmentInstance
+ * @param string $objectSid The SID of an object bag that holds information of the different items.
+ * @return ItemAssignmentInstance Created ItemAssignmentInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($objectSid)
+ public function create(string $objectSid): ItemAssignmentInstance
{
- $data = Values::of(array('ObjectSid' => $objectSid,));
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'ObjectSid' =>
+ $objectSid,
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new ItemAssignmentInstance(
+ $this->version,
+ $payload,
+ $this->solution['bundleSid']
);
+ }
- return new ItemAssignmentInstance($this->version, $payload, $this->solution['bundleSid']);
+
+ /**
+ * Reads ItemAssignmentInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return ItemAssignmentInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -71,9 +110,9 @@ public function create($objectSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -82,26 +121,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads ItemAssignmentInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return ItemAssignmentInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of ItemAssignmentInstance records from the API.
* Request is executed immediately
@@ -109,21 +128,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of ItemAssignmentInstance
+ * @return ItemAssignmentPage Page of ItemAssignmentInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): ItemAssignmentPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new ItemAssignmentPage($this->version, $response, $this->solution);
}
@@ -133,9 +153,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of ItemAssignmentInstance
+ * @return ItemAssignmentPage Page of ItemAssignmentInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): ItemAssignmentPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -145,15 +165,22 @@ public function getPage($targetUrl)
return new ItemAssignmentPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a ItemAssignmentContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Numbers\V2\RegulatoryCompliance\Bundle\ItemAssignmentContext
+ * @param string $sid The unique string that we created to identify the Identity resource.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): ItemAssignmentContext
{
- return new ItemAssignmentContext($this->version, $this->solution['bundleSid'], $sid);
+ return new ItemAssignmentContext(
+ $this->version,
+ $this->solution['bundleSid'],
+ $sid
+ );
}
/**
@@ -161,8 +188,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Numbers.V2.ItemAssignmentList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/ItemAssignmentPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/ItemAssignmentPage.php
index e34847c..ee8b85f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/ItemAssignmentPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/Bundle/ItemAssignmentPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return ItemAssignmentInstance \Twilio\Rest\Numbers\V2\RegulatoryCompliance\Bundle\ItemAssignmentInstance
+ */
+ public function buildInstance(array $payload): ItemAssignmentInstance
{
return new ItemAssignmentInstance($this->version, $payload, $this->solution['bundleSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Numbers.V2.ItemAssignmentPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/BundleContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/BundleContext.php
index 8af464b..49c370c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/BundleContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/BundleContext.php
@@ -2,64 +2,104 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Numbers
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Numbers\V2\RegulatoryCompliance;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Numbers\V2\RegulatoryCompliance\Bundle\ItemAssignmentList;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Numbers\V2\RegulatoryCompliance\Bundle\ReplaceItemsList;
+use Twilio\Rest\Numbers\V2\RegulatoryCompliance\Bundle\EvaluationList;
+use Twilio\Rest\Numbers\V2\RegulatoryCompliance\Bundle\BundleCopyList;
+use Twilio\Rest\Numbers\V2\RegulatoryCompliance\Bundle\ItemAssignmentList;
+
/**
- * @property \Twilio\Rest\Numbers\V2\RegulatoryCompliance\Bundle\ItemAssignmentList $itemAssignments
+ * @property ReplaceItemsList $replaceItems
+ * @property EvaluationList $evaluations
+ * @property BundleCopyList $bundleCopies
+ * @property ItemAssignmentList $itemAssignments
* @method \Twilio\Rest\Numbers\V2\RegulatoryCompliance\Bundle\ItemAssignmentContext itemAssignments(string $sid)
+ * @method \Twilio\Rest\Numbers\V2\RegulatoryCompliance\Bundle\EvaluationContext evaluations(string $sid)
*/
class BundleContext extends InstanceContext
-{
- protected $_itemAssignments = null;
+ {
+ protected $_replaceItems;
+ protected $_evaluations;
+ protected $_bundleCopies;
+ protected $_itemAssignments;
/**
* Initialize the BundleContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The unique string that identifies the resource.
- * @return \Twilio\Rest\Numbers\V2\RegulatoryCompliance\BundleContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid The unique string that we created to identify the Bundle resource.
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/RegulatoryCompliance/Bundles/' . \rawurlencode($sid)
+ .'';
+ }
+
+ /**
+ * Delete the BundleInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/RegulatoryCompliance/Bundles/' . \rawurlencode($sid) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a BundleInstance
+ * Fetch the BundleInstance
*
* @return BundleInstance Fetched BundleInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): BundleInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
- return new BundleInstance($this->version, $payload, $this->solution['sid']);
+ return new BundleInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Update the BundleInstance
*
@@ -67,36 +107,88 @@ public function fetch()
* @return BundleInstance Updated BundleInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): BundleInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'Status' => $options['status'],
- 'StatusCallback' => $options['statusCallback'],
- 'FriendlyName' => $options['friendlyName'],
- 'Email' => $options['email'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'Status' =>
+ $options['status'],
+ 'StatusCallback' =>
+ $options['statusCallback'],
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'Email' =>
+ $options['email'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
+
+ return new BundleInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
);
+ }
- return new BundleInstance($this->version, $payload, $this->solution['sid']);
+
+ /**
+ * Access the replaceItems
+ */
+ protected function getReplaceItems(): ReplaceItemsList
+ {
+ if (!$this->_replaceItems) {
+ $this->_replaceItems = new ReplaceItemsList(
+ $this->version,
+ $this->solution['sid']
+ );
+ }
+
+ return $this->_replaceItems;
+ }
+
+ /**
+ * Access the evaluations
+ */
+ protected function getEvaluations(): EvaluationList
+ {
+ if (!$this->_evaluations) {
+ $this->_evaluations = new EvaluationList(
+ $this->version,
+ $this->solution['sid']
+ );
+ }
+
+ return $this->_evaluations;
+ }
+
+ /**
+ * Access the bundleCopies
+ */
+ protected function getBundleCopies(): BundleCopyList
+ {
+ if (!$this->_bundleCopies) {
+ $this->_bundleCopies = new BundleCopyList(
+ $this->version,
+ $this->solution['sid']
+ );
+ }
+
+ return $this->_bundleCopies;
}
/**
* Access the itemAssignments
- *
- * @return \Twilio\Rest\Numbers\V2\RegulatoryCompliance\Bundle\ItemAssignmentList
*/
- protected function getItemAssignments()
+ protected function getItemAssignments(): ItemAssignmentList
{
if (!$this->_itemAssignments) {
- $this->_itemAssignments = new ItemAssignmentList($this->version, $this->solution['sid']);
+ $this->_itemAssignments = new ItemAssignmentList(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->_itemAssignments;
@@ -106,10 +198,10 @@ protected function getItemAssignments()
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -124,10 +216,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -142,12 +234,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Numbers.V2.BundleContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/BundleInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/BundleInstance.php
index fefef26..fb940bb 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/BundleInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/BundleInstance.php
@@ -2,92 +2,123 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Numbers
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Numbers\V2\RegulatoryCompliance;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Numbers\V2\RegulatoryCompliance\Bundle\ReplaceItemsList;
+use Twilio\Rest\Numbers\V2\RegulatoryCompliance\Bundle\EvaluationList;
+use Twilio\Rest\Numbers\V2\RegulatoryCompliance\Bundle\BundleCopyList;
+use Twilio\Rest\Numbers\V2\RegulatoryCompliance\Bundle\ItemAssignmentList;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $regulationSid
- * @property string $friendlyName
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $regulationSid
+ * @property string|null $friendlyName
* @property string $status
- * @property string $email
- * @property string $statusCallback
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
- * @property array $links
+ * @property \DateTime|null $validUntil
+ * @property string|null $email
+ * @property string|null $statusCallback
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
+ * @property array|null $links
*/
class BundleInstance extends InstanceResource
{
- protected $_itemAssignments = null;
+ protected $_replaceItems;
+ protected $_evaluations;
+ protected $_bundleCopies;
+ protected $_itemAssignments;
/**
* Initialize the BundleInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The unique string that identifies the resource.
- * @return \Twilio\Rest\Numbers\V2\RegulatoryCompliance\BundleInstance
+ * @param string $sid The unique string that we created to identify the Bundle resource.
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'regulationSid' => Values::array_get($payload, 'regulation_sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
'status' => Values::array_get($payload, 'status'),
+ 'validUntil' => Deserialize::dateTime(Values::array_get($payload, 'valid_until')),
'email' => Values::array_get($payload, 'email'),
'statusCallback' => Values::array_get($payload, 'status_callback'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Numbers\V2\RegulatoryCompliance\BundleContext Context
- * for this
- * BundleInstance
+ * @return BundleContext Context for this BundleInstance
*/
- protected function proxy()
+ protected function proxy(): BundleContext
{
if (!$this->context) {
- $this->context = new BundleContext($this->version, $this->solution['sid']);
+ $this->context = new BundleContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a BundleInstance
+ * Delete the BundleInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ return $this->proxy()->delete();
+ }
+
+ /**
+ * Fetch the BundleInstance
*
* @return BundleInstance Fetched BundleInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): BundleInstance
{
+
return $this->proxy()->fetch();
}
@@ -98,17 +129,40 @@ public function fetch()
* @return BundleInstance Updated BundleInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): BundleInstance
{
+
return $this->proxy()->update($options);
}
+ /**
+ * Access the replaceItems
+ */
+ protected function getReplaceItems(): ReplaceItemsList
+ {
+ return $this->proxy()->replaceItems;
+ }
+
+ /**
+ * Access the evaluations
+ */
+ protected function getEvaluations(): EvaluationList
+ {
+ return $this->proxy()->evaluations;
+ }
+
+ /**
+ * Access the bundleCopies
+ */
+ protected function getBundleCopies(): BundleCopyList
+ {
+ return $this->proxy()->bundleCopies;
+ }
+
/**
* Access the itemAssignments
- *
- * @return \Twilio\Rest\Numbers\V2\RegulatoryCompliance\Bundle\ItemAssignmentList
*/
- protected function getItemAssignments()
+ protected function getItemAssignments(): ItemAssignmentList
{
return $this->proxy()->itemAssignments;
}
@@ -120,7 +174,7 @@ protected function getItemAssignments()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -139,12 +193,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Numbers.V2.BundleInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/BundleList.php b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/BundleList.php
index 9a83ad3..0eaceff 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/BundleList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/BundleList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Numbers
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Numbers\V2\RegulatoryCompliance;
@@ -12,59 +19,93 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class BundleList extends ListResource
-{
+ {
/**
* Construct the BundleList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Numbers\V2\RegulatoryCompliance\BundleList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/RegulatoryCompliance/Bundles';
}
/**
- * Create a new BundleInstance
+ * Create the BundleInstance
*
- * @param string $friendlyName The string that you assigned to describe the
- * resource
- * @param string $email The email address
+ * @param string $friendlyName The string that you assigned to describe the resource.
+ * @param string $email The email address that will receive updates when the Bundle resource changes status.
* @param array|Options $options Optional Arguments
- * @return BundleInstance Newly created BundleInstance
+ * @return BundleInstance Created BundleInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($friendlyName, $email, $options = array())
+ public function create(string $friendlyName, string $email, array $options = []): BundleInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $friendlyName,
- 'Email' => $email,
- 'StatusCallback' => $options['statusCallback'],
- 'RegulationSid' => $options['regulationSid'],
- 'IsoCountry' => $options['isoCountry'],
- 'EndUserType' => $options['endUserType'],
- 'NumberType' => $options['numberType'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'FriendlyName' =>
+ $friendlyName,
+ 'Email' =>
+ $email,
+ 'StatusCallback' =>
+ $options['statusCallback'],
+ 'RegulationSid' =>
+ $options['regulationSid'],
+ 'IsoCountry' =>
+ $options['isoCountry'],
+ 'EndUserType' =>
+ $options['endUserType'],
+ 'NumberType' =>
+ $options['numberType'],
+ 'IsTest' =>
+ Serialize::booleanToString($options['isTest']),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new BundleInstance(
+ $this->version,
+ $payload
);
+ }
+
- return new BundleInstance($this->version, $payload);
+ /**
+ * Reads BundleInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return BundleInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -84,9 +125,9 @@ public function create($friendlyName, $email, $options = array())
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -95,56 +136,53 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads BundleInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return BundleInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of BundleInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of BundleInstance
+ * @return BundlePage Page of BundleInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): BundlePage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Status' => $options['status'],
- 'FriendlyName' => $options['friendlyName'],
- 'RegulationSid' => $options['regulationSid'],
- 'IsoCountry' => $options['isoCountry'],
- 'NumberType' => $options['numberType'],
+
+ $params = Values::of([
+ 'Status' =>
+ $options['status'],
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'RegulationSid' =>
+ $options['regulationSid'],
+ 'IsoCountry' =>
+ $options['isoCountry'],
+ 'NumberType' =>
+ $options['numberType'],
+ 'HasValidUntilDate' =>
+ Serialize::booleanToString($options['hasValidUntilDate']),
+ 'SortBy' =>
+ $options['sortBy'],
+ 'SortDirection' =>
+ $options['sortDirection'],
+ 'ValidUntilDate<' =>
+ Serialize::iso8601DateTime($options['validUntilDateBefore']),
+ 'ValidUntilDate' =>
+ Serialize::iso8601DateTime($options['validUntilDate']),
+ 'ValidUntilDate>' =>
+ Serialize::iso8601DateTime($options['validUntilDateAfter']),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new BundlePage($this->version, $response, $this->solution);
}
@@ -154,9 +192,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of BundleInstance
+ * @return BundlePage Page of BundleInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): BundlePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -166,15 +204,21 @@ public function getPage($targetUrl)
return new BundlePage($this->version, $response, $this->solution);
}
+
/**
* Constructs a BundleContext
*
- * @param string $sid The unique string that identifies the resource.
- * @return \Twilio\Rest\Numbers\V2\RegulatoryCompliance\BundleContext
+ * @param string $sid The unique string that we created to identify the Bundle resource.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): BundleContext
{
- return new BundleContext($this->version, $sid);
+ return new BundleContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -182,8 +226,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Numbers.V2.BundleList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/BundleOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/BundleOptions.php
index 33da784..da20b87 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/BundleOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/BundleOptions.php
@@ -1,10 +1,16 @@
=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format.
+ * @param string $validUntilDate Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format.
+ * @param string $validUntilDateAfter Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format.
* @return ReadBundleOptions Options builder
*/
- public static function read($status = Values::NONE, $friendlyName = Values::NONE, $regulationSid = Values::NONE, $isoCountry = Values::NONE, $numberType = Values::NONE)
+ public static function read(
+
+ string $status = Values::NONE,
+ string $friendlyName = Values::NONE,
+ string $regulationSid = Values::NONE,
+ string $isoCountry = Values::NONE,
+ string $numberType = Values::NONE,
+ bool $hasValidUntilDate = Values::BOOL_NONE,
+ string $sortBy = Values::NONE,
+ string $sortDirection = Values::NONE,
+ string $validUntilDateBefore = null,
+ string $validUntilDate = null,
+ string $validUntilDateAfter = null
+
+ ): ReadBundleOptions
{
- return new ReadBundleOptions($status, $friendlyName, $regulationSid, $isoCountry, $numberType);
+ return new ReadBundleOptions(
+ $status,
+ $friendlyName,
+ $regulationSid,
+ $isoCountry,
+ $numberType,
+ $hasValidUntilDate,
+ $sortBy,
+ $sortDirection,
+ $validUntilDateBefore,
+ $validUntilDate,
+ $validUntilDateAfter
+ );
}
/**
- * @param string $status The verification status of the Bundle resource
- * @param string $statusCallback The URL we call to inform your application of
- * status changes.
- * @param string $friendlyName The string that you assigned to describe the
- * resource
- * @param string $email The email address
+ * @param string $status
+ * @param string $statusCallback The URL we call to inform your application of status changes.
+ * @param string $friendlyName The string that you assigned to describe the resource.
+ * @param string $email The email address that will receive updates when the Bundle resource changes status.
* @return UpdateBundleOptions Options builder
*/
- public static function update($status = Values::NONE, $statusCallback = Values::NONE, $friendlyName = Values::NONE, $email = Values::NONE)
+ public static function update(
+
+ string $status = Values::NONE,
+ string $statusCallback = Values::NONE,
+ string $friendlyName = Values::NONE,
+ string $email = Values::NONE
+
+ ): UpdateBundleOptions
{
- return new UpdateBundleOptions($status, $statusCallback, $friendlyName, $email);
+ return new UpdateBundleOptions(
+ $status,
+ $statusCallback,
+ $friendlyName,
+ $email
+ );
}
+
}
class CreateBundleOptions extends Options
-{
+ {
/**
- * @param string $statusCallback The URL we call to inform your application of
- * status changes.
- * @param string $regulationSid The unique string of a regulation.
- * @param string $isoCountry The ISO country code of the country
- * @param string $endUserType The type of End User of the Bundle resource
- * @param string $numberType The type of phone number
+ * @param string $statusCallback The URL we call to inform your application of status changes.
+ * @param string $regulationSid The unique string of a regulation that is associated to the Bundle resource.
+ * @param string $isoCountry The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the Bundle's phone number country ownership request.
+ * @param string $endUserType
+ * @param string $numberType The type of phone number of the Bundle's ownership request. Can be `local`, `mobile`, `national`, or `toll-free`.
+ * @param bool $isTest Indicates that Bundle is a Test Bundle and will be Auto-Rejected
*/
- public function __construct($statusCallback = Values::NONE, $regulationSid = Values::NONE, $isoCountry = Values::NONE, $endUserType = Values::NONE, $numberType = Values::NONE)
- {
+ public function __construct(
+
+ string $statusCallback = Values::NONE,
+ string $regulationSid = Values::NONE,
+ string $isoCountry = Values::NONE,
+ string $endUserType = Values::NONE,
+ string $numberType = Values::NONE,
+ bool $isTest = Values::BOOL_NONE
+
+ ) {
$this->options['statusCallback'] = $statusCallback;
$this->options['regulationSid'] = $regulationSid;
$this->options['isoCountry'] = $isoCountry;
$this->options['endUserType'] = $endUserType;
$this->options['numberType'] = $numberType;
+ $this->options['isTest'] = $isTest;
}
/**
* The URL we call to inform your application of status changes.
*
- * @param string $statusCallback The URL we call to inform your application of
- * status changes.
+ * @param string $statusCallback The URL we call to inform your application of status changes.
* @return $this Fluent Builder
*/
- public function setStatusCallback($statusCallback)
+ public function setStatusCallback(string $statusCallback): self
{
$this->options['statusCallback'] = $statusCallback;
return $this;
@@ -92,177 +166,278 @@ public function setStatusCallback($statusCallback)
/**
* The unique string of a regulation that is associated to the Bundle resource.
*
- * @param string $regulationSid The unique string of a regulation.
+ * @param string $regulationSid The unique string of a regulation that is associated to the Bundle resource.
* @return $this Fluent Builder
*/
- public function setRegulationSid($regulationSid)
+ public function setRegulationSid(string $regulationSid): self
{
$this->options['regulationSid'] = $regulationSid;
return $this;
}
/**
- * The ISO country code of the Bundle's phone number country ownership request.
+ * The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the Bundle's phone number country ownership request.
*
- * @param string $isoCountry The ISO country code of the country
+ * @param string $isoCountry The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the Bundle's phone number country ownership request.
* @return $this Fluent Builder
*/
- public function setIsoCountry($isoCountry)
+ public function setIsoCountry(string $isoCountry): self
{
$this->options['isoCountry'] = $isoCountry;
return $this;
}
/**
- * The type of End User of the Bundle resource.
- *
- * @param string $endUserType The type of End User of the Bundle resource
+ * @param string $endUserType
* @return $this Fluent Builder
*/
- public function setEndUserType($endUserType)
+ public function setEndUserType(string $endUserType): self
{
$this->options['endUserType'] = $endUserType;
return $this;
}
/**
- * The type of phone number of the Bundle's ownership request.
+ * The type of phone number of the Bundle's ownership request. Can be `local`, `mobile`, `national`, or `toll-free`.
*
- * @param string $numberType The type of phone number
+ * @param string $numberType The type of phone number of the Bundle's ownership request. Can be `local`, `mobile`, `national`, or `toll-free`.
* @return $this Fluent Builder
*/
- public function setNumberType($numberType)
+ public function setNumberType(string $numberType): self
{
$this->options['numberType'] = $numberType;
return $this;
}
+ /**
+ * Indicates that Bundle is a Test Bundle and will be Auto-Rejected
+ *
+ * @param bool $isTest Indicates that Bundle is a Test Bundle and will be Auto-Rejected
+ * @return $this Fluent Builder
+ */
+ public function setIsTest(bool $isTest): self
+ {
+ $this->options['isTest'] = $isTest;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Numbers.V2.CreateBundleOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Numbers.V2.CreateBundleOptions ' . $options . ']';
}
}
+
+
class ReadBundleOptions extends Options
-{
+ {
/**
- * @param string $status The verification status of the Bundle resource
- * @param string $friendlyName The string that you assigned to describe the
- * resource
- * @param string $regulationSid The unique string of a regulation.
- * @param string $isoCountry The ISO country code of the country
- * @param string $numberType The type of phone number
+ * @param string $status The verification status of the Bundle resource. Please refer to [Bundle Statuses](https://www.twilio.com/docs/phone-numbers/regulatory/api/bundles#bundle-statuses) for more details.
+ * @param string $friendlyName The string that you assigned to describe the resource. The column can contain 255 variable characters.
+ * @param string $regulationSid The unique string of a [Regulation resource](https://www.twilio.com/docs/phone-numbers/regulatory/api/regulations) that is associated to the Bundle resource.
+ * @param string $isoCountry The 2-digit [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the Bundle's phone number country ownership request.
+ * @param string $numberType The type of phone number of the Bundle's ownership request. Can be `local`, `mobile`, `national`, or `toll-free`.
+ * @param bool $hasValidUntilDate Indicates that the Bundle is a valid Bundle until a specified expiration date.
+ * @param string $sortBy Can be `valid-until` or `date-updated`. Defaults to `date-created`.
+ * @param string $sortDirection Default is `DESC`. Can be `ASC` or `DESC`.
+ * @param string $validUntilDateBefore Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format.
+ * @param string $validUntilDate Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format.
+ * @param string $validUntilDateAfter Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format.
*/
- public function __construct($status = Values::NONE, $friendlyName = Values::NONE, $regulationSid = Values::NONE, $isoCountry = Values::NONE, $numberType = Values::NONE)
- {
+ public function __construct(
+
+ string $status = Values::NONE,
+ string $friendlyName = Values::NONE,
+ string $regulationSid = Values::NONE,
+ string $isoCountry = Values::NONE,
+ string $numberType = Values::NONE,
+ bool $hasValidUntilDate = Values::BOOL_NONE,
+ string $sortBy = Values::NONE,
+ string $sortDirection = Values::NONE,
+ string $validUntilDateBefore = null,
+ string $validUntilDate = null,
+ string $validUntilDateAfter = null
+
+ ) {
$this->options['status'] = $status;
$this->options['friendlyName'] = $friendlyName;
$this->options['regulationSid'] = $regulationSid;
$this->options['isoCountry'] = $isoCountry;
$this->options['numberType'] = $numberType;
+ $this->options['hasValidUntilDate'] = $hasValidUntilDate;
+ $this->options['sortBy'] = $sortBy;
+ $this->options['sortDirection'] = $sortDirection;
+ $this->options['validUntilDateBefore'] = $validUntilDateBefore;
+ $this->options['validUntilDate'] = $validUntilDate;
+ $this->options['validUntilDateAfter'] = $validUntilDateAfter;
}
/**
- * The verification status of the Bundle resource.
+ * The verification status of the Bundle resource. Please refer to [Bundle Statuses](https://www.twilio.com/docs/phone-numbers/regulatory/api/bundles#bundle-statuses) for more details.
*
- * @param string $status The verification status of the Bundle resource
+ * @param string $status The verification status of the Bundle resource. Please refer to [Bundle Statuses](https://www.twilio.com/docs/phone-numbers/regulatory/api/bundles#bundle-statuses) for more details.
* @return $this Fluent Builder
*/
- public function setStatus($status)
+ public function setStatus(string $status): self
{
$this->options['status'] = $status;
return $this;
}
/**
- * The string that you assigned to describe the resource.
+ * The string that you assigned to describe the resource. The column can contain 255 variable characters.
*
- * @param string $friendlyName The string that you assigned to describe the
- * resource
+ * @param string $friendlyName The string that you assigned to describe the resource. The column can contain 255 variable characters.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
}
/**
- * The unique string of a regulation that is associated to the Bundle resource.
+ * The unique string of a [Regulation resource](https://www.twilio.com/docs/phone-numbers/regulatory/api/regulations) that is associated to the Bundle resource.
*
- * @param string $regulationSid The unique string of a regulation.
+ * @param string $regulationSid The unique string of a [Regulation resource](https://www.twilio.com/docs/phone-numbers/regulatory/api/regulations) that is associated to the Bundle resource.
* @return $this Fluent Builder
*/
- public function setRegulationSid($regulationSid)
+ public function setRegulationSid(string $regulationSid): self
{
$this->options['regulationSid'] = $regulationSid;
return $this;
}
/**
- * The ISO country code of the Bundle's phone number country ownership request.
+ * The 2-digit [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the Bundle's phone number country ownership request.
*
- * @param string $isoCountry The ISO country code of the country
+ * @param string $isoCountry The 2-digit [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the Bundle's phone number country ownership request.
* @return $this Fluent Builder
*/
- public function setIsoCountry($isoCountry)
+ public function setIsoCountry(string $isoCountry): self
{
$this->options['isoCountry'] = $isoCountry;
return $this;
}
/**
- * The type of phone number of the Bundle's ownership request.
+ * The type of phone number of the Bundle's ownership request. Can be `local`, `mobile`, `national`, or `toll-free`.
*
- * @param string $numberType The type of phone number
+ * @param string $numberType The type of phone number of the Bundle's ownership request. Can be `local`, `mobile`, `national`, or `toll-free`.
* @return $this Fluent Builder
*/
- public function setNumberType($numberType)
+ public function setNumberType(string $numberType): self
{
$this->options['numberType'] = $numberType;
return $this;
}
+ /**
+ * Indicates that the Bundle is a valid Bundle until a specified expiration date.
+ *
+ * @param bool $hasValidUntilDate Indicates that the Bundle is a valid Bundle until a specified expiration date.
+ * @return $this Fluent Builder
+ */
+ public function setHasValidUntilDate(bool $hasValidUntilDate): self
+ {
+ $this->options['hasValidUntilDate'] = $hasValidUntilDate;
+ return $this;
+ }
+
+ /**
+ * Can be `valid-until` or `date-updated`. Defaults to `date-created`.
+ *
+ * @param string $sortBy Can be `valid-until` or `date-updated`. Defaults to `date-created`.
+ * @return $this Fluent Builder
+ */
+ public function setSortBy(string $sortBy): self
+ {
+ $this->options['sortBy'] = $sortBy;
+ return $this;
+ }
+
+ /**
+ * Default is `DESC`. Can be `ASC` or `DESC`.
+ *
+ * @param string $sortDirection Default is `DESC`. Can be `ASC` or `DESC`.
+ * @return $this Fluent Builder
+ */
+ public function setSortDirection(string $sortDirection): self
+ {
+ $this->options['sortDirection'] = $sortDirection;
+ return $this;
+ }
+
+ /**
+ * Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format.
+ *
+ * @param string $validUntilDateBefore Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format.
+ * @return $this Fluent Builder
+ */
+ public function setValidUntilDateBefore(string $validUntilDateBefore): self
+ {
+ $this->options['validUntilDateBefore'] = $validUntilDateBefore;
+ return $this;
+ }
+
+ /**
+ * Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format.
+ *
+ * @param string $validUntilDate Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format.
+ * @return $this Fluent Builder
+ */
+ public function setValidUntilDate(string $validUntilDate): self
+ {
+ $this->options['validUntilDate'] = $validUntilDate;
+ return $this;
+ }
+
+ /**
+ * Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format.
+ *
+ * @param string $validUntilDateAfter Date to filter Bundles having their `valid_until_date` before or after the specified date. Can be `ValidUntilDate>=` or `ValidUntilDate<=`. Both can be used in conjunction as well. [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) is the acceptable date format.
+ * @return $this Fluent Builder
+ */
+ public function setValidUntilDateAfter(string $validUntilDateAfter): self
+ {
+ $this->options['validUntilDateAfter'] = $validUntilDateAfter;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Numbers.V2.ReadBundleOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Numbers.V2.ReadBundleOptions ' . $options . ']';
}
}
class UpdateBundleOptions extends Options
-{
+ {
/**
- * @param string $status The verification status of the Bundle resource
- * @param string $statusCallback The URL we call to inform your application of
- * status changes.
- * @param string $friendlyName The string that you assigned to describe the
- * resource
- * @param string $email The email address
+ * @param string $status
+ * @param string $statusCallback The URL we call to inform your application of status changes.
+ * @param string $friendlyName The string that you assigned to describe the resource.
+ * @param string $email The email address that will receive updates when the Bundle resource changes status.
*/
- public function __construct($status = Values::NONE, $statusCallback = Values::NONE, $friendlyName = Values::NONE, $email = Values::NONE)
- {
+ public function __construct(
+
+ string $status = Values::NONE,
+ string $statusCallback = Values::NONE,
+ string $friendlyName = Values::NONE,
+ string $email = Values::NONE
+
+ ) {
$this->options['status'] = $status;
$this->options['statusCallback'] = $statusCallback;
$this->options['friendlyName'] = $friendlyName;
@@ -270,12 +445,10 @@ public function __construct($status = Values::NONE, $statusCallback = Values::NO
}
/**
- * The verification status of the Bundle resource.
- *
- * @param string $status The verification status of the Bundle resource
+ * @param string $status
* @return $this Fluent Builder
*/
- public function setStatus($status)
+ public function setStatus(string $status): self
{
$this->options['status'] = $status;
return $this;
@@ -284,11 +457,10 @@ public function setStatus($status)
/**
* The URL we call to inform your application of status changes.
*
- * @param string $statusCallback The URL we call to inform your application of
- * status changes.
+ * @param string $statusCallback The URL we call to inform your application of status changes.
* @return $this Fluent Builder
*/
- public function setStatusCallback($statusCallback)
+ public function setStatusCallback(string $statusCallback): self
{
$this->options['statusCallback'] = $statusCallback;
return $this;
@@ -297,11 +469,10 @@ public function setStatusCallback($statusCallback)
/**
* The string that you assigned to describe the resource.
*
- * @param string $friendlyName The string that you assigned to describe the
- * resource
+ * @param string $friendlyName The string that you assigned to describe the resource.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -310,10 +481,10 @@ public function setFriendlyName($friendlyName)
/**
* The email address that will receive updates when the Bundle resource changes status.
*
- * @param string $email The email address
+ * @param string $email The email address that will receive updates when the Bundle resource changes status.
* @return $this Fluent Builder
*/
- public function setEmail($email)
+ public function setEmail(string $email): self
{
$this->options['email'] = $email;
return $this;
@@ -324,14 +495,10 @@ public function setEmail($email)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Numbers.V2.UpdateBundleOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Numbers.V2.UpdateBundleOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/BundlePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/BundlePage.php
index 0e88228..2327e1c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/BundlePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/BundlePage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return BundleInstance \Twilio\Rest\Numbers\V2\RegulatoryCompliance\BundleInstance
+ */
+ public function buildInstance(array $payload): BundleInstance
{
return new BundleInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Numbers.V2.BundlePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserContext.php
index 78f0e6b..f331f04 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserContext.php
@@ -2,58 +2,87 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Numbers
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Numbers\V2\RegulatoryCompliance;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
class EndUserContext extends InstanceContext
-{
+ {
/**
* Initialize the EndUserContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Numbers\V2\RegulatoryCompliance\EndUserContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid The unique string created by Twilio to identify the End User resource.
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/RegulatoryCompliance/EndUsers/' . \rawurlencode($sid)
+ .'';
+ }
+
+ /**
+ * Delete the EndUserInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/RegulatoryCompliance/EndUsers/' . \rawurlencode($sid) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a EndUserInstance
+ * Fetch the EndUserInstance
*
* @return EndUserInstance Fetched EndUserInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): EndUserInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
- return new EndUserInstance($this->version, $payload, $this->solution['sid']);
+ return new EndUserInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Update the EndUserInstance
*
@@ -61,36 +90,40 @@ public function fetch()
* @return EndUserInstance Updated EndUserInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): EndUserInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'Attributes' => Serialize::jsonObject($options['attributes']),
- ));
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'Attributes' =>
+ Serialize::jsonObject($options['attributes']),
+ ]);
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
- return new EndUserInstance($this->version, $payload, $this->solution['sid']);
+ return new EndUserInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Numbers.V2.EndUserContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserInstance.php
index 5d2f294..0624254 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserInstance.php
@@ -2,46 +2,54 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Numbers
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Numbers\V2\RegulatoryCompliance;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $friendlyName
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $friendlyName
* @property string $type
- * @property array $attributes
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
+ * @property array|null $attributes
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
*/
class EndUserInstance extends InstanceResource
{
/**
* Initialize the EndUserInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Numbers\V2\RegulatoryCompliance\EndUserInstance
+ * @param string $sid The unique string created by Twilio to identify the End User resource.
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
@@ -50,36 +58,50 @@ public function __construct(Version $version, array $payload, $sid = null)
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Numbers\V2\RegulatoryCompliance\EndUserContext Context
- * for this
- * EndUserInstance
+ * @return EndUserContext Context for this EndUserInstance
*/
- protected function proxy()
+ protected function proxy(): EndUserContext
{
if (!$this->context) {
- $this->context = new EndUserContext($this->version, $this->solution['sid']);
+ $this->context = new EndUserContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a EndUserInstance
+ * Delete the EndUserInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ return $this->proxy()->delete();
+ }
+
+ /**
+ * Fetch the EndUserInstance
*
* @return EndUserInstance Fetched EndUserInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): EndUserInstance
{
+
return $this->proxy()->fetch();
}
@@ -90,8 +112,9 @@ public function fetch()
* @return EndUserInstance Updated EndUserInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): EndUserInstance
{
+
return $this->proxy()->update($options);
}
@@ -102,7 +125,7 @@ public function update($options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -121,12 +144,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Numbers.V2.EndUserInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserList.php b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserList.php
index 1e8c62c..df3671e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Numbers
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Numbers\V2\RegulatoryCompliance;
@@ -12,56 +19,82 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class EndUserList extends ListResource
-{
+ {
/**
* Construct the EndUserList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Numbers\V2\RegulatoryCompliance\EndUserList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/RegulatoryCompliance/EndUsers';
}
/**
- * Create a new EndUserInstance
+ * Create the EndUserInstance
*
- * @param string $friendlyName The string that you assigned to describe the
- * resource
- * @param string $type The type of end user of the Bundle resource
+ * @param string $friendlyName The string that you assigned to describe the resource.
+ * @param string $type
* @param array|Options $options Optional Arguments
- * @return EndUserInstance Newly created EndUserInstance
+ * @return EndUserInstance Created EndUserInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($friendlyName, $type, $options = array())
+ public function create(string $friendlyName, string $type, array $options = []): EndUserInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $friendlyName,
- 'Type' => $type,
- 'Attributes' => Serialize::jsonObject($options['attributes']),
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'FriendlyName' =>
+ $friendlyName,
+ 'Type' =>
+ $type,
+ 'Attributes' =>
+ Serialize::jsonObject($options['attributes']),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new EndUserInstance(
+ $this->version,
+ $payload
);
+ }
- return new EndUserInstance($this->version, $payload);
+
+ /**
+ * Reads EndUserInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return EndUserInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -80,9 +113,9 @@ public function create($friendlyName, $type, $options = array())
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -91,26 +124,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads EndUserInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return EndUserInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of EndUserInstance records from the API.
* Request is executed immediately
@@ -118,21 +131,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of EndUserInstance
+ * @return EndUserPage Page of EndUserInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): EndUserPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new EndUserPage($this->version, $response, $this->solution);
}
@@ -142,9 +156,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of EndUserInstance
+ * @return EndUserPage Page of EndUserInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): EndUserPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -154,15 +168,21 @@ public function getPage($targetUrl)
return new EndUserPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a EndUserContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Numbers\V2\RegulatoryCompliance\EndUserContext
+ * @param string $sid The unique string created by Twilio to identify the End User resource.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): EndUserContext
{
- return new EndUserContext($this->version, $sid);
+ return new EndUserContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -170,8 +190,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Numbers.V2.EndUserList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserOptions.php
index b6096c5..c6577e6 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserOptions.php
@@ -1,10 +1,16 @@
options['attributes'] = $attributes;
}
/**
* The set of parameters that are the attributes of the End User resource which are derived End User Types.
*
- * @param array $attributes The set of parameters that compose the End User
- * resource
+ * @param array $attributes The set of parameters that are the attributes of the End User resource which are derived End User Types.
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setAttributes(array $attributes): self
{
$this->options['attributes'] = $attributes;
return $this;
@@ -66,28 +88,28 @@ public function setAttributes($attributes)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Numbers.V2.CreateEndUserOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Numbers.V2.CreateEndUserOptions ' . $options . ']';
}
}
+
+
+
class UpdateEndUserOptions extends Options
-{
+ {
/**
- * @param string $friendlyName The string that you assigned to describe the
- * resource
- * @param array $attributes The set of parameters that compose the End User
- * resource
+ * @param string $friendlyName The string that you assigned to describe the resource.
+ * @param array $attributes The set of parameters that are the attributes of the End User resource which are derived End User Types.
*/
- public function __construct($friendlyName = Values::NONE, $attributes = Values::NONE)
- {
+ public function __construct(
+
+ string $friendlyName = Values::NONE,
+ array $attributes = Values::ARRAY_NONE
+
+ ) {
$this->options['friendlyName'] = $friendlyName;
$this->options['attributes'] = $attributes;
}
@@ -95,11 +117,10 @@ public function __construct($friendlyName = Values::NONE, $attributes = Values::
/**
* The string that you assigned to describe the resource.
*
- * @param string $friendlyName The string that you assigned to describe the
- * resource
+ * @param string $friendlyName The string that you assigned to describe the resource.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -108,11 +129,10 @@ public function setFriendlyName($friendlyName)
/**
* The set of parameters that are the attributes of the End User resource which are derived End User Types.
*
- * @param array $attributes The set of parameters that compose the End User
- * resource
+ * @param array $attributes The set of parameters that are the attributes of the End User resource which are derived End User Types.
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setAttributes(array $attributes): self
{
$this->options['attributes'] = $attributes;
return $this;
@@ -123,14 +143,10 @@ public function setAttributes($attributes)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Numbers.V2.UpdateEndUserOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Numbers.V2.UpdateEndUserOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserPage.php
index 20c9e38..b39ec28 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return EndUserInstance \Twilio\Rest\Numbers\V2\RegulatoryCompliance\EndUserInstance
+ */
+ public function buildInstance(array $payload): EndUserInstance
{
return new EndUserInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Numbers.V2.EndUserPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserTypeContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserTypeContext.php
index 29ee8a0..4207e33 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserTypeContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserTypeContext.php
@@ -2,68 +2,82 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Numbers
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Numbers\V2\RegulatoryCompliance;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class EndUserTypeContext extends InstanceContext
-{
+ {
/**
* Initialize the EndUserTypeContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The unique string that identifies the End-User Type
- * resource
- * @return \Twilio\Rest\Numbers\V2\RegulatoryCompliance\EndUserTypeContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid The unique string that identifies the End-User Type resource.
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/RegulatoryCompliance/EndUserTypes/' . \rawurlencode($sid) . '';
+ $this->uri = '/RegulatoryCompliance/EndUserTypes/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a EndUserTypeInstance
+ * Fetch the EndUserTypeInstance
*
* @return EndUserTypeInstance Fetched EndUserTypeInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): EndUserTypeInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
- return new EndUserTypeInstance($this->version, $payload, $this->solution['sid']);
+ return new EndUserTypeInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Numbers.V2.EndUserTypeContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserTypeInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserTypeInstance.php
index 1f9ed16..3dbf04e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserTypeInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserTypeInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Numbers
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Numbers\V2\RegulatoryCompliance;
use Twilio\Exceptions\TwilioException;
@@ -14,63 +22,66 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * @property string $sid
- * @property string $friendlyName
- * @property string $machineName
- * @property array $fields
- * @property string $url
+ * @property string|null $sid
+ * @property string|null $friendlyName
+ * @property string|null $machineName
+ * @property array[]|null $fields
+ * @property string|null $url
*/
class EndUserTypeInstance extends InstanceResource
{
/**
* Initialize the EndUserTypeInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The unique string that identifies the End-User Type
- * resource
- * @return \Twilio\Rest\Numbers\V2\RegulatoryCompliance\EndUserTypeInstance
+ * @param string $sid The unique string that identifies the End-User Type resource.
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
'machineName' => Values::array_get($payload, 'machine_name'),
'fields' => Values::array_get($payload, 'fields'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Numbers\V2\RegulatoryCompliance\EndUserTypeContext Context for this EndUserTypeInstance
+ * @return EndUserTypeContext Context for this EndUserTypeInstance
*/
- protected function proxy()
+ protected function proxy(): EndUserTypeContext
{
if (!$this->context) {
- $this->context = new EndUserTypeContext($this->version, $this->solution['sid']);
+ $this->context = new EndUserTypeContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a EndUserTypeInstance
+ * Fetch the EndUserTypeInstance
*
* @return EndUserTypeInstance Fetched EndUserTypeInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): EndUserTypeInstance
{
+
return $this->proxy()->fetch();
}
@@ -81,7 +92,7 @@ public function fetch()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -100,12 +111,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Numbers.V2.EndUserTypeInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserTypeList.php b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserTypeList.php
index c78602d..7c0ef38 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserTypeList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserTypeList.php
@@ -2,35 +2,65 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Numbers
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Numbers\V2\RegulatoryCompliance;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class EndUserTypeList extends ListResource
-{
+ {
/**
* Construct the EndUserTypeList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Numbers\V2\RegulatoryCompliance\EndUserTypeList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/RegulatoryCompliance/EndUserTypes';
}
+ /**
+ * Reads EndUserTypeInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return EndUserTypeInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
+ }
+
/**
* Streams EndUserTypeInstance records from the API as a generator stream.
* This operation lazily loads records as efficiently as possible until the
@@ -47,9 +77,9 @@ public function __construct(Version $version)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -58,26 +88,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads EndUserTypeInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return EndUserTypeInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of EndUserTypeInstance records from the API.
* Request is executed immediately
@@ -85,21 +95,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of EndUserTypeInstance
+ * @return EndUserTypePage Page of EndUserTypeInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): EndUserTypePage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new EndUserTypePage($this->version, $response, $this->solution);
}
@@ -109,9 +120,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of EndUserTypeInstance
+ * @return EndUserTypePage Page of EndUserTypeInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): EndUserTypePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -121,16 +132,21 @@ public function getPage($targetUrl)
return new EndUserTypePage($this->version, $response, $this->solution);
}
+
/**
* Constructs a EndUserTypeContext
*
- * @param string $sid The unique string that identifies the End-User Type
- * resource
- * @return \Twilio\Rest\Numbers\V2\RegulatoryCompliance\EndUserTypeContext
+ * @param string $sid The unique string that identifies the End-User Type resource.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): EndUserTypeContext
{
- return new EndUserTypeContext($this->version, $sid);
+ return new EndUserTypeContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -138,8 +154,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Numbers.V2.EndUserTypeList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserTypePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserTypePage.php
index fa04eb3..507b86d 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserTypePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/EndUserTypePage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return EndUserTypeInstance \Twilio\Rest\Numbers\V2\RegulatoryCompliance\EndUserTypeInstance
+ */
+ public function buildInstance(array $payload): EndUserTypeInstance
{
return new EndUserTypeInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Numbers.V2.EndUserTypePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentContext.php
index e094f07..616ccb6 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentContext.php
@@ -2,58 +2,87 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Numbers
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Numbers\V2\RegulatoryCompliance;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
class SupportingDocumentContext extends InstanceContext
-{
+ {
/**
* Initialize the SupportingDocumentContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Numbers\V2\RegulatoryCompliance\SupportingDocumentContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid The unique string created by Twilio to identify the Supporting Document resource.
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/RegulatoryCompliance/SupportingDocuments/' . \rawurlencode($sid)
+ .'';
+ }
+
+ /**
+ * Delete the SupportingDocumentInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/RegulatoryCompliance/SupportingDocuments/' . \rawurlencode($sid) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a SupportingDocumentInstance
+ * Fetch the SupportingDocumentInstance
*
* @return SupportingDocumentInstance Fetched SupportingDocumentInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): SupportingDocumentInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
- return new SupportingDocumentInstance($this->version, $payload, $this->solution['sid']);
+ return new SupportingDocumentInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Update the SupportingDocumentInstance
*
@@ -61,36 +90,40 @@ public function fetch()
* @return SupportingDocumentInstance Updated SupportingDocumentInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): SupportingDocumentInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'Attributes' => Serialize::jsonObject($options['attributes']),
- ));
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'Attributes' =>
+ Serialize::jsonObject($options['attributes']),
+ ]);
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
- return new SupportingDocumentInstance($this->version, $payload, $this->solution['sid']);
+ return new SupportingDocumentInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Numbers.V2.SupportingDocumentContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentInstance.php
index 4094513..dc1f054 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentInstance.php
@@ -2,87 +2,114 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Numbers
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Numbers\V2\RegulatoryCompliance;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $friendlyName
- * @property string $mimeType
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $friendlyName
+ * @property string|null $mimeType
* @property string $status
- * @property string $type
- * @property array $attributes
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
+ * @property string|null $failureReason
+ * @property array[]|null $errors
+ * @property string|null $type
+ * @property array|null $attributes
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
*/
class SupportingDocumentInstance extends InstanceResource
{
/**
* Initialize the SupportingDocumentInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Numbers\V2\RegulatoryCompliance\SupportingDocumentInstance
+ * @param string $sid The unique string created by Twilio to identify the Supporting Document resource.
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
'mimeType' => Values::array_get($payload, 'mime_type'),
'status' => Values::array_get($payload, 'status'),
+ 'failureReason' => Values::array_get($payload, 'failure_reason'),
+ 'errors' => Values::array_get($payload, 'errors'),
'type' => Values::array_get($payload, 'type'),
'attributes' => Values::array_get($payload, 'attributes'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Numbers\V2\RegulatoryCompliance\SupportingDocumentContext Context for this
- * SupportingDocumentInstance
+ * @return SupportingDocumentContext Context for this SupportingDocumentInstance
*/
- protected function proxy()
+ protected function proxy(): SupportingDocumentContext
{
if (!$this->context) {
- $this->context = new SupportingDocumentContext($this->version, $this->solution['sid']);
+ $this->context = new SupportingDocumentContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a SupportingDocumentInstance
+ * Delete the SupportingDocumentInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ return $this->proxy()->delete();
+ }
+
+ /**
+ * Fetch the SupportingDocumentInstance
*
* @return SupportingDocumentInstance Fetched SupportingDocumentInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): SupportingDocumentInstance
{
+
return $this->proxy()->fetch();
}
@@ -93,8 +120,9 @@ public function fetch()
* @return SupportingDocumentInstance Updated SupportingDocumentInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): SupportingDocumentInstance
{
+
return $this->proxy()->update($options);
}
@@ -105,7 +133,7 @@ public function update($options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -124,12 +152,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Numbers.V2.SupportingDocumentInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentList.php b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentList.php
index c0cb8ee..32371a6 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Numbers
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Numbers\V2\RegulatoryCompliance;
@@ -12,61 +19,86 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class SupportingDocumentList extends ListResource
-{
+ {
/**
* Construct the SupportingDocumentList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Numbers\V2\RegulatoryCompliance\SupportingDocumentList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/RegulatoryCompliance/SupportingDocuments';
}
/**
- * Create a new SupportingDocumentInstance
+ * Create the SupportingDocumentInstance
*
- * @param string $friendlyName The string that you assigned to describe the
- * resource
- * @param string $type The type of the Supporting Document
+ * @param string $friendlyName The string that you assigned to describe the resource.
+ * @param string $type The type of the Supporting Document.
* @param array|Options $options Optional Arguments
- * @return SupportingDocumentInstance Newly created SupportingDocumentInstance
+ * @return SupportingDocumentInstance Created SupportingDocumentInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($friendlyName, $type, $options = array())
+ public function create(string $friendlyName, string $type, array $options = []): SupportingDocumentInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $friendlyName,
- 'Type' => $type,
- 'Attributes' => Serialize::jsonObject($options['attributes']),
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'FriendlyName' =>
+ $friendlyName,
+ 'Type' =>
+ $type,
+ 'Attributes' =>
+ Serialize::jsonObject($options['attributes']),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new SupportingDocumentInstance(
+ $this->version,
+ $payload
);
+ }
- return new SupportingDocumentInstance($this->version, $payload);
+
+ /**
+ * Reads SupportingDocumentInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return SupportingDocumentInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
- * Streams SupportingDocumentInstance records from the API as a generator
- * stream.
+ * Streams SupportingDocumentInstance records from the API as a generator stream.
* This operation lazily loads records as efficiently as possible until the
* limit
* is reached.
@@ -81,9 +113,9 @@ public function create($friendlyName, $type, $options = array())
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -92,26 +124,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads SupportingDocumentInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return SupportingDocumentInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of SupportingDocumentInstance records from the API.
* Request is executed immediately
@@ -119,21 +131,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of SupportingDocumentInstance
+ * @return SupportingDocumentPage Page of SupportingDocumentInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): SupportingDocumentPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new SupportingDocumentPage($this->version, $response, $this->solution);
}
@@ -143,9 +156,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of SupportingDocumentInstance
+ * @return SupportingDocumentPage Page of SupportingDocumentInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): SupportingDocumentPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -155,15 +168,21 @@ public function getPage($targetUrl)
return new SupportingDocumentPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a SupportingDocumentContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Numbers\V2\RegulatoryCompliance\SupportingDocumentContext
+ * @param string $sid The unique string created by Twilio to identify the Supporting Document resource.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): SupportingDocumentContext
{
- return new SupportingDocumentContext($this->version, $sid);
+ return new SupportingDocumentContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -171,8 +190,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Numbers.V2.SupportingDocumentList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentOptions.php
index 1fde7c5..cdd8c02 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentOptions.php
@@ -1,10 +1,16 @@
options['attributes'] = $attributes;
}
/**
* The set of parameters that are the attributes of the Supporting Documents resource which are derived Supporting Document Types.
*
- * @param array $attributes The set of parameters that compose the Supporting
- * Documents resource
+ * @param array $attributes The set of parameters that are the attributes of the Supporting Documents resource which are derived Supporting Document Types.
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setAttributes(array $attributes): self
{
$this->options['attributes'] = $attributes;
return $this;
@@ -66,28 +88,28 @@ public function setAttributes($attributes)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Numbers.V2.CreateSupportingDocumentOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Numbers.V2.CreateSupportingDocumentOptions ' . $options . ']';
}
}
+
+
+
class UpdateSupportingDocumentOptions extends Options
-{
+ {
/**
- * @param string $friendlyName The string that you assigned to describe the
- * resource
- * @param array $attributes The set of parameters that compose the Supporting
- * Document resource
+ * @param string $friendlyName The string that you assigned to describe the resource.
+ * @param array $attributes The set of parameters that are the attributes of the Supporting Document resource which are derived Supporting Document Types.
*/
- public function __construct($friendlyName = Values::NONE, $attributes = Values::NONE)
- {
+ public function __construct(
+
+ string $friendlyName = Values::NONE,
+ array $attributes = Values::ARRAY_NONE
+
+ ) {
$this->options['friendlyName'] = $friendlyName;
$this->options['attributes'] = $attributes;
}
@@ -95,11 +117,10 @@ public function __construct($friendlyName = Values::NONE, $attributes = Values::
/**
* The string that you assigned to describe the resource.
*
- * @param string $friendlyName The string that you assigned to describe the
- * resource
+ * @param string $friendlyName The string that you assigned to describe the resource.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -108,11 +129,10 @@ public function setFriendlyName($friendlyName)
/**
* The set of parameters that are the attributes of the Supporting Document resource which are derived Supporting Document Types.
*
- * @param array $attributes The set of parameters that compose the Supporting
- * Document resource
+ * @param array $attributes The set of parameters that are the attributes of the Supporting Document resource which are derived Supporting Document Types.
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setAttributes(array $attributes): self
{
$this->options['attributes'] = $attributes;
return $this;
@@ -123,14 +143,10 @@ public function setAttributes($attributes)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Numbers.V2.UpdateSupportingDocumentOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Numbers.V2.UpdateSupportingDocumentOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentPage.php
index 060a2fa..649f480 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return SupportingDocumentInstance \Twilio\Rest\Numbers\V2\RegulatoryCompliance\SupportingDocumentInstance
+ */
+ public function buildInstance(array $payload): SupportingDocumentInstance
{
return new SupportingDocumentInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Numbers.V2.SupportingDocumentPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentTypeContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentTypeContext.php
index e5d4711..ae25778 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentTypeContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentTypeContext.php
@@ -2,68 +2,82 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Numbers
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Numbers\V2\RegulatoryCompliance;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class SupportingDocumentTypeContext extends InstanceContext
-{
+ {
/**
* Initialize the SupportingDocumentTypeContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The unique string that identifies the Supporting Document
- * Type resource
- * @return \Twilio\Rest\Numbers\V2\RegulatoryCompliance\SupportingDocumentTypeContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid The unique string that identifies the Supporting Document Type resource.
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/RegulatoryCompliance/SupportingDocumentTypes/' . \rawurlencode($sid) . '';
+ $this->uri = '/RegulatoryCompliance/SupportingDocumentTypes/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a SupportingDocumentTypeInstance
+ * Fetch the SupportingDocumentTypeInstance
*
* @return SupportingDocumentTypeInstance Fetched SupportingDocumentTypeInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): SupportingDocumentTypeInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
- return new SupportingDocumentTypeInstance($this->version, $payload, $this->solution['sid']);
+ return new SupportingDocumentTypeInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Numbers.V2.SupportingDocumentTypeContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentTypeInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentTypeInstance.php
index 4684e9b..a38b80a 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentTypeInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentTypeInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Numbers
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Numbers\V2\RegulatoryCompliance;
use Twilio\Exceptions\TwilioException;
@@ -14,64 +22,66 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * @property string $sid
- * @property string $friendlyName
- * @property string $machineName
- * @property array $fields
- * @property string $url
+ * @property string|null $sid
+ * @property string|null $friendlyName
+ * @property string|null $machineName
+ * @property array[]|null $fields
+ * @property string|null $url
*/
class SupportingDocumentTypeInstance extends InstanceResource
{
/**
* Initialize the SupportingDocumentTypeInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The unique string that identifies the Supporting Document
- * Type resource
- * @return \Twilio\Rest\Numbers\V2\RegulatoryCompliance\SupportingDocumentTypeInstance
+ * @param string $sid The unique string that identifies the Supporting Document Type resource.
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
'machineName' => Values::array_get($payload, 'machine_name'),
'fields' => Values::array_get($payload, 'fields'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Numbers\V2\RegulatoryCompliance\SupportingDocumentTypeContext Context for this
- * SupportingDocumentTypeInstance
+ * @return SupportingDocumentTypeContext Context for this SupportingDocumentTypeInstance
*/
- protected function proxy()
+ protected function proxy(): SupportingDocumentTypeContext
{
if (!$this->context) {
- $this->context = new SupportingDocumentTypeContext($this->version, $this->solution['sid']);
+ $this->context = new SupportingDocumentTypeContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a SupportingDocumentTypeInstance
+ * Fetch the SupportingDocumentTypeInstance
*
* @return SupportingDocumentTypeInstance Fetched SupportingDocumentTypeInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): SupportingDocumentTypeInstance
{
+
return $this->proxy()->fetch();
}
@@ -82,7 +92,7 @@ public function fetch()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -101,12 +111,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Numbers.V2.SupportingDocumentTypeInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentTypeList.php b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentTypeList.php
index 7ee9052..60fc453 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentTypeList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentTypeList.php
@@ -2,119 +2,127 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Numbers
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Numbers\V2\RegulatoryCompliance;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class SupportingDocumentTypeList extends ListResource
-{
+ {
/**
* Construct the SupportingDocumentTypeList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Numbers\V2\RegulatoryCompliance\SupportingDocumentTypeList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/RegulatoryCompliance/SupportingDocumentTypes';
}
/**
- * Streams SupportingDocumentTypeInstance records from the API as a generator
- * stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Reads SupportingDocumentTypeInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
*
- * @param int $limit Upper limit for the number of records to return. stream()
+ * @param int $limit Upper limit for the number of records to return. read()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
+ * page_size is defined but a limit is defined, read()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return SupportingDocumentTypeInstance[] Array of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function read(int $limit = null, $pageSize = null): array
{
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
- * Reads SupportingDocumentTypeInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
+ * Streams SupportingDocumentTypeInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
*
- * @param int $limit Upper limit for the number of records to return. read()
+ * @param int $limit Upper limit for the number of records to return. stream()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
+ * page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return SupportingDocumentTypeInstance[] Array of results
+ * @return Stream stream of results
*/
- public function read($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
- return \iterator_to_array($this->stream($limit, $pageSize), false);
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
/**
- * Retrieve a single page of SupportingDocumentTypeInstance records from the
- * API.
+ * Retrieve a single page of SupportingDocumentTypeInstance records from the API.
* Request is executed immediately
*
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of SupportingDocumentTypeInstance
+ * @return SupportingDocumentTypePage Page of SupportingDocumentTypeInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): SupportingDocumentTypePage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new SupportingDocumentTypePage($this->version, $response, $this->solution);
}
/**
- * Retrieve a specific page of SupportingDocumentTypeInstance records from the
- * API.
+ * Retrieve a specific page of SupportingDocumentTypeInstance records from the API.
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of SupportingDocumentTypeInstance
+ * @return SupportingDocumentTypePage Page of SupportingDocumentTypeInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): SupportingDocumentTypePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -124,16 +132,21 @@ public function getPage($targetUrl)
return new SupportingDocumentTypePage($this->version, $response, $this->solution);
}
+
/**
* Constructs a SupportingDocumentTypeContext
*
- * @param string $sid The unique string that identifies the Supporting Document
- * Type resource
- * @return \Twilio\Rest\Numbers\V2\RegulatoryCompliance\SupportingDocumentTypeContext
+ * @param string $sid The unique string that identifies the Supporting Document Type resource.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): SupportingDocumentTypeContext
{
- return new SupportingDocumentTypeContext($this->version, $sid);
+ return new SupportingDocumentTypeContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -141,8 +154,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Numbers.V2.SupportingDocumentTypeList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentTypePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentTypePage.php
index b06a96f..7f52d8a 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentTypePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliance/SupportingDocumentTypePage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return SupportingDocumentTypeInstance \Twilio\Rest\Numbers\V2\RegulatoryCompliance\SupportingDocumentTypeInstance
+ */
+ public function buildInstance(array $payload): SupportingDocumentTypeInstance
{
return new SupportingDocumentTypeInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Numbers.V2.SupportingDocumentTypePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryComplianceInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryComplianceInstance.php
index 05e7260..5d25126 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryComplianceInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryComplianceInstance.php
@@ -2,32 +2,39 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Numbers
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Numbers\V2;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
-use Twilio\Values;
use Twilio\Version;
+
class RegulatoryComplianceInstance extends InstanceResource
{
/**
* Initialize the RegulatoryComplianceInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @return \Twilio\Rest\Numbers\V2\RegulatoryComplianceInstance
*/
public function __construct(Version $version, array $payload)
{
parent::__construct($version);
- $this->solution = array();
+ $this->solution = [];
}
/**
@@ -37,7 +44,7 @@ public function __construct(Version $version, array $payload)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -56,8 +63,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Numbers.V2.RegulatoryComplianceInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryComplianceList.php b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryComplianceList.php
index c80898f..4141c39 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryComplianceList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryComplianceList.php
@@ -2,113 +2,145 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Numbers
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Numbers\V2;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
+use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Numbers\V2\RegulatoryCompliance\RegulationList;
+use Twilio\Rest\Numbers\V2\RegulatoryCompliance\SupportingDocumentList;
use Twilio\Rest\Numbers\V2\RegulatoryCompliance\BundleList;
-use Twilio\Rest\Numbers\V2\RegulatoryCompliance\EndUserList;
use Twilio\Rest\Numbers\V2\RegulatoryCompliance\EndUserTypeList;
-use Twilio\Rest\Numbers\V2\RegulatoryCompliance\SupportingDocumentList;
+use Twilio\Rest\Numbers\V2\RegulatoryCompliance\EndUserList;
use Twilio\Rest\Numbers\V2\RegulatoryCompliance\SupportingDocumentTypeList;
-use Twilio\Version;
+
/**
- * @property \Twilio\Rest\Numbers\V2\RegulatoryCompliance\BundleList $bundles
- * @property \Twilio\Rest\Numbers\V2\RegulatoryCompliance\EndUserList $endUsers
- * @property \Twilio\Rest\Numbers\V2\RegulatoryCompliance\EndUserTypeList $endUserTypes
- * @property \Twilio\Rest\Numbers\V2\RegulatoryCompliance\SupportingDocumentList $supportingDocuments
- * @property \Twilio\Rest\Numbers\V2\RegulatoryCompliance\SupportingDocumentTypeList $supportingDocumentTypes
- * @method \Twilio\Rest\Numbers\V2\RegulatoryCompliance\BundleContext bundles(string $sid)
- * @method \Twilio\Rest\Numbers\V2\RegulatoryCompliance\EndUserContext endUsers(string $sid)
- * @method \Twilio\Rest\Numbers\V2\RegulatoryCompliance\EndUserTypeContext endUserTypes(string $sid)
+ * @property RegulationList $regulations
+ * @property SupportingDocumentList $supportingDocuments
+ * @property BundleList $bundles
+ * @property EndUserTypeList $endUserTypes
+ * @property EndUserList $endUsers
+ * @property SupportingDocumentTypeList $supportingDocumentTypes
* @method \Twilio\Rest\Numbers\V2\RegulatoryCompliance\SupportingDocumentContext supportingDocuments(string $sid)
+ * @method \Twilio\Rest\Numbers\V2\RegulatoryCompliance\EndUserContext endUsers(string $sid)
+ * @method \Twilio\Rest\Numbers\V2\RegulatoryCompliance\BundleContext bundles(string $sid)
* @method \Twilio\Rest\Numbers\V2\RegulatoryCompliance\SupportingDocumentTypeContext supportingDocumentTypes(string $sid)
+ * @method \Twilio\Rest\Numbers\V2\RegulatoryCompliance\RegulationContext regulations(string $sid)
+ * @method \Twilio\Rest\Numbers\V2\RegulatoryCompliance\EndUserTypeContext endUserTypes(string $sid)
*/
class RegulatoryComplianceList extends ListResource
-{
+ {
+ protected $_regulations = null;
+ protected $_supportingDocuments = null;
protected $_bundles = null;
- protected $_endUsers = null;
protected $_endUserTypes = null;
- protected $_supportingDocuments = null;
+ protected $_endUsers = null;
protected $_supportingDocumentTypes = null;
/**
* Construct the RegulatoryComplianceList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Numbers\V2\RegulatoryComplianceList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
}
/**
- * Access the bundles
+ * Access the regulations
*/
- protected function getBundles()
+ protected function getRegulations(): RegulationList
{
- if (!$this->_bundles) {
- $this->_bundles = new BundleList($this->version);
+ if (!$this->_regulations) {
+ $this->_regulations = new RegulationList(
+ $this->version
+ );
}
-
- return $this->_bundles;
+ return $this->_regulations;
}
/**
- * Access the endUsers
+ * Access the supportingDocuments
*/
- protected function getEndUsers()
+ protected function getSupportingDocuments(): SupportingDocumentList
{
- if (!$this->_endUsers) {
- $this->_endUsers = new EndUserList($this->version);
+ if (!$this->_supportingDocuments) {
+ $this->_supportingDocuments = new SupportingDocumentList(
+ $this->version
+ );
}
+ return $this->_supportingDocuments;
+ }
- return $this->_endUsers;
+ /**
+ * Access the bundles
+ */
+ protected function getBundles(): BundleList
+ {
+ if (!$this->_bundles) {
+ $this->_bundles = new BundleList(
+ $this->version
+ );
+ }
+ return $this->_bundles;
}
/**
* Access the endUserTypes
*/
- protected function getEndUserTypes()
+ protected function getEndUserTypes(): EndUserTypeList
{
if (!$this->_endUserTypes) {
- $this->_endUserTypes = new EndUserTypeList($this->version);
+ $this->_endUserTypes = new EndUserTypeList(
+ $this->version
+ );
}
-
return $this->_endUserTypes;
}
/**
- * Access the supportingDocuments
+ * Access the endUsers
*/
- protected function getSupportingDocuments()
+ protected function getEndUsers(): EndUserList
{
- if (!$this->_supportingDocuments) {
- $this->_supportingDocuments = new SupportingDocumentList($this->version);
+ if (!$this->_endUsers) {
+ $this->_endUsers = new EndUserList(
+ $this->version
+ );
}
-
- return $this->_supportingDocuments;
+ return $this->_endUsers;
}
/**
* Access the supportingDocumentTypes
*/
- protected function getSupportingDocumentTypes()
+ protected function getSupportingDocumentTypes(): SupportingDocumentTypeList
{
if (!$this->_supportingDocumentTypes) {
- $this->_supportingDocumentTypes = new SupportingDocumentTypeList($this->version);
+ $this->_supportingDocumentTypes = new SupportingDocumentTypeList(
+ $this->version
+ );
}
-
return $this->_supportingDocumentTypes;
}
@@ -119,7 +151,7 @@ protected function getSupportingDocumentTypes()
* @return \Twilio\ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -134,10 +166,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -152,8 +184,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Numbers.V2.RegulatoryComplianceList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliancePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliancePage.php
index 112c185..4f7be78 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliancePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Numbers/V2/RegulatoryCompliancePage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return RegulatoryComplianceInstance \Twilio\Rest\Numbers\V2\RegulatoryComplianceInstance
+ */
+ public function buildInstance(array $payload): RegulatoryComplianceInstance
{
return new RegulatoryComplianceInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Numbers.V2.RegulatoryCompliancePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview.php
index 4ea38ac..1a79db1 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview.php
@@ -1,502 +1,178 @@
baseUrl = 'https://preview.twilio.com';
- }
-
- /**
- * @return \Twilio\Rest\Preview\BulkExports Version bulkExports of preview
- */
- protected function getBulkExports()
- {
- if (!$this->_bulkExports) {
- $this->_bulkExports = new PreviewBulkExports($this);
- }
- return $this->_bulkExports;
- }
-
- /**
- * @return \Twilio\Rest\Preview\DeployedDevices Version deployedDevices of
- * preview
- */
- protected function getDeployedDevices()
- {
- if (!$this->_deployedDevices) {
- $this->_deployedDevices = new PreviewDeployedDevices($this);
- }
- return $this->_deployedDevices;
- }
-
- /**
- * @return \Twilio\Rest\Preview\HostedNumbers Version hostedNumbers of preview
- */
- protected function getHostedNumbers()
- {
- if (!$this->_hostedNumbers) {
- $this->_hostedNumbers = new PreviewHostedNumbers($this);
- }
- return $this->_hostedNumbers;
- }
-
- /**
- * @return \Twilio\Rest\Preview\Marketplace Version marketplace of preview
- */
- protected function getMarketplace()
- {
- if (!$this->_marketplace) {
- $this->_marketplace = new PreviewMarketplace($this);
- }
- return $this->_marketplace;
- }
-
- /**
- * @return \Twilio\Rest\Preview\Sync Version sync of preview
- */
- protected function getSync()
- {
- if (!$this->_sync) {
- $this->_sync = new PreviewSync($this);
- }
- return $this->_sync;
- }
-
- /**
- * @return \Twilio\Rest\Preview\Understand Version understand of preview
- */
- protected function getUnderstand()
- {
- if (!$this->_understand) {
- $this->_understand = new PreviewUnderstand($this);
- }
- return $this->_understand;
- }
-
- /**
- * @return \Twilio\Rest\Preview\Wireless Version wireless of preview
- */
- protected function getWireless()
- {
- if (!$this->_wireless) {
- $this->_wireless = new PreviewWireless($this);
- }
- return $this->_wireless;
- }
-
- /**
- * @return \Twilio\Rest\Preview\TrustedComms Version trustedComms of preview
- */
- protected function getTrustedComms()
- {
- if (!$this->_trustedComms) {
- $this->_trustedComms = new PreviewTrustedComms($this);
- }
- return $this->_trustedComms;
- }
-
- /**
- * Magic getter to lazy load version
- *
- * @param string $name Version to return
- * @return \Twilio\Version The requested version
- * @throws TwilioException For unknown versions
- */
- public function __get($name)
- {
- $method = 'get' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return $this->$method();
- }
-
- throw new TwilioException('Unknown version ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $method = 'context' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return \call_user_func_array(array($this, $method), $arguments);
- }
-
- throw new TwilioException('Unknown context ' . $name);
- }
-
- /**
- * @return \Twilio\Rest\Preview\BulkExports\ExportList
- */
- protected function getExports()
- {
- return $this->bulkExports->exports;
- }
-
- /**
- * @param string $resourceType The type of communication – Messages, Calls
- * @return \Twilio\Rest\Preview\BulkExports\ExportContext
- */
- protected function contextExports($resourceType)
- {
- return $this->bulkExports->exports($resourceType);
- }
- /**
- * @return \Twilio\Rest\Preview\BulkExports\ExportConfigurationList
- */
- protected function getExportConfiguration()
- {
- return $this->bulkExports->exportConfiguration;
- }
-
- /**
- * @param string $resourceType The type of communication – Messages, Calls
- * @return \Twilio\Rest\Preview\BulkExports\ExportConfigurationContext
- */
- protected function contextExportConfiguration($resourceType)
- {
- return $this->bulkExports->exportConfiguration($resourceType);
- }
+class Preview extends PreviewBase {
/**
- * @return \Twilio\Rest\Preview\DeployedDevices\FleetList
+ * @deprecated Use deployedDevices->fleets instead.
*/
- protected function getFleets()
- {
+ protected function getFleets(): \Twilio\Rest\Preview\DeployedDevices\FleetList {
+ echo "fleets is deprecated. Use deployedDevices->fleets instead.";
return $this->deployedDevices->fleets;
}
/**
+ * @deprecated Use deployedDevices->fleets(\$sid) instead.
* @param string $sid A string that uniquely identifies the Fleet.
- * @return \Twilio\Rest\Preview\DeployedDevices\FleetContext
*/
- protected function contextFleets($sid)
- {
+ protected function contextFleets(string $sid): \Twilio\Rest\Preview\DeployedDevices\FleetContext {
+ echo "fleets(\$sid) is deprecated. Use deployedDevices->fleets(\$sid) instead.";
return $this->deployedDevices->fleets($sid);
}
/**
- * @return \Twilio\Rest\Preview\HostedNumbers\AuthorizationDocumentList
+ * @deprecated Use hostedNumbers->authorizationDocuments instead.
*/
- protected function getAuthorizationDocuments()
- {
+ protected function getAuthorizationDocuments(): \Twilio\Rest\Preview\HostedNumbers\AuthorizationDocumentList {
+ echo "authorizationDocuments is deprecated. Use hostedNumbers->authorizationDocuments instead.";
return $this->hostedNumbers->authorizationDocuments;
}
/**
+ * @deprecated Use hostedNumbers->authorizationDocuments(\$sid) instead.
* @param string $sid AuthorizationDocument sid.
- * @return \Twilio\Rest\Preview\HostedNumbers\AuthorizationDocumentContext
*/
- protected function contextAuthorizationDocuments($sid)
- {
+ protected function contextAuthorizationDocuments(string $sid): \Twilio\Rest\Preview\HostedNumbers\AuthorizationDocumentContext {
+ echo "authorizationDocuments(\$sid) is deprecated. Use hostedNumbers->authorizationDocuments(\$sid) instead.";
return $this->hostedNumbers->authorizationDocuments($sid);
}
/**
- * @return \Twilio\Rest\Preview\HostedNumbers\HostedNumberOrderList
+ * @deprecated Use hostedNumbers->hostedNumberOrders instead.
*/
- protected function getHostedNumberOrders()
- {
+ protected function getHostedNumberOrders(): \Twilio\Rest\Preview\HostedNumbers\HostedNumberOrderList {
+ echo "hostedNumberOrders is deprecated. Use hostedNumbers->hostedNumberOrders instead.";
return $this->hostedNumbers->hostedNumberOrders;
}
/**
+ * @deprecated Use hostedNumbers->hostedNumberOrders(\$sid) instead
* @param string $sid HostedNumberOrder sid.
- * @return \Twilio\Rest\Preview\HostedNumbers\HostedNumberOrderContext
*/
- protected function contextHostedNumberOrders($sid)
- {
+ protected function contextHostedNumberOrders(string $sid): \Twilio\Rest\Preview\HostedNumbers\HostedNumberOrderContext {
+ echo "hostedNumberOrders(\$sid) is deprecated. Use hostedNumbers->hostedNumberOrders(\$sid) instead.";
return $this->hostedNumbers->hostedNumberOrders($sid);
}
/**
- * @return \Twilio\Rest\Preview\Marketplace\AvailableAddOnList
+ * @deprecated Use marketplace->availableAddOns instead.
*/
- protected function getAvailableAddOns()
- {
+ protected function getAvailableAddOns(): \Twilio\Rest\Preview\Marketplace\AvailableAddOnList {
+ echo "availableAddOns is deprecated. Use marketplace->availableAddOns instead.";
return $this->marketplace->availableAddOns;
}
/**
+ * @deprecated Use marketplace->availableAddOns(\$sid) instead.
* @param string $sid The SID of the AvailableAddOn resource to fetch
- * @return \Twilio\Rest\Preview\Marketplace\AvailableAddOnContext
*/
- protected function contextAvailableAddOns($sid)
- {
+ protected function contextAvailableAddOns(string $sid): \Twilio\Rest\Preview\Marketplace\AvailableAddOnContext {
+ echo "availableAddOns(\$sid) is deprecated. Use marketplace->availableAddOns(\$sid) instead.";
return $this->marketplace->availableAddOns($sid);
}
/**
- * @return \Twilio\Rest\Preview\Marketplace\InstalledAddOnList
+ * @deprecated Use marketplace->installedAddOns instead.
*/
- protected function getInstalledAddOns()
- {
+ protected function getInstalledAddOns(): \Twilio\Rest\Preview\Marketplace\InstalledAddOnList {
+ echo "installedAddOns is deprecated. Use marketplace->installedAddOns instead.";
return $this->marketplace->installedAddOns;
}
/**
+ * @deprecated Use marketplace->installedAddOns(\$sid) instead.
* @param string $sid The SID of the InstalledAddOn resource to fetch
- * @return \Twilio\Rest\Preview\Marketplace\InstalledAddOnContext
*/
- protected function contextInstalledAddOns($sid)
- {
+ protected function contextInstalledAddOns(string $sid): \Twilio\Rest\Preview\Marketplace\InstalledAddOnContext {
+ echo "installedAddOns(\$sid) is deprecated. Use marketplace->installedAddOns(\$sid) instead.";
return $this->marketplace->installedAddOns($sid);
}
/**
- * @return \Twilio\Rest\Preview\Sync\ServiceList
+ * @deprecated Use sync->services instead.
*/
- protected function getServices()
- {
+ protected function getServices(): \Twilio\Rest\Preview\Sync\ServiceList {
+ echo "services is deprecated. Use sync->services instead.";
return $this->sync->services;
}
/**
+ * @deprecated Use sync->services(\$sid) instead.
* @param string $sid The sid
- * @return \Twilio\Rest\Preview\Sync\ServiceContext
*/
- protected function contextServices($sid)
- {
+ protected function contextServices(string $sid): \Twilio\Rest\Preview\Sync\ServiceContext {
+ echo "services(\$sid) is deprecated. Use sync->services(\$sid) instead.";
return $this->sync->services($sid);
}
/**
- * @return \Twilio\Rest\Preview\Understand\AssistantList
+ * @deprecated Use understand->assistants instead.
*/
- protected function getAssistants()
- {
+ protected function getAssistants(): \Twilio\Rest\Preview\Understand\AssistantList {
+ echo "assistants is deprecated. Use understand->assistants instead.";
return $this->understand->assistants;
}
/**
+ * @deprecated Use understand->assistants(\$sid) instead.
* @param string $sid A 34 character string that uniquely identifies this
* resource.
- * @return \Twilio\Rest\Preview\Understand\AssistantContext
*/
- protected function contextAssistants($sid)
- {
+ protected function contextAssistants(string $sid): \Twilio\Rest\Preview\Understand\AssistantContext {
+ echo "assistants(\$sid) is deprecated. Use understand->assistants(\$sid) instead.";
return $this->understand->assistants($sid);
}
/**
- * @return \Twilio\Rest\Preview\Wireless\CommandList
+ * @deprecated Use wireless->commands instead.
*/
- protected function getCommands()
- {
+ protected function getCommands(): \Twilio\Rest\Preview\Wireless\CommandList {
+ echo "commands is deprecated. Use wireless->commands instead.";
return $this->wireless->commands;
}
/**
+ * @deprecated Use wireless->commands(\$sid) instead.
* @param string $sid The sid
- * @return \Twilio\Rest\Preview\Wireless\CommandContext
*/
- protected function contextCommands($sid)
- {
+ protected function contextCommands(string $sid): \Twilio\Rest\Preview\Wireless\CommandContext {
+ echo "commands(\$sid) is deprecated. Use wireless->commands(\$sid) instead.";
return $this->wireless->commands($sid);
}
/**
- * @return \Twilio\Rest\Preview\Wireless\RatePlanList
+ * @deprecated Use wireless->ratePlans instead.
*/
- protected function getRatePlans()
- {
+ protected function getRatePlans(): \Twilio\Rest\Preview\Wireless\RatePlanList {
+ echo "ratePlans is deprecated. Use wireless->ratePlans instead.";
return $this->wireless->ratePlans;
}
/**
+ * @deprecated Use wireless->ratePlans(\$sid) instead.
* @param string $sid The sid
- * @return \Twilio\Rest\Preview\Wireless\RatePlanContext
*/
- protected function contextRatePlans($sid)
- {
+ protected function contextRatePlans(string $sid): \Twilio\Rest\Preview\Wireless\RatePlanContext {
+ echo "ratePlans(\$sid) is deprecated. Use wireless->ratePlans(\$sid) instead.";
return $this->wireless->ratePlans($sid);
}
/**
- * @return \Twilio\Rest\Preview\Wireless\SimList
+ * @deprecated Use wireless->sims instead.
*/
- protected function getSims()
- {
+ protected function getSims(): \Twilio\Rest\Preview\Wireless\SimList {
+ echo "sims is deprecated. Use wireless->sims instead.";
return $this->wireless->sims;
}
/**
+ * @deprecated Use wireless->sims(\$sid) instead.
* @param string $sid The sid
- * @return \Twilio\Rest\Preview\Wireless\SimContext
*/
- protected function contextSims($sid)
- {
+ protected function contextSims(string $sid): \Twilio\Rest\Preview\Wireless\SimContext {
+ echo "sims(\$sid) is deprecated. Use wireless->sims(\$sid) instead.";
return $this->wireless->sims($sid);
}
-
- /**
- * @return \Twilio\Rest\Preview\TrustedComms\BrandedCallList
- */
- protected function getBrandedCalls()
- {
- return $this->trustedComms->brandedCalls;
- }
-
- /**
- * @return \Twilio\Rest\Preview\TrustedComms\BusinessList
- */
- protected function getBusinesses()
- {
- return $this->trustedComms->businesses;
- }
-
- /**
- * @param string $sid A string that uniquely identifies this Business.
- * @return \Twilio\Rest\Preview\TrustedComms\BusinessContext
- */
- protected function contextBusinesses($sid)
- {
- return $this->trustedComms->businesses($sid);
- }
-
- /**
- * @return \Twilio\Rest\Preview\TrustedComms\CpsList
- */
- protected function getCps()
- {
- return $this->trustedComms->cps;
- }
-
- /**
- * @return \Twilio\Rest\Preview\TrustedComms\CpsContext
- */
- protected function contextCps()
- {
- return $this->trustedComms->cps();
- }
-
- /**
- * @return \Twilio\Rest\Preview\TrustedComms\CurrentCallList
- */
- protected function getCurrentCalls()
- {
- return $this->trustedComms->currentCalls;
- }
-
- /**
- * @return \Twilio\Rest\Preview\TrustedComms\CurrentCallContext
- */
- protected function contextCurrentCalls()
- {
- return $this->trustedComms->currentCalls();
- }
-
- /**
- * @return \Twilio\Rest\Preview\TrustedComms\DeviceList
- */
- protected function getDevices()
- {
- return $this->trustedComms->devices;
- }
-
- /**
- * @return \Twilio\Rest\Preview\TrustedComms\PhoneCallList
- */
- protected function getPhoneCalls()
- {
- return $this->trustedComms->phoneCalls;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview]';
- }
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports.php
deleted file mode 100644
index 5e9e07a..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports.php
+++ /dev/null
@@ -1,107 +0,0 @@
-version = 'BulkExports';
- }
-
- /**
- * @return \Twilio\Rest\Preview\BulkExports\ExportList
- */
- protected function getExports()
- {
- if (!$this->_exports) {
- $this->_exports = new ExportList($this);
- }
- return $this->_exports;
- }
-
- /**
- * @return \Twilio\Rest\Preview\BulkExports\ExportConfigurationList
- */
- protected function getExportConfiguration()
- {
- if (!$this->_exportConfiguration) {
- $this->_exportConfiguration = new ExportConfigurationList($this);
- }
- return $this->_exportConfiguration;
- }
-
- /**
- * Magic getter to lazy load root resources
- *
- * @param string $name Resource to return
- * @return \Twilio\ListResource The requested resource
- * @throws TwilioException For unknown resource
- */
- public function __get($name)
- {
- $method = 'get' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return $this->$method();
- }
-
- throw new TwilioException('Unknown resource ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $property = $this->$name;
- if (\method_exists($property, 'getContext')) {
- return \call_user_func_array(array($property, 'getContext'), $arguments);
- }
-
- throw new TwilioException('Resource does not have a context');
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.BulkExports]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/Export/DayInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/Export/DayInstance.php
deleted file mode 100644
index 035e17c..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/Export/DayInstance.php
+++ /dev/null
@@ -1,80 +0,0 @@
-properties = array(
- 'redirectTo' => Values::array_get($payload, 'redirect_to'),
- 'day' => Values::array_get($payload, 'day'),
- 'size' => Values::array_get($payload, 'size'),
- 'resourceType' => Values::array_get($payload, 'resource_type'),
- );
-
- $this->solution = array('resourceType' => $resourceType,);
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.BulkExports.DayInstance]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/Export/DayList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/Export/DayList.php
deleted file mode 100644
index 1b3ba50..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/Export/DayList.php
+++ /dev/null
@@ -1,137 +0,0 @@
-solution = array('resourceType' => $resourceType,);
-
- $this->uri = '/Exports/' . \rawurlencode($resourceType) . '/Days';
- }
-
- /**
- * Streams DayInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
- *
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
- */
- public function stream($limit = null, $pageSize = null)
- {
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
- }
-
- /**
- * Reads DayInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return DayInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
- /**
- * Retrieve a single page of DayInstance records from the API.
- * Request is executed immediately
- *
- * @param mixed $pageSize Number of records to return, defaults to 50
- * @param string $pageToken PageToken provided by the API
- * @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of DayInstance
- */
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
- {
- $params = Values::of(array(
- 'PageToken' => $pageToken,
- 'Page' => $pageNumber,
- 'PageSize' => $pageSize,
- ));
-
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
-
- return new DayPage($this->version, $response, $this->solution);
- }
-
- /**
- * Retrieve a specific page of DayInstance records from the API.
- * Request is executed immediately
- *
- * @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of DayInstance
- */
- public function getPage($targetUrl)
- {
- $response = $this->version->getDomain()->getClient()->request(
- 'GET',
- $targetUrl
- );
-
- return new DayPage($this->version, $response, $this->solution);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.BulkExports.DayList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/Export/DayPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/Export/DayPage.php
deleted file mode 100644
index 676ad85..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/Export/DayPage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new DayInstance($this->version, $payload, $this->solution['resourceType']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.BulkExports.DayPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/Export/ExportCustomJobInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/Export/ExportCustomJobInstance.php
deleted file mode 100644
index 77df789..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/Export/ExportCustomJobInstance.php
+++ /dev/null
@@ -1,90 +0,0 @@
-properties = array(
- 'friendlyName' => Values::array_get($payload, 'friendly_name'),
- 'resourceType' => Values::array_get($payload, 'resource_type'),
- 'startDay' => Values::array_get($payload, 'start_day'),
- 'endDay' => Values::array_get($payload, 'end_day'),
- 'webhookUrl' => Values::array_get($payload, 'webhook_url'),
- 'webhookMethod' => Values::array_get($payload, 'webhook_method'),
- 'email' => Values::array_get($payload, 'email'),
- 'jobSid' => Values::array_get($payload, 'job_sid'),
- 'details' => Values::array_get($payload, 'details'),
- );
-
- $this->solution = array('resourceType' => $resourceType,);
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.BulkExports.ExportCustomJobInstance]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/Export/ExportCustomJobList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/Export/ExportCustomJobList.php
deleted file mode 100644
index 4d84100..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/Export/ExportCustomJobList.php
+++ /dev/null
@@ -1,175 +0,0 @@
-solution = array('resourceType' => $resourceType,);
-
- $this->uri = '/Exports/' . \rawurlencode($resourceType) . '/Jobs';
- }
-
- /**
- * Streams ExportCustomJobInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
- */
- public function stream($options = array(), $limit = null, $pageSize = null)
- {
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($options, $limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
- }
-
- /**
- * Reads ExportCustomJobInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return ExportCustomJobInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
- /**
- * Retrieve a single page of ExportCustomJobInstance records from the API.
- * Request is executed immediately
- *
- * @param array|Options $options Optional Arguments
- * @param mixed $pageSize Number of records to return, defaults to 50
- * @param string $pageToken PageToken provided by the API
- * @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of ExportCustomJobInstance
- */
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
- {
- $options = new Values($options);
- $params = Values::of(array(
- 'NextToken' => $options['nextToken'],
- 'PreviousToken' => $options['previousToken'],
- 'PageToken' => $pageToken,
- 'Page' => $pageNumber,
- 'PageSize' => $pageSize,
- ));
-
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
-
- return new ExportCustomJobPage($this->version, $response, $this->solution);
- }
-
- /**
- * Retrieve a specific page of ExportCustomJobInstance records from the API.
- * Request is executed immediately
- *
- * @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of ExportCustomJobInstance
- */
- public function getPage($targetUrl)
- {
- $response = $this->version->getDomain()->getClient()->request(
- 'GET',
- $targetUrl
- );
-
- return new ExportCustomJobPage($this->version, $response, $this->solution);
- }
-
- /**
- * Create a new ExportCustomJobInstance
- *
- * @param array|Options $options Optional Arguments
- * @return ExportCustomJobInstance Newly created ExportCustomJobInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'StartDay' => $options['startDay'],
- 'EndDay' => $options['endDay'],
- 'WebhookUrl' => $options['webhookUrl'],
- 'WebhookMethod' => $options['webhookMethod'],
- 'Email' => $options['email'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new ExportCustomJobInstance($this->version, $payload, $this->solution['resourceType']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.BulkExports.ExportCustomJobList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/Export/ExportCustomJobOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/Export/ExportCustomJobOptions.php
deleted file mode 100644
index 5e26503..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/Export/ExportCustomJobOptions.php
+++ /dev/null
@@ -1,205 +0,0 @@
-options['nextToken'] = $nextToken;
- $this->options['previousToken'] = $previousToken;
- }
-
- /**
- * The token for the next page of job results, and may be null if there are no more pages
- *
- * @param string $nextToken The token for the next page of job results
- * @return $this Fluent Builder
- */
- public function setNextToken($nextToken)
- {
- $this->options['nextToken'] = $nextToken;
- return $this;
- }
-
- /**
- * The token for the previous page of results, and may be null if this is the first page
- *
- * @param string $previousToken The token for the previous page of result
- * @return $this Fluent Builder
- */
- public function setPreviousToken($previousToken)
- {
- $this->options['previousToken'] = $previousToken;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.BulkExports.ReadExportCustomJobOptions ' . \implode(' ', $options) . ']';
- }
-}
-
-class CreateExportCustomJobOptions extends Options
-{
- /**
- * @param string $friendlyName The friendly_name
- * @param string $startDay The start_day
- * @param string $endDay The end_day
- * @param string $webhookUrl The webhook_url
- * @param string $webhookMethod The webhook_method
- * @param string $email The email
- */
- public function __construct($friendlyName = Values::NONE, $startDay = Values::NONE, $endDay = Values::NONE, $webhookUrl = Values::NONE, $webhookMethod = Values::NONE, $email = Values::NONE)
- {
- $this->options['friendlyName'] = $friendlyName;
- $this->options['startDay'] = $startDay;
- $this->options['endDay'] = $endDay;
- $this->options['webhookUrl'] = $webhookUrl;
- $this->options['webhookMethod'] = $webhookMethod;
- $this->options['email'] = $email;
- }
-
- /**
- * The friendly_name
- *
- * @param string $friendlyName The friendly_name
- * @return $this Fluent Builder
- */
- public function setFriendlyName($friendlyName)
- {
- $this->options['friendlyName'] = $friendlyName;
- return $this;
- }
-
- /**
- * The start_day
- *
- * @param string $startDay The start_day
- * @return $this Fluent Builder
- */
- public function setStartDay($startDay)
- {
- $this->options['startDay'] = $startDay;
- return $this;
- }
-
- /**
- * The end_day
- *
- * @param string $endDay The end_day
- * @return $this Fluent Builder
- */
- public function setEndDay($endDay)
- {
- $this->options['endDay'] = $endDay;
- return $this;
- }
-
- /**
- * The webhook_url
- *
- * @param string $webhookUrl The webhook_url
- * @return $this Fluent Builder
- */
- public function setWebhookUrl($webhookUrl)
- {
- $this->options['webhookUrl'] = $webhookUrl;
- return $this;
- }
-
- /**
- * The webhook_method
- *
- * @param string $webhookMethod The webhook_method
- * @return $this Fluent Builder
- */
- public function setWebhookMethod($webhookMethod)
- {
- $this->options['webhookMethod'] = $webhookMethod;
- return $this;
- }
-
- /**
- * The email
- *
- * @param string $email The email
- * @return $this Fluent Builder
- */
- public function setEmail($email)
- {
- $this->options['email'] = $email;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.BulkExports.CreateExportCustomJobOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/Export/ExportCustomJobPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/Export/ExportCustomJobPage.php
deleted file mode 100644
index 5bdad99..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/Export/ExportCustomJobPage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new ExportCustomJobInstance($this->version, $payload, $this->solution['resourceType']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.BulkExports.ExportCustomJobPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/Export/JobContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/Export/JobContext.php
deleted file mode 100644
index 77ac254..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/Export/JobContext.php
+++ /dev/null
@@ -1,82 +0,0 @@
-solution = array('jobSid' => $jobSid,);
-
- $this->uri = '/Exports/Jobs/' . \rawurlencode($jobSid) . '';
- }
-
- /**
- * Fetch a JobInstance
- *
- * @return JobInstance Fetched JobInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new JobInstance($this->version, $payload, $this->solution['jobSid']);
- }
-
- /**
- * Deletes the JobInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.BulkExports.JobContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/Export/JobInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/Export/JobInstance.php
deleted file mode 100644
index a2a2bb9..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/Export/JobInstance.php
+++ /dev/null
@@ -1,134 +0,0 @@
-properties = array(
- 'resourceType' => Values::array_get($payload, 'resource_type'),
- 'friendlyName' => Values::array_get($payload, 'friendly_name'),
- 'details' => Values::array_get($payload, 'details'),
- 'startDay' => Values::array_get($payload, 'start_day'),
- 'endDay' => Values::array_get($payload, 'end_day'),
- 'jobSid' => Values::array_get($payload, 'job_sid'),
- 'webhookUrl' => Values::array_get($payload, 'webhook_url'),
- 'webhookMethod' => Values::array_get($payload, 'webhook_method'),
- 'email' => Values::array_get($payload, 'email'),
- 'url' => Values::array_get($payload, 'url'),
- );
-
- $this->solution = array('jobSid' => $jobSid ?: $this->properties['jobSid'],);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Preview\BulkExports\Export\JobContext Context for this
- * JobInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new JobContext($this->version, $this->solution['jobSid']);
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a JobInstance
- *
- * @return JobInstance Fetched JobInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Deletes the JobInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->proxy()->delete();
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.BulkExports.JobInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/Export/JobList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/Export/JobList.php
deleted file mode 100644
index 51b27ab..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/Export/JobList.php
+++ /dev/null
@@ -1,54 +0,0 @@
-solution = array();
- }
-
- /**
- * Constructs a JobContext
- *
- * @param string $jobSid The job_sid
- * @return \Twilio\Rest\Preview\BulkExports\Export\JobContext
- */
- public function getContext($jobSid)
- {
- return new JobContext($this->version, $jobSid);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.BulkExports.JobList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/Export/JobPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/Export/JobPage.php
deleted file mode 100644
index 059c2cf..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/Export/JobPage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new JobInstance($this->version, $payload);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.BulkExports.JobPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/ExportConfigurationContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/ExportConfigurationContext.php
deleted file mode 100644
index 25a32e0..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/ExportConfigurationContext.php
+++ /dev/null
@@ -1,100 +0,0 @@
-solution = array('resourceType' => $resourceType,);
-
- $this->uri = '/Exports/' . \rawurlencode($resourceType) . '/Configuration';
- }
-
- /**
- * Fetch a ExportConfigurationInstance
- *
- * @return ExportConfigurationInstance Fetched ExportConfigurationInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new ExportConfigurationInstance($this->version, $payload, $this->solution['resourceType']);
- }
-
- /**
- * Update the ExportConfigurationInstance
- *
- * @param array|Options $options Optional Arguments
- * @return ExportConfigurationInstance Updated ExportConfigurationInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'Enabled' => Serialize::booleanToString($options['enabled']),
- 'WebhookUrl' => $options['webhookUrl'],
- 'WebhookMethod' => $options['webhookMethod'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new ExportConfigurationInstance($this->version, $payload, $this->solution['resourceType']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.BulkExports.ExportConfigurationContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/ExportConfigurationInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/ExportConfigurationInstance.php
deleted file mode 100644
index 96d440c..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/ExportConfigurationInstance.php
+++ /dev/null
@@ -1,127 +0,0 @@
-properties = array(
- 'enabled' => Values::array_get($payload, 'enabled'),
- 'webhookUrl' => Values::array_get($payload, 'webhook_url'),
- 'webhookMethod' => Values::array_get($payload, 'webhook_method'),
- 'resourceType' => Values::array_get($payload, 'resource_type'),
- 'url' => Values::array_get($payload, 'url'),
- );
-
- $this->solution = array('resourceType' => $resourceType ?: $this->properties['resourceType'],);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Preview\BulkExports\ExportConfigurationContext Context
- * for this
- * ExportConfigurationInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new ExportConfigurationContext($this->version, $this->solution['resourceType']);
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a ExportConfigurationInstance
- *
- * @return ExportConfigurationInstance Fetched ExportConfigurationInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Update the ExportConfigurationInstance
- *
- * @param array|Options $options Optional Arguments
- * @return ExportConfigurationInstance Updated ExportConfigurationInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- return $this->proxy()->update($options);
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.BulkExports.ExportConfigurationInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/ExportConfigurationList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/ExportConfigurationList.php
deleted file mode 100644
index e1800d6..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/ExportConfigurationList.php
+++ /dev/null
@@ -1,54 +0,0 @@
-solution = array();
- }
-
- /**
- * Constructs a ExportConfigurationContext
- *
- * @param string $resourceType The type of communication – Messages, Calls
- * @return \Twilio\Rest\Preview\BulkExports\ExportConfigurationContext
- */
- public function getContext($resourceType)
- {
- return new ExportConfigurationContext($this->version, $resourceType);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.BulkExports.ExportConfigurationList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/ExportConfigurationOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/ExportConfigurationOptions.php
deleted file mode 100644
index 47676ca..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/ExportConfigurationOptions.php
+++ /dev/null
@@ -1,97 +0,0 @@
-options['enabled'] = $enabled;
- $this->options['webhookUrl'] = $webhookUrl;
- $this->options['webhookMethod'] = $webhookMethod;
- }
-
- /**
- * If true, Twilio will automatically generate every day's file when the day is over.
- *
- * @param bool $enabled Whether files are automatically generated
- * @return $this Fluent Builder
- */
- public function setEnabled($enabled)
- {
- $this->options['enabled'] = $enabled;
- return $this;
- }
-
- /**
- * Stores the URL destination for the method specified in webhook_method.
- *
- * @param string $webhookUrl URL targeted at export
- * @return $this Fluent Builder
- */
- public function setWebhookUrl($webhookUrl)
- {
- $this->options['webhookUrl'] = $webhookUrl;
- return $this;
- }
-
- /**
- * Sets whether Twilio should call a webhook URL when the automatic generation is complete, using GET or POST. The actual destination is set in the webhook_url
- *
- * @param string $webhookMethod Whether to GET or POST to the webhook url
- * @return $this Fluent Builder
- */
- public function setWebhookMethod($webhookMethod)
- {
- $this->options['webhookMethod'] = $webhookMethod;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.BulkExports.UpdateExportConfigurationOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/ExportConfigurationPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/ExportConfigurationPage.php
deleted file mode 100644
index dced402..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/ExportConfigurationPage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new ExportConfigurationInstance($this->version, $payload);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.BulkExports.ExportConfigurationPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/ExportContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/ExportContext.php
deleted file mode 100644
index f26f40f..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/ExportContext.php
+++ /dev/null
@@ -1,142 +0,0 @@
-solution = array('resourceType' => $resourceType,);
-
- $this->uri = '/Exports/' . \rawurlencode($resourceType) . '';
- }
-
- /**
- * Fetch a ExportInstance
- *
- * @return ExportInstance Fetched ExportInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new ExportInstance($this->version, $payload, $this->solution['resourceType']);
- }
-
- /**
- * Access the days
- *
- * @return \Twilio\Rest\Preview\BulkExports\Export\DayList
- */
- protected function getDays()
- {
- if (!$this->_days) {
- $this->_days = new DayList($this->version, $this->solution['resourceType']);
- }
-
- return $this->_days;
- }
-
- /**
- * Access the exportCustomJobs
- *
- * @return \Twilio\Rest\Preview\BulkExports\Export\ExportCustomJobList
- */
- protected function getExportCustomJobs()
- {
- if (!$this->_exportCustomJobs) {
- $this->_exportCustomJobs = new ExportCustomJobList($this->version, $this->solution['resourceType']);
- }
-
- return $this->_exportCustomJobs;
- }
-
- /**
- * Magic getter to lazy load subresources
- *
- * @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
- * @throws TwilioException For unknown subresources
- */
- public function __get($name)
- {
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown subresource ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $property = $this->$name;
- if (\method_exists($property, 'getContext')) {
- return \call_user_func_array(array($property, 'getContext'), $arguments);
- }
-
- throw new TwilioException('Resource does not have a context');
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.BulkExports.ExportContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/ExportInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/ExportInstance.php
deleted file mode 100644
index 9721691..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/ExportInstance.php
+++ /dev/null
@@ -1,132 +0,0 @@
-properties = array(
- 'resourceType' => Values::array_get($payload, 'resource_type'),
- 'url' => Values::array_get($payload, 'url'),
- 'links' => Values::array_get($payload, 'links'),
- );
-
- $this->solution = array('resourceType' => $resourceType ?: $this->properties['resourceType'],);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Preview\BulkExports\ExportContext Context for this
- * ExportInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new ExportContext($this->version, $this->solution['resourceType']);
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a ExportInstance
- *
- * @return ExportInstance Fetched ExportInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Access the days
- *
- * @return \Twilio\Rest\Preview\BulkExports\Export\DayList
- */
- protected function getDays()
- {
- return $this->proxy()->days;
- }
-
- /**
- * Access the exportCustomJobs
- *
- * @return \Twilio\Rest\Preview\BulkExports\Export\ExportCustomJobList
- */
- protected function getExportCustomJobs()
- {
- return $this->proxy()->exportCustomJobs;
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.BulkExports.ExportInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/ExportList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/ExportList.php
deleted file mode 100644
index 047479f..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/ExportList.php
+++ /dev/null
@@ -1,108 +0,0 @@
-solution = array();
- }
-
- /**
- * Access the jobs
- */
- protected function getJobs()
- {
- if (!$this->_jobs) {
- $this->_jobs = new JobList($this->version);
- }
-
- return $this->_jobs;
- }
-
- /**
- * Constructs a ExportContext
- *
- * @param string $resourceType The type of communication – Messages, Calls
- * @return \Twilio\Rest\Preview\BulkExports\ExportContext
- */
- public function getContext($resourceType)
- {
- return new ExportContext($this->version, $resourceType);
- }
-
- /**
- * Magic getter to lazy load subresources
- *
- * @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
- * @throws TwilioException For unknown subresources
- */
- public function __get($name)
- {
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown subresource ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $property = $this->$name;
- if (\method_exists($property, 'getContext')) {
- return \call_user_func_array(array($property, 'getContext'), $arguments);
- }
-
- throw new TwilioException('Resource does not have a context');
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.BulkExports.ExportList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/ExportPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/ExportPage.php
deleted file mode 100644
index ae4a565..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/BulkExports/ExportPage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new ExportInstance($this->version, $payload);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.BulkExports.ExportPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices.php
deleted file mode 100644
index bd320ab..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices.php
+++ /dev/null
@@ -1,93 +0,0 @@
-version = 'DeployedDevices';
- }
-
- /**
- * @return \Twilio\Rest\Preview\DeployedDevices\FleetList
- */
- protected function getFleets()
- {
- if (!$this->_fleets) {
- $this->_fleets = new FleetList($this);
- }
- return $this->_fleets;
- }
-
- /**
- * Magic getter to lazy load root resources
- *
- * @param string $name Resource to return
- * @return \Twilio\ListResource The requested resource
- * @throws TwilioException For unknown resource
- */
- public function __get($name)
- {
- $method = 'get' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return $this->$method();
- }
-
- throw new TwilioException('Unknown resource ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $property = $this->$name;
- if (\method_exists($property, 'getContext')) {
- return \call_user_func_array(array($property, 'getContext'), $arguments);
- }
-
- throw new TwilioException('Resource does not have a context');
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.DeployedDevices]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/CertificateContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/CertificateContext.php
deleted file mode 100644
index b7bec33..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/CertificateContext.php
+++ /dev/null
@@ -1,120 +0,0 @@
-solution = array('fleetSid' => $fleetSid, 'sid' => $sid,);
-
- $this->uri = '/Fleets/' . \rawurlencode($fleetSid) . '/Certificates/' . \rawurlencode($sid) . '';
- }
-
- /**
- * Fetch a CertificateInstance
- *
- * @return CertificateInstance Fetched CertificateInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new CertificateInstance(
- $this->version,
- $payload,
- $this->solution['fleetSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Deletes the CertificateInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
-
- /**
- * Update the CertificateInstance
- *
- * @param array|Options $options Optional Arguments
- * @return CertificateInstance Updated CertificateInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'DeviceSid' => $options['deviceSid'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new CertificateInstance(
- $this->version,
- $payload,
- $this->solution['fleetSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.DeployedDevices.CertificateContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/CertificateInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/CertificateInstance.php
deleted file mode 100644
index 214b929..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/CertificateInstance.php
+++ /dev/null
@@ -1,150 +0,0 @@
-properties = array(
- 'sid' => Values::array_get($payload, 'sid'),
- 'url' => Values::array_get($payload, 'url'),
- 'friendlyName' => Values::array_get($payload, 'friendly_name'),
- 'fleetSid' => Values::array_get($payload, 'fleet_sid'),
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'deviceSid' => Values::array_get($payload, 'device_sid'),
- 'thumbprint' => Values::array_get($payload, 'thumbprint'),
- 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- );
-
- $this->solution = array('fleetSid' => $fleetSid, 'sid' => $sid ?: $this->properties['sid'],);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Preview\DeployedDevices\Fleet\CertificateContext Context for this CertificateInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new CertificateContext(
- $this->version,
- $this->solution['fleetSid'],
- $this->solution['sid']
- );
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a CertificateInstance
- *
- * @return CertificateInstance Fetched CertificateInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Deletes the CertificateInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->proxy()->delete();
- }
-
- /**
- * Update the CertificateInstance
- *
- * @param array|Options $options Optional Arguments
- * @return CertificateInstance Updated CertificateInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- return $this->proxy()->update($options);
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.DeployedDevices.CertificateInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/CertificateList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/CertificateList.php
deleted file mode 100644
index 6920ee0..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/CertificateList.php
+++ /dev/null
@@ -1,183 +0,0 @@
-solution = array('fleetSid' => $fleetSid,);
-
- $this->uri = '/Fleets/' . \rawurlencode($fleetSid) . '/Certificates';
- }
-
- /**
- * Create a new CertificateInstance
- *
- * @param string $certificateData The public certificate data.
- * @param array|Options $options Optional Arguments
- * @return CertificateInstance Newly created CertificateInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($certificateData, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'CertificateData' => $certificateData,
- 'FriendlyName' => $options['friendlyName'],
- 'DeviceSid' => $options['deviceSid'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new CertificateInstance($this->version, $payload, $this->solution['fleetSid']);
- }
-
- /**
- * Streams CertificateInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
- */
- public function stream($options = array(), $limit = null, $pageSize = null)
- {
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($options, $limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
- }
-
- /**
- * Reads CertificateInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return CertificateInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
- /**
- * Retrieve a single page of CertificateInstance records from the API.
- * Request is executed immediately
- *
- * @param array|Options $options Optional Arguments
- * @param mixed $pageSize Number of records to return, defaults to 50
- * @param string $pageToken PageToken provided by the API
- * @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of CertificateInstance
- */
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
- {
- $options = new Values($options);
- $params = Values::of(array(
- 'DeviceSid' => $options['deviceSid'],
- 'PageToken' => $pageToken,
- 'Page' => $pageNumber,
- 'PageSize' => $pageSize,
- ));
-
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
-
- return new CertificatePage($this->version, $response, $this->solution);
- }
-
- /**
- * Retrieve a specific page of CertificateInstance records from the API.
- * Request is executed immediately
- *
- * @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of CertificateInstance
- */
- public function getPage($targetUrl)
- {
- $response = $this->version->getDomain()->getClient()->request(
- 'GET',
- $targetUrl
- );
-
- return new CertificatePage($this->version, $response, $this->solution);
- }
-
- /**
- * Constructs a CertificateContext
- *
- * @param string $sid A string that uniquely identifies the Certificate.
- * @return \Twilio\Rest\Preview\DeployedDevices\Fleet\CertificateContext
- */
- public function getContext($sid)
- {
- return new CertificateContext($this->version, $this->solution['fleetSid'], $sid);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.DeployedDevices.CertificateList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/CertificateOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/CertificateOptions.php
deleted file mode 100644
index 11a8410..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/CertificateOptions.php
+++ /dev/null
@@ -1,208 +0,0 @@
-options['friendlyName'] = $friendlyName;
- $this->options['deviceSid'] = $deviceSid;
- }
-
- /**
- * Provides a human readable descriptive text for this Certificate credential, up to 256 characters long.
- *
- * @param string $friendlyName The human readable description for this
- * Certificate.
- * @return $this Fluent Builder
- */
- public function setFriendlyName($friendlyName)
- {
- $this->options['friendlyName'] = $friendlyName;
- return $this;
- }
-
- /**
- * Provides the unique string identifier of an existing Device to become authenticated with this Certificate credential.
- *
- * @param string $deviceSid The unique identifier of a Device to be
- * authenticated.
- * @return $this Fluent Builder
- */
- public function setDeviceSid($deviceSid)
- {
- $this->options['deviceSid'] = $deviceSid;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.DeployedDevices.CreateCertificateOptions ' . \implode(' ', $options) . ']';
- }
-}
-
-class ReadCertificateOptions extends Options
-{
- /**
- * @param string $deviceSid Find all Certificates authenticating specified
- * Device.
- */
- public function __construct($deviceSid = Values::NONE)
- {
- $this->options['deviceSid'] = $deviceSid;
- }
-
- /**
- * Filters the resulting list of Certificates by a unique string identifier of an authenticated Device.
- *
- * @param string $deviceSid Find all Certificates authenticating specified
- * Device.
- * @return $this Fluent Builder
- */
- public function setDeviceSid($deviceSid)
- {
- $this->options['deviceSid'] = $deviceSid;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.DeployedDevices.ReadCertificateOptions ' . \implode(' ', $options) . ']';
- }
-}
-
-class UpdateCertificateOptions extends Options
-{
- /**
- * @param string $friendlyName The human readable description for this
- * Certificate.
- * @param string $deviceSid The unique identifier of a Device to be
- * authenticated.
- */
- public function __construct($friendlyName = Values::NONE, $deviceSid = Values::NONE)
- {
- $this->options['friendlyName'] = $friendlyName;
- $this->options['deviceSid'] = $deviceSid;
- }
-
- /**
- * Provides a human readable descriptive text for this Certificate credential, up to 256 characters long.
- *
- * @param string $friendlyName The human readable description for this
- * Certificate.
- * @return $this Fluent Builder
- */
- public function setFriendlyName($friendlyName)
- {
- $this->options['friendlyName'] = $friendlyName;
- return $this;
- }
-
- /**
- * Provides the unique string identifier of an existing Device to become authenticated with this Certificate credential.
- *
- * @param string $deviceSid The unique identifier of a Device to be
- * authenticated.
- * @return $this Fluent Builder
- */
- public function setDeviceSid($deviceSid)
- {
- $this->options['deviceSid'] = $deviceSid;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.DeployedDevices.UpdateCertificateOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/CertificatePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/CertificatePage.php
deleted file mode 100644
index fd2edce..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/CertificatePage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new CertificateInstance($this->version, $payload, $this->solution['fleetSid']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.DeployedDevices.CertificatePage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeploymentContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeploymentContext.php
deleted file mode 100644
index 79b2994..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeploymentContext.php
+++ /dev/null
@@ -1,120 +0,0 @@
-solution = array('fleetSid' => $fleetSid, 'sid' => $sid,);
-
- $this->uri = '/Fleets/' . \rawurlencode($fleetSid) . '/Deployments/' . \rawurlencode($sid) . '';
- }
-
- /**
- * Fetch a DeploymentInstance
- *
- * @return DeploymentInstance Fetched DeploymentInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new DeploymentInstance(
- $this->version,
- $payload,
- $this->solution['fleetSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Deletes the DeploymentInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
-
- /**
- * Update the DeploymentInstance
- *
- * @param array|Options $options Optional Arguments
- * @return DeploymentInstance Updated DeploymentInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'SyncServiceSid' => $options['syncServiceSid'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new DeploymentInstance(
- $this->version,
- $payload,
- $this->solution['fleetSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.DeployedDevices.DeploymentContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeploymentInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeploymentInstance.php
deleted file mode 100644
index c15bafe..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeploymentInstance.php
+++ /dev/null
@@ -1,151 +0,0 @@
-properties = array(
- 'sid' => Values::array_get($payload, 'sid'),
- 'url' => Values::array_get($payload, 'url'),
- 'friendlyName' => Values::array_get($payload, 'friendly_name'),
- 'fleetSid' => Values::array_get($payload, 'fleet_sid'),
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'syncServiceSid' => Values::array_get($payload, 'sync_service_sid'),
- 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- );
-
- $this->solution = array('fleetSid' => $fleetSid, 'sid' => $sid ?: $this->properties['sid'],);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Preview\DeployedDevices\Fleet\DeploymentContext Context
- * for
- * this
- * DeploymentInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new DeploymentContext(
- $this->version,
- $this->solution['fleetSid'],
- $this->solution['sid']
- );
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a DeploymentInstance
- *
- * @return DeploymentInstance Fetched DeploymentInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Deletes the DeploymentInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->proxy()->delete();
- }
-
- /**
- * Update the DeploymentInstance
- *
- * @param array|Options $options Optional Arguments
- * @return DeploymentInstance Updated DeploymentInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- return $this->proxy()->update($options);
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.DeployedDevices.DeploymentInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeploymentList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeploymentList.php
deleted file mode 100644
index 1c09f5c..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeploymentList.php
+++ /dev/null
@@ -1,176 +0,0 @@
-solution = array('fleetSid' => $fleetSid,);
-
- $this->uri = '/Fleets/' . \rawurlencode($fleetSid) . '/Deployments';
- }
-
- /**
- * Create a new DeploymentInstance
- *
- * @param array|Options $options Optional Arguments
- * @return DeploymentInstance Newly created DeploymentInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'SyncServiceSid' => $options['syncServiceSid'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new DeploymentInstance($this->version, $payload, $this->solution['fleetSid']);
- }
-
- /**
- * Streams DeploymentInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
- *
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
- */
- public function stream($limit = null, $pageSize = null)
- {
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
- }
-
- /**
- * Reads DeploymentInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return DeploymentInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
- /**
- * Retrieve a single page of DeploymentInstance records from the API.
- * Request is executed immediately
- *
- * @param mixed $pageSize Number of records to return, defaults to 50
- * @param string $pageToken PageToken provided by the API
- * @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of DeploymentInstance
- */
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
- {
- $params = Values::of(array(
- 'PageToken' => $pageToken,
- 'Page' => $pageNumber,
- 'PageSize' => $pageSize,
- ));
-
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
-
- return new DeploymentPage($this->version, $response, $this->solution);
- }
-
- /**
- * Retrieve a specific page of DeploymentInstance records from the API.
- * Request is executed immediately
- *
- * @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of DeploymentInstance
- */
- public function getPage($targetUrl)
- {
- $response = $this->version->getDomain()->getClient()->request(
- 'GET',
- $targetUrl
- );
-
- return new DeploymentPage($this->version, $response, $this->solution);
- }
-
- /**
- * Constructs a DeploymentContext
- *
- * @param string $sid A string that uniquely identifies the Deployment.
- * @return \Twilio\Rest\Preview\DeployedDevices\Fleet\DeploymentContext
- */
- public function getContext($sid)
- {
- return new DeploymentContext($this->version, $this->solution['fleetSid'], $sid);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.DeployedDevices.DeploymentList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeploymentOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeploymentOptions.php
deleted file mode 100644
index 0d27af0..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeploymentOptions.php
+++ /dev/null
@@ -1,151 +0,0 @@
-options['friendlyName'] = $friendlyName;
- $this->options['syncServiceSid'] = $syncServiceSid;
- }
-
- /**
- * Provides a human readable descriptive text for this Deployment, up to 256 characters long.
- *
- * @param string $friendlyName A human readable description for this Deployment.
- * @return $this Fluent Builder
- */
- public function setFriendlyName($friendlyName)
- {
- $this->options['friendlyName'] = $friendlyName;
- return $this;
- }
-
- /**
- * Provides the unique string identifier of the Twilio Sync service instance that will be linked to and accessible by this Deployment.
- *
- * @param string $syncServiceSid The unique identifier of the Sync service
- * instance.
- * @return $this Fluent Builder
- */
- public function setSyncServiceSid($syncServiceSid)
- {
- $this->options['syncServiceSid'] = $syncServiceSid;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.DeployedDevices.CreateDeploymentOptions ' . \implode(' ', $options) . ']';
- }
-}
-
-class UpdateDeploymentOptions extends Options
-{
- /**
- * @param string $friendlyName A human readable description for this Deployment.
- * @param string $syncServiceSid The unique identifier of the Sync service
- * instance.
- */
- public function __construct($friendlyName = Values::NONE, $syncServiceSid = Values::NONE)
- {
- $this->options['friendlyName'] = $friendlyName;
- $this->options['syncServiceSid'] = $syncServiceSid;
- }
-
- /**
- * Provides a human readable descriptive text for this Deployment, up to 64 characters long
- *
- * @param string $friendlyName A human readable description for this Deployment.
- * @return $this Fluent Builder
- */
- public function setFriendlyName($friendlyName)
- {
- $this->options['friendlyName'] = $friendlyName;
- return $this;
- }
-
- /**
- * Provides the unique string identifier of the Twilio Sync service instance that will be linked to and accessible by this Deployment.
- *
- * @param string $syncServiceSid The unique identifier of the Sync service
- * instance.
- * @return $this Fluent Builder
- */
- public function setSyncServiceSid($syncServiceSid)
- {
- $this->options['syncServiceSid'] = $syncServiceSid;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.DeployedDevices.UpdateDeploymentOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeploymentPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeploymentPage.php
deleted file mode 100644
index 358223f..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeploymentPage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new DeploymentInstance($this->version, $payload, $this->solution['fleetSid']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.DeployedDevices.DeploymentPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeviceContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeviceContext.php
deleted file mode 100644
index f5c2535..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeviceContext.php
+++ /dev/null
@@ -1,123 +0,0 @@
-solution = array('fleetSid' => $fleetSid, 'sid' => $sid,);
-
- $this->uri = '/Fleets/' . \rawurlencode($fleetSid) . '/Devices/' . \rawurlencode($sid) . '';
- }
-
- /**
- * Fetch a DeviceInstance
- *
- * @return DeviceInstance Fetched DeviceInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new DeviceInstance(
- $this->version,
- $payload,
- $this->solution['fleetSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Deletes the DeviceInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
-
- /**
- * Update the DeviceInstance
- *
- * @param array|Options $options Optional Arguments
- * @return DeviceInstance Updated DeviceInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'Identity' => $options['identity'],
- 'DeploymentSid' => $options['deploymentSid'],
- 'Enabled' => Serialize::booleanToString($options['enabled']),
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new DeviceInstance(
- $this->version,
- $payload,
- $this->solution['fleetSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.DeployedDevices.DeviceContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeviceInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeviceInstance.php
deleted file mode 100644
index e758789..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeviceInstance.php
+++ /dev/null
@@ -1,158 +0,0 @@
-properties = array(
- 'sid' => Values::array_get($payload, 'sid'),
- 'url' => Values::array_get($payload, 'url'),
- 'uniqueName' => Values::array_get($payload, 'unique_name'),
- 'friendlyName' => Values::array_get($payload, 'friendly_name'),
- 'fleetSid' => Values::array_get($payload, 'fleet_sid'),
- 'enabled' => Values::array_get($payload, 'enabled'),
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'identity' => Values::array_get($payload, 'identity'),
- 'deploymentSid' => Values::array_get($payload, 'deployment_sid'),
- 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- 'dateAuthenticated' => Deserialize::dateTime(Values::array_get($payload, 'date_authenticated')),
- );
-
- $this->solution = array('fleetSid' => $fleetSid, 'sid' => $sid ?: $this->properties['sid'],);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Preview\DeployedDevices\Fleet\DeviceContext Context for
- * this
- * DeviceInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new DeviceContext(
- $this->version,
- $this->solution['fleetSid'],
- $this->solution['sid']
- );
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a DeviceInstance
- *
- * @return DeviceInstance Fetched DeviceInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Deletes the DeviceInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->proxy()->delete();
- }
-
- /**
- * Update the DeviceInstance
- *
- * @param array|Options $options Optional Arguments
- * @return DeviceInstance Updated DeviceInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- return $this->proxy()->update($options);
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.DeployedDevices.DeviceInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeviceList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeviceList.php
deleted file mode 100644
index 88663ad..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeviceList.php
+++ /dev/null
@@ -1,185 +0,0 @@
-solution = array('fleetSid' => $fleetSid,);
-
- $this->uri = '/Fleets/' . \rawurlencode($fleetSid) . '/Devices';
- }
-
- /**
- * Create a new DeviceInstance
- *
- * @param array|Options $options Optional Arguments
- * @return DeviceInstance Newly created DeviceInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'UniqueName' => $options['uniqueName'],
- 'FriendlyName' => $options['friendlyName'],
- 'Identity' => $options['identity'],
- 'DeploymentSid' => $options['deploymentSid'],
- 'Enabled' => Serialize::booleanToString($options['enabled']),
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new DeviceInstance($this->version, $payload, $this->solution['fleetSid']);
- }
-
- /**
- * Streams DeviceInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
- */
- public function stream($options = array(), $limit = null, $pageSize = null)
- {
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($options, $limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
- }
-
- /**
- * Reads DeviceInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return DeviceInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
- /**
- * Retrieve a single page of DeviceInstance records from the API.
- * Request is executed immediately
- *
- * @param array|Options $options Optional Arguments
- * @param mixed $pageSize Number of records to return, defaults to 50
- * @param string $pageToken PageToken provided by the API
- * @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of DeviceInstance
- */
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
- {
- $options = new Values($options);
- $params = Values::of(array(
- 'DeploymentSid' => $options['deploymentSid'],
- 'PageToken' => $pageToken,
- 'Page' => $pageNumber,
- 'PageSize' => $pageSize,
- ));
-
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
-
- return new DevicePage($this->version, $response, $this->solution);
- }
-
- /**
- * Retrieve a specific page of DeviceInstance records from the API.
- * Request is executed immediately
- *
- * @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of DeviceInstance
- */
- public function getPage($targetUrl)
- {
- $response = $this->version->getDomain()->getClient()->request(
- 'GET',
- $targetUrl
- );
-
- return new DevicePage($this->version, $response, $this->solution);
- }
-
- /**
- * Constructs a DeviceContext
- *
- * @param string $sid A string that uniquely identifies the Device.
- * @return \Twilio\Rest\Preview\DeployedDevices\Fleet\DeviceContext
- */
- public function getContext($sid)
- {
- return new DeviceContext($this->version, $this->solution['fleetSid'], $sid);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.DeployedDevices.DeviceList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeviceOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeviceOptions.php
deleted file mode 100644
index 07dac9b..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DeviceOptions.php
+++ /dev/null
@@ -1,271 +0,0 @@
-options['uniqueName'] = $uniqueName;
- $this->options['friendlyName'] = $friendlyName;
- $this->options['identity'] = $identity;
- $this->options['deploymentSid'] = $deploymentSid;
- $this->options['enabled'] = $enabled;
- }
-
- /**
- * Provides a unique and addressable name to be assigned to this Device, to be used in addition to SID, up to 128 characters long.
- *
- * @param string $uniqueName A unique, addressable name of this Device.
- * @return $this Fluent Builder
- */
- public function setUniqueName($uniqueName)
- {
- $this->options['uniqueName'] = $uniqueName;
- return $this;
- }
-
- /**
- * Provides a human readable descriptive text to be assigned to this Device, up to 256 characters long.
- *
- * @param string $friendlyName A human readable description for this Device.
- * @return $this Fluent Builder
- */
- public function setFriendlyName($friendlyName)
- {
- $this->options['friendlyName'] = $friendlyName;
- return $this;
- }
-
- /**
- * Provides an arbitrary string identifier representing a human user to be associated with this Device, up to 256 characters long.
- *
- * @param string $identity An identifier of the Device user.
- * @return $this Fluent Builder
- */
- public function setIdentity($identity)
- {
- $this->options['identity'] = $identity;
- return $this;
- }
-
- /**
- * Specifies the unique string identifier of the Deployment group that this Device is going to be associated with.
- *
- * @param string $deploymentSid The unique SID of the Deployment group.
- * @return $this Fluent Builder
- */
- public function setDeploymentSid($deploymentSid)
- {
- $this->options['deploymentSid'] = $deploymentSid;
- return $this;
- }
-
- /**
- * The enabled
- *
- * @param bool $enabled The enabled
- * @return $this Fluent Builder
- */
- public function setEnabled($enabled)
- {
- $this->options['enabled'] = $enabled;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.DeployedDevices.CreateDeviceOptions ' . \implode(' ', $options) . ']';
- }
-}
-
-class ReadDeviceOptions extends Options
-{
- /**
- * @param string $deploymentSid Find all Devices grouped under the specified
- * Deployment.
- */
- public function __construct($deploymentSid = Values::NONE)
- {
- $this->options['deploymentSid'] = $deploymentSid;
- }
-
- /**
- * Filters the resulting list of Devices by a unique string identifier of the Deployment they are associated with.
- *
- * @param string $deploymentSid Find all Devices grouped under the specified
- * Deployment.
- * @return $this Fluent Builder
- */
- public function setDeploymentSid($deploymentSid)
- {
- $this->options['deploymentSid'] = $deploymentSid;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.DeployedDevices.ReadDeviceOptions ' . \implode(' ', $options) . ']';
- }
-}
-
-class UpdateDeviceOptions extends Options
-{
- /**
- * @param string $friendlyName A human readable description for this Device.
- * @param string $identity An identifier of the Device user.
- * @param string $deploymentSid The unique SID of the Deployment group.
- * @param bool $enabled The enabled
- */
- public function __construct($friendlyName = Values::NONE, $identity = Values::NONE, $deploymentSid = Values::NONE, $enabled = Values::NONE)
- {
- $this->options['friendlyName'] = $friendlyName;
- $this->options['identity'] = $identity;
- $this->options['deploymentSid'] = $deploymentSid;
- $this->options['enabled'] = $enabled;
- }
-
- /**
- * Provides a human readable descriptive text to be assigned to this Device, up to 256 characters long.
- *
- * @param string $friendlyName A human readable description for this Device.
- * @return $this Fluent Builder
- */
- public function setFriendlyName($friendlyName)
- {
- $this->options['friendlyName'] = $friendlyName;
- return $this;
- }
-
- /**
- * Provides an arbitrary string identifier representing a human user to be associated with this Device, up to 256 characters long.
- *
- * @param string $identity An identifier of the Device user.
- * @return $this Fluent Builder
- */
- public function setIdentity($identity)
- {
- $this->options['identity'] = $identity;
- return $this;
- }
-
- /**
- * Specifies the unique string identifier of the Deployment group that this Device is going to be associated with.
- *
- * @param string $deploymentSid The unique SID of the Deployment group.
- * @return $this Fluent Builder
- */
- public function setDeploymentSid($deploymentSid)
- {
- $this->options['deploymentSid'] = $deploymentSid;
- return $this;
- }
-
- /**
- * The enabled
- *
- * @param bool $enabled The enabled
- * @return $this Fluent Builder
- */
- public function setEnabled($enabled)
- {
- $this->options['enabled'] = $enabled;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.DeployedDevices.UpdateDeviceOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DevicePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DevicePage.php
deleted file mode 100644
index fe5932f..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/DevicePage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new DeviceInstance($this->version, $payload, $this->solution['fleetSid']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.DeployedDevices.DevicePage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/KeyContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/KeyContext.php
deleted file mode 100644
index bd640df..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/KeyContext.php
+++ /dev/null
@@ -1,120 +0,0 @@
-solution = array('fleetSid' => $fleetSid, 'sid' => $sid,);
-
- $this->uri = '/Fleets/' . \rawurlencode($fleetSid) . '/Keys/' . \rawurlencode($sid) . '';
- }
-
- /**
- * Fetch a KeyInstance
- *
- * @return KeyInstance Fetched KeyInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new KeyInstance(
- $this->version,
- $payload,
- $this->solution['fleetSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Deletes the KeyInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
-
- /**
- * Update the KeyInstance
- *
- * @param array|Options $options Optional Arguments
- * @return KeyInstance Updated KeyInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'DeviceSid' => $options['deviceSid'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new KeyInstance(
- $this->version,
- $payload,
- $this->solution['fleetSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.DeployedDevices.KeyContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/KeyInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/KeyInstance.php
deleted file mode 100644
index edea5e4..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/KeyInstance.php
+++ /dev/null
@@ -1,152 +0,0 @@
-properties = array(
- 'sid' => Values::array_get($payload, 'sid'),
- 'url' => Values::array_get($payload, 'url'),
- 'friendlyName' => Values::array_get($payload, 'friendly_name'),
- 'fleetSid' => Values::array_get($payload, 'fleet_sid'),
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'deviceSid' => Values::array_get($payload, 'device_sid'),
- 'secret' => Values::array_get($payload, 'secret'),
- 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- );
-
- $this->solution = array('fleetSid' => $fleetSid, 'sid' => $sid ?: $this->properties['sid'],);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Preview\DeployedDevices\Fleet\KeyContext Context for
- * this
- * KeyInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new KeyContext(
- $this->version,
- $this->solution['fleetSid'],
- $this->solution['sid']
- );
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a KeyInstance
- *
- * @return KeyInstance Fetched KeyInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Deletes the KeyInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->proxy()->delete();
- }
-
- /**
- * Update the KeyInstance
- *
- * @param array|Options $options Optional Arguments
- * @return KeyInstance Updated KeyInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- return $this->proxy()->update($options);
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.DeployedDevices.KeyInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/KeyList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/KeyList.php
deleted file mode 100644
index 65b13a0..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/KeyList.php
+++ /dev/null
@@ -1,181 +0,0 @@
-solution = array('fleetSid' => $fleetSid,);
-
- $this->uri = '/Fleets/' . \rawurlencode($fleetSid) . '/Keys';
- }
-
- /**
- * Create a new KeyInstance
- *
- * @param array|Options $options Optional Arguments
- * @return KeyInstance Newly created KeyInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'DeviceSid' => $options['deviceSid'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new KeyInstance($this->version, $payload, $this->solution['fleetSid']);
- }
-
- /**
- * Streams KeyInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
- */
- public function stream($options = array(), $limit = null, $pageSize = null)
- {
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($options, $limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
- }
-
- /**
- * Reads KeyInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return KeyInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
- /**
- * Retrieve a single page of KeyInstance records from the API.
- * Request is executed immediately
- *
- * @param array|Options $options Optional Arguments
- * @param mixed $pageSize Number of records to return, defaults to 50
- * @param string $pageToken PageToken provided by the API
- * @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of KeyInstance
- */
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
- {
- $options = new Values($options);
- $params = Values::of(array(
- 'DeviceSid' => $options['deviceSid'],
- 'PageToken' => $pageToken,
- 'Page' => $pageNumber,
- 'PageSize' => $pageSize,
- ));
-
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
-
- return new KeyPage($this->version, $response, $this->solution);
- }
-
- /**
- * Retrieve a specific page of KeyInstance records from the API.
- * Request is executed immediately
- *
- * @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of KeyInstance
- */
- public function getPage($targetUrl)
- {
- $response = $this->version->getDomain()->getClient()->request(
- 'GET',
- $targetUrl
- );
-
- return new KeyPage($this->version, $response, $this->solution);
- }
-
- /**
- * Constructs a KeyContext
- *
- * @param string $sid A string that uniquely identifies the Key.
- * @return \Twilio\Rest\Preview\DeployedDevices\Fleet\KeyContext
- */
- public function getContext($sid)
- {
- return new KeyContext($this->version, $this->solution['fleetSid'], $sid);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.DeployedDevices.KeyList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/KeyOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/KeyOptions.php
deleted file mode 100644
index 26bd040..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/KeyOptions.php
+++ /dev/null
@@ -1,193 +0,0 @@
-options['friendlyName'] = $friendlyName;
- $this->options['deviceSid'] = $deviceSid;
- }
-
- /**
- * Provides a human readable descriptive text for this Key credential, up to 256 characters long.
- *
- * @param string $friendlyName The human readable description for this Key.
- * @return $this Fluent Builder
- */
- public function setFriendlyName($friendlyName)
- {
- $this->options['friendlyName'] = $friendlyName;
- return $this;
- }
-
- /**
- * Provides the unique string identifier of an existing Device to become authenticated with this Key credential.
- *
- * @param string $deviceSid The unique identifier of a Key to be authenticated.
- * @return $this Fluent Builder
- */
- public function setDeviceSid($deviceSid)
- {
- $this->options['deviceSid'] = $deviceSid;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.DeployedDevices.CreateKeyOptions ' . \implode(' ', $options) . ']';
- }
-}
-
-class ReadKeyOptions extends Options
-{
- /**
- * @param string $deviceSid Find all Keys authenticating specified Device.
- */
- public function __construct($deviceSid = Values::NONE)
- {
- $this->options['deviceSid'] = $deviceSid;
- }
-
- /**
- * Filters the resulting list of Keys by a unique string identifier of an authenticated Device.
- *
- * @param string $deviceSid Find all Keys authenticating specified Device.
- * @return $this Fluent Builder
- */
- public function setDeviceSid($deviceSid)
- {
- $this->options['deviceSid'] = $deviceSid;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.DeployedDevices.ReadKeyOptions ' . \implode(' ', $options) . ']';
- }
-}
-
-class UpdateKeyOptions extends Options
-{
- /**
- * @param string $friendlyName The human readable description for this Key.
- * @param string $deviceSid The unique identifier of a Key to be authenticated.
- */
- public function __construct($friendlyName = Values::NONE, $deviceSid = Values::NONE)
- {
- $this->options['friendlyName'] = $friendlyName;
- $this->options['deviceSid'] = $deviceSid;
- }
-
- /**
- * Provides a human readable descriptive text for this Key credential, up to 256 characters long.
- *
- * @param string $friendlyName The human readable description for this Key.
- * @return $this Fluent Builder
- */
- public function setFriendlyName($friendlyName)
- {
- $this->options['friendlyName'] = $friendlyName;
- return $this;
- }
-
- /**
- * Provides the unique string identifier of an existing Device to become authenticated with this Key credential.
- *
- * @param string $deviceSid The unique identifier of a Key to be authenticated.
- * @return $this Fluent Builder
- */
- public function setDeviceSid($deviceSid)
- {
- $this->options['deviceSid'] = $deviceSid;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.DeployedDevices.UpdateKeyOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/KeyPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/KeyPage.php
deleted file mode 100644
index 0296a80..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/Fleet/KeyPage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new KeyInstance($this->version, $payload, $this->solution['fleetSid']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.DeployedDevices.KeyPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/FleetContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/FleetContext.php
deleted file mode 100644
index 486dbcd..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/FleetContext.php
+++ /dev/null
@@ -1,218 +0,0 @@
-solution = array('sid' => $sid,);
-
- $this->uri = '/Fleets/' . \rawurlencode($sid) . '';
- }
-
- /**
- * Fetch a FleetInstance
- *
- * @return FleetInstance Fetched FleetInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new FleetInstance($this->version, $payload, $this->solution['sid']);
- }
-
- /**
- * Deletes the FleetInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
-
- /**
- * Update the FleetInstance
- *
- * @param array|Options $options Optional Arguments
- * @return FleetInstance Updated FleetInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'DefaultDeploymentSid' => $options['defaultDeploymentSid'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new FleetInstance($this->version, $payload, $this->solution['sid']);
- }
-
- /**
- * Access the devices
- *
- * @return \Twilio\Rest\Preview\DeployedDevices\Fleet\DeviceList
- */
- protected function getDevices()
- {
- if (!$this->_devices) {
- $this->_devices = new DeviceList($this->version, $this->solution['sid']);
- }
-
- return $this->_devices;
- }
-
- /**
- * Access the deployments
- *
- * @return \Twilio\Rest\Preview\DeployedDevices\Fleet\DeploymentList
- */
- protected function getDeployments()
- {
- if (!$this->_deployments) {
- $this->_deployments = new DeploymentList($this->version, $this->solution['sid']);
- }
-
- return $this->_deployments;
- }
-
- /**
- * Access the certificates
- *
- * @return \Twilio\Rest\Preview\DeployedDevices\Fleet\CertificateList
- */
- protected function getCertificates()
- {
- if (!$this->_certificates) {
- $this->_certificates = new CertificateList($this->version, $this->solution['sid']);
- }
-
- return $this->_certificates;
- }
-
- /**
- * Access the keys
- *
- * @return \Twilio\Rest\Preview\DeployedDevices\Fleet\KeyList
- */
- protected function getKeys()
- {
- if (!$this->_keys) {
- $this->_keys = new KeyList($this->version, $this->solution['sid']);
- }
-
- return $this->_keys;
- }
-
- /**
- * Magic getter to lazy load subresources
- *
- * @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
- * @throws TwilioException For unknown subresources
- */
- public function __get($name)
- {
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown subresource ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $property = $this->$name;
- if (\method_exists($property, 'getContext')) {
- return \call_user_func_array(array($property, 'getContext'), $arguments);
- }
-
- throw new TwilioException('Resource does not have a context');
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.DeployedDevices.FleetContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/FleetInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/FleetInstance.php
deleted file mode 100644
index 6492522..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/FleetInstance.php
+++ /dev/null
@@ -1,191 +0,0 @@
-properties = array(
- 'sid' => Values::array_get($payload, 'sid'),
- 'url' => Values::array_get($payload, 'url'),
- 'uniqueName' => Values::array_get($payload, 'unique_name'),
- 'friendlyName' => Values::array_get($payload, 'friendly_name'),
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'defaultDeploymentSid' => Values::array_get($payload, 'default_deployment_sid'),
- 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- 'links' => Values::array_get($payload, 'links'),
- );
-
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Preview\DeployedDevices\FleetContext Context for this
- * FleetInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new FleetContext($this->version, $this->solution['sid']);
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a FleetInstance
- *
- * @return FleetInstance Fetched FleetInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Deletes the FleetInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->proxy()->delete();
- }
-
- /**
- * Update the FleetInstance
- *
- * @param array|Options $options Optional Arguments
- * @return FleetInstance Updated FleetInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- return $this->proxy()->update($options);
- }
-
- /**
- * Access the devices
- *
- * @return \Twilio\Rest\Preview\DeployedDevices\Fleet\DeviceList
- */
- protected function getDevices()
- {
- return $this->proxy()->devices;
- }
-
- /**
- * Access the deployments
- *
- * @return \Twilio\Rest\Preview\DeployedDevices\Fleet\DeploymentList
- */
- protected function getDeployments()
- {
- return $this->proxy()->deployments;
- }
-
- /**
- * Access the certificates
- *
- * @return \Twilio\Rest\Preview\DeployedDevices\Fleet\CertificateList
- */
- protected function getCertificates()
- {
- return $this->proxy()->certificates;
- }
-
- /**
- * Access the keys
- *
- * @return \Twilio\Rest\Preview\DeployedDevices\Fleet\KeyList
- */
- protected function getKeys()
- {
- return $this->proxy()->keys;
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.DeployedDevices.FleetInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/FleetList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/FleetList.php
deleted file mode 100644
index ae48122..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/FleetList.php
+++ /dev/null
@@ -1,172 +0,0 @@
-solution = array();
-
- $this->uri = '/Fleets';
- }
-
- /**
- * Create a new FleetInstance
- *
- * @param array|Options $options Optional Arguments
- * @return FleetInstance Newly created FleetInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array('FriendlyName' => $options['friendlyName'],));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new FleetInstance($this->version, $payload);
- }
-
- /**
- * Streams FleetInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
- *
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
- */
- public function stream($limit = null, $pageSize = null)
- {
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
- }
-
- /**
- * Reads FleetInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return FleetInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
- /**
- * Retrieve a single page of FleetInstance records from the API.
- * Request is executed immediately
- *
- * @param mixed $pageSize Number of records to return, defaults to 50
- * @param string $pageToken PageToken provided by the API
- * @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of FleetInstance
- */
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
- {
- $params = Values::of(array(
- 'PageToken' => $pageToken,
- 'Page' => $pageNumber,
- 'PageSize' => $pageSize,
- ));
-
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
-
- return new FleetPage($this->version, $response, $this->solution);
- }
-
- /**
- * Retrieve a specific page of FleetInstance records from the API.
- * Request is executed immediately
- *
- * @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of FleetInstance
- */
- public function getPage($targetUrl)
- {
- $response = $this->version->getDomain()->getClient()->request(
- 'GET',
- $targetUrl
- );
-
- return new FleetPage($this->version, $response, $this->solution);
- }
-
- /**
- * Constructs a FleetContext
- *
- * @param string $sid A string that uniquely identifies the Fleet.
- * @return \Twilio\Rest\Preview\DeployedDevices\FleetContext
- */
- public function getContext($sid)
- {
- return new FleetContext($this->version, $sid);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.DeployedDevices.FleetList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/FleetOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/FleetOptions.php
deleted file mode 100644
index 023c1bc..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/FleetOptions.php
+++ /dev/null
@@ -1,130 +0,0 @@
-options['friendlyName'] = $friendlyName;
- }
-
- /**
- * Provides a human readable descriptive text for this Fleet, up to 256 characters long.
- *
- * @param string $friendlyName A human readable description for this Fleet.
- * @return $this Fluent Builder
- */
- public function setFriendlyName($friendlyName)
- {
- $this->options['friendlyName'] = $friendlyName;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.DeployedDevices.CreateFleetOptions ' . \implode(' ', $options) . ']';
- }
-}
-
-class UpdateFleetOptions extends Options
-{
- /**
- * @param string $friendlyName A human readable description for this Fleet.
- * @param string $defaultDeploymentSid A default Deployment SID.
- */
- public function __construct($friendlyName = Values::NONE, $defaultDeploymentSid = Values::NONE)
- {
- $this->options['friendlyName'] = $friendlyName;
- $this->options['defaultDeploymentSid'] = $defaultDeploymentSid;
- }
-
- /**
- * Provides a human readable descriptive text for this Fleet, up to 256 characters long.
- *
- * @param string $friendlyName A human readable description for this Fleet.
- * @return $this Fluent Builder
- */
- public function setFriendlyName($friendlyName)
- {
- $this->options['friendlyName'] = $friendlyName;
- return $this;
- }
-
- /**
- * Provides a string identifier of a Deployment that is going to be used as a default one for this Fleet.
- *
- * @param string $defaultDeploymentSid A default Deployment SID.
- * @return $this Fluent Builder
- */
- public function setDefaultDeploymentSid($defaultDeploymentSid)
- {
- $this->options['defaultDeploymentSid'] = $defaultDeploymentSid;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.DeployedDevices.UpdateFleetOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/FleetPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/FleetPage.php
deleted file mode 100644
index 130e66b..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/DeployedDevices/FleetPage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new FleetInstance($this->version, $payload);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.DeployedDevices.FleetPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers.php
index d751706..d3e1ee5 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers.php
@@ -1,36 +1,42 @@
version = 'HostedNumbers';
}
- /**
- * @return \Twilio\Rest\Preview\HostedNumbers\AuthorizationDocumentList
- */
- protected function getAuthorizationDocuments()
+ protected function getAuthorizationDocuments(): AuthorizationDocumentList
{
if (!$this->_authorizationDocuments) {
$this->_authorizationDocuments = new AuthorizationDocumentList($this);
@@ -49,10 +52,7 @@ protected function getAuthorizationDocuments()
return $this->_authorizationDocuments;
}
- /**
- * @return \Twilio\Rest\Preview\HostedNumbers\HostedNumberOrderList
- */
- protected function getHostedNumberOrders()
+ protected function getHostedNumberOrders(): HostedNumberOrderList
{
if (!$this->_hostedNumberOrders) {
$this->_hostedNumberOrders = new HostedNumberOrderList($this);
@@ -67,7 +67,7 @@ protected function getHostedNumberOrders()
* @return \Twilio\ListResource The requested resource
* @throws TwilioException For unknown resource
*/
- public function __get($name)
+ public function __get(string $name)
{
$method = 'get' . \ucfirst($name);
if (\method_exists($this, $method)) {
@@ -82,10 +82,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -100,8 +100,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.HostedNumbers]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocument/DependentHostedNumberOrderInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocument/DependentHostedNumberOrderInstance.php
index b8095eb..2f4f18c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocument/DependentHostedNumberOrderInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocument/DependentHostedNumberOrderInstance.php
@@ -2,68 +2,75 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Preview\HostedNumbers\AuthorizationDocument;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Base\PhoneNumberCapabilities;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property string $sid
- * @property string $accountSid
- * @property string $incomingPhoneNumberSid
- * @property string $addressSid
- * @property string $signingDocumentSid
- * @property string $phoneNumber
- * @property string $capabilities
- * @property string $friendlyName
- * @property string $uniqueName
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $incomingPhoneNumberSid
+ * @property string|null $addressSid
+ * @property string|null $signingDocumentSid
+ * @property string|null $phoneNumber
+ * @property PhoneNumberCapabilities|null $capabilities
+ * @property string|null $friendlyName
+ * @property string|null $uniqueName
* @property string $status
- * @property string $failureReason
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
+ * @property string|null $failureReason
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
* @property int $verificationAttempts
- * @property string $email
- * @property string $ccEmails
+ * @property string|null $email
+ * @property string[]|null $ccEmails
* @property string $verificationType
- * @property string $verificationDocumentSid
- * @property string $extension
+ * @property string|null $verificationDocumentSid
+ * @property string|null $extension
* @property int $callDelay
- * @property string $verificationCode
- * @property string $verificationCallSids
+ * @property string|null $verificationCode
+ * @property string[]|null $verificationCallSids
*/
class DependentHostedNumberOrderInstance extends InstanceResource
{
/**
* Initialize the DependentHostedNumberOrderInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $signingDocumentSid LOA document sid.
- * @return \Twilio\Rest\Preview\HostedNumbers\AuthorizationDocument\DependentHostedNumberOrderInstance
+ * @param string $signingDocumentSid A 34 character string that uniquely identifies the LOA document associated with this HostedNumberOrder.
*/
- public function __construct(Version $version, array $payload, $signingDocumentSid)
+ public function __construct(Version $version, array $payload, string $signingDocumentSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'incomingPhoneNumberSid' => Values::array_get($payload, 'incoming_phone_number_sid'),
'addressSid' => Values::array_get($payload, 'address_sid'),
'signingDocumentSid' => Values::array_get($payload, 'signing_document_sid'),
'phoneNumber' => Values::array_get($payload, 'phone_number'),
- 'capabilities' => Values::array_get($payload, 'capabilities'),
+ 'capabilities' => Deserialize::phoneNumberCapabilities(Values::array_get($payload, 'capabilities')),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
'uniqueName' => Values::array_get($payload, 'unique_name'),
'status' => Values::array_get($payload, 'status'),
@@ -79,9 +86,9 @@ public function __construct(Version $version, array $payload, $signingDocumentSi
'callDelay' => Values::array_get($payload, 'call_delay'),
'verificationCode' => Values::array_get($payload, 'verification_code'),
'verificationCallSids' => Values::array_get($payload, 'verification_call_sids'),
- );
+ ];
- $this->solution = array('signingDocumentSid' => $signingDocumentSid,);
+ $this->solution = ['signingDocumentSid' => $signingDocumentSid, ];
}
/**
@@ -91,7 +98,7 @@ public function __construct(Version $version, array $payload, $signingDocumentSi
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -110,8 +117,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.HostedNumbers.DependentHostedNumberOrderInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocument/DependentHostedNumberOrderList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocument/DependentHostedNumberOrderList.php
index 544fdc3..766310c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocument/DependentHostedNumberOrderList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocument/DependentHostedNumberOrderList.php
@@ -2,133 +2,148 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Preview\HostedNumbers\AuthorizationDocument;
use Twilio\ListResource;
use Twilio\Options;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
+
class DependentHostedNumberOrderList extends ListResource
-{
+ {
/**
* Construct the DependentHostedNumberOrderList
*
* @param Version $version Version that contains the resource
- * @param string $signingDocumentSid LOA document sid.
- * @return \Twilio\Rest\Preview\HostedNumbers\AuthorizationDocument\DependentHostedNumberOrderList
+ * @param string $signingDocumentSid A 34 character string that uniquely identifies the LOA document associated with this HostedNumberOrder.
*/
- public function __construct(Version $version, $signingDocumentSid)
- {
+ public function __construct(
+ Version $version,
+ string $signingDocumentSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('signingDocumentSid' => $signingDocumentSid,);
-
- $this->uri = '/AuthorizationDocuments/' . \rawurlencode($signingDocumentSid) . '/DependentHostedNumberOrders';
+ $this->solution = [
+ 'signingDocumentSid' =>
+ $signingDocumentSid,
+
+ ];
+
+ $this->uri = '/AuthorizationDocuments/' . \rawurlencode($signingDocumentSid)
+ .'/DependentHostedNumberOrders';
}
/**
- * Streams DependentHostedNumberOrderInstance records from the API as a
- * generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Reads DependentHostedNumberOrderInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
+ * @param int $limit Upper limit for the number of records to return. read()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
+ * page_size is defined but a limit is defined, read()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return DependentHostedNumberOrderInstance[] Array of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($options, $limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
- * Reads DependentHostedNumberOrderInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
+ * Streams DependentHostedNumberOrderInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
+ * @param int $limit Upper limit for the number of records to return. stream()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
+ * page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return DependentHostedNumberOrderInstance[] Array of results
+ * @return Stream stream of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
/**
- * Retrieve a single page of DependentHostedNumberOrderInstance records from
- * the API.
+ * Retrieve a single page of DependentHostedNumberOrderInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of DependentHostedNumberOrderInstance
+ * @return DependentHostedNumberOrderPage Page of DependentHostedNumberOrderInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): DependentHostedNumberOrderPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Status' => $options['status'],
- 'PhoneNumber' => $options['phoneNumber'],
- 'IncomingPhoneNumberSid' => $options['incomingPhoneNumberSid'],
- 'FriendlyName' => $options['friendlyName'],
- 'UniqueName' => $options['uniqueName'],
+
+ $params = Values::of([
+ 'Status' =>
+ $options['status'],
+ 'PhoneNumber' =>
+ $options['phoneNumber'],
+ 'IncomingPhoneNumberSid' =>
+ $options['incomingPhoneNumberSid'],
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'UniqueName' =>
+ $options['uniqueName'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new DependentHostedNumberOrderPage($this->version, $response, $this->solution);
}
/**
- * Retrieve a specific page of DependentHostedNumberOrderInstance records from
- * the API.
+ * Retrieve a specific page of DependentHostedNumberOrderInstance records from the API.
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of DependentHostedNumberOrderInstance
+ * @return DependentHostedNumberOrderPage Page of DependentHostedNumberOrderInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): DependentHostedNumberOrderPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -138,13 +153,14 @@ public function getPage($targetUrl)
return new DependentHostedNumberOrderPage($this->version, $response, $this->solution);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.HostedNumbers.DependentHostedNumberOrderList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocument/DependentHostedNumberOrderOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocument/DependentHostedNumberOrderOptions.php
index 603cb3c..2d31e4d 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocument/DependentHostedNumberOrderOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocument/DependentHostedNumberOrderOptions.php
@@ -1,10 +1,16 @@
options['status'] = $status;
$this->options['phoneNumber'] = $phoneNumber;
$this->options['incomingPhoneNumberSid'] = $incomingPhoneNumberSid;
@@ -52,12 +75,12 @@ public function __construct($status = Values::NONE, $phoneNumber = Values::NONE,
}
/**
- * Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values) for more information on each of these statuses.
+ * Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/phone-numbers/hosted-numbers/hosted-numbers-api/authorization-document-resource#status-values) for more information on each of these statuses.
*
- * @param string $status The Status of this HostedNumberOrder.
+ * @param string $status Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/phone-numbers/hosted-numbers/hosted-numbers-api/authorization-document-resource#status-values) for more information on each of these statuses.
* @return $this Fluent Builder
*/
- public function setStatus($status)
+ public function setStatus(string $status): self
{
$this->options['status'] = $status;
return $this;
@@ -66,10 +89,10 @@ public function setStatus($status)
/**
* An E164 formatted phone number hosted by this HostedNumberOrder.
*
- * @param string $phoneNumber An E164 formatted phone number.
+ * @param string $phoneNumber An E164 formatted phone number hosted by this HostedNumberOrder.
* @return $this Fluent Builder
*/
- public function setPhoneNumber($phoneNumber)
+ public function setPhoneNumber(string $phoneNumber): self
{
$this->options['phoneNumber'] = $phoneNumber;
return $this;
@@ -78,10 +101,10 @@ public function setPhoneNumber($phoneNumber)
/**
* A 34 character string that uniquely identifies the IncomingPhoneNumber resource created by this HostedNumberOrder.
*
- * @param string $incomingPhoneNumberSid IncomingPhoneNumber sid.
+ * @param string $incomingPhoneNumberSid A 34 character string that uniquely identifies the IncomingPhoneNumber resource created by this HostedNumberOrder.
* @return $this Fluent Builder
*/
- public function setIncomingPhoneNumberSid($incomingPhoneNumberSid)
+ public function setIncomingPhoneNumberSid(string $incomingPhoneNumberSid): self
{
$this->options['incomingPhoneNumberSid'] = $incomingPhoneNumberSid;
return $this;
@@ -90,10 +113,10 @@ public function setIncomingPhoneNumberSid($incomingPhoneNumberSid)
/**
* A human readable description of this resource, up to 64 characters.
*
- * @param string $friendlyName A human readable description of this resource.
+ * @param string $friendlyName A human readable description of this resource, up to 64 characters.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -102,11 +125,10 @@ public function setFriendlyName($friendlyName)
/**
* Provides a unique and addressable name to be assigned to this HostedNumberOrder, assigned by the developer, to be optionally used in addition to SID.
*
- * @param string $uniqueName A unique, developer assigned name of this
- * HostedNumberOrder.
+ * @param string $uniqueName Provides a unique and addressable name to be assigned to this HostedNumberOrder, assigned by the developer, to be optionally used in addition to SID.
* @return $this Fluent Builder
*/
- public function setUniqueName($uniqueName)
+ public function setUniqueName(string $uniqueName): self
{
$this->options['uniqueName'] = $uniqueName;
return $this;
@@ -117,14 +139,10 @@ public function setUniqueName($uniqueName)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.HostedNumbers.ReadDependentHostedNumberOrderOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Preview.HostedNumbers.ReadDependentHostedNumberOrderOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocument/DependentHostedNumberOrderPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocument/DependentHostedNumberOrderPage.php
index f85e175..31d27e8 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocument/DependentHostedNumberOrderPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocument/DependentHostedNumberOrderPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return DependentHostedNumberOrderInstance \Twilio\Rest\Preview\HostedNumbers\AuthorizationDocument\DependentHostedNumberOrderInstance
+ */
+ public function buildInstance(array $payload): DependentHostedNumberOrderInstance
{
- return new DependentHostedNumberOrderInstance(
- $this->version,
- $payload,
- $this->solution['signingDocumentSid']
- );
+ return new DependentHostedNumberOrderInstance($this->version, $payload, $this->solution['signingDocumentSid']);
}
/**
@@ -38,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.HostedNumbers.DependentHostedNumberOrderPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocumentContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocumentContext.php
index a3107f0..1b09ecd 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocumentContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocumentContext.php
@@ -2,66 +2,80 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Preview\HostedNumbers;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Preview\HostedNumbers\AuthorizationDocument\DependentHostedNumberOrderList;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+use Twilio\Rest\Preview\HostedNumbers\AuthorizationDocument\DependentHostedNumberOrderList;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property \Twilio\Rest\Preview\HostedNumbers\AuthorizationDocument\DependentHostedNumberOrderList $dependentHostedNumberOrders
+ * @property DependentHostedNumberOrderList $dependentHostedNumberOrders
*/
class AuthorizationDocumentContext extends InstanceContext
-{
- protected $_dependentHostedNumberOrders = null;
+ {
+ protected $_dependentHostedNumberOrders;
/**
* Initialize the AuthorizationDocumentContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid AuthorizationDocument sid.
- * @return \Twilio\Rest\Preview\HostedNumbers\AuthorizationDocumentContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid A 34 character string that uniquely identifies this AuthorizationDocument.
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/AuthorizationDocuments/' . \rawurlencode($sid) . '';
+ $this->uri = '/AuthorizationDocuments/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a AuthorizationDocumentInstance
+ * Fetch the AuthorizationDocumentInstance
*
* @return AuthorizationDocumentInstance Fetched AuthorizationDocumentInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): AuthorizationDocumentInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
- return new AuthorizationDocumentInstance($this->version, $payload, $this->solution['sid']);
+ return new AuthorizationDocumentInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Update the AuthorizationDocumentInstance
*
@@ -69,40 +83,43 @@ public function fetch()
* @return AuthorizationDocumentInstance Updated AuthorizationDocumentInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): AuthorizationDocumentInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'HostedNumberOrderSids' => Serialize::map($options['hostedNumberOrderSids'], function ($e) {
- return $e;
- }),
- 'AddressSid' => $options['addressSid'],
- 'Email' => $options['email'],
- 'CcEmails' => Serialize::map($options['ccEmails'], function ($e) {
- return $e;
- }),
- 'Status' => $options['status'],
- 'ContactTitle' => $options['contactTitle'],
- 'ContactPhoneNumber' => $options['contactPhoneNumber'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'HostedNumberOrderSids' =>
+ Serialize::map($options['hostedNumberOrderSids'], function ($e) { return $e; }),
+ 'AddressSid' =>
+ $options['addressSid'],
+ 'Email' =>
+ $options['email'],
+ 'CcEmails' =>
+ Serialize::map($options['ccEmails'], function ($e) { return $e; }),
+ 'Status' =>
+ $options['status'],
+ 'ContactTitle' =>
+ $options['contactTitle'],
+ 'ContactPhoneNumber' =>
+ $options['contactPhoneNumber'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
+
+ return new AuthorizationDocumentInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
);
-
- return new AuthorizationDocumentInstance($this->version, $payload, $this->solution['sid']);
}
+
/**
* Access the dependentHostedNumberOrders
- *
- * @return \Twilio\Rest\Preview\HostedNumbers\AuthorizationDocument\DependentHostedNumberOrderList
*/
- protected function getDependentHostedNumberOrders()
+ protected function getDependentHostedNumberOrders(): DependentHostedNumberOrderList
{
if (!$this->_dependentHostedNumberOrders) {
$this->_dependentHostedNumberOrders = new DependentHostedNumberOrderList(
@@ -118,10 +135,10 @@ protected function getDependentHostedNumberOrders()
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -136,10 +153,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -154,12 +171,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Preview.HostedNumbers.AuthorizationDocumentContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocumentInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocumentInstance.php
index 1a4fb77..b325d96 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocumentInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocumentInstance.php
@@ -2,51 +2,58 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Preview\HostedNumbers;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Preview\HostedNumbers\AuthorizationDocument\DependentHostedNumberOrderList;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property string $sid
- * @property string $addressSid
+ * @property string|null $sid
+ * @property string|null $addressSid
* @property string $status
- * @property string $email
- * @property string $ccEmails
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
- * @property array $links
+ * @property string|null $email
+ * @property string[]|null $ccEmails
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
+ * @property array|null $links
*/
class AuthorizationDocumentInstance extends InstanceResource
{
- protected $_dependentHostedNumberOrders = null;
+ protected $_dependentHostedNumberOrders;
/**
* Initialize the AuthorizationDocumentInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid AuthorizationDocument sid.
- * @return \Twilio\Rest\Preview\HostedNumbers\AuthorizationDocumentInstance
+ * @param string $sid A 34 character string that uniquely identifies this AuthorizationDocument.
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'addressSid' => Values::array_get($payload, 'address_sid'),
'status' => Values::array_get($payload, 'status'),
@@ -56,34 +63,38 @@ public function __construct(Version $version, array $payload, $sid = null)
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Preview\HostedNumbers\AuthorizationDocumentContext Context for this AuthorizationDocumentInstance
+ * @return AuthorizationDocumentContext Context for this AuthorizationDocumentInstance
*/
- protected function proxy()
+ protected function proxy(): AuthorizationDocumentContext
{
if (!$this->context) {
- $this->context = new AuthorizationDocumentContext($this->version, $this->solution['sid']);
+ $this->context = new AuthorizationDocumentContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a AuthorizationDocumentInstance
+ * Fetch the AuthorizationDocumentInstance
*
* @return AuthorizationDocumentInstance Fetched AuthorizationDocumentInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): AuthorizationDocumentInstance
{
+
return $this->proxy()->fetch();
}
@@ -94,17 +105,16 @@ public function fetch()
* @return AuthorizationDocumentInstance Updated AuthorizationDocumentInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): AuthorizationDocumentInstance
{
+
return $this->proxy()->update($options);
}
/**
* Access the dependentHostedNumberOrders
- *
- * @return \Twilio\Rest\Preview\HostedNumbers\AuthorizationDocument\DependentHostedNumberOrderList
*/
- protected function getDependentHostedNumberOrders()
+ protected function getDependentHostedNumberOrders(): DependentHostedNumberOrderList
{
return $this->proxy()->dependentHostedNumberOrders;
}
@@ -116,7 +126,7 @@ protected function getDependentHostedNumberOrders()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -135,12 +145,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Preview.HostedNumbers.AuthorizationDocumentInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocumentList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocumentList.php
index cb0608e..c025bf7 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocumentList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocumentList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Preview\HostedNumbers;
@@ -12,60 +19,73 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
class AuthorizationDocumentList extends ListResource
-{
+ {
/**
* Construct the AuthorizationDocumentList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Preview\HostedNumbers\AuthorizationDocumentList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/AuthorizationDocuments';
}
/**
- * Streams AuthorizationDocumentInstance records from the API as a generator
- * stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the AuthorizationDocumentInstance
*
+ * @param string[] $hostedNumberOrderSids A list of HostedNumberOrder sids that this AuthorizationDocument will authorize for hosting phone number capabilities on Twilio's platform.
+ * @param string $addressSid A 34 character string that uniquely identifies the Address resource that is associated with this AuthorizationDocument.
+ * @param string $email Email that this AuthorizationDocument will be sent to for signing.
+ * @param string $contactTitle The title of the person authorized to sign the Authorization Document for this phone number.
+ * @param string $contactPhoneNumber The contact phone number of the person authorized to sign the Authorization Document.
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return AuthorizationDocumentInstance Created AuthorizationDocumentInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function create(array $hostedNumberOrderSids, string $addressSid, string $email, string $contactTitle, string $contactPhoneNumber, array $options = []): AuthorizationDocumentInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($options, $limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'HostedNumberOrderSids' =>
+ Serialize::map($hostedNumberOrderSids,function ($e) { return $e; }),
+ 'AddressSid' =>
+ $addressSid,
+ 'Email' =>
+ $email,
+ 'ContactTitle' =>
+ $contactTitle,
+ 'ContactPhoneNumber' =>
+ $contactPhoneNumber,
+ 'CcEmails' =>
+ Serialize::map($options['ccEmails'], function ($e) { return $e; }),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new AuthorizationDocumentInstance(
+ $this->version,
+ $payload
+ );
}
+
/**
* Reads AuthorizationDocumentInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -82,50 +102,80 @@ public function stream($options = array(), $limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return AuthorizationDocumentInstance[] Array of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
+ /**
+ * Streams AuthorizationDocumentInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of AuthorizationDocumentInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of AuthorizationDocumentInstance
+ * @return AuthorizationDocumentPage Page of AuthorizationDocumentInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): AuthorizationDocumentPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Email' => $options['email'],
- 'Status' => $options['status'],
+
+ $params = Values::of([
+ 'Email' =>
+ $options['email'],
+ 'Status' =>
+ $options['status'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new AuthorizationDocumentPage($this->version, $response, $this->solution);
}
/**
- * Retrieve a specific page of AuthorizationDocumentInstance records from the
- * API.
+ * Retrieve a specific page of AuthorizationDocumentInstance records from the API.
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of AuthorizationDocumentInstance
+ * @return AuthorizationDocumentPage Page of AuthorizationDocumentInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): AuthorizationDocumentPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -135,56 +185,21 @@ public function getPage($targetUrl)
return new AuthorizationDocumentPage($this->version, $response, $this->solution);
}
- /**
- * Create a new AuthorizationDocumentInstance
- *
- * @param string $hostedNumberOrderSids A list of HostedNumberOrder sids.
- * @param string $addressSid Address sid.
- * @param string $email Email.
- * @param string $contactTitle Title of signee of this Authorization Document.
- * @param string $contactPhoneNumber Authorization Document's signee's phone
- * number.
- * @param array|Options $options Optional Arguments
- * @return AuthorizationDocumentInstance Newly created
- * AuthorizationDocumentInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($hostedNumberOrderSids, $addressSid, $email, $contactTitle, $contactPhoneNumber, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'HostedNumberOrderSids' => Serialize::map($hostedNumberOrderSids, function ($e) {
- return $e;
- }),
- 'AddressSid' => $addressSid,
- 'Email' => $email,
- 'ContactTitle' => $contactTitle,
- 'ContactPhoneNumber' => $contactPhoneNumber,
- 'CcEmails' => Serialize::map($options['ccEmails'], function ($e) {
- return $e;
- }),
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new AuthorizationDocumentInstance($this->version, $payload);
- }
/**
* Constructs a AuthorizationDocumentContext
*
- * @param string $sid AuthorizationDocument sid.
- * @return \Twilio\Rest\Preview\HostedNumbers\AuthorizationDocumentContext
+ * @param string $sid A 34 character string that uniquely identifies this AuthorizationDocument.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): AuthorizationDocumentContext
{
- return new AuthorizationDocumentContext($this->version, $sid);
+ return new AuthorizationDocumentContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -192,8 +207,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.HostedNumbers.AuthorizationDocumentList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocumentOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocumentOptions.php
index f369a9b..3eab69f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocumentOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocumentOptions.php
@@ -1,10 +1,16 @@
options['hostedNumberOrderSids'] = $hostedNumberOrderSids;
- $this->options['addressSid'] = $addressSid;
- $this->options['email'] = $email;
+ public function __construct(
+
+ array $ccEmails = Values::ARRAY_NONE
+
+ ) {
$this->options['ccEmails'] = $ccEmails;
- $this->options['status'] = $status;
- $this->options['contactTitle'] = $contactTitle;
- $this->options['contactPhoneNumber'] = $contactPhoneNumber;
}
/**
- * A list of HostedNumberOrder sids that this AuthorizationDocument will authorize for hosting phone number capabilities on Twilio's platform.
+ * Email recipients who will be informed when an Authorization Document has been sent and signed.
*
- * @param string $hostedNumberOrderSids A list of HostedNumberOrder sids.
+ * @param string[] $ccEmails Email recipients who will be informed when an Authorization Document has been sent and signed.
* @return $this Fluent Builder
*/
- public function setHostedNumberOrderSids($hostedNumberOrderSids)
+ public function setCcEmails(array $ccEmails): self
{
- $this->options['hostedNumberOrderSids'] = $hostedNumberOrderSids;
+ $this->options['ccEmails'] = $ccEmails;
return $this;
}
/**
- * A 34 character string that uniquely identifies the Address resource that is associated with this AuthorizationDocument.
+ * Provide a friendly representation
*
- * @param string $addressSid Address sid.
- * @return $this Fluent Builder
+ * @return string Machine friendly representation
*/
- public function setAddressSid($addressSid)
+ public function __toString(): string
{
- $this->options['addressSid'] = $addressSid;
- return $this;
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Preview.HostedNumbers.CreateAuthorizationDocumentOptions ' . $options . ']';
}
+}
+
+class ReadAuthorizationDocumentOptions extends Options
+ {
/**
- * Email that this AuthorizationDocument will be sent to for signing.
- *
- * @param string $email Email.
- * @return $this Fluent Builder
+ * @param string $email Email that this AuthorizationDocument will be sent to for signing.
+ * @param string $status Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/phone-numbers/hosted-numbers/hosted-numbers-api/authorization-document-resource#status-values) for more information on each of these statuses.
*/
- public function setEmail($email)
- {
+ public function __construct(
+
+ string $email = Values::NONE,
+ string $status = Values::NONE
+
+ ) {
$this->options['email'] = $email;
- return $this;
+ $this->options['status'] = $status;
}
/**
- * Email recipients who will be informed when an Authorization Document has been sent and signed
+ * Email that this AuthorizationDocument will be sent to for signing.
*
- * @param string $ccEmails A list of emails.
+ * @param string $email Email that this AuthorizationDocument will be sent to for signing.
* @return $this Fluent Builder
*/
- public function setCcEmails($ccEmails)
+ public function setEmail(string $email): self
{
- $this->options['ccEmails'] = $ccEmails;
+ $this->options['email'] = $email;
return $this;
}
/**
- * Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values) for more information on each of these statuses.
+ * Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/phone-numbers/hosted-numbers/hosted-numbers-api/authorization-document-resource#status-values) for more information on each of these statuses.
*
- * @param string $status The Status of this AuthorizationDocument.
+ * @param string $status Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/phone-numbers/hosted-numbers/hosted-numbers-api/authorization-document-resource#status-values) for more information on each of these statuses.
* @return $this Fluent Builder
*/
- public function setStatus($status)
+ public function setStatus(string $status): self
{
$this->options['status'] = $status;
return $this;
}
/**
- * The title of the person authorized to sign the Authorization Document for this phone number.
+ * Provide a friendly representation
*
- * @param string $contactTitle Title of signee of this Authorization Document.
- * @return $this Fluent Builder
+ * @return string Machine friendly representation
*/
- public function setContactTitle($contactTitle)
+ public function __toString(): string
{
- $this->options['contactTitle'] = $contactTitle;
- return $this;
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Preview.HostedNumbers.ReadAuthorizationDocumentOptions ' . $options . ']';
}
+}
+class UpdateAuthorizationDocumentOptions extends Options
+ {
/**
- * The contact phone number of the person authorized to sign the Authorization Document.
- *
- * @param string $contactPhoneNumber Authorization Document's signee's phone
- * number.
- * @return $this Fluent Builder
+ * @param string[] $hostedNumberOrderSids A list of HostedNumberOrder sids that this AuthorizationDocument will authorize for hosting phone number capabilities on Twilio's platform.
+ * @param string $addressSid A 34 character string that uniquely identifies the Address resource that is associated with this AuthorizationDocument.
+ * @param string $email Email that this AuthorizationDocument will be sent to for signing.
+ * @param string[] $ccEmails Email recipients who will be informed when an Authorization Document has been sent and signed
+ * @param string $status
+ * @param string $contactTitle The title of the person authorized to sign the Authorization Document for this phone number.
+ * @param string $contactPhoneNumber The contact phone number of the person authorized to sign the Authorization Document.
*/
- public function setContactPhoneNumber($contactPhoneNumber)
- {
+ public function __construct(
+
+ array $hostedNumberOrderSids = Values::ARRAY_NONE,
+ string $addressSid = Values::NONE,
+ string $email = Values::NONE,
+ array $ccEmails = Values::ARRAY_NONE,
+ string $status = Values::NONE,
+ string $contactTitle = Values::NONE,
+ string $contactPhoneNumber = Values::NONE
+
+ ) {
+ $this->options['hostedNumberOrderSids'] = $hostedNumberOrderSids;
+ $this->options['addressSid'] = $addressSid;
+ $this->options['email'] = $email;
+ $this->options['ccEmails'] = $ccEmails;
+ $this->options['status'] = $status;
+ $this->options['contactTitle'] = $contactTitle;
$this->options['contactPhoneNumber'] = $contactPhoneNumber;
- return $this;
}
/**
- * Provide a friendly representation
+ * A list of HostedNumberOrder sids that this AuthorizationDocument will authorize for hosting phone number capabilities on Twilio's platform.
*
- * @return string Machine friendly representation
+ * @param string[] $hostedNumberOrderSids A list of HostedNumberOrder sids that this AuthorizationDocument will authorize for hosting phone number capabilities on Twilio's platform.
+ * @return $this Fluent Builder
*/
- public function __toString()
+ public function setHostedNumberOrderSids(array $hostedNumberOrderSids): self
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.HostedNumbers.UpdateAuthorizationDocumentOptions ' . \implode(' ', $options) . ']';
+ $this->options['hostedNumberOrderSids'] = $hostedNumberOrderSids;
+ return $this;
}
-}
-class ReadAuthorizationDocumentOptions extends Options
-{
/**
- * @param string $email Email.
- * @param string $status The Status of this AuthorizationDocument.
+ * A 34 character string that uniquely identifies the Address resource that is associated with this AuthorizationDocument.
+ *
+ * @param string $addressSid A 34 character string that uniquely identifies the Address resource that is associated with this AuthorizationDocument.
+ * @return $this Fluent Builder
*/
- public function __construct($email = Values::NONE, $status = Values::NONE)
+ public function setAddressSid(string $addressSid): self
{
- $this->options['email'] = $email;
- $this->options['status'] = $status;
+ $this->options['addressSid'] = $addressSid;
+ return $this;
}
/**
* Email that this AuthorizationDocument will be sent to for signing.
*
- * @param string $email Email.
+ * @param string $email Email that this AuthorizationDocument will be sent to for signing.
* @return $this Fluent Builder
*/
- public function setEmail($email)
+ public function setEmail(string $email): self
{
$this->options['email'] = $email;
return $this;
}
/**
- * Status of an instance resource. It can hold one of the values: 1. opened 2. signing, 3. signed LOA, 4. canceled, 5. failed. See the section entitled [Status Values](https://www.twilio.com/docs/api/phone-numbers/hosted-number-authorization-documents#status-values) for more information on each of these statuses.
+ * Email recipients who will be informed when an Authorization Document has been sent and signed
*
- * @param string $status The Status of this AuthorizationDocument.
+ * @param string[] $ccEmails Email recipients who will be informed when an Authorization Document has been sent and signed
* @return $this Fluent Builder
*/
- public function setStatus($status)
+ public function setCcEmails(array $ccEmails): self
{
- $this->options['status'] = $status;
+ $this->options['ccEmails'] = $ccEmails;
return $this;
}
/**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
+ * @param string $status
+ * @return $this Fluent Builder
*/
- public function __toString()
+ public function setStatus(string $status): self
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.HostedNumbers.ReadAuthorizationDocumentOptions ' . \implode(' ', $options) . ']';
+ $this->options['status'] = $status;
+ return $this;
}
-}
-class CreateAuthorizationDocumentOptions extends Options
-{
/**
- * @param string $ccEmails A list of emails.
+ * The title of the person authorized to sign the Authorization Document for this phone number.
+ *
+ * @param string $contactTitle The title of the person authorized to sign the Authorization Document for this phone number.
+ * @return $this Fluent Builder
*/
- public function __construct($ccEmails = Values::NONE)
+ public function setContactTitle(string $contactTitle): self
{
- $this->options['ccEmails'] = $ccEmails;
+ $this->options['contactTitle'] = $contactTitle;
+ return $this;
}
/**
- * Email recipients who will be informed when an Authorization Document has been sent and signed.
+ * The contact phone number of the person authorized to sign the Authorization Document.
*
- * @param string $ccEmails A list of emails.
+ * @param string $contactPhoneNumber The contact phone number of the person authorized to sign the Authorization Document.
* @return $this Fluent Builder
*/
- public function setCcEmails($ccEmails)
+ public function setContactPhoneNumber(string $contactPhoneNumber): self
{
- $this->options['ccEmails'] = $ccEmails;
+ $this->options['contactPhoneNumber'] = $contactPhoneNumber;
return $this;
}
@@ -258,14 +297,10 @@ public function setCcEmails($ccEmails)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.HostedNumbers.CreateAuthorizationDocumentOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Preview.HostedNumbers.UpdateAuthorizationDocumentOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocumentPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocumentPage.php
index 80b7f99..db90282 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocumentPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/AuthorizationDocumentPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return AuthorizationDocumentInstance \Twilio\Rest\Preview\HostedNumbers\AuthorizationDocumentInstance
+ */
+ public function buildInstance(array $payload): AuthorizationDocumentInstance
{
return new AuthorizationDocumentInstance($this->version, $payload);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.HostedNumbers.AuthorizationDocumentPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderContext.php
index d813734..6e87055 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderContext.php
@@ -2,72 +2,87 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Preview\HostedNumbers;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
class HostedNumberOrderContext extends InstanceContext
-{
+ {
/**
* Initialize the HostedNumberOrderContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid HostedNumberOrder sid.
- * @return \Twilio\Rest\Preview\HostedNumbers\HostedNumberOrderContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid A 34 character string that uniquely identifies this HostedNumberOrder.
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/HostedNumberOrders/' . \rawurlencode($sid) . '';
+ $this->uri = '/HostedNumberOrders/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a HostedNumberOrderInstance
+ * Delete the HostedNumberOrderInstance
*
- * @return HostedNumberOrderInstance Fetched HostedNumberOrderInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
- return new HostedNumberOrderInstance($this->version, $payload, $this->solution['sid']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Deletes the HostedNumberOrderInstance
+ * Fetch the HostedNumberOrderInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return HostedNumberOrderInstance Fetched HostedNumberOrderInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): HostedNumberOrderInstance
{
- return $this->version->delete('delete', $this->uri);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
+
+ return new HostedNumberOrderInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Update the HostedNumberOrderInstance
*
@@ -75,46 +90,56 @@ public function delete()
* @return HostedNumberOrderInstance Updated HostedNumberOrderInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): HostedNumberOrderInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'UniqueName' => $options['uniqueName'],
- 'Email' => $options['email'],
- 'CcEmails' => Serialize::map($options['ccEmails'], function ($e) {
- return $e;
- }),
- 'Status' => $options['status'],
- 'VerificationCode' => $options['verificationCode'],
- 'VerificationType' => $options['verificationType'],
- 'VerificationDocumentSid' => $options['verificationDocumentSid'],
- 'Extension' => $options['extension'],
- 'CallDelay' => $options['callDelay'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'UniqueName' =>
+ $options['uniqueName'],
+ 'Email' =>
+ $options['email'],
+ 'CcEmails' =>
+ Serialize::map($options['ccEmails'], function ($e) { return $e; }),
+ 'Status' =>
+ $options['status'],
+ 'VerificationCode' =>
+ $options['verificationCode'],
+ 'VerificationType' =>
+ $options['verificationType'],
+ 'VerificationDocumentSid' =>
+ $options['verificationDocumentSid'],
+ 'Extension' =>
+ $options['extension'],
+ 'CallDelay' =>
+ $options['callDelay'],
+ ]);
- return new HostedNumberOrderInstance($this->version, $payload, $this->solution['sid']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
+
+ return new HostedNumberOrderInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Preview.HostedNumbers.HostedNumberOrderContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderInstance.php
index 1b4319e..bf5a021 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderInstance.php
@@ -2,70 +2,77 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Preview\HostedNumbers;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Base\PhoneNumberCapabilities;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property string $sid
- * @property string $accountSid
- * @property string $incomingPhoneNumberSid
- * @property string $addressSid
- * @property string $signingDocumentSid
- * @property string $phoneNumber
- * @property string $capabilities
- * @property string $friendlyName
- * @property string $uniqueName
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $incomingPhoneNumberSid
+ * @property string|null $addressSid
+ * @property string|null $signingDocumentSid
+ * @property string|null $phoneNumber
+ * @property PhoneNumberCapabilities|null $capabilities
+ * @property string|null $friendlyName
+ * @property string|null $uniqueName
* @property string $status
- * @property string $failureReason
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
+ * @property string|null $failureReason
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
* @property int $verificationAttempts
- * @property string $email
- * @property string $ccEmails
- * @property string $url
+ * @property string|null $email
+ * @property string[]|null $ccEmails
+ * @property string|null $url
* @property string $verificationType
- * @property string $verificationDocumentSid
- * @property string $extension
+ * @property string|null $verificationDocumentSid
+ * @property string|null $extension
* @property int $callDelay
- * @property string $verificationCode
- * @property string $verificationCallSids
+ * @property string|null $verificationCode
+ * @property string[]|null $verificationCallSids
*/
class HostedNumberOrderInstance extends InstanceResource
{
/**
* Initialize the HostedNumberOrderInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid HostedNumberOrder sid.
- * @return \Twilio\Rest\Preview\HostedNumbers\HostedNumberOrderInstance
+ * @param string $sid A 34 character string that uniquely identifies this HostedNumberOrder.
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'incomingPhoneNumberSid' => Values::array_get($payload, 'incoming_phone_number_sid'),
'addressSid' => Values::array_get($payload, 'address_sid'),
'signingDocumentSid' => Values::array_get($payload, 'signing_document_sid'),
'phoneNumber' => Values::array_get($payload, 'phone_number'),
- 'capabilities' => Values::array_get($payload, 'capabilities'),
+ 'capabilities' => Deserialize::phoneNumberCapabilities(Values::array_get($payload, 'capabilities')),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
'uniqueName' => Values::array_get($payload, 'unique_name'),
'status' => Values::array_get($payload, 'status'),
@@ -82,48 +89,51 @@ public function __construct(Version $version, array $payload, $sid = null)
'callDelay' => Values::array_get($payload, 'call_delay'),
'verificationCode' => Values::array_get($payload, 'verification_code'),
'verificationCallSids' => Values::array_get($payload, 'verification_call_sids'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Preview\HostedNumbers\HostedNumberOrderContext Context
- * for this
- * HostedNumberOrderInstance
+ * @return HostedNumberOrderContext Context for this HostedNumberOrderInstance
*/
- protected function proxy()
+ protected function proxy(): HostedNumberOrderContext
{
if (!$this->context) {
- $this->context = new HostedNumberOrderContext($this->version, $this->solution['sid']);
+ $this->context = new HostedNumberOrderContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a HostedNumberOrderInstance
+ * Delete the HostedNumberOrderInstance
*
- * @return HostedNumberOrderInstance Fetched HostedNumberOrderInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the HostedNumberOrderInstance
+ * Fetch the HostedNumberOrderInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return HostedNumberOrderInstance Fetched HostedNumberOrderInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): HostedNumberOrderInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -133,8 +143,9 @@ public function delete()
* @return HostedNumberOrderInstance Updated HostedNumberOrderInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): HostedNumberOrderInstance
{
+
return $this->proxy()->update($options);
}
@@ -145,7 +156,7 @@ public function update($options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -164,12 +175,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Preview.HostedNumbers.HostedNumberOrderInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderList.php
index 0d1d7b2..39d5142 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Preview\HostedNumbers;
@@ -12,59 +19,92 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
class HostedNumberOrderList extends ListResource
-{
+ {
/**
* Construct the HostedNumberOrderList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Preview\HostedNumbers\HostedNumberOrderList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/HostedNumberOrders';
}
/**
- * Streams HostedNumberOrderInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the HostedNumberOrderInstance
*
+ * @param string $phoneNumber The number to host in [+E.164](https://en.wikipedia.org/wiki/E.164) format
+ * @param bool $smsCapability Used to specify that the SMS capability will be hosted on Twilio's platform.
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return HostedNumberOrderInstance Created HostedNumberOrderInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function create(string $phoneNumber, bool $smsCapability, array $options = []): HostedNumberOrderInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($options, $limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'PhoneNumber' =>
+ $phoneNumber,
+ 'SmsCapability' =>
+ Serialize::booleanToString($smsCapability),
+ 'AccountSid' =>
+ $options['accountSid'],
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'UniqueName' =>
+ $options['uniqueName'],
+ 'CcEmails' =>
+ Serialize::map($options['ccEmails'], function ($e) { return $e; }),
+ 'SmsUrl' =>
+ $options['smsUrl'],
+ 'SmsMethod' =>
+ $options['smsMethod'],
+ 'SmsFallbackUrl' =>
+ $options['smsFallbackUrl'],
+ 'SmsFallbackMethod' =>
+ $options['smsFallbackMethod'],
+ 'StatusCallbackUrl' =>
+ $options['statusCallbackUrl'],
+ 'StatusCallbackMethod' =>
+ $options['statusCallbackMethod'],
+ 'SmsApplicationSid' =>
+ $options['smsApplicationSid'],
+ 'AddressSid' =>
+ $options['addressSid'],
+ 'Email' =>
+ $options['email'],
+ 'VerificationType' =>
+ $options['verificationType'],
+ 'VerificationDocumentSid' =>
+ $options['verificationDocumentSid'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new HostedNumberOrderInstance(
+ $this->version,
+ $payload
+ );
}
+
/**
* Reads HostedNumberOrderInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -81,40 +121,74 @@ public function stream($options = array(), $limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return HostedNumberOrderInstance[] Array of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
+ /**
+ * Streams HostedNumberOrderInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of HostedNumberOrderInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of HostedNumberOrderInstance
+ * @return HostedNumberOrderPage Page of HostedNumberOrderInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): HostedNumberOrderPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Status' => $options['status'],
- 'PhoneNumber' => $options['phoneNumber'],
- 'IncomingPhoneNumberSid' => $options['incomingPhoneNumberSid'],
- 'FriendlyName' => $options['friendlyName'],
- 'UniqueName' => $options['uniqueName'],
+
+ $params = Values::of([
+ 'Status' =>
+ $options['status'],
+ 'PhoneNumber' =>
+ $options['phoneNumber'],
+ 'IncomingPhoneNumberSid' =>
+ $options['incomingPhoneNumberSid'],
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'UniqueName' =>
+ $options['uniqueName'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new HostedNumberOrderPage($this->version, $response, $this->solution);
}
@@ -124,9 +198,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of HostedNumberOrderInstance
+ * @return HostedNumberOrderPage Page of HostedNumberOrderInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): HostedNumberOrderPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -136,60 +210,21 @@ public function getPage($targetUrl)
return new HostedNumberOrderPage($this->version, $response, $this->solution);
}
- /**
- * Create a new HostedNumberOrderInstance
- *
- * @param string $phoneNumber An E164 formatted phone number.
- * @param bool $smsCapability Specify SMS capability to host.
- * @param array|Options $options Optional Arguments
- * @return HostedNumberOrderInstance Newly created HostedNumberOrderInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($phoneNumber, $smsCapability, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'PhoneNumber' => $phoneNumber,
- 'SmsCapability' => Serialize::booleanToString($smsCapability),
- 'AccountSid' => $options['accountSid'],
- 'FriendlyName' => $options['friendlyName'],
- 'UniqueName' => $options['uniqueName'],
- 'CcEmails' => Serialize::map($options['ccEmails'], function ($e) {
- return $e;
- }),
- 'SmsUrl' => $options['smsUrl'],
- 'SmsMethod' => $options['smsMethod'],
- 'SmsFallbackUrl' => $options['smsFallbackUrl'],
- 'SmsFallbackMethod' => $options['smsFallbackMethod'],
- 'StatusCallbackUrl' => $options['statusCallbackUrl'],
- 'StatusCallbackMethod' => $options['statusCallbackMethod'],
- 'SmsApplicationSid' => $options['smsApplicationSid'],
- 'AddressSid' => $options['addressSid'],
- 'Email' => $options['email'],
- 'VerificationType' => $options['verificationType'],
- 'VerificationDocumentSid' => $options['verificationDocumentSid'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new HostedNumberOrderInstance($this->version, $payload);
- }
/**
* Constructs a HostedNumberOrderContext
*
- * @param string $sid HostedNumberOrder sid.
- * @return \Twilio\Rest\Preview\HostedNumbers\HostedNumberOrderContext
+ * @param string $sid A 34 character string that uniquely identifies this HostedNumberOrder.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): HostedNumberOrderContext
{
- return new HostedNumberOrderContext($this->version, $sid);
+ return new HostedNumberOrderContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -197,8 +232,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.HostedNumbers.HostedNumberOrderList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderOptions.php
index 7a18de0..7a93c1f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderOptions.php
@@ -1,10 +1,16 @@
options['accountSid'] = $accountSid;
+ $this->options['friendlyName'] = $friendlyName;
+ $this->options['uniqueName'] = $uniqueName;
+ $this->options['ccEmails'] = $ccEmails;
+ $this->options['smsUrl'] = $smsUrl;
+ $this->options['smsMethod'] = $smsMethod;
+ $this->options['smsFallbackUrl'] = $smsFallbackUrl;
+ $this->options['smsFallbackMethod'] = $smsFallbackMethod;
+ $this->options['statusCallbackUrl'] = $statusCallbackUrl;
+ $this->options['statusCallbackMethod'] = $statusCallbackMethod;
+ $this->options['smsApplicationSid'] = $smsApplicationSid;
+ $this->options['addressSid'] = $addressSid;
+ $this->options['email'] = $email;
+ $this->options['verificationType'] = $verificationType;
+ $this->options['verificationDocumentSid'] = $verificationDocumentSid;
}
/**
- * @param string $status The Status of this HostedNumberOrder.
- * @param string $phoneNumber An E164 formatted phone number.
- * @param string $incomingPhoneNumberSid IncomingPhoneNumber sid.
- * @param string $friendlyName A human readable description of this resource.
- * @param string $uniqueName A unique, developer assigned name of this
- * HostedNumberOrder.
- * @return ReadHostedNumberOrderOptions Options builder
+ * This defaults to the AccountSid of the authorization the user is using. This can be provided to specify a subaccount to add the HostedNumberOrder to.
+ *
+ * @param string $accountSid This defaults to the AccountSid of the authorization the user is using. This can be provided to specify a subaccount to add the HostedNumberOrder to.
+ * @return $this Fluent Builder
*/
- public static function read($status = Values::NONE, $phoneNumber = Values::NONE, $incomingPhoneNumberSid = Values::NONE, $friendlyName = Values::NONE, $uniqueName = Values::NONE)
+ public function setAccountSid(string $accountSid): self
{
- return new ReadHostedNumberOrderOptions($status, $phoneNumber, $incomingPhoneNumberSid, $friendlyName, $uniqueName);
+ $this->options['accountSid'] = $accountSid;
+ return $this;
}
/**
- * @param string $accountSid Account Sid.
- * @param string $friendlyName A human readable description of this resource.
- * @param string $uniqueName A unique, developer assigned name of this
- * HostedNumberOrder.
- * @param string $ccEmails A list of emails.
- * @param string $smsUrl SMS URL.
- * @param string $smsMethod SMS Method.
- * @param string $smsFallbackUrl SMS Fallback URL.
- * @param string $smsFallbackMethod SMS Fallback Method.
- * @param string $statusCallbackUrl Status Callback URL.
- * @param string $statusCallbackMethod Status Callback Method.
- * @param string $smsApplicationSid SMS Application Sid.
- * @param string $addressSid Address sid.
- * @param string $email Email.
- * @param string $verificationType Verification Type.
- * @param string $verificationDocumentSid Verification Document Sid
- * @return CreateHostedNumberOrderOptions Options builder
+ * A 64 character string that is a human readable text that describes this resource.
+ *
+ * @param string $friendlyName A 64 character string that is a human readable text that describes this resource.
+ * @return $this Fluent Builder
*/
- public static function create($accountSid = Values::NONE, $friendlyName = Values::NONE, $uniqueName = Values::NONE, $ccEmails = Values::NONE, $smsUrl = Values::NONE, $smsMethod = Values::NONE, $smsFallbackUrl = Values::NONE, $smsFallbackMethod = Values::NONE, $statusCallbackUrl = Values::NONE, $statusCallbackMethod = Values::NONE, $smsApplicationSid = Values::NONE, $addressSid = Values::NONE, $email = Values::NONE, $verificationType = Values::NONE, $verificationDocumentSid = Values::NONE)
+ public function setFriendlyName(string $friendlyName): self
{
- return new CreateHostedNumberOrderOptions($accountSid, $friendlyName, $uniqueName, $ccEmails, $smsUrl, $smsMethod, $smsFallbackUrl, $smsFallbackMethod, $statusCallbackUrl, $statusCallbackMethod, $smsApplicationSid, $addressSid, $email, $verificationType, $verificationDocumentSid);
+ $this->options['friendlyName'] = $friendlyName;
+ return $this;
}
-}
-class UpdateHostedNumberOrderOptions extends Options
-{
/**
- * @param string $friendlyName A human readable description of this resource.
- * @param string $uniqueName A unique, developer assigned name of this
- * HostedNumberOrder.
- * @param string $email Email.
- * @param string $ccEmails A list of emails.
- * @param string $status The Status of this HostedNumberOrder.
- * @param string $verificationCode A verification code.
- * @param string $verificationType Verification Type.
- * @param string $verificationDocumentSid Verification Document Sid
- * @param string $extension Digits to dial after connecting the verification
- * call.
- * @param int $callDelay The number of seconds, between 0 and 60, to delay
- * before initiating the verification call.
- */
- public function __construct($friendlyName = Values::NONE, $uniqueName = Values::NONE, $email = Values::NONE, $ccEmails = Values::NONE, $status = Values::NONE, $verificationCode = Values::NONE, $verificationType = Values::NONE, $verificationDocumentSid = Values::NONE, $extension = Values::NONE, $callDelay = Values::NONE)
+ * Optional. Provides a unique and addressable name to be assigned to this HostedNumberOrder, assigned by the developer, to be optionally used in addition to SID.
+ *
+ * @param string $uniqueName Optional. Provides a unique and addressable name to be assigned to this HostedNumberOrder, assigned by the developer, to be optionally used in addition to SID.
+ * @return $this Fluent Builder
+ */
+ public function setUniqueName(string $uniqueName): self
{
- $this->options['friendlyName'] = $friendlyName;
$this->options['uniqueName'] = $uniqueName;
- $this->options['email'] = $email;
+ return $this;
+ }
+
+ /**
+ * Optional. A list of emails that the LOA document for this HostedNumberOrder will be carbon copied to.
+ *
+ * @param string[] $ccEmails Optional. A list of emails that the LOA document for this HostedNumberOrder will be carbon copied to.
+ * @return $this Fluent Builder
+ */
+ public function setCcEmails(array $ccEmails): self
+ {
$this->options['ccEmails'] = $ccEmails;
- $this->options['status'] = $status;
- $this->options['verificationCode'] = $verificationCode;
- $this->options['verificationType'] = $verificationType;
- $this->options['verificationDocumentSid'] = $verificationDocumentSid;
- $this->options['extension'] = $extension;
- $this->options['callDelay'] = $callDelay;
+ return $this;
}
/**
- * A 64 character string that is a human readable text that describes this resource.
+ * The URL that Twilio should request when somebody sends an SMS to the phone number. This will be copied onto the IncomingPhoneNumber resource.
*
- * @param string $friendlyName A human readable description of this resource.
+ * @param string $smsUrl The URL that Twilio should request when somebody sends an SMS to the phone number. This will be copied onto the IncomingPhoneNumber resource.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setSmsUrl(string $smsUrl): self
{
- $this->options['friendlyName'] = $friendlyName;
+ $this->options['smsUrl'] = $smsUrl;
return $this;
}
/**
- * Provides a unique and addressable name to be assigned to this HostedNumberOrder, assigned by the developer, to be optionally used in addition to SID.
+ * The HTTP method that should be used to request the SmsUrl. Must be either `GET` or `POST`. This will be copied onto the IncomingPhoneNumber resource.
*
- * @param string $uniqueName A unique, developer assigned name of this
- * HostedNumberOrder.
+ * @param string $smsMethod The HTTP method that should be used to request the SmsUrl. Must be either `GET` or `POST`. This will be copied onto the IncomingPhoneNumber resource.
* @return $this Fluent Builder
*/
- public function setUniqueName($uniqueName)
+ public function setSmsMethod(string $smsMethod): self
{
- $this->options['uniqueName'] = $uniqueName;
+ $this->options['smsMethod'] = $smsMethod;
return $this;
}
/**
- * Email of the owner of this phone number that is being hosted.
+ * A URL that Twilio will request if an error occurs requesting or executing the TwiML defined by SmsUrl. This will be copied onto the IncomingPhoneNumber resource.
*
- * @param string $email Email.
+ * @param string $smsFallbackUrl A URL that Twilio will request if an error occurs requesting or executing the TwiML defined by SmsUrl. This will be copied onto the IncomingPhoneNumber resource.
* @return $this Fluent Builder
*/
- public function setEmail($email)
+ public function setSmsFallbackUrl(string $smsFallbackUrl): self
{
- $this->options['email'] = $email;
+ $this->options['smsFallbackUrl'] = $smsFallbackUrl;
return $this;
}
/**
- * Optional. A list of emails that LOA document for this HostedNumberOrder will be carbon copied to.
+ * The HTTP method that should be used to request the SmsFallbackUrl. Must be either `GET` or `POST`. This will be copied onto the IncomingPhoneNumber resource.
*
- * @param string $ccEmails A list of emails.
+ * @param string $smsFallbackMethod The HTTP method that should be used to request the SmsFallbackUrl. Must be either `GET` or `POST`. This will be copied onto the IncomingPhoneNumber resource.
* @return $this Fluent Builder
*/
- public function setCcEmails($ccEmails)
+ public function setSmsFallbackMethod(string $smsFallbackMethod): self
{
- $this->options['ccEmails'] = $ccEmails;
+ $this->options['smsFallbackMethod'] = $smsFallbackMethod;
return $this;
}
/**
- * User can only post to `pending-verification` status to transition the HostedNumberOrder to initiate a verification call or verification of ownership with a copy of a phone bill.
+ * Optional. The Status Callback URL attached to the IncomingPhoneNumber resource.
*
- * @param string $status The Status of this HostedNumberOrder.
+ * @param string $statusCallbackUrl Optional. The Status Callback URL attached to the IncomingPhoneNumber resource.
* @return $this Fluent Builder
*/
- public function setStatus($status)
+ public function setStatusCallbackUrl(string $statusCallbackUrl): self
{
- $this->options['status'] = $status;
+ $this->options['statusCallbackUrl'] = $statusCallbackUrl;
return $this;
}
/**
- * A verification code that is given to the user via a phone call to the phone number that is being hosted.
+ * Optional. The Status Callback Method attached to the IncomingPhoneNumber resource.
*
- * @param string $verificationCode A verification code.
+ * @param string $statusCallbackMethod Optional. The Status Callback Method attached to the IncomingPhoneNumber resource.
* @return $this Fluent Builder
*/
- public function setVerificationCode($verificationCode)
+ public function setStatusCallbackMethod(string $statusCallbackMethod): self
{
- $this->options['verificationCode'] = $verificationCode;
+ $this->options['statusCallbackMethod'] = $statusCallbackMethod;
return $this;
}
/**
- * Optional. The method used for verifying ownership of the number to be hosted. One of phone-call (default) or phone-bill.
+ * Optional. The 34 character sid of the application Twilio should use to handle SMS messages sent to this number. If a `SmsApplicationSid` is present, Twilio will ignore all of the SMS urls above and use those set on the application.
*
- * @param string $verificationType Verification Type.
+ * @param string $smsApplicationSid Optional. The 34 character sid of the application Twilio should use to handle SMS messages sent to this number. If a `SmsApplicationSid` is present, Twilio will ignore all of the SMS urls above and use those set on the application.
* @return $this Fluent Builder
*/
- public function setVerificationType($verificationType)
+ public function setSmsApplicationSid(string $smsApplicationSid): self
{
- $this->options['verificationType'] = $verificationType;
+ $this->options['smsApplicationSid'] = $smsApplicationSid;
return $this;
}
/**
- * Optional. The unique sid identifier of the Identity Document that represents the document for verifying ownership of the number to be hosted. Required when VerificationType is phone-bill.
+ * Optional. A 34 character string that uniquely identifies the Address resource that represents the address of the owner of this phone number.
*
- * @param string $verificationDocumentSid Verification Document Sid
+ * @param string $addressSid Optional. A 34 character string that uniquely identifies the Address resource that represents the address of the owner of this phone number.
* @return $this Fluent Builder
*/
- public function setVerificationDocumentSid($verificationDocumentSid)
+ public function setAddressSid(string $addressSid): self
{
- $this->options['verificationDocumentSid'] = $verificationDocumentSid;
+ $this->options['addressSid'] = $addressSid;
return $this;
}
/**
- * Digits to dial after connecting the verification call.
+ * Optional. Email of the owner of this phone number that is being hosted.
*
- * @param string $extension Digits to dial after connecting the verification
- * call.
+ * @param string $email Optional. Email of the owner of this phone number that is being hosted.
* @return $this Fluent Builder
*/
- public function setExtension($extension)
+ public function setEmail(string $email): self
{
- $this->options['extension'] = $extension;
+ $this->options['email'] = $email;
return $this;
}
/**
- * The number of seconds, between 0 and 60, to delay before initiating the verification call. Defaults to 0.
+ * @param string $verificationType
+ * @return $this Fluent Builder
+ */
+ public function setVerificationType(string $verificationType): self
+ {
+ $this->options['verificationType'] = $verificationType;
+ return $this;
+ }
+
+ /**
+ * Optional. The unique sid identifier of the Identity Document that represents the document for verifying ownership of the number to be hosted. Required when VerificationType is phone-bill.
*
- * @param int $callDelay The number of seconds, between 0 and 60, to delay
- * before initiating the verification call.
+ * @param string $verificationDocumentSid Optional. The unique sid identifier of the Identity Document that represents the document for verifying ownership of the number to be hosted. Required when VerificationType is phone-bill.
* @return $this Fluent Builder
*/
- public function setCallDelay($callDelay)
+ public function setVerificationDocumentSid(string $verificationDocumentSid): self
{
- $this->options['callDelay'] = $callDelay;
+ $this->options['verificationDocumentSid'] = $verificationDocumentSid;
return $this;
}
@@ -236,30 +388,33 @@ public function setCallDelay($callDelay)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.HostedNumbers.UpdateHostedNumberOrderOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Preview.HostedNumbers.CreateHostedNumberOrderOptions ' . $options . ']';
}
}
+
+
class ReadHostedNumberOrderOptions extends Options
-{
+ {
/**
- * @param string $status The Status of this HostedNumberOrder.
- * @param string $phoneNumber An E164 formatted phone number.
- * @param string $incomingPhoneNumberSid IncomingPhoneNumber sid.
- * @param string $friendlyName A human readable description of this resource.
- * @param string $uniqueName A unique, developer assigned name of this
- * HostedNumberOrder.
+ * @param string $status The Status of this HostedNumberOrder. One of `received`, `pending-verification`, `verified`, `pending-loa`, `carrier-processing`, `testing`, `completed`, `failed`, or `action-required`.
+ * @param string $phoneNumber An E164 formatted phone number hosted by this HostedNumberOrder.
+ * @param string $incomingPhoneNumberSid A 34 character string that uniquely identifies the IncomingPhoneNumber resource created by this HostedNumberOrder.
+ * @param string $friendlyName A human readable description of this resource, up to 64 characters.
+ * @param string $uniqueName Provides a unique and addressable name to be assigned to this HostedNumberOrder, assigned by the developer, to be optionally used in addition to SID.
*/
- public function __construct($status = Values::NONE, $phoneNumber = Values::NONE, $incomingPhoneNumberSid = Values::NONE, $friendlyName = Values::NONE, $uniqueName = Values::NONE)
- {
+ public function __construct(
+
+ string $status = Values::NONE,
+ string $phoneNumber = Values::NONE,
+ string $incomingPhoneNumberSid = Values::NONE,
+ string $friendlyName = Values::NONE,
+ string $uniqueName = Values::NONE
+
+ ) {
$this->options['status'] = $status;
$this->options['phoneNumber'] = $phoneNumber;
$this->options['incomingPhoneNumberSid'] = $incomingPhoneNumberSid;
@@ -270,10 +425,10 @@ public function __construct($status = Values::NONE, $phoneNumber = Values::NONE,
/**
* The Status of this HostedNumberOrder. One of `received`, `pending-verification`, `verified`, `pending-loa`, `carrier-processing`, `testing`, `completed`, `failed`, or `action-required`.
*
- * @param string $status The Status of this HostedNumberOrder.
+ * @param string $status The Status of this HostedNumberOrder. One of `received`, `pending-verification`, `verified`, `pending-loa`, `carrier-processing`, `testing`, `completed`, `failed`, or `action-required`.
* @return $this Fluent Builder
*/
- public function setStatus($status)
+ public function setStatus(string $status): self
{
$this->options['status'] = $status;
return $this;
@@ -282,10 +437,10 @@ public function setStatus($status)
/**
* An E164 formatted phone number hosted by this HostedNumberOrder.
*
- * @param string $phoneNumber An E164 formatted phone number.
+ * @param string $phoneNumber An E164 formatted phone number hosted by this HostedNumberOrder.
* @return $this Fluent Builder
*/
- public function setPhoneNumber($phoneNumber)
+ public function setPhoneNumber(string $phoneNumber): self
{
$this->options['phoneNumber'] = $phoneNumber;
return $this;
@@ -294,10 +449,10 @@ public function setPhoneNumber($phoneNumber)
/**
* A 34 character string that uniquely identifies the IncomingPhoneNumber resource created by this HostedNumberOrder.
*
- * @param string $incomingPhoneNumberSid IncomingPhoneNumber sid.
+ * @param string $incomingPhoneNumberSid A 34 character string that uniquely identifies the IncomingPhoneNumber resource created by this HostedNumberOrder.
* @return $this Fluent Builder
*/
- public function setIncomingPhoneNumberSid($incomingPhoneNumberSid)
+ public function setIncomingPhoneNumberSid(string $incomingPhoneNumberSid): self
{
$this->options['incomingPhoneNumberSid'] = $incomingPhoneNumberSid;
return $this;
@@ -306,10 +461,10 @@ public function setIncomingPhoneNumberSid($incomingPhoneNumberSid)
/**
* A human readable description of this resource, up to 64 characters.
*
- * @param string $friendlyName A human readable description of this resource.
+ * @param string $friendlyName A human readable description of this resource, up to 64 characters.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -318,11 +473,10 @@ public function setFriendlyName($friendlyName)
/**
* Provides a unique and addressable name to be assigned to this HostedNumberOrder, assigned by the developer, to be optionally used in addition to SID.
*
- * @param string $uniqueName A unique, developer assigned name of this
- * HostedNumberOrder.
+ * @param string $uniqueName Provides a unique and addressable name to be assigned to this HostedNumberOrder, assigned by the developer, to be optionally used in addition to SID.
* @return $this Fluent Builder
*/
- public function setUniqueName($uniqueName)
+ public function setUniqueName(string $uniqueName): self
{
$this->options['uniqueName'] = $uniqueName;
return $this;
@@ -333,235 +487,166 @@ public function setUniqueName($uniqueName)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.HostedNumbers.ReadHostedNumberOrderOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Preview.HostedNumbers.ReadHostedNumberOrderOptions ' . $options . ']';
}
}
-class CreateHostedNumberOrderOptions extends Options
-{
- /**
- * @param string $accountSid Account Sid.
- * @param string $friendlyName A human readable description of this resource.
- * @param string $uniqueName A unique, developer assigned name of this
- * HostedNumberOrder.
- * @param string $ccEmails A list of emails.
- * @param string $smsUrl SMS URL.
- * @param string $smsMethod SMS Method.
- * @param string $smsFallbackUrl SMS Fallback URL.
- * @param string $smsFallbackMethod SMS Fallback Method.
- * @param string $statusCallbackUrl Status Callback URL.
- * @param string $statusCallbackMethod Status Callback Method.
- * @param string $smsApplicationSid SMS Application Sid.
- * @param string $addressSid Address sid.
- * @param string $email Email.
- * @param string $verificationType Verification Type.
- * @param string $verificationDocumentSid Verification Document Sid
- */
- public function __construct($accountSid = Values::NONE, $friendlyName = Values::NONE, $uniqueName = Values::NONE, $ccEmails = Values::NONE, $smsUrl = Values::NONE, $smsMethod = Values::NONE, $smsFallbackUrl = Values::NONE, $smsFallbackMethod = Values::NONE, $statusCallbackUrl = Values::NONE, $statusCallbackMethod = Values::NONE, $smsApplicationSid = Values::NONE, $addressSid = Values::NONE, $email = Values::NONE, $verificationType = Values::NONE, $verificationDocumentSid = Values::NONE)
+class UpdateHostedNumberOrderOptions extends Options
{
- $this->options['accountSid'] = $accountSid;
+ /**
+ * @param string $friendlyName A 64 character string that is a human readable text that describes this resource.
+ * @param string $uniqueName Provides a unique and addressable name to be assigned to this HostedNumberOrder, assigned by the developer, to be optionally used in addition to SID.
+ * @param string $email Email of the owner of this phone number that is being hosted.
+ * @param string[] $ccEmails Optional. A list of emails that LOA document for this HostedNumberOrder will be carbon copied to.
+ * @param string $status
+ * @param string $verificationCode A verification code that is given to the user via a phone call to the phone number that is being hosted.
+ * @param string $verificationType
+ * @param string $verificationDocumentSid Optional. The unique sid identifier of the Identity Document that represents the document for verifying ownership of the number to be hosted. Required when VerificationType is phone-bill.
+ * @param string $extension Digits to dial after connecting the verification call.
+ * @param int $callDelay The number of seconds, between 0 and 60, to delay before initiating the verification call. Defaults to 0.
+ */
+ public function __construct(
+
+ string $friendlyName = Values::NONE,
+ string $uniqueName = Values::NONE,
+ string $email = Values::NONE,
+ array $ccEmails = Values::ARRAY_NONE,
+ string $status = Values::NONE,
+ string $verificationCode = Values::NONE,
+ string $verificationType = Values::NONE,
+ string $verificationDocumentSid = Values::NONE,
+ string $extension = Values::NONE,
+ int $callDelay = Values::INT_NONE
+
+ ) {
$this->options['friendlyName'] = $friendlyName;
$this->options['uniqueName'] = $uniqueName;
- $this->options['ccEmails'] = $ccEmails;
- $this->options['smsUrl'] = $smsUrl;
- $this->options['smsMethod'] = $smsMethod;
- $this->options['smsFallbackUrl'] = $smsFallbackUrl;
- $this->options['smsFallbackMethod'] = $smsFallbackMethod;
- $this->options['statusCallbackUrl'] = $statusCallbackUrl;
- $this->options['statusCallbackMethod'] = $statusCallbackMethod;
- $this->options['smsApplicationSid'] = $smsApplicationSid;
- $this->options['addressSid'] = $addressSid;
$this->options['email'] = $email;
+ $this->options['ccEmails'] = $ccEmails;
+ $this->options['status'] = $status;
+ $this->options['verificationCode'] = $verificationCode;
$this->options['verificationType'] = $verificationType;
$this->options['verificationDocumentSid'] = $verificationDocumentSid;
- }
-
- /**
- * This defaults to the AccountSid of the authorization the user is using. This can be provided to specify a subaccount to add the HostedNumberOrder to.
- *
- * @param string $accountSid Account Sid.
- * @return $this Fluent Builder
- */
- public function setAccountSid($accountSid)
- {
- $this->options['accountSid'] = $accountSid;
- return $this;
+ $this->options['extension'] = $extension;
+ $this->options['callDelay'] = $callDelay;
}
/**
* A 64 character string that is a human readable text that describes this resource.
*
- * @param string $friendlyName A human readable description of this resource.
+ * @param string $friendlyName A 64 character string that is a human readable text that describes this resource.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
}
/**
- * Optional. Provides a unique and addressable name to be assigned to this HostedNumberOrder, assigned by the developer, to be optionally used in addition to SID.
+ * Provides a unique and addressable name to be assigned to this HostedNumberOrder, assigned by the developer, to be optionally used in addition to SID.
*
- * @param string $uniqueName A unique, developer assigned name of this
- * HostedNumberOrder.
+ * @param string $uniqueName Provides a unique and addressable name to be assigned to this HostedNumberOrder, assigned by the developer, to be optionally used in addition to SID.
* @return $this Fluent Builder
*/
- public function setUniqueName($uniqueName)
+ public function setUniqueName(string $uniqueName): self
{
$this->options['uniqueName'] = $uniqueName;
return $this;
}
/**
- * Optional. A list of emails that the LOA document for this HostedNumberOrder will be carbon copied to.
- *
- * @param string $ccEmails A list of emails.
- * @return $this Fluent Builder
- */
- public function setCcEmails($ccEmails)
- {
- $this->options['ccEmails'] = $ccEmails;
- return $this;
- }
-
- /**
- * The URL that Twilio should request when somebody sends an SMS to the phone number. This will be copied onto the IncomingPhoneNumber resource.
- *
- * @param string $smsUrl SMS URL.
- * @return $this Fluent Builder
- */
- public function setSmsUrl($smsUrl)
- {
- $this->options['smsUrl'] = $smsUrl;
- return $this;
- }
-
- /**
- * The HTTP method that should be used to request the SmsUrl. Must be either `GET` or `POST`. This will be copied onto the IncomingPhoneNumber resource.
- *
- * @param string $smsMethod SMS Method.
- * @return $this Fluent Builder
- */
- public function setSmsMethod($smsMethod)
- {
- $this->options['smsMethod'] = $smsMethod;
- return $this;
- }
-
- /**
- * A URL that Twilio will request if an error occurs requesting or executing the TwiML defined by SmsUrl. This will be copied onto the IncomingPhoneNumber resource.
- *
- * @param string $smsFallbackUrl SMS Fallback URL.
- * @return $this Fluent Builder
- */
- public function setSmsFallbackUrl($smsFallbackUrl)
- {
- $this->options['smsFallbackUrl'] = $smsFallbackUrl;
- return $this;
- }
-
- /**
- * The HTTP method that should be used to request the SmsFallbackUrl. Must be either `GET` or `POST`. This will be copied onto the IncomingPhoneNumber resource.
+ * Email of the owner of this phone number that is being hosted.
*
- * @param string $smsFallbackMethod SMS Fallback Method.
+ * @param string $email Email of the owner of this phone number that is being hosted.
* @return $this Fluent Builder
*/
- public function setSmsFallbackMethod($smsFallbackMethod)
+ public function setEmail(string $email): self
{
- $this->options['smsFallbackMethod'] = $smsFallbackMethod;
+ $this->options['email'] = $email;
return $this;
}
/**
- * Optional. The Status Callback URL attached to the IncomingPhoneNumber resource.
+ * Optional. A list of emails that LOA document for this HostedNumberOrder will be carbon copied to.
*
- * @param string $statusCallbackUrl Status Callback URL.
+ * @param string[] $ccEmails Optional. A list of emails that LOA document for this HostedNumberOrder will be carbon copied to.
* @return $this Fluent Builder
*/
- public function setStatusCallbackUrl($statusCallbackUrl)
+ public function setCcEmails(array $ccEmails): self
{
- $this->options['statusCallbackUrl'] = $statusCallbackUrl;
+ $this->options['ccEmails'] = $ccEmails;
return $this;
}
/**
- * Optional. The Status Callback Method attached to the IncomingPhoneNumber resource.
- *
- * @param string $statusCallbackMethod Status Callback Method.
+ * @param string $status
* @return $this Fluent Builder
*/
- public function setStatusCallbackMethod($statusCallbackMethod)
+ public function setStatus(string $status): self
{
- $this->options['statusCallbackMethod'] = $statusCallbackMethod;
+ $this->options['status'] = $status;
return $this;
}
/**
- * Optional. The 34 character sid of the application Twilio should use to handle SMS messages sent to this number. If a `SmsApplicationSid` is present, Twilio will ignore all of the SMS urls above and use those set on the application.
+ * A verification code that is given to the user via a phone call to the phone number that is being hosted.
*
- * @param string $smsApplicationSid SMS Application Sid.
+ * @param string $verificationCode A verification code that is given to the user via a phone call to the phone number that is being hosted.
* @return $this Fluent Builder
*/
- public function setSmsApplicationSid($smsApplicationSid)
+ public function setVerificationCode(string $verificationCode): self
{
- $this->options['smsApplicationSid'] = $smsApplicationSid;
+ $this->options['verificationCode'] = $verificationCode;
return $this;
}
/**
- * Optional. A 34 character string that uniquely identifies the Address resource that represents the address of the owner of this phone number.
- *
- * @param string $addressSid Address sid.
+ * @param string $verificationType
* @return $this Fluent Builder
*/
- public function setAddressSid($addressSid)
+ public function setVerificationType(string $verificationType): self
{
- $this->options['addressSid'] = $addressSid;
+ $this->options['verificationType'] = $verificationType;
return $this;
}
/**
- * Optional. Email of the owner of this phone number that is being hosted.
+ * Optional. The unique sid identifier of the Identity Document that represents the document for verifying ownership of the number to be hosted. Required when VerificationType is phone-bill.
*
- * @param string $email Email.
+ * @param string $verificationDocumentSid Optional. The unique sid identifier of the Identity Document that represents the document for verifying ownership of the number to be hosted. Required when VerificationType is phone-bill.
* @return $this Fluent Builder
*/
- public function setEmail($email)
+ public function setVerificationDocumentSid(string $verificationDocumentSid): self
{
- $this->options['email'] = $email;
+ $this->options['verificationDocumentSid'] = $verificationDocumentSid;
return $this;
}
/**
- * Optional. The method used for verifying ownership of the number to be hosted. One of phone-call (default) or phone-bill.
+ * Digits to dial after connecting the verification call.
*
- * @param string $verificationType Verification Type.
+ * @param string $extension Digits to dial after connecting the verification call.
* @return $this Fluent Builder
*/
- public function setVerificationType($verificationType)
+ public function setExtension(string $extension): self
{
- $this->options['verificationType'] = $verificationType;
+ $this->options['extension'] = $extension;
return $this;
}
/**
- * Optional. The unique sid identifier of the Identity Document that represents the document for verifying ownership of the number to be hosted. Required when VerificationType is phone-bill.
+ * The number of seconds, between 0 and 60, to delay before initiating the verification call. Defaults to 0.
*
- * @param string $verificationDocumentSid Verification Document Sid
+ * @param int $callDelay The number of seconds, between 0 and 60, to delay before initiating the verification call. Defaults to 0.
* @return $this Fluent Builder
*/
- public function setVerificationDocumentSid($verificationDocumentSid)
+ public function setCallDelay(int $callDelay): self
{
- $this->options['verificationDocumentSid'] = $verificationDocumentSid;
+ $this->options['callDelay'] = $callDelay;
return $this;
}
@@ -570,14 +655,10 @@ public function setVerificationDocumentSid($verificationDocumentSid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.HostedNumbers.CreateHostedNumberOrderOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Preview.HostedNumbers.UpdateHostedNumberOrderOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderPage.php
index 38e38b2..77de049 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return HostedNumberOrderInstance \Twilio\Rest\Preview\HostedNumbers\HostedNumberOrderInstance
+ */
+ public function buildInstance(array $payload): HostedNumberOrderInstance
{
return new HostedNumberOrderInstance($this->version, $payload);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.HostedNumbers.HostedNumberOrderPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace.php
index 3ae9af7..8c0775c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace.php
@@ -1,36 +1,42 @@
version = 'marketplace';
}
- /**
- * @return \Twilio\Rest\Preview\Marketplace\AvailableAddOnList
- */
- protected function getAvailableAddOns()
+ protected function getAvailableAddOns(): AvailableAddOnList
{
if (!$this->_availableAddOns) {
$this->_availableAddOns = new AvailableAddOnList($this);
@@ -49,10 +52,7 @@ protected function getAvailableAddOns()
return $this->_availableAddOns;
}
- /**
- * @return \Twilio\Rest\Preview\Marketplace\InstalledAddOnList
- */
- protected function getInstalledAddOns()
+ protected function getInstalledAddOns(): InstalledAddOnList
{
if (!$this->_installedAddOns) {
$this->_installedAddOns = new InstalledAddOnList($this);
@@ -67,7 +67,7 @@ protected function getInstalledAddOns()
* @return \Twilio\ListResource The requested resource
* @throws TwilioException For unknown resource
*/
- public function __get($name)
+ public function __get(string $name)
{
$method = 'get' . \ucfirst($name);
if (\method_exists($this, $method)) {
@@ -82,10 +82,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -100,8 +100,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.Marketplace]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionContext.php
index de0436d..bb9f50c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionContext.php
@@ -2,58 +2,67 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Preview\Marketplace\AvailableAddOn;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
class AvailableAddOnExtensionContext extends InstanceContext
-{
+ {
/**
* Initialize the AvailableAddOnExtensionContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $availableAddOnSid The SID of the AvailableAddOn resource with
- * the extension to fetch
- * @param string $sid The SID of the AvailableAddOn Extension resource to fetch
- * @return \Twilio\Rest\Preview\Marketplace\AvailableAddOn\AvailableAddOnExtensionContext
+ * @param Version $version Version that contains the resource
+ * @param string $availableAddOnSid The SID of the AvailableAddOn resource with the extension to fetch.
+ * @param string $sid The SID of the AvailableAddOn Extension resource to fetch.
*/
- public function __construct(Version $version, $availableAddOnSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $availableAddOnSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('availableAddOnSid' => $availableAddOnSid, 'sid' => $sid,);
+ $this->solution = [
+ 'availableAddOnSid' =>
+ $availableAddOnSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/AvailableAddOns/' . \rawurlencode($availableAddOnSid) . '/Extensions/' . \rawurlencode($sid) . '';
+ $this->uri = '/AvailableAddOns/' . \rawurlencode($availableAddOnSid)
+ .'/Extensions/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a AvailableAddOnExtensionInstance
+ * Fetch the AvailableAddOnExtensionInstance
*
- * @return AvailableAddOnExtensionInstance Fetched
- * AvailableAddOnExtensionInstance
+ * @return AvailableAddOnExtensionInstance Fetched AvailableAddOnExtensionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): AvailableAddOnExtensionInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new AvailableAddOnExtensionInstance(
$this->version,
@@ -63,17 +72,18 @@ public function fetch()
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Preview.Marketplace.AvailableAddOnExtensionContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionInstance.php
index ca66b40..a42cb30 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Preview\Marketplace\AvailableAddOn;
use Twilio\Exceptions\TwilioException;
@@ -14,56 +22,49 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property string $sid
- * @property string $availableAddOnSid
- * @property string $friendlyName
- * @property string $productName
- * @property string $uniqueName
- * @property string $url
+ * @property string|null $sid
+ * @property string|null $availableAddOnSid
+ * @property string|null $friendlyName
+ * @property string|null $productName
+ * @property string|null $uniqueName
+ * @property string|null $url
*/
class AvailableAddOnExtensionInstance extends InstanceResource
{
/**
* Initialize the AvailableAddOnExtensionInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $availableAddOnSid The SID of the AvailableAddOn resource to
- * which this extension applies
- * @param string $sid The SID of the AvailableAddOn Extension resource to fetch
- * @return \Twilio\Rest\Preview\Marketplace\AvailableAddOn\AvailableAddOnExtensionInstance
+ * @param string $availableAddOnSid The SID of the AvailableAddOn resource with the extension to fetch.
+ * @param string $sid The SID of the AvailableAddOn Extension resource to fetch.
*/
- public function __construct(Version $version, array $payload, $availableAddOnSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $availableAddOnSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'availableAddOnSid' => Values::array_get($payload, 'available_add_on_sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
'productName' => Values::array_get($payload, 'product_name'),
'uniqueName' => Values::array_get($payload, 'unique_name'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array(
- 'availableAddOnSid' => $availableAddOnSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['availableAddOnSid' => $availableAddOnSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Preview\Marketplace\AvailableAddOn\AvailableAddOnExtensionContext Context for this
- * AvailableAddOnExtensionInstance
+ * @return AvailableAddOnExtensionContext Context for this AvailableAddOnExtensionInstance
*/
- protected function proxy()
+ protected function proxy(): AvailableAddOnExtensionContext
{
if (!$this->context) {
$this->context = new AvailableAddOnExtensionContext(
@@ -77,14 +78,14 @@ protected function proxy()
}
/**
- * Fetch a AvailableAddOnExtensionInstance
+ * Fetch the AvailableAddOnExtensionInstance
*
- * @return AvailableAddOnExtensionInstance Fetched
- * AvailableAddOnExtensionInstance
+ * @return AvailableAddOnExtensionInstance Fetched AvailableAddOnExtensionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): AvailableAddOnExtensionInstance
{
+
return $this->proxy()->fetch();
}
@@ -95,7 +96,7 @@ public function fetch()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -114,12 +115,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Preview.Marketplace.AvailableAddOnExtensionInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionList.php
index 7242a59..dffe382 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionList.php
@@ -2,43 +2,73 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Preview\Marketplace\AvailableAddOn;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
+
class AvailableAddOnExtensionList extends ListResource
-{
+ {
/**
* Construct the AvailableAddOnExtensionList
*
* @param Version $version Version that contains the resource
- * @param string $availableAddOnSid The SID of the AvailableAddOn resource to
- * which this extension applies
- * @return \Twilio\Rest\Preview\Marketplace\AvailableAddOn\AvailableAddOnExtensionList
+ * @param string $availableAddOnSid The SID of the AvailableAddOn resource with the extension to fetch.
*/
- public function __construct(Version $version, $availableAddOnSid)
- {
+ public function __construct(
+ Version $version,
+ string $availableAddOnSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('availableAddOnSid' => $availableAddOnSid,);
+ $this->solution = [
+ 'availableAddOnSid' =>
+ $availableAddOnSid,
+
+ ];
+
+ $this->uri = '/AvailableAddOns/' . \rawurlencode($availableAddOnSid)
+ .'/Extensions';
+ }
- $this->uri = '/AvailableAddOns/' . \rawurlencode($availableAddOnSid) . '/Extensions';
+ /**
+ * Reads AvailableAddOnExtensionInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return AvailableAddOnExtensionInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
- * Streams AvailableAddOnExtensionInstance records from the API as a generator
- * stream.
+ * Streams AvailableAddOnExtensionInstance records from the API as a generator stream.
* This operation lazily loads records as efficiently as possible until the
* limit
* is reached.
@@ -53,9 +83,9 @@ public function __construct(Version $version, $availableAddOnSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -65,61 +95,40 @@ public function stream($limit = null, $pageSize = null)
}
/**
- * Reads AvailableAddOnExtensionInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return AvailableAddOnExtensionInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
- /**
- * Retrieve a single page of AvailableAddOnExtensionInstance records from the
- * API.
+ * Retrieve a single page of AvailableAddOnExtensionInstance records from the API.
* Request is executed immediately
*
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of AvailableAddOnExtensionInstance
+ * @return AvailableAddOnExtensionPage Page of AvailableAddOnExtensionInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): AvailableAddOnExtensionPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new AvailableAddOnExtensionPage($this->version, $response, $this->solution);
}
/**
- * Retrieve a specific page of AvailableAddOnExtensionInstance records from the
- * API.
+ * Retrieve a specific page of AvailableAddOnExtensionInstance records from the API.
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of AvailableAddOnExtensionInstance
+ * @return AvailableAddOnExtensionPage Page of AvailableAddOnExtensionInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): AvailableAddOnExtensionPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -129,13 +138,16 @@ public function getPage($targetUrl)
return new AvailableAddOnExtensionPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a AvailableAddOnExtensionContext
*
- * @param string $sid The SID of the AvailableAddOn Extension resource to fetch
- * @return \Twilio\Rest\Preview\Marketplace\AvailableAddOn\AvailableAddOnExtensionContext
+ * @param string $sid The SID of the AvailableAddOn Extension resource to fetch.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): AvailableAddOnExtensionContext
{
return new AvailableAddOnExtensionContext(
$this->version,
@@ -149,8 +161,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.Marketplace.AvailableAddOnExtensionList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionPage.php
index c95fe1d..e50034e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/AvailableAddOn/AvailableAddOnExtensionPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return AvailableAddOnExtensionInstance \Twilio\Rest\Preview\Marketplace\AvailableAddOn\AvailableAddOnExtensionInstance
+ */
+ public function buildInstance(array $payload): AvailableAddOnExtensionInstance
{
- return new AvailableAddOnExtensionInstance(
- $this->version,
- $payload,
- $this->solution['availableAddOnSid']
- );
+ return new AvailableAddOnExtensionInstance($this->version, $payload, $this->solution['availableAddOnSid']);
}
/**
@@ -38,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.Marketplace.AvailableAddOnExtensionPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/AvailableAddOnContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/AvailableAddOnContext.php
index 3bf3e95..73abd80 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/AvailableAddOnContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/AvailableAddOnContext.php
@@ -2,74 +2,89 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Preview\Marketplace;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
-use Twilio\Rest\Preview\Marketplace\AvailableAddOn\AvailableAddOnExtensionList;
+use Twilio\ListResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Preview\Marketplace\AvailableAddOn\AvailableAddOnExtensionList;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property \Twilio\Rest\Preview\Marketplace\AvailableAddOn\AvailableAddOnExtensionList $extensions
+ * @property AvailableAddOnExtensionList $extensions
* @method \Twilio\Rest\Preview\Marketplace\AvailableAddOn\AvailableAddOnExtensionContext extensions(string $sid)
*/
class AvailableAddOnContext extends InstanceContext
-{
- protected $_extensions = null;
+ {
+ protected $_extensions;
/**
* Initialize the AvailableAddOnContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The SID of the AvailableAddOn resource to fetch
- * @return \Twilio\Rest\Preview\Marketplace\AvailableAddOnContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid The SID of the AvailableAddOn resource to fetch.
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/AvailableAddOns/' . \rawurlencode($sid) . '';
+ $this->uri = '/AvailableAddOns/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a AvailableAddOnInstance
+ * Fetch the AvailableAddOnInstance
*
* @return AvailableAddOnInstance Fetched AvailableAddOnInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): AvailableAddOnInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
- return new AvailableAddOnInstance($this->version, $payload, $this->solution['sid']);
+ return new AvailableAddOnInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Access the extensions
- *
- * @return \Twilio\Rest\Preview\Marketplace\AvailableAddOn\AvailableAddOnExtensionList
*/
- protected function getExtensions()
+ protected function getExtensions(): AvailableAddOnExtensionList
{
if (!$this->_extensions) {
- $this->_extensions = new AvailableAddOnExtensionList($this->version, $this->solution['sid']);
+ $this->_extensions = new AvailableAddOnExtensionList(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->_extensions;
@@ -79,10 +94,10 @@ protected function getExtensions()
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -97,10 +112,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -115,12 +130,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Preview.Marketplace.AvailableAddOnContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/AvailableAddOnInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/AvailableAddOnInstance.php
index acabe25..18dc145 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/AvailableAddOnInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/AvailableAddOnInstance.php
@@ -2,47 +2,54 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Preview\Marketplace;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Rest\Preview\Marketplace\AvailableAddOn\AvailableAddOnExtensionList;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property string $sid
- * @property string $friendlyName
- * @property string $description
- * @property string $pricingType
- * @property array $configurationSchema
- * @property string $url
- * @property array $links
+ * @property string|null $sid
+ * @property string|null $friendlyName
+ * @property string|null $description
+ * @property string|null $pricingType
+ * @property array|null $configurationSchema
+ * @property string|null $url
+ * @property array|null $links
*/
class AvailableAddOnInstance extends InstanceResource
{
- protected $_extensions = null;
+ protected $_extensions;
/**
* Initialize the AvailableAddOnInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The SID of the AvailableAddOn resource to fetch
- * @return \Twilio\Rest\Preview\Marketplace\AvailableAddOnInstance
+ * @param string $sid The SID of the AvailableAddOn resource to fetch.
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
'description' => Values::array_get($payload, 'description'),
@@ -50,45 +57,45 @@ public function __construct(Version $version, array $payload, $sid = null)
'configurationSchema' => Values::array_get($payload, 'configuration_schema'),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Preview\Marketplace\AvailableAddOnContext Context for
- * this
- * AvailableAddOnInstance
+ * @return AvailableAddOnContext Context for this AvailableAddOnInstance
*/
- protected function proxy()
+ protected function proxy(): AvailableAddOnContext
{
if (!$this->context) {
- $this->context = new AvailableAddOnContext($this->version, $this->solution['sid']);
+ $this->context = new AvailableAddOnContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a AvailableAddOnInstance
+ * Fetch the AvailableAddOnInstance
*
* @return AvailableAddOnInstance Fetched AvailableAddOnInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): AvailableAddOnInstance
{
+
return $this->proxy()->fetch();
}
/**
* Access the extensions
- *
- * @return \Twilio\Rest\Preview\Marketplace\AvailableAddOn\AvailableAddOnExtensionList
*/
- protected function getExtensions()
+ protected function getExtensions(): AvailableAddOnExtensionList
{
return $this->proxy()->extensions;
}
@@ -100,7 +107,7 @@ protected function getExtensions()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -119,12 +126,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Preview.Marketplace.AvailableAddOnInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/AvailableAddOnList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/AvailableAddOnList.php
index 5fe6a98..6885c33 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/AvailableAddOnList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/AvailableAddOnList.php
@@ -2,38 +2,65 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Preview\Marketplace;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
+
class AvailableAddOnList extends ListResource
-{
+ {
/**
* Construct the AvailableAddOnList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Preview\Marketplace\AvailableAddOnList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/AvailableAddOns';
}
+ /**
+ * Reads AvailableAddOnInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return AvailableAddOnInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
+ }
+
/**
* Streams AvailableAddOnInstance records from the API as a generator stream.
* This operation lazily loads records as efficiently as possible until the
@@ -50,9 +77,9 @@ public function __construct(Version $version)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -61,26 +88,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads AvailableAddOnInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return AvailableAddOnInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of AvailableAddOnInstance records from the API.
* Request is executed immediately
@@ -88,21 +95,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of AvailableAddOnInstance
+ * @return AvailableAddOnPage Page of AvailableAddOnInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): AvailableAddOnPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new AvailableAddOnPage($this->version, $response, $this->solution);
}
@@ -112,9 +120,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of AvailableAddOnInstance
+ * @return AvailableAddOnPage Page of AvailableAddOnInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): AvailableAddOnPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -124,15 +132,21 @@ public function getPage($targetUrl)
return new AvailableAddOnPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a AvailableAddOnContext
*
- * @param string $sid The SID of the AvailableAddOn resource to fetch
- * @return \Twilio\Rest\Preview\Marketplace\AvailableAddOnContext
+ * @param string $sid The SID of the AvailableAddOn resource to fetch.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): AvailableAddOnContext
{
- return new AvailableAddOnContext($this->version, $sid);
+ return new AvailableAddOnContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -140,8 +154,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.Marketplace.AvailableAddOnList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/AvailableAddOnPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/AvailableAddOnPage.php
index 2177769..497df13 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/AvailableAddOnPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/AvailableAddOnPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return AvailableAddOnInstance \Twilio\Rest\Preview\Marketplace\AvailableAddOnInstance
+ */
+ public function buildInstance(array $payload): AvailableAddOnInstance
{
return new AvailableAddOnInstance($this->version, $payload);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.Marketplace.AvailableAddOnPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionContext.php
index b427605..7edef5d 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionContext.php
@@ -2,59 +2,68 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Preview\Marketplace\InstalledAddOn;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
class InstalledAddOnExtensionContext extends InstanceContext
-{
+ {
/**
* Initialize the InstalledAddOnExtensionContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $installedAddOnSid The SID of the InstalledAddOn resource with
- * the extension to fetch
- * @param string $sid The SID of the InstalledAddOn Extension resource to fetch
- * @return \Twilio\Rest\Preview\Marketplace\InstalledAddOn\InstalledAddOnExtensionContext
+ * @param Version $version Version that contains the resource
+ * @param string $installedAddOnSid The SID of the InstalledAddOn resource with the extension to fetch.
+ * @param string $sid The SID of the InstalledAddOn Extension resource to fetch.
*/
- public function __construct(Version $version, $installedAddOnSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $installedAddOnSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('installedAddOnSid' => $installedAddOnSid, 'sid' => $sid,);
+ $this->solution = [
+ 'installedAddOnSid' =>
+ $installedAddOnSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/InstalledAddOns/' . \rawurlencode($installedAddOnSid) . '/Extensions/' . \rawurlencode($sid) . '';
+ $this->uri = '/InstalledAddOns/' . \rawurlencode($installedAddOnSid)
+ .'/Extensions/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a InstalledAddOnExtensionInstance
+ * Fetch the InstalledAddOnExtensionInstance
*
- * @return InstalledAddOnExtensionInstance Fetched
- * InstalledAddOnExtensionInstance
+ * @return InstalledAddOnExtensionInstance Fetched InstalledAddOnExtensionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): InstalledAddOnExtensionInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new InstalledAddOnExtensionInstance(
$this->version,
@@ -64,24 +73,24 @@ public function fetch()
);
}
+
/**
* Update the InstalledAddOnExtensionInstance
*
- * @param bool $enabled Whether the Extension should be invoked
- * @return InstalledAddOnExtensionInstance Updated
- * InstalledAddOnExtensionInstance
+ * @param bool $enabled Whether the Extension should be invoked.
+ * @return InstalledAddOnExtensionInstance Updated InstalledAddOnExtensionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($enabled)
+ public function update(bool $enabled): InstalledAddOnExtensionInstance
{
- $data = Values::of(array('Enabled' => Serialize::booleanToString($enabled),));
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'Enabled' =>
+ Serialize::booleanToString($enabled),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new InstalledAddOnExtensionInstance(
$this->version,
@@ -91,17 +100,18 @@ public function update($enabled)
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Preview.Marketplace.InstalledAddOnExtensionContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionInstance.php
index c723863..276ff94 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Preview\Marketplace\InstalledAddOn;
use Twilio\Exceptions\TwilioException;
@@ -14,35 +22,32 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property string $sid
- * @property string $installedAddOnSid
- * @property string $friendlyName
- * @property string $productName
- * @property string $uniqueName
- * @property bool $enabled
- * @property string $url
+ * @property string|null $sid
+ * @property string|null $installedAddOnSid
+ * @property string|null $friendlyName
+ * @property string|null $productName
+ * @property string|null $uniqueName
+ * @property bool|null $enabled
+ * @property string|null $url
*/
class InstalledAddOnExtensionInstance extends InstanceResource
{
/**
* Initialize the InstalledAddOnExtensionInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $installedAddOnSid The SID of the InstalledAddOn resource to
- * which this extension applies
- * @param string $sid The SID of the InstalledAddOn Extension resource to fetch
- * @return \Twilio\Rest\Preview\Marketplace\InstalledAddOn\InstalledAddOnExtensionInstance
+ * @param string $installedAddOnSid The SID of the InstalledAddOn resource with the extension to fetch.
+ * @param string $sid The SID of the InstalledAddOn Extension resource to fetch.
*/
- public function __construct(Version $version, array $payload, $installedAddOnSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $installedAddOnSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'installedAddOnSid' => Values::array_get($payload, 'installed_add_on_sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
@@ -50,22 +55,18 @@ public function __construct(Version $version, array $payload, $installedAddOnSid
'uniqueName' => Values::array_get($payload, 'unique_name'),
'enabled' => Values::array_get($payload, 'enabled'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array(
- 'installedAddOnSid' => $installedAddOnSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['installedAddOnSid' => $installedAddOnSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Preview\Marketplace\InstalledAddOn\InstalledAddOnExtensionContext Context for this
- * InstalledAddOnExtensionInstance
+ * @return InstalledAddOnExtensionContext Context for this InstalledAddOnExtensionInstance
*/
- protected function proxy()
+ protected function proxy(): InstalledAddOnExtensionContext
{
if (!$this->context) {
$this->context = new InstalledAddOnExtensionContext(
@@ -79,27 +80,27 @@ protected function proxy()
}
/**
- * Fetch a InstalledAddOnExtensionInstance
+ * Fetch the InstalledAddOnExtensionInstance
*
- * @return InstalledAddOnExtensionInstance Fetched
- * InstalledAddOnExtensionInstance
+ * @return InstalledAddOnExtensionInstance Fetched InstalledAddOnExtensionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): InstalledAddOnExtensionInstance
{
+
return $this->proxy()->fetch();
}
/**
* Update the InstalledAddOnExtensionInstance
*
- * @param bool $enabled Whether the Extension should be invoked
- * @return InstalledAddOnExtensionInstance Updated
- * InstalledAddOnExtensionInstance
+ * @param bool $enabled Whether the Extension should be invoked.
+ * @return InstalledAddOnExtensionInstance Updated InstalledAddOnExtensionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($enabled)
+ public function update(bool $enabled): InstalledAddOnExtensionInstance
{
+
return $this->proxy()->update($enabled);
}
@@ -110,7 +111,7 @@ public function update($enabled)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -129,12 +130,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Preview.Marketplace.InstalledAddOnExtensionInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionList.php
index 725e6a9..3bd0214 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionList.php
@@ -2,43 +2,73 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Preview\Marketplace\InstalledAddOn;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
+
class InstalledAddOnExtensionList extends ListResource
-{
+ {
/**
* Construct the InstalledAddOnExtensionList
*
* @param Version $version Version that contains the resource
- * @param string $installedAddOnSid The SID of the InstalledAddOn resource to
- * which this extension applies
- * @return \Twilio\Rest\Preview\Marketplace\InstalledAddOn\InstalledAddOnExtensionList
+ * @param string $installedAddOnSid The SID of the InstalledAddOn resource with the extension to fetch.
*/
- public function __construct(Version $version, $installedAddOnSid)
- {
+ public function __construct(
+ Version $version,
+ string $installedAddOnSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('installedAddOnSid' => $installedAddOnSid,);
+ $this->solution = [
+ 'installedAddOnSid' =>
+ $installedAddOnSid,
+
+ ];
+
+ $this->uri = '/InstalledAddOns/' . \rawurlencode($installedAddOnSid)
+ .'/Extensions';
+ }
- $this->uri = '/InstalledAddOns/' . \rawurlencode($installedAddOnSid) . '/Extensions';
+ /**
+ * Reads InstalledAddOnExtensionInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return InstalledAddOnExtensionInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
- * Streams InstalledAddOnExtensionInstance records from the API as a generator
- * stream.
+ * Streams InstalledAddOnExtensionInstance records from the API as a generator stream.
* This operation lazily loads records as efficiently as possible until the
* limit
* is reached.
@@ -53,9 +83,9 @@ public function __construct(Version $version, $installedAddOnSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -65,61 +95,40 @@ public function stream($limit = null, $pageSize = null)
}
/**
- * Reads InstalledAddOnExtensionInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return InstalledAddOnExtensionInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
- /**
- * Retrieve a single page of InstalledAddOnExtensionInstance records from the
- * API.
+ * Retrieve a single page of InstalledAddOnExtensionInstance records from the API.
* Request is executed immediately
*
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of InstalledAddOnExtensionInstance
+ * @return InstalledAddOnExtensionPage Page of InstalledAddOnExtensionInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): InstalledAddOnExtensionPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new InstalledAddOnExtensionPage($this->version, $response, $this->solution);
}
/**
- * Retrieve a specific page of InstalledAddOnExtensionInstance records from the
- * API.
+ * Retrieve a specific page of InstalledAddOnExtensionInstance records from the API.
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of InstalledAddOnExtensionInstance
+ * @return InstalledAddOnExtensionPage Page of InstalledAddOnExtensionInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): InstalledAddOnExtensionPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -129,13 +138,16 @@ public function getPage($targetUrl)
return new InstalledAddOnExtensionPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a InstalledAddOnExtensionContext
*
- * @param string $sid The SID of the InstalledAddOn Extension resource to fetch
- * @return \Twilio\Rest\Preview\Marketplace\InstalledAddOn\InstalledAddOnExtensionContext
+ * @param string $sid The SID of the InstalledAddOn Extension resource to fetch.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): InstalledAddOnExtensionContext
{
return new InstalledAddOnExtensionContext(
$this->version,
@@ -149,8 +161,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.Marketplace.InstalledAddOnExtensionList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionPage.php
index fa5d6b6..d8139e6 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/InstalledAddOn/InstalledAddOnExtensionPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return InstalledAddOnExtensionInstance \Twilio\Rest\Preview\Marketplace\InstalledAddOn\InstalledAddOnExtensionInstance
+ */
+ public function buildInstance(array $payload): InstalledAddOnExtensionInstance
{
- return new InstalledAddOnExtensionInstance(
- $this->version,
- $payload,
- $this->solution['installedAddOnSid']
- );
+ return new InstalledAddOnExtensionInstance($this->version, $payload, $this->solution['installedAddOnSid']);
}
/**
@@ -38,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.Marketplace.InstalledAddOnExtensionPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/InstalledAddOnContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/InstalledAddOnContext.php
index a0d550c..14f77e0 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/InstalledAddOnContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/InstalledAddOnContext.php
@@ -2,78 +2,95 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Preview\Marketplace;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Preview\Marketplace\InstalledAddOn\InstalledAddOnExtensionList;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+use Twilio\Rest\Preview\Marketplace\InstalledAddOn\InstalledAddOnExtensionList;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property \Twilio\Rest\Preview\Marketplace\InstalledAddOn\InstalledAddOnExtensionList $extensions
+ * @property InstalledAddOnExtensionList $extensions
* @method \Twilio\Rest\Preview\Marketplace\InstalledAddOn\InstalledAddOnExtensionContext extensions(string $sid)
*/
class InstalledAddOnContext extends InstanceContext
-{
- protected $_extensions = null;
+ {
+ protected $_extensions;
/**
* Initialize the InstalledAddOnContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The SID of the InstalledAddOn resource to fetch
- * @return \Twilio\Rest\Preview\Marketplace\InstalledAddOnContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid The SID of the InstalledAddOn resource to delete.
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/InstalledAddOns/' . \rawurlencode($sid) . '';
+ $this->uri = '/InstalledAddOns/' . \rawurlencode($sid)
+ .'';
}
/**
- * Deletes the InstalledAddOnInstance
+ * Delete the InstalledAddOnInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function delete(): bool
{
- return $this->version->delete('delete', $this->uri);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a InstalledAddOnInstance
+ * Fetch the InstalledAddOnInstance
*
* @return InstalledAddOnInstance Fetched InstalledAddOnInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): InstalledAddOnInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
- return new InstalledAddOnInstance($this->version, $payload, $this->solution['sid']);
+ return new InstalledAddOnInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Update the InstalledAddOnInstance
*
@@ -81,34 +98,39 @@ public function fetch()
* @return InstalledAddOnInstance Updated InstalledAddOnInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): InstalledAddOnInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'Configuration' => Serialize::jsonObject($options['configuration']),
- 'UniqueName' => $options['uniqueName'],
- ));
+ $data = Values::of([
+ 'Configuration' =>
+ Serialize::jsonObject($options['configuration']),
+ 'UniqueName' =>
+ $options['uniqueName'],
+ ]);
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
- return new InstalledAddOnInstance($this->version, $payload, $this->solution['sid']);
+ return new InstalledAddOnInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Access the extensions
- *
- * @return \Twilio\Rest\Preview\Marketplace\InstalledAddOn\InstalledAddOnExtensionList
*/
- protected function getExtensions()
+ protected function getExtensions(): InstalledAddOnExtensionList
{
if (!$this->_extensions) {
- $this->_extensions = new InstalledAddOnExtensionList($this->version, $this->solution['sid']);
+ $this->_extensions = new InstalledAddOnExtensionList(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->_extensions;
@@ -118,10 +140,10 @@ protected function getExtensions()
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -136,10 +158,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -154,12 +176,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Preview.Marketplace.InstalledAddOnContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/InstalledAddOnInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/InstalledAddOnInstance.php
index 2985e0e..429af18 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/InstalledAddOnInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/InstalledAddOnInstance.php
@@ -2,52 +2,59 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Preview\Marketplace;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Preview\Marketplace\InstalledAddOn\InstalledAddOnExtensionList;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property string $sid
- * @property string $accountSid
- * @property string $friendlyName
- * @property string $description
- * @property array $configuration
- * @property string $uniqueName
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
- * @property array $links
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $friendlyName
+ * @property string|null $description
+ * @property array|null $configuration
+ * @property string|null $uniqueName
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
+ * @property array|null $links
*/
class InstalledAddOnInstance extends InstanceResource
{
- protected $_extensions = null;
+ protected $_extensions;
/**
* Initialize the InstalledAddOnInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The SID of the InstalledAddOn resource to fetch
- * @return \Twilio\Rest\Preview\Marketplace\InstalledAddOnInstance
+ * @param string $sid The SID of the InstalledAddOn resource to delete.
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
@@ -58,47 +65,50 @@ public function __construct(Version $version, array $payload, $sid = null)
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Preview\Marketplace\InstalledAddOnContext Context for
- * this
- * InstalledAddOnInstance
+ * @return InstalledAddOnContext Context for this InstalledAddOnInstance
*/
- protected function proxy()
+ protected function proxy(): InstalledAddOnContext
{
if (!$this->context) {
- $this->context = new InstalledAddOnContext($this->version, $this->solution['sid']);
+ $this->context = new InstalledAddOnContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Deletes the InstalledAddOnInstance
+ * Delete the InstalledAddOnInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function delete(): bool
{
+
return $this->proxy()->delete();
}
/**
- * Fetch a InstalledAddOnInstance
+ * Fetch the InstalledAddOnInstance
*
* @return InstalledAddOnInstance Fetched InstalledAddOnInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): InstalledAddOnInstance
{
+
return $this->proxy()->fetch();
}
@@ -109,17 +119,16 @@ public function fetch()
* @return InstalledAddOnInstance Updated InstalledAddOnInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): InstalledAddOnInstance
{
+
return $this->proxy()->update($options);
}
/**
* Access the extensions
- *
- * @return \Twilio\Rest\Preview\Marketplace\InstalledAddOn\InstalledAddOnExtensionList
*/
- protected function getExtensions()
+ protected function getExtensions(): InstalledAddOnExtensionList
{
return $this->proxy()->extensions;
}
@@ -131,7 +140,7 @@ protected function getExtensions()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -150,12 +159,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Preview.Marketplace.InstalledAddOnInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/InstalledAddOnList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/InstalledAddOnList.php
index ff389f5..a443f2f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/InstalledAddOnList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/InstalledAddOnList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Preview\Marketplace;
@@ -12,59 +19,84 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
class InstalledAddOnList extends ListResource
-{
+ {
/**
* Construct the InstalledAddOnList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Preview\Marketplace\InstalledAddOnList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/InstalledAddOns';
}
/**
- * Create a new InstalledAddOnInstance
+ * Create the InstalledAddOnInstance
*
- * @param string $availableAddOnSid The SID of the AvaliableAddOn to install
- * @param bool $acceptTermsOfService Whether the Terms of Service were accepted
+ * @param string $availableAddOnSid The SID of the AvaliableAddOn to install.
+ * @param bool $acceptTermsOfService Whether the Terms of Service were accepted.
* @param array|Options $options Optional Arguments
- * @return InstalledAddOnInstance Newly created InstalledAddOnInstance
+ * @return InstalledAddOnInstance Created InstalledAddOnInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($availableAddOnSid, $acceptTermsOfService, $options = array())
+ public function create(string $availableAddOnSid, bool $acceptTermsOfService, array $options = []): InstalledAddOnInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'AvailableAddOnSid' => $availableAddOnSid,
- 'AcceptTermsOfService' => Serialize::booleanToString($acceptTermsOfService),
- 'Configuration' => Serialize::jsonObject($options['configuration']),
- 'UniqueName' => $options['uniqueName'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'AvailableAddOnSid' =>
+ $availableAddOnSid,
+ 'AcceptTermsOfService' =>
+ Serialize::booleanToString($acceptTermsOfService),
+ 'Configuration' =>
+ Serialize::jsonObject($options['configuration']),
+ 'UniqueName' =>
+ $options['uniqueName'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new InstalledAddOnInstance(
+ $this->version,
+ $payload
);
+ }
+
- return new InstalledAddOnInstance($this->version, $payload);
+ /**
+ * Reads InstalledAddOnInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return InstalledAddOnInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -83,9 +115,9 @@ public function create($availableAddOnSid, $acceptTermsOfService, $options = arr
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -94,26 +126,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads InstalledAddOnInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return InstalledAddOnInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of InstalledAddOnInstance records from the API.
* Request is executed immediately
@@ -121,21 +133,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of InstalledAddOnInstance
+ * @return InstalledAddOnPage Page of InstalledAddOnInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): InstalledAddOnPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new InstalledAddOnPage($this->version, $response, $this->solution);
}
@@ -145,9 +158,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of InstalledAddOnInstance
+ * @return InstalledAddOnPage Page of InstalledAddOnInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): InstalledAddOnPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -157,15 +170,21 @@ public function getPage($targetUrl)
return new InstalledAddOnPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a InstalledAddOnContext
*
- * @param string $sid The SID of the InstalledAddOn resource to fetch
- * @return \Twilio\Rest\Preview\Marketplace\InstalledAddOnContext
+ * @param string $sid The SID of the InstalledAddOn resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): InstalledAddOnContext
{
- return new InstalledAddOnContext($this->version, $sid);
+ return new InstalledAddOnContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -173,8 +192,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.Marketplace.InstalledAddOnList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/InstalledAddOnOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/InstalledAddOnOptions.php
index 7b6df32..911c018 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/InstalledAddOnOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/InstalledAddOnOptions.php
@@ -1,10 +1,16 @@
options['configuration'] = $configuration;
$this->options['uniqueName'] = $uniqueName;
}
@@ -56,10 +80,10 @@ public function __construct($configuration = Values::NONE, $uniqueName = Values:
/**
* The JSON object that represents the configuration of the new Add-on being installed.
*
- * @param array $configuration The JSON object representing the configuration
+ * @param array $configuration The JSON object that represents the configuration of the new Add-on being installed.
* @return $this Fluent Builder
*/
- public function setConfiguration($configuration)
+ public function setConfiguration(array $configuration): self
{
$this->options['configuration'] = $configuration;
return $this;
@@ -68,11 +92,10 @@ public function setConfiguration($configuration)
/**
* An application-defined string that uniquely identifies the resource. This value must be unique within the Account.
*
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the resource
+ * @param string $uniqueName An application-defined string that uniquely identifies the resource. This value must be unique within the Account.
* @return $this Fluent Builder
*/
- public function setUniqueName($uniqueName)
+ public function setUniqueName(string $uniqueName): self
{
$this->options['uniqueName'] = $uniqueName;
return $this;
@@ -83,27 +106,28 @@ public function setUniqueName($uniqueName)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.Marketplace.CreateInstalledAddOnOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Preview.Marketplace.CreateInstalledAddOnOptions ' . $options . ']';
}
}
+
+
+
class UpdateInstalledAddOnOptions extends Options
-{
+ {
/**
- * @param array $configuration The JSON object representing the configuration
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the resource
+ * @param array $configuration Valid JSON object that conform to the configuration schema exposed by the associated AvailableAddOn resource. This is only required by Add-ons that need to be configured
+ * @param string $uniqueName An application-defined string that uniquely identifies the resource. This value must be unique within the Account.
*/
- public function __construct($configuration = Values::NONE, $uniqueName = Values::NONE)
- {
+ public function __construct(
+
+ array $configuration = Values::ARRAY_NONE,
+ string $uniqueName = Values::NONE
+
+ ) {
$this->options['configuration'] = $configuration;
$this->options['uniqueName'] = $uniqueName;
}
@@ -111,10 +135,10 @@ public function __construct($configuration = Values::NONE, $uniqueName = Values:
/**
* Valid JSON object that conform to the configuration schema exposed by the associated AvailableAddOn resource. This is only required by Add-ons that need to be configured
*
- * @param array $configuration The JSON object representing the configuration
+ * @param array $configuration Valid JSON object that conform to the configuration schema exposed by the associated AvailableAddOn resource. This is only required by Add-ons that need to be configured
* @return $this Fluent Builder
*/
- public function setConfiguration($configuration)
+ public function setConfiguration(array $configuration): self
{
$this->options['configuration'] = $configuration;
return $this;
@@ -123,11 +147,10 @@ public function setConfiguration($configuration)
/**
* An application-defined string that uniquely identifies the resource. This value must be unique within the Account.
*
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the resource
+ * @param string $uniqueName An application-defined string that uniquely identifies the resource. This value must be unique within the Account.
* @return $this Fluent Builder
*/
- public function setUniqueName($uniqueName)
+ public function setUniqueName(string $uniqueName): self
{
$this->options['uniqueName'] = $uniqueName;
return $this;
@@ -138,14 +161,10 @@ public function setUniqueName($uniqueName)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.Marketplace.UpdateInstalledAddOnOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Preview.Marketplace.UpdateInstalledAddOnOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/InstalledAddOnPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/InstalledAddOnPage.php
index 5f12181..ed1c381 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/InstalledAddOnPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Marketplace/InstalledAddOnPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return InstalledAddOnInstance \Twilio\Rest\Preview\Marketplace\InstalledAddOnInstance
+ */
+ public function buildInstance(array $payload): InstalledAddOnInstance
{
return new InstalledAddOnInstance($this->version, $payload);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.Marketplace.InstalledAddOnPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync.php
index 75251f2..145e972 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync.php
@@ -1,32 +1,38 @@
version = 'Sync';
}
- /**
- * @return \Twilio\Rest\Preview\Sync\ServiceList
- */
- protected function getServices()
+ protected function getServices(): ServiceList
{
if (!$this->_services) {
$this->_services = new ServiceList($this);
@@ -52,7 +55,7 @@ protected function getServices()
* @return \Twilio\ListResource The requested resource
* @throws TwilioException For unknown resource
*/
- public function __get($name)
+ public function __get(string $name)
{
$method = 'get' . \ucfirst($name);
if (\method_exists($this, $method)) {
@@ -67,10 +70,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -85,8 +88,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.Sync]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionContext.php
index 62128f2..e3c45d7 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionContext.php
@@ -2,63 +2,87 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Preview\Sync\Service\Document;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
class DocumentPermissionContext extends InstanceContext
-{
+ {
/**
* Initialize the DocumentPermissionContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The service_sid
- * @param string $documentSid Sync Document SID or unique name.
- * @param string $identity Identity of the user to whom the Sync Document
- * Permission applies.
- * @return \Twilio\Rest\Preview\Sync\Service\Document\DocumentPermissionContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid
+ * @param string $documentSid Identifier of the Sync Document. Either a SID or a unique name.
+ * @param string $identity Arbitrary string identifier representing a user associated with an FPA token, assigned by the developer.
*/
- public function __construct(Version $version, $serviceSid, $documentSid, $identity)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $documentSid,
+ $identity
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'documentSid' => $documentSid,
- 'identity' => $identity,
- );
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'documentSid' =>
+ $documentSid,
+ 'identity' =>
+ $identity,
+ ];
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Documents/' . \rawurlencode($documentSid) . '/Permissions/' . \rawurlencode($identity) . '';
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Documents/' . \rawurlencode($documentSid)
+ .'/Permissions/' . \rawurlencode($identity)
+ .'';
}
/**
- * Fetch a DocumentPermissionInstance
+ * Delete the DocumentPermissionInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
+ }
+
+
+ /**
+ * Fetch the DocumentPermissionInstance
*
* @return DocumentPermissionInstance Fetched DocumentPermissionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): DocumentPermissionInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new DocumentPermissionInstance(
$this->version,
@@ -69,40 +93,30 @@ public function fetch()
);
}
- /**
- * Deletes the DocumentPermissionInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Update the DocumentPermissionInstance
*
- * @param bool $read Read access.
- * @param bool $write Write access.
- * @param bool $manage Manage access.
+ * @param bool $read Boolean flag specifying whether the identity can read the Sync Document.
+ * @param bool $write Boolean flag specifying whether the identity can update the Sync Document.
+ * @param bool $manage Boolean flag specifying whether the identity can delete the Sync Document.
* @return DocumentPermissionInstance Updated DocumentPermissionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($read, $write, $manage)
+ public function update(bool $read, bool $write, bool $manage): DocumentPermissionInstance
{
- $data = Values::of(array(
- 'Read' => Serialize::booleanToString($read),
- 'Write' => Serialize::booleanToString($write),
- 'Manage' => Serialize::booleanToString($manage),
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+
+ $data = Values::of([
+ 'Read' =>
+ Serialize::booleanToString($read),
+ 'Write' =>
+ Serialize::booleanToString($write),
+ 'Manage' =>
+ Serialize::booleanToString($manage),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new DocumentPermissionInstance(
$this->version,
@@ -113,17 +127,18 @@ public function update($read, $write, $manage)
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Preview.Sync.DocumentPermissionContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionInstance.php
index 18bcb5c..858ad69 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Preview\Sync\Service\Document;
use Twilio\Exceptions\TwilioException;
@@ -14,37 +22,34 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $documentSid
- * @property string $identity
- * @property bool $read
- * @property bool $write
- * @property bool $manage
- * @property string $url
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $documentSid
+ * @property string|null $identity
+ * @property bool|null $read
+ * @property bool|null $write
+ * @property bool|null $manage
+ * @property string|null $url
*/
class DocumentPermissionInstance extends InstanceResource
{
/**
* Initialize the DocumentPermissionInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid Sync Service Instance SID.
- * @param string $documentSid Sync Document SID.
- * @param string $identity Identity of the user to whom the Sync Document
- * Permission applies.
- * @return \Twilio\Rest\Preview\Sync\Service\Document\DocumentPermissionInstance
+ * @param string $serviceSid
+ * @param string $documentSid Identifier of the Sync Document. Either a SID or a unique name.
+ * @param string $identity Arbitrary string identifier representing a user associated with an FPA token, assigned by the developer.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $documentSid, $identity = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $documentSid, string $identity = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
'documentSid' => Values::array_get($payload, 'document_sid'),
@@ -53,22 +58,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $docu
'write' => Values::array_get($payload, 'write'),
'manage' => Values::array_get($payload, 'manage'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'documentSid' => $documentSid,
- 'identity' => $identity ?: $this->properties['identity'],
- );
+ $this->solution = ['serviceSid' => $serviceSid, 'documentSid' => $documentSid, 'identity' => $identity ?: $this->properties['identity'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Preview\Sync\Service\Document\DocumentPermissionContext Context for this DocumentPermissionInstance
+ * @return DocumentPermissionContext Context for this DocumentPermissionInstance
*/
- protected function proxy()
+ protected function proxy(): DocumentPermissionContext
{
if (!$this->context) {
$this->context = new DocumentPermissionContext(
@@ -83,38 +84,41 @@ protected function proxy()
}
/**
- * Fetch a DocumentPermissionInstance
+ * Delete the DocumentPermissionInstance
*
- * @return DocumentPermissionInstance Fetched DocumentPermissionInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the DocumentPermissionInstance
+ * Fetch the DocumentPermissionInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return DocumentPermissionInstance Fetched DocumentPermissionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): DocumentPermissionInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
* Update the DocumentPermissionInstance
*
- * @param bool $read Read access.
- * @param bool $write Write access.
- * @param bool $manage Manage access.
+ * @param bool $read Boolean flag specifying whether the identity can read the Sync Document.
+ * @param bool $write Boolean flag specifying whether the identity can update the Sync Document.
+ * @param bool $manage Boolean flag specifying whether the identity can delete the Sync Document.
* @return DocumentPermissionInstance Updated DocumentPermissionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($read, $write, $manage)
+ public function update(bool $read, bool $write, bool $manage): DocumentPermissionInstance
{
+
return $this->proxy()->update($read, $write, $manage);
}
@@ -125,7 +129,7 @@ public function update($read, $write, $manage)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -144,12 +148,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Preview.Sync.DocumentPermissionInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionList.php
index 783f210..8460523 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionList.php
@@ -2,43 +2,79 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Preview\Sync\Service\Document;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
+
class DocumentPermissionList extends ListResource
-{
+ {
/**
* Construct the DocumentPermissionList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid Sync Service Instance SID.
- * @param string $documentSid Sync Document SID.
- * @return \Twilio\Rest\Preview\Sync\Service\Document\DocumentPermissionList
+ * @param string $serviceSid
+ * @param string $documentSid Identifier of the Sync Document. Either a SID or a unique name.
*/
- public function __construct(Version $version, $serviceSid, $documentSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid,
+ string $documentSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'documentSid' => $documentSid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ 'documentSid' =>
+ $documentSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Documents/' . \rawurlencode($documentSid)
+ .'/Permissions';
+ }
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Documents/' . \rawurlencode($documentSid) . '/Permissions';
+ /**
+ * Reads DocumentPermissionInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return DocumentPermissionInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
- * Streams DocumentPermissionInstance records from the API as a generator
- * stream.
+ * Streams DocumentPermissionInstance records from the API as a generator stream.
* This operation lazily loads records as efficiently as possible until the
* limit
* is reached.
@@ -53,9 +89,9 @@ public function __construct(Version $version, $serviceSid, $documentSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -64,26 +100,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads DocumentPermissionInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return DocumentPermissionInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of DocumentPermissionInstance records from the API.
* Request is executed immediately
@@ -91,21 +107,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of DocumentPermissionInstance
+ * @return DocumentPermissionPage Page of DocumentPermissionInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): DocumentPermissionPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new DocumentPermissionPage($this->version, $response, $this->solution);
}
@@ -115,9 +132,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of DocumentPermissionInstance
+ * @return DocumentPermissionPage Page of DocumentPermissionInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): DocumentPermissionPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -127,14 +144,16 @@ public function getPage($targetUrl)
return new DocumentPermissionPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a DocumentPermissionContext
*
- * @param string $identity Identity of the user to whom the Sync Document
- * Permission applies.
- * @return \Twilio\Rest\Preview\Sync\Service\Document\DocumentPermissionContext
+ * @param string $identity Arbitrary string identifier representing a user associated with an FPA token, assigned by the developer.
*/
- public function getContext($identity)
+ public function getContext(
+ string $identity
+
+ ): DocumentPermissionContext
{
return new DocumentPermissionContext(
$this->version,
@@ -149,8 +168,8 @@ public function getContext($identity)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.Sync.DocumentPermissionList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionPage.php
index 0b94741..fc8bac0 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/Document/DocumentPermissionPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return DocumentPermissionInstance \Twilio\Rest\Preview\Sync\Service\Document\DocumentPermissionInstance
+ */
+ public function buildInstance(array $payload): DocumentPermissionInstance
{
- return new DocumentPermissionInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['documentSid']
- );
+ return new DocumentPermissionInstance($this->version, $payload, $this->solution['serviceSid'], $this->solution['documentSid']);
}
/**
@@ -39,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.Sync.DocumentPermissionPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/DocumentContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/DocumentContext.php
index f9c6ed3..664d089 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/DocumentContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/DocumentContext.php
@@ -2,63 +2,91 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Preview\Sync\Service;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
-use Twilio\Rest\Preview\Sync\Service\Document\DocumentPermissionList;
-use Twilio\Serialize;
+use Twilio\ListResource;
+use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+use Twilio\Rest\Preview\Sync\Service\Document\DocumentPermissionList;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property \Twilio\Rest\Preview\Sync\Service\Document\DocumentPermissionList $documentPermissions
+ * @property DocumentPermissionList $documentPermissions
* @method \Twilio\Rest\Preview\Sync\Service\Document\DocumentPermissionContext documentPermissions(string $identity)
*/
class DocumentContext extends InstanceContext
-{
- protected $_documentPermissions = null;
+ {
+ protected $_documentPermissions;
/**
* Initialize the DocumentContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The service_sid
- * @param string $sid The sid
- * @return \Twilio\Rest\Preview\Sync\Service\DocumentContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid
+ * @param string $sid
*/
- public function __construct(Version $version, $serviceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Documents/' . \rawurlencode($sid)
+ .'';
+ }
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Documents/' . \rawurlencode($sid) . '';
+ /**
+ * Delete the DocumentInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a DocumentInstance
+ * Fetch the DocumentInstance
*
* @return DocumentInstance Fetched DocumentInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): DocumentInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new DocumentInstance(
$this->version,
@@ -68,34 +96,27 @@ public function fetch()
);
}
- /**
- * Deletes the DocumentInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Update the DocumentInstance
*
- * @param array $data The data
+ * @param array $data
+ * @param array|Options $options Optional Arguments
* @return DocumentInstance Updated DocumentInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($data)
+ public function update(array $data, array $options = []): DocumentInstance
{
- $data = Values::of(array('Data' => Serialize::jsonObject($data),));
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $options = new Values($options);
+
+ $data = Values::of([
+ 'Data' =>
+ Serialize::jsonObject($data),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'If-Match' => $options['ifMatch']]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new DocumentInstance(
$this->version,
@@ -105,12 +126,11 @@ public function update($data)
);
}
+
/**
* Access the documentPermissions
- *
- * @return \Twilio\Rest\Preview\Sync\Service\Document\DocumentPermissionList
*/
- protected function getDocumentPermissions()
+ protected function getDocumentPermissions(): DocumentPermissionList
{
if (!$this->_documentPermissions) {
$this->_documentPermissions = new DocumentPermissionList(
@@ -127,10 +147,10 @@ protected function getDocumentPermissions()
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -145,10 +165,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -163,12 +183,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Preview.Sync.DocumentContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/DocumentInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/DocumentInstance.php
index 47a272c..cad5d7c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/DocumentInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/DocumentInstance.php
@@ -2,53 +2,61 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Preview\Sync\Service;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
+use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Preview\Sync\Service\Document\DocumentPermissionList;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property string $sid
- * @property string $uniqueName
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $url
- * @property array $links
- * @property string $revision
- * @property array $data
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $createdBy
+ * @property string|null $sid
+ * @property string|null $uniqueName
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $url
+ * @property array|null $links
+ * @property string|null $revision
+ * @property array|null $data
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $createdBy
*/
class DocumentInstance extends InstanceResource
{
- protected $_documentPermissions = null;
+ protected $_documentPermissions;
/**
* Initialize the DocumentInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The service_sid
- * @param string $sid The sid
- * @return \Twilio\Rest\Preview\Sync\Service\DocumentInstance
+ * @param string $serviceSid
+ * @param string $sid
*/
- public function __construct(Version $version, array $payload, $serviceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'uniqueName' => Values::array_get($payload, 'unique_name'),
'accountSid' => Values::array_get($payload, 'account_sid'),
@@ -60,19 +68,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $sid
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'createdBy' => Values::array_get($payload, 'created_by'),
- );
+ ];
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Preview\Sync\Service\DocumentContext Context for this
- * DocumentInstance
+ * @return DocumentContext Context for this DocumentInstance
*/
- protected function proxy()
+ protected function proxy(): DocumentContext
{
if (!$this->context) {
$this->context = new DocumentContext(
@@ -86,45 +93,47 @@ protected function proxy()
}
/**
- * Fetch a DocumentInstance
+ * Delete the DocumentInstance
*
- * @return DocumentInstance Fetched DocumentInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the DocumentInstance
+ * Fetch the DocumentInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return DocumentInstance Fetched DocumentInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): DocumentInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
* Update the DocumentInstance
*
- * @param array $data The data
+ * @param array $data
+ * @param array|Options $options Optional Arguments
* @return DocumentInstance Updated DocumentInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($data)
+ public function update(array $data, array $options = []): DocumentInstance
{
- return $this->proxy()->update($data);
+
+ return $this->proxy()->update($data, $options);
}
/**
* Access the documentPermissions
- *
- * @return \Twilio\Rest\Preview\Sync\Service\Document\DocumentPermissionList
*/
- protected function getDocumentPermissions()
+ protected function getDocumentPermissions(): DocumentPermissionList
{
return $this->proxy()->documentPermissions;
}
@@ -136,7 +145,7 @@ protected function getDocumentPermissions()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -155,12 +164,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Preview.Sync.DocumentInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/DocumentList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/DocumentList.php
index c7ae48d..4784091 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/DocumentList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/DocumentList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Preview\Sync\Service;
@@ -12,56 +19,85 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
class DocumentList extends ListResource
-{
+ {
/**
* Construct the DocumentList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The service_sid
- * @return \Twilio\Rest\Preview\Sync\Service\DocumentList
+ * @param string $serviceSid
*/
- public function __construct(Version $version, $serviceSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Documents';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Documents';
}
/**
- * Create a new DocumentInstance
+ * Create the DocumentInstance
*
* @param array|Options $options Optional Arguments
- * @return DocumentInstance Newly created DocumentInstance
+ * @return DocumentInstance Created DocumentInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($options = array())
+ public function create(array $options = []): DocumentInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'UniqueName' => $options['uniqueName'],
- 'Data' => Serialize::jsonObject($options['data']),
- ));
+ $data = Values::of([
+ 'UniqueName' =>
+ $options['uniqueName'],
+ 'Data' =>
+ Serialize::jsonObject($options['data']),
+ ]);
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new DocumentInstance(
+ $this->version,
+ $payload,
+ $this->solution['serviceSid']
);
+ }
- return new DocumentInstance($this->version, $payload, $this->solution['serviceSid']);
+
+ /**
+ * Reads DocumentInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return DocumentInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -80,9 +116,9 @@ public function create($options = array())
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -91,26 +127,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads DocumentInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return DocumentInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of DocumentInstance records from the API.
* Request is executed immediately
@@ -118,21 +134,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of DocumentInstance
+ * @return DocumentPage Page of DocumentInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): DocumentPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new DocumentPage($this->version, $response, $this->solution);
}
@@ -142,9 +159,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of DocumentInstance
+ * @return DocumentPage Page of DocumentInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): DocumentPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -154,15 +171,22 @@ public function getPage($targetUrl)
return new DocumentPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a DocumentContext
*
- * @param string $sid The sid
- * @return \Twilio\Rest\Preview\Sync\Service\DocumentContext
+ * @param string $sid
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): DocumentContext
{
- return new DocumentContext($this->version, $this->solution['serviceSid'], $sid);
+ return new DocumentContext(
+ $this->version,
+ $this->solution['serviceSid'],
+ $sid
+ );
}
/**
@@ -170,8 +194,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.Sync.DocumentList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/DocumentOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/DocumentOptions.php
index 8236938..04dce01 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/DocumentOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/DocumentOptions.php
@@ -1,10 +1,16 @@
options['uniqueName'] = $uniqueName;
$this->options['data'] = $data;
}
/**
- * The unique_name
+ *
*
- * @param string $uniqueName The unique_name
+ * @param string $uniqueName
* @return $this Fluent Builder
*/
- public function setUniqueName($uniqueName)
+ public function setUniqueName(string $uniqueName): self
{
$this->options['uniqueName'] = $uniqueName;
return $this;
}
/**
- * The data
+ *
*
- * @param array $data The data
+ * @param array $data
* @return $this Fluent Builder
*/
- public function setData($data)
+ public function setData(array $data): self
{
$this->options['data'] = $data;
return $this;
@@ -69,14 +103,50 @@ public function setData($data)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
+ {
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Preview.Sync.CreateDocumentOptions ' . $options . ']';
+ }
+}
+
+
+
+
+class UpdateDocumentOptions extends Options
+ {
+ /**
+ * @param string $ifMatch The If-Match HTTP request header
+ */
+ public function __construct(
+
+ string $ifMatch = Values::NONE
+
+ ) {
+ $this->options['ifMatch'] = $ifMatch;
+ }
+
+ /**
+ * The If-Match HTTP request header
+ *
+ * @param string $ifMatch The If-Match HTTP request header
+ * @return $this Fluent Builder
+ */
+ public function setIfMatch(string $ifMatch): self
+ {
+ $this->options['ifMatch'] = $ifMatch;
+ return $this;
+ }
+
+ /**
+ * Provide a friendly representation
+ *
+ * @return string Machine friendly representation
+ */
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.Sync.CreateDocumentOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Preview.Sync.UpdateDocumentOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/DocumentPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/DocumentPage.php
index c493cf5..0a58e37 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/DocumentPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/DocumentPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return DocumentInstance \Twilio\Rest\Preview\Sync\Service\DocumentInstance
+ */
+ public function buildInstance(array $payload): DocumentInstance
{
return new DocumentInstance($this->version, $payload, $this->solution['serviceSid']);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.Sync.DocumentPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemContext.php
index efd2680..e2d966a 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemContext.php
@@ -2,58 +2,91 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Preview\Sync\Service\SyncList;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
-use Twilio\Serialize;
+use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
class SyncListItemContext extends InstanceContext
-{
+ {
/**
* Initialize the SyncListItemContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The service_sid
- * @param string $listSid The list_sid
- * @param int $index The index
- * @return \Twilio\Rest\Preview\Sync\Service\SyncList\SyncListItemContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid
+ * @param string $listSid
+ * @param int $index
*/
- public function __construct(Version $version, $serviceSid, $listSid, $index)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $listSid,
+ $index
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'listSid' => $listSid, 'index' => $index,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'listSid' =>
+ $listSid,
+ 'index' =>
+ $index,
+ ];
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Lists/' . \rawurlencode($listSid) . '/Items/' . \rawurlencode($index) . '';
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Lists/' . \rawurlencode($listSid)
+ .'/Items/' . \rawurlencode($index)
+ .'';
}
/**
- * Fetch a SyncListItemInstance
+ * Delete the SyncListItemInstance
+ *
+ * @param array|Options $options Optional Arguments
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(array $options = []): bool
+ {
+
+ $options = new Values($options);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'If-Match' => $options['ifMatch']]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
+ }
+
+
+ /**
+ * Fetch the SyncListItemInstance
*
* @return SyncListItemInstance Fetched SyncListItemInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): SyncListItemInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new SyncListItemInstance(
$this->version,
@@ -64,34 +97,27 @@ public function fetch()
);
}
- /**
- * Deletes the SyncListItemInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Update the SyncListItemInstance
*
- * @param array $data The data
+ * @param array $data
+ * @param array|Options $options Optional Arguments
* @return SyncListItemInstance Updated SyncListItemInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($data)
+ public function update(array $data, array $options = []): SyncListItemInstance
{
- $data = Values::of(array('Data' => Serialize::jsonObject($data),));
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $options = new Values($options);
+
+ $data = Values::of([
+ 'Data' =>
+ Serialize::jsonObject($data),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'If-Match' => $options['ifMatch']]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new SyncListItemInstance(
$this->version,
@@ -102,17 +128,18 @@ public function update($data)
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Preview.Sync.SyncListItemContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemInstance.php
index 016cd8b..901e60b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemInstance.php
@@ -2,51 +2,58 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Preview\Sync\Service\SyncList;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
+use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
* @property int $index
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $listSid
- * @property string $url
- * @property string $revision
- * @property array $data
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $createdBy
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $listSid
+ * @property string|null $url
+ * @property string|null $revision
+ * @property array|null $data
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $createdBy
*/
class SyncListItemInstance extends InstanceResource
{
/**
* Initialize the SyncListItemInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The service_sid
- * @param string $listSid The list_sid
- * @param int $index The index
- * @return \Twilio\Rest\Preview\Sync\Service\SyncList\SyncListItemInstance
+ * @param string $serviceSid
+ * @param string $listSid
+ * @param int $index
*/
- public function __construct(Version $version, array $payload, $serviceSid, $listSid, $index = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $listSid, int $index = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'index' => Values::array_get($payload, 'index'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
@@ -57,22 +64,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $list
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'createdBy' => Values::array_get($payload, 'created_by'),
- );
+ ];
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'listSid' => $listSid,
- 'index' => $index ?: $this->properties['index'],
- );
+ $this->solution = ['serviceSid' => $serviceSid, 'listSid' => $listSid, 'index' => $index ?: $this->properties['index'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Preview\Sync\Service\SyncList\SyncListItemContext Context for this SyncListItemInstance
+ * @return SyncListItemContext Context for this SyncListItemInstance
*/
- protected function proxy()
+ protected function proxy(): SyncListItemContext
{
if (!$this->context) {
$this->context = new SyncListItemContext(
@@ -87,37 +90,42 @@ protected function proxy()
}
/**
- * Fetch a SyncListItemInstance
+ * Delete the SyncListItemInstance
*
- * @return SyncListItemInstance Fetched SyncListItemInstance
+ * @param array|Options $options Optional Arguments
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(array $options = []): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete($options);
}
/**
- * Deletes the SyncListItemInstance
+ * Fetch the SyncListItemInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return SyncListItemInstance Fetched SyncListItemInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): SyncListItemInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
* Update the SyncListItemInstance
*
- * @param array $data The data
+ * @param array $data
+ * @param array|Options $options Optional Arguments
* @return SyncListItemInstance Updated SyncListItemInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($data)
+ public function update(array $data, array $options = []): SyncListItemInstance
{
- return $this->proxy()->update($data);
+
+ return $this->proxy()->update($data, $options);
}
/**
@@ -127,7 +135,7 @@ public function update($data)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -146,12 +154,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Preview.Sync.SyncListItemInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemList.php
index 69bffa6..0cdea8a 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Preview\Sync\Service\SyncList;
@@ -12,50 +19,60 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
class SyncListItemList extends ListResource
-{
+ {
/**
* Construct the SyncListItemList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The service_sid
- * @param string $listSid The list_sid
- * @return \Twilio\Rest\Preview\Sync\Service\SyncList\SyncListItemList
+ * @param string $serviceSid
+ * @param string $listSid
*/
- public function __construct(Version $version, $serviceSid, $listSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid,
+ string $listSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'listSid' => $listSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Lists/' . \rawurlencode($listSid) . '/Items';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ 'listSid' =>
+ $listSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Lists/' . \rawurlencode($listSid)
+ .'/Items';
}
/**
- * Create a new SyncListItemInstance
+ * Create the SyncListItemInstance
*
- * @param array $data The data
- * @return SyncListItemInstance Newly created SyncListItemInstance
+ * @param array $data
+ * @return SyncListItemInstance Created SyncListItemInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($data)
+ public function create(array $data): SyncListItemInstance
{
- $data = Values::of(array('Data' => Serialize::jsonObject($data),));
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'Data' =>
+ Serialize::jsonObject($data),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
return new SyncListItemInstance(
$this->version,
@@ -65,82 +82,87 @@ public function create($data)
);
}
+
/**
- * Streams SyncListItemInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Reads SyncListItemInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
+ * @param int $limit Upper limit for the number of records to return. read()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
+ * page_size is defined but a limit is defined, read()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return SyncListItemInstance[] Array of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($options, $limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
- * Reads SyncListItemInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
+ * Streams SyncListItemInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
+ * @param int $limit Upper limit for the number of records to return. stream()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
+ * page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return SyncListItemInstance[] Array of results
+ * @return Stream stream of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
/**
* Retrieve a single page of SyncListItemInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of SyncListItemInstance
+ * @return SyncListItemPage Page of SyncListItemInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): SyncListItemPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Order' => $options['order'],
- 'From' => $options['from'],
- 'Bounds' => $options['bounds'],
+
+ $params = Values::of([
+ 'Order' =>
+ $options['order'],
+ 'From' =>
+ $options['from'],
+ 'Bounds' =>
+ $options['bounds'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new SyncListItemPage($this->version, $response, $this->solution);
}
@@ -150,9 +172,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of SyncListItemInstance
+ * @return SyncListItemPage Page of SyncListItemInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): SyncListItemPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -162,13 +184,16 @@ public function getPage($targetUrl)
return new SyncListItemPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a SyncListItemContext
*
- * @param int $index The index
- * @return \Twilio\Rest\Preview\Sync\Service\SyncList\SyncListItemContext
+ * @param int $index
*/
- public function getContext($index)
+ public function getContext(
+ int $index
+
+ ): SyncListItemContext
{
return new SyncListItemContext(
$this->version,
@@ -183,8 +208,8 @@ public function getContext($index)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.Sync.SyncListItemList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemOptions.php
index 6c81721..d5a459c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemOptions.php
@@ -1,10 +1,16 @@
options['ifMatch'] = $ifMatch;
+ }
+
/**
- * @param string $order The order
- * @param string $from The from
- * @param string $bounds The bounds
+ * The If-Match HTTP request header
+ *
+ * @param string $ifMatch The If-Match HTTP request header
+ * @return $this Fluent Builder
*/
- public function __construct($order = Values::NONE, $from = Values::NONE, $bounds = Values::NONE)
+ public function setIfMatch(string $ifMatch): self
{
+ $this->options['ifMatch'] = $ifMatch;
+ return $this;
+ }
+
+ /**
+ * Provide a friendly representation
+ *
+ * @return string Machine friendly representation
+ */
+ public function __toString(): string
+ {
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Preview.Sync.DeleteSyncListItemOptions ' . $options . ']';
+ }
+}
+
+
+class ReadSyncListItemOptions extends Options
+ {
+ /**
+ * @param string $order
+ * @param string $from
+ * @param string $bounds
+ */
+ public function __construct(
+
+ string $order = Values::NONE,
+ string $from = Values::NONE,
+ string $bounds = Values::NONE
+
+ ) {
$this->options['order'] = $order;
$this->options['from'] = $from;
$this->options['bounds'] = $bounds;
}
/**
- * The order
+ *
*
- * @param string $order The order
+ * @param string $order
* @return $this Fluent Builder
*/
- public function setOrder($order)
+ public function setOrder(string $order): self
{
$this->options['order'] = $order;
return $this;
}
/**
- * The from
+ *
*
- * @param string $from The from
+ * @param string $from
* @return $this Fluent Builder
*/
- public function setFrom($from)
+ public function setFrom(string $from): self
{
$this->options['from'] = $from;
return $this;
}
/**
- * The bounds
+ *
*
- * @param string $bounds The bounds
+ * @param string $bounds
* @return $this Fluent Builder
*/
- public function setBounds($bounds)
+ public function setBounds(string $bounds): self
{
$this->options['bounds'] = $bounds;
return $this;
@@ -84,14 +174,47 @@ public function setBounds($bounds)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
+ {
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Preview.Sync.ReadSyncListItemOptions ' . $options . ']';
+ }
+}
+
+class UpdateSyncListItemOptions extends Options
+ {
+ /**
+ * @param string $ifMatch The If-Match HTTP request header
+ */
+ public function __construct(
+
+ string $ifMatch = Values::NONE
+
+ ) {
+ $this->options['ifMatch'] = $ifMatch;
+ }
+
+ /**
+ * The If-Match HTTP request header
+ *
+ * @param string $ifMatch The If-Match HTTP request header
+ * @return $this Fluent Builder
+ */
+ public function setIfMatch(string $ifMatch): self
+ {
+ $this->options['ifMatch'] = $ifMatch;
+ return $this;
+ }
+
+ /**
+ * Provide a friendly representation
+ *
+ * @return string Machine friendly representation
+ */
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.Sync.ReadSyncListItemOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Preview.Sync.UpdateSyncListItemOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemPage.php
index 1bfb0cf..be491a7 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListItemPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return SyncListItemInstance \Twilio\Rest\Preview\Sync\Service\SyncList\SyncListItemInstance
+ */
+ public function buildInstance(array $payload): SyncListItemInstance
{
- return new SyncListItemInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['listSid']
- );
+ return new SyncListItemInstance($this->version, $payload, $this->solution['serviceSid'], $this->solution['listSid']);
}
/**
@@ -39,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.Sync.SyncListItemPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionContext.php
index 8d74a56..153c239 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionContext.php
@@ -2,63 +2,87 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Preview\Sync\Service\SyncList;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
class SyncListPermissionContext extends InstanceContext
-{
+ {
/**
* Initialize the SyncListPermissionContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The service_sid
- * @param string $listSid Sync List SID or unique name.
- * @param string $identity Identity of the user to whom the Sync List
- * Permission applies.
- * @return \Twilio\Rest\Preview\Sync\Service\SyncList\SyncListPermissionContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid
+ * @param string $listSid Identifier of the Sync List. Either a SID or a unique name.
+ * @param string $identity Arbitrary string identifier representing a user associated with an FPA token, assigned by the developer.
*/
- public function __construct(Version $version, $serviceSid, $listSid, $identity)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $listSid,
+ $identity
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'listSid' => $listSid,
- 'identity' => $identity,
- );
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'listSid' =>
+ $listSid,
+ 'identity' =>
+ $identity,
+ ];
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Lists/' . \rawurlencode($listSid) . '/Permissions/' . \rawurlencode($identity) . '';
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Lists/' . \rawurlencode($listSid)
+ .'/Permissions/' . \rawurlencode($identity)
+ .'';
}
/**
- * Fetch a SyncListPermissionInstance
+ * Delete the SyncListPermissionInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
+ }
+
+
+ /**
+ * Fetch the SyncListPermissionInstance
*
* @return SyncListPermissionInstance Fetched SyncListPermissionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): SyncListPermissionInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new SyncListPermissionInstance(
$this->version,
@@ -69,40 +93,30 @@ public function fetch()
);
}
- /**
- * Deletes the SyncListPermissionInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Update the SyncListPermissionInstance
*
- * @param bool $read Read access.
- * @param bool $write Write access.
- * @param bool $manage Manage access.
+ * @param bool $read Boolean flag specifying whether the identity can read the Sync List.
+ * @param bool $write Boolean flag specifying whether the identity can create, update and delete Items of the Sync List.
+ * @param bool $manage Boolean flag specifying whether the identity can delete the Sync List.
* @return SyncListPermissionInstance Updated SyncListPermissionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($read, $write, $manage)
+ public function update(bool $read, bool $write, bool $manage): SyncListPermissionInstance
{
- $data = Values::of(array(
- 'Read' => Serialize::booleanToString($read),
- 'Write' => Serialize::booleanToString($write),
- 'Manage' => Serialize::booleanToString($manage),
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+
+ $data = Values::of([
+ 'Read' =>
+ Serialize::booleanToString($read),
+ 'Write' =>
+ Serialize::booleanToString($write),
+ 'Manage' =>
+ Serialize::booleanToString($manage),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new SyncListPermissionInstance(
$this->version,
@@ -113,17 +127,18 @@ public function update($read, $write, $manage)
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Preview.Sync.SyncListPermissionContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionInstance.php
index c4db621..3c85ae2 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Preview\Sync\Service\SyncList;
use Twilio\Exceptions\TwilioException;
@@ -14,37 +22,34 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $listSid
- * @property string $identity
- * @property bool $read
- * @property bool $write
- * @property bool $manage
- * @property string $url
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $listSid
+ * @property string|null $identity
+ * @property bool|null $read
+ * @property bool|null $write
+ * @property bool|null $manage
+ * @property string|null $url
*/
class SyncListPermissionInstance extends InstanceResource
{
/**
* Initialize the SyncListPermissionInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid Sync Service Instance SID.
- * @param string $listSid Sync List SID.
- * @param string $identity Identity of the user to whom the Sync List
- * Permission applies.
- * @return \Twilio\Rest\Preview\Sync\Service\SyncList\SyncListPermissionInstance
+ * @param string $serviceSid
+ * @param string $listSid Identifier of the Sync List. Either a SID or a unique name.
+ * @param string $identity Arbitrary string identifier representing a user associated with an FPA token, assigned by the developer.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $listSid, $identity = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $listSid, string $identity = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
'listSid' => Values::array_get($payload, 'list_sid'),
@@ -53,22 +58,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $list
'write' => Values::array_get($payload, 'write'),
'manage' => Values::array_get($payload, 'manage'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'listSid' => $listSid,
- 'identity' => $identity ?: $this->properties['identity'],
- );
+ $this->solution = ['serviceSid' => $serviceSid, 'listSid' => $listSid, 'identity' => $identity ?: $this->properties['identity'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Preview\Sync\Service\SyncList\SyncListPermissionContext Context for this SyncListPermissionInstance
+ * @return SyncListPermissionContext Context for this SyncListPermissionInstance
*/
- protected function proxy()
+ protected function proxy(): SyncListPermissionContext
{
if (!$this->context) {
$this->context = new SyncListPermissionContext(
@@ -83,38 +84,41 @@ protected function proxy()
}
/**
- * Fetch a SyncListPermissionInstance
+ * Delete the SyncListPermissionInstance
*
- * @return SyncListPermissionInstance Fetched SyncListPermissionInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the SyncListPermissionInstance
+ * Fetch the SyncListPermissionInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return SyncListPermissionInstance Fetched SyncListPermissionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): SyncListPermissionInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
* Update the SyncListPermissionInstance
*
- * @param bool $read Read access.
- * @param bool $write Write access.
- * @param bool $manage Manage access.
+ * @param bool $read Boolean flag specifying whether the identity can read the Sync List.
+ * @param bool $write Boolean flag specifying whether the identity can create, update and delete Items of the Sync List.
+ * @param bool $manage Boolean flag specifying whether the identity can delete the Sync List.
* @return SyncListPermissionInstance Updated SyncListPermissionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($read, $write, $manage)
+ public function update(bool $read, bool $write, bool $manage): SyncListPermissionInstance
{
+
return $this->proxy()->update($read, $write, $manage);
}
@@ -125,7 +129,7 @@ public function update($read, $write, $manage)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -144,12 +148,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Preview.Sync.SyncListPermissionInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionList.php
index 35966b5..50b9333 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionList.php
@@ -2,43 +2,79 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Preview\Sync\Service\SyncList;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
+
class SyncListPermissionList extends ListResource
-{
+ {
/**
* Construct the SyncListPermissionList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid Sync Service Instance SID.
- * @param string $listSid Sync List SID.
- * @return \Twilio\Rest\Preview\Sync\Service\SyncList\SyncListPermissionList
+ * @param string $serviceSid
+ * @param string $listSid Identifier of the Sync List. Either a SID or a unique name.
*/
- public function __construct(Version $version, $serviceSid, $listSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid,
+ string $listSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'listSid' => $listSid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ 'listSid' =>
+ $listSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Lists/' . \rawurlencode($listSid)
+ .'/Permissions';
+ }
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Lists/' . \rawurlencode($listSid) . '/Permissions';
+ /**
+ * Reads SyncListPermissionInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return SyncListPermissionInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
- * Streams SyncListPermissionInstance records from the API as a generator
- * stream.
+ * Streams SyncListPermissionInstance records from the API as a generator stream.
* This operation lazily loads records as efficiently as possible until the
* limit
* is reached.
@@ -53,9 +89,9 @@ public function __construct(Version $version, $serviceSid, $listSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -64,26 +100,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads SyncListPermissionInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return SyncListPermissionInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of SyncListPermissionInstance records from the API.
* Request is executed immediately
@@ -91,21 +107,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of SyncListPermissionInstance
+ * @return SyncListPermissionPage Page of SyncListPermissionInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): SyncListPermissionPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new SyncListPermissionPage($this->version, $response, $this->solution);
}
@@ -115,9 +132,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of SyncListPermissionInstance
+ * @return SyncListPermissionPage Page of SyncListPermissionInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): SyncListPermissionPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -127,14 +144,16 @@ public function getPage($targetUrl)
return new SyncListPermissionPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a SyncListPermissionContext
*
- * @param string $identity Identity of the user to whom the Sync List
- * Permission applies.
- * @return \Twilio\Rest\Preview\Sync\Service\SyncList\SyncListPermissionContext
+ * @param string $identity Arbitrary string identifier representing a user associated with an FPA token, assigned by the developer.
*/
- public function getContext($identity)
+ public function getContext(
+ string $identity
+
+ ): SyncListPermissionContext
{
return new SyncListPermissionContext(
$this->version,
@@ -149,8 +168,8 @@ public function getContext($identity)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.Sync.SyncListPermissionList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionPage.php
index 3577830..8e2366d 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncList/SyncListPermissionPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return SyncListPermissionInstance \Twilio\Rest\Preview\Sync\Service\SyncList\SyncListPermissionInstance
+ */
+ public function buildInstance(array $payload): SyncListPermissionInstance
{
- return new SyncListPermissionInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['listSid']
- );
+ return new SyncListPermissionInstance($this->version, $payload, $this->solution['serviceSid'], $this->solution['listSid']);
}
/**
@@ -39,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.Sync.SyncListPermissionPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncListContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncListContext.php
index baecb38..ec8cf6e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncListContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncListContext.php
@@ -2,66 +2,93 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Preview\Sync\Service;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
-use Twilio\Rest\Preview\Sync\Service\SyncList\SyncListItemList;
-use Twilio\Rest\Preview\Sync\Service\SyncList\SyncListPermissionList;
+use Twilio\ListResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Preview\Sync\Service\SyncList\SyncListPermissionList;
+use Twilio\Rest\Preview\Sync\Service\SyncList\SyncListItemList;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property \Twilio\Rest\Preview\Sync\Service\SyncList\SyncListItemList $syncListItems
- * @property \Twilio\Rest\Preview\Sync\Service\SyncList\SyncListPermissionList $syncListPermissions
- * @method \Twilio\Rest\Preview\Sync\Service\SyncList\SyncListItemContext syncListItems(int $index)
+ * @property SyncListPermissionList $syncListPermissions
+ * @property SyncListItemList $syncListItems
* @method \Twilio\Rest\Preview\Sync\Service\SyncList\SyncListPermissionContext syncListPermissions(string $identity)
+ * @method \Twilio\Rest\Preview\Sync\Service\SyncList\SyncListItemContext syncListItems(string $index)
*/
class SyncListContext extends InstanceContext
-{
- protected $_syncListItems = null;
- protected $_syncListPermissions = null;
+ {
+ protected $_syncListPermissions;
+ protected $_syncListItems;
/**
* Initialize the SyncListContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The service_sid
- * @param string $sid The sid
- * @return \Twilio\Rest\Preview\Sync\Service\SyncListContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid
+ * @param string $sid
*/
- public function __construct(Version $version, $serviceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Lists/' . \rawurlencode($sid)
+ .'';
+ }
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Lists/' . \rawurlencode($sid) . '';
+ /**
+ * Delete the SyncListInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a SyncListInstance
+ * Fetch the SyncListInstance
*
* @return SyncListInstance Fetched SyncListInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): SyncListInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new SyncListInstance(
$this->version,
@@ -71,61 +98,47 @@ public function fetch()
);
}
- /**
- * Deletes the SyncListInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
- * Access the syncListItems
- *
- * @return \Twilio\Rest\Preview\Sync\Service\SyncList\SyncListItemList
+ * Access the syncListPermissions
*/
- protected function getSyncListItems()
+ protected function getSyncListPermissions(): SyncListPermissionList
{
- if (!$this->_syncListItems) {
- $this->_syncListItems = new SyncListItemList(
+ if (!$this->_syncListPermissions) {
+ $this->_syncListPermissions = new SyncListPermissionList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sid']
);
}
- return $this->_syncListItems;
+ return $this->_syncListPermissions;
}
/**
- * Access the syncListPermissions
- *
- * @return \Twilio\Rest\Preview\Sync\Service\SyncList\SyncListPermissionList
+ * Access the syncListItems
*/
- protected function getSyncListPermissions()
+ protected function getSyncListItems(): SyncListItemList
{
- if (!$this->_syncListPermissions) {
- $this->_syncListPermissions = new SyncListPermissionList(
+ if (!$this->_syncListItems) {
+ $this->_syncListItems = new SyncListItemList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sid']
);
}
- return $this->_syncListPermissions;
+ return $this->_syncListItems;
}
/**
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -140,10 +153,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -158,12 +171,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Preview.Sync.SyncListContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncListInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncListInstance.php
index d56d6ca..9439999 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncListInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncListInstance.php
@@ -2,53 +2,61 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Preview\Sync\Service;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Preview\Sync\Service\SyncList\SyncListPermissionList;
+use Twilio\Rest\Preview\Sync\Service\SyncList\SyncListItemList;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property string $sid
- * @property string $uniqueName
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $url
- * @property array $links
- * @property string $revision
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $createdBy
+ * @property string|null $sid
+ * @property string|null $uniqueName
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $url
+ * @property array|null $links
+ * @property string|null $revision
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $createdBy
*/
class SyncListInstance extends InstanceResource
{
- protected $_syncListItems = null;
- protected $_syncListPermissions = null;
+ protected $_syncListPermissions;
+ protected $_syncListItems;
/**
* Initialize the SyncListInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The service_sid
- * @param string $sid The sid
- * @return \Twilio\Rest\Preview\Sync\Service\SyncListInstance
+ * @param string $serviceSid
+ * @param string $sid
*/
- public function __construct(Version $version, array $payload, $serviceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'uniqueName' => Values::array_get($payload, 'unique_name'),
'accountSid' => Values::array_get($payload, 'account_sid'),
@@ -59,19 +67,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $sid
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'createdBy' => Values::array_get($payload, 'created_by'),
- );
+ ];
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Preview\Sync\Service\SyncListContext Context for this
- * SyncListInstance
+ * @return SyncListContext Context for this SyncListInstance
*/
- protected function proxy()
+ protected function proxy(): SyncListContext
{
if (!$this->context) {
$this->context = new SyncListContext(
@@ -85,45 +92,43 @@ protected function proxy()
}
/**
- * Fetch a SyncListInstance
+ * Delete the SyncListInstance
*
- * @return SyncListInstance Fetched SyncListInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the SyncListInstance
+ * Fetch the SyncListInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return SyncListInstance Fetched SyncListInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): SyncListInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
- * Access the syncListItems
- *
- * @return \Twilio\Rest\Preview\Sync\Service\SyncList\SyncListItemList
+ * Access the syncListPermissions
*/
- protected function getSyncListItems()
+ protected function getSyncListPermissions(): SyncListPermissionList
{
- return $this->proxy()->syncListItems;
+ return $this->proxy()->syncListPermissions;
}
/**
- * Access the syncListPermissions
- *
- * @return \Twilio\Rest\Preview\Sync\Service\SyncList\SyncListPermissionList
+ * Access the syncListItems
*/
- protected function getSyncListPermissions()
+ protected function getSyncListItems(): SyncListItemList
{
- return $this->proxy()->syncListPermissions;
+ return $this->proxy()->syncListItems;
}
/**
@@ -133,7 +138,7 @@ protected function getSyncListPermissions()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -152,12 +157,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Preview.Sync.SyncListInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncListList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncListList.php
index ecece21..530fd1b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncListList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncListList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Preview\Sync\Service;
@@ -12,52 +19,82 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
+
class SyncListList extends ListResource
-{
+ {
/**
* Construct the SyncListList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The service_sid
- * @return \Twilio\Rest\Preview\Sync\Service\SyncListList
+ * @param string $serviceSid
*/
- public function __construct(Version $version, $serviceSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Lists';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Lists';
}
/**
- * Create a new SyncListInstance
+ * Create the SyncListInstance
*
* @param array|Options $options Optional Arguments
- * @return SyncListInstance Newly created SyncListInstance
+ * @return SyncListInstance Created SyncListInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($options = array())
+ public function create(array $options = []): SyncListInstance
{
+
$options = new Values($options);
- $data = Values::of(array('UniqueName' => $options['uniqueName'],));
+ $data = Values::of([
+ 'UniqueName' =>
+ $options['uniqueName'],
+ ]);
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new SyncListInstance(
+ $this->version,
+ $payload,
+ $this->solution['serviceSid']
);
+ }
+
- return new SyncListInstance($this->version, $payload, $this->solution['serviceSid']);
+ /**
+ * Reads SyncListInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return SyncListInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -76,9 +113,9 @@ public function create($options = array())
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -87,26 +124,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads SyncListInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return SyncListInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of SyncListInstance records from the API.
* Request is executed immediately
@@ -114,21 +131,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of SyncListInstance
+ * @return SyncListPage Page of SyncListInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): SyncListPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new SyncListPage($this->version, $response, $this->solution);
}
@@ -138,9 +156,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of SyncListInstance
+ * @return SyncListPage Page of SyncListInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): SyncListPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -150,15 +168,22 @@ public function getPage($targetUrl)
return new SyncListPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a SyncListContext
*
- * @param string $sid The sid
- * @return \Twilio\Rest\Preview\Sync\Service\SyncListContext
+ * @param string $sid
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): SyncListContext
{
- return new SyncListContext($this->version, $this->solution['serviceSid'], $sid);
+ return new SyncListContext(
+ $this->version,
+ $this->solution['serviceSid'],
+ $sid
+ );
}
/**
@@ -166,8 +191,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.Sync.SyncListList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncListOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncListOptions.php
index 0980849..d0cf33e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncListOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncListOptions.php
@@ -1,10 +1,16 @@
options['uniqueName'] = $uniqueName;
}
/**
- * The unique_name
+ *
*
- * @param string $uniqueName The unique_name
+ * @param string $uniqueName
* @return $this Fluent Builder
*/
- public function setUniqueName($uniqueName)
+ public function setUniqueName(string $uniqueName): self
{
$this->options['uniqueName'] = $uniqueName;
return $this;
@@ -54,14 +70,13 @@ public function setUniqueName($uniqueName)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.Sync.CreateSyncListOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Preview.Sync.CreateSyncListOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
+
+
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncListPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncListPage.php
index 9b5d202..3842b53 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncListPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncListPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return SyncListInstance \Twilio\Rest\Preview\Sync\Service\SyncListInstance
+ */
+ public function buildInstance(array $payload): SyncListInstance
{
return new SyncListInstance($this->version, $payload, $this->solution['serviceSid']);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.Sync.SyncListPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemContext.php
index 3006d00..3a21409 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemContext.php
@@ -2,58 +2,91 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Preview\Sync\Service\SyncMap;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
-use Twilio\Serialize;
+use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
class SyncMapItemContext extends InstanceContext
-{
+ {
/**
* Initialize the SyncMapItemContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The service_sid
- * @param string $mapSid The map_sid
- * @param string $key The key
- * @return \Twilio\Rest\Preview\Sync\Service\SyncMap\SyncMapItemContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid
+ * @param string $mapSid
+ * @param string $key
*/
- public function __construct(Version $version, $serviceSid, $mapSid, $key)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $mapSid,
+ $key
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'mapSid' => $mapSid, 'key' => $key,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'mapSid' =>
+ $mapSid,
+ 'key' =>
+ $key,
+ ];
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Maps/' . \rawurlencode($mapSid) . '/Items/' . \rawurlencode($key) . '';
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Maps/' . \rawurlencode($mapSid)
+ .'/Items/' . \rawurlencode($key)
+ .'';
}
/**
- * Fetch a SyncMapItemInstance
+ * Delete the SyncMapItemInstance
+ *
+ * @param array|Options $options Optional Arguments
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(array $options = []): bool
+ {
+
+ $options = new Values($options);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'If-Match' => $options['ifMatch']]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
+ }
+
+
+ /**
+ * Fetch the SyncMapItemInstance
*
* @return SyncMapItemInstance Fetched SyncMapItemInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): SyncMapItemInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new SyncMapItemInstance(
$this->version,
@@ -64,34 +97,27 @@ public function fetch()
);
}
- /**
- * Deletes the SyncMapItemInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Update the SyncMapItemInstance
*
- * @param array $data The data
+ * @param array $data
+ * @param array|Options $options Optional Arguments
* @return SyncMapItemInstance Updated SyncMapItemInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($data)
+ public function update(array $data, array $options = []): SyncMapItemInstance
{
- $data = Values::of(array('Data' => Serialize::jsonObject($data),));
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $options = new Values($options);
+
+ $data = Values::of([
+ 'Data' =>
+ Serialize::jsonObject($data),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'If-Match' => $options['ifMatch']]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new SyncMapItemInstance(
$this->version,
@@ -102,17 +128,18 @@ public function update($data)
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Preview.Sync.SyncMapItemContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemInstance.php
index ba561bf..99f01c4 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemInstance.php
@@ -2,51 +2,58 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Preview\Sync\Service\SyncMap;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
+use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property string $key
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $mapSid
- * @property string $url
- * @property string $revision
- * @property array $data
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $createdBy
+ * @property string|null $key
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $mapSid
+ * @property string|null $url
+ * @property string|null $revision
+ * @property array|null $data
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $createdBy
*/
class SyncMapItemInstance extends InstanceResource
{
/**
* Initialize the SyncMapItemInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The service_sid
- * @param string $mapSid The map_sid
- * @param string $key The key
- * @return \Twilio\Rest\Preview\Sync\Service\SyncMap\SyncMapItemInstance
+ * @param string $serviceSid
+ * @param string $mapSid
+ * @param string $key
*/
- public function __construct(Version $version, array $payload, $serviceSid, $mapSid, $key = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $mapSid, string $key = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'key' => Values::array_get($payload, 'key'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
@@ -57,25 +64,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $mapS
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'createdBy' => Values::array_get($payload, 'created_by'),
- );
+ ];
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'mapSid' => $mapSid,
- 'key' => $key ?: $this->properties['key'],
- );
+ $this->solution = ['serviceSid' => $serviceSid, 'mapSid' => $mapSid, 'key' => $key ?: $this->properties['key'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Preview\Sync\Service\SyncMap\SyncMapItemContext Context
- * for
- * this
- * SyncMapItemInstance
+ * @return SyncMapItemContext Context for this SyncMapItemInstance
*/
- protected function proxy()
+ protected function proxy(): SyncMapItemContext
{
if (!$this->context) {
$this->context = new SyncMapItemContext(
@@ -90,37 +90,42 @@ protected function proxy()
}
/**
- * Fetch a SyncMapItemInstance
+ * Delete the SyncMapItemInstance
*
- * @return SyncMapItemInstance Fetched SyncMapItemInstance
+ * @param array|Options $options Optional Arguments
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(array $options = []): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete($options);
}
/**
- * Deletes the SyncMapItemInstance
+ * Fetch the SyncMapItemInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return SyncMapItemInstance Fetched SyncMapItemInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): SyncMapItemInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
* Update the SyncMapItemInstance
*
- * @param array $data The data
+ * @param array $data
+ * @param array|Options $options Optional Arguments
* @return SyncMapItemInstance Updated SyncMapItemInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($data)
+ public function update(array $data, array $options = []): SyncMapItemInstance
{
- return $this->proxy()->update($data);
+
+ return $this->proxy()->update($data, $options);
}
/**
@@ -130,7 +135,7 @@ public function update($data)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -149,12 +154,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Preview.Sync.SyncMapItemInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemList.php
index d2e6dd6..0238bae 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Preview\Sync\Service\SyncMap;
@@ -12,51 +19,63 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
class SyncMapItemList extends ListResource
-{
+ {
/**
* Construct the SyncMapItemList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The service_sid
- * @param string $mapSid The map_sid
- * @return \Twilio\Rest\Preview\Sync\Service\SyncMap\SyncMapItemList
+ * @param string $serviceSid
+ * @param string $mapSid
*/
- public function __construct(Version $version, $serviceSid, $mapSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid,
+ string $mapSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'mapSid' => $mapSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Maps/' . \rawurlencode($mapSid) . '/Items';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ 'mapSid' =>
+ $mapSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Maps/' . \rawurlencode($mapSid)
+ .'/Items';
}
/**
- * Create a new SyncMapItemInstance
+ * Create the SyncMapItemInstance
*
- * @param string $key The key
- * @param array $data The data
- * @return SyncMapItemInstance Newly created SyncMapItemInstance
+ * @param string $key
+ * @param array $data
+ * @return SyncMapItemInstance Created SyncMapItemInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($key, $data)
+ public function create(string $key, array $data): SyncMapItemInstance
{
- $data = Values::of(array('Key' => $key, 'Data' => Serialize::jsonObject($data),));
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'Key' =>
+ $key,
+ 'Data' =>
+ Serialize::jsonObject($data),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
return new SyncMapItemInstance(
$this->version,
@@ -66,82 +85,87 @@ public function create($key, $data)
);
}
+
/**
- * Streams SyncMapItemInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Reads SyncMapItemInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
+ * @param int $limit Upper limit for the number of records to return. read()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
+ * page_size is defined but a limit is defined, read()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return SyncMapItemInstance[] Array of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($options, $limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
- * Reads SyncMapItemInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
+ * Streams SyncMapItemInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
+ * @param int $limit Upper limit for the number of records to return. stream()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
+ * page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return SyncMapItemInstance[] Array of results
+ * @return Stream stream of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
/**
* Retrieve a single page of SyncMapItemInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of SyncMapItemInstance
+ * @return SyncMapItemPage Page of SyncMapItemInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): SyncMapItemPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Order' => $options['order'],
- 'From' => $options['from'],
- 'Bounds' => $options['bounds'],
+
+ $params = Values::of([
+ 'Order' =>
+ $options['order'],
+ 'From' =>
+ $options['from'],
+ 'Bounds' =>
+ $options['bounds'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new SyncMapItemPage($this->version, $response, $this->solution);
}
@@ -151,9 +175,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of SyncMapItemInstance
+ * @return SyncMapItemPage Page of SyncMapItemInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): SyncMapItemPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -163,13 +187,16 @@ public function getPage($targetUrl)
return new SyncMapItemPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a SyncMapItemContext
*
- * @param string $key The key
- * @return \Twilio\Rest\Preview\Sync\Service\SyncMap\SyncMapItemContext
+ * @param string $key
*/
- public function getContext($key)
+ public function getContext(
+ string $key
+
+ ): SyncMapItemContext
{
return new SyncMapItemContext(
$this->version,
@@ -184,8 +211,8 @@ public function getContext($key)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.Sync.SyncMapItemList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemOptions.php
index 18943bc..3fce5ef 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemOptions.php
@@ -1,10 +1,16 @@
options['ifMatch'] = $ifMatch;
+ }
+
/**
- * @param string $order The order
- * @param string $from The from
- * @param string $bounds The bounds
+ * The If-Match HTTP request header
+ *
+ * @param string $ifMatch The If-Match HTTP request header
+ * @return $this Fluent Builder
*/
- public function __construct($order = Values::NONE, $from = Values::NONE, $bounds = Values::NONE)
+ public function setIfMatch(string $ifMatch): self
{
+ $this->options['ifMatch'] = $ifMatch;
+ return $this;
+ }
+
+ /**
+ * Provide a friendly representation
+ *
+ * @return string Machine friendly representation
+ */
+ public function __toString(): string
+ {
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Preview.Sync.DeleteSyncMapItemOptions ' . $options . ']';
+ }
+}
+
+
+class ReadSyncMapItemOptions extends Options
+ {
+ /**
+ * @param string $order
+ * @param string $from
+ * @param string $bounds
+ */
+ public function __construct(
+
+ string $order = Values::NONE,
+ string $from = Values::NONE,
+ string $bounds = Values::NONE
+
+ ) {
$this->options['order'] = $order;
$this->options['from'] = $from;
$this->options['bounds'] = $bounds;
}
/**
- * The order
+ *
*
- * @param string $order The order
+ * @param string $order
* @return $this Fluent Builder
*/
- public function setOrder($order)
+ public function setOrder(string $order): self
{
$this->options['order'] = $order;
return $this;
}
/**
- * The from
+ *
*
- * @param string $from The from
+ * @param string $from
* @return $this Fluent Builder
*/
- public function setFrom($from)
+ public function setFrom(string $from): self
{
$this->options['from'] = $from;
return $this;
}
/**
- * The bounds
+ *
*
- * @param string $bounds The bounds
+ * @param string $bounds
* @return $this Fluent Builder
*/
- public function setBounds($bounds)
+ public function setBounds(string $bounds): self
{
$this->options['bounds'] = $bounds;
return $this;
@@ -84,14 +174,47 @@ public function setBounds($bounds)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
+ {
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Preview.Sync.ReadSyncMapItemOptions ' . $options . ']';
+ }
+}
+
+class UpdateSyncMapItemOptions extends Options
+ {
+ /**
+ * @param string $ifMatch The If-Match HTTP request header
+ */
+ public function __construct(
+
+ string $ifMatch = Values::NONE
+
+ ) {
+ $this->options['ifMatch'] = $ifMatch;
+ }
+
+ /**
+ * The If-Match HTTP request header
+ *
+ * @param string $ifMatch The If-Match HTTP request header
+ * @return $this Fluent Builder
+ */
+ public function setIfMatch(string $ifMatch): self
+ {
+ $this->options['ifMatch'] = $ifMatch;
+ return $this;
+ }
+
+ /**
+ * Provide a friendly representation
+ *
+ * @return string Machine friendly representation
+ */
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.Sync.ReadSyncMapItemOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Preview.Sync.UpdateSyncMapItemOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemPage.php
index 9a725f6..c9a7e90 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return SyncMapItemInstance \Twilio\Rest\Preview\Sync\Service\SyncMap\SyncMapItemInstance
+ */
+ public function buildInstance(array $payload): SyncMapItemInstance
{
- return new SyncMapItemInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['mapSid']
- );
+ return new SyncMapItemInstance($this->version, $payload, $this->solution['serviceSid'], $this->solution['mapSid']);
}
/**
@@ -39,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.Sync.SyncMapItemPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionContext.php
index 7a38779..d2486f8 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionContext.php
@@ -2,59 +2,87 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Preview\Sync\Service\SyncMap;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
class SyncMapPermissionContext extends InstanceContext
-{
+ {
/**
* Initialize the SyncMapPermissionContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The service_sid
- * @param string $mapSid Sync Map SID or unique name.
- * @param string $identity Identity of the user to whom the Sync Map Permission
- * applies.
- * @return \Twilio\Rest\Preview\Sync\Service\SyncMap\SyncMapPermissionContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid
+ * @param string $mapSid Identifier of the Sync Map. Either a SID or a unique name.
+ * @param string $identity Arbitrary string identifier representing a user associated with an FPA token, assigned by the developer.
*/
- public function __construct(Version $version, $serviceSid, $mapSid, $identity)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $mapSid,
+ $identity
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'mapSid' => $mapSid, 'identity' => $identity,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'mapSid' =>
+ $mapSid,
+ 'identity' =>
+ $identity,
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Maps/' . \rawurlencode($mapSid)
+ .'/Permissions/' . \rawurlencode($identity)
+ .'';
+ }
+
+ /**
+ * Delete the SyncMapPermissionInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Maps/' . \rawurlencode($mapSid) . '/Permissions/' . \rawurlencode($identity) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a SyncMapPermissionInstance
+ * Fetch the SyncMapPermissionInstance
*
* @return SyncMapPermissionInstance Fetched SyncMapPermissionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): SyncMapPermissionInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new SyncMapPermissionInstance(
$this->version,
@@ -65,40 +93,30 @@ public function fetch()
);
}
- /**
- * Deletes the SyncMapPermissionInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Update the SyncMapPermissionInstance
*
- * @param bool $read Read access.
- * @param bool $write Write access.
- * @param bool $manage Manage access.
+ * @param bool $read Boolean flag specifying whether the identity can read the Sync Map.
+ * @param bool $write Boolean flag specifying whether the identity can create, update and delete Items of the Sync Map.
+ * @param bool $manage Boolean flag specifying whether the identity can delete the Sync Map.
* @return SyncMapPermissionInstance Updated SyncMapPermissionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($read, $write, $manage)
+ public function update(bool $read, bool $write, bool $manage): SyncMapPermissionInstance
{
- $data = Values::of(array(
- 'Read' => Serialize::booleanToString($read),
- 'Write' => Serialize::booleanToString($write),
- 'Manage' => Serialize::booleanToString($manage),
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+
+ $data = Values::of([
+ 'Read' =>
+ Serialize::booleanToString($read),
+ 'Write' =>
+ Serialize::booleanToString($write),
+ 'Manage' =>
+ Serialize::booleanToString($manage),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new SyncMapPermissionInstance(
$this->version,
@@ -109,17 +127,18 @@ public function update($read, $write, $manage)
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Preview.Sync.SyncMapPermissionContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionInstance.php
index 00532cf..6bbdc1e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Preview\Sync\Service\SyncMap;
use Twilio\Exceptions\TwilioException;
@@ -14,37 +22,34 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $mapSid
- * @property string $identity
- * @property bool $read
- * @property bool $write
- * @property bool $manage
- * @property string $url
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $mapSid
+ * @property string|null $identity
+ * @property bool|null $read
+ * @property bool|null $write
+ * @property bool|null $manage
+ * @property string|null $url
*/
class SyncMapPermissionInstance extends InstanceResource
{
/**
* Initialize the SyncMapPermissionInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid Sync Service Instance SID.
- * @param string $mapSid Sync Map SID.
- * @param string $identity Identity of the user to whom the Sync Map Permission
- * applies.
- * @return \Twilio\Rest\Preview\Sync\Service\SyncMap\SyncMapPermissionInstance
+ * @param string $serviceSid
+ * @param string $mapSid Identifier of the Sync Map. Either a SID or a unique name.
+ * @param string $identity Arbitrary string identifier representing a user associated with an FPA token, assigned by the developer.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $mapSid, $identity = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $mapSid, string $identity = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
'mapSid' => Values::array_get($payload, 'map_sid'),
@@ -53,22 +58,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $mapS
'write' => Values::array_get($payload, 'write'),
'manage' => Values::array_get($payload, 'manage'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'mapSid' => $mapSid,
- 'identity' => $identity ?: $this->properties['identity'],
- );
+ $this->solution = ['serviceSid' => $serviceSid, 'mapSid' => $mapSid, 'identity' => $identity ?: $this->properties['identity'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Preview\Sync\Service\SyncMap\SyncMapPermissionContext Context for this SyncMapPermissionInstance
+ * @return SyncMapPermissionContext Context for this SyncMapPermissionInstance
*/
- protected function proxy()
+ protected function proxy(): SyncMapPermissionContext
{
if (!$this->context) {
$this->context = new SyncMapPermissionContext(
@@ -83,38 +84,41 @@ protected function proxy()
}
/**
- * Fetch a SyncMapPermissionInstance
+ * Delete the SyncMapPermissionInstance
*
- * @return SyncMapPermissionInstance Fetched SyncMapPermissionInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the SyncMapPermissionInstance
+ * Fetch the SyncMapPermissionInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return SyncMapPermissionInstance Fetched SyncMapPermissionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): SyncMapPermissionInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
* Update the SyncMapPermissionInstance
*
- * @param bool $read Read access.
- * @param bool $write Write access.
- * @param bool $manage Manage access.
+ * @param bool $read Boolean flag specifying whether the identity can read the Sync Map.
+ * @param bool $write Boolean flag specifying whether the identity can create, update and delete Items of the Sync Map.
+ * @param bool $manage Boolean flag specifying whether the identity can delete the Sync Map.
* @return SyncMapPermissionInstance Updated SyncMapPermissionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($read, $write, $manage)
+ public function update(bool $read, bool $write, bool $manage): SyncMapPermissionInstance
{
+
return $this->proxy()->update($read, $write, $manage);
}
@@ -125,7 +129,7 @@ public function update($read, $write, $manage)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -144,12 +148,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Preview.Sync.SyncMapPermissionInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionList.php
index c9f77ba..85071a9 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionList.php
@@ -2,38 +2,75 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Preview\Sync\Service\SyncMap;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
+
class SyncMapPermissionList extends ListResource
-{
+ {
/**
* Construct the SyncMapPermissionList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid Sync Service Instance SID.
- * @param string $mapSid Sync Map SID.
- * @return \Twilio\Rest\Preview\Sync\Service\SyncMap\SyncMapPermissionList
+ * @param string $serviceSid
+ * @param string $mapSid Identifier of the Sync Map. Either a SID or a unique name.
*/
- public function __construct(Version $version, $serviceSid, $mapSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid,
+ string $mapSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'mapSid' => $mapSid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ 'mapSid' =>
+ $mapSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Maps/' . \rawurlencode($mapSid)
+ .'/Permissions';
+ }
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Maps/' . \rawurlencode($mapSid) . '/Permissions';
+ /**
+ * Reads SyncMapPermissionInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return SyncMapPermissionInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -52,9 +89,9 @@ public function __construct(Version $version, $serviceSid, $mapSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -63,26 +100,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads SyncMapPermissionInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return SyncMapPermissionInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of SyncMapPermissionInstance records from the API.
* Request is executed immediately
@@ -90,21 +107,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of SyncMapPermissionInstance
+ * @return SyncMapPermissionPage Page of SyncMapPermissionInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): SyncMapPermissionPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new SyncMapPermissionPage($this->version, $response, $this->solution);
}
@@ -114,9 +132,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of SyncMapPermissionInstance
+ * @return SyncMapPermissionPage Page of SyncMapPermissionInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): SyncMapPermissionPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -126,14 +144,16 @@ public function getPage($targetUrl)
return new SyncMapPermissionPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a SyncMapPermissionContext
*
- * @param string $identity Identity of the user to whom the Sync Map Permission
- * applies.
- * @return \Twilio\Rest\Preview\Sync\Service\SyncMap\SyncMapPermissionContext
+ * @param string $identity Arbitrary string identifier representing a user associated with an FPA token, assigned by the developer.
*/
- public function getContext($identity)
+ public function getContext(
+ string $identity
+
+ ): SyncMapPermissionContext
{
return new SyncMapPermissionContext(
$this->version,
@@ -148,8 +168,8 @@ public function getContext($identity)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.Sync.SyncMapPermissionList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionPage.php
index d2ad1ba..999be46 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return SyncMapPermissionInstance \Twilio\Rest\Preview\Sync\Service\SyncMap\SyncMapPermissionInstance
+ */
+ public function buildInstance(array $payload): SyncMapPermissionInstance
{
- return new SyncMapPermissionInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['mapSid']
- );
+ return new SyncMapPermissionInstance($this->version, $payload, $this->solution['serviceSid'], $this->solution['mapSid']);
}
/**
@@ -39,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.Sync.SyncMapPermissionPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMapContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMapContext.php
index d452948..38d42ab 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMapContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMapContext.php
@@ -2,66 +2,93 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Preview\Sync\Service;
use Twilio\Exceptions\TwilioException;
+use Twilio\ListResource;
+use Twilio\Values;
+use Twilio\Version;
use Twilio\InstanceContext;
use Twilio\Rest\Preview\Sync\Service\SyncMap\SyncMapItemList;
use Twilio\Rest\Preview\Sync\Service\SyncMap\SyncMapPermissionList;
-use Twilio\Values;
-use Twilio\Version;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property \Twilio\Rest\Preview\Sync\Service\SyncMap\SyncMapItemList $syncMapItems
- * @property \Twilio\Rest\Preview\Sync\Service\SyncMap\SyncMapPermissionList $syncMapPermissions
+ * @property SyncMapItemList $syncMapItems
+ * @property SyncMapPermissionList $syncMapPermissions
* @method \Twilio\Rest\Preview\Sync\Service\SyncMap\SyncMapItemContext syncMapItems(string $key)
* @method \Twilio\Rest\Preview\Sync\Service\SyncMap\SyncMapPermissionContext syncMapPermissions(string $identity)
*/
class SyncMapContext extends InstanceContext
-{
- protected $_syncMapItems = null;
- protected $_syncMapPermissions = null;
+ {
+ protected $_syncMapItems;
+ protected $_syncMapPermissions;
/**
* Initialize the SyncMapContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The service_sid
- * @param string $sid The sid
- * @return \Twilio\Rest\Preview\Sync\Service\SyncMapContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid
+ * @param string $sid
*/
- public function __construct(Version $version, $serviceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Maps/' . \rawurlencode($sid)
+ .'';
+ }
+
+ /**
+ * Delete the SyncMapInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Maps/' . \rawurlencode($sid) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a SyncMapInstance
+ * Fetch the SyncMapInstance
*
* @return SyncMapInstance Fetched SyncMapInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): SyncMapInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new SyncMapInstance(
$this->version,
@@ -71,23 +98,11 @@ public function fetch()
);
}
- /**
- * Deletes the SyncMapInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Access the syncMapItems
- *
- * @return \Twilio\Rest\Preview\Sync\Service\SyncMap\SyncMapItemList
*/
- protected function getSyncMapItems()
+ protected function getSyncMapItems(): SyncMapItemList
{
if (!$this->_syncMapItems) {
$this->_syncMapItems = new SyncMapItemList(
@@ -102,10 +117,8 @@ protected function getSyncMapItems()
/**
* Access the syncMapPermissions
- *
- * @return \Twilio\Rest\Preview\Sync\Service\SyncMap\SyncMapPermissionList
*/
- protected function getSyncMapPermissions()
+ protected function getSyncMapPermissions(): SyncMapPermissionList
{
if (!$this->_syncMapPermissions) {
$this->_syncMapPermissions = new SyncMapPermissionList(
@@ -122,10 +135,10 @@ protected function getSyncMapPermissions()
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -140,10 +153,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -158,12 +171,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Preview.Sync.SyncMapContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMapInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMapInstance.php
index 301ff42..e4fd23f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMapInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMapInstance.php
@@ -2,53 +2,61 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Preview\Sync\Service;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Preview\Sync\Service\SyncMap\SyncMapItemList;
+use Twilio\Rest\Preview\Sync\Service\SyncMap\SyncMapPermissionList;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property string $sid
- * @property string $uniqueName
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $url
- * @property array $links
- * @property string $revision
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $createdBy
+ * @property string|null $sid
+ * @property string|null $uniqueName
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $url
+ * @property array|null $links
+ * @property string|null $revision
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $createdBy
*/
class SyncMapInstance extends InstanceResource
{
- protected $_syncMapItems = null;
- protected $_syncMapPermissions = null;
+ protected $_syncMapItems;
+ protected $_syncMapPermissions;
/**
* Initialize the SyncMapInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The service_sid
- * @param string $sid The sid
- * @return \Twilio\Rest\Preview\Sync\Service\SyncMapInstance
+ * @param string $serviceSid
+ * @param string $sid
*/
- public function __construct(Version $version, array $payload, $serviceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'uniqueName' => Values::array_get($payload, 'unique_name'),
'accountSid' => Values::array_get($payload, 'account_sid'),
@@ -59,19 +67,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $sid
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'createdBy' => Values::array_get($payload, 'created_by'),
- );
+ ];
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Preview\Sync\Service\SyncMapContext Context for this
- * SyncMapInstance
+ * @return SyncMapContext Context for this SyncMapInstance
*/
- protected function proxy()
+ protected function proxy(): SyncMapContext
{
if (!$this->context) {
$this->context = new SyncMapContext(
@@ -85,43 +92,41 @@ protected function proxy()
}
/**
- * Fetch a SyncMapInstance
+ * Delete the SyncMapInstance
*
- * @return SyncMapInstance Fetched SyncMapInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the SyncMapInstance
+ * Fetch the SyncMapInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return SyncMapInstance Fetched SyncMapInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): SyncMapInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
* Access the syncMapItems
- *
- * @return \Twilio\Rest\Preview\Sync\Service\SyncMap\SyncMapItemList
*/
- protected function getSyncMapItems()
+ protected function getSyncMapItems(): SyncMapItemList
{
return $this->proxy()->syncMapItems;
}
/**
* Access the syncMapPermissions
- *
- * @return \Twilio\Rest\Preview\Sync\Service\SyncMap\SyncMapPermissionList
*/
- protected function getSyncMapPermissions()
+ protected function getSyncMapPermissions(): SyncMapPermissionList
{
return $this->proxy()->syncMapPermissions;
}
@@ -133,7 +138,7 @@ protected function getSyncMapPermissions()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -152,12 +157,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Preview.Sync.SyncMapInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMapList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMapList.php
index bc04d9b..c032c17 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMapList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMapList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Preview\Sync\Service;
@@ -12,52 +19,82 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
+
class SyncMapList extends ListResource
-{
+ {
/**
* Construct the SyncMapList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The service_sid
- * @return \Twilio\Rest\Preview\Sync\Service\SyncMapList
+ * @param string $serviceSid
*/
- public function __construct(Version $version, $serviceSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Maps';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Maps';
}
/**
- * Create a new SyncMapInstance
+ * Create the SyncMapInstance
*
* @param array|Options $options Optional Arguments
- * @return SyncMapInstance Newly created SyncMapInstance
+ * @return SyncMapInstance Created SyncMapInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($options = array())
+ public function create(array $options = []): SyncMapInstance
{
+
$options = new Values($options);
- $data = Values::of(array('UniqueName' => $options['uniqueName'],));
+ $data = Values::of([
+ 'UniqueName' =>
+ $options['uniqueName'],
+ ]);
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new SyncMapInstance(
+ $this->version,
+ $payload,
+ $this->solution['serviceSid']
);
+ }
+
- return new SyncMapInstance($this->version, $payload, $this->solution['serviceSid']);
+ /**
+ * Reads SyncMapInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return SyncMapInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -76,9 +113,9 @@ public function create($options = array())
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -87,26 +124,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads SyncMapInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return SyncMapInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of SyncMapInstance records from the API.
* Request is executed immediately
@@ -114,21 +131,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of SyncMapInstance
+ * @return SyncMapPage Page of SyncMapInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): SyncMapPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new SyncMapPage($this->version, $response, $this->solution);
}
@@ -138,9 +156,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of SyncMapInstance
+ * @return SyncMapPage Page of SyncMapInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): SyncMapPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -150,15 +168,22 @@ public function getPage($targetUrl)
return new SyncMapPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a SyncMapContext
*
- * @param string $sid The sid
- * @return \Twilio\Rest\Preview\Sync\Service\SyncMapContext
+ * @param string $sid
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): SyncMapContext
{
- return new SyncMapContext($this->version, $this->solution['serviceSid'], $sid);
+ return new SyncMapContext(
+ $this->version,
+ $this->solution['serviceSid'],
+ $sid
+ );
}
/**
@@ -166,8 +191,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.Sync.SyncMapList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMapOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMapOptions.php
index fd67bd0..e0b1b31 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMapOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMapOptions.php
@@ -1,10 +1,16 @@
options['uniqueName'] = $uniqueName;
}
/**
- * The unique_name
+ *
*
- * @param string $uniqueName The unique_name
+ * @param string $uniqueName
* @return $this Fluent Builder
*/
- public function setUniqueName($uniqueName)
+ public function setUniqueName(string $uniqueName): self
{
$this->options['uniqueName'] = $uniqueName;
return $this;
@@ -54,14 +70,13 @@ public function setUniqueName($uniqueName)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.Sync.CreateSyncMapOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Preview.Sync.CreateSyncMapOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
+
+
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMapPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMapPage.php
index 68fb7ee..dd028b3 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMapPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/Service/SyncMapPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return SyncMapInstance \Twilio\Rest\Preview\Sync\Service\SyncMapInstance
+ */
+ public function buildInstance(array $payload): SyncMapInstance
{
return new SyncMapInstance($this->version, $payload, $this->solution['serviceSid']);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.Sync.SyncMapPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/ServiceContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/ServiceContext.php
index 51d5676..ea9d941 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/ServiceContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/ServiceContext.php
@@ -2,86 +2,103 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Preview\Sync;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Preview\Sync\Service\DocumentList;
-use Twilio\Rest\Preview\Sync\Service\SyncListList;
-use Twilio\Rest\Preview\Sync\Service\SyncMapList;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+use Twilio\Rest\Preview\Sync\Service\SyncListList;
+use Twilio\Rest\Preview\Sync\Service\SyncMapList;
+use Twilio\Rest\Preview\Sync\Service\DocumentList;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property \Twilio\Rest\Preview\Sync\Service\DocumentList $documents
- * @property \Twilio\Rest\Preview\Sync\Service\SyncListList $syncLists
- * @property \Twilio\Rest\Preview\Sync\Service\SyncMapList $syncMaps
+ * @property SyncListList $syncLists
+ * @property SyncMapList $syncMaps
+ * @property DocumentList $documents
+ * @method \Twilio\Rest\Preview\Sync\Service\SyncMapContext syncMaps(string $sid)
* @method \Twilio\Rest\Preview\Sync\Service\DocumentContext documents(string $sid)
* @method \Twilio\Rest\Preview\Sync\Service\SyncListContext syncLists(string $sid)
- * @method \Twilio\Rest\Preview\Sync\Service\SyncMapContext syncMaps(string $sid)
*/
class ServiceContext extends InstanceContext
-{
- protected $_documents = null;
- protected $_syncLists = null;
- protected $_syncMaps = null;
+ {
+ protected $_syncLists;
+ protected $_syncMaps;
+ protected $_documents;
/**
* Initialize the ServiceContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The sid
- * @return \Twilio\Rest\Preview\Sync\ServiceContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Services/' . \rawurlencode($sid) . '';
+ $this->uri = '/Services/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a ServiceInstance
+ * Delete the ServiceInstance
*
- * @return ServiceInstance Fetched ServiceInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new ServiceInstance($this->version, $payload, $this->solution['sid']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Deletes the ServiceInstance
+ * Fetch the ServiceInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return ServiceInstance Fetched ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): ServiceInstance
{
- return $this->version->delete('delete', $this->uri);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
+
+ return new ServiceInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Update the ServiceInstance
*
@@ -89,50 +106,43 @@ public function delete()
* @return ServiceInstance Updated ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ServiceInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'WebhookUrl' => $options['webhookUrl'],
- 'FriendlyName' => $options['friendlyName'],
- 'ReachabilityWebhooksEnabled' => Serialize::booleanToString($options['reachabilityWebhooksEnabled']),
- 'AclEnabled' => Serialize::booleanToString($options['aclEnabled']),
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'WebhookUrl' =>
+ $options['webhookUrl'],
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'ReachabilityWebhooksEnabled' =>
+ Serialize::booleanToString($options['reachabilityWebhooksEnabled']),
+ 'AclEnabled' =>
+ Serialize::booleanToString($options['aclEnabled']),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
+
+ return new ServiceInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
);
-
- return new ServiceInstance($this->version, $payload, $this->solution['sid']);
}
- /**
- * Access the documents
- *
- * @return \Twilio\Rest\Preview\Sync\Service\DocumentList
- */
- protected function getDocuments()
- {
- if (!$this->_documents) {
- $this->_documents = new DocumentList($this->version, $this->solution['sid']);
- }
-
- return $this->_documents;
- }
/**
* Access the syncLists
- *
- * @return \Twilio\Rest\Preview\Sync\Service\SyncListList
*/
- protected function getSyncLists()
+ protected function getSyncLists(): SyncListList
{
if (!$this->_syncLists) {
- $this->_syncLists = new SyncListList($this->version, $this->solution['sid']);
+ $this->_syncLists = new SyncListList(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->_syncLists;
@@ -140,26 +150,42 @@ protected function getSyncLists()
/**
* Access the syncMaps
- *
- * @return \Twilio\Rest\Preview\Sync\Service\SyncMapList
*/
- protected function getSyncMaps()
+ protected function getSyncMaps(): SyncMapList
{
if (!$this->_syncMaps) {
- $this->_syncMaps = new SyncMapList($this->version, $this->solution['sid']);
+ $this->_syncMaps = new SyncMapList(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->_syncMaps;
}
+ /**
+ * Access the documents
+ */
+ protected function getDocuments(): DocumentList
+ {
+ if (!$this->_documents) {
+ $this->_documents = new DocumentList(
+ $this->version,
+ $this->solution['sid']
+ );
+ }
+
+ return $this->_documents;
+ }
+
/**
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -174,10 +200,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -192,12 +218,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Preview.Sync.ServiceContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/ServiceInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/ServiceInstance.php
index 96bdb0f..0f0322b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/ServiceInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/ServiceInstance.php
@@ -2,54 +2,63 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Preview\Sync;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Preview\Sync\Service\SyncListList;
+use Twilio\Rest\Preview\Sync\Service\SyncMapList;
+use Twilio\Rest\Preview\Sync\Service\DocumentList;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property string $sid
- * @property string $accountSid
- * @property string $friendlyName
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
- * @property string $webhookUrl
- * @property bool $reachabilityWebhooksEnabled
- * @property bool $aclEnabled
- * @property array $links
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $friendlyName
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
+ * @property string|null $webhookUrl
+ * @property bool|null $reachabilityWebhooksEnabled
+ * @property bool|null $aclEnabled
+ * @property array|null $links
*/
class ServiceInstance extends InstanceResource
{
- protected $_documents = null;
- protected $_syncLists = null;
- protected $_syncMaps = null;
+ protected $_syncLists;
+ protected $_syncMaps;
+ protected $_documents;
/**
* Initialize the ServiceInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The sid
- * @return \Twilio\Rest\Preview\Sync\ServiceInstance
+ * @param string $sid
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
@@ -60,47 +69,51 @@ public function __construct(Version $version, array $payload, $sid = null)
'reachabilityWebhooksEnabled' => Values::array_get($payload, 'reachability_webhooks_enabled'),
'aclEnabled' => Values::array_get($payload, 'acl_enabled'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Preview\Sync\ServiceContext Context for this
- * ServiceInstance
+ * @return ServiceContext Context for this ServiceInstance
*/
- protected function proxy()
+ protected function proxy(): ServiceContext
{
if (!$this->context) {
- $this->context = new ServiceContext($this->version, $this->solution['sid']);
+ $this->context = new ServiceContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a ServiceInstance
+ * Delete the ServiceInstance
*
- * @return ServiceInstance Fetched ServiceInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the ServiceInstance
+ * Fetch the ServiceInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return ServiceInstance Fetched ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): ServiceInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -110,39 +123,34 @@ public function delete()
* @return ServiceInstance Updated ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ServiceInstance
{
+
return $this->proxy()->update($options);
}
/**
- * Access the documents
- *
- * @return \Twilio\Rest\Preview\Sync\Service\DocumentList
+ * Access the syncLists
*/
- protected function getDocuments()
+ protected function getSyncLists(): SyncListList
{
- return $this->proxy()->documents;
+ return $this->proxy()->syncLists;
}
/**
- * Access the syncLists
- *
- * @return \Twilio\Rest\Preview\Sync\Service\SyncListList
+ * Access the syncMaps
*/
- protected function getSyncLists()
+ protected function getSyncMaps(): SyncMapList
{
- return $this->proxy()->syncLists;
+ return $this->proxy()->syncMaps;
}
/**
- * Access the syncMaps
- *
- * @return \Twilio\Rest\Preview\Sync\Service\SyncMapList
+ * Access the documents
*/
- protected function getSyncMaps()
+ protected function getDocuments(): DocumentList
{
- return $this->proxy()->syncMaps;
+ return $this->proxy()->documents;
}
/**
@@ -152,7 +160,7 @@ protected function getSyncMaps()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -171,12 +179,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Preview.Sync.ServiceInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/ServiceList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/ServiceList.php
index 4d77683..a5b7328 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/ServiceList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/ServiceList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Preview\Sync;
@@ -12,57 +19,82 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
class ServiceList extends ListResource
-{
+ {
/**
* Construct the ServiceList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Preview\Sync\ServiceList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/Services';
}
/**
- * Create a new ServiceInstance
+ * Create the ServiceInstance
*
* @param array|Options $options Optional Arguments
- * @return ServiceInstance Newly created ServiceInstance
+ * @return ServiceInstance Created ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($options = array())
+ public function create(array $options = []): ServiceInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'WebhookUrl' => $options['webhookUrl'],
- 'ReachabilityWebhooksEnabled' => Serialize::booleanToString($options['reachabilityWebhooksEnabled']),
- 'AclEnabled' => Serialize::booleanToString($options['aclEnabled']),
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'WebhookUrl' =>
+ $options['webhookUrl'],
+ 'ReachabilityWebhooksEnabled' =>
+ Serialize::booleanToString($options['reachabilityWebhooksEnabled']),
+ 'AclEnabled' =>
+ Serialize::booleanToString($options['aclEnabled']),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new ServiceInstance(
+ $this->version,
+ $payload
);
+ }
+
- return new ServiceInstance($this->version, $payload);
+ /**
+ * Reads ServiceInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return ServiceInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -81,9 +113,9 @@ public function create($options = array())
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -92,26 +124,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads ServiceInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return ServiceInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of ServiceInstance records from the API.
* Request is executed immediately
@@ -119,21 +131,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of ServiceInstance
+ * @return ServicePage Page of ServiceInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): ServicePage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new ServicePage($this->version, $response, $this->solution);
}
@@ -143,9 +156,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of ServiceInstance
+ * @return ServicePage Page of ServiceInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): ServicePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -155,15 +168,21 @@ public function getPage($targetUrl)
return new ServicePage($this->version, $response, $this->solution);
}
+
/**
* Constructs a ServiceContext
*
- * @param string $sid The sid
- * @return \Twilio\Rest\Preview\Sync\ServiceContext
+ * @param string $sid
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): ServiceContext
{
- return new ServiceContext($this->version, $sid);
+ return new ServiceContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -171,8 +190,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.Sync.ServiceList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/ServiceOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/ServiceOptions.php
index 285d8b9..3e107f9 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/ServiceOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/ServiceOptions.php
@@ -1,10 +1,16 @@
options['friendlyName'] = $friendlyName;
$this->options['webhookUrl'] = $webhookUrl;
$this->options['reachabilityWebhooksEnabled'] = $reachabilityWebhooksEnabled;
@@ -59,48 +96,48 @@ public function __construct($friendlyName = Values::NONE, $webhookUrl = Values::
}
/**
- * The friendly_name
+ *
*
- * @param string $friendlyName The friendly_name
+ * @param string $friendlyName
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
}
/**
- * The webhook_url
+ *
*
- * @param string $webhookUrl The webhook_url
+ * @param string $webhookUrl
* @return $this Fluent Builder
*/
- public function setWebhookUrl($webhookUrl)
+ public function setWebhookUrl(string $webhookUrl): self
{
$this->options['webhookUrl'] = $webhookUrl;
return $this;
}
/**
- * The reachability_webhooks_enabled
+ *
*
- * @param bool $reachabilityWebhooksEnabled The reachability_webhooks_enabled
+ * @param bool $reachabilityWebhooksEnabled
* @return $this Fluent Builder
*/
- public function setReachabilityWebhooksEnabled($reachabilityWebhooksEnabled)
+ public function setReachabilityWebhooksEnabled(bool $reachabilityWebhooksEnabled): self
{
$this->options['reachabilityWebhooksEnabled'] = $reachabilityWebhooksEnabled;
return $this;
}
/**
- * The acl_enabled
+ *
*
- * @param bool $aclEnabled The acl_enabled
+ * @param bool $aclEnabled
* @return $this Fluent Builder
*/
- public function setAclEnabled($aclEnabled)
+ public function setAclEnabled(bool $aclEnabled): self
{
$this->options['aclEnabled'] = $aclEnabled;
return $this;
@@ -111,28 +148,32 @@ public function setAclEnabled($aclEnabled)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.Sync.CreateServiceOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Preview.Sync.CreateServiceOptions ' . $options . ']';
}
}
+
+
+
class UpdateServiceOptions extends Options
-{
+ {
/**
- * @param string $webhookUrl The webhook_url
- * @param string $friendlyName The friendly_name
- * @param bool $reachabilityWebhooksEnabled The reachability_webhooks_enabled
- * @param bool $aclEnabled The acl_enabled
+ * @param string $webhookUrl
+ * @param string $friendlyName
+ * @param bool $reachabilityWebhooksEnabled
+ * @param bool $aclEnabled
*/
- public function __construct($webhookUrl = Values::NONE, $friendlyName = Values::NONE, $reachabilityWebhooksEnabled = Values::NONE, $aclEnabled = Values::NONE)
- {
+ public function __construct(
+
+ string $webhookUrl = Values::NONE,
+ string $friendlyName = Values::NONE,
+ bool $reachabilityWebhooksEnabled = Values::BOOL_NONE,
+ bool $aclEnabled = Values::BOOL_NONE
+
+ ) {
$this->options['webhookUrl'] = $webhookUrl;
$this->options['friendlyName'] = $friendlyName;
$this->options['reachabilityWebhooksEnabled'] = $reachabilityWebhooksEnabled;
@@ -140,48 +181,48 @@ public function __construct($webhookUrl = Values::NONE, $friendlyName = Values::
}
/**
- * The webhook_url
+ *
*
- * @param string $webhookUrl The webhook_url
+ * @param string $webhookUrl
* @return $this Fluent Builder
*/
- public function setWebhookUrl($webhookUrl)
+ public function setWebhookUrl(string $webhookUrl): self
{
$this->options['webhookUrl'] = $webhookUrl;
return $this;
}
/**
- * The friendly_name
+ *
*
- * @param string $friendlyName The friendly_name
+ * @param string $friendlyName
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
}
/**
- * The reachability_webhooks_enabled
+ *
*
- * @param bool $reachabilityWebhooksEnabled The reachability_webhooks_enabled
+ * @param bool $reachabilityWebhooksEnabled
* @return $this Fluent Builder
*/
- public function setReachabilityWebhooksEnabled($reachabilityWebhooksEnabled)
+ public function setReachabilityWebhooksEnabled(bool $reachabilityWebhooksEnabled): self
{
$this->options['reachabilityWebhooksEnabled'] = $reachabilityWebhooksEnabled;
return $this;
}
/**
- * The acl_enabled
+ *
*
- * @param bool $aclEnabled The acl_enabled
+ * @param bool $aclEnabled
* @return $this Fluent Builder
*/
- public function setAclEnabled($aclEnabled)
+ public function setAclEnabled(bool $aclEnabled): self
{
$this->options['aclEnabled'] = $aclEnabled;
return $this;
@@ -192,14 +233,10 @@ public function setAclEnabled($aclEnabled)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.Sync.UpdateServiceOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Preview.Sync.UpdateServiceOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/ServicePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/ServicePage.php
index 6029265..91cb677 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/ServicePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Sync/ServicePage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return ServiceInstance \Twilio\Rest\Preview\Sync\ServiceInstance
+ */
+ public function buildInstance(array $payload): ServiceInstance
{
return new ServiceInstance($this->version, $payload);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.Sync.ServicePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms.php
deleted file mode 100644
index 71b8a35..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms.php
+++ /dev/null
@@ -1,162 +0,0 @@
-version = 'TrustedComms';
- }
-
- /**
- * @return \Twilio\Rest\Preview\TrustedComms\BrandedCallList
- */
- protected function getBrandedCalls()
- {
- if (!$this->_brandedCalls) {
- $this->_brandedCalls = new BrandedCallList($this);
- }
- return $this->_brandedCalls;
- }
-
- /**
- * @return \Twilio\Rest\Preview\TrustedComms\BusinessList
- */
- protected function getBusinesses()
- {
- if (!$this->_businesses) {
- $this->_businesses = new BusinessList($this);
- }
- return $this->_businesses;
- }
-
- /**
- * @return \Twilio\Rest\Preview\TrustedComms\CpsList
- */
- protected function getCps()
- {
- if (!$this->_cps) {
- $this->_cps = new CpsList($this);
- }
- return $this->_cps;
- }
-
- /**
- * @return \Twilio\Rest\Preview\TrustedComms\CurrentCallList
- */
- protected function getCurrentCalls()
- {
- if (!$this->_currentCalls) {
- $this->_currentCalls = new CurrentCallList($this);
- }
- return $this->_currentCalls;
- }
-
- /**
- * @return \Twilio\Rest\Preview\TrustedComms\DeviceList
- */
- protected function getDevices()
- {
- if (!$this->_devices) {
- $this->_devices = new DeviceList($this);
- }
- return $this->_devices;
- }
-
- /**
- * @return \Twilio\Rest\Preview\TrustedComms\PhoneCallList
- */
- protected function getPhoneCalls()
- {
- if (!$this->_phoneCalls) {
- $this->_phoneCalls = new PhoneCallList($this);
- }
- return $this->_phoneCalls;
- }
-
- /**
- * Magic getter to lazy load root resources
- *
- * @param string $name Resource to return
- * @return \Twilio\ListResource The requested resource
- * @throws TwilioException For unknown resource
- */
- public function __get($name)
- {
- $method = 'get' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return $this->$method();
- }
-
- throw new TwilioException('Unknown resource ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $property = $this->$name;
- if (\method_exists($property, 'getContext')) {
- return \call_user_func_array(array($property, 'getContext'), $arguments);
- }
-
- throw new TwilioException('Resource does not have a context');
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.TrustedComms]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/BrandedCallInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/BrandedCallInstance.php
deleted file mode 100644
index dff2932..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/BrandedCallInstance.php
+++ /dev/null
@@ -1,108 +0,0 @@
-properties = array(
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'bgColor' => Values::array_get($payload, 'bg_color'),
- 'brandSid' => Values::array_get($payload, 'brand_sid'),
- 'brandedChannelSid' => Values::array_get($payload, 'branded_channel_sid'),
- 'businessSid' => Values::array_get($payload, 'business_sid'),
- 'callSid' => Values::array_get($payload, 'call_sid'),
- 'caller' => Values::array_get($payload, 'caller'),
- 'createdAt' => Deserialize::dateTime(Values::array_get($payload, 'created_at')),
- 'fontColor' => Values::array_get($payload, 'font_color'),
- 'from' => Values::array_get($payload, 'from'),
- 'logo' => Values::array_get($payload, 'logo'),
- 'phoneNumberSid' => Values::array_get($payload, 'phone_number_sid'),
- 'reason' => Values::array_get($payload, 'reason'),
- 'sid' => Values::array_get($payload, 'sid'),
- 'status' => Values::array_get($payload, 'status'),
- 'to' => Values::array_get($payload, 'to'),
- 'url' => Values::array_get($payload, 'url'),
- 'useCase' => Values::array_get($payload, 'use_case'),
- );
-
- $this->solution = array();
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.TrustedComms.BrandedCallInstance]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/BrandedCallList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/BrandedCallList.php
deleted file mode 100644
index f612b7d..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/BrandedCallList.php
+++ /dev/null
@@ -1,79 +0,0 @@
-solution = array();
-
- $this->uri = '/Business/BrandedCalls';
- }
-
- /**
- * Create a new BrandedCallInstance
- *
- * @param string $from Twilio number from which to brand the call
- * @param string $to The terminating Phone Number
- * @param string $reason The business reason for this phone call
- * @param array|Options $options Optional Arguments
- * @return BrandedCallInstance Newly created BrandedCallInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($from, $to, $reason, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'From' => $from,
- 'To' => $to,
- 'Reason' => $reason,
- 'CallSid' => $options['callSid'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new BrandedCallInstance($this->version, $payload);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.TrustedComms.BrandedCallList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/BrandedCallOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/BrandedCallOptions.php
deleted file mode 100644
index 3d52e4c..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/BrandedCallOptions.php
+++ /dev/null
@@ -1,67 +0,0 @@
-options['callSid'] = $callSid;
- }
-
- /**
- * The Call sid this Branded Call should link to.
- *
- * @param string $callSid The Call sid this Branded Call should link to
- * @return $this Fluent Builder
- */
- public function setCallSid($callSid)
- {
- $this->options['callSid'] = $callSid;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.TrustedComms.CreateBrandedCallOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/BrandedCallPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/BrandedCallPage.php
deleted file mode 100644
index 6835599..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/BrandedCallPage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new BrandedCallInstance($this->version, $payload);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.TrustedComms.BrandedCallPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/Business/Insights/SuccessRateContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/Business/Insights/SuccessRateContext.php
deleted file mode 100644
index 69b3ef8..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/Business/Insights/SuccessRateContext.php
+++ /dev/null
@@ -1,84 +0,0 @@
-solution = array('businessSid' => $businessSid,);
-
- $this->uri = '/Businesses/' . \rawurlencode($businessSid) . '/Insights/SuccessRate';
- }
-
- /**
- * Fetch a SuccessRateInstance
- *
- * @param array|Options $options Optional Arguments
- * @return SuccessRateInstance Fetched SuccessRateInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch($options = array())
- {
- $options = new Values($options);
-
- $params = Values::of(array(
- 'BrandSid' => $options['brandSid'],
- 'BrandedChannelSid' => $options['brandedChannelSid'],
- 'PhoneNumberSid' => $options['phoneNumberSid'],
- 'Country' => $options['country'],
- 'Start' => Serialize::iso8601DateTime($options['start']),
- 'End' => Serialize::iso8601DateTime($options['end']),
- 'Interval' => $options['interval'],
- ));
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new SuccessRateInstance($this->version, $payload, $this->solution['businessSid']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.TrustedComms.SuccessRateContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/Business/Insights/SuccessRateInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/Business/Insights/SuccessRateInstance.php
deleted file mode 100644
index 1186122..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/Business/Insights/SuccessRateInstance.php
+++ /dev/null
@@ -1,120 +0,0 @@
-properties = array(
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'businessSid' => Values::array_get($payload, 'business_sid'),
- 'end' => Deserialize::dateTime(Values::array_get($payload, 'end')),
- 'interval' => Values::array_get($payload, 'interval'),
- 'reports' => Values::array_get($payload, 'reports'),
- 'start' => Deserialize::dateTime(Values::array_get($payload, 'start')),
- 'url' => Values::array_get($payload, 'url'),
- );
-
- $this->solution = array('businessSid' => $businessSid,);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Preview\TrustedComms\Business\Insights\SuccessRateContext Context for this
- * SuccessRateInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new SuccessRateContext($this->version, $this->solution['businessSid']);
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a SuccessRateInstance
- *
- * @param array|Options $options Optional Arguments
- * @return SuccessRateInstance Fetched SuccessRateInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch($options = array())
- {
- return $this->proxy()->fetch($options);
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.TrustedComms.SuccessRateInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/Business/Insights/SuccessRateList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/Business/Insights/SuccessRateList.php
deleted file mode 100644
index 56ab7f6..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/Business/Insights/SuccessRateList.php
+++ /dev/null
@@ -1,54 +0,0 @@
-solution = array('businessSid' => $businessSid,);
- }
-
- /**
- * Constructs a SuccessRateContext
- *
- * @return \Twilio\Rest\Preview\TrustedComms\Business\Insights\SuccessRateContext
- */
- public function getContext()
- {
- return new SuccessRateContext($this->version, $this->solution['businessSid']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.TrustedComms.SuccessRateList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/Business/Insights/SuccessRateOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/Business/Insights/SuccessRateOptions.php
deleted file mode 100644
index e61734e..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/Business/Insights/SuccessRateOptions.php
+++ /dev/null
@@ -1,157 +0,0 @@
-options['brandSid'] = $brandSid;
- $this->options['brandedChannelSid'] = $brandedChannelSid;
- $this->options['phoneNumberSid'] = $phoneNumberSid;
- $this->options['country'] = $country;
- $this->options['start'] = $start;
- $this->options['end'] = $end;
- $this->options['interval'] = $interval;
- }
-
- /**
- * The unique SID identifier of the Brand to filter by.
- *
- * @param string $brandSid Brand Sid.
- * @return $this Fluent Builder
- */
- public function setBrandSid($brandSid)
- {
- $this->options['brandSid'] = $brandSid;
- return $this;
- }
-
- /**
- * The unique SID identifier of the Branded Channel to filter by.
- *
- * @param string $brandedChannelSid Branded Channel Sid.
- * @return $this Fluent Builder
- */
- public function setBrandedChannelSid($brandedChannelSid)
- {
- $this->options['brandedChannelSid'] = $brandedChannelSid;
- return $this;
- }
-
- /**
- * The unique SID identifier of the Phone Number to filter by.
- *
- * @param string $phoneNumberSid Phone Number Sid.
- * @return $this Fluent Builder
- */
- public function setPhoneNumberSid($phoneNumberSid)
- {
- $this->options['phoneNumberSid'] = $phoneNumberSid;
- return $this;
- }
-
- /**
- * The 2-letter ISO 3166 code of the Country to filter by.
- *
- * @param string $country Country 2-letter ISO 3166 code.
- * @return $this Fluent Builder
- */
- public function setCountry($country)
- {
- $this->options['country'] = $country;
- return $this;
- }
-
- /**
- * The start date that for this Success Rate, given in ISO 8601 format. Default value is 30 days ago.
- *
- * @param \DateTime $start The start date that for this Success Rate.
- * @return $this Fluent Builder
- */
- public function setStart($start)
- {
- $this->options['start'] = $start;
- return $this;
- }
-
- /**
- * The end date that for this Success Rate, given in ISO 8601 format. Default value is current timestamp.
- *
- * @param \DateTime $end The end date that for this Success Rate.
- * @return $this Fluent Builder
- */
- public function setEnd($end)
- {
- $this->options['end'] = $end;
- return $this;
- }
-
- /**
- * The Interval of this Success Rate. One of `minute`, `hour`, `day`, `week` or `month`.
- *
- * @param string $interval The Interval of this Success Rate.
- * @return $this Fluent Builder
- */
- public function setInterval($interval)
- {
- $this->options['interval'] = $interval;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.TrustedComms.FetchSuccessRateOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/Business/Insights/SuccessRatePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/Business/Insights/SuccessRatePage.php
deleted file mode 100644
index d078ec6..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/Business/Insights/SuccessRatePage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new SuccessRateInstance($this->version, $payload, $this->solution['businessSid']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.TrustedComms.SuccessRatePage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/Business/InsightsInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/Business/InsightsInstance.php
deleted file mode 100644
index 3ab80f8..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/Business/InsightsInstance.php
+++ /dev/null
@@ -1,67 +0,0 @@
-solution = array('businessSid' => $businessSid,);
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.TrustedComms.InsightsInstance]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/Business/InsightsList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/Business/InsightsList.php
deleted file mode 100644
index ed132ce..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/Business/InsightsList.php
+++ /dev/null
@@ -1,98 +0,0 @@
-solution = array('businessSid' => $businessSid,);
- }
-
- /**
- * Access the successRate
- */
- protected function getSuccessRate()
- {
- if (!$this->_successRate) {
- $this->_successRate = new SuccessRateList($this->version, $this->solution['businessSid']);
- }
-
- return $this->_successRate;
- }
-
- /**
- * Magic getter to lazy load subresources
- *
- * @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
- * @throws TwilioException For unknown subresources
- */
- public function __get($name)
- {
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown subresource ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $property = $this->$name;
- if (\method_exists($property, 'getContext')) {
- return \call_user_func_array(array($property, 'getContext'), $arguments);
- }
-
- throw new TwilioException('Resource does not have a context');
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.TrustedComms.InsightsList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/Business/InsightsPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/Business/InsightsPage.php
deleted file mode 100644
index 2add620..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/Business/InsightsPage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new InsightsInstance($this->version, $payload, $this->solution['businessSid']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.TrustedComms.InsightsPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/BusinessContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/BusinessContext.php
deleted file mode 100644
index 50f7a83..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/BusinessContext.php
+++ /dev/null
@@ -1,125 +0,0 @@
-solution = array('sid' => $sid,);
-
- $this->uri = '/Businesses/' . \rawurlencode($sid) . '';
- }
-
- /**
- * Fetch a BusinessInstance
- *
- * @return BusinessInstance Fetched BusinessInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new BusinessInstance($this->version, $payload, $this->solution['sid']);
- }
-
- /**
- * Access the insights
- *
- * @return \Twilio\Rest\Preview\TrustedComms\Business\InsightsList
- */
- protected function getInsights()
- {
- if (!$this->_insights) {
- $this->_insights = new InsightsList($this->version, $this->solution['sid']);
- }
-
- return $this->_insights;
- }
-
- /**
- * Magic getter to lazy load subresources
- *
- * @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
- * @throws TwilioException For unknown subresources
- */
- public function __get($name)
- {
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown subresource ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $property = $this->$name;
- if (\method_exists($property, 'getContext')) {
- return \call_user_func_array(array($property, 'getContext'), $arguments);
- }
-
- throw new TwilioException('Resource does not have a context');
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.TrustedComms.BusinessContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/BusinessInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/BusinessInstance.php
deleted file mode 100644
index f972534..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/BusinessInstance.php
+++ /dev/null
@@ -1,123 +0,0 @@
-properties = array(
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'sid' => Values::array_get($payload, 'sid'),
- 'url' => Values::array_get($payload, 'url'),
- 'links' => Values::array_get($payload, 'links'),
- );
-
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Preview\TrustedComms\BusinessContext Context for this
- * BusinessInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new BusinessContext($this->version, $this->solution['sid']);
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a BusinessInstance
- *
- * @return BusinessInstance Fetched BusinessInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Access the insights
- *
- * @return \Twilio\Rest\Preview\TrustedComms\Business\InsightsList
- */
- protected function getInsights()
- {
- return $this->proxy()->insights;
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.TrustedComms.BusinessInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/BusinessList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/BusinessList.php
deleted file mode 100644
index 5480e03..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/BusinessList.php
+++ /dev/null
@@ -1,54 +0,0 @@
-solution = array();
- }
-
- /**
- * Constructs a BusinessContext
- *
- * @param string $sid A string that uniquely identifies this Business.
- * @return \Twilio\Rest\Preview\TrustedComms\BusinessContext
- */
- public function getContext($sid)
- {
- return new BusinessContext($this->version, $sid);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.TrustedComms.BusinessList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/BusinessPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/BusinessPage.php
deleted file mode 100644
index 9536fb6..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/BusinessPage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new BusinessInstance($this->version, $payload);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.TrustedComms.BusinessPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/CpsContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/CpsContext.php
deleted file mode 100644
index f49f1fa..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/CpsContext.php
+++ /dev/null
@@ -1,70 +0,0 @@
-solution = array();
-
- $this->uri = '/CPS';
- }
-
- /**
- * Fetch a CpsInstance
- *
- * @return CpsInstance Fetched CpsInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new CpsInstance($this->version, $payload);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.TrustedComms.CpsContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/CpsInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/CpsInstance.php
deleted file mode 100644
index e64112f..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/CpsInstance.php
+++ /dev/null
@@ -1,108 +0,0 @@
-properties = array(
- 'cpsUrl' => Values::array_get($payload, 'cps_url'),
- 'phoneNumber' => Values::array_get($payload, 'phone_number'),
- 'url' => Values::array_get($payload, 'url'),
- );
-
- $this->solution = array();
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Preview\TrustedComms\CpsContext Context for this
- * CpsInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new CpsContext($this->version);
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a CpsInstance
- *
- * @return CpsInstance Fetched CpsInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.TrustedComms.CpsInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/CpsList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/CpsList.php
deleted file mode 100644
index 116a6d4..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/CpsList.php
+++ /dev/null
@@ -1,53 +0,0 @@
-solution = array();
- }
-
- /**
- * Constructs a CpsContext
- *
- * @return \Twilio\Rest\Preview\TrustedComms\CpsContext
- */
- public function getContext()
- {
- return new CpsContext($this->version);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.TrustedComms.CpsList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/CpsPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/CpsPage.php
deleted file mode 100644
index 6c5aa80..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/CpsPage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new CpsInstance($this->version, $payload);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.TrustedComms.CpsPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/CurrentCallContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/CurrentCallContext.php
deleted file mode 100644
index 49fa74a..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/CurrentCallContext.php
+++ /dev/null
@@ -1,70 +0,0 @@
-solution = array();
-
- $this->uri = '/CurrentCall';
- }
-
- /**
- * Fetch a CurrentCallInstance
- *
- * @return CurrentCallInstance Fetched CurrentCallInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new CurrentCallInstance($this->version, $payload);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.TrustedComms.CurrentCallContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/CurrentCallInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/CurrentCallInstance.php
deleted file mode 100644
index 1fbb832..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/CurrentCallInstance.php
+++ /dev/null
@@ -1,132 +0,0 @@
-properties = array(
- 'bgColor' => Values::array_get($payload, 'bg_color'),
- 'caller' => Values::array_get($payload, 'caller'),
- 'createdAt' => Deserialize::dateTime(Values::array_get($payload, 'created_at')),
- 'fontColor' => Values::array_get($payload, 'font_color'),
- 'from' => Values::array_get($payload, 'from'),
- 'logo' => Values::array_get($payload, 'logo'),
- 'manager' => Values::array_get($payload, 'manager'),
- 'reason' => Values::array_get($payload, 'reason'),
- 'shieldImg' => Values::array_get($payload, 'shield_img'),
- 'sid' => Values::array_get($payload, 'sid'),
- 'status' => Values::array_get($payload, 'status'),
- 'to' => Values::array_get($payload, 'to'),
- 'url' => Values::array_get($payload, 'url'),
- 'useCase' => Values::array_get($payload, 'use_case'),
- );
-
- $this->solution = array();
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Preview\TrustedComms\CurrentCallContext Context for
- * this
- * CurrentCallInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new CurrentCallContext($this->version);
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a CurrentCallInstance
- *
- * @return CurrentCallInstance Fetched CurrentCallInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.TrustedComms.CurrentCallInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/CurrentCallList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/CurrentCallList.php
deleted file mode 100644
index cf2d84d..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/CurrentCallList.php
+++ /dev/null
@@ -1,53 +0,0 @@
-solution = array();
- }
-
- /**
- * Constructs a CurrentCallContext
- *
- * @return \Twilio\Rest\Preview\TrustedComms\CurrentCallContext
- */
- public function getContext()
- {
- return new CurrentCallContext($this->version);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.TrustedComms.CurrentCallList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/CurrentCallPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/CurrentCallPage.php
deleted file mode 100644
index 8c66830..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/CurrentCallPage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new CurrentCallInstance($this->version, $payload);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.TrustedComms.CurrentCallPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/DeviceInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/DeviceInstance.php
deleted file mode 100644
index 4c64a47..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/DeviceInstance.php
+++ /dev/null
@@ -1,79 +0,0 @@
-properties = array(
- 'bindingSid' => Values::array_get($payload, 'binding_sid'),
- 'phoneNumber' => Values::array_get($payload, 'phone_number'),
- 'sid' => Values::array_get($payload, 'sid'),
- 'url' => Values::array_get($payload, 'url'),
- );
-
- $this->solution = array();
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.TrustedComms.DeviceInstance]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/DeviceList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/DeviceList.php
deleted file mode 100644
index 7d480b4..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/DeviceList.php
+++ /dev/null
@@ -1,69 +0,0 @@
-solution = array();
-
- $this->uri = '/Devices';
- }
-
- /**
- * Create a new DeviceInstance
- *
- * @param string $phoneNumber The end user Phone Number
- * @param string $pushToken The Push Token for this Phone Number
- * @return DeviceInstance Newly created DeviceInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($phoneNumber, $pushToken)
- {
- $data = Values::of(array('PhoneNumber' => $phoneNumber, 'PushToken' => $pushToken,));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new DeviceInstance($this->version, $payload);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.TrustedComms.DeviceList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/DevicePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/DevicePage.php
deleted file mode 100644
index fc0ee6a..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/DevicePage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new DeviceInstance($this->version, $payload);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.TrustedComms.DevicePage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/PhoneCallInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/PhoneCallInstance.php
deleted file mode 100644
index c1076d3..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/PhoneCallInstance.php
+++ /dev/null
@@ -1,108 +0,0 @@
-properties = array(
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'bgColor' => Values::array_get($payload, 'bg_color'),
- 'brandSid' => Values::array_get($payload, 'brand_sid'),
- 'brandedChannelSid' => Values::array_get($payload, 'branded_channel_sid'),
- 'businessSid' => Values::array_get($payload, 'business_sid'),
- 'callSid' => Values::array_get($payload, 'call_sid'),
- 'caller' => Values::array_get($payload, 'caller'),
- 'createdAt' => Deserialize::dateTime(Values::array_get($payload, 'created_at')),
- 'fontColor' => Values::array_get($payload, 'font_color'),
- 'from' => Values::array_get($payload, 'from'),
- 'logo' => Values::array_get($payload, 'logo'),
- 'phoneNumberSid' => Values::array_get($payload, 'phone_number_sid'),
- 'reason' => Values::array_get($payload, 'reason'),
- 'sid' => Values::array_get($payload, 'sid'),
- 'status' => Values::array_get($payload, 'status'),
- 'to' => Values::array_get($payload, 'to'),
- 'url' => Values::array_get($payload, 'url'),
- 'useCase' => Values::array_get($payload, 'use_case'),
- );
-
- $this->solution = array();
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.TrustedComms.PhoneCallInstance]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/PhoneCallList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/PhoneCallList.php
deleted file mode 100644
index 8b9d5e1..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/PhoneCallList.php
+++ /dev/null
@@ -1,106 +0,0 @@
-solution = array();
-
- $this->uri = '/Business/PhoneCalls';
- }
-
- /**
- * Create a new PhoneCallInstance
- *
- * @param string $from Twilio number from which to originate the call
- * @param string $to The terminating Phone Number
- * @param array|Options $options Optional Arguments
- * @return PhoneCallInstance Newly created PhoneCallInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($from, $to, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'From' => $from,
- 'To' => $to,
- 'Reason' => $options['reason'],
- 'ApplicationSid' => $options['applicationSid'],
- 'CallerId' => $options['callerId'],
- 'FallbackMethod' => $options['fallbackMethod'],
- 'FallbackUrl' => $options['fallbackUrl'],
- 'MachineDetection' => $options['machineDetection'],
- 'MachineDetectionSilenceTimeout' => $options['machineDetectionSilenceTimeout'],
- 'MachineDetectionSpeechEndThreshold' => $options['machineDetectionSpeechEndThreshold'],
- 'MachineDetectionSpeechThreshold' => $options['machineDetectionSpeechThreshold'],
- 'MachineDetectionTimeout' => $options['machineDetectionTimeout'],
- 'Method' => $options['method'],
- 'Record' => Serialize::booleanToString($options['record']),
- 'RecordingChannels' => $options['recordingChannels'],
- 'RecordingStatusCallback' => $options['recordingStatusCallback'],
- 'RecordingStatusCallbackEvent' => Serialize::map($options['recordingStatusCallbackEvent'], function ($e) {
- return $e;
- }),
- 'RecordingStatusCallbackMethod' => $options['recordingStatusCallbackMethod'],
- 'SendDigits' => $options['sendDigits'],
- 'SipAuthPassword' => $options['sipAuthPassword'],
- 'SipAuthUsername' => $options['sipAuthUsername'],
- 'StatusCallback' => $options['statusCallback'],
- 'StatusCallbackEvent' => Serialize::map($options['statusCallbackEvent'], function ($e) {
- return $e;
- }),
- 'StatusCallbackMethod' => $options['statusCallbackMethod'],
- 'Timeout' => $options['timeout'],
- 'Trim' => $options['trim'],
- 'Url' => $options['url'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new PhoneCallInstance($this->version, $payload);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.TrustedComms.PhoneCallList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/PhoneCallOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/PhoneCallOptions.php
deleted file mode 100644
index 1928121..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/PhoneCallOptions.php
+++ /dev/null
@@ -1,466 +0,0 @@
-options['reason'] = $reason;
- $this->options['applicationSid'] = $applicationSid;
- $this->options['callerId'] = $callerId;
- $this->options['fallbackMethod'] = $fallbackMethod;
- $this->options['fallbackUrl'] = $fallbackUrl;
- $this->options['machineDetection'] = $machineDetection;
- $this->options['machineDetectionSilenceTimeout'] = $machineDetectionSilenceTimeout;
- $this->options['machineDetectionSpeechEndThreshold'] = $machineDetectionSpeechEndThreshold;
- $this->options['machineDetectionSpeechThreshold'] = $machineDetectionSpeechThreshold;
- $this->options['machineDetectionTimeout'] = $machineDetectionTimeout;
- $this->options['method'] = $method;
- $this->options['record'] = $record;
- $this->options['recordingChannels'] = $recordingChannels;
- $this->options['recordingStatusCallback'] = $recordingStatusCallback;
- $this->options['recordingStatusCallbackEvent'] = $recordingStatusCallbackEvent;
- $this->options['recordingStatusCallbackMethod'] = $recordingStatusCallbackMethod;
- $this->options['sendDigits'] = $sendDigits;
- $this->options['sipAuthPassword'] = $sipAuthPassword;
- $this->options['sipAuthUsername'] = $sipAuthUsername;
- $this->options['statusCallback'] = $statusCallback;
- $this->options['statusCallbackEvent'] = $statusCallbackEvent;
- $this->options['statusCallbackMethod'] = $statusCallbackMethod;
- $this->options['timeout'] = $timeout;
- $this->options['trim'] = $trim;
- $this->options['url'] = $url;
- }
-
- /**
- * The business reason for this phone call that will appear in the terminating device's screen. Max 50 characters.
- *
- * @param string $reason The business reason for this phone call
- * @return $this Fluent Builder
- */
- public function setReason($reason)
- {
- $this->options['reason'] = $reason;
- return $this;
- }
-
- /**
- * Refers to the parameter with the same name when [initiating a call via Voice API](https://www.twilio.com/docs/voice/api/call#create-a-call-resource)
- *
- * @param string $applicationSid Refers to the Voice API Initiate Call parameter
- * @return $this Fluent Builder
- */
- public function setApplicationSid($applicationSid)
- {
- $this->options['applicationSid'] = $applicationSid;
- return $this;
- }
-
- /**
- * Refers to the parameter with the same name when [initiating a call via Voice API](https://www.twilio.com/docs/voice/api/call#create-a-call-resource)
- *
- * @param string $callerId Refers to the Voice API Initiate Call parameter
- * @return $this Fluent Builder
- */
- public function setCallerId($callerId)
- {
- $this->options['callerId'] = $callerId;
- return $this;
- }
-
- /**
- * Refers to the parameter with the same name when [initiating a call via Voice API](https://www.twilio.com/docs/voice/api/call#create-a-call-resource)
- *
- * @param string $fallbackMethod Refers to the Voice API Initiate Call parameter
- * @return $this Fluent Builder
- */
- public function setFallbackMethod($fallbackMethod)
- {
- $this->options['fallbackMethod'] = $fallbackMethod;
- return $this;
- }
-
- /**
- * Refers to the parameter with the same name when [initiating a call via Voice API](https://www.twilio.com/docs/voice/api/call#create-a-call-resource)
- *
- * @param string $fallbackUrl Refers to the Voice API Initiate Call parameter
- * @return $this Fluent Builder
- */
- public function setFallbackUrl($fallbackUrl)
- {
- $this->options['fallbackUrl'] = $fallbackUrl;
- return $this;
- }
-
- /**
- * Refers to the parameter with the same name when [initiating a call via Voice API](https://www.twilio.com/docs/voice/api/call#create-a-call-resource)
- *
- * @param string $machineDetection Refers to the Voice API Initiate Call
- * parameter
- * @return $this Fluent Builder
- */
- public function setMachineDetection($machineDetection)
- {
- $this->options['machineDetection'] = $machineDetection;
- return $this;
- }
-
- /**
- * Refers to the parameter with the same name when [initiating a call via Voice API](https://www.twilio.com/docs/voice/api/call#create-a-call-resource)
- *
- * @param int $machineDetectionSilenceTimeout Refers to the Voice API Initiate
- * Call parameter
- * @return $this Fluent Builder
- */
- public function setMachineDetectionSilenceTimeout($machineDetectionSilenceTimeout)
- {
- $this->options['machineDetectionSilenceTimeout'] = $machineDetectionSilenceTimeout;
- return $this;
- }
-
- /**
- * Refers to the parameter with the same name when [initiating a call via Voice API](https://www.twilio.com/docs/voice/api/call#create-a-call-resource)
- *
- * @param int $machineDetectionSpeechEndThreshold Refers to the Voice API
- * Initiate Call parameter
- * @return $this Fluent Builder
- */
- public function setMachineDetectionSpeechEndThreshold($machineDetectionSpeechEndThreshold)
- {
- $this->options['machineDetectionSpeechEndThreshold'] = $machineDetectionSpeechEndThreshold;
- return $this;
- }
-
- /**
- * Refers to the parameter with the same name when [initiating a call via Voice API](https://www.twilio.com/docs/voice/api/call#create-a-call-resource)
- *
- * @param int $machineDetectionSpeechThreshold Refers to the Voice API Initiate
- * Call parameter
- * @return $this Fluent Builder
- */
- public function setMachineDetectionSpeechThreshold($machineDetectionSpeechThreshold)
- {
- $this->options['machineDetectionSpeechThreshold'] = $machineDetectionSpeechThreshold;
- return $this;
- }
-
- /**
- * Refers to the parameter with the same name when [initiating a call via Voice API](https://www.twilio.com/docs/voice/api/call#create-a-call-resource)
- *
- * @param int $machineDetectionTimeout Refers to the Voice API Initiate Call
- * parameter
- * @return $this Fluent Builder
- */
- public function setMachineDetectionTimeout($machineDetectionTimeout)
- {
- $this->options['machineDetectionTimeout'] = $machineDetectionTimeout;
- return $this;
- }
-
- /**
- * Refers to the parameter with the same name when [initiating a call via Voice API](https://www.twilio.com/docs/voice/api/call#create-a-call-resource)
- *
- * @param string $method Refers to the Voice API Initiate Call parameter
- * @return $this Fluent Builder
- */
- public function setMethod($method)
- {
- $this->options['method'] = $method;
- return $this;
- }
-
- /**
- * Refers to the parameter with the same name when [initiating a call via Voice API](https://www.twilio.com/docs/voice/api/call#create-a-call-resource)
- *
- * @param bool $record Refers to the Voice API Initiate Call parameter
- * @return $this Fluent Builder
- */
- public function setRecord($record)
- {
- $this->options['record'] = $record;
- return $this;
- }
-
- /**
- * Refers to the parameter with the same name when [initiating a call via Voice API](https://www.twilio.com/docs/voice/api/call#create-a-call-resource)
- *
- * @param string $recordingChannels Refers to the Voice API Initiate Call
- * parameter
- * @return $this Fluent Builder
- */
- public function setRecordingChannels($recordingChannels)
- {
- $this->options['recordingChannels'] = $recordingChannels;
- return $this;
- }
-
- /**
- * Refers to the parameter with the same name when [initiating a call via Voice API](https://www.twilio.com/docs/voice/api/call#create-a-call-resource)
- *
- * @param string $recordingStatusCallback Refers to the Voice API Initiate Call
- * parameter
- * @return $this Fluent Builder
- */
- public function setRecordingStatusCallback($recordingStatusCallback)
- {
- $this->options['recordingStatusCallback'] = $recordingStatusCallback;
- return $this;
- }
-
- /**
- * Refers to the parameter with the same name when [initiating a call via Voice API](https://www.twilio.com/docs/voice/api/call#create-a-call-resource)
- *
- * @param string $recordingStatusCallbackEvent Refers to the Voice API Initiate
- * Call parameter
- * @return $this Fluent Builder
- */
- public function setRecordingStatusCallbackEvent($recordingStatusCallbackEvent)
- {
- $this->options['recordingStatusCallbackEvent'] = $recordingStatusCallbackEvent;
- return $this;
- }
-
- /**
- * Refers to the parameter with the same name when [initiating a call via Voice API](https://www.twilio.com/docs/voice/api/call#create-a-call-resource)
- *
- * @param string $recordingStatusCallbackMethod Refers to the Voice API
- * Initiate Call parameter
- * @return $this Fluent Builder
- */
- public function setRecordingStatusCallbackMethod($recordingStatusCallbackMethod)
- {
- $this->options['recordingStatusCallbackMethod'] = $recordingStatusCallbackMethod;
- return $this;
- }
-
- /**
- * Refers to the parameter with the same name when [initiating a call via Voice API](https://www.twilio.com/docs/voice/api/call#create-a-call-resource)
- *
- * @param string $sendDigits Refers to the Voice API Initiate Call parameter
- * @return $this Fluent Builder
- */
- public function setSendDigits($sendDigits)
- {
- $this->options['sendDigits'] = $sendDigits;
- return $this;
- }
-
- /**
- * Refers to the parameter with the same name when [initiating a call via Voice API](https://www.twilio.com/docs/voice/api/call#create-a-call-resource)
- *
- * @param string $sipAuthPassword Refers to the Voice API Initiate Call
- * parameter
- * @return $this Fluent Builder
- */
- public function setSipAuthPassword($sipAuthPassword)
- {
- $this->options['sipAuthPassword'] = $sipAuthPassword;
- return $this;
- }
-
- /**
- * Refers to the parameter with the same name when [initiating a call via Voice API](https://www.twilio.com/docs/voice/api/call#create-a-call-resource)
- *
- * @param string $sipAuthUsername Refers to the Voice API Initiate Call
- * parameter
- * @return $this Fluent Builder
- */
- public function setSipAuthUsername($sipAuthUsername)
- {
- $this->options['sipAuthUsername'] = $sipAuthUsername;
- return $this;
- }
-
- /**
- * Refers to the parameter with the same name when [initiating a call via Voice API](https://www.twilio.com/docs/voice/api/call#create-a-call-resource)
- *
- * @param string $statusCallback Refers to the Voice API Initiate Call parameter
- * @return $this Fluent Builder
- */
- public function setStatusCallback($statusCallback)
- {
- $this->options['statusCallback'] = $statusCallback;
- return $this;
- }
-
- /**
- * Refers to the parameter with the same name when [initiating a call via Voice API](https://www.twilio.com/docs/voice/api/call#create-a-call-resource)
- *
- * @param string $statusCallbackEvent Refers to the Voice API Initiate Call
- * parameter
- * @return $this Fluent Builder
- */
- public function setStatusCallbackEvent($statusCallbackEvent)
- {
- $this->options['statusCallbackEvent'] = $statusCallbackEvent;
- return $this;
- }
-
- /**
- * Refers to the parameter with the same name when [initiating a call via Voice API](https://www.twilio.com/docs/voice/api/call#create-a-call-resource)
- *
- * @param string $statusCallbackMethod Refers to the Voice API Initiate Call
- * parameter
- * @return $this Fluent Builder
- */
- public function setStatusCallbackMethod($statusCallbackMethod)
- {
- $this->options['statusCallbackMethod'] = $statusCallbackMethod;
- return $this;
- }
-
- /**
- * Refers to the parameter with the same name when [initiating a call via Voice API](https://www.twilio.com/docs/voice/api/call#create-a-call-resource)
- *
- * @param int $timeout Refers to the Voice API Initiate Call parameter
- * @return $this Fluent Builder
- */
- public function setTimeout($timeout)
- {
- $this->options['timeout'] = $timeout;
- return $this;
- }
-
- /**
- * Refers to the parameter with the same name when [initiating a call via Voice API](https://www.twilio.com/docs/voice/api/call#create-a-call-resource)
- *
- * @param string $trim Refers to the Voice API Initiate Call parameter
- * @return $this Fluent Builder
- */
- public function setTrim($trim)
- {
- $this->options['trim'] = $trim;
- return $this;
- }
-
- /**
- * Refers to the parameter with the same name when [initiating a call via Voice API](https://www.twilio.com/docs/voice/api/call#create-a-call-resource)
- *
- * @param string $url Refers to the Voice API Initiate Call parameter
- * @return $this Fluent Builder
- */
- public function setUrl($url)
- {
- $this->options['url'] = $url;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.TrustedComms.CreatePhoneCallOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/PhoneCallPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/PhoneCallPage.php
deleted file mode 100644
index 79920cb..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/TrustedComms/PhoneCallPage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new PhoneCallInstance($this->version, $payload);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.TrustedComms.PhoneCallPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand.php
deleted file mode 100644
index 06aba07..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand.php
+++ /dev/null
@@ -1,92 +0,0 @@
-version = 'understand';
- }
-
- /**
- * @return \Twilio\Rest\Preview\Understand\AssistantList
- */
- protected function getAssistants()
- {
- if (!$this->_assistants) {
- $this->_assistants = new AssistantList($this);
- }
- return $this->_assistants;
- }
-
- /**
- * Magic getter to lazy load root resources
- *
- * @param string $name Resource to return
- * @return \Twilio\ListResource The requested resource
- * @throws TwilioException For unknown resource
- */
- public function __get($name)
- {
- $method = 'get' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return $this->$method();
- }
-
- throw new TwilioException('Unknown resource ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $property = $this->$name;
- if (\method_exists($property, 'getContext')) {
- return \call_user_func_array(array($property, 'getContext'), $arguments);
- }
-
- throw new TwilioException('Resource does not have a context');
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.Understand]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/AssistantFallbackActionsContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/AssistantFallbackActionsContext.php
deleted file mode 100644
index 5cc5018..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/AssistantFallbackActionsContext.php
+++ /dev/null
@@ -1,106 +0,0 @@
-solution = array('assistantSid' => $assistantSid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/FallbackActions';
- }
-
- /**
- * Fetch a AssistantFallbackActionsInstance
- *
- * @return AssistantFallbackActionsInstance Fetched
- * AssistantFallbackActionsInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new AssistantFallbackActionsInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid']
- );
- }
-
- /**
- * Update the AssistantFallbackActionsInstance
- *
- * @param array|Options $options Optional Arguments
- * @return AssistantFallbackActionsInstance Updated
- * AssistantFallbackActionsInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array('FallbackActions' => Serialize::jsonObject($options['fallbackActions']),));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new AssistantFallbackActionsInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid']
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.Understand.AssistantFallbackActionsContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/AssistantFallbackActionsInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/AssistantFallbackActionsInstance.php
deleted file mode 100644
index 2500f34..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/AssistantFallbackActionsInstance.php
+++ /dev/null
@@ -1,129 +0,0 @@
-properties = array(
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'assistantSid' => Values::array_get($payload, 'assistant_sid'),
- 'url' => Values::array_get($payload, 'url'),
- 'data' => Values::array_get($payload, 'data'),
- );
-
- $this->solution = array('assistantSid' => $assistantSid,);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\AssistantFallbackActionsContext Context for this
- * AssistantFallbackActionsInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new AssistantFallbackActionsContext(
- $this->version,
- $this->solution['assistantSid']
- );
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a AssistantFallbackActionsInstance
- *
- * @return AssistantFallbackActionsInstance Fetched
- * AssistantFallbackActionsInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Update the AssistantFallbackActionsInstance
- *
- * @param array|Options $options Optional Arguments
- * @return AssistantFallbackActionsInstance Updated
- * AssistantFallbackActionsInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- return $this->proxy()->update($options);
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.Understand.AssistantFallbackActionsInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/AssistantFallbackActionsList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/AssistantFallbackActionsList.php
deleted file mode 100644
index 71e4577..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/AssistantFallbackActionsList.php
+++ /dev/null
@@ -1,54 +0,0 @@
-solution = array('assistantSid' => $assistantSid,);
- }
-
- /**
- * Constructs a AssistantFallbackActionsContext
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\AssistantFallbackActionsContext
- */
- public function getContext()
- {
- return new AssistantFallbackActionsContext($this->version, $this->solution['assistantSid']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.Understand.AssistantFallbackActionsList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/AssistantFallbackActionsOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/AssistantFallbackActionsOptions.php
deleted file mode 100644
index b7f5f78..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/AssistantFallbackActionsOptions.php
+++ /dev/null
@@ -1,67 +0,0 @@
-options['fallbackActions'] = $fallbackActions;
- }
-
- /**
- * The fallback_actions
- *
- * @param array $fallbackActions The fallback_actions
- * @return $this Fluent Builder
- */
- public function setFallbackActions($fallbackActions)
- {
- $this->options['fallbackActions'] = $fallbackActions;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.Understand.UpdateAssistantFallbackActionsOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/AssistantFallbackActionsPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/AssistantFallbackActionsPage.php
deleted file mode 100644
index 5597b63..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/AssistantFallbackActionsPage.php
+++ /dev/null
@@ -1,45 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new AssistantFallbackActionsInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid']
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.Understand.AssistantFallbackActionsPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/AssistantInitiationActionsContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/AssistantInitiationActionsContext.php
deleted file mode 100644
index 500d81c..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/AssistantInitiationActionsContext.php
+++ /dev/null
@@ -1,108 +0,0 @@
-solution = array('assistantSid' => $assistantSid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/InitiationActions';
- }
-
- /**
- * Fetch a AssistantInitiationActionsInstance
- *
- * @return AssistantInitiationActionsInstance Fetched
- * AssistantInitiationActionsInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new AssistantInitiationActionsInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid']
- );
- }
-
- /**
- * Update the AssistantInitiationActionsInstance
- *
- * @param array|Options $options Optional Arguments
- * @return AssistantInitiationActionsInstance Updated
- * AssistantInitiationActionsInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'InitiationActions' => Serialize::jsonObject($options['initiationActions']),
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new AssistantInitiationActionsInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid']
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.Understand.AssistantInitiationActionsContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/AssistantInitiationActionsInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/AssistantInitiationActionsInstance.php
deleted file mode 100644
index 502e274..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/AssistantInitiationActionsInstance.php
+++ /dev/null
@@ -1,129 +0,0 @@
-properties = array(
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'assistantSid' => Values::array_get($payload, 'assistant_sid'),
- 'url' => Values::array_get($payload, 'url'),
- 'data' => Values::array_get($payload, 'data'),
- );
-
- $this->solution = array('assistantSid' => $assistantSid,);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\AssistantInitiationActionsContext Context for this
- * AssistantInitiationActionsInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new AssistantInitiationActionsContext(
- $this->version,
- $this->solution['assistantSid']
- );
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a AssistantInitiationActionsInstance
- *
- * @return AssistantInitiationActionsInstance Fetched
- * AssistantInitiationActionsInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Update the AssistantInitiationActionsInstance
- *
- * @param array|Options $options Optional Arguments
- * @return AssistantInitiationActionsInstance Updated
- * AssistantInitiationActionsInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- return $this->proxy()->update($options);
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.Understand.AssistantInitiationActionsInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/AssistantInitiationActionsList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/AssistantInitiationActionsList.php
deleted file mode 100644
index aefda22..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/AssistantInitiationActionsList.php
+++ /dev/null
@@ -1,54 +0,0 @@
-solution = array('assistantSid' => $assistantSid,);
- }
-
- /**
- * Constructs a AssistantInitiationActionsContext
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\AssistantInitiationActionsContext
- */
- public function getContext()
- {
- return new AssistantInitiationActionsContext($this->version, $this->solution['assistantSid']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.Understand.AssistantInitiationActionsList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/AssistantInitiationActionsOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/AssistantInitiationActionsOptions.php
deleted file mode 100644
index f5935e3..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/AssistantInitiationActionsOptions.php
+++ /dev/null
@@ -1,67 +0,0 @@
-options['initiationActions'] = $initiationActions;
- }
-
- /**
- * The initiation_actions
- *
- * @param array $initiationActions The initiation_actions
- * @return $this Fluent Builder
- */
- public function setInitiationActions($initiationActions)
- {
- $this->options['initiationActions'] = $initiationActions;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.Understand.UpdateAssistantInitiationActionsOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/AssistantInitiationActionsPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/AssistantInitiationActionsPage.php
deleted file mode 100644
index 26276da..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/AssistantInitiationActionsPage.php
+++ /dev/null
@@ -1,45 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new AssistantInitiationActionsInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid']
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.Understand.AssistantInitiationActionsPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/DialogueContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/DialogueContext.php
deleted file mode 100644
index b6e0130..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/DialogueContext.php
+++ /dev/null
@@ -1,77 +0,0 @@
-solution = array('assistantSid' => $assistantSid, 'sid' => $sid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Dialogues/' . \rawurlencode($sid) . '';
- }
-
- /**
- * Fetch a DialogueInstance
- *
- * @return DialogueInstance Fetched DialogueInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new DialogueInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.Understand.DialogueContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/DialogueInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/DialogueInstance.php
deleted file mode 100644
index f371646..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/DialogueInstance.php
+++ /dev/null
@@ -1,119 +0,0 @@
-properties = array(
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'assistantSid' => Values::array_get($payload, 'assistant_sid'),
- 'sid' => Values::array_get($payload, 'sid'),
- 'data' => Values::array_get($payload, 'data'),
- 'url' => Values::array_get($payload, 'url'),
- );
-
- $this->solution = array('assistantSid' => $assistantSid, 'sid' => $sid ?: $this->properties['sid'],);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\DialogueContext Context
- * for this
- * DialogueInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new DialogueContext(
- $this->version,
- $this->solution['assistantSid'],
- $this->solution['sid']
- );
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a DialogueInstance
- *
- * @return DialogueInstance Fetched DialogueInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.Understand.DialogueInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/DialogueList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/DialogueList.php
deleted file mode 100644
index a06b1a1..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/DialogueList.php
+++ /dev/null
@@ -1,55 +0,0 @@
-solution = array('assistantSid' => $assistantSid,);
- }
-
- /**
- * Constructs a DialogueContext
- *
- * @param string $sid The sid
- * @return \Twilio\Rest\Preview\Understand\Assistant\DialogueContext
- */
- public function getContext($sid)
- {
- return new DialogueContext($this->version, $this->solution['assistantSid'], $sid);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.Understand.DialogueList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/DialoguePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/DialoguePage.php
deleted file mode 100644
index cc9d058..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/DialoguePage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new DialogueInstance($this->version, $payload, $this->solution['assistantSid']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.Understand.DialoguePage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueContext.php
deleted file mode 100644
index c53de8a..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueContext.php
+++ /dev/null
@@ -1,94 +0,0 @@
-solution = array(
- 'assistantSid' => $assistantSid,
- 'fieldTypeSid' => $fieldTypeSid,
- 'sid' => $sid,
- );
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/FieldTypes/' . \rawurlencode($fieldTypeSid) . '/FieldValues/' . \rawurlencode($sid) . '';
- }
-
- /**
- * Fetch a FieldValueInstance
- *
- * @return FieldValueInstance Fetched FieldValueInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new FieldValueInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['fieldTypeSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Deletes the FieldValueInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.Understand.FieldValueContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueInstance.php
deleted file mode 100644
index a502e9f..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueInstance.php
+++ /dev/null
@@ -1,147 +0,0 @@
-properties = array(
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- 'fieldTypeSid' => Values::array_get($payload, 'field_type_sid'),
- 'language' => Values::array_get($payload, 'language'),
- 'assistantSid' => Values::array_get($payload, 'assistant_sid'),
- 'sid' => Values::array_get($payload, 'sid'),
- 'value' => Values::array_get($payload, 'value'),
- 'url' => Values::array_get($payload, 'url'),
- 'synonymOf' => Values::array_get($payload, 'synonym_of'),
- );
-
- $this->solution = array(
- 'assistantSid' => $assistantSid,
- 'fieldTypeSid' => $fieldTypeSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\FieldType\FieldValueContext Context for this
- * FieldValueInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new FieldValueContext(
- $this->version,
- $this->solution['assistantSid'],
- $this->solution['fieldTypeSid'],
- $this->solution['sid']
- );
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a FieldValueInstance
- *
- * @return FieldValueInstance Fetched FieldValueInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Deletes the FieldValueInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->proxy()->delete();
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.Understand.FieldValueInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueList.php
deleted file mode 100644
index adfe23f..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueList.php
+++ /dev/null
@@ -1,198 +0,0 @@
-solution = array('assistantSid' => $assistantSid, 'fieldTypeSid' => $fieldTypeSid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/FieldTypes/' . \rawurlencode($fieldTypeSid) . '/FieldValues';
- }
-
- /**
- * Streams FieldValueInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
- */
- public function stream($options = array(), $limit = null, $pageSize = null)
- {
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($options, $limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
- }
-
- /**
- * Reads FieldValueInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return FieldValueInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
- /**
- * Retrieve a single page of FieldValueInstance records from the API.
- * Request is executed immediately
- *
- * @param array|Options $options Optional Arguments
- * @param mixed $pageSize Number of records to return, defaults to 50
- * @param string $pageToken PageToken provided by the API
- * @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of FieldValueInstance
- */
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
- {
- $options = new Values($options);
- $params = Values::of(array(
- 'Language' => $options['language'],
- 'PageToken' => $pageToken,
- 'Page' => $pageNumber,
- 'PageSize' => $pageSize,
- ));
-
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
-
- return new FieldValuePage($this->version, $response, $this->solution);
- }
-
- /**
- * Retrieve a specific page of FieldValueInstance records from the API.
- * Request is executed immediately
- *
- * @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of FieldValueInstance
- */
- public function getPage($targetUrl)
- {
- $response = $this->version->getDomain()->getClient()->request(
- 'GET',
- $targetUrl
- );
-
- return new FieldValuePage($this->version, $response, $this->solution);
- }
-
- /**
- * Create a new FieldValueInstance
- *
- * @param string $language An ISO language-country string of the value.
- * @param string $value A user-provided string that uniquely identifies this
- * resource as an alternative to the sid. Unique up to 64
- * characters long.
- * @param array|Options $options Optional Arguments
- * @return FieldValueInstance Newly created FieldValueInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($language, $value, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'Language' => $language,
- 'Value' => $value,
- 'SynonymOf' => $options['synonymOf'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new FieldValueInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['fieldTypeSid']
- );
- }
-
- /**
- * Constructs a FieldValueContext
- *
- * @param string $sid The sid
- * @return \Twilio\Rest\Preview\Understand\Assistant\FieldType\FieldValueContext
- */
- public function getContext($sid)
- {
- return new FieldValueContext(
- $this->version,
- $this->solution['assistantSid'],
- $this->solution['fieldTypeSid'],
- $sid
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.Understand.FieldValueList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueOptions.php
deleted file mode 100644
index 7b704eb..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValueOptions.php
+++ /dev/null
@@ -1,121 +0,0 @@
-options['language'] = $language;
- }
-
- /**
- * An ISO language-country string of the value. For example: *en-US*
- *
- * @param string $language An ISO language-country string of the value. For
- * example: en-US
- * @return $this Fluent Builder
- */
- public function setLanguage($language)
- {
- $this->options['language'] = $language;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.Understand.ReadFieldValueOptions ' . \implode(' ', $options) . ']';
- }
-}
-
-class CreateFieldValueOptions extends Options
-{
- /**
- * @param string $synonymOf A value that indicates this field value is a
- * synonym of. Empty if the value is not a synonym.
- */
- public function __construct($synonymOf = Values::NONE)
- {
- $this->options['synonymOf'] = $synonymOf;
- }
-
- /**
- * A value that indicates this field value is a synonym of. Empty if the value is not a synonym.
- *
- * @param string $synonymOf A value that indicates this field value is a
- * synonym of. Empty if the value is not a synonym.
- * @return $this Fluent Builder
- */
- public function setSynonymOf($synonymOf)
- {
- $this->options['synonymOf'] = $synonymOf;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.Understand.CreateFieldValueOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValuePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValuePage.php
deleted file mode 100644
index c6bfcbb..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/FieldType/FieldValuePage.php
+++ /dev/null
@@ -1,46 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new FieldValueInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['fieldTypeSid']
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.Understand.FieldValuePage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/FieldTypeContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/FieldTypeContext.php
deleted file mode 100644
index a1788cb..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/FieldTypeContext.php
+++ /dev/null
@@ -1,179 +0,0 @@
-solution = array('assistantSid' => $assistantSid, 'sid' => $sid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/FieldTypes/' . \rawurlencode($sid) . '';
- }
-
- /**
- * Fetch a FieldTypeInstance
- *
- * @return FieldTypeInstance Fetched FieldTypeInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new FieldTypeInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Update the FieldTypeInstance
- *
- * @param array|Options $options Optional Arguments
- * @return FieldTypeInstance Updated FieldTypeInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'UniqueName' => $options['uniqueName'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new FieldTypeInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Deletes the FieldTypeInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
-
- /**
- * Access the fieldValues
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\FieldType\FieldValueList
- */
- protected function getFieldValues()
- {
- if (!$this->_fieldValues) {
- $this->_fieldValues = new FieldValueList(
- $this->version,
- $this->solution['assistantSid'],
- $this->solution['sid']
- );
- }
-
- return $this->_fieldValues;
- }
-
- /**
- * Magic getter to lazy load subresources
- *
- * @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
- * @throws TwilioException For unknown subresources
- */
- public function __get($name)
- {
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown subresource ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $property = $this->$name;
- if (\method_exists($property, 'getContext')) {
- return \call_user_func_array(array($property, 'getContext'), $arguments);
- }
-
- throw new TwilioException('Resource does not have a context');
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.Understand.FieldTypeContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/FieldTypeInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/FieldTypeInstance.php
deleted file mode 100644
index bd4c1b5..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/FieldTypeInstance.php
+++ /dev/null
@@ -1,164 +0,0 @@
-properties = array(
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- 'friendlyName' => Values::array_get($payload, 'friendly_name'),
- 'links' => Values::array_get($payload, 'links'),
- 'assistantSid' => Values::array_get($payload, 'assistant_sid'),
- 'sid' => Values::array_get($payload, 'sid'),
- 'uniqueName' => Values::array_get($payload, 'unique_name'),
- 'url' => Values::array_get($payload, 'url'),
- );
-
- $this->solution = array('assistantSid' => $assistantSid, 'sid' => $sid ?: $this->properties['sid'],);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\FieldTypeContext Context
- * for this
- * FieldTypeInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new FieldTypeContext(
- $this->version,
- $this->solution['assistantSid'],
- $this->solution['sid']
- );
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a FieldTypeInstance
- *
- * @return FieldTypeInstance Fetched FieldTypeInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Update the FieldTypeInstance
- *
- * @param array|Options $options Optional Arguments
- * @return FieldTypeInstance Updated FieldTypeInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- return $this->proxy()->update($options);
- }
-
- /**
- * Deletes the FieldTypeInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->proxy()->delete();
- }
-
- /**
- * Access the fieldValues
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\FieldType\FieldValueList
- */
- protected function getFieldValues()
- {
- return $this->proxy()->fieldValues;
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.Understand.FieldTypeInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/FieldTypeList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/FieldTypeList.php
deleted file mode 100644
index 9b644dc..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/FieldTypeList.php
+++ /dev/null
@@ -1,176 +0,0 @@
-solution = array('assistantSid' => $assistantSid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/FieldTypes';
- }
-
- /**
- * Streams FieldTypeInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
- *
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
- */
- public function stream($limit = null, $pageSize = null)
- {
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
- }
-
- /**
- * Reads FieldTypeInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return FieldTypeInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
- /**
- * Retrieve a single page of FieldTypeInstance records from the API.
- * Request is executed immediately
- *
- * @param mixed $pageSize Number of records to return, defaults to 50
- * @param string $pageToken PageToken provided by the API
- * @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of FieldTypeInstance
- */
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
- {
- $params = Values::of(array(
- 'PageToken' => $pageToken,
- 'Page' => $pageNumber,
- 'PageSize' => $pageSize,
- ));
-
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
-
- return new FieldTypePage($this->version, $response, $this->solution);
- }
-
- /**
- * Retrieve a specific page of FieldTypeInstance records from the API.
- * Request is executed immediately
- *
- * @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of FieldTypeInstance
- */
- public function getPage($targetUrl)
- {
- $response = $this->version->getDomain()->getClient()->request(
- 'GET',
- $targetUrl
- );
-
- return new FieldTypePage($this->version, $response, $this->solution);
- }
-
- /**
- * Create a new FieldTypeInstance
- *
- * @param string $uniqueName A user-provided string that uniquely identifies
- * this resource as an alternative to the sid. Unique
- * up to 64 characters long.
- * @param array|Options $options Optional Arguments
- * @return FieldTypeInstance Newly created FieldTypeInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($uniqueName, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array('UniqueName' => $uniqueName, 'FriendlyName' => $options['friendlyName'],));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new FieldTypeInstance($this->version, $payload, $this->solution['assistantSid']);
- }
-
- /**
- * Constructs a FieldTypeContext
- *
- * @param string $sid The sid
- * @return \Twilio\Rest\Preview\Understand\Assistant\FieldTypeContext
- */
- public function getContext($sid)
- {
- return new FieldTypeContext($this->version, $this->solution['assistantSid'], $sid);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.Understand.FieldTypeList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/FieldTypeOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/FieldTypeOptions.php
deleted file mode 100644
index 7114deb..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/FieldTypeOptions.php
+++ /dev/null
@@ -1,148 +0,0 @@
-options['friendlyName'] = $friendlyName;
- }
-
- /**
- * A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long.
- *
- * @param string $friendlyName A user-provided string that identifies this
- * resource. It is non-unique and can up to 255
- * characters long.
- * @return $this Fluent Builder
- */
- public function setFriendlyName($friendlyName)
- {
- $this->options['friendlyName'] = $friendlyName;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.Understand.CreateFieldTypeOptions ' . \implode(' ', $options) . ']';
- }
-}
-
-class UpdateFieldTypeOptions extends Options
-{
- /**
- * @param string $friendlyName A user-provided string that identifies this
- * resource. It is non-unique and can up to 255
- * characters long.
- * @param string $uniqueName A user-provided string that uniquely identifies
- * this resource as an alternative to the sid. Unique
- * up to 64 characters long.
- */
- public function __construct($friendlyName = Values::NONE, $uniqueName = Values::NONE)
- {
- $this->options['friendlyName'] = $friendlyName;
- $this->options['uniqueName'] = $uniqueName;
- }
-
- /**
- * A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long.
- *
- * @param string $friendlyName A user-provided string that identifies this
- * resource. It is non-unique and can up to 255
- * characters long.
- * @return $this Fluent Builder
- */
- public function setFriendlyName($friendlyName)
- {
- $this->options['friendlyName'] = $friendlyName;
- return $this;
- }
-
- /**
- * A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.
- *
- * @param string $uniqueName A user-provided string that uniquely identifies
- * this resource as an alternative to the sid. Unique
- * up to 64 characters long.
- * @return $this Fluent Builder
- */
- public function setUniqueName($uniqueName)
- {
- $this->options['uniqueName'] = $uniqueName;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.Understand.UpdateFieldTypeOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/FieldTypePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/FieldTypePage.php
deleted file mode 100644
index 1f37667..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/FieldTypePage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new FieldTypeInstance($this->version, $payload, $this->solution['assistantSid']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.Understand.FieldTypePage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/ModelBuildContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/ModelBuildContext.php
deleted file mode 100644
index 3ee43fe..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/ModelBuildContext.php
+++ /dev/null
@@ -1,117 +0,0 @@
-solution = array('assistantSid' => $assistantSid, 'sid' => $sid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/ModelBuilds/' . \rawurlencode($sid) . '';
- }
-
- /**
- * Fetch a ModelBuildInstance
- *
- * @return ModelBuildInstance Fetched ModelBuildInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new ModelBuildInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Update the ModelBuildInstance
- *
- * @param array|Options $options Optional Arguments
- * @return ModelBuildInstance Updated ModelBuildInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array('UniqueName' => $options['uniqueName'],));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new ModelBuildInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Deletes the ModelBuildInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.Understand.ModelBuildContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/ModelBuildInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/ModelBuildInstance.php
deleted file mode 100644
index 1b99ac6..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/ModelBuildInstance.php
+++ /dev/null
@@ -1,154 +0,0 @@
-properties = array(
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- 'assistantSid' => Values::array_get($payload, 'assistant_sid'),
- 'sid' => Values::array_get($payload, 'sid'),
- 'status' => Values::array_get($payload, 'status'),
- 'uniqueName' => Values::array_get($payload, 'unique_name'),
- 'url' => Values::array_get($payload, 'url'),
- 'buildDuration' => Values::array_get($payload, 'build_duration'),
- 'errorCode' => Values::array_get($payload, 'error_code'),
- );
-
- $this->solution = array('assistantSid' => $assistantSid, 'sid' => $sid ?: $this->properties['sid'],);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\ModelBuildContext Context
- * for this
- * ModelBuildInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new ModelBuildContext(
- $this->version,
- $this->solution['assistantSid'],
- $this->solution['sid']
- );
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a ModelBuildInstance
- *
- * @return ModelBuildInstance Fetched ModelBuildInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Update the ModelBuildInstance
- *
- * @param array|Options $options Optional Arguments
- * @return ModelBuildInstance Updated ModelBuildInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- return $this->proxy()->update($options);
- }
-
- /**
- * Deletes the ModelBuildInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->proxy()->delete();
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.Understand.ModelBuildInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/ModelBuildList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/ModelBuildList.php
deleted file mode 100644
index 1f407c1..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/ModelBuildList.php
+++ /dev/null
@@ -1,176 +0,0 @@
-solution = array('assistantSid' => $assistantSid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/ModelBuilds';
- }
-
- /**
- * Streams ModelBuildInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
- *
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
- */
- public function stream($limit = null, $pageSize = null)
- {
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
- }
-
- /**
- * Reads ModelBuildInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return ModelBuildInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
- /**
- * Retrieve a single page of ModelBuildInstance records from the API.
- * Request is executed immediately
- *
- * @param mixed $pageSize Number of records to return, defaults to 50
- * @param string $pageToken PageToken provided by the API
- * @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of ModelBuildInstance
- */
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
- {
- $params = Values::of(array(
- 'PageToken' => $pageToken,
- 'Page' => $pageNumber,
- 'PageSize' => $pageSize,
- ));
-
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
-
- return new ModelBuildPage($this->version, $response, $this->solution);
- }
-
- /**
- * Retrieve a specific page of ModelBuildInstance records from the API.
- * Request is executed immediately
- *
- * @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of ModelBuildInstance
- */
- public function getPage($targetUrl)
- {
- $response = $this->version->getDomain()->getClient()->request(
- 'GET',
- $targetUrl
- );
-
- return new ModelBuildPage($this->version, $response, $this->solution);
- }
-
- /**
- * Create a new ModelBuildInstance
- *
- * @param array|Options $options Optional Arguments
- * @return ModelBuildInstance Newly created ModelBuildInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'StatusCallback' => $options['statusCallback'],
- 'UniqueName' => $options['uniqueName'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new ModelBuildInstance($this->version, $payload, $this->solution['assistantSid']);
- }
-
- /**
- * Constructs a ModelBuildContext
- *
- * @param string $sid The sid
- * @return \Twilio\Rest\Preview\Understand\Assistant\ModelBuildContext
- */
- public function getContext($sid)
- {
- return new ModelBuildContext($this->version, $this->solution['assistantSid'], $sid);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.Understand.ModelBuildList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/ModelBuildOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/ModelBuildOptions.php
deleted file mode 100644
index f7a2b71..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/ModelBuildOptions.php
+++ /dev/null
@@ -1,142 +0,0 @@
-options['statusCallback'] = $statusCallback;
- $this->options['uniqueName'] = $uniqueName;
- }
-
- /**
- * The status_callback
- *
- * @param string $statusCallback The status_callback
- * @return $this Fluent Builder
- */
- public function setStatusCallback($statusCallback)
- {
- $this->options['statusCallback'] = $statusCallback;
- return $this;
- }
-
- /**
- * A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. For example: v0.1
- *
- * @param string $uniqueName A user-provided string that uniquely identifies
- * this resource as an alternative to the sid. Unique
- * up to 64 characters long. For example: v0.1
- * @return $this Fluent Builder
- */
- public function setUniqueName($uniqueName)
- {
- $this->options['uniqueName'] = $uniqueName;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.Understand.CreateModelBuildOptions ' . \implode(' ', $options) . ']';
- }
-}
-
-class UpdateModelBuildOptions extends Options
-{
- /**
- * @param string $uniqueName A user-provided string that uniquely identifies
- * this resource as an alternative to the sid. Unique
- * up to 64 characters long. For example: v0.1
- */
- public function __construct($uniqueName = Values::NONE)
- {
- $this->options['uniqueName'] = $uniqueName;
- }
-
- /**
- * A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long. For example: v0.1
- *
- * @param string $uniqueName A user-provided string that uniquely identifies
- * this resource as an alternative to the sid. Unique
- * up to 64 characters long. For example: v0.1
- * @return $this Fluent Builder
- */
- public function setUniqueName($uniqueName)
- {
- $this->options['uniqueName'] = $uniqueName;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.Understand.UpdateModelBuildOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/ModelBuildPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/ModelBuildPage.php
deleted file mode 100644
index 62836f0..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/ModelBuildPage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new ModelBuildInstance($this->version, $payload, $this->solution['assistantSid']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.Understand.ModelBuildPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/QueryContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/QueryContext.php
deleted file mode 100644
index c7a13f5..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/QueryContext.php
+++ /dev/null
@@ -1,118 +0,0 @@
-solution = array('assistantSid' => $assistantSid, 'sid' => $sid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Queries/' . \rawurlencode($sid) . '';
- }
-
- /**
- * Fetch a QueryInstance
- *
- * @return QueryInstance Fetched QueryInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new QueryInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Update the QueryInstance
- *
- * @param array|Options $options Optional Arguments
- * @return QueryInstance Updated QueryInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array('SampleSid' => $options['sampleSid'], 'Status' => $options['status'],));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new QueryInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Deletes the QueryInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.Understand.QueryContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/QueryInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/QueryInstance.php
deleted file mode 100644
index 934a6a5..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/QueryInstance.php
+++ /dev/null
@@ -1,161 +0,0 @@
-properties = array(
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- 'results' => Values::array_get($payload, 'results'),
- 'language' => Values::array_get($payload, 'language'),
- 'modelBuildSid' => Values::array_get($payload, 'model_build_sid'),
- 'query' => Values::array_get($payload, 'query'),
- 'sampleSid' => Values::array_get($payload, 'sample_sid'),
- 'assistantSid' => Values::array_get($payload, 'assistant_sid'),
- 'sid' => Values::array_get($payload, 'sid'),
- 'status' => Values::array_get($payload, 'status'),
- 'url' => Values::array_get($payload, 'url'),
- 'sourceChannel' => Values::array_get($payload, 'source_channel'),
- );
-
- $this->solution = array('assistantSid' => $assistantSid, 'sid' => $sid ?: $this->properties['sid'],);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\QueryContext Context for
- * this
- * QueryInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new QueryContext(
- $this->version,
- $this->solution['assistantSid'],
- $this->solution['sid']
- );
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a QueryInstance
- *
- * @return QueryInstance Fetched QueryInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Update the QueryInstance
- *
- * @param array|Options $options Optional Arguments
- * @return QueryInstance Updated QueryInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- return $this->proxy()->update($options);
- }
-
- /**
- * Deletes the QueryInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->proxy()->delete();
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.Understand.QueryInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/QueryList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/QueryList.php
deleted file mode 100644
index dd63d6b..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/QueryList.php
+++ /dev/null
@@ -1,191 +0,0 @@
-solution = array('assistantSid' => $assistantSid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Queries';
- }
-
- /**
- * Streams QueryInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
- */
- public function stream($options = array(), $limit = null, $pageSize = null)
- {
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($options, $limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
- }
-
- /**
- * Reads QueryInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return QueryInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
- /**
- * Retrieve a single page of QueryInstance records from the API.
- * Request is executed immediately
- *
- * @param array|Options $options Optional Arguments
- * @param mixed $pageSize Number of records to return, defaults to 50
- * @param string $pageToken PageToken provided by the API
- * @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of QueryInstance
- */
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
- {
- $options = new Values($options);
- $params = Values::of(array(
- 'Language' => $options['language'],
- 'ModelBuild' => $options['modelBuild'],
- 'Status' => $options['status'],
- 'PageToken' => $pageToken,
- 'Page' => $pageNumber,
- 'PageSize' => $pageSize,
- ));
-
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
-
- return new QueryPage($this->version, $response, $this->solution);
- }
-
- /**
- * Retrieve a specific page of QueryInstance records from the API.
- * Request is executed immediately
- *
- * @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of QueryInstance
- */
- public function getPage($targetUrl)
- {
- $response = $this->version->getDomain()->getClient()->request(
- 'GET',
- $targetUrl
- );
-
- return new QueryPage($this->version, $response, $this->solution);
- }
-
- /**
- * Create a new QueryInstance
- *
- * @param string $language An ISO language-country string of the sample.
- * @param string $query A user-provided string that uniquely identifies this
- * resource as an alternative to the sid. It can be up to
- * 2048 characters long.
- * @param array|Options $options Optional Arguments
- * @return QueryInstance Newly created QueryInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($language, $query, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'Language' => $language,
- 'Query' => $query,
- 'Tasks' => $options['tasks'],
- 'ModelBuild' => $options['modelBuild'],
- 'Field' => $options['field'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new QueryInstance($this->version, $payload, $this->solution['assistantSid']);
- }
-
- /**
- * Constructs a QueryContext
- *
- * @param string $sid A 34 character string that uniquely identifies this
- * resource.
- * @return \Twilio\Rest\Preview\Understand\Assistant\QueryContext
- */
- public function getContext($sid)
- {
- return new QueryContext($this->version, $this->solution['assistantSid'], $sid);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.Understand.QueryList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/QueryOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/QueryOptions.php
deleted file mode 100644
index eb87794..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/QueryOptions.php
+++ /dev/null
@@ -1,271 +0,0 @@
-options['language'] = $language;
- $this->options['modelBuild'] = $modelBuild;
- $this->options['status'] = $status;
- }
-
- /**
- * An ISO language-country string of the sample.
- *
- * @param string $language An ISO language-country string of the sample.
- * @return $this Fluent Builder
- */
- public function setLanguage($language)
- {
- $this->options['language'] = $language;
- return $this;
- }
-
- /**
- * The Model Build Sid or unique name of the Model Build to be queried.
- *
- * @param string $modelBuild The Model Build Sid or unique name of the Model
- * Build to be queried.
- * @return $this Fluent Builder
- */
- public function setModelBuild($modelBuild)
- {
- $this->options['modelBuild'] = $modelBuild;
- return $this;
- }
-
- /**
- * A string that described the query status. The values can be: pending_review, reviewed, discarded
- *
- * @param string $status A string that described the query status. The values
- * can be: pending_review, reviewed, discarded
- * @return $this Fluent Builder
- */
- public function setStatus($status)
- {
- $this->options['status'] = $status;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.Understand.ReadQueryOptions ' . \implode(' ', $options) . ']';
- }
-}
-
-class CreateQueryOptions extends Options
-{
- /**
- * @param string $tasks Constraints the query to a set of tasks. Useful when
- * you need to constrain the paths the user can take.
- * Tasks should be comma separated task-unique-name-1,
- * task-unique-name-2
- * @param string $modelBuild The Model Build Sid or unique name of the Model
- * Build to be queried.
- * @param string $field Constraints the query to a given Field with an task.
- * Useful when you know the Field you are expecting. It
- * accepts one field in the format
- * task-unique-name-1:field-unique-name
- */
- public function __construct($tasks = Values::NONE, $modelBuild = Values::NONE, $field = Values::NONE)
- {
- $this->options['tasks'] = $tasks;
- $this->options['modelBuild'] = $modelBuild;
- $this->options['field'] = $field;
- }
-
- /**
- * Constraints the query to a set of tasks. Useful when you need to constrain the paths the user can take. Tasks should be comma separated *task-unique-name-1*, *task-unique-name-2*
- *
- * @param string $tasks Constraints the query to a set of tasks. Useful when
- * you need to constrain the paths the user can take.
- * Tasks should be comma separated task-unique-name-1,
- * task-unique-name-2
- * @return $this Fluent Builder
- */
- public function setTasks($tasks)
- {
- $this->options['tasks'] = $tasks;
- return $this;
- }
-
- /**
- * The Model Build Sid or unique name of the Model Build to be queried.
- *
- * @param string $modelBuild The Model Build Sid or unique name of the Model
- * Build to be queried.
- * @return $this Fluent Builder
- */
- public function setModelBuild($modelBuild)
- {
- $this->options['modelBuild'] = $modelBuild;
- return $this;
- }
-
- /**
- * Constraints the query to a given Field with an task. Useful when you know the Field you are expecting. It accepts one field in the format *task-unique-name-1*:*field-unique-name*
- *
- * @param string $field Constraints the query to a given Field with an task.
- * Useful when you know the Field you are expecting. It
- * accepts one field in the format
- * task-unique-name-1:field-unique-name
- * @return $this Fluent Builder
- */
- public function setField($field)
- {
- $this->options['field'] = $field;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.Understand.CreateQueryOptions ' . \implode(' ', $options) . ']';
- }
-}
-
-class UpdateQueryOptions extends Options
-{
- /**
- * @param string $sampleSid An optional reference to the Sample created from
- * this query.
- * @param string $status A string that described the query status. The values
- * can be: pending_review, reviewed, discarded
- */
- public function __construct($sampleSid = Values::NONE, $status = Values::NONE)
- {
- $this->options['sampleSid'] = $sampleSid;
- $this->options['status'] = $status;
- }
-
- /**
- * An optional reference to the Sample created from this query.
- *
- * @param string $sampleSid An optional reference to the Sample created from
- * this query.
- * @return $this Fluent Builder
- */
- public function setSampleSid($sampleSid)
- {
- $this->options['sampleSid'] = $sampleSid;
- return $this;
- }
-
- /**
- * A string that described the query status. The values can be: pending_review, reviewed, discarded
- *
- * @param string $status A string that described the query status. The values
- * can be: pending_review, reviewed, discarded
- * @return $this Fluent Builder
- */
- public function setStatus($status)
- {
- $this->options['status'] = $status;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.Understand.UpdateQueryOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/QueryPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/QueryPage.php
deleted file mode 100644
index cb883a4..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/QueryPage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new QueryInstance($this->version, $payload, $this->solution['assistantSid']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.Understand.QueryPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/StyleSheetContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/StyleSheetContext.php
deleted file mode 100644
index 55f3eb7..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/StyleSheetContext.php
+++ /dev/null
@@ -1,96 +0,0 @@
-solution = array('assistantSid' => $assistantSid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/StyleSheet';
- }
-
- /**
- * Fetch a StyleSheetInstance
- *
- * @return StyleSheetInstance Fetched StyleSheetInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new StyleSheetInstance($this->version, $payload, $this->solution['assistantSid']);
- }
-
- /**
- * Update the StyleSheetInstance
- *
- * @param array|Options $options Optional Arguments
- * @return StyleSheetInstance Updated StyleSheetInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array('StyleSheet' => Serialize::jsonObject($options['styleSheet']),));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new StyleSheetInstance($this->version, $payload, $this->solution['assistantSid']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.Understand.StyleSheetContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/StyleSheetInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/StyleSheetInstance.php
deleted file mode 100644
index 00acd8b..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/StyleSheetInstance.php
+++ /dev/null
@@ -1,125 +0,0 @@
-properties = array(
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'assistantSid' => Values::array_get($payload, 'assistant_sid'),
- 'url' => Values::array_get($payload, 'url'),
- 'data' => Values::array_get($payload, 'data'),
- );
-
- $this->solution = array('assistantSid' => $assistantSid,);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\StyleSheetContext Context
- * for this
- * StyleSheetInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new StyleSheetContext($this->version, $this->solution['assistantSid']);
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a StyleSheetInstance
- *
- * @return StyleSheetInstance Fetched StyleSheetInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Update the StyleSheetInstance
- *
- * @param array|Options $options Optional Arguments
- * @return StyleSheetInstance Updated StyleSheetInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- return $this->proxy()->update($options);
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.Understand.StyleSheetInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/StyleSheetList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/StyleSheetList.php
deleted file mode 100644
index 9fda336..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/StyleSheetList.php
+++ /dev/null
@@ -1,54 +0,0 @@
-solution = array('assistantSid' => $assistantSid,);
- }
-
- /**
- * Constructs a StyleSheetContext
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\StyleSheetContext
- */
- public function getContext()
- {
- return new StyleSheetContext($this->version, $this->solution['assistantSid']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.Understand.StyleSheetList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/StyleSheetOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/StyleSheetOptions.php
deleted file mode 100644
index a55279d..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/StyleSheetOptions.php
+++ /dev/null
@@ -1,67 +0,0 @@
-options['styleSheet'] = $styleSheet;
- }
-
- /**
- * The JSON Style sheet string
- *
- * @param array $styleSheet The JSON Style sheet string
- * @return $this Fluent Builder
- */
- public function setStyleSheet($styleSheet)
- {
- $this->options['styleSheet'] = $styleSheet;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.Understand.UpdateStyleSheetOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/StyleSheetPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/StyleSheetPage.php
deleted file mode 100644
index 40c6ab2..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/StyleSheetPage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new StyleSheetInstance($this->version, $payload, $this->solution['assistantSid']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.Understand.StyleSheetPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/FieldContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/FieldContext.php
deleted file mode 100644
index 34deaac..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/FieldContext.php
+++ /dev/null
@@ -1,91 +0,0 @@
-solution = array('assistantSid' => $assistantSid, 'taskSid' => $taskSid, 'sid' => $sid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Tasks/' . \rawurlencode($taskSid) . '/Fields/' . \rawurlencode($sid) . '';
- }
-
- /**
- * Fetch a FieldInstance
- *
- * @return FieldInstance Fetched FieldInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new FieldInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['taskSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Deletes the FieldInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.Understand.FieldContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/FieldInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/FieldInstance.php
deleted file mode 100644
index 62c66b4..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/FieldInstance.php
+++ /dev/null
@@ -1,146 +0,0 @@
-properties = array(
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- 'fieldType' => Values::array_get($payload, 'field_type'),
- 'taskSid' => Values::array_get($payload, 'task_sid'),
- 'assistantSid' => Values::array_get($payload, 'assistant_sid'),
- 'sid' => Values::array_get($payload, 'sid'),
- 'uniqueName' => Values::array_get($payload, 'unique_name'),
- 'url' => Values::array_get($payload, 'url'),
- );
-
- $this->solution = array(
- 'assistantSid' => $assistantSid,
- 'taskSid' => $taskSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\Task\FieldContext Context
- * for this
- * FieldInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new FieldContext(
- $this->version,
- $this->solution['assistantSid'],
- $this->solution['taskSid'],
- $this->solution['sid']
- );
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a FieldInstance
- *
- * @return FieldInstance Fetched FieldInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Deletes the FieldInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->proxy()->delete();
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.Understand.FieldInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/FieldList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/FieldList.php
deleted file mode 100644
index 075f9bc..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/FieldList.php
+++ /dev/null
@@ -1,187 +0,0 @@
-solution = array('assistantSid' => $assistantSid, 'taskSid' => $taskSid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Tasks/' . \rawurlencode($taskSid) . '/Fields';
- }
-
- /**
- * Streams FieldInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
- *
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
- */
- public function stream($limit = null, $pageSize = null)
- {
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
- }
-
- /**
- * Reads FieldInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return FieldInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
- /**
- * Retrieve a single page of FieldInstance records from the API.
- * Request is executed immediately
- *
- * @param mixed $pageSize Number of records to return, defaults to 50
- * @param string $pageToken PageToken provided by the API
- * @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of FieldInstance
- */
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
- {
- $params = Values::of(array(
- 'PageToken' => $pageToken,
- 'Page' => $pageNumber,
- 'PageSize' => $pageSize,
- ));
-
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
-
- return new FieldPage($this->version, $response, $this->solution);
- }
-
- /**
- * Retrieve a specific page of FieldInstance records from the API.
- * Request is executed immediately
- *
- * @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of FieldInstance
- */
- public function getPage($targetUrl)
- {
- $response = $this->version->getDomain()->getClient()->request(
- 'GET',
- $targetUrl
- );
-
- return new FieldPage($this->version, $response, $this->solution);
- }
-
- /**
- * Create a new FieldInstance
- *
- * @param string $fieldType The unique name or sid of the FieldType. It can be
- * any Built-in Field Type or the unique_name or sid
- * of a custom Field Type.
- * @param string $uniqueName A user-provided string that uniquely identifies
- * this resource as an alternative to the sid. Unique
- * up to 64 characters long.
- * @return FieldInstance Newly created FieldInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($fieldType, $uniqueName)
- {
- $data = Values::of(array('FieldType' => $fieldType, 'UniqueName' => $uniqueName,));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new FieldInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['taskSid']
- );
- }
-
- /**
- * Constructs a FieldContext
- *
- * @param string $sid A 34 character string that uniquely identifies this
- * resource.
- * @return \Twilio\Rest\Preview\Understand\Assistant\Task\FieldContext
- */
- public function getContext($sid)
- {
- return new FieldContext(
- $this->version,
- $this->solution['assistantSid'],
- $this->solution['taskSid'],
- $sid
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.Understand.FieldList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/FieldPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/FieldPage.php
deleted file mode 100644
index 645a478..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/FieldPage.php
+++ /dev/null
@@ -1,46 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new FieldInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['taskSid']
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.Understand.FieldPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/SampleContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/SampleContext.php
deleted file mode 100644
index e5c7408..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/SampleContext.php
+++ /dev/null
@@ -1,125 +0,0 @@
-solution = array('assistantSid' => $assistantSid, 'taskSid' => $taskSid, 'sid' => $sid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Tasks/' . \rawurlencode($taskSid) . '/Samples/' . \rawurlencode($sid) . '';
- }
-
- /**
- * Fetch a SampleInstance
- *
- * @return SampleInstance Fetched SampleInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new SampleInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['taskSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Update the SampleInstance
- *
- * @param array|Options $options Optional Arguments
- * @return SampleInstance Updated SampleInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'Language' => $options['language'],
- 'TaggedText' => $options['taggedText'],
- 'SourceChannel' => $options['sourceChannel'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new SampleInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['taskSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Deletes the SampleInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.Understand.SampleContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/SampleInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/SampleInstance.php
deleted file mode 100644
index 8fe101a..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/SampleInstance.php
+++ /dev/null
@@ -1,162 +0,0 @@
-properties = array(
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- 'taskSid' => Values::array_get($payload, 'task_sid'),
- 'language' => Values::array_get($payload, 'language'),
- 'assistantSid' => Values::array_get($payload, 'assistant_sid'),
- 'sid' => Values::array_get($payload, 'sid'),
- 'taggedText' => Values::array_get($payload, 'tagged_text'),
- 'url' => Values::array_get($payload, 'url'),
- 'sourceChannel' => Values::array_get($payload, 'source_channel'),
- );
-
- $this->solution = array(
- 'assistantSid' => $assistantSid,
- 'taskSid' => $taskSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\Task\SampleContext Context
- * for
- * this
- * SampleInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new SampleContext(
- $this->version,
- $this->solution['assistantSid'],
- $this->solution['taskSid'],
- $this->solution['sid']
- );
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a SampleInstance
- *
- * @return SampleInstance Fetched SampleInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Update the SampleInstance
- *
- * @param array|Options $options Optional Arguments
- * @return SampleInstance Updated SampleInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- return $this->proxy()->update($options);
- }
-
- /**
- * Deletes the SampleInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->proxy()->delete();
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.Understand.SampleInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/SampleList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/SampleList.php
deleted file mode 100644
index 91055ac..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/SampleList.php
+++ /dev/null
@@ -1,197 +0,0 @@
-solution = array('assistantSid' => $assistantSid, 'taskSid' => $taskSid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Tasks/' . \rawurlencode($taskSid) . '/Samples';
- }
-
- /**
- * Streams SampleInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
- */
- public function stream($options = array(), $limit = null, $pageSize = null)
- {
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($options, $limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
- }
-
- /**
- * Reads SampleInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return SampleInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
- /**
- * Retrieve a single page of SampleInstance records from the API.
- * Request is executed immediately
- *
- * @param array|Options $options Optional Arguments
- * @param mixed $pageSize Number of records to return, defaults to 50
- * @param string $pageToken PageToken provided by the API
- * @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of SampleInstance
- */
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
- {
- $options = new Values($options);
- $params = Values::of(array(
- 'Language' => $options['language'],
- 'PageToken' => $pageToken,
- 'Page' => $pageNumber,
- 'PageSize' => $pageSize,
- ));
-
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
-
- return new SamplePage($this->version, $response, $this->solution);
- }
-
- /**
- * Retrieve a specific page of SampleInstance records from the API.
- * Request is executed immediately
- *
- * @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of SampleInstance
- */
- public function getPage($targetUrl)
- {
- $response = $this->version->getDomain()->getClient()->request(
- 'GET',
- $targetUrl
- );
-
- return new SamplePage($this->version, $response, $this->solution);
- }
-
- /**
- * Create a new SampleInstance
- *
- * @param string $language An ISO language-country string of the sample.
- * @param string $taggedText The text example of how end-users may express this
- * task. The sample may contain Field tag blocks.
- * @param array|Options $options Optional Arguments
- * @return SampleInstance Newly created SampleInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($language, $taggedText, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'Language' => $language,
- 'TaggedText' => $taggedText,
- 'SourceChannel' => $options['sourceChannel'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new SampleInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['taskSid']
- );
- }
-
- /**
- * Constructs a SampleContext
- *
- * @param string $sid A 34 character string that uniquely identifies this
- * resource.
- * @return \Twilio\Rest\Preview\Understand\Assistant\Task\SampleContext
- */
- public function getContext($sid)
- {
- return new SampleContext(
- $this->version,
- $this->solution['assistantSid'],
- $this->solution['taskSid'],
- $sid
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.Understand.SampleList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/SampleOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/SampleOptions.php
deleted file mode 100644
index 0732de4..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/SampleOptions.php
+++ /dev/null
@@ -1,214 +0,0 @@
-options['language'] = $language;
- }
-
- /**
- * An ISO language-country string of the sample.
- *
- * @param string $language An ISO language-country string of the sample.
- * @return $this Fluent Builder
- */
- public function setLanguage($language)
- {
- $this->options['language'] = $language;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.Understand.ReadSampleOptions ' . \implode(' ', $options) . ']';
- }
-}
-
-class CreateSampleOptions extends Options
-{
- /**
- * @param string $sourceChannel The communication channel the sample was
- * captured. It can be: voice, sms, chat, alexa,
- * google-assistant, or slack. If not included the
- * value will be null
- */
- public function __construct($sourceChannel = Values::NONE)
- {
- $this->options['sourceChannel'] = $sourceChannel;
- }
-
- /**
- * The communication channel the sample was captured. It can be: *voice*, *sms*, *chat*, *alexa*, *google-assistant*, or *slack*. If not included the value will be null
- *
- * @param string $sourceChannel The communication channel the sample was
- * captured. It can be: voice, sms, chat, alexa,
- * google-assistant, or slack. If not included the
- * value will be null
- * @return $this Fluent Builder
- */
- public function setSourceChannel($sourceChannel)
- {
- $this->options['sourceChannel'] = $sourceChannel;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.Understand.CreateSampleOptions ' . \implode(' ', $options) . ']';
- }
-}
-
-class UpdateSampleOptions extends Options
-{
- /**
- * @param string $language An ISO language-country string of the sample.
- * @param string $taggedText The text example of how end-users may express this
- * task. The sample may contain Field tag blocks.
- * @param string $sourceChannel The communication channel the sample was
- * captured. It can be: voice, sms, chat, alexa,
- * google-assistant, or slack. If not included the
- * value will be null
- */
- public function __construct($language = Values::NONE, $taggedText = Values::NONE, $sourceChannel = Values::NONE)
- {
- $this->options['language'] = $language;
- $this->options['taggedText'] = $taggedText;
- $this->options['sourceChannel'] = $sourceChannel;
- }
-
- /**
- * An ISO language-country string of the sample.
- *
- * @param string $language An ISO language-country string of the sample.
- * @return $this Fluent Builder
- */
- public function setLanguage($language)
- {
- $this->options['language'] = $language;
- return $this;
- }
-
- /**
- * The text example of how end-users may express this task. The sample may contain Field tag blocks.
- *
- * @param string $taggedText The text example of how end-users may express this
- * task. The sample may contain Field tag blocks.
- * @return $this Fluent Builder
- */
- public function setTaggedText($taggedText)
- {
- $this->options['taggedText'] = $taggedText;
- return $this;
- }
-
- /**
- * The communication channel the sample was captured. It can be: *voice*, *sms*, *chat*, *alexa*, *google-assistant*, or *slack*. If not included the value will be null
- *
- * @param string $sourceChannel The communication channel the sample was
- * captured. It can be: voice, sms, chat, alexa,
- * google-assistant, or slack. If not included the
- * value will be null
- * @return $this Fluent Builder
- */
- public function setSourceChannel($sourceChannel)
- {
- $this->options['sourceChannel'] = $sourceChannel;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.Understand.UpdateSampleOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/SamplePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/SamplePage.php
deleted file mode 100644
index a99bfc0..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/SamplePage.php
+++ /dev/null
@@ -1,46 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new SampleInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['taskSid']
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.Understand.SamplePage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskActionsContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskActionsContext.php
deleted file mode 100644
index 7b8fe7f..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskActionsContext.php
+++ /dev/null
@@ -1,107 +0,0 @@
-solution = array('assistantSid' => $assistantSid, 'taskSid' => $taskSid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Tasks/' . \rawurlencode($taskSid) . '/Actions';
- }
-
- /**
- * Fetch a TaskActionsInstance
- *
- * @return TaskActionsInstance Fetched TaskActionsInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new TaskActionsInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['taskSid']
- );
- }
-
- /**
- * Update the TaskActionsInstance
- *
- * @param array|Options $options Optional Arguments
- * @return TaskActionsInstance Updated TaskActionsInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array('Actions' => Serialize::jsonObject($options['actions']),));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new TaskActionsInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['taskSid']
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.Understand.TaskActionsContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskActionsInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskActionsInstance.php
deleted file mode 100644
index faceaee..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskActionsInstance.php
+++ /dev/null
@@ -1,130 +0,0 @@
-properties = array(
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'assistantSid' => Values::array_get($payload, 'assistant_sid'),
- 'taskSid' => Values::array_get($payload, 'task_sid'),
- 'url' => Values::array_get($payload, 'url'),
- 'data' => Values::array_get($payload, 'data'),
- );
-
- $this->solution = array('assistantSid' => $assistantSid, 'taskSid' => $taskSid,);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\Task\TaskActionsContext Context for this TaskActionsInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new TaskActionsContext(
- $this->version,
- $this->solution['assistantSid'],
- $this->solution['taskSid']
- );
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a TaskActionsInstance
- *
- * @return TaskActionsInstance Fetched TaskActionsInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Update the TaskActionsInstance
- *
- * @param array|Options $options Optional Arguments
- * @return TaskActionsInstance Updated TaskActionsInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- return $this->proxy()->update($options);
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.Understand.TaskActionsInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskActionsList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskActionsList.php
deleted file mode 100644
index a3d8f59..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskActionsList.php
+++ /dev/null
@@ -1,59 +0,0 @@
-solution = array('assistantSid' => $assistantSid, 'taskSid' => $taskSid,);
- }
-
- /**
- * Constructs a TaskActionsContext
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\Task\TaskActionsContext
- */
- public function getContext()
- {
- return new TaskActionsContext(
- $this->version,
- $this->solution['assistantSid'],
- $this->solution['taskSid']
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.Understand.TaskActionsList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskActionsOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskActionsOptions.php
deleted file mode 100644
index 0150cd2..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskActionsOptions.php
+++ /dev/null
@@ -1,70 +0,0 @@
-options['actions'] = $actions;
- }
-
- /**
- * The JSON actions that instruct the Assistant how to perform this task.
- *
- * @param array $actions The JSON actions that instruct the Assistant how to
- * perform this task.
- * @return $this Fluent Builder
- */
- public function setActions($actions)
- {
- $this->options['actions'] = $actions;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.Understand.UpdateTaskActionsOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskActionsPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskActionsPage.php
deleted file mode 100644
index c3de2d7..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskActionsPage.php
+++ /dev/null
@@ -1,46 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new TaskActionsInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['taskSid']
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.Understand.TaskActionsPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskStatisticsContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskStatisticsContext.php
deleted file mode 100644
index 7b662b0..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskStatisticsContext.php
+++ /dev/null
@@ -1,77 +0,0 @@
-solution = array('assistantSid' => $assistantSid, 'taskSid' => $taskSid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Tasks/' . \rawurlencode($taskSid) . '/Statistics';
- }
-
- /**
- * Fetch a TaskStatisticsInstance
- *
- * @return TaskStatisticsInstance Fetched TaskStatisticsInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new TaskStatisticsInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['taskSid']
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.Understand.TaskStatisticsContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskStatisticsInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskStatisticsInstance.php
deleted file mode 100644
index 9ab1fc0..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskStatisticsInstance.php
+++ /dev/null
@@ -1,119 +0,0 @@
-properties = array(
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'assistantSid' => Values::array_get($payload, 'assistant_sid'),
- 'taskSid' => Values::array_get($payload, 'task_sid'),
- 'samplesCount' => Values::array_get($payload, 'samples_count'),
- 'fieldsCount' => Values::array_get($payload, 'fields_count'),
- 'url' => Values::array_get($payload, 'url'),
- );
-
- $this->solution = array('assistantSid' => $assistantSid, 'taskSid' => $taskSid,);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\Task\TaskStatisticsContext Context for this TaskStatisticsInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new TaskStatisticsContext(
- $this->version,
- $this->solution['assistantSid'],
- $this->solution['taskSid']
- );
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a TaskStatisticsInstance
- *
- * @return TaskStatisticsInstance Fetched TaskStatisticsInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.Understand.TaskStatisticsInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskStatisticsList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskStatisticsList.php
deleted file mode 100644
index b2eb149..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskStatisticsList.php
+++ /dev/null
@@ -1,59 +0,0 @@
-solution = array('assistantSid' => $assistantSid, 'taskSid' => $taskSid,);
- }
-
- /**
- * Constructs a TaskStatisticsContext
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\Task\TaskStatisticsContext
- */
- public function getContext()
- {
- return new TaskStatisticsContext(
- $this->version,
- $this->solution['assistantSid'],
- $this->solution['taskSid']
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.Understand.TaskStatisticsList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskStatisticsPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskStatisticsPage.php
deleted file mode 100644
index 5269ff9..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskStatisticsPage.php
+++ /dev/null
@@ -1,46 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new TaskStatisticsInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['taskSid']
- );
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.Understand.TaskStatisticsPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/TaskContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/TaskContext.php
deleted file mode 100644
index a80fbb9..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/TaskContext.php
+++ /dev/null
@@ -1,249 +0,0 @@
-solution = array('assistantSid' => $assistantSid, 'sid' => $sid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Tasks/' . \rawurlencode($sid) . '';
- }
-
- /**
- * Fetch a TaskInstance
- *
- * @return TaskInstance Fetched TaskInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new TaskInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Update the TaskInstance
- *
- * @param array|Options $options Optional Arguments
- * @return TaskInstance Updated TaskInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'UniqueName' => $options['uniqueName'],
- 'Actions' => Serialize::jsonObject($options['actions']),
- 'ActionsUrl' => $options['actionsUrl'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new TaskInstance(
- $this->version,
- $payload,
- $this->solution['assistantSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Deletes the TaskInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
-
- /**
- * Access the fields
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\Task\FieldList
- */
- protected function getFields()
- {
- if (!$this->_fields) {
- $this->_fields = new FieldList(
- $this->version,
- $this->solution['assistantSid'],
- $this->solution['sid']
- );
- }
-
- return $this->_fields;
- }
-
- /**
- * Access the samples
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\Task\SampleList
- */
- protected function getSamples()
- {
- if (!$this->_samples) {
- $this->_samples = new SampleList(
- $this->version,
- $this->solution['assistantSid'],
- $this->solution['sid']
- );
- }
-
- return $this->_samples;
- }
-
- /**
- * Access the taskActions
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\Task\TaskActionsList
- */
- protected function getTaskActions()
- {
- if (!$this->_taskActions) {
- $this->_taskActions = new TaskActionsList(
- $this->version,
- $this->solution['assistantSid'],
- $this->solution['sid']
- );
- }
-
- return $this->_taskActions;
- }
-
- /**
- * Access the statistics
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\Task\TaskStatisticsList
- */
- protected function getStatistics()
- {
- if (!$this->_statistics) {
- $this->_statistics = new TaskStatisticsList(
- $this->version,
- $this->solution['assistantSid'],
- $this->solution['sid']
- );
- }
-
- return $this->_statistics;
- }
-
- /**
- * Magic getter to lazy load subresources
- *
- * @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
- * @throws TwilioException For unknown subresources
- */
- public function __get($name)
- {
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown subresource ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $property = $this->$name;
- if (\method_exists($property, 'getContext')) {
- return \call_user_func_array(array($property, 'getContext'), $arguments);
- }
-
- throw new TwilioException('Resource does not have a context');
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.Understand.TaskContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/TaskInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/TaskInstance.php
deleted file mode 100644
index a2665fd..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/TaskInstance.php
+++ /dev/null
@@ -1,200 +0,0 @@
-properties = array(
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- 'friendlyName' => Values::array_get($payload, 'friendly_name'),
- 'links' => Values::array_get($payload, 'links'),
- 'assistantSid' => Values::array_get($payload, 'assistant_sid'),
- 'sid' => Values::array_get($payload, 'sid'),
- 'uniqueName' => Values::array_get($payload, 'unique_name'),
- 'actionsUrl' => Values::array_get($payload, 'actions_url'),
- 'url' => Values::array_get($payload, 'url'),
- );
-
- $this->solution = array('assistantSid' => $assistantSid, 'sid' => $sid ?: $this->properties['sid'],);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\TaskContext Context for
- * this
- * TaskInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new TaskContext(
- $this->version,
- $this->solution['assistantSid'],
- $this->solution['sid']
- );
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a TaskInstance
- *
- * @return TaskInstance Fetched TaskInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Update the TaskInstance
- *
- * @param array|Options $options Optional Arguments
- * @return TaskInstance Updated TaskInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- return $this->proxy()->update($options);
- }
-
- /**
- * Deletes the TaskInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->proxy()->delete();
- }
-
- /**
- * Access the fields
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\Task\FieldList
- */
- protected function getFields()
- {
- return $this->proxy()->fields;
- }
-
- /**
- * Access the samples
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\Task\SampleList
- */
- protected function getSamples()
- {
- return $this->proxy()->samples;
- }
-
- /**
- * Access the taskActions
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\Task\TaskActionsList
- */
- protected function getTaskActions()
- {
- return $this->proxy()->taskActions;
- }
-
- /**
- * Access the statistics
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\Task\TaskStatisticsList
- */
- protected function getStatistics()
- {
- return $this->proxy()->statistics;
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.Understand.TaskInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/TaskList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/TaskList.php
deleted file mode 100644
index b916035..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/TaskList.php
+++ /dev/null
@@ -1,183 +0,0 @@
-solution = array('assistantSid' => $assistantSid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($assistantSid) . '/Tasks';
- }
-
- /**
- * Streams TaskInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
- *
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
- */
- public function stream($limit = null, $pageSize = null)
- {
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
- }
-
- /**
- * Reads TaskInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return TaskInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
- /**
- * Retrieve a single page of TaskInstance records from the API.
- * Request is executed immediately
- *
- * @param mixed $pageSize Number of records to return, defaults to 50
- * @param string $pageToken PageToken provided by the API
- * @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of TaskInstance
- */
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
- {
- $params = Values::of(array(
- 'PageToken' => $pageToken,
- 'Page' => $pageNumber,
- 'PageSize' => $pageSize,
- ));
-
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
-
- return new TaskPage($this->version, $response, $this->solution);
- }
-
- /**
- * Retrieve a specific page of TaskInstance records from the API.
- * Request is executed immediately
- *
- * @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of TaskInstance
- */
- public function getPage($targetUrl)
- {
- $response = $this->version->getDomain()->getClient()->request(
- 'GET',
- $targetUrl
- );
-
- return new TaskPage($this->version, $response, $this->solution);
- }
-
- /**
- * Create a new TaskInstance
- *
- * @param string $uniqueName A user-provided string that uniquely identifies
- * this resource as an alternative to the sid. Unique
- * up to 64 characters long.
- * @param array|Options $options Optional Arguments
- * @return TaskInstance Newly created TaskInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($uniqueName, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'UniqueName' => $uniqueName,
- 'FriendlyName' => $options['friendlyName'],
- 'Actions' => Serialize::jsonObject($options['actions']),
- 'ActionsUrl' => $options['actionsUrl'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new TaskInstance($this->version, $payload, $this->solution['assistantSid']);
- }
-
- /**
- * Constructs a TaskContext
- *
- * @param string $sid A 34 character string that uniquely identifies this
- * resource.
- * @return \Twilio\Rest\Preview\Understand\Assistant\TaskContext
- */
- public function getContext($sid)
- {
- return new TaskContext($this->version, $this->solution['assistantSid'], $sid);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.Understand.TaskList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/TaskOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/TaskOptions.php
deleted file mode 100644
index d0bbbf3..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/TaskOptions.php
+++ /dev/null
@@ -1,226 +0,0 @@
-options['friendlyName'] = $friendlyName;
- $this->options['actions'] = $actions;
- $this->options['actionsUrl'] = $actionsUrl;
- }
-
- /**
- * A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long.
- *
- * @param string $friendlyName A user-provided string that identifies this
- * resource. It is non-unique and can up to 255
- * characters long.
- * @return $this Fluent Builder
- */
- public function setFriendlyName($friendlyName)
- {
- $this->options['friendlyName'] = $friendlyName;
- return $this;
- }
-
- /**
- * A user-provided JSON object encoded as a string to specify the actions for this task. It is optional and non-unique.
- *
- * @param array $actions A user-provided JSON object encoded as a string to
- * specify the actions for this task. It is optional and
- * non-unique.
- * @return $this Fluent Builder
- */
- public function setActions($actions)
- {
- $this->options['actions'] = $actions;
- return $this;
- }
-
- /**
- * User-provided HTTP endpoint where from the assistant fetches actions
- *
- * @param string $actionsUrl User-provided HTTP endpoint where from the
- * assistant fetches actions
- * @return $this Fluent Builder
- */
- public function setActionsUrl($actionsUrl)
- {
- $this->options['actionsUrl'] = $actionsUrl;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.Understand.CreateTaskOptions ' . \implode(' ', $options) . ']';
- }
-}
-
-class UpdateTaskOptions extends Options
-{
- /**
- * @param string $friendlyName A user-provided string that identifies this
- * resource. It is non-unique and can up to 255
- * characters long.
- * @param string $uniqueName A user-provided string that uniquely identifies
- * this resource as an alternative to the sid. Unique
- * up to 64 characters long.
- * @param array $actions A user-provided JSON object encoded as a string to
- * specify the actions for this task. It is optional and
- * non-unique.
- * @param string $actionsUrl User-provided HTTP endpoint where from the
- * assistant fetches actions
- */
- public function __construct($friendlyName = Values::NONE, $uniqueName = Values::NONE, $actions = Values::NONE, $actionsUrl = Values::NONE)
- {
- $this->options['friendlyName'] = $friendlyName;
- $this->options['uniqueName'] = $uniqueName;
- $this->options['actions'] = $actions;
- $this->options['actionsUrl'] = $actionsUrl;
- }
-
- /**
- * A user-provided string that identifies this resource. It is non-unique and can up to 255 characters long.
- *
- * @param string $friendlyName A user-provided string that identifies this
- * resource. It is non-unique and can up to 255
- * characters long.
- * @return $this Fluent Builder
- */
- public function setFriendlyName($friendlyName)
- {
- $this->options['friendlyName'] = $friendlyName;
- return $this;
- }
-
- /**
- * A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.
- *
- * @param string $uniqueName A user-provided string that uniquely identifies
- * this resource as an alternative to the sid. Unique
- * up to 64 characters long.
- * @return $this Fluent Builder
- */
- public function setUniqueName($uniqueName)
- {
- $this->options['uniqueName'] = $uniqueName;
- return $this;
- }
-
- /**
- * A user-provided JSON object encoded as a string to specify the actions for this task. It is optional and non-unique.
- *
- * @param array $actions A user-provided JSON object encoded as a string to
- * specify the actions for this task. It is optional and
- * non-unique.
- * @return $this Fluent Builder
- */
- public function setActions($actions)
- {
- $this->options['actions'] = $actions;
- return $this;
- }
-
- /**
- * User-provided HTTP endpoint where from the assistant fetches actions
- *
- * @param string $actionsUrl User-provided HTTP endpoint where from the
- * assistant fetches actions
- * @return $this Fluent Builder
- */
- public function setActionsUrl($actionsUrl)
- {
- $this->options['actionsUrl'] = $actionsUrl;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.Understand.UpdateTaskOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/TaskPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/TaskPage.php
deleted file mode 100644
index b425bcd..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/TaskPage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new TaskInstance($this->version, $payload, $this->solution['assistantSid']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.Understand.TaskPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/AssistantContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/AssistantContext.php
deleted file mode 100644
index 7c6689e..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/AssistantContext.php
+++ /dev/null
@@ -1,304 +0,0 @@
-solution = array('sid' => $sid,);
-
- $this->uri = '/Assistants/' . \rawurlencode($sid) . '';
- }
-
- /**
- * Fetch a AssistantInstance
- *
- * @return AssistantInstance Fetched AssistantInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new AssistantInstance($this->version, $payload, $this->solution['sid']);
- }
-
- /**
- * Update the AssistantInstance
- *
- * @param array|Options $options Optional Arguments
- * @return AssistantInstance Updated AssistantInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'LogQueries' => Serialize::booleanToString($options['logQueries']),
- 'UniqueName' => $options['uniqueName'],
- 'CallbackUrl' => $options['callbackUrl'],
- 'CallbackEvents' => $options['callbackEvents'],
- 'FallbackActions' => Serialize::jsonObject($options['fallbackActions']),
- 'InitiationActions' => Serialize::jsonObject($options['initiationActions']),
- 'StyleSheet' => Serialize::jsonObject($options['styleSheet']),
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new AssistantInstance($this->version, $payload, $this->solution['sid']);
- }
-
- /**
- * Deletes the AssistantInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
-
- /**
- * Access the fieldTypes
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\FieldTypeList
- */
- protected function getFieldTypes()
- {
- if (!$this->_fieldTypes) {
- $this->_fieldTypes = new FieldTypeList($this->version, $this->solution['sid']);
- }
-
- return $this->_fieldTypes;
- }
-
- /**
- * Access the tasks
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\TaskList
- */
- protected function getTasks()
- {
- if (!$this->_tasks) {
- $this->_tasks = new TaskList($this->version, $this->solution['sid']);
- }
-
- return $this->_tasks;
- }
-
- /**
- * Access the modelBuilds
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\ModelBuildList
- */
- protected function getModelBuilds()
- {
- if (!$this->_modelBuilds) {
- $this->_modelBuilds = new ModelBuildList($this->version, $this->solution['sid']);
- }
-
- return $this->_modelBuilds;
- }
-
- /**
- * Access the queries
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\QueryList
- */
- protected function getQueries()
- {
- if (!$this->_queries) {
- $this->_queries = new QueryList($this->version, $this->solution['sid']);
- }
-
- return $this->_queries;
- }
-
- /**
- * Access the assistantFallbackActions
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\AssistantFallbackActionsList
- */
- protected function getAssistantFallbackActions()
- {
- if (!$this->_assistantFallbackActions) {
- $this->_assistantFallbackActions = new AssistantFallbackActionsList(
- $this->version,
- $this->solution['sid']
- );
- }
-
- return $this->_assistantFallbackActions;
- }
-
- /**
- * Access the assistantInitiationActions
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\AssistantInitiationActionsList
- */
- protected function getAssistantInitiationActions()
- {
- if (!$this->_assistantInitiationActions) {
- $this->_assistantInitiationActions = new AssistantInitiationActionsList(
- $this->version,
- $this->solution['sid']
- );
- }
-
- return $this->_assistantInitiationActions;
- }
-
- /**
- * Access the dialogues
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\DialogueList
- */
- protected function getDialogues()
- {
- if (!$this->_dialogues) {
- $this->_dialogues = new DialogueList($this->version, $this->solution['sid']);
- }
-
- return $this->_dialogues;
- }
-
- /**
- * Access the styleSheet
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\StyleSheetList
- */
- protected function getStyleSheet()
- {
- if (!$this->_styleSheet) {
- $this->_styleSheet = new StyleSheetList($this->version, $this->solution['sid']);
- }
-
- return $this->_styleSheet;
- }
-
- /**
- * Magic getter to lazy load subresources
- *
- * @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
- * @throws TwilioException For unknown subresources
- */
- public function __get($name)
- {
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown subresource ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $property = $this->$name;
- if (\method_exists($property, 'getContext')) {
- return \call_user_func_array(array($property, 'getContext'), $arguments);
- }
-
- throw new TwilioException('Resource does not have a context');
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.Understand.AssistantContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/AssistantInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/AssistantInstance.php
deleted file mode 100644
index 8e6a6ec..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/AssistantInstance.php
+++ /dev/null
@@ -1,242 +0,0 @@
-properties = array(
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- 'friendlyName' => Values::array_get($payload, 'friendly_name'),
- 'latestModelBuildSid' => Values::array_get($payload, 'latest_model_build_sid'),
- 'links' => Values::array_get($payload, 'links'),
- 'logQueries' => Values::array_get($payload, 'log_queries'),
- 'sid' => Values::array_get($payload, 'sid'),
- 'uniqueName' => Values::array_get($payload, 'unique_name'),
- 'url' => Values::array_get($payload, 'url'),
- 'callbackUrl' => Values::array_get($payload, 'callback_url'),
- 'callbackEvents' => Values::array_get($payload, 'callback_events'),
- );
-
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Preview\Understand\AssistantContext Context for this
- * AssistantInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new AssistantContext($this->version, $this->solution['sid']);
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a AssistantInstance
- *
- * @return AssistantInstance Fetched AssistantInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Update the AssistantInstance
- *
- * @param array|Options $options Optional Arguments
- * @return AssistantInstance Updated AssistantInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function update($options = array())
- {
- return $this->proxy()->update($options);
- }
-
- /**
- * Deletes the AssistantInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->proxy()->delete();
- }
-
- /**
- * Access the fieldTypes
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\FieldTypeList
- */
- protected function getFieldTypes()
- {
- return $this->proxy()->fieldTypes;
- }
-
- /**
- * Access the tasks
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\TaskList
- */
- protected function getTasks()
- {
- return $this->proxy()->tasks;
- }
-
- /**
- * Access the modelBuilds
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\ModelBuildList
- */
- protected function getModelBuilds()
- {
- return $this->proxy()->modelBuilds;
- }
-
- /**
- * Access the queries
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\QueryList
- */
- protected function getQueries()
- {
- return $this->proxy()->queries;
- }
-
- /**
- * Access the assistantFallbackActions
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\AssistantFallbackActionsList
- */
- protected function getAssistantFallbackActions()
- {
- return $this->proxy()->assistantFallbackActions;
- }
-
- /**
- * Access the assistantInitiationActions
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\AssistantInitiationActionsList
- */
- protected function getAssistantInitiationActions()
- {
- return $this->proxy()->assistantInitiationActions;
- }
-
- /**
- * Access the dialogues
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\DialogueList
- */
- protected function getDialogues()
- {
- return $this->proxy()->dialogues;
- }
-
- /**
- * Access the styleSheet
- *
- * @return \Twilio\Rest\Preview\Understand\Assistant\StyleSheetList
- */
- protected function getStyleSheet()
- {
- return $this->proxy()->styleSheet;
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Preview.Understand.AssistantInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/AssistantList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/AssistantList.php
deleted file mode 100644
index 788a4ad..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/AssistantList.php
+++ /dev/null
@@ -1,183 +0,0 @@
-solution = array();
-
- $this->uri = '/Assistants';
- }
-
- /**
- * Streams AssistantInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
- *
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
- */
- public function stream($limit = null, $pageSize = null)
- {
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
- }
-
- /**
- * Reads AssistantInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return AssistantInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
- /**
- * Retrieve a single page of AssistantInstance records from the API.
- * Request is executed immediately
- *
- * @param mixed $pageSize Number of records to return, defaults to 50
- * @param string $pageToken PageToken provided by the API
- * @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of AssistantInstance
- */
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
- {
- $params = Values::of(array(
- 'PageToken' => $pageToken,
- 'Page' => $pageNumber,
- 'PageSize' => $pageSize,
- ));
-
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
-
- return new AssistantPage($this->version, $response, $this->solution);
- }
-
- /**
- * Retrieve a specific page of AssistantInstance records from the API.
- * Request is executed immediately
- *
- * @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of AssistantInstance
- */
- public function getPage($targetUrl)
- {
- $response = $this->version->getDomain()->getClient()->request(
- 'GET',
- $targetUrl
- );
-
- return new AssistantPage($this->version, $response, $this->solution);
- }
-
- /**
- * Create a new AssistantInstance
- *
- * @param array|Options $options Optional Arguments
- * @return AssistantInstance Newly created AssistantInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'LogQueries' => Serialize::booleanToString($options['logQueries']),
- 'UniqueName' => $options['uniqueName'],
- 'CallbackUrl' => $options['callbackUrl'],
- 'CallbackEvents' => $options['callbackEvents'],
- 'FallbackActions' => Serialize::jsonObject($options['fallbackActions']),
- 'InitiationActions' => Serialize::jsonObject($options['initiationActions']),
- 'StyleSheet' => Serialize::jsonObject($options['styleSheet']),
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new AssistantInstance($this->version, $payload);
- }
-
- /**
- * Constructs a AssistantContext
- *
- * @param string $sid A 34 character string that uniquely identifies this
- * resource.
- * @return \Twilio\Rest\Preview\Understand\AssistantContext
- */
- public function getContext($sid)
- {
- return new AssistantContext($this->version, $sid);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.Understand.AssistantList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/AssistantOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/AssistantOptions.php
deleted file mode 100644
index 556413e..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/AssistantOptions.php
+++ /dev/null
@@ -1,403 +0,0 @@
-options['friendlyName'] = $friendlyName;
- $this->options['logQueries'] = $logQueries;
- $this->options['uniqueName'] = $uniqueName;
- $this->options['callbackUrl'] = $callbackUrl;
- $this->options['callbackEvents'] = $callbackEvents;
- $this->options['fallbackActions'] = $fallbackActions;
- $this->options['initiationActions'] = $initiationActions;
- $this->options['styleSheet'] = $styleSheet;
- }
-
- /**
- * A text description for the Assistant. It is non-unique and can up to 255 characters long.
- *
- * @param string $friendlyName A text description for the Assistant. It is
- * non-unique and can up to 255 characters long.
- * @return $this Fluent Builder
- */
- public function setFriendlyName($friendlyName)
- {
- $this->options['friendlyName'] = $friendlyName;
- return $this;
- }
-
- /**
- * A boolean that specifies whether queries should be logged for 30 days further training. If false, no queries will be stored, if true, queries will be stored for 30 days and deleted thereafter. Defaults to true if no value is provided.
- *
- * @param bool $logQueries A boolean that specifies whether queries should be
- * logged for 30 days further training. If false, no
- * queries will be stored, if true, queries will be
- * stored for 30 days and deleted thereafter. Defaults
- * to true if no value is provided.
- * @return $this Fluent Builder
- */
- public function setLogQueries($logQueries)
- {
- $this->options['logQueries'] = $logQueries;
- return $this;
- }
-
- /**
- * A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.
- *
- * @param string $uniqueName A user-provided string that uniquely identifies
- * this resource as an alternative to the sid. Unique
- * up to 64 characters long.
- * @return $this Fluent Builder
- */
- public function setUniqueName($uniqueName)
- {
- $this->options['uniqueName'] = $uniqueName;
- return $this;
- }
-
- /**
- * A user-provided URL to send event callbacks to.
- *
- * @param string $callbackUrl A user-provided URL to send event callbacks to.
- * @return $this Fluent Builder
- */
- public function setCallbackUrl($callbackUrl)
- {
- $this->options['callbackUrl'] = $callbackUrl;
- return $this;
- }
-
- /**
- * Space-separated list of callback events that will trigger callbacks.
- *
- * @param string $callbackEvents Space-separated list of callback events that
- * will trigger callbacks.
- * @return $this Fluent Builder
- */
- public function setCallbackEvents($callbackEvents)
- {
- $this->options['callbackEvents'] = $callbackEvents;
- return $this;
- }
-
- /**
- * The JSON actions to be executed when the user's input is not recognized as matching any Task.
- *
- * @param array $fallbackActions The JSON actions to be executed when the
- * user's input is not recognized as matching any
- * Task.
- * @return $this Fluent Builder
- */
- public function setFallbackActions($fallbackActions)
- {
- $this->options['fallbackActions'] = $fallbackActions;
- return $this;
- }
-
- /**
- * The JSON actions to be executed on inbound phone calls when the Assistant has to say something first.
- *
- * @param array $initiationActions The JSON actions to be executed on inbound
- * phone calls when the Assistant has to say
- * something first.
- * @return $this Fluent Builder
- */
- public function setInitiationActions($initiationActions)
- {
- $this->options['initiationActions'] = $initiationActions;
- return $this;
- }
-
- /**
- * The JSON object that holds the style sheet for the assistant
- *
- * @param array $styleSheet The JSON object that holds the style sheet for the
- * assistant
- * @return $this Fluent Builder
- */
- public function setStyleSheet($styleSheet)
- {
- $this->options['styleSheet'] = $styleSheet;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.Understand.CreateAssistantOptions ' . \implode(' ', $options) . ']';
- }
-}
-
-class UpdateAssistantOptions extends Options
-{
- /**
- * @param string $friendlyName A text description for the Assistant. It is
- * non-unique and can up to 255 characters long.
- * @param bool $logQueries A boolean that specifies whether queries should be
- * logged for 30 days further training. If false, no
- * queries will be stored, if true, queries will be
- * stored for 30 days and deleted thereafter. Defaults
- * to true if no value is provided.
- * @param string $uniqueName A user-provided string that uniquely identifies
- * this resource as an alternative to the sid. Unique
- * up to 64 characters long.
- * @param string $callbackUrl A user-provided URL to send event callbacks to.
- * @param string $callbackEvents Space-separated list of callback events that
- * will trigger callbacks.
- * @param array $fallbackActions The JSON actions to be executed when the
- * user's input is not recognized as matching any
- * Task.
- * @param array $initiationActions The JSON actions to be executed on inbound
- * phone calls when the Assistant has to say
- * something first.
- * @param array $styleSheet The JSON object that holds the style sheet for the
- * assistant
- */
- public function __construct($friendlyName = Values::NONE, $logQueries = Values::NONE, $uniqueName = Values::NONE, $callbackUrl = Values::NONE, $callbackEvents = Values::NONE, $fallbackActions = Values::NONE, $initiationActions = Values::NONE, $styleSheet = Values::NONE)
- {
- $this->options['friendlyName'] = $friendlyName;
- $this->options['logQueries'] = $logQueries;
- $this->options['uniqueName'] = $uniqueName;
- $this->options['callbackUrl'] = $callbackUrl;
- $this->options['callbackEvents'] = $callbackEvents;
- $this->options['fallbackActions'] = $fallbackActions;
- $this->options['initiationActions'] = $initiationActions;
- $this->options['styleSheet'] = $styleSheet;
- }
-
- /**
- * A text description for the Assistant. It is non-unique and can up to 255 characters long.
- *
- * @param string $friendlyName A text description for the Assistant. It is
- * non-unique and can up to 255 characters long.
- * @return $this Fluent Builder
- */
- public function setFriendlyName($friendlyName)
- {
- $this->options['friendlyName'] = $friendlyName;
- return $this;
- }
-
- /**
- * A boolean that specifies whether queries should be logged for 30 days further training. If false, no queries will be stored, if true, queries will be stored for 30 days and deleted thereafter. Defaults to true if no value is provided.
- *
- * @param bool $logQueries A boolean that specifies whether queries should be
- * logged for 30 days further training. If false, no
- * queries will be stored, if true, queries will be
- * stored for 30 days and deleted thereafter. Defaults
- * to true if no value is provided.
- * @return $this Fluent Builder
- */
- public function setLogQueries($logQueries)
- {
- $this->options['logQueries'] = $logQueries;
- return $this;
- }
-
- /**
- * A user-provided string that uniquely identifies this resource as an alternative to the sid. Unique up to 64 characters long.
- *
- * @param string $uniqueName A user-provided string that uniquely identifies
- * this resource as an alternative to the sid. Unique
- * up to 64 characters long.
- * @return $this Fluent Builder
- */
- public function setUniqueName($uniqueName)
- {
- $this->options['uniqueName'] = $uniqueName;
- return $this;
- }
-
- /**
- * A user-provided URL to send event callbacks to.
- *
- * @param string $callbackUrl A user-provided URL to send event callbacks to.
- * @return $this Fluent Builder
- */
- public function setCallbackUrl($callbackUrl)
- {
- $this->options['callbackUrl'] = $callbackUrl;
- return $this;
- }
-
- /**
- * Space-separated list of callback events that will trigger callbacks.
- *
- * @param string $callbackEvents Space-separated list of callback events that
- * will trigger callbacks.
- * @return $this Fluent Builder
- */
- public function setCallbackEvents($callbackEvents)
- {
- $this->options['callbackEvents'] = $callbackEvents;
- return $this;
- }
-
- /**
- * The JSON actions to be executed when the user's input is not recognized as matching any Task.
- *
- * @param array $fallbackActions The JSON actions to be executed when the
- * user's input is not recognized as matching any
- * Task.
- * @return $this Fluent Builder
- */
- public function setFallbackActions($fallbackActions)
- {
- $this->options['fallbackActions'] = $fallbackActions;
- return $this;
- }
-
- /**
- * The JSON actions to be executed on inbound phone calls when the Assistant has to say something first.
- *
- * @param array $initiationActions The JSON actions to be executed on inbound
- * phone calls when the Assistant has to say
- * something first.
- * @return $this Fluent Builder
- */
- public function setInitiationActions($initiationActions)
- {
- $this->options['initiationActions'] = $initiationActions;
- return $this;
- }
-
- /**
- * The JSON object that holds the style sheet for the assistant
- *
- * @param array $styleSheet The JSON object that holds the style sheet for the
- * assistant
- * @return $this Fluent Builder
- */
- public function setStyleSheet($styleSheet)
- {
- $this->options['styleSheet'] = $styleSheet;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.Understand.UpdateAssistantOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/AssistantPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/AssistantPage.php
deleted file mode 100644
index 22ff748..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/AssistantPage.php
+++ /dev/null
@@ -1,41 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new AssistantInstance($this->version, $payload);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Preview.Understand.AssistantPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless.php
index ccdd35e..e34a029 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless.php
@@ -1,40 +1,46 @@
version = 'wireless';
}
- /**
- * @return \Twilio\Rest\Preview\Wireless\CommandList
- */
- protected function getCommands()
+ protected function getCommands(): CommandList
{
if (!$this->_commands) {
$this->_commands = new CommandList($this);
@@ -53,10 +56,7 @@ protected function getCommands()
return $this->_commands;
}
- /**
- * @return \Twilio\Rest\Preview\Wireless\RatePlanList
- */
- protected function getRatePlans()
+ protected function getRatePlans(): RatePlanList
{
if (!$this->_ratePlans) {
$this->_ratePlans = new RatePlanList($this);
@@ -64,10 +64,7 @@ protected function getRatePlans()
return $this->_ratePlans;
}
- /**
- * @return \Twilio\Rest\Preview\Wireless\SimList
- */
- protected function getSims()
+ protected function getSims(): SimList
{
if (!$this->_sims) {
$this->_sims = new SimList($this);
@@ -82,7 +79,7 @@ protected function getSims()
* @return \Twilio\ListResource The requested resource
* @throws TwilioException For unknown resource
*/
- public function __get($name)
+ public function __get(string $name)
{
$method = 'get' . \ucfirst($name);
if (\method_exists($this, $method)) {
@@ -97,10 +94,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -115,8 +112,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.Wireless]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/CommandContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/CommandContext.php
index d8ce971..6491968 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/CommandContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/CommandContext.php
@@ -2,70 +2,82 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Preview\Wireless;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
class CommandContext extends InstanceContext
-{
+ {
/**
* Initialize the CommandContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The sid
- * @return \Twilio\Rest\Preview\Wireless\CommandContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Commands/' . \rawurlencode($sid) . '';
+ $this->uri = '/Commands/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a CommandInstance
+ * Fetch the CommandInstance
*
* @return CommandInstance Fetched CommandInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): CommandInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
- return new CommandInstance($this->version, $payload, $this->solution['sid']);
+ return new CommandInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Preview.Wireless.CommandContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/CommandInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/CommandInstance.php
index 78459cb..feb7fcc 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/CommandInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/CommandInstance.php
@@ -2,50 +2,56 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Preview\Wireless;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property string $sid
- * @property string $accountSid
- * @property string $deviceSid
- * @property string $simSid
- * @property string $command
- * @property string $commandMode
- * @property string $status
- * @property string $direction
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $deviceSid
+ * @property string|null $simSid
+ * @property string|null $command
+ * @property string|null $commandMode
+ * @property string|null $status
+ * @property string|null $direction
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
*/
class CommandInstance extends InstanceResource
{
/**
* Initialize the CommandInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The sid
- * @return \Twilio\Rest\Preview\Wireless\CommandInstance
+ * @param string $sid
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'deviceSid' => Values::array_get($payload, 'device_sid'),
@@ -57,35 +63,38 @@ public function __construct(Version $version, array $payload, $sid = null)
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Preview\Wireless\CommandContext Context for this
- * CommandInstance
+ * @return CommandContext Context for this CommandInstance
*/
- protected function proxy()
+ protected function proxy(): CommandContext
{
if (!$this->context) {
- $this->context = new CommandContext($this->version, $this->solution['sid']);
+ $this->context = new CommandContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a CommandInstance
+ * Fetch the CommandInstance
*
* @return CommandInstance Fetched CommandInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): CommandInstance
{
+
return $this->proxy()->fetch();
}
@@ -96,7 +105,7 @@ public function fetch()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -115,12 +124,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Preview.Wireless.CommandInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/CommandList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/CommandList.php
index 990f91a..9dc0842 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/CommandList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/CommandList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Preview\Wireless;
@@ -12,58 +19,70 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
+
class CommandList extends ListResource
-{
+ {
/**
* Construct the CommandList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Preview\Wireless\CommandList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/Commands';
}
/**
- * Streams CommandInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the CommandInstance
*
+ * @param string $command
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return CommandInstance Created CommandInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function create(string $command, array $options = []): CommandInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($options, $limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'Command' =>
+ $command,
+ 'Device' =>
+ $options['device'],
+ 'Sim' =>
+ $options['sim'],
+ 'CallbackMethod' =>
+ $options['callbackMethod'],
+ 'CallbackUrl' =>
+ $options['callbackUrl'],
+ 'CommandMode' =>
+ $options['commandMode'],
+ 'IncludeSid' =>
+ $options['includeSid'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new CommandInstance(
+ $this->version,
+ $payload
+ );
}
+
/**
* Reads CommandInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -80,39 +99,72 @@ public function stream($options = array(), $limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return CommandInstance[] Array of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
+ /**
+ * Streams CommandInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of CommandInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of CommandInstance
+ * @return CommandPage Page of CommandInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): CommandPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Device' => $options['device'],
- 'Sim' => $options['sim'],
- 'Status' => $options['status'],
- 'Direction' => $options['direction'],
+
+ $params = Values::of([
+ 'Device' =>
+ $options['device'],
+ 'Sim' =>
+ $options['sim'],
+ 'Status' =>
+ $options['status'],
+ 'Direction' =>
+ $options['direction'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new CommandPage($this->version, $response, $this->solution);
}
@@ -122,9 +174,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of CommandInstance
+ * @return CommandPage Page of CommandInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): CommandPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -134,47 +186,21 @@ public function getPage($targetUrl)
return new CommandPage($this->version, $response, $this->solution);
}
- /**
- * Create a new CommandInstance
- *
- * @param string $command The command
- * @param array|Options $options Optional Arguments
- * @return CommandInstance Newly created CommandInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($command, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'Command' => $command,
- 'Device' => $options['device'],
- 'Sim' => $options['sim'],
- 'CallbackMethod' => $options['callbackMethod'],
- 'CallbackUrl' => $options['callbackUrl'],
- 'CommandMode' => $options['commandMode'],
- 'IncludeSid' => $options['includeSid'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new CommandInstance($this->version, $payload);
- }
/**
* Constructs a CommandContext
*
- * @param string $sid The sid
- * @return \Twilio\Rest\Preview\Wireless\CommandContext
+ * @param string $sid
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): CommandContext
{
- return new CommandContext($this->version, $sid);
+ return new CommandContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -182,8 +208,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.Wireless.CommandList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/CommandOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/CommandOptions.php
index 29141b1..bda0312 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/CommandOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/CommandOptions.php
@@ -1,10 +1,16 @@
options['device'] = $device;
$this->options['sim'] = $sim;
- $this->options['status'] = $status;
- $this->options['direction'] = $direction;
+ $this->options['callbackMethod'] = $callbackMethod;
+ $this->options['callbackUrl'] = $callbackUrl;
+ $this->options['commandMode'] = $commandMode;
+ $this->options['includeSid'] = $includeSid;
}
/**
- * The device
+ *
*
- * @param string $device The device
+ * @param string $device
* @return $this Fluent Builder
*/
- public function setDevice($device)
+ public function setDevice(string $device): self
{
$this->options['device'] = $device;
return $this;
}
/**
- * The sim
+ *
*
- * @param string $sim The sim
+ * @param string $sim
* @return $this Fluent Builder
*/
- public function setSim($sim)
+ public function setSim(string $sim): self
{
$this->options['sim'] = $sim;
return $this;
}
/**
- * The status
+ *
*
- * @param string $status The status
+ * @param string $callbackMethod
* @return $this Fluent Builder
*/
- public function setStatus($status)
+ public function setCallbackMethod(string $callbackMethod): self
{
- $this->options['status'] = $status;
+ $this->options['callbackMethod'] = $callbackMethod;
return $this;
}
/**
- * The direction
+ *
*
- * @param string $direction The direction
+ * @param string $callbackUrl
* @return $this Fluent Builder
*/
- public function setDirection($direction)
+ public function setCallbackUrl(string $callbackUrl): self
{
- $this->options['direction'] = $direction;
+ $this->options['callbackUrl'] = $callbackUrl;
return $this;
}
/**
- * Provide a friendly representation
+ *
*
- * @return string Machine friendly representation
+ * @param string $commandMode
+ * @return $this Fluent Builder
*/
- public function __toString()
+ public function setCommandMode(string $commandMode): self
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.Wireless.ReadCommandOptions ' . \implode(' ', $options) . ']';
+ $this->options['commandMode'] = $commandMode;
+ return $this;
}
-}
-class CreateCommandOptions extends Options
-{
/**
- * @param string $device The device
- * @param string $sim The sim
- * @param string $callbackMethod The callback_method
- * @param string $callbackUrl The callback_url
- * @param string $commandMode The command_mode
- * @param string $includeSid The include_sid
+ *
+ *
+ * @param string $includeSid
+ * @return $this Fluent Builder
*/
- public function __construct($device = Values::NONE, $sim = Values::NONE, $callbackMethod = Values::NONE, $callbackUrl = Values::NONE, $commandMode = Values::NONE, $includeSid = Values::NONE)
+ public function setIncludeSid(string $includeSid): self
{
- $this->options['device'] = $device;
- $this->options['sim'] = $sim;
- $this->options['callbackMethod'] = $callbackMethod;
- $this->options['callbackUrl'] = $callbackUrl;
- $this->options['commandMode'] = $commandMode;
$this->options['includeSid'] = $includeSid;
+ return $this;
}
/**
- * The device
+ * Provide a friendly representation
*
- * @param string $device The device
- * @return $this Fluent Builder
+ * @return string Machine friendly representation
*/
- public function setDevice($device)
+ public function __toString(): string
{
- $this->options['device'] = $device;
- return $this;
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Preview.Wireless.CreateCommandOptions ' . $options . ']';
}
+}
+
+class ReadCommandOptions extends Options
+ {
/**
- * The sim
- *
- * @param string $sim The sim
- * @return $this Fluent Builder
+ * @param string $device
+ * @param string $sim
+ * @param string $status
+ * @param string $direction
*/
- public function setSim($sim)
- {
+ public function __construct(
+
+ string $device = Values::NONE,
+ string $sim = Values::NONE,
+ string $status = Values::NONE,
+ string $direction = Values::NONE
+
+ ) {
+ $this->options['device'] = $device;
$this->options['sim'] = $sim;
- return $this;
+ $this->options['status'] = $status;
+ $this->options['direction'] = $direction;
}
/**
- * The callback_method
+ *
*
- * @param string $callbackMethod The callback_method
+ * @param string $device
* @return $this Fluent Builder
*/
- public function setCallbackMethod($callbackMethod)
+ public function setDevice(string $device): self
{
- $this->options['callbackMethod'] = $callbackMethod;
+ $this->options['device'] = $device;
return $this;
}
/**
- * The callback_url
+ *
*
- * @param string $callbackUrl The callback_url
+ * @param string $sim
* @return $this Fluent Builder
*/
- public function setCallbackUrl($callbackUrl)
+ public function setSim(string $sim): self
{
- $this->options['callbackUrl'] = $callbackUrl;
+ $this->options['sim'] = $sim;
return $this;
}
/**
- * The command_mode
+ *
*
- * @param string $commandMode The command_mode
+ * @param string $status
* @return $this Fluent Builder
*/
- public function setCommandMode($commandMode)
+ public function setStatus(string $status): self
{
- $this->options['commandMode'] = $commandMode;
+ $this->options['status'] = $status;
return $this;
}
/**
- * The include_sid
+ *
*
- * @param string $includeSid The include_sid
+ * @param string $direction
* @return $this Fluent Builder
*/
- public function setIncludeSid($includeSid)
+ public function setDirection(string $direction): self
{
- $this->options['includeSid'] = $includeSid;
+ $this->options['direction'] = $direction;
return $this;
}
@@ -222,14 +265,10 @@ public function setIncludeSid($includeSid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.Wireless.CreateCommandOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Preview.Wireless.ReadCommandOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/CommandPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/CommandPage.php
index e2f75fa..2717341 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/CommandPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/CommandPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return CommandInstance \Twilio\Rest\Preview\Wireless\CommandInstance
+ */
+ public function buildInstance(array $payload): CommandInstance
{
return new CommandInstance($this->version, $payload);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.Wireless.CommandPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/RatePlanContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/RatePlanContext.php
index f244254..966d5f7 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/RatePlanContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/RatePlanContext.php
@@ -2,108 +2,127 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Preview\Wireless;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
class RatePlanContext extends InstanceContext
-{
+ {
/**
* Initialize the RatePlanContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The sid
- * @return \Twilio\Rest\Preview\Wireless\RatePlanContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/RatePlans/' . \rawurlencode($sid) . '';
+ $this->uri = '/RatePlans/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a RatePlanInstance
+ * Delete the RatePlanInstance
*
- * @return RatePlanInstance Fetched RatePlanInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
- return new RatePlanInstance($this->version, $payload, $this->solution['sid']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Update the RatePlanInstance
+ * Fetch the RatePlanInstance
*
- * @param array|Options $options Optional Arguments
- * @return RatePlanInstance Updated RatePlanInstance
+ * @return RatePlanInstance Fetched RatePlanInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): RatePlanInstance
{
- $options = new Values($options);
- $data = Values::of(array(
- 'UniqueName' => $options['uniqueName'],
- 'FriendlyName' => $options['friendlyName'],
- ));
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
+ return new RatePlanInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
);
-
- return new RatePlanInstance($this->version, $payload, $this->solution['sid']);
}
+
/**
- * Deletes the RatePlanInstance
+ * Update the RatePlanInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return RatePlanInstance Updated RatePlanInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): RatePlanInstance
{
- return $this->version->delete('delete', $this->uri);
+
+ $options = new Values($options);
+
+ $data = Values::of([
+ 'UniqueName' =>
+ $options['uniqueName'],
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
+
+ return new RatePlanInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Preview.Wireless.RatePlanContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/RatePlanInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/RatePlanInstance.php
index 0ce0a50..e836f34 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/RatePlanInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/RatePlanInstance.php
@@ -2,54 +2,60 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Preview\Wireless;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property string $sid
- * @property string $uniqueName
- * @property string $accountSid
- * @property string $friendlyName
- * @property bool $dataEnabled
- * @property string $dataMetering
+ * @property string|null $sid
+ * @property string|null $uniqueName
+ * @property string|null $accountSid
+ * @property string|null $friendlyName
+ * @property bool|null $dataEnabled
+ * @property string|null $dataMetering
* @property int $dataLimit
- * @property bool $messagingEnabled
- * @property bool $voiceEnabled
- * @property bool $nationalRoamingEnabled
- * @property string $internationalRoaming
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
+ * @property bool|null $messagingEnabled
+ * @property bool|null $voiceEnabled
+ * @property bool|null $nationalRoamingEnabled
+ * @property string[]|null $internationalRoaming
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
*/
class RatePlanInstance extends InstanceResource
{
/**
* Initialize the RatePlanInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The sid
- * @return \Twilio\Rest\Preview\Wireless\RatePlanInstance
+ * @param string $sid
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'uniqueName' => Values::array_get($payload, 'unique_name'),
'accountSid' => Values::array_get($payload, 'account_sid'),
@@ -64,59 +70,64 @@ public function __construct(Version $version, array $payload, $sid = null)
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Preview\Wireless\RatePlanContext Context for this
- * RatePlanInstance
+ * @return RatePlanContext Context for this RatePlanInstance
*/
- protected function proxy()
+ protected function proxy(): RatePlanContext
{
if (!$this->context) {
- $this->context = new RatePlanContext($this->version, $this->solution['sid']);
+ $this->context = new RatePlanContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a RatePlanInstance
+ * Delete the RatePlanInstance
*
- * @return RatePlanInstance Fetched RatePlanInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Update the RatePlanInstance
+ * Fetch the RatePlanInstance
*
- * @param array|Options $options Optional Arguments
- * @return RatePlanInstance Updated RatePlanInstance
+ * @return RatePlanInstance Fetched RatePlanInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): RatePlanInstance
{
- return $this->proxy()->update($options);
+
+ return $this->proxy()->fetch();
}
/**
- * Deletes the RatePlanInstance
+ * Update the RatePlanInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return RatePlanInstance Updated RatePlanInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): RatePlanInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->update($options);
}
/**
@@ -126,7 +137,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -145,12 +156,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Preview.Wireless.RatePlanInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/RatePlanList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/RatePlanList.php
index a93a210..3eb02bf 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/RatePlanList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/RatePlanList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Preview\Wireless;
@@ -12,58 +19,76 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
class RatePlanList extends ListResource
-{
+ {
/**
* Construct the RatePlanList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Preview\Wireless\RatePlanList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/RatePlans';
}
/**
- * Streams RatePlanInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the RatePlanInstance
*
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @param array|Options $options Optional Arguments
+ * @return RatePlanInstance Created RatePlanInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($limit = null, $pageSize = null)
+ public function create(array $options = []): RatePlanInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'UniqueName' =>
+ $options['uniqueName'],
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'DataEnabled' =>
+ Serialize::booleanToString($options['dataEnabled']),
+ 'DataLimit' =>
+ $options['dataLimit'],
+ 'DataMetering' =>
+ $options['dataMetering'],
+ 'MessagingEnabled' =>
+ Serialize::booleanToString($options['messagingEnabled']),
+ 'VoiceEnabled' =>
+ Serialize::booleanToString($options['voiceEnabled']),
+ 'CommandsEnabled' =>
+ Serialize::booleanToString($options['commandsEnabled']),
+ 'NationalRoamingEnabled' =>
+ Serialize::booleanToString($options['nationalRoamingEnabled']),
+ 'InternationalRoaming' =>
+ Serialize::map($options['internationalRoaming'], function ($e) { return $e; }),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new RatePlanInstance(
+ $this->version,
+ $payload
+ );
}
+
/**
* Reads RatePlanInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -79,11 +104,38 @@ public function stream($limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return RatePlanInstance[] Array of results
*/
- public function read($limit = null, $pageSize = null)
+ public function read(int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($limit, $pageSize), false);
}
+ /**
+ * Streams RatePlanInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of RatePlanInstance records from the API.
* Request is executed immediately
@@ -91,21 +143,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of RatePlanInstance
+ * @return RatePlanPage Page of RatePlanInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): RatePlanPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new RatePlanPage($this->version, $response, $this->solution);
}
@@ -115,9 +168,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of RatePlanInstance
+ * @return RatePlanPage Page of RatePlanInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): RatePlanPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -127,51 +180,21 @@ public function getPage($targetUrl)
return new RatePlanPage($this->version, $response, $this->solution);
}
- /**
- * Create a new RatePlanInstance
- *
- * @param array|Options $options Optional Arguments
- * @return RatePlanInstance Newly created RatePlanInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'UniqueName' => $options['uniqueName'],
- 'FriendlyName' => $options['friendlyName'],
- 'DataEnabled' => Serialize::booleanToString($options['dataEnabled']),
- 'DataLimit' => $options['dataLimit'],
- 'DataMetering' => $options['dataMetering'],
- 'MessagingEnabled' => Serialize::booleanToString($options['messagingEnabled']),
- 'VoiceEnabled' => Serialize::booleanToString($options['voiceEnabled']),
- 'CommandsEnabled' => Serialize::booleanToString($options['commandsEnabled']),
- 'NationalRoamingEnabled' => Serialize::booleanToString($options['nationalRoamingEnabled']),
- 'InternationalRoaming' => Serialize::map($options['internationalRoaming'], function ($e) {
- return $e;
- }),
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new RatePlanInstance($this->version, $payload);
- }
/**
* Constructs a RatePlanContext
*
- * @param string $sid The sid
- * @return \Twilio\Rest\Preview\Wireless\RatePlanContext
+ * @param string $sid
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): RatePlanContext
{
- return new RatePlanContext($this->version, $sid);
+ return new RatePlanContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -179,8 +202,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.Wireless.RatePlanList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/RatePlanOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/RatePlanOptions.php
index 9541b66..d9c89ac 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/RatePlanOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/RatePlanOptions.php
@@ -1,10 +1,16 @@
options['uniqueName'] = $uniqueName;
$this->options['friendlyName'] = $friendlyName;
$this->options['dataEnabled'] = $dataEnabled;
@@ -75,120 +126,120 @@ public function __construct($uniqueName = Values::NONE, $friendlyName = Values::
}
/**
- * The unique_name
+ *
*
- * @param string $uniqueName The unique_name
+ * @param string $uniqueName
* @return $this Fluent Builder
*/
- public function setUniqueName($uniqueName)
+ public function setUniqueName(string $uniqueName): self
{
$this->options['uniqueName'] = $uniqueName;
return $this;
}
/**
- * The friendly_name
+ *
*
- * @param string $friendlyName The friendly_name
+ * @param string $friendlyName
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
}
/**
- * The data_enabled
+ *
*
- * @param bool $dataEnabled The data_enabled
+ * @param bool $dataEnabled
* @return $this Fluent Builder
*/
- public function setDataEnabled($dataEnabled)
+ public function setDataEnabled(bool $dataEnabled): self
{
$this->options['dataEnabled'] = $dataEnabled;
return $this;
}
/**
- * The data_limit
+ *
*
- * @param int $dataLimit The data_limit
+ * @param int $dataLimit
* @return $this Fluent Builder
*/
- public function setDataLimit($dataLimit)
+ public function setDataLimit(int $dataLimit): self
{
$this->options['dataLimit'] = $dataLimit;
return $this;
}
/**
- * The data_metering
+ *
*
- * @param string $dataMetering The data_metering
+ * @param string $dataMetering
* @return $this Fluent Builder
*/
- public function setDataMetering($dataMetering)
+ public function setDataMetering(string $dataMetering): self
{
$this->options['dataMetering'] = $dataMetering;
return $this;
}
/**
- * The messaging_enabled
+ *
*
- * @param bool $messagingEnabled The messaging_enabled
+ * @param bool $messagingEnabled
* @return $this Fluent Builder
*/
- public function setMessagingEnabled($messagingEnabled)
+ public function setMessagingEnabled(bool $messagingEnabled): self
{
$this->options['messagingEnabled'] = $messagingEnabled;
return $this;
}
/**
- * The voice_enabled
+ *
*
- * @param bool $voiceEnabled The voice_enabled
+ * @param bool $voiceEnabled
* @return $this Fluent Builder
*/
- public function setVoiceEnabled($voiceEnabled)
+ public function setVoiceEnabled(bool $voiceEnabled): self
{
$this->options['voiceEnabled'] = $voiceEnabled;
return $this;
}
/**
- * The commands_enabled
+ *
*
- * @param bool $commandsEnabled The commands_enabled
+ * @param bool $commandsEnabled
* @return $this Fluent Builder
*/
- public function setCommandsEnabled($commandsEnabled)
+ public function setCommandsEnabled(bool $commandsEnabled): self
{
$this->options['commandsEnabled'] = $commandsEnabled;
return $this;
}
/**
- * The national_roaming_enabled
+ *
*
- * @param bool $nationalRoamingEnabled The national_roaming_enabled
+ * @param bool $nationalRoamingEnabled
* @return $this Fluent Builder
*/
- public function setNationalRoamingEnabled($nationalRoamingEnabled)
+ public function setNationalRoamingEnabled(bool $nationalRoamingEnabled): self
{
$this->options['nationalRoamingEnabled'] = $nationalRoamingEnabled;
return $this;
}
/**
- * The international_roaming
+ *
*
- * @param string $internationalRoaming The international_roaming
+ * @param string[] $internationalRoaming
* @return $this Fluent Builder
*/
- public function setInternationalRoaming($internationalRoaming)
+ public function setInternationalRoaming(array $internationalRoaming): self
{
$this->options['internationalRoaming'] = $internationalRoaming;
return $this;
@@ -199,49 +250,51 @@ public function setInternationalRoaming($internationalRoaming)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.Wireless.CreateRatePlanOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Preview.Wireless.CreateRatePlanOptions ' . $options . ']';
}
}
+
+
+
class UpdateRatePlanOptions extends Options
-{
+ {
/**
- * @param string $uniqueName The unique_name
- * @param string $friendlyName The friendly_name
+ * @param string $uniqueName
+ * @param string $friendlyName
*/
- public function __construct($uniqueName = Values::NONE, $friendlyName = Values::NONE)
- {
+ public function __construct(
+
+ string $uniqueName = Values::NONE,
+ string $friendlyName = Values::NONE
+
+ ) {
$this->options['uniqueName'] = $uniqueName;
$this->options['friendlyName'] = $friendlyName;
}
/**
- * The unique_name
+ *
*
- * @param string $uniqueName The unique_name
+ * @param string $uniqueName
* @return $this Fluent Builder
*/
- public function setUniqueName($uniqueName)
+ public function setUniqueName(string $uniqueName): self
{
$this->options['uniqueName'] = $uniqueName;
return $this;
}
/**
- * The friendly_name
+ *
*
- * @param string $friendlyName The friendly_name
+ * @param string $friendlyName
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -252,14 +305,10 @@ public function setFriendlyName($friendlyName)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.Wireless.UpdateRatePlanOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Preview.Wireless.UpdateRatePlanOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/RatePlanPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/RatePlanPage.php
index fd50382..79c247f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/RatePlanPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/RatePlanPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return RatePlanInstance \Twilio\Rest\Preview\Wireless\RatePlanInstance
+ */
+ public function buildInstance(array $payload): RatePlanInstance
{
return new RatePlanInstance($this->version, $payload);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.Wireless.RatePlanPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/Sim/UsageContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/Sim/UsageContext.php
index 4ad14f3..c665365 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/Sim/UsageContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/Sim/UsageContext.php
@@ -2,74 +2,93 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Preview\Wireless\Sim;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
class UsageContext extends InstanceContext
-{
+ {
/**
* Initialize the UsageContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $simSid The sim_sid
- * @return \Twilio\Rest\Preview\Wireless\Sim\UsageContext
+ * @param Version $version Version that contains the resource
+ * @param string $simSid
*/
- public function __construct(Version $version, $simSid)
- {
+ public function __construct(
+ Version $version,
+ $simSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('simSid' => $simSid,);
+ $this->solution = [
+ 'simSid' =>
+ $simSid,
+ ];
- $this->uri = '/Sims/' . \rawurlencode($simSid) . '/Usage';
+ $this->uri = '/Sims/' . \rawurlencode($simSid)
+ .'/Usage';
}
/**
- * Fetch a UsageInstance
+ * Fetch the UsageInstance
*
* @param array|Options $options Optional Arguments
* @return UsageInstance Fetched UsageInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch($options = array())
+ public function fetch(array $options = []): UsageInstance
{
+
$options = new Values($options);
- $params = Values::of(array('End' => $options['end'], 'Start' => $options['start'],));
+ $params = Values::of([
+ 'End' =>
+ $options['end'],
+ 'Start' =>
+ $options['start'],
+ ]);
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, $params, [], $headers);
- return new UsageInstance($this->version, $payload, $this->solution['simSid']);
+ return new UsageInstance(
+ $this->version,
+ $payload,
+ $this->solution['simSid']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Preview.Wireless.UsageContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/Sim/UsageInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/Sim/UsageInstance.php
index 6464639..673d12b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/Sim/UsageInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/Sim/UsageInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Preview\Wireless\Sim;
use Twilio\Exceptions\TwilioException;
@@ -15,35 +23,33 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property string $simSid
- * @property string $simUniqueName
- * @property string $accountSid
- * @property array $period
- * @property array $commandsUsage
- * @property array $commandsCosts
- * @property array $dataUsage
- * @property array $dataCosts
- * @property string $url
+ * @property string|null $simSid
+ * @property string|null $simUniqueName
+ * @property string|null $accountSid
+ * @property array|null $period
+ * @property array|null $commandsUsage
+ * @property array|null $commandsCosts
+ * @property array|null $dataUsage
+ * @property array|null $dataCosts
+ * @property string|null $url
*/
class UsageInstance extends InstanceResource
{
/**
* Initialize the UsageInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $simSid The sim_sid
- * @return \Twilio\Rest\Preview\Wireless\Sim\UsageInstance
+ * @param string $simSid
*/
- public function __construct(Version $version, array $payload, $simSid)
+ public function __construct(Version $version, array $payload, string $simSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'simSid' => Values::array_get($payload, 'sim_sid'),
'simUniqueName' => Values::array_get($payload, 'sim_unique_name'),
'accountSid' => Values::array_get($payload, 'account_sid'),
@@ -53,36 +59,39 @@ public function __construct(Version $version, array $payload, $simSid)
'dataUsage' => Values::array_get($payload, 'data_usage'),
'dataCosts' => Values::array_get($payload, 'data_costs'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('simSid' => $simSid,);
+ $this->solution = ['simSid' => $simSid, ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Preview\Wireless\Sim\UsageContext Context for this
- * UsageInstance
+ * @return UsageContext Context for this UsageInstance
*/
- protected function proxy()
+ protected function proxy(): UsageContext
{
if (!$this->context) {
- $this->context = new UsageContext($this->version, $this->solution['simSid']);
+ $this->context = new UsageContext(
+ $this->version,
+ $this->solution['simSid']
+ );
}
return $this->context;
}
/**
- * Fetch a UsageInstance
+ * Fetch the UsageInstance
*
* @param array|Options $options Optional Arguments
* @return UsageInstance Fetched UsageInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch($options = array())
+ public function fetch(array $options = []): UsageInstance
{
+
return $this->proxy()->fetch($options);
}
@@ -93,7 +102,7 @@ public function fetch($options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -112,12 +121,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Preview.Wireless.UsageInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/Sim/UsageList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/Sim/UsageList.php
index aeecc2c..0578076 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/Sim/UsageList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/Sim/UsageList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Preview\Wireless\Sim;
@@ -12,34 +19,40 @@
use Twilio\ListResource;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
+
class UsageList extends ListResource
-{
+ {
/**
* Construct the UsageList
*
* @param Version $version Version that contains the resource
- * @param string $simSid The sim_sid
- * @return \Twilio\Rest\Preview\Wireless\Sim\UsageList
+ * @param string $simSid
*/
- public function __construct(Version $version, $simSid)
- {
+ public function __construct(
+ Version $version,
+ string $simSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('simSid' => $simSid,);
+ $this->solution = [
+ 'simSid' =>
+ $simSid,
+
+ ];
}
/**
* Constructs a UsageContext
- *
- * @return \Twilio\Rest\Preview\Wireless\Sim\UsageContext
*/
- public function getContext()
+ public function getContext(
+
+ ): UsageContext
{
- return new UsageContext($this->version, $this->solution['simSid']);
+ return new UsageContext(
+ $this->version,
+ $this->solution['simSid']
+ );
}
/**
@@ -47,8 +60,8 @@ public function getContext()
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.Wireless.UsageList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/Sim/UsageOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/Sim/UsageOptions.php
index 12484c4..c71e934 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/Sim/UsageOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/Sim/UsageOptions.php
@@ -1,10 +1,16 @@
options['end'] = $end;
$this->options['start'] = $start;
}
/**
- * The end
+ *
*
- * @param string $end The end
+ * @param string $end
* @return $this Fluent Builder
*/
- public function setEnd($end)
+ public function setEnd(string $end): self
{
$this->options['end'] = $end;
return $this;
}
/**
- * The start
+ *
*
- * @param string $start The start
+ * @param string $start
* @return $this Fluent Builder
*/
- public function setStart($start)
+ public function setStart(string $start): self
{
$this->options['start'] = $start;
return $this;
@@ -69,14 +85,10 @@ public function setStart($start)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.Wireless.FetchUsageOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Preview.Wireless.FetchUsageOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/Sim/UsagePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/Sim/UsagePage.php
index 209c26d..ef58191 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/Sim/UsagePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/Sim/UsagePage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return UsageInstance \Twilio\Rest\Preview\Wireless\Sim\UsageInstance
+ */
+ public function buildInstance(array $payload): UsageInstance
{
return new UsageInstance($this->version, $payload, $this->solution['simSid']);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.Wireless.UsagePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/SimContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/SimContext.php
index 6f2a468..fa87085 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/SimContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/SimContext.php
@@ -2,66 +2,80 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Preview\Wireless;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Preview\Wireless\Sim\UsageList;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Preview\Wireless\Sim\UsageList;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property \Twilio\Rest\Preview\Wireless\Sim\UsageList $usage
+ * @property UsageList $usage
* @method \Twilio\Rest\Preview\Wireless\Sim\UsageContext usage()
*/
class SimContext extends InstanceContext
-{
- protected $_usage = null;
+ {
+ protected $_usage;
/**
* Initialize the SimContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The sid
- * @return \Twilio\Rest\Preview\Wireless\SimContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Sims/' . \rawurlencode($sid) . '';
+ $this->uri = '/Sims/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a SimInstance
+ * Fetch the SimInstance
*
* @return SimInstance Fetched SimInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): SimInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
- return new SimInstance($this->version, $payload, $this->solution['sid']);
+ return new SimInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Update the SimInstance
*
@@ -69,48 +83,67 @@ public function fetch()
* @return SimInstance Updated SimInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): SimInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'UniqueName' => $options['uniqueName'],
- 'CallbackMethod' => $options['callbackMethod'],
- 'CallbackUrl' => $options['callbackUrl'],
- 'FriendlyName' => $options['friendlyName'],
- 'RatePlan' => $options['ratePlan'],
- 'Status' => $options['status'],
- 'CommandsCallbackMethod' => $options['commandsCallbackMethod'],
- 'CommandsCallbackUrl' => $options['commandsCallbackUrl'],
- 'SmsFallbackMethod' => $options['smsFallbackMethod'],
- 'SmsFallbackUrl' => $options['smsFallbackUrl'],
- 'SmsMethod' => $options['smsMethod'],
- 'SmsUrl' => $options['smsUrl'],
- 'VoiceFallbackMethod' => $options['voiceFallbackMethod'],
- 'VoiceFallbackUrl' => $options['voiceFallbackUrl'],
- 'VoiceMethod' => $options['voiceMethod'],
- 'VoiceUrl' => $options['voiceUrl'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'UniqueName' =>
+ $options['uniqueName'],
+ 'CallbackMethod' =>
+ $options['callbackMethod'],
+ 'CallbackUrl' =>
+ $options['callbackUrl'],
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'RatePlan' =>
+ $options['ratePlan'],
+ 'Status' =>
+ $options['status'],
+ 'CommandsCallbackMethod' =>
+ $options['commandsCallbackMethod'],
+ 'CommandsCallbackUrl' =>
+ $options['commandsCallbackUrl'],
+ 'SmsFallbackMethod' =>
+ $options['smsFallbackMethod'],
+ 'SmsFallbackUrl' =>
+ $options['smsFallbackUrl'],
+ 'SmsMethod' =>
+ $options['smsMethod'],
+ 'SmsUrl' =>
+ $options['smsUrl'],
+ 'VoiceFallbackMethod' =>
+ $options['voiceFallbackMethod'],
+ 'VoiceFallbackUrl' =>
+ $options['voiceFallbackUrl'],
+ 'VoiceMethod' =>
+ $options['voiceMethod'],
+ 'VoiceUrl' =>
+ $options['voiceUrl'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
+
+ return new SimInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
);
-
- return new SimInstance($this->version, $payload, $this->solution['sid']);
}
+
/**
* Access the usage
- *
- * @return \Twilio\Rest\Preview\Wireless\Sim\UsageList
*/
- protected function getUsage()
+ protected function getUsage(): UsageList
{
if (!$this->_usage) {
- $this->_usage = new UsageList($this->version, $this->solution['sid']);
+ $this->_usage = new UsageList(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->_usage;
@@ -120,10 +153,10 @@ protected function getUsage()
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -138,10 +171,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -156,12 +189,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Preview.Wireless.SimContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/SimInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/SimInstance.php
index b446e1f..5b9aeef 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/SimInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/SimInstance.php
@@ -2,64 +2,71 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Preview\Wireless;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Preview\Wireless\Sim\UsageList;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property string $sid
- * @property string $uniqueName
- * @property string $accountSid
- * @property string $ratePlanSid
- * @property string $friendlyName
- * @property string $iccid
- * @property string $eId
- * @property string $status
- * @property string $commandsCallbackUrl
- * @property string $commandsCallbackMethod
- * @property string $smsFallbackMethod
- * @property string $smsFallbackUrl
- * @property string $smsMethod
- * @property string $smsUrl
- * @property string $voiceFallbackMethod
- * @property string $voiceFallbackUrl
- * @property string $voiceMethod
- * @property string $voiceUrl
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
- * @property array $links
+ * @property string|null $sid
+ * @property string|null $uniqueName
+ * @property string|null $accountSid
+ * @property string|null $ratePlanSid
+ * @property string|null $friendlyName
+ * @property string|null $iccid
+ * @property string|null $eId
+ * @property string|null $status
+ * @property string|null $commandsCallbackUrl
+ * @property string|null $commandsCallbackMethod
+ * @property string|null $smsFallbackMethod
+ * @property string|null $smsFallbackUrl
+ * @property string|null $smsMethod
+ * @property string|null $smsUrl
+ * @property string|null $voiceFallbackMethod
+ * @property string|null $voiceFallbackUrl
+ * @property string|null $voiceMethod
+ * @property string|null $voiceUrl
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
+ * @property array|null $links
*/
class SimInstance extends InstanceResource
{
- protected $_usage = null;
+ protected $_usage;
/**
* Initialize the SimInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The sid
- * @return \Twilio\Rest\Preview\Wireless\SimInstance
+ * @param string $sid
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'uniqueName' => Values::array_get($payload, 'unique_name'),
'accountSid' => Values::array_get($payload, 'account_sid'),
@@ -82,34 +89,38 @@ public function __construct(Version $version, array $payload, $sid = null)
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Preview\Wireless\SimContext Context for this SimInstance
+ * @return SimContext Context for this SimInstance
*/
- protected function proxy()
+ protected function proxy(): SimContext
{
if (!$this->context) {
- $this->context = new SimContext($this->version, $this->solution['sid']);
+ $this->context = new SimContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a SimInstance
+ * Fetch the SimInstance
*
* @return SimInstance Fetched SimInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): SimInstance
{
+
return $this->proxy()->fetch();
}
@@ -120,17 +131,16 @@ public function fetch()
* @return SimInstance Updated SimInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): SimInstance
{
+
return $this->proxy()->update($options);
}
/**
* Access the usage
- *
- * @return \Twilio\Rest\Preview\Wireless\Sim\UsageList
*/
- protected function getUsage()
+ protected function getUsage(): UsageList
{
return $this->proxy()->usage;
}
@@ -142,7 +152,7 @@ protected function getUsage()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -161,12 +171,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Preview.Wireless.SimInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/SimList.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/SimList.php
index 60c9553..c1e079f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/SimList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/SimList.php
@@ -2,117 +2,130 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Preview
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Preview\Wireless;
use Twilio\ListResource;
use Twilio\Options;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
+
class SimList extends ListResource
-{
+ {
/**
* Construct the SimList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Preview\Wireless\SimList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/Sims';
}
/**
- * Streams SimInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Reads SimInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
+ * @param int $limit Upper limit for the number of records to return. read()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
+ * page_size is defined but a limit is defined, read()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return SimInstance[] Array of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($options, $limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
- * Reads SimInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
+ * Streams SimInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
+ * @param int $limit Upper limit for the number of records to return. stream()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
+ * page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return SimInstance[] Array of results
+ * @return Stream stream of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
/**
* Retrieve a single page of SimInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of SimInstance
+ * @return SimPage Page of SimInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): SimPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Status' => $options['status'],
- 'Iccid' => $options['iccid'],
- 'RatePlan' => $options['ratePlan'],
- 'EId' => $options['eId'],
- 'SimRegistrationCode' => $options['simRegistrationCode'],
+
+ $params = Values::of([
+ 'Status' =>
+ $options['status'],
+ 'Iccid' =>
+ $options['iccid'],
+ 'RatePlan' =>
+ $options['ratePlan'],
+ 'EId' =>
+ $options['eId'],
+ 'SimRegistrationCode' =>
+ $options['simRegistrationCode'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new SimPage($this->version, $response, $this->solution);
}
@@ -122,9 +135,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of SimInstance
+ * @return SimPage Page of SimInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): SimPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -134,15 +147,21 @@ public function getPage($targetUrl)
return new SimPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a SimContext
*
- * @param string $sid The sid
- * @return \Twilio\Rest\Preview\Wireless\SimContext
+ * @param string $sid
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): SimContext
{
- return new SimContext($this->version, $sid);
+ return new SimContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -150,8 +169,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.Wireless.SimList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/SimOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/SimOptions.php
index c7e5352..73d12a0 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/SimOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/SimOptions.php
@@ -1,10 +1,16 @@
options['status'] = $status;
$this->options['iccid'] = $iccid;
$this->options['ratePlan'] = $ratePlan;
@@ -74,60 +137,60 @@ public function __construct($status = Values::NONE, $iccid = Values::NONE, $rate
}
/**
- * The status
+ *
*
- * @param string $status The status
+ * @param string $status
* @return $this Fluent Builder
*/
- public function setStatus($status)
+ public function setStatus(string $status): self
{
$this->options['status'] = $status;
return $this;
}
/**
- * The iccid
+ *
*
- * @param string $iccid The iccid
+ * @param string $iccid
* @return $this Fluent Builder
*/
- public function setIccid($iccid)
+ public function setIccid(string $iccid): self
{
$this->options['iccid'] = $iccid;
return $this;
}
/**
- * The rate_plan
+ *
*
- * @param string $ratePlan The rate_plan
+ * @param string $ratePlan
* @return $this Fluent Builder
*/
- public function setRatePlan($ratePlan)
+ public function setRatePlan(string $ratePlan): self
{
$this->options['ratePlan'] = $ratePlan;
return $this;
}
/**
- * The e_id
+ *
*
- * @param string $eId The e_id
+ * @param string $eId
* @return $this Fluent Builder
*/
- public function setEId($eId)
+ public function setEId(string $eId): self
{
$this->options['eId'] = $eId;
return $this;
}
/**
- * The sim_registration_code
+ *
*
- * @param string $simRegistrationCode The sim_registration_code
+ * @param string $simRegistrationCode
* @return $this Fluent Builder
*/
- public function setSimRegistrationCode($simRegistrationCode)
+ public function setSimRegistrationCode(string $simRegistrationCode): self
{
$this->options['simRegistrationCode'] = $simRegistrationCode;
return $this;
@@ -138,40 +201,53 @@ public function setSimRegistrationCode($simRegistrationCode)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.Wireless.ReadSimOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Preview.Wireless.ReadSimOptions ' . $options . ']';
}
}
class UpdateSimOptions extends Options
-{
+ {
/**
- * @param string $uniqueName The unique_name
- * @param string $callbackMethod The callback_method
- * @param string $callbackUrl The callback_url
- * @param string $friendlyName The friendly_name
- * @param string $ratePlan The rate_plan
- * @param string $status The status
- * @param string $commandsCallbackMethod The commands_callback_method
- * @param string $commandsCallbackUrl The commands_callback_url
- * @param string $smsFallbackMethod The sms_fallback_method
- * @param string $smsFallbackUrl The sms_fallback_url
- * @param string $smsMethod The sms_method
- * @param string $smsUrl The sms_url
- * @param string $voiceFallbackMethod The voice_fallback_method
- * @param string $voiceFallbackUrl The voice_fallback_url
- * @param string $voiceMethod The voice_method
- * @param string $voiceUrl The voice_url
+ * @param string $uniqueName
+ * @param string $callbackMethod
+ * @param string $callbackUrl
+ * @param string $friendlyName
+ * @param string $ratePlan
+ * @param string $status
+ * @param string $commandsCallbackMethod
+ * @param string $commandsCallbackUrl
+ * @param string $smsFallbackMethod
+ * @param string $smsFallbackUrl
+ * @param string $smsMethod
+ * @param string $smsUrl
+ * @param string $voiceFallbackMethod
+ * @param string $voiceFallbackUrl
+ * @param string $voiceMethod
+ * @param string $voiceUrl
*/
- public function __construct($uniqueName = Values::NONE, $callbackMethod = Values::NONE, $callbackUrl = Values::NONE, $friendlyName = Values::NONE, $ratePlan = Values::NONE, $status = Values::NONE, $commandsCallbackMethod = Values::NONE, $commandsCallbackUrl = Values::NONE, $smsFallbackMethod = Values::NONE, $smsFallbackUrl = Values::NONE, $smsMethod = Values::NONE, $smsUrl = Values::NONE, $voiceFallbackMethod = Values::NONE, $voiceFallbackUrl = Values::NONE, $voiceMethod = Values::NONE, $voiceUrl = Values::NONE)
- {
+ public function __construct(
+
+ string $uniqueName = Values::NONE,
+ string $callbackMethod = Values::NONE,
+ string $callbackUrl = Values::NONE,
+ string $friendlyName = Values::NONE,
+ string $ratePlan = Values::NONE,
+ string $status = Values::NONE,
+ string $commandsCallbackMethod = Values::NONE,
+ string $commandsCallbackUrl = Values::NONE,
+ string $smsFallbackMethod = Values::NONE,
+ string $smsFallbackUrl = Values::NONE,
+ string $smsMethod = Values::NONE,
+ string $smsUrl = Values::NONE,
+ string $voiceFallbackMethod = Values::NONE,
+ string $voiceFallbackUrl = Values::NONE,
+ string $voiceMethod = Values::NONE,
+ string $voiceUrl = Values::NONE
+
+ ) {
$this->options['uniqueName'] = $uniqueName;
$this->options['callbackMethod'] = $callbackMethod;
$this->options['callbackUrl'] = $callbackUrl;
@@ -191,192 +267,192 @@ public function __construct($uniqueName = Values::NONE, $callbackMethod = Values
}
/**
- * The unique_name
+ *
*
- * @param string $uniqueName The unique_name
+ * @param string $uniqueName
* @return $this Fluent Builder
*/
- public function setUniqueName($uniqueName)
+ public function setUniqueName(string $uniqueName): self
{
$this->options['uniqueName'] = $uniqueName;
return $this;
}
/**
- * The callback_method
+ *
*
- * @param string $callbackMethod The callback_method
+ * @param string $callbackMethod
* @return $this Fluent Builder
*/
- public function setCallbackMethod($callbackMethod)
+ public function setCallbackMethod(string $callbackMethod): self
{
$this->options['callbackMethod'] = $callbackMethod;
return $this;
}
/**
- * The callback_url
+ *
*
- * @param string $callbackUrl The callback_url
+ * @param string $callbackUrl
* @return $this Fluent Builder
*/
- public function setCallbackUrl($callbackUrl)
+ public function setCallbackUrl(string $callbackUrl): self
{
$this->options['callbackUrl'] = $callbackUrl;
return $this;
}
/**
- * The friendly_name
+ *
*
- * @param string $friendlyName The friendly_name
+ * @param string $friendlyName
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
}
/**
- * The rate_plan
+ *
*
- * @param string $ratePlan The rate_plan
+ * @param string $ratePlan
* @return $this Fluent Builder
*/
- public function setRatePlan($ratePlan)
+ public function setRatePlan(string $ratePlan): self
{
$this->options['ratePlan'] = $ratePlan;
return $this;
}
/**
- * The status
+ *
*
- * @param string $status The status
+ * @param string $status
* @return $this Fluent Builder
*/
- public function setStatus($status)
+ public function setStatus(string $status): self
{
$this->options['status'] = $status;
return $this;
}
/**
- * The commands_callback_method
+ *
*
- * @param string $commandsCallbackMethod The commands_callback_method
+ * @param string $commandsCallbackMethod
* @return $this Fluent Builder
*/
- public function setCommandsCallbackMethod($commandsCallbackMethod)
+ public function setCommandsCallbackMethod(string $commandsCallbackMethod): self
{
$this->options['commandsCallbackMethod'] = $commandsCallbackMethod;
return $this;
}
/**
- * The commands_callback_url
+ *
*
- * @param string $commandsCallbackUrl The commands_callback_url
+ * @param string $commandsCallbackUrl
* @return $this Fluent Builder
*/
- public function setCommandsCallbackUrl($commandsCallbackUrl)
+ public function setCommandsCallbackUrl(string $commandsCallbackUrl): self
{
$this->options['commandsCallbackUrl'] = $commandsCallbackUrl;
return $this;
}
/**
- * The sms_fallback_method
+ *
*
- * @param string $smsFallbackMethod The sms_fallback_method
+ * @param string $smsFallbackMethod
* @return $this Fluent Builder
*/
- public function setSmsFallbackMethod($smsFallbackMethod)
+ public function setSmsFallbackMethod(string $smsFallbackMethod): self
{
$this->options['smsFallbackMethod'] = $smsFallbackMethod;
return $this;
}
/**
- * The sms_fallback_url
+ *
*
- * @param string $smsFallbackUrl The sms_fallback_url
+ * @param string $smsFallbackUrl
* @return $this Fluent Builder
*/
- public function setSmsFallbackUrl($smsFallbackUrl)
+ public function setSmsFallbackUrl(string $smsFallbackUrl): self
{
$this->options['smsFallbackUrl'] = $smsFallbackUrl;
return $this;
}
/**
- * The sms_method
+ *
*
- * @param string $smsMethod The sms_method
+ * @param string $smsMethod
* @return $this Fluent Builder
*/
- public function setSmsMethod($smsMethod)
+ public function setSmsMethod(string $smsMethod): self
{
$this->options['smsMethod'] = $smsMethod;
return $this;
}
/**
- * The sms_url
+ *
*
- * @param string $smsUrl The sms_url
+ * @param string $smsUrl
* @return $this Fluent Builder
*/
- public function setSmsUrl($smsUrl)
+ public function setSmsUrl(string $smsUrl): self
{
$this->options['smsUrl'] = $smsUrl;
return $this;
}
/**
- * The voice_fallback_method
+ *
*
- * @param string $voiceFallbackMethod The voice_fallback_method
+ * @param string $voiceFallbackMethod
* @return $this Fluent Builder
*/
- public function setVoiceFallbackMethod($voiceFallbackMethod)
+ public function setVoiceFallbackMethod(string $voiceFallbackMethod): self
{
$this->options['voiceFallbackMethod'] = $voiceFallbackMethod;
return $this;
}
/**
- * The voice_fallback_url
+ *
*
- * @param string $voiceFallbackUrl The voice_fallback_url
+ * @param string $voiceFallbackUrl
* @return $this Fluent Builder
*/
- public function setVoiceFallbackUrl($voiceFallbackUrl)
+ public function setVoiceFallbackUrl(string $voiceFallbackUrl): self
{
$this->options['voiceFallbackUrl'] = $voiceFallbackUrl;
return $this;
}
/**
- * The voice_method
+ *
*
- * @param string $voiceMethod The voice_method
+ * @param string $voiceMethod
* @return $this Fluent Builder
*/
- public function setVoiceMethod($voiceMethod)
+ public function setVoiceMethod(string $voiceMethod): self
{
$this->options['voiceMethod'] = $voiceMethod;
return $this;
}
/**
- * The voice_url
+ *
*
- * @param string $voiceUrl The voice_url
+ * @param string $voiceUrl
* @return $this Fluent Builder
*/
- public function setVoiceUrl($voiceUrl)
+ public function setVoiceUrl(string $voiceUrl): self
{
$this->options['voiceUrl'] = $voiceUrl;
return $this;
@@ -387,14 +463,10 @@ public function setVoiceUrl($voiceUrl)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Preview.Wireless.UpdateSimOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Preview.Wireless.UpdateSimOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/SimPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/SimPage.php
index b71849e..e2945ba 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/SimPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Preview/Wireless/SimPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return SimInstance \Twilio\Rest\Preview\Wireless\SimInstance
+ */
+ public function buildInstance(array $payload): SimInstance
{
return new SimInstance($this->version, $payload);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Preview.Wireless.SimPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Pricing.php b/vendor/twilio/sdk/src/Twilio/Rest/Pricing.php
index 3ba3223..8357802 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Pricing.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Pricing.php
@@ -1,133 +1,68 @@
baseUrl = 'https://pricing.twilio.com';
- }
-
+class Pricing extends PricingBase {
/**
- * @return \Twilio\Rest\Pricing\V1 Version v1 of pricing
+ * @deprecated Use v1->messaging instead.
*/
- protected function getV1()
- {
- if (!$this->_v1) {
- $this->_v1 = new V1($this);
- }
- return $this->_v1;
- }
-
- /**
- * @return \Twilio\Rest\Pricing\V2 Version v2 of pricing
- */
- protected function getV2()
- {
- if (!$this->_v2) {
- $this->_v2 = new V2($this);
- }
- return $this->_v2;
+ protected function getMessaging(): \Twilio\Rest\Pricing\V1\MessagingList {
+ echo "messaging is deprecated. Use v1->messaging instead.";
+ return $this->v1->messaging;
}
/**
- * Magic getter to lazy load version
- *
- * @param string $name Version to return
- * @return \Twilio\Version The requested version
- * @throws TwilioException For unknown versions
+ * @deprecated Use v1->phoneNumbers instead.
*/
- public function __get($name)
- {
- $method = 'get' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return $this->$method();
- }
-
- throw new TwilioException('Unknown version ' . $name);
+ protected function getPhoneNumbers(): \Twilio\Rest\Pricing\V1\PhoneNumberList {
+ echo "phoneNumbers is deprecated. Use v1->phoneNumbers instead.";
+ return $this->v1->phoneNumbers;
}
/**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
+ * @deprecated Use v2->voice instead.
*/
- public function __call($name, $arguments)
- {
- $method = 'context' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return \call_user_func_array(array($this, $method), $arguments);
- }
-
- throw new TwilioException('Unknown context ' . $name);
+ protected function getVoice(): \Twilio\Rest\Pricing\V2\VoiceList {
+ echo "voice is deprecated. Use v2->voice instead.";
+ return $this->v2->voice;
}
/**
- * @return \Twilio\Rest\Pricing\V1\MessagingList
+ * @deprecated Use v2->countries instead.
*/
- protected function getMessaging()
- {
- return $this->v1->messaging;
+ protected function getCountries(): \Twilio\Rest\Pricing\V2\CountryList {
+ echo "countries is deprecated. Use v2->countries instead.";
+ return $this->v2->countries;
}
/**
- * @return \Twilio\Rest\Pricing\V1\PhoneNumberList
+ * @deprecated Use v2->countries(\$isoCountry) instead.
+ * @param string $isoCountry The ISO country code of the pricing information to
+ * fetch
*/
- protected function getPhoneNumbers()
- {
- return $this->v1->phoneNumbers;
+ protected function contextCountries(string $isoCountry): \Twilio\Rest\Pricing\V2\CountryContext {
+ echo "countries(\$isoCountry) is deprecated. Use v2->countries(\$isoCountry) instead.";
+ return $this->v2->countries($isoCountry);
}
/**
- * @return \Twilio\Rest\Pricing\V2\VoiceList
+ * @deprecated Use v2->numbers instead.
*/
- protected function getVoice()
- {
- return $this->v2->voice;
+ protected function getNumbers(): \Twilio\Rest\Pricing\V2\NumberList {
+ echo "numbers is deprecated. Use v2->numbers instead.";
+ return $this->v2->numbers;
}
/**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
+ * @deprecated Use v2->numbers(\$destinationNumber) instead.
+ * @param string $destinationNumber The destination number for which to fetch
+ * pricing information
*/
- public function __toString()
- {
- return '[Twilio.Pricing]';
+ protected function contextNumbers(string $destinationNumber): \Twilio\Rest\Pricing\V2\NumberContext {
+ echo "numbers(\$destinationNumber) is deprecated. Use v2->numbers(\$destinationNumber) instead.";
+ return $this->v2->numbers($destinationNumber);
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1.php b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1.php
index 05d6762..600c9c6 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1.php
@@ -1,37 +1,43 @@
version = 'v1';
}
- /**
- * @return \Twilio\Rest\Pricing\V1\MessagingList
- */
- protected function getMessaging()
+ protected function getMessaging(): MessagingList
{
if (!$this->_messaging) {
$this->_messaging = new MessagingList($this);
@@ -50,10 +53,7 @@ protected function getMessaging()
return $this->_messaging;
}
- /**
- * @return \Twilio\Rest\Pricing\V1\PhoneNumberList
- */
- protected function getPhoneNumbers()
+ protected function getPhoneNumbers(): PhoneNumberList
{
if (!$this->_phoneNumbers) {
$this->_phoneNumbers = new PhoneNumberList($this);
@@ -61,10 +61,7 @@ protected function getPhoneNumbers()
return $this->_phoneNumbers;
}
- /**
- * @return \Twilio\Rest\Pricing\V1\VoiceList
- */
- protected function getVoice()
+ protected function getVoice(): VoiceList
{
if (!$this->_voice) {
$this->_voice = new VoiceList($this);
@@ -79,7 +76,7 @@ protected function getVoice()
* @return \Twilio\ListResource The requested resource
* @throws TwilioException For unknown resource
*/
- public function __get($name)
+ public function __get(string $name)
{
$method = 'get' . \ucfirst($name);
if (\method_exists($this, $method)) {
@@ -94,10 +91,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -112,8 +109,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Pricing.V1]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Messaging/CountryContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Messaging/CountryContext.php
index 8cf5bc7..3dcc6cf 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Messaging/CountryContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Messaging/CountryContext.php
@@ -2,67 +2,82 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Pricing
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Pricing\V1\Messaging;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class CountryContext extends InstanceContext
-{
+ {
/**
* Initialize the CountryContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $isoCountry The ISO country code
- * @return \Twilio\Rest\Pricing\V1\Messaging\CountryContext
+ * @param Version $version Version that contains the resource
+ * @param string $isoCountry The [ISO country code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the pricing information to fetch.
*/
- public function __construct(Version $version, $isoCountry)
- {
+ public function __construct(
+ Version $version,
+ $isoCountry
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('isoCountry' => $isoCountry,);
+ $this->solution = [
+ 'isoCountry' =>
+ $isoCountry,
+ ];
- $this->uri = '/Messaging/Countries/' . \rawurlencode($isoCountry) . '';
+ $this->uri = '/Messaging/Countries/' . \rawurlencode($isoCountry)
+ .'';
}
/**
- * Fetch a CountryInstance
+ * Fetch the CountryInstance
*
* @return CountryInstance Fetched CountryInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): CountryInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
- return new CountryInstance($this->version, $payload, $this->solution['isoCountry']);
+ return new CountryInstance(
+ $this->version,
+ $payload,
+ $this->solution['isoCountry']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Pricing.V1.CountryContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Messaging/CountryInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Messaging/CountryInstance.php
index 80a9533..9e025c2 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Messaging/CountryInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Messaging/CountryInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Pricing
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Pricing\V1\Messaging;
use Twilio\Exceptions\TwilioException;
@@ -14,65 +22,68 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * @property string $country
- * @property string $isoCountry
- * @property string $outboundSmsPrices
- * @property string $inboundSmsPrices
- * @property string $priceUnit
- * @property string $url
+ * @property string|null $country
+ * @property string|null $isoCountry
+ * @property string[]|null $outboundSmsPrices
+ * @property string[]|null $inboundSmsPrices
+ * @property string|null $priceUnit
+ * @property string|null $url
*/
class CountryInstance extends InstanceResource
{
/**
* Initialize the CountryInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $isoCountry The ISO country code
- * @return \Twilio\Rest\Pricing\V1\Messaging\CountryInstance
+ * @param string $isoCountry The [ISO country code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the pricing information to fetch.
*/
- public function __construct(Version $version, array $payload, $isoCountry = null)
+ public function __construct(Version $version, array $payload, string $isoCountry = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'country' => Values::array_get($payload, 'country'),
'isoCountry' => Values::array_get($payload, 'iso_country'),
'outboundSmsPrices' => Values::array_get($payload, 'outbound_sms_prices'),
'inboundSmsPrices' => Values::array_get($payload, 'inbound_sms_prices'),
'priceUnit' => Values::array_get($payload, 'price_unit'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('isoCountry' => $isoCountry ?: $this->properties['isoCountry'],);
+ $this->solution = ['isoCountry' => $isoCountry ?: $this->properties['isoCountry'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Pricing\V1\Messaging\CountryContext Context for this
- * CountryInstance
+ * @return CountryContext Context for this CountryInstance
*/
- protected function proxy()
+ protected function proxy(): CountryContext
{
if (!$this->context) {
- $this->context = new CountryContext($this->version, $this->solution['isoCountry']);
+ $this->context = new CountryContext(
+ $this->version,
+ $this->solution['isoCountry']
+ );
}
return $this->context;
}
/**
- * Fetch a CountryInstance
+ * Fetch the CountryInstance
*
* @return CountryInstance Fetched CountryInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): CountryInstance
{
+
return $this->proxy()->fetch();
}
@@ -83,7 +94,7 @@ public function fetch()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -102,12 +113,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Pricing.V1.CountryInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Messaging/CountryList.php b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Messaging/CountryList.php
index a3f3893..ac337c4 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Messaging/CountryList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Messaging/CountryList.php
@@ -2,35 +2,65 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Pricing
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Pricing\V1\Messaging;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class CountryList extends ListResource
-{
+ {
/**
* Construct the CountryList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Pricing\V1\Messaging\CountryList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/Messaging/Countries';
}
+ /**
+ * Reads CountryInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return CountryInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
+ }
+
/**
* Streams CountryInstance records from the API as a generator stream.
* This operation lazily loads records as efficiently as possible until the
@@ -47,9 +77,9 @@ public function __construct(Version $version)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -58,26 +88,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads CountryInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return CountryInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of CountryInstance records from the API.
* Request is executed immediately
@@ -85,21 +95,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of CountryInstance
+ * @return CountryPage Page of CountryInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): CountryPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new CountryPage($this->version, $response, $this->solution);
}
@@ -109,9 +120,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of CountryInstance
+ * @return CountryPage Page of CountryInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): CountryPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -121,15 +132,21 @@ public function getPage($targetUrl)
return new CountryPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a CountryContext
*
- * @param string $isoCountry The ISO country code
- * @return \Twilio\Rest\Pricing\V1\Messaging\CountryContext
+ * @param string $isoCountry The [ISO country code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the pricing information to fetch.
*/
- public function getContext($isoCountry)
+ public function getContext(
+ string $isoCountry
+
+ ): CountryContext
{
- return new CountryContext($this->version, $isoCountry);
+ return new CountryContext(
+ $this->version,
+ $isoCountry
+ );
}
/**
@@ -137,8 +154,8 @@ public function getContext($isoCountry)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Pricing.V1.CountryList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Messaging/CountryPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Messaging/CountryPage.php
index a1ec574..5f1a01b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Messaging/CountryPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Messaging/CountryPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return CountryInstance \Twilio\Rest\Pricing\V1\Messaging\CountryInstance
+ */
+ public function buildInstance(array $payload): CountryInstance
{
return new CountryInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Pricing.V1.CountryPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/MessagingInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/MessagingInstance.php
index fdefad3..55fe543 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/MessagingInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/MessagingInstance.php
@@ -2,44 +2,39 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Pricing
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Pricing\V1;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
-use Twilio\Values;
use Twilio\Version;
-/**
- * @property string $name
- * @property string $url
- * @property array $links
- */
+
class MessagingInstance extends InstanceResource
{
/**
* Initialize the MessagingInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @return \Twilio\Rest\Pricing\V1\MessagingInstance
*/
public function __construct(Version $version, array $payload)
{
parent::__construct($version);
- // Marshaled Properties
- $this->properties = array(
- 'name' => Values::array_get($payload, 'name'),
- 'url' => Values::array_get($payload, 'url'),
- 'links' => Values::array_get($payload, 'links'),
- );
-
- $this->solution = array();
+ $this->solution = [];
}
/**
@@ -49,7 +44,7 @@ public function __construct(Version $version, array $payload)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -68,8 +63,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Pricing.V1.MessagingInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/MessagingList.php b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/MessagingList.php
index 7a5b0fc..668fe4c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/MessagingList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/MessagingList.php
@@ -2,49 +2,60 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Pricing
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Pricing\V1;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
-use Twilio\Rest\Pricing\V1\Messaging\CountryList;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Pricing\V1\Messaging\CountryList;
+
/**
- * @property \Twilio\Rest\Pricing\V1\Messaging\CountryList $countries
+ * @property CountryList $countries
* @method \Twilio\Rest\Pricing\V1\Messaging\CountryContext countries(string $isoCountry)
*/
class MessagingList extends ListResource
-{
+ {
protected $_countries = null;
/**
* Construct the MessagingList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Pricing\V1\MessagingList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
}
/**
* Access the countries
*/
- protected function getCountries()
+ protected function getCountries(): CountryList
{
if (!$this->_countries) {
- $this->_countries = new CountryList($this->version);
+ $this->_countries = new CountryList(
+ $this->version
+ );
}
-
return $this->_countries;
}
@@ -55,7 +66,7 @@ protected function getCountries()
* @return \Twilio\ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -70,10 +81,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -88,8 +99,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Pricing.V1.MessagingList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/MessagingPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/MessagingPage.php
index 31c0e96..32fd62a 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/MessagingPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/MessagingPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return MessagingInstance \Twilio\Rest\Pricing\V1\MessagingInstance
+ */
+ public function buildInstance(array $payload): MessagingInstance
{
return new MessagingInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Pricing.V1.MessagingPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/PhoneNumber/CountryContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/PhoneNumber/CountryContext.php
index e6813ac..73f47d5 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/PhoneNumber/CountryContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/PhoneNumber/CountryContext.php
@@ -2,67 +2,82 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Pricing
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Pricing\V1\PhoneNumber;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class CountryContext extends InstanceContext
-{
+ {
/**
* Initialize the CountryContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $isoCountry The ISO country code
- * @return \Twilio\Rest\Pricing\V1\PhoneNumber\CountryContext
+ * @param Version $version Version that contains the resource
+ * @param string $isoCountry The [ISO country code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the pricing information to fetch.
*/
- public function __construct(Version $version, $isoCountry)
- {
+ public function __construct(
+ Version $version,
+ $isoCountry
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('isoCountry' => $isoCountry,);
+ $this->solution = [
+ 'isoCountry' =>
+ $isoCountry,
+ ];
- $this->uri = '/PhoneNumbers/Countries/' . \rawurlencode($isoCountry) . '';
+ $this->uri = '/PhoneNumbers/Countries/' . \rawurlencode($isoCountry)
+ .'';
}
/**
- * Fetch a CountryInstance
+ * Fetch the CountryInstance
*
* @return CountryInstance Fetched CountryInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): CountryInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
- return new CountryInstance($this->version, $payload, $this->solution['isoCountry']);
+ return new CountryInstance(
+ $this->version,
+ $payload,
+ $this->solution['isoCountry']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Pricing.V1.CountryContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/PhoneNumber/CountryInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/PhoneNumber/CountryInstance.php
index b765257..0d945fe 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/PhoneNumber/CountryInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/PhoneNumber/CountryInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Pricing
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Pricing\V1\PhoneNumber;
use Twilio\Exceptions\TwilioException;
@@ -14,63 +22,66 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * @property string $country
- * @property string $isoCountry
- * @property string $phoneNumberPrices
- * @property string $priceUnit
- * @property string $url
+ * @property string|null $country
+ * @property string|null $isoCountry
+ * @property string[]|null $phoneNumberPrices
+ * @property string|null $priceUnit
+ * @property string|null $url
*/
class CountryInstance extends InstanceResource
{
/**
* Initialize the CountryInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $isoCountry The ISO country code
- * @return \Twilio\Rest\Pricing\V1\PhoneNumber\CountryInstance
+ * @param string $isoCountry The [ISO country code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the pricing information to fetch.
*/
- public function __construct(Version $version, array $payload, $isoCountry = null)
+ public function __construct(Version $version, array $payload, string $isoCountry = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'country' => Values::array_get($payload, 'country'),
'isoCountry' => Values::array_get($payload, 'iso_country'),
'phoneNumberPrices' => Values::array_get($payload, 'phone_number_prices'),
'priceUnit' => Values::array_get($payload, 'price_unit'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('isoCountry' => $isoCountry ?: $this->properties['isoCountry'],);
+ $this->solution = ['isoCountry' => $isoCountry ?: $this->properties['isoCountry'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Pricing\V1\PhoneNumber\CountryContext Context for this
- * CountryInstance
+ * @return CountryContext Context for this CountryInstance
*/
- protected function proxy()
+ protected function proxy(): CountryContext
{
if (!$this->context) {
- $this->context = new CountryContext($this->version, $this->solution['isoCountry']);
+ $this->context = new CountryContext(
+ $this->version,
+ $this->solution['isoCountry']
+ );
}
return $this->context;
}
/**
- * Fetch a CountryInstance
+ * Fetch the CountryInstance
*
* @return CountryInstance Fetched CountryInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): CountryInstance
{
+
return $this->proxy()->fetch();
}
@@ -81,7 +92,7 @@ public function fetch()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -100,12 +111,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Pricing.V1.CountryInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/PhoneNumber/CountryList.php b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/PhoneNumber/CountryList.php
index 30d2c97..cc8bdd2 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/PhoneNumber/CountryList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/PhoneNumber/CountryList.php
@@ -2,35 +2,65 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Pricing
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Pricing\V1\PhoneNumber;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class CountryList extends ListResource
-{
+ {
/**
* Construct the CountryList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Pricing\V1\PhoneNumber\CountryList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/PhoneNumbers/Countries';
}
+ /**
+ * Reads CountryInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return CountryInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
+ }
+
/**
* Streams CountryInstance records from the API as a generator stream.
* This operation lazily loads records as efficiently as possible until the
@@ -47,9 +77,9 @@ public function __construct(Version $version)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -58,26 +88,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads CountryInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return CountryInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of CountryInstance records from the API.
* Request is executed immediately
@@ -85,21 +95,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of CountryInstance
+ * @return CountryPage Page of CountryInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): CountryPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new CountryPage($this->version, $response, $this->solution);
}
@@ -109,9 +120,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of CountryInstance
+ * @return CountryPage Page of CountryInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): CountryPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -121,15 +132,21 @@ public function getPage($targetUrl)
return new CountryPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a CountryContext
*
- * @param string $isoCountry The ISO country code
- * @return \Twilio\Rest\Pricing\V1\PhoneNumber\CountryContext
+ * @param string $isoCountry The [ISO country code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the pricing information to fetch.
*/
- public function getContext($isoCountry)
+ public function getContext(
+ string $isoCountry
+
+ ): CountryContext
{
- return new CountryContext($this->version, $isoCountry);
+ return new CountryContext(
+ $this->version,
+ $isoCountry
+ );
}
/**
@@ -137,8 +154,8 @@ public function getContext($isoCountry)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Pricing.V1.CountryList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/PhoneNumber/CountryPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/PhoneNumber/CountryPage.php
index 58e5789..c9f6fd3 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/PhoneNumber/CountryPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/PhoneNumber/CountryPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return CountryInstance \Twilio\Rest\Pricing\V1\PhoneNumber\CountryInstance
+ */
+ public function buildInstance(array $payload): CountryInstance
{
return new CountryInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Pricing.V1.CountryPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/PhoneNumberInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/PhoneNumberInstance.php
index 298ce53..6202899 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/PhoneNumberInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/PhoneNumberInstance.php
@@ -2,44 +2,39 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Pricing
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Pricing\V1;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
-use Twilio\Values;
use Twilio\Version;
-/**
- * @property string $name
- * @property string $url
- * @property array $links
- */
+
class PhoneNumberInstance extends InstanceResource
{
/**
* Initialize the PhoneNumberInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @return \Twilio\Rest\Pricing\V1\PhoneNumberInstance
*/
public function __construct(Version $version, array $payload)
{
parent::__construct($version);
- // Marshaled Properties
- $this->properties = array(
- 'name' => Values::array_get($payload, 'name'),
- 'url' => Values::array_get($payload, 'url'),
- 'links' => Values::array_get($payload, 'links'),
- );
-
- $this->solution = array();
+ $this->solution = [];
}
/**
@@ -49,7 +44,7 @@ public function __construct(Version $version, array $payload)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -68,8 +63,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Pricing.V1.PhoneNumberInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/PhoneNumberList.php b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/PhoneNumberList.php
index 14dfade..c79d064 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/PhoneNumberList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/PhoneNumberList.php
@@ -2,49 +2,60 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Pricing
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Pricing\V1;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
-use Twilio\Rest\Pricing\V1\PhoneNumber\CountryList;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Pricing\V1\PhoneNumber\CountryList;
+
/**
- * @property \Twilio\Rest\Pricing\V1\PhoneNumber\CountryList $countries
+ * @property CountryList $countries
* @method \Twilio\Rest\Pricing\V1\PhoneNumber\CountryContext countries(string $isoCountry)
*/
class PhoneNumberList extends ListResource
-{
+ {
protected $_countries = null;
/**
* Construct the PhoneNumberList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Pricing\V1\PhoneNumberList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
}
/**
* Access the countries
*/
- protected function getCountries()
+ protected function getCountries(): CountryList
{
if (!$this->_countries) {
- $this->_countries = new CountryList($this->version);
+ $this->_countries = new CountryList(
+ $this->version
+ );
}
-
return $this->_countries;
}
@@ -55,7 +66,7 @@ protected function getCountries()
* @return \Twilio\ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -70,10 +81,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -88,8 +99,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Pricing.V1.PhoneNumberList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/PhoneNumberPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/PhoneNumberPage.php
index 1283851..0fff46a 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/PhoneNumberPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/PhoneNumberPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return PhoneNumberInstance \Twilio\Rest\Pricing\V1\PhoneNumberInstance
+ */
+ public function buildInstance(array $payload): PhoneNumberInstance
{
return new PhoneNumberInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Pricing.V1.PhoneNumberPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Voice/CountryContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Voice/CountryContext.php
index 0fafb1d..2abaa69 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Voice/CountryContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Voice/CountryContext.php
@@ -2,67 +2,82 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Pricing
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Pricing\V1\Voice;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class CountryContext extends InstanceContext
-{
+ {
/**
* Initialize the CountryContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $isoCountry The ISO country code
- * @return \Twilio\Rest\Pricing\V1\Voice\CountryContext
+ * @param Version $version Version that contains the resource
+ * @param string $isoCountry The [ISO country code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the pricing information to fetch.
*/
- public function __construct(Version $version, $isoCountry)
- {
+ public function __construct(
+ Version $version,
+ $isoCountry
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('isoCountry' => $isoCountry,);
+ $this->solution = [
+ 'isoCountry' =>
+ $isoCountry,
+ ];
- $this->uri = '/Voice/Countries/' . \rawurlencode($isoCountry) . '';
+ $this->uri = '/Voice/Countries/' . \rawurlencode($isoCountry)
+ .'';
}
/**
- * Fetch a CountryInstance
+ * Fetch the CountryInstance
*
* @return CountryInstance Fetched CountryInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): CountryInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
- return new CountryInstance($this->version, $payload, $this->solution['isoCountry']);
+ return new CountryInstance(
+ $this->version,
+ $payload,
+ $this->solution['isoCountry']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Pricing.V1.CountryContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Voice/CountryInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Voice/CountryInstance.php
index d5ea1dc..2e7ca2b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Voice/CountryInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Voice/CountryInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Pricing
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Pricing\V1\Voice;
use Twilio\Exceptions\TwilioException;
@@ -14,65 +22,68 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * @property string $country
- * @property string $isoCountry
- * @property string $outboundPrefixPrices
- * @property string $inboundCallPrices
- * @property string $priceUnit
- * @property string $url
+ * @property string|null $country
+ * @property string|null $isoCountry
+ * @property string[]|null $outboundPrefixPrices
+ * @property string[]|null $inboundCallPrices
+ * @property string|null $priceUnit
+ * @property string|null $url
*/
class CountryInstance extends InstanceResource
{
/**
* Initialize the CountryInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $isoCountry The ISO country code
- * @return \Twilio\Rest\Pricing\V1\Voice\CountryInstance
+ * @param string $isoCountry The [ISO country code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the pricing information to fetch.
*/
- public function __construct(Version $version, array $payload, $isoCountry = null)
+ public function __construct(Version $version, array $payload, string $isoCountry = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'country' => Values::array_get($payload, 'country'),
'isoCountry' => Values::array_get($payload, 'iso_country'),
'outboundPrefixPrices' => Values::array_get($payload, 'outbound_prefix_prices'),
'inboundCallPrices' => Values::array_get($payload, 'inbound_call_prices'),
'priceUnit' => Values::array_get($payload, 'price_unit'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('isoCountry' => $isoCountry ?: $this->properties['isoCountry'],);
+ $this->solution = ['isoCountry' => $isoCountry ?: $this->properties['isoCountry'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Pricing\V1\Voice\CountryContext Context for this
- * CountryInstance
+ * @return CountryContext Context for this CountryInstance
*/
- protected function proxy()
+ protected function proxy(): CountryContext
{
if (!$this->context) {
- $this->context = new CountryContext($this->version, $this->solution['isoCountry']);
+ $this->context = new CountryContext(
+ $this->version,
+ $this->solution['isoCountry']
+ );
}
return $this->context;
}
/**
- * Fetch a CountryInstance
+ * Fetch the CountryInstance
*
* @return CountryInstance Fetched CountryInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): CountryInstance
{
+
return $this->proxy()->fetch();
}
@@ -83,7 +94,7 @@ public function fetch()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -102,12 +113,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Pricing.V1.CountryInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Voice/CountryList.php b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Voice/CountryList.php
index e8ccf38..4fea82f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Voice/CountryList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Voice/CountryList.php
@@ -2,35 +2,65 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Pricing
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Pricing\V1\Voice;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class CountryList extends ListResource
-{
+ {
/**
* Construct the CountryList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Pricing\V1\Voice\CountryList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/Voice/Countries';
}
+ /**
+ * Reads CountryInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return CountryInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
+ }
+
/**
* Streams CountryInstance records from the API as a generator stream.
* This operation lazily loads records as efficiently as possible until the
@@ -47,9 +77,9 @@ public function __construct(Version $version)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -58,26 +88,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads CountryInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return CountryInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of CountryInstance records from the API.
* Request is executed immediately
@@ -85,21 +95,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of CountryInstance
+ * @return CountryPage Page of CountryInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): CountryPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new CountryPage($this->version, $response, $this->solution);
}
@@ -109,9 +120,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of CountryInstance
+ * @return CountryPage Page of CountryInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): CountryPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -121,15 +132,21 @@ public function getPage($targetUrl)
return new CountryPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a CountryContext
*
- * @param string $isoCountry The ISO country code
- * @return \Twilio\Rest\Pricing\V1\Voice\CountryContext
+ * @param string $isoCountry The [ISO country code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the pricing information to fetch.
*/
- public function getContext($isoCountry)
+ public function getContext(
+ string $isoCountry
+
+ ): CountryContext
{
- return new CountryContext($this->version, $isoCountry);
+ return new CountryContext(
+ $this->version,
+ $isoCountry
+ );
}
/**
@@ -137,8 +154,8 @@ public function getContext($isoCountry)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Pricing.V1.CountryList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Voice/CountryPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Voice/CountryPage.php
index a33bb79..28d7a83 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Voice/CountryPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Voice/CountryPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return CountryInstance \Twilio\Rest\Pricing\V1\Voice\CountryInstance
+ */
+ public function buildInstance(array $payload): CountryInstance
{
return new CountryInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Pricing.V1.CountryPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Voice/NumberContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Voice/NumberContext.php
index 17dad50..9503833 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Voice/NumberContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Voice/NumberContext.php
@@ -2,67 +2,82 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Pricing
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Pricing\V1\Voice;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class NumberContext extends InstanceContext
-{
+ {
/**
* Initialize the NumberContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $number The phone number to fetch
- * @return \Twilio\Rest\Pricing\V1\Voice\NumberContext
+ * @param Version $version Version that contains the resource
+ * @param string $number The phone number to fetch.
*/
- public function __construct(Version $version, $number)
- {
+ public function __construct(
+ Version $version,
+ $number
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('number' => $number,);
+ $this->solution = [
+ 'number' =>
+ $number,
+ ];
- $this->uri = '/Voice/Numbers/' . \rawurlencode($number) . '';
+ $this->uri = '/Voice/Numbers/' . \rawurlencode($number)
+ .'';
}
/**
- * Fetch a NumberInstance
+ * Fetch the NumberInstance
*
* @return NumberInstance Fetched NumberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): NumberInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
- return new NumberInstance($this->version, $payload, $this->solution['number']);
+ return new NumberInstance(
+ $this->version,
+ $payload,
+ $this->solution['number']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Pricing.V1.NumberContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Voice/NumberInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Voice/NumberInstance.php
index 8a1ab5e..a2aeb13 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Voice/NumberInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Voice/NumberInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Pricing
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Pricing\V1\Voice;
use Twilio\Exceptions\TwilioException;
@@ -14,31 +22,31 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * @property string $number
- * @property string $country
- * @property string $isoCountry
- * @property string $outboundCallPrice
- * @property string $inboundCallPrice
- * @property string $priceUnit
- * @property string $url
+ * @property string|null $number
+ * @property string|null $country
+ * @property string|null $isoCountry
+ * @property string|null $outboundCallPrice
+ * @property string|null $inboundCallPrice
+ * @property string|null $priceUnit
+ * @property string|null $url
*/
class NumberInstance extends InstanceResource
{
/**
* Initialize the NumberInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $number The phone number to fetch
- * @return \Twilio\Rest\Pricing\V1\Voice\NumberInstance
+ * @param string $number The phone number to fetch.
*/
- public function __construct(Version $version, array $payload, $number = null)
+ public function __construct(Version $version, array $payload, string $number = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'number' => Values::array_get($payload, 'number'),
'country' => Values::array_get($payload, 'country'),
'isoCountry' => Values::array_get($payload, 'iso_country'),
@@ -46,35 +54,38 @@ public function __construct(Version $version, array $payload, $number = null)
'inboundCallPrice' => Values::array_get($payload, 'inbound_call_price'),
'priceUnit' => Values::array_get($payload, 'price_unit'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('number' => $number ?: $this->properties['number'],);
+ $this->solution = ['number' => $number ?: $this->properties['number'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Pricing\V1\Voice\NumberContext Context for this
- * NumberInstance
+ * @return NumberContext Context for this NumberInstance
*/
- protected function proxy()
+ protected function proxy(): NumberContext
{
if (!$this->context) {
- $this->context = new NumberContext($this->version, $this->solution['number']);
+ $this->context = new NumberContext(
+ $this->version,
+ $this->solution['number']
+ );
}
return $this->context;
}
/**
- * Fetch a NumberInstance
+ * Fetch the NumberInstance
*
* @return NumberInstance Fetched NumberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): NumberInstance
{
+
return $this->proxy()->fetch();
}
@@ -85,7 +96,7 @@ public function fetch()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -104,12 +115,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Pricing.V1.NumberInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Voice/NumberList.php b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Voice/NumberList.php
index d0acd3c..47dfe36 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Voice/NumberList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Voice/NumberList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Pricing
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Pricing\V1\Voice;
@@ -12,31 +19,38 @@
use Twilio\ListResource;
use Twilio\Version;
+
class NumberList extends ListResource
-{
+ {
/**
* Construct the NumberList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Pricing\V1\Voice\NumberList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
}
/**
* Constructs a NumberContext
*
- * @param string $number The phone number to fetch
- * @return \Twilio\Rest\Pricing\V1\Voice\NumberContext
+ * @param string $number The phone number to fetch.
*/
- public function getContext($number)
+ public function getContext(
+ string $number
+
+ ): NumberContext
{
- return new NumberContext($this->version, $number);
+ return new NumberContext(
+ $this->version,
+ $number
+ );
}
/**
@@ -44,8 +58,8 @@ public function getContext($number)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Pricing.V1.NumberList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Voice/NumberPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Voice/NumberPage.php
index 1dc8a78..2ea0e0d 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Voice/NumberPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/Voice/NumberPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return NumberInstance \Twilio\Rest\Pricing\V1\Voice\NumberInstance
+ */
+ public function buildInstance(array $payload): NumberInstance
{
return new NumberInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Pricing.V1.NumberPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/VoiceInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/VoiceInstance.php
index 41ba1eb..114f841 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/VoiceInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/VoiceInstance.php
@@ -2,44 +2,39 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Pricing
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Pricing\V1;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
-use Twilio\Values;
use Twilio\Version;
-/**
- * @property string $name
- * @property string $url
- * @property array $links
- */
+
class VoiceInstance extends InstanceResource
{
/**
* Initialize the VoiceInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @return \Twilio\Rest\Pricing\V1\VoiceInstance
*/
public function __construct(Version $version, array $payload)
{
parent::__construct($version);
- // Marshaled Properties
- $this->properties = array(
- 'name' => Values::array_get($payload, 'name'),
- 'url' => Values::array_get($payload, 'url'),
- 'links' => Values::array_get($payload, 'links'),
- );
-
- $this->solution = array();
+ $this->solution = [];
}
/**
@@ -49,7 +44,7 @@ public function __construct(Version $version, array $payload)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -68,8 +63,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Pricing.V1.VoiceInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/VoiceList.php b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/VoiceList.php
index fa2be1e..b3e80d0 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/VoiceList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/VoiceList.php
@@ -2,66 +2,78 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Pricing
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Pricing\V1;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
+use Twilio\Version;
+use Twilio\InstanceContext;
use Twilio\Rest\Pricing\V1\Voice\CountryList;
use Twilio\Rest\Pricing\V1\Voice\NumberList;
-use Twilio\Version;
+
/**
- * @property \Twilio\Rest\Pricing\V1\Voice\NumberList $numbers
- * @property \Twilio\Rest\Pricing\V1\Voice\CountryList $countries
- * @method \Twilio\Rest\Pricing\V1\Voice\NumberContext numbers(string $number)
+ * @property CountryList $countries
+ * @property NumberList $numbers
* @method \Twilio\Rest\Pricing\V1\Voice\CountryContext countries(string $isoCountry)
+ * @method \Twilio\Rest\Pricing\V1\Voice\NumberContext numbers(string $number)
*/
class VoiceList extends ListResource
-{
- protected $_numbers = null;
+ {
protected $_countries = null;
+ protected $_numbers = null;
/**
* Construct the VoiceList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Pricing\V1\VoiceList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
}
/**
- * Access the numbers
+ * Access the countries
*/
- protected function getNumbers()
+ protected function getCountries(): CountryList
{
- if (!$this->_numbers) {
- $this->_numbers = new NumberList($this->version);
+ if (!$this->_countries) {
+ $this->_countries = new CountryList(
+ $this->version
+ );
}
-
- return $this->_numbers;
+ return $this->_countries;
}
/**
- * Access the countries
+ * Access the numbers
*/
- protected function getCountries()
+ protected function getNumbers(): NumberList
{
- if (!$this->_countries) {
- $this->_countries = new CountryList($this->version);
+ if (!$this->_numbers) {
+ $this->_numbers = new NumberList(
+ $this->version
+ );
}
-
- return $this->_countries;
+ return $this->_numbers;
}
/**
@@ -71,7 +83,7 @@ protected function getCountries()
* @return \Twilio\ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -86,10 +98,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -104,8 +116,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Pricing.V1.VoiceList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/VoicePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/VoicePage.php
index daf4962..d412643 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/VoicePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V1/VoicePage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return VoiceInstance \Twilio\Rest\Pricing\V1\VoiceInstance
+ */
+ public function buildInstance(array $payload): VoiceInstance
{
return new VoiceInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Pricing.V1.VoicePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2.php b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2.php
index dcc8c13..5899c74 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2.php
@@ -1,31 +1,45 @@
version = 'v2';
}
- /**
- * @return \Twilio\Rest\Pricing\V2\VoiceList
- */
- protected function getVoice()
+ protected function getCountries(): CountryList
+ {
+ if (!$this->_countries) {
+ $this->_countries = new CountryList($this);
+ }
+ return $this->_countries;
+ }
+
+ protected function getNumbers(): NumberList
+ {
+ if (!$this->_numbers) {
+ $this->_numbers = new NumberList($this);
+ }
+ return $this->_numbers;
+ }
+
+ protected function getVoice(): VoiceList
{
if (!$this->_voice) {
$this->_voice = new VoiceList($this);
@@ -51,7 +78,7 @@ protected function getVoice()
* @return \Twilio\ListResource The requested resource
* @throws TwilioException For unknown resource
*/
- public function __get($name)
+ public function __get(string $name)
{
$method = 'get' . \ucfirst($name);
if (\method_exists($this, $method)) {
@@ -66,10 +93,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -84,8 +111,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Pricing.V2]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/Voice/CountryContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/Voice/CountryContext.php
index d4a4dcc..80be399 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/Voice/CountryContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/Voice/CountryContext.php
@@ -2,68 +2,82 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Pricing
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Pricing\V2\Voice;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class CountryContext extends InstanceContext
-{
+ {
/**
* Initialize the CountryContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $isoCountry The ISO country code of the pricing information to
- * fetch
- * @return \Twilio\Rest\Pricing\V2\Voice\CountryContext
+ * @param Version $version Version that contains the resource
+ * @param string $isoCountry The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the origin-based voice pricing information to fetch.
*/
- public function __construct(Version $version, $isoCountry)
- {
+ public function __construct(
+ Version $version,
+ $isoCountry
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('isoCountry' => $isoCountry,);
+ $this->solution = [
+ 'isoCountry' =>
+ $isoCountry,
+ ];
- $this->uri = '/Voice/Countries/' . \rawurlencode($isoCountry) . '';
+ $this->uri = '/Voice/Countries/' . \rawurlencode($isoCountry)
+ .'';
}
/**
- * Fetch a CountryInstance
+ * Fetch the CountryInstance
*
* @return CountryInstance Fetched CountryInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): CountryInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
- return new CountryInstance($this->version, $payload, $this->solution['isoCountry']);
+ return new CountryInstance(
+ $this->version,
+ $payload,
+ $this->solution['isoCountry']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Pricing.V2.CountryContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/Voice/CountryInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/Voice/CountryInstance.php
index 0d177ed..b1fbfdf 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/Voice/CountryInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/Voice/CountryInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Pricing
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Pricing\V2\Voice;
use Twilio\Exceptions\TwilioException;
@@ -14,66 +22,68 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * @property string $country
- * @property string $isoCountry
- * @property string $outboundPrefixPrices
- * @property string $inboundCallPrices
- * @property string $priceUnit
- * @property string $url
+ * @property string|null $country
+ * @property string|null $isoCountry
+ * @property string[]|null $outboundPrefixPrices
+ * @property string[]|null $inboundCallPrices
+ * @property string|null $priceUnit
+ * @property string|null $url
*/
class CountryInstance extends InstanceResource
{
/**
* Initialize the CountryInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $isoCountry The ISO country code of the pricing information to
- * fetch
- * @return \Twilio\Rest\Pricing\V2\Voice\CountryInstance
+ * @param string $isoCountry The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the origin-based voice pricing information to fetch.
*/
- public function __construct(Version $version, array $payload, $isoCountry = null)
+ public function __construct(Version $version, array $payload, string $isoCountry = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'country' => Values::array_get($payload, 'country'),
'isoCountry' => Values::array_get($payload, 'iso_country'),
'outboundPrefixPrices' => Values::array_get($payload, 'outbound_prefix_prices'),
'inboundCallPrices' => Values::array_get($payload, 'inbound_call_prices'),
'priceUnit' => Values::array_get($payload, 'price_unit'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('isoCountry' => $isoCountry ?: $this->properties['isoCountry'],);
+ $this->solution = ['isoCountry' => $isoCountry ?: $this->properties['isoCountry'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Pricing\V2\Voice\CountryContext Context for this
- * CountryInstance
+ * @return CountryContext Context for this CountryInstance
*/
- protected function proxy()
+ protected function proxy(): CountryContext
{
if (!$this->context) {
- $this->context = new CountryContext($this->version, $this->solution['isoCountry']);
+ $this->context = new CountryContext(
+ $this->version,
+ $this->solution['isoCountry']
+ );
}
return $this->context;
}
/**
- * Fetch a CountryInstance
+ * Fetch the CountryInstance
*
* @return CountryInstance Fetched CountryInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): CountryInstance
{
+
return $this->proxy()->fetch();
}
@@ -84,7 +94,7 @@ public function fetch()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -103,12 +113,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Pricing.V2.CountryInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/Voice/CountryList.php b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/Voice/CountryList.php
index bd32c86..28d0f2c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/Voice/CountryList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/Voice/CountryList.php
@@ -2,35 +2,65 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Pricing
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Pricing\V2\Voice;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class CountryList extends ListResource
-{
+ {
/**
* Construct the CountryList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Pricing\V2\Voice\CountryList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/Voice/Countries';
}
+ /**
+ * Reads CountryInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return CountryInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
+ }
+
/**
* Streams CountryInstance records from the API as a generator stream.
* This operation lazily loads records as efficiently as possible until the
@@ -47,9 +77,9 @@ public function __construct(Version $version)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -58,26 +88,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads CountryInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return CountryInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of CountryInstance records from the API.
* Request is executed immediately
@@ -85,21 +95,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of CountryInstance
+ * @return CountryPage Page of CountryInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): CountryPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new CountryPage($this->version, $response, $this->solution);
}
@@ -109,9 +120,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of CountryInstance
+ * @return CountryPage Page of CountryInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): CountryPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -121,16 +132,21 @@ public function getPage($targetUrl)
return new CountryPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a CountryContext
*
- * @param string $isoCountry The ISO country code of the pricing information to
- * fetch
- * @return \Twilio\Rest\Pricing\V2\Voice\CountryContext
+ * @param string $isoCountry The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the origin-based voice pricing information to fetch.
*/
- public function getContext($isoCountry)
+ public function getContext(
+ string $isoCountry
+
+ ): CountryContext
{
- return new CountryContext($this->version, $isoCountry);
+ return new CountryContext(
+ $this->version,
+ $isoCountry
+ );
}
/**
@@ -138,8 +154,8 @@ public function getContext($isoCountry)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Pricing.V2.CountryList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/Voice/CountryPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/Voice/CountryPage.php
index e5b4d79..1d11d2d 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/Voice/CountryPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/Voice/CountryPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return CountryInstance \Twilio\Rest\Pricing\V2\Voice\CountryInstance
+ */
+ public function buildInstance(array $payload): CountryInstance
{
return new CountryInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Pricing.V2.CountryPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/Voice/NumberContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/Voice/NumberContext.php
index a4ef1d6..8f5d463 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/Voice/NumberContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/Voice/NumberContext.php
@@ -2,72 +2,91 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Pricing
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Pricing\V2\Voice;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class NumberContext extends InstanceContext
-{
+ {
/**
* Initialize the NumberContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $destinationNumber The destination number for which to fetch
- * pricing information
- * @return \Twilio\Rest\Pricing\V2\Voice\NumberContext
+ * @param Version $version Version that contains the resource
+ * @param string $destinationNumber The destination phone number, in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, for which to fetch the origin-based voice pricing information. E.164 format consists of a + followed by the country code and subscriber number.
*/
- public function __construct(Version $version, $destinationNumber)
- {
+ public function __construct(
+ Version $version,
+ $destinationNumber
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('destinationNumber' => $destinationNumber,);
+ $this->solution = [
+ 'destinationNumber' =>
+ $destinationNumber,
+ ];
- $this->uri = '/Voice/Numbers/' . \rawurlencode($destinationNumber) . '';
+ $this->uri = '/Voice/Numbers/' . \rawurlencode($destinationNumber)
+ .'';
}
/**
- * Fetch a NumberInstance
+ * Fetch the NumberInstance
*
* @param array|Options $options Optional Arguments
* @return NumberInstance Fetched NumberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch($options = array())
+ public function fetch(array $options = []): NumberInstance
{
+
$options = new Values($options);
- $params = Values::of(array('OriginationNumber' => $options['originationNumber'],));
+ $params = Values::of([
+ 'OriginationNumber' =>
+ $options['originationNumber'],
+ ]);
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, $params, [], $headers);
- return new NumberInstance($this->version, $payload, $this->solution['destinationNumber']);
+ return new NumberInstance(
+ $this->version,
+ $payload,
+ $this->solution['destinationNumber']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Pricing.V2.NumberContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/Voice/NumberInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/Voice/NumberInstance.php
index eacbfb3..d37951c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/Voice/NumberInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/Voice/NumberInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Pricing
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Pricing\V2\Voice;
use Twilio\Exceptions\TwilioException;
@@ -15,33 +23,32 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * @property string $destinationNumber
- * @property string $originationNumber
- * @property string $country
- * @property string $isoCountry
- * @property string $outboundCallPrices
- * @property string $inboundCallPrice
- * @property string $priceUnit
- * @property string $url
+ * @property string|null $destinationNumber
+ * @property string|null $originationNumber
+ * @property string|null $country
+ * @property string|null $isoCountry
+ * @property string[]|null $outboundCallPrices
+ * @property string|null $inboundCallPrice
+ * @property string|null $priceUnit
+ * @property string|null $url
*/
class NumberInstance extends InstanceResource
{
/**
* Initialize the NumberInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $destinationNumber The destination number for which to fetch
- * pricing information
- * @return \Twilio\Rest\Pricing\V2\Voice\NumberInstance
+ * @param string $destinationNumber The destination phone number, in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, for which to fetch the origin-based voice pricing information. E.164 format consists of a + followed by the country code and subscriber number.
*/
- public function __construct(Version $version, array $payload, $destinationNumber = null)
+ public function __construct(Version $version, array $payload, string $destinationNumber = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'destinationNumber' => Values::array_get($payload, 'destination_number'),
'originationNumber' => Values::array_get($payload, 'origination_number'),
'country' => Values::array_get($payload, 'country'),
@@ -50,38 +57,39 @@ public function __construct(Version $version, array $payload, $destinationNumber
'inboundCallPrice' => Values::array_get($payload, 'inbound_call_price'),
'priceUnit' => Values::array_get($payload, 'price_unit'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array(
- 'destinationNumber' => $destinationNumber ?: $this->properties['destinationNumber'],
- );
+ $this->solution = ['destinationNumber' => $destinationNumber ?: $this->properties['destinationNumber'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Pricing\V2\Voice\NumberContext Context for this
- * NumberInstance
+ * @return NumberContext Context for this NumberInstance
*/
- protected function proxy()
+ protected function proxy(): NumberContext
{
if (!$this->context) {
- $this->context = new NumberContext($this->version, $this->solution['destinationNumber']);
+ $this->context = new NumberContext(
+ $this->version,
+ $this->solution['destinationNumber']
+ );
}
return $this->context;
}
/**
- * Fetch a NumberInstance
+ * Fetch the NumberInstance
*
* @param array|Options $options Optional Arguments
* @return NumberInstance Fetched NumberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch($options = array())
+ public function fetch(array $options = []): NumberInstance
{
+
return $this->proxy()->fetch($options);
}
@@ -92,7 +100,7 @@ public function fetch($options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -111,12 +119,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Pricing.V2.NumberInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/Voice/NumberList.php b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/Voice/NumberList.php
index 5c253b4..7147366 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/Voice/NumberList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/Voice/NumberList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Pricing
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Pricing\V2\Voice;
@@ -12,32 +19,38 @@
use Twilio\ListResource;
use Twilio\Version;
+
class NumberList extends ListResource
-{
+ {
/**
* Construct the NumberList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Pricing\V2\Voice\NumberList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
}
/**
* Constructs a NumberContext
*
- * @param string $destinationNumber The destination number for which to fetch
- * pricing information
- * @return \Twilio\Rest\Pricing\V2\Voice\NumberContext
+ * @param string $destinationNumber The destination phone number, in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, for which to fetch the origin-based voice pricing information. E.164 format consists of a + followed by the country code and subscriber number.
*/
- public function getContext($destinationNumber)
+ public function getContext(
+ string $destinationNumber
+
+ ): NumberContext
{
- return new NumberContext($this->version, $destinationNumber);
+ return new NumberContext(
+ $this->version,
+ $destinationNumber
+ );
}
/**
@@ -45,8 +58,8 @@ public function getContext($destinationNumber)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Pricing.V2.NumberList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/Voice/NumberOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/Voice/NumberOptions.php
index 2915e84..e6f29b3 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/Voice/NumberOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/Voice/NumberOptions.php
@@ -1,10 +1,16 @@
options['originationNumber'] = $originationNumber;
}
/**
* The origination phone number, in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, for which to fetch the origin-based voice pricing information. E.164 format consists of a + followed by the country code and subscriber number.
*
- * @param string $originationNumber The origination number for which to fetch
- * pricing information
+ * @param string $originationNumber The origination phone number, in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, for which to fetch the origin-based voice pricing information. E.164 format consists of a + followed by the country code and subscriber number.
* @return $this Fluent Builder
*/
- public function setOriginationNumber($originationNumber)
+ public function setOriginationNumber(string $originationNumber): self
{
$this->options['originationNumber'] = $originationNumber;
return $this;
@@ -54,14 +67,10 @@ public function setOriginationNumber($originationNumber)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Pricing.V2.FetchNumberOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Pricing.V2.FetchNumberOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/Voice/NumberPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/Voice/NumberPage.php
index 64aa98d..997264b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/Voice/NumberPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/Voice/NumberPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return NumberInstance \Twilio\Rest\Pricing\V2\Voice\NumberInstance
+ */
+ public function buildInstance(array $payload): NumberInstance
{
return new NumberInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Pricing.V2.NumberPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/VoiceInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/VoiceInstance.php
index 9c72e42..af1d298 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/VoiceInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/VoiceInstance.php
@@ -2,44 +2,39 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Pricing
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Pricing\V2;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
-use Twilio\Values;
use Twilio\Version;
-/**
- * @property string $name
- * @property string $url
- * @property array $links
- */
+
class VoiceInstance extends InstanceResource
{
/**
* Initialize the VoiceInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @return \Twilio\Rest\Pricing\V2\VoiceInstance
*/
public function __construct(Version $version, array $payload)
{
parent::__construct($version);
- // Marshaled Properties
- $this->properties = array(
- 'name' => Values::array_get($payload, 'name'),
- 'url' => Values::array_get($payload, 'url'),
- 'links' => Values::array_get($payload, 'links'),
- );
-
- $this->solution = array();
+ $this->solution = [];
}
/**
@@ -49,7 +44,7 @@ public function __construct(Version $version, array $payload)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -68,8 +63,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Pricing.V2.VoiceInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/VoiceList.php b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/VoiceList.php
index 9ec0812..e8c5797 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/VoiceList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/VoiceList.php
@@ -2,27 +2,36 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Pricing
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Pricing\V2;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
+use Twilio\Version;
+use Twilio\InstanceContext;
use Twilio\Rest\Pricing\V2\Voice\CountryList;
use Twilio\Rest\Pricing\V2\Voice\NumberList;
-use Twilio\Version;
+
/**
- * @property \Twilio\Rest\Pricing\V2\Voice\CountryList $countries
- * @property \Twilio\Rest\Pricing\V2\Voice\NumberList $numbers
+ * @property CountryList $countries
+ * @property NumberList $numbers
* @method \Twilio\Rest\Pricing\V2\Voice\CountryContext countries(string $isoCountry)
* @method \Twilio\Rest\Pricing\V2\Voice\NumberContext numbers(string $destinationNumber)
*/
class VoiceList extends ListResource
-{
+ {
protected $_countries = null;
protected $_numbers = null;
@@ -30,37 +39,40 @@ class VoiceList extends ListResource
* Construct the VoiceList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Pricing\V2\VoiceList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
}
/**
* Access the countries
*/
- protected function getCountries()
+ protected function getCountries(): CountryList
{
if (!$this->_countries) {
- $this->_countries = new CountryList($this->version);
+ $this->_countries = new CountryList(
+ $this->version
+ );
}
-
return $this->_countries;
}
/**
* Access the numbers
*/
- protected function getNumbers()
+ protected function getNumbers(): NumberList
{
if (!$this->_numbers) {
- $this->_numbers = new NumberList($this->version);
+ $this->_numbers = new NumberList(
+ $this->version
+ );
}
-
return $this->_numbers;
}
@@ -71,7 +83,7 @@ protected function getNumbers()
* @return \Twilio\ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -86,10 +98,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -104,8 +116,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Pricing.V2.VoiceList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/VoicePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/VoicePage.php
index 515e7ae..c72a199 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/VoicePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Pricing/V2/VoicePage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return VoiceInstance \Twilio\Rest\Pricing\V2\VoiceInstance
+ */
+ public function buildInstance(array $payload): VoiceInstance
{
return new VoiceInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Pricing.V2.VoicePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Proxy.php b/vendor/twilio/sdk/src/Twilio/Rest/Proxy.php
index 46b0847..e9d0a12 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Proxy.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Proxy.php
@@ -1,111 +1,25 @@
baseUrl = 'https://proxy.twilio.com';
- }
-
- /**
- * @return \Twilio\Rest\Proxy\V1 Version v1 of proxy
- */
- protected function getV1()
- {
- if (!$this->_v1) {
- $this->_v1 = new V1($this);
- }
- return $this->_v1;
- }
-
- /**
- * Magic getter to lazy load version
- *
- * @param string $name Version to return
- * @return \Twilio\Version The requested version
- * @throws TwilioException For unknown versions
- */
- public function __get($name)
- {
- $method = 'get' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return $this->$method();
- }
-
- throw new TwilioException('Unknown version ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $method = 'context' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return \call_user_func_array(array($this, $method), $arguments);
- }
-
- throw new TwilioException('Unknown context ' . $name);
- }
+class Proxy extends ProxyBase {
/**
- * @return \Twilio\Rest\Proxy\V1\ServiceList
+ * @deprecated Use v1->services instead.
*/
- protected function getServices()
- {
+ protected function getServices(): \Twilio\Rest\Proxy\V1\ServiceList {
+ echo "services is deprecated. Use v1->services instead.";
return $this->v1->services;
}
/**
+ * @deprecated Use v1->services(\$sid) instead.
* @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Proxy\V1\ServiceContext
*/
- protected function contextServices($sid)
- {
+ protected function contextServices(string $sid): \Twilio\Rest\Proxy\V1\ServiceContext {
+ echo "services(\$sid) is deprecated. Use v1->services(\$sid) instead.";
return $this->v1->services($sid);
}
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Proxy]';
- }
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1.php b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1.php
index 919eff9..0977a74 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1.php
@@ -1,32 +1,38 @@
version = 'v1';
}
- /**
- * @return \Twilio\Rest\Proxy\V1\ServiceList
- */
- protected function getServices()
+ protected function getServices(): ServiceList
{
if (!$this->_services) {
$this->_services = new ServiceList($this);
@@ -52,7 +55,7 @@ protected function getServices()
* @return \Twilio\ListResource The requested resource
* @throws TwilioException For unknown resource
*/
- public function __get($name)
+ public function __get(string $name)
{
$method = 'get' . \ucfirst($name);
if (\method_exists($this, $method)) {
@@ -67,10 +70,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -85,8 +88,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Proxy.V1]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/PhoneNumberContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/PhoneNumberContext.php
index 037a05b..ddcaebb 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/PhoneNumberContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/PhoneNumberContext.php
@@ -2,70 +2,83 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Proxy
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Proxy\V1\Service;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
class PhoneNumberContext extends InstanceContext
-{
+ {
/**
* Initialize the PhoneNumberContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the parent Service resource of the
- * PhoneNumber resource to fetch
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Proxy\V1\Service\PhoneNumberContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID parent [Service](https://www.twilio.com/docs/proxy/api/service) resource of the new PhoneNumber resource.
+ * @param string $sid The Twilio-provided string that uniquely identifies the PhoneNumber resource to delete.
*/
- public function __construct(Version $version, $serviceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/PhoneNumbers/' . \rawurlencode($sid) . '';
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/PhoneNumbers/' . \rawurlencode($sid)
+ .'';
}
/**
- * Deletes the PhoneNumberInstance
+ * Delete the PhoneNumberInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function delete(): bool
{
- return $this->version->delete('delete', $this->uri);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a PhoneNumberInstance
+ * Fetch the PhoneNumberInstance
*
* @return PhoneNumberInstance Fetched PhoneNumberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): PhoneNumberInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new PhoneNumberInstance(
$this->version,
@@ -75,6 +88,7 @@ public function fetch()
);
}
+
/**
* Update the PhoneNumberInstance
*
@@ -82,18 +96,18 @@ public function fetch()
* @return PhoneNumberInstance Updated PhoneNumberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): PhoneNumberInstance
{
+
$options = new Values($options);
- $data = Values::of(array('IsReserved' => Serialize::booleanToString($options['isReserved']),));
+ $data = Values::of([
+ 'IsReserved' =>
+ Serialize::booleanToString($options['isReserved']),
+ ]);
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new PhoneNumberInstance(
$this->version,
@@ -103,17 +117,18 @@ public function update($options = array())
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Proxy.V1.PhoneNumberContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/PhoneNumberInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/PhoneNumberInstance.php
index acfbe27..b4306a0 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/PhoneNumberInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/PhoneNumberInstance.php
@@ -2,34 +2,42 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Proxy
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Proxy\V1\Service;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Base\PhoneNumberCapabilities;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property string $sid
- * @property string $accountSid
- * @property string $serviceSid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $phoneNumber
- * @property string $friendlyName
- * @property string $isoCountry
- * @property string $capabilities
- * @property string $url
- * @property bool $isReserved
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $phoneNumber
+ * @property string|null $friendlyName
+ * @property string|null $isoCountry
+ * @property PhoneNumberCapabilities|null $capabilities
+ * @property string|null $url
+ * @property bool|null $isReserved
* @property int $inUse
*/
class PhoneNumberInstance extends InstanceResource
@@ -37,19 +45,17 @@ class PhoneNumberInstance extends InstanceResource
/**
* Initialize the PhoneNumberInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the PhoneNumber resource's parent
- * Service resource
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Proxy\V1\Service\PhoneNumberInstance
+ * @param string $serviceSid The SID parent [Service](https://www.twilio.com/docs/proxy/api/service) resource of the new PhoneNumber resource.
+ * @param string $sid The Twilio-provided string that uniquely identifies the PhoneNumber resource to delete.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
@@ -58,23 +64,22 @@ public function __construct(Version $version, array $payload, $serviceSid, $sid
'phoneNumber' => Values::array_get($payload, 'phone_number'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
'isoCountry' => Values::array_get($payload, 'iso_country'),
- 'capabilities' => Values::array_get($payload, 'capabilities'),
+ 'capabilities' => Deserialize::phoneNumberCapabilities(Values::array_get($payload, 'capabilities')),
'url' => Values::array_get($payload, 'url'),
'isReserved' => Values::array_get($payload, 'is_reserved'),
'inUse' => Values::array_get($payload, 'in_use'),
- );
+ ];
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Proxy\V1\Service\PhoneNumberContext Context for this
- * PhoneNumberInstance
+ * @return PhoneNumberContext Context for this PhoneNumberInstance
*/
- protected function proxy()
+ protected function proxy(): PhoneNumberContext
{
if (!$this->context) {
$this->context = new PhoneNumberContext(
@@ -88,24 +93,26 @@ protected function proxy()
}
/**
- * Deletes the PhoneNumberInstance
+ * Delete the PhoneNumberInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function delete(): bool
{
+
return $this->proxy()->delete();
}
/**
- * Fetch a PhoneNumberInstance
+ * Fetch the PhoneNumberInstance
*
* @return PhoneNumberInstance Fetched PhoneNumberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): PhoneNumberInstance
{
+
return $this->proxy()->fetch();
}
@@ -116,8 +123,9 @@ public function fetch()
* @return PhoneNumberInstance Updated PhoneNumberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): PhoneNumberInstance
{
+
return $this->proxy()->update($options);
}
@@ -128,7 +136,7 @@ public function update($options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -147,12 +155,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Proxy.V1.PhoneNumberInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/PhoneNumberList.php b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/PhoneNumberList.php
index 4c364b9..f47569a 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/PhoneNumberList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/PhoneNumberList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Proxy
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Proxy\V1\Service;
@@ -12,58 +19,87 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
class PhoneNumberList extends ListResource
-{
+ {
/**
* Construct the PhoneNumberList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the PhoneNumber resource's parent
- * Service resource
- * @return \Twilio\Rest\Proxy\V1\Service\PhoneNumberList
+ * @param string $serviceSid The SID parent [Service](https://www.twilio.com/docs/proxy/api/service) resource of the new PhoneNumber resource.
*/
- public function __construct(Version $version, $serviceSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/PhoneNumbers';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/PhoneNumbers';
}
/**
- * Create a new PhoneNumberInstance
+ * Create the PhoneNumberInstance
*
* @param array|Options $options Optional Arguments
- * @return PhoneNumberInstance Newly created PhoneNumberInstance
+ * @return PhoneNumberInstance Created PhoneNumberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($options = array())
+ public function create(array $options = []): PhoneNumberInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'Sid' => $options['sid'],
- 'PhoneNumber' => $options['phoneNumber'],
- 'IsReserved' => Serialize::booleanToString($options['isReserved']),
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'Sid' =>
+ $options['sid'],
+ 'PhoneNumber' =>
+ $options['phoneNumber'],
+ 'IsReserved' =>
+ Serialize::booleanToString($options['isReserved']),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new PhoneNumberInstance(
+ $this->version,
+ $payload,
+ $this->solution['serviceSid']
);
+ }
- return new PhoneNumberInstance($this->version, $payload, $this->solution['serviceSid']);
+
+ /**
+ * Reads PhoneNumberInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return PhoneNumberInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -82,9 +118,9 @@ public function create($options = array())
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -93,26 +129,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads PhoneNumberInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return PhoneNumberInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of PhoneNumberInstance records from the API.
* Request is executed immediately
@@ -120,21 +136,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of PhoneNumberInstance
+ * @return PhoneNumberPage Page of PhoneNumberInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): PhoneNumberPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new PhoneNumberPage($this->version, $response, $this->solution);
}
@@ -144,9 +161,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of PhoneNumberInstance
+ * @return PhoneNumberPage Page of PhoneNumberInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): PhoneNumberPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -156,15 +173,22 @@ public function getPage($targetUrl)
return new PhoneNumberPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a PhoneNumberContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Proxy\V1\Service\PhoneNumberContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the PhoneNumber resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): PhoneNumberContext
{
- return new PhoneNumberContext($this->version, $this->solution['serviceSid'], $sid);
+ return new PhoneNumberContext(
+ $this->version,
+ $this->solution['serviceSid'],
+ $sid
+ );
}
/**
@@ -172,8 +196,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Proxy.V1.PhoneNumberList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/PhoneNumberOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/PhoneNumberOptions.php
index 1278ce0..c58ff2b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/PhoneNumberOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/PhoneNumberOptions.php
@@ -1,10 +1,16 @@
options['sid'] = $sid;
$this->options['phoneNumber'] = $phoneNumber;
$this->options['isReserved'] = $isReserved;
@@ -55,10 +83,10 @@ public function __construct($sid = Values::NONE, $phoneNumber = Values::NONE, $i
/**
* The SID of a Twilio [IncomingPhoneNumber](https://www.twilio.com/docs/phone-numbers/api/incomingphonenumber-resource) resource that represents the Twilio Number you would like to assign to your Proxy Service.
*
- * @param string $sid The SID of a Twilio IncomingPhoneNumber resource
+ * @param string $sid The SID of a Twilio [IncomingPhoneNumber](https://www.twilio.com/docs/phone-numbers/api/incomingphonenumber-resource) resource that represents the Twilio Number you would like to assign to your Proxy Service.
* @return $this Fluent Builder
*/
- public function setSid($sid)
+ public function setSid(string $sid): self
{
$this->options['sid'] = $sid;
return $this;
@@ -67,10 +95,10 @@ public function setSid($sid)
/**
* The phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format. E.164 phone numbers consist of a + followed by the country code and subscriber number without punctuation characters. For example, +14155551234.
*
- * @param string $phoneNumber The phone number in E.164 format
+ * @param string $phoneNumber The phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format. E.164 phone numbers consist of a + followed by the country code and subscriber number without punctuation characters. For example, +14155551234.
* @return $this Fluent Builder
*/
- public function setPhoneNumber($phoneNumber)
+ public function setPhoneNumber(string $phoneNumber): self
{
$this->options['phoneNumber'] = $phoneNumber;
return $this;
@@ -79,10 +107,10 @@ public function setPhoneNumber($phoneNumber)
/**
* Whether the new phone number should be reserved and not be assigned to a participant using proxy pool logic. See [Reserved Phone Numbers](https://www.twilio.com/docs/proxy/reserved-phone-numbers) for more information.
*
- * @param bool $isReserved Whether the new phone number should be reserved
+ * @param bool $isReserved Whether the new phone number should be reserved and not be assigned to a participant using proxy pool logic. See [Reserved Phone Numbers](https://www.twilio.com/docs/proxy/reserved-phone-numbers) for more information.
* @return $this Fluent Builder
*/
- public function setIsReserved($isReserved)
+ public function setIsReserved(bool $isReserved): self
{
$this->options['isReserved'] = $isReserved;
return $this;
@@ -93,35 +121,36 @@ public function setIsReserved($isReserved)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Proxy.V1.CreatePhoneNumberOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Proxy.V1.CreatePhoneNumberOptions ' . $options . ']';
}
}
+
+
+
class UpdatePhoneNumberOptions extends Options
-{
+ {
/**
- * @param bool $isReserved Whether the new phone number should be reserved
+ * @param bool $isReserved Whether the phone number should be reserved and not be assigned to a participant using proxy pool logic. See [Reserved Phone Numbers](https://www.twilio.com/docs/proxy/reserved-phone-numbers) for more information.
*/
- public function __construct($isReserved = Values::NONE)
- {
+ public function __construct(
+
+ bool $isReserved = Values::BOOL_NONE
+
+ ) {
$this->options['isReserved'] = $isReserved;
}
/**
* Whether the phone number should be reserved and not be assigned to a participant using proxy pool logic. See [Reserved Phone Numbers](https://www.twilio.com/docs/proxy/reserved-phone-numbers) for more information.
*
- * @param bool $isReserved Whether the new phone number should be reserved
+ * @param bool $isReserved Whether the phone number should be reserved and not be assigned to a participant using proxy pool logic. See [Reserved Phone Numbers](https://www.twilio.com/docs/proxy/reserved-phone-numbers) for more information.
* @return $this Fluent Builder
*/
- public function setIsReserved($isReserved)
+ public function setIsReserved(bool $isReserved): self
{
$this->options['isReserved'] = $isReserved;
return $this;
@@ -132,14 +161,10 @@ public function setIsReserved($isReserved)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Proxy.V1.UpdatePhoneNumberOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Proxy.V1.UpdatePhoneNumberOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/PhoneNumberPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/PhoneNumberPage.php
index a85f606..9a5e549 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/PhoneNumberPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/PhoneNumberPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return PhoneNumberInstance \Twilio\Rest\Proxy\V1\Service\PhoneNumberInstance
+ */
+ public function buildInstance(array $payload): PhoneNumberInstance
{
return new PhoneNumberInstance($this->version, $payload, $this->solution['serviceSid']);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Proxy.V1.PhoneNumberPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/InteractionContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/InteractionContext.php
index 152c6cb..05798e9 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/InteractionContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/InteractionContext.php
@@ -2,59 +2,86 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Proxy
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Proxy\V1\Service\Session;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
class InteractionContext extends InstanceContext
-{
+ {
/**
* Initialize the InteractionContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the parent Service of the resource to
- * fetch
- * @param string $sessionSid he SID of the parent Session of the resource to
- * fetch
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Proxy\V1\Service\Session\InteractionContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the resource to delete.
+ * @param string $sessionSid The SID of the parent [Session](https://www.twilio.com/docs/proxy/api/session) of the resource to delete.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Interaction resource to delete.
*/
- public function __construct(Version $version, $serviceSid, $sessionSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $sessionSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'sessionSid' => $sessionSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'sessionSid' =>
+ $sessionSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Sessions/' . \rawurlencode($sessionSid)
+ .'/Interactions/' . \rawurlencode($sid)
+ .'';
+ }
+
+ /**
+ * Delete the InteractionInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Sessions/' . \rawurlencode($sessionSid) . '/Interactions/' . \rawurlencode($sid) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a InteractionInstance
+ * Fetch the InteractionInstance
*
* @return InteractionInstance Fetched InteractionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): InteractionInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new InteractionInstance(
$this->version,
@@ -65,28 +92,18 @@ public function fetch()
);
}
- /**
- * Deletes the InteractionInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Proxy.V1.InteractionContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/InteractionInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/InteractionInstance.php
index fa1c61f..cbc3a3e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/InteractionInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/InteractionInstance.php
@@ -2,60 +2,66 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Proxy
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Proxy\V1\Service\Session;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property string $sid
- * @property string $sessionSid
- * @property string $serviceSid
- * @property string $accountSid
- * @property string $data
+ * @property string|null $sid
+ * @property string|null $sessionSid
+ * @property string|null $serviceSid
+ * @property string|null $accountSid
+ * @property string|null $data
* @property string $type
- * @property string $inboundParticipantSid
- * @property string $inboundResourceSid
+ * @property string|null $inboundParticipantSid
+ * @property string|null $inboundResourceSid
* @property string $inboundResourceStatus
- * @property string $inboundResourceType
- * @property string $inboundResourceUrl
- * @property string $outboundParticipantSid
- * @property string $outboundResourceSid
+ * @property string|null $inboundResourceType
+ * @property string|null $inboundResourceUrl
+ * @property string|null $outboundParticipantSid
+ * @property string|null $outboundResourceSid
* @property string $outboundResourceStatus
- * @property string $outboundResourceType
- * @property string $outboundResourceUrl
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
+ * @property string|null $outboundResourceType
+ * @property string|null $outboundResourceUrl
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
*/
class InteractionInstance extends InstanceResource
{
/**
* Initialize the InteractionInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the resource's parent Service
- * @param string $sessionSid The SID of the resource's parent Session
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Proxy\V1\Service\Session\InteractionInstance
+ * @param string $serviceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the resource to delete.
+ * @param string $sessionSid The SID of the parent [Session](https://www.twilio.com/docs/proxy/api/session) of the resource to delete.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Interaction resource to delete.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $sessionSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $sessionSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'sessionSid' => Values::array_get($payload, 'session_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
@@ -75,24 +81,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $sess
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'sessionSid' => $sessionSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['serviceSid' => $serviceSid, 'sessionSid' => $sessionSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Proxy\V1\Service\Session\InteractionContext Context for
- * this
- * InteractionInstance
+ * @return InteractionContext Context for this InteractionInstance
*/
- protected function proxy()
+ protected function proxy(): InteractionContext
{
if (!$this->context) {
$this->context = new InteractionContext(
@@ -107,25 +107,27 @@ protected function proxy()
}
/**
- * Fetch a InteractionInstance
+ * Delete the InteractionInstance
*
- * @return InteractionInstance Fetched InteractionInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the InteractionInstance
+ * Fetch the InteractionInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return InteractionInstance Fetched InteractionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): InteractionInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -135,7 +137,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -154,12 +156,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Proxy.V1.InteractionInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/InteractionList.php b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/InteractionList.php
index a2b3425..80f1677 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/InteractionList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/InteractionList.php
@@ -2,38 +2,75 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Proxy
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Proxy\V1\Service\Session;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
+
class InteractionList extends ListResource
-{
+ {
/**
* Construct the InteractionList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the resource's parent Service
- * @param string $sessionSid The SID of the resource's parent Session
- * @return \Twilio\Rest\Proxy\V1\Service\Session\InteractionList
+ * @param string $serviceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) of the resource to delete.
+ * @param string $sessionSid The SID of the parent [Session](https://www.twilio.com/docs/proxy/api/session) of the resource to delete.
*/
- public function __construct(Version $version, $serviceSid, $sessionSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid,
+ string $sessionSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'sessionSid' => $sessionSid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ 'sessionSid' =>
+ $sessionSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Sessions/' . \rawurlencode($sessionSid)
+ .'/Interactions';
+ }
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Sessions/' . \rawurlencode($sessionSid) . '/Interactions';
+ /**
+ * Reads InteractionInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return InteractionInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -52,9 +89,9 @@ public function __construct(Version $version, $serviceSid, $sessionSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -63,26 +100,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads InteractionInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return InteractionInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of InteractionInstance records from the API.
* Request is executed immediately
@@ -90,21 +107,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of InteractionInstance
+ * @return InteractionPage Page of InteractionInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): InteractionPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new InteractionPage($this->version, $response, $this->solution);
}
@@ -114,9 +132,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of InteractionInstance
+ * @return InteractionPage Page of InteractionInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): InteractionPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -126,13 +144,16 @@ public function getPage($targetUrl)
return new InteractionPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a InteractionContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Proxy\V1\Service\Session\InteractionContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the Interaction resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): InteractionContext
{
return new InteractionContext(
$this->version,
@@ -147,8 +168,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Proxy.V1.InteractionList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/InteractionPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/InteractionPage.php
index 42ae2ef..8b093fa 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/InteractionPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/InteractionPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return InteractionInstance \Twilio\Rest\Proxy\V1\Service\Session\InteractionInstance
+ */
+ public function buildInstance(array $payload): InteractionInstance
{
- return new InteractionInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['sessionSid']
- );
+ return new InteractionInstance($this->version, $payload, $this->solution['serviceSid'], $this->solution['sessionSid']);
}
/**
@@ -39,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Proxy.V1.InteractionPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/Participant/MessageInteractionContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/Participant/MessageInteractionContext.php
index befce0b..b12e479 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/Participant/MessageInteractionContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/Participant/MessageInteractionContext.php
@@ -2,63 +2,77 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Proxy
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Proxy\V1\Service\Session\Participant;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
class MessageInteractionContext extends InstanceContext
-{
+ {
/**
* Initialize the MessageInteractionContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the resource from
- * @param string $sessionSid The SID of the parent Session
- * @param string $participantSid The SID of the Participant resource
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Proxy\V1\Service\Session\Participant\MessageInteractionContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) resource.
+ * @param string $sessionSid The SID of the parent [Session](https://www.twilio.com/docs/proxy/api/session) resource.
+ * @param string $participantSid The SID of the [Participant](https://www.twilio.com/docs/proxy/api/participant) resource.
+ * @param string $sid The Twilio-provided string that uniquely identifies the MessageInteraction resource to fetch.
*/
- public function __construct(Version $version, $serviceSid, $sessionSid, $participantSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $sessionSid,
+ $participantSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'sessionSid' => $sessionSid,
- 'participantSid' => $participantSid,
- 'sid' => $sid,
- );
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'sessionSid' =>
+ $sessionSid,
+ 'participantSid' =>
+ $participantSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Sessions/' . \rawurlencode($sessionSid) . '/Participants/' . \rawurlencode($participantSid) . '/MessageInteractions/' . \rawurlencode($sid) . '';
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Sessions/' . \rawurlencode($sessionSid)
+ .'/Participants/' . \rawurlencode($participantSid)
+ .'/MessageInteractions/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a MessageInteractionInstance
+ * Fetch the MessageInteractionInstance
*
* @return MessageInteractionInstance Fetched MessageInteractionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): MessageInteractionInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new MessageInteractionInstance(
$this->version,
@@ -70,17 +84,18 @@ public function fetch()
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Proxy.V1.MessageInteractionContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/Participant/MessageInteractionInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/Participant/MessageInteractionInstance.php
index 557e13c..aee7ce5 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/Participant/MessageInteractionInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/Participant/MessageInteractionInstance.php
@@ -2,62 +2,68 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Proxy
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Proxy\V1\Service\Session\Participant;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property string $sid
- * @property string $sessionSid
- * @property string $serviceSid
- * @property string $accountSid
- * @property string $data
+ * @property string|null $sid
+ * @property string|null $sessionSid
+ * @property string|null $serviceSid
+ * @property string|null $accountSid
+ * @property string|null $data
* @property string $type
- * @property string $participantSid
- * @property string $inboundParticipantSid
- * @property string $inboundResourceSid
+ * @property string|null $participantSid
+ * @property string|null $inboundParticipantSid
+ * @property string|null $inboundResourceSid
* @property string $inboundResourceStatus
- * @property string $inboundResourceType
- * @property string $inboundResourceUrl
- * @property string $outboundParticipantSid
- * @property string $outboundResourceSid
+ * @property string|null $inboundResourceType
+ * @property string|null $inboundResourceUrl
+ * @property string|null $outboundParticipantSid
+ * @property string|null $outboundResourceSid
* @property string $outboundResourceStatus
- * @property string $outboundResourceType
- * @property string $outboundResourceUrl
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
+ * @property string|null $outboundResourceType
+ * @property string|null $outboundResourceUrl
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
*/
class MessageInteractionInstance extends InstanceResource
{
/**
* Initialize the MessageInteractionInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the resource's parent Service
- * @param string $sessionSid The SID of the resource's parent Session
- * @param string $participantSid The SID of the Participant resource
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Proxy\V1\Service\Session\Participant\MessageInteractionInstance
+ * @param string $serviceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) resource.
+ * @param string $sessionSid The SID of the parent [Session](https://www.twilio.com/docs/proxy/api/session) resource.
+ * @param string $participantSid The SID of the [Participant](https://www.twilio.com/docs/proxy/api/participant) resource.
+ * @param string $sid The Twilio-provided string that uniquely identifies the MessageInteraction resource to fetch.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $sessionSid, $participantSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $sessionSid, string $participantSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'sessionSid' => Values::array_get($payload, 'session_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
@@ -78,24 +84,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $sess
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
- );
-
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'sessionSid' => $sessionSid,
- 'participantSid' => $participantSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ ];
+
+ $this->solution = ['serviceSid' => $serviceSid, 'sessionSid' => $sessionSid, 'participantSid' => $participantSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Proxy\V1\Service\Session\Participant\MessageInteractionContext Context for this
- * MessageInteractionInstance
+ * @return MessageInteractionContext Context for this MessageInteractionInstance
*/
- protected function proxy()
+ protected function proxy(): MessageInteractionContext
{
if (!$this->context) {
$this->context = new MessageInteractionContext(
@@ -111,13 +111,14 @@ protected function proxy()
}
/**
- * Fetch a MessageInteractionInstance
+ * Fetch the MessageInteractionInstance
*
* @return MessageInteractionInstance Fetched MessageInteractionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): MessageInteractionInstance
{
+
return $this->proxy()->fetch();
}
@@ -128,7 +129,7 @@ public function fetch()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -147,12 +148,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Proxy.V1.MessageInteractionInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/Participant/MessageInteractionList.php b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/Participant/MessageInteractionList.php
index 7f1cd77..16ae522 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/Participant/MessageInteractionList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/Participant/MessageInteractionList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Proxy
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Proxy\V1\Service\Session\Participant;
@@ -12,62 +19,70 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
class MessageInteractionList extends ListResource
-{
+ {
/**
* Construct the MessageInteractionList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the resource's parent Service
- * @param string $sessionSid The SID of the resource's parent Session
- * @param string $participantSid The SID of the Participant resource
- * @return \Twilio\Rest\Proxy\V1\Service\Session\Participant\MessageInteractionList
+ * @param string $serviceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) resource.
+ * @param string $sessionSid The SID of the parent [Session](https://www.twilio.com/docs/proxy/api/session) resource.
+ * @param string $participantSid The SID of the [Participant](https://www.twilio.com/docs/proxy/api/participant) resource.
*/
- public function __construct(Version $version, $serviceSid, $sessionSid, $participantSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid,
+ string $sessionSid,
+ string $participantSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'sessionSid' => $sessionSid,
- 'participantSid' => $participantSid,
- );
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Sessions/' . \rawurlencode($sessionSid) . '/Participants/' . \rawurlencode($participantSid) . '/MessageInteractions';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ 'sessionSid' =>
+ $sessionSid,
+
+ 'participantSid' =>
+ $participantSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Sessions/' . \rawurlencode($sessionSid)
+ .'/Participants/' . \rawurlencode($participantSid)
+ .'/MessageInteractions';
}
/**
- * Create a new MessageInteractionInstance
+ * Create the MessageInteractionInstance
*
* @param array|Options $options Optional Arguments
- * @return MessageInteractionInstance Newly created MessageInteractionInstance
+ * @return MessageInteractionInstance Created MessageInteractionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($options = array())
+ public function create(array $options = []): MessageInteractionInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'Body' => $options['body'],
- 'MediaUrl' => Serialize::map($options['mediaUrl'], function ($e) {
- return $e;
- }),
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'Body' =>
+ $options['body'],
+ 'MediaUrl' =>
+ Serialize::map($options['mediaUrl'], function ($e) { return $e; }),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
return new MessageInteractionInstance(
$this->version,
@@ -78,52 +93,52 @@ public function create($options = array())
);
}
+
/**
- * Streams MessageInteractionInstance records from the API as a generator
- * stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Reads MessageInteractionInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
*
- * @param int $limit Upper limit for the number of records to return. stream()
+ * @param int $limit Upper limit for the number of records to return. read()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
+ * page_size is defined but a limit is defined, read()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return MessageInteractionInstance[] Array of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function read(int $limit = null, $pageSize = null): array
{
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
- * Reads MessageInteractionInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
+ * Streams MessageInteractionInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
*
- * @param int $limit Upper limit for the number of records to return. read()
+ * @param int $limit Upper limit for the number of records to return. stream()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
+ * page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return MessageInteractionInstance[] Array of results
+ * @return Stream stream of results
*/
- public function read($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
- return \iterator_to_array($this->stream($limit, $pageSize), false);
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
/**
@@ -133,21 +148,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of MessageInteractionInstance
+ * @return MessageInteractionPage Page of MessageInteractionInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): MessageInteractionPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new MessageInteractionPage($this->version, $response, $this->solution);
}
@@ -157,9 +173,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of MessageInteractionInstance
+ * @return MessageInteractionPage Page of MessageInteractionInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): MessageInteractionPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -169,13 +185,16 @@ public function getPage($targetUrl)
return new MessageInteractionPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a MessageInteractionContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Proxy\V1\Service\Session\Participant\MessageInteractionContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the MessageInteraction resource to fetch.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): MessageInteractionContext
{
return new MessageInteractionContext(
$this->version,
@@ -191,8 +210,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Proxy.V1.MessageInteractionList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/Participant/MessageInteractionOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/Participant/MessageInteractionOptions.php
index 7b94613..35d817a 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/Participant/MessageInteractionOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/Participant/MessageInteractionOptions.php
@@ -1,10 +1,16 @@
options['body'] = $body;
$this->options['mediaUrl'] = $mediaUrl;
}
@@ -43,10 +61,10 @@ public function __construct($body = Values::NONE, $mediaUrl = Values::NONE)
/**
* The message to send to the participant
*
- * @param string $body Message body
+ * @param string $body The message to send to the participant
* @return $this Fluent Builder
*/
- public function setBody($body)
+ public function setBody(string $body): self
{
$this->options['body'] = $body;
return $this;
@@ -55,10 +73,10 @@ public function setBody($body)
/**
* Reserved. Not currently supported.
*
- * @param string $mediaUrl Reserved
+ * @param string[] $mediaUrl Reserved. Not currently supported.
* @return $this Fluent Builder
*/
- public function setMediaUrl($mediaUrl)
+ public function setMediaUrl(array $mediaUrl): self
{
$this->options['mediaUrl'] = $mediaUrl;
return $this;
@@ -69,14 +87,12 @@ public function setMediaUrl($mediaUrl)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Proxy.V1.CreateMessageInteractionOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Proxy.V1.CreateMessageInteractionOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
+
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/Participant/MessageInteractionPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/Participant/MessageInteractionPage.php
index 3bf0d97..d3be5f6 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/Participant/MessageInteractionPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/Participant/MessageInteractionPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return MessageInteractionInstance \Twilio\Rest\Proxy\V1\Service\Session\Participant\MessageInteractionInstance
+ */
+ public function buildInstance(array $payload): MessageInteractionInstance
{
- return new MessageInteractionInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['sessionSid'],
- $this->solution['participantSid']
- );
+ return new MessageInteractionInstance($this->version, $payload, $this->solution['serviceSid'], $this->solution['sessionSid'], $this->solution['participantSid']);
}
/**
@@ -40,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Proxy.V1.MessageInteractionPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/ParticipantContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/ParticipantContext.php
index 9e40c55..205e912 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/ParticipantContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/ParticipantContext.php
@@ -2,65 +2,94 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Proxy
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Proxy\V1\Service\Session;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
-use Twilio\Rest\Proxy\V1\Service\Session\Participant\MessageInteractionList;
+use Twilio\ListResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Proxy\V1\Service\Session\Participant\MessageInteractionList;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property \Twilio\Rest\Proxy\V1\Service\Session\Participant\MessageInteractionList $messageInteractions
+ * @property MessageInteractionList $messageInteractions
* @method \Twilio\Rest\Proxy\V1\Service\Session\Participant\MessageInteractionContext messageInteractions(string $sid)
*/
class ParticipantContext extends InstanceContext
-{
- protected $_messageInteractions = null;
+ {
+ protected $_messageInteractions;
/**
* Initialize the ParticipantContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the parent Service of the resource to
- * fetch
- * @param string $sessionSid The SID of the parent Session of the resource to
- * fetch
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Proxy\V1\Service\Session\ParticipantContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) resource.
+ * @param string $sessionSid The SID of the parent [Session](https://www.twilio.com/docs/proxy/api/session) resource.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Participant resource to delete.
*/
- public function __construct(Version $version, $serviceSid, $sessionSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $sessionSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'sessionSid' => $sessionSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'sessionSid' =>
+ $sessionSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Sessions/' . \rawurlencode($sessionSid)
+ .'/Participants/' . \rawurlencode($sid)
+ .'';
+ }
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Sessions/' . \rawurlencode($sessionSid) . '/Participants/' . \rawurlencode($sid) . '';
+ /**
+ * Delete the ParticipantInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a ParticipantInstance
+ * Fetch the ParticipantInstance
*
* @return ParticipantInstance Fetched ParticipantInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): ParticipantInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new ParticipantInstance(
$this->version,
@@ -71,23 +100,11 @@ public function fetch()
);
}
- /**
- * Deletes the ParticipantInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Access the messageInteractions
- *
- * @return \Twilio\Rest\Proxy\V1\Service\Session\Participant\MessageInteractionList
*/
- protected function getMessageInteractions()
+ protected function getMessageInteractions(): MessageInteractionList
{
if (!$this->_messageInteractions) {
$this->_messageInteractions = new MessageInteractionList(
@@ -105,10 +122,10 @@ protected function getMessageInteractions()
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -123,10 +140,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -141,12 +158,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Proxy.V1.ParticipantContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/ParticipantInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/ParticipantInstance.php
index 670be20..09433ea 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/ParticipantInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/ParticipantInstance.php
@@ -2,56 +2,63 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Proxy
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Proxy\V1\Service\Session;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Proxy\V1\Service\Session\Participant\MessageInteractionList;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property string $sid
- * @property string $sessionSid
- * @property string $serviceSid
- * @property string $accountSid
- * @property string $friendlyName
- * @property string $identifier
- * @property string $proxyIdentifier
- * @property string $proxyIdentifierSid
- * @property \DateTime $dateDeleted
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
- * @property array $links
+ * @property string|null $sid
+ * @property string|null $sessionSid
+ * @property string|null $serviceSid
+ * @property string|null $accountSid
+ * @property string|null $friendlyName
+ * @property string|null $identifier
+ * @property string|null $proxyIdentifier
+ * @property string|null $proxyIdentifierSid
+ * @property \DateTime|null $dateDeleted
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
+ * @property array|null $links
*/
class ParticipantInstance extends InstanceResource
{
- protected $_messageInteractions = null;
+ protected $_messageInteractions;
/**
* Initialize the ParticipantInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the resource's parent Service
- * @param string $sessionSid The SID of the resource's parent Session
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Proxy\V1\Service\Session\ParticipantInstance
+ * @param string $serviceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) resource.
+ * @param string $sessionSid The SID of the parent [Session](https://www.twilio.com/docs/proxy/api/session) resource.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Participant resource to delete.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $sessionSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $sessionSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'sessionSid' => Values::array_get($payload, 'session_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
@@ -65,24 +72,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $sess
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'sessionSid' => $sessionSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['serviceSid' => $serviceSid, 'sessionSid' => $sessionSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Proxy\V1\Service\Session\ParticipantContext Context for
- * this
- * ParticipantInstance
+ * @return ParticipantContext Context for this ParticipantInstance
*/
- protected function proxy()
+ protected function proxy(): ParticipantContext
{
if (!$this->context) {
$this->context = new ParticipantContext(
@@ -97,33 +98,33 @@ protected function proxy()
}
/**
- * Fetch a ParticipantInstance
+ * Delete the ParticipantInstance
*
- * @return ParticipantInstance Fetched ParticipantInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the ParticipantInstance
+ * Fetch the ParticipantInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return ParticipantInstance Fetched ParticipantInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): ParticipantInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
* Access the messageInteractions
- *
- * @return \Twilio\Rest\Proxy\V1\Service\Session\Participant\MessageInteractionList
*/
- protected function getMessageInteractions()
+ protected function getMessageInteractions(): MessageInteractionList
{
return $this->proxy()->messageInteractions;
}
@@ -135,7 +136,7 @@ protected function getMessageInteractions()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -154,12 +155,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Proxy.V1.ParticipantInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/ParticipantList.php b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/ParticipantList.php
index 0817160..906f9d2 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/ParticipantList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/ParticipantList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Proxy
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Proxy\V1\Service\Session;
@@ -12,59 +19,78 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
+
class ParticipantList extends ListResource
-{
+ {
/**
* Construct the ParticipantList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the resource's parent Service
- * @param string $sessionSid The SID of the resource's parent Session
- * @return \Twilio\Rest\Proxy\V1\Service\Session\ParticipantList
+ * @param string $serviceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) resource.
+ * @param string $sessionSid The SID of the parent [Session](https://www.twilio.com/docs/proxy/api/session) resource.
*/
- public function __construct(Version $version, $serviceSid, $sessionSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid,
+ string $sessionSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'sessionSid' => $sessionSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Sessions/' . \rawurlencode($sessionSid) . '/Participants';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ 'sessionSid' =>
+ $sessionSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Sessions/' . \rawurlencode($sessionSid)
+ .'/Participants';
}
/**
- * Streams ParticipantInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the ParticipantInstance
*
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @param string $identifier The phone number of the Participant.
+ * @param array|Options $options Optional Arguments
+ * @return ParticipantInstance Created ParticipantInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($limit = null, $pageSize = null)
+ public function create(string $identifier, array $options = []): ParticipantInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'Identifier' =>
+ $identifier,
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'ProxyIdentifier' =>
+ $options['proxyIdentifier'],
+ 'ProxyIdentifierSid' =>
+ $options['proxyIdentifierSid'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new ParticipantInstance(
+ $this->version,
+ $payload,
+ $this->solution['serviceSid'],
+ $this->solution['sessionSid']
+ );
}
+
/**
* Reads ParticipantInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -80,11 +106,38 @@ public function stream($limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return ParticipantInstance[] Array of results
*/
- public function read($limit = null, $pageSize = null)
+ public function read(int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($limit, $pageSize), false);
}
+ /**
+ * Streams ParticipantInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of ParticipantInstance records from the API.
* Request is executed immediately
@@ -92,21 +145,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of ParticipantInstance
+ * @return ParticipantPage Page of ParticipantInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): ParticipantPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new ParticipantPage($this->version, $response, $this->solution);
}
@@ -116,9 +170,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of ParticipantInstance
+ * @return ParticipantPage Page of ParticipantInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): ParticipantPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -128,47 +182,16 @@ public function getPage($targetUrl)
return new ParticipantPage($this->version, $response, $this->solution);
}
- /**
- * Create a new ParticipantInstance
- *
- * @param string $identifier The phone number of the Participant
- * @param array|Options $options Optional Arguments
- * @return ParticipantInstance Newly created ParticipantInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($identifier, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'Identifier' => $identifier,
- 'FriendlyName' => $options['friendlyName'],
- 'ProxyIdentifier' => $options['proxyIdentifier'],
- 'ProxyIdentifierSid' => $options['proxyIdentifierSid'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new ParticipantInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['sessionSid']
- );
- }
/**
* Constructs a ParticipantContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Proxy\V1\Service\Session\ParticipantContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the Participant resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): ParticipantContext
{
return new ParticipantContext(
$this->version,
@@ -183,8 +206,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Proxy.V1.ParticipantList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/ParticipantOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/ParticipantOptions.php
index a3073e7..6201afe 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/ParticipantOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/ParticipantOptions.php
@@ -1,10 +1,16 @@
options['friendlyName'] = $friendlyName;
$this->options['proxyIdentifier'] = $proxyIdentifier;
$this->options['proxyIdentifierSid'] = $proxyIdentifierSid;
@@ -50,11 +68,10 @@ public function __construct($friendlyName = Values::NONE, $proxyIdentifier = Val
/**
* The string that you assigned to describe the participant. This value must be 255 characters or fewer. **This value should not have PII.**
*
- * @param string $friendlyName The string that you assigned to describe the
- * participant
+ * @param string $friendlyName The string that you assigned to describe the participant. This value must be 255 characters or fewer. **This value should not have PII.**
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -63,11 +80,10 @@ public function setFriendlyName($friendlyName)
/**
* The proxy phone number to use for the Participant. If not specified, Proxy will select a number from the pool.
*
- * @param string $proxyIdentifier The proxy phone number to use for the
- * Participant
+ * @param string $proxyIdentifier The proxy phone number to use for the Participant. If not specified, Proxy will select a number from the pool.
* @return $this Fluent Builder
*/
- public function setProxyIdentifier($proxyIdentifier)
+ public function setProxyIdentifier(string $proxyIdentifier): self
{
$this->options['proxyIdentifier'] = $proxyIdentifier;
return $this;
@@ -76,10 +92,10 @@ public function setProxyIdentifier($proxyIdentifier)
/**
* The SID of the Proxy Identifier to assign to the Participant.
*
- * @param string $proxyIdentifierSid The Proxy Identifier Sid
+ * @param string $proxyIdentifierSid The SID of the Proxy Identifier to assign to the Participant.
* @return $this Fluent Builder
*/
- public function setProxyIdentifierSid($proxyIdentifierSid)
+ public function setProxyIdentifierSid(string $proxyIdentifierSid): self
{
$this->options['proxyIdentifierSid'] = $proxyIdentifierSid;
return $this;
@@ -90,14 +106,13 @@ public function setProxyIdentifierSid($proxyIdentifierSid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Proxy.V1.CreateParticipantOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Proxy.V1.CreateParticipantOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
+
+
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/ParticipantPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/ParticipantPage.php
index 3b5cdf3..e25e916 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/ParticipantPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/Session/ParticipantPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return ParticipantInstance \Twilio\Rest\Proxy\V1\Service\Session\ParticipantInstance
+ */
+ public function buildInstance(array $payload): ParticipantInstance
{
- return new ParticipantInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['sessionSid']
- );
+ return new ParticipantInstance($this->version, $payload, $this->solution['serviceSid'], $this->solution['sessionSid']);
}
/**
@@ -39,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Proxy.V1.ParticipantPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/SessionContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/SessionContext.php
index 55ec77c..f28d8b4 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/SessionContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/SessionContext.php
@@ -2,68 +2,95 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Proxy
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Proxy\V1\Service;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Proxy\V1\Service\Session\InteractionList;
-use Twilio\Rest\Proxy\V1\Service\Session\ParticipantList;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+use Twilio\Rest\Proxy\V1\Service\Session\ParticipantList;
+use Twilio\Rest\Proxy\V1\Service\Session\InteractionList;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property \Twilio\Rest\Proxy\V1\Service\Session\InteractionList $interactions
- * @property \Twilio\Rest\Proxy\V1\Service\Session\ParticipantList $participants
+ * @property ParticipantList $participants
+ * @property InteractionList $interactions
* @method \Twilio\Rest\Proxy\V1\Service\Session\InteractionContext interactions(string $sid)
* @method \Twilio\Rest\Proxy\V1\Service\Session\ParticipantContext participants(string $sid)
*/
class SessionContext extends InstanceContext
-{
- protected $_interactions = null;
- protected $_participants = null;
+ {
+ protected $_participants;
+ protected $_interactions;
/**
* Initialize the SessionContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the resource from
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Proxy\V1\Service\SessionContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) resource.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Session resource to delete.
*/
- public function __construct(Version $version, $serviceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Sessions/' . \rawurlencode($sid)
+ .'';
+ }
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Sessions/' . \rawurlencode($sid) . '';
+ /**
+ * Delete the SessionInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a SessionInstance
+ * Fetch the SessionInstance
*
* @return SessionInstance Fetched SessionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): SessionInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new SessionInstance(
$this->version,
@@ -73,16 +100,6 @@ public function fetch()
);
}
- /**
- * Deletes the SessionInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Update the SessionInstance
@@ -91,22 +108,22 @@ public function delete()
* @return SessionInstance Updated SessionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): SessionInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'DateExpiry' => Serialize::iso8601DateTime($options['dateExpiry']),
- 'Ttl' => $options['ttl'],
- 'Status' => $options['status'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'DateExpiry' =>
+ Serialize::iso8601DateTime($options['dateExpiry']),
+ 'Ttl' =>
+ $options['ttl'],
+ 'Status' =>
+ $options['status'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new SessionInstance(
$this->version,
@@ -116,50 +133,47 @@ public function update($options = array())
);
}
+
/**
- * Access the interactions
- *
- * @return \Twilio\Rest\Proxy\V1\Service\Session\InteractionList
+ * Access the participants
*/
- protected function getInteractions()
+ protected function getParticipants(): ParticipantList
{
- if (!$this->_interactions) {
- $this->_interactions = new InteractionList(
+ if (!$this->_participants) {
+ $this->_participants = new ParticipantList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sid']
);
}
- return $this->_interactions;
+ return $this->_participants;
}
/**
- * Access the participants
- *
- * @return \Twilio\Rest\Proxy\V1\Service\Session\ParticipantList
+ * Access the interactions
*/
- protected function getParticipants()
+ protected function getInteractions(): InteractionList
{
- if (!$this->_participants) {
- $this->_participants = new ParticipantList(
+ if (!$this->_interactions) {
+ $this->_interactions = new InteractionList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sid']
);
}
- return $this->_participants;
+ return $this->_interactions;
}
/**
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -174,10 +188,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -192,12 +206,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Proxy.V1.SessionContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/SessionInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/SessionInstance.php
index 4b53478..15b0ff2 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/SessionInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/SessionInstance.php
@@ -2,60 +2,68 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Proxy
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Proxy\V1\Service;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Proxy\V1\Service\Session\ParticipantList;
+use Twilio\Rest\Proxy\V1\Service\Session\InteractionList;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property string $sid
- * @property string $serviceSid
- * @property string $accountSid
- * @property \DateTime $dateStarted
- * @property \DateTime $dateEnded
- * @property \DateTime $dateLastInteraction
- * @property \DateTime $dateExpiry
- * @property string $uniqueName
+ * @property string|null $sid
+ * @property string|null $serviceSid
+ * @property string|null $accountSid
+ * @property \DateTime|null $dateStarted
+ * @property \DateTime|null $dateEnded
+ * @property \DateTime|null $dateLastInteraction
+ * @property \DateTime|null $dateExpiry
+ * @property string|null $uniqueName
* @property string $status
- * @property string $closedReason
+ * @property string|null $closedReason
* @property int $ttl
* @property string $mode
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
- * @property array $links
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
+ * @property array|null $links
*/
class SessionInstance extends InstanceResource
{
- protected $_interactions = null;
- protected $_participants = null;
+ protected $_participants;
+ protected $_interactions;
/**
* Initialize the SessionInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the resource's parent Service
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Proxy\V1\Service\SessionInstance
+ * @param string $serviceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) resource.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Session resource to delete.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
@@ -72,19 +80,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $sid
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Proxy\V1\Service\SessionContext Context for this
- * SessionInstance
+ * @return SessionContext Context for this SessionInstance
*/
- protected function proxy()
+ protected function proxy(): SessionContext
{
if (!$this->context) {
$this->context = new SessionContext(
@@ -98,25 +105,27 @@ protected function proxy()
}
/**
- * Fetch a SessionInstance
+ * Delete the SessionInstance
*
- * @return SessionInstance Fetched SessionInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the SessionInstance
+ * Fetch the SessionInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return SessionInstance Fetched SessionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): SessionInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -126,29 +135,26 @@ public function delete()
* @return SessionInstance Updated SessionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): SessionInstance
{
+
return $this->proxy()->update($options);
}
/**
- * Access the interactions
- *
- * @return \Twilio\Rest\Proxy\V1\Service\Session\InteractionList
+ * Access the participants
*/
- protected function getInteractions()
+ protected function getParticipants(): ParticipantList
{
- return $this->proxy()->interactions;
+ return $this->proxy()->participants;
}
/**
- * Access the participants
- *
- * @return \Twilio\Rest\Proxy\V1\Service\Session\ParticipantList
+ * Access the interactions
*/
- protected function getParticipants()
+ protected function getInteractions(): InteractionList
{
- return $this->proxy()->participants;
+ return $this->proxy()->interactions;
}
/**
@@ -158,7 +164,7 @@ protected function getParticipants()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -177,12 +183,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Proxy.V1.SessionInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/SessionList.php b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/SessionList.php
index 849c778..3284ae3 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/SessionList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/SessionList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Proxy
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Proxy\V1\Service;
@@ -12,59 +19,75 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
class SessionList extends ListResource
-{
+ {
/**
* Construct the SessionList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the resource's parent Service
- * @return \Twilio\Rest\Proxy\V1\Service\SessionList
+ * @param string $serviceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) resource.
*/
- public function __construct(Version $version, $serviceSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Sessions';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Sessions';
}
/**
- * Streams SessionInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the SessionInstance
*
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @param array|Options $options Optional Arguments
+ * @return SessionInstance Created SessionInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($limit = null, $pageSize = null)
+ public function create(array $options = []): SessionInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'UniqueName' =>
+ $options['uniqueName'],
+ 'DateExpiry' =>
+ Serialize::iso8601DateTime($options['dateExpiry']),
+ 'Ttl' =>
+ $options['ttl'],
+ 'Mode' =>
+ $options['mode'],
+ 'Status' =>
+ $options['status'],
+ 'Participants' =>
+ Serialize::map($options['participants'], function ($e) { return Serialize::jsonObject($e); }),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new SessionInstance(
+ $this->version,
+ $payload,
+ $this->solution['serviceSid']
+ );
}
+
/**
* Reads SessionInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -80,11 +103,38 @@ public function stream($limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return SessionInstance[] Array of results
*/
- public function read($limit = null, $pageSize = null)
+ public function read(int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($limit, $pageSize), false);
}
+ /**
+ * Streams SessionInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of SessionInstance records from the API.
* Request is executed immediately
@@ -92,21 +142,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of SessionInstance
+ * @return SessionPage Page of SessionInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): SessionPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new SessionPage($this->version, $response, $this->solution);
}
@@ -116,9 +167,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of SessionInstance
+ * @return SessionPage Page of SessionInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): SessionPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -128,47 +179,22 @@ public function getPage($targetUrl)
return new SessionPage($this->version, $response, $this->solution);
}
- /**
- * Create a new SessionInstance
- *
- * @param array|Options $options Optional Arguments
- * @return SessionInstance Newly created SessionInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'UniqueName' => $options['uniqueName'],
- 'DateExpiry' => Serialize::iso8601DateTime($options['dateExpiry']),
- 'Ttl' => $options['ttl'],
- 'Mode' => $options['mode'],
- 'Status' => $options['status'],
- 'Participants' => Serialize::map($options['participants'], function ($e) {
- return Serialize::jsonObject($e);
- }),
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new SessionInstance($this->version, $payload, $this->solution['serviceSid']);
- }
/**
* Constructs a SessionContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Proxy\V1\Service\SessionContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the Session resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): SessionContext
{
- return new SessionContext($this->version, $this->solution['serviceSid'], $sid);
+ return new SessionContext(
+ $this->version,
+ $this->solution['serviceSid'],
+ $sid
+ );
}
/**
@@ -176,8 +202,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Proxy.V1.SessionList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/SessionOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/SessionOptions.php
index 26e5350..f19a986 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/SessionOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/SessionOptions.php
@@ -1,10 +1,16 @@
options['uniqueName'] = $uniqueName;
$this->options['dateExpiry'] = $dateExpiry;
$this->options['ttl'] = $ttl;
@@ -70,11 +107,10 @@ public function __construct($uniqueName = Values::NONE, $dateExpiry = Values::NO
/**
* An application-defined string that uniquely identifies the resource. This value must be 191 characters or fewer in length and be unique. **This value should not have PII.**
*
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the resource
+ * @param string $uniqueName An application-defined string that uniquely identifies the resource. This value must be 191 characters or fewer in length and be unique. **This value should not have PII.**
* @return $this Fluent Builder
*/
- public function setUniqueName($uniqueName)
+ public function setUniqueName(string $uniqueName): self
{
$this->options['uniqueName'] = $uniqueName;
return $this;
@@ -83,10 +119,10 @@ public function setUniqueName($uniqueName)
/**
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date when the Session should expire. If this is value is present, it overrides the `ttl` value.
*
- * @param \DateTime $dateExpiry The ISO 8601 date when the Session should expire
+ * @param \DateTime $dateExpiry The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date when the Session should expire. If this is value is present, it overrides the `ttl` value.
* @return $this Fluent Builder
*/
- public function setDateExpiry($dateExpiry)
+ public function setDateExpiry(\DateTime $dateExpiry): self
{
$this->options['dateExpiry'] = $dateExpiry;
return $this;
@@ -95,34 +131,30 @@ public function setDateExpiry($dateExpiry)
/**
* The time, in seconds, when the session will expire. The time is measured from the last Session create or the Session's last Interaction.
*
- * @param int $ttl When the session will expire
+ * @param int $ttl The time, in seconds, when the session will expire. The time is measured from the last Session create or the Session's last Interaction.
* @return $this Fluent Builder
*/
- public function setTtl($ttl)
+ public function setTtl(int $ttl): self
{
$this->options['ttl'] = $ttl;
return $this;
}
/**
- * The Mode of the Session. Can be: `message-only`, `voice-only`, or `voice-and-message` and the default value is `voice-and-message`.
- *
- * @param string $mode The Mode of the Session
+ * @param string $mode
* @return $this Fluent Builder
*/
- public function setMode($mode)
+ public function setMode(string $mode): self
{
$this->options['mode'] = $mode;
return $this;
}
/**
- * The initial status of the Session. Can be: `open`, `in-progress`, `closed`, `failed`, or `unknown`. The default is `open` on create.
- *
- * @param string $status Session status
+ * @param string $status
* @return $this Fluent Builder
*/
- public function setStatus($status)
+ public function setStatus(string $status): self
{
$this->options['status'] = $status;
return $this;
@@ -131,11 +163,10 @@ public function setStatus($status)
/**
* The Participant objects to include in the new session.
*
- * @param array $participants The Participant objects to include in the new
- * session
+ * @param array[] $participants The Participant objects to include in the new session.
* @return $this Fluent Builder
*/
- public function setParticipants($participants)
+ public function setParticipants(array $participants): self
{
$this->options['participants'] = $participants;
return $this;
@@ -146,27 +177,30 @@ public function setParticipants($participants)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Proxy.V1.CreateSessionOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Proxy.V1.CreateSessionOptions ' . $options . ']';
}
}
+
+
+
class UpdateSessionOptions extends Options
-{
+ {
/**
- * @param \DateTime $dateExpiry The ISO 8601 date when the Session should expire
- * @param int $ttl When the session will expire
- * @param string $status The new status of the resource
+ * @param \DateTime $dateExpiry The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date when the Session should expire. If this is value is present, it overrides the `ttl` value.
+ * @param int $ttl The time, in seconds, when the session will expire. The time is measured from the last Session create or the Session's last Interaction.
+ * @param string $status
*/
- public function __construct($dateExpiry = Values::NONE, $ttl = Values::NONE, $status = Values::NONE)
- {
+ public function __construct(
+
+ \DateTime $dateExpiry = null,
+ int $ttl = Values::INT_NONE,
+ string $status = Values::NONE
+
+ ) {
$this->options['dateExpiry'] = $dateExpiry;
$this->options['ttl'] = $ttl;
$this->options['status'] = $status;
@@ -175,10 +209,10 @@ public function __construct($dateExpiry = Values::NONE, $ttl = Values::NONE, $st
/**
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date when the Session should expire. If this is value is present, it overrides the `ttl` value.
*
- * @param \DateTime $dateExpiry The ISO 8601 date when the Session should expire
+ * @param \DateTime $dateExpiry The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date when the Session should expire. If this is value is present, it overrides the `ttl` value.
* @return $this Fluent Builder
*/
- public function setDateExpiry($dateExpiry)
+ public function setDateExpiry(\DateTime $dateExpiry): self
{
$this->options['dateExpiry'] = $dateExpiry;
return $this;
@@ -187,22 +221,20 @@ public function setDateExpiry($dateExpiry)
/**
* The time, in seconds, when the session will expire. The time is measured from the last Session create or the Session's last Interaction.
*
- * @param int $ttl When the session will expire
+ * @param int $ttl The time, in seconds, when the session will expire. The time is measured from the last Session create or the Session's last Interaction.
* @return $this Fluent Builder
*/
- public function setTtl($ttl)
+ public function setTtl(int $ttl): self
{
$this->options['ttl'] = $ttl;
return $this;
}
/**
- * The new status of the resource. Can be: `in-progress` to re-open a session or `closed` to close a session.
- *
- * @param string $status The new status of the resource
+ * @param string $status
* @return $this Fluent Builder
*/
- public function setStatus($status)
+ public function setStatus(string $status): self
{
$this->options['status'] = $status;
return $this;
@@ -213,14 +245,10 @@ public function setStatus($status)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Proxy.V1.UpdateSessionOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Proxy.V1.UpdateSessionOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/SessionPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/SessionPage.php
index d1184ad..413c2e2 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/SessionPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/SessionPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return SessionInstance \Twilio\Rest\Proxy\V1\Service\SessionInstance
+ */
+ public function buildInstance(array $payload): SessionInstance
{
return new SessionInstance($this->version, $payload, $this->solution['serviceSid']);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Proxy.V1.SessionPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/ShortCodeContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/ShortCodeContext.php
index 82b0d65..29120d0 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/ShortCodeContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/ShortCodeContext.php
@@ -2,70 +2,83 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Proxy
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Proxy\V1\Service;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
class ShortCodeContext extends InstanceContext
-{
+ {
/**
* Initialize the ShortCodeContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the parent Service to fetch the
- * resource from
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Proxy\V1\Service\ShortCodeContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) resource.
+ * @param string $sid The Twilio-provided string that uniquely identifies the ShortCode resource to delete.
*/
- public function __construct(Version $version, $serviceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/ShortCodes/' . \rawurlencode($sid) . '';
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/ShortCodes/' . \rawurlencode($sid)
+ .'';
}
/**
- * Deletes the ShortCodeInstance
+ * Delete the ShortCodeInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function delete(): bool
{
- return $this->version->delete('delete', $this->uri);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a ShortCodeInstance
+ * Fetch the ShortCodeInstance
*
* @return ShortCodeInstance Fetched ShortCodeInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): ShortCodeInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new ShortCodeInstance(
$this->version,
@@ -75,6 +88,7 @@ public function fetch()
);
}
+
/**
* Update the ShortCodeInstance
*
@@ -82,18 +96,18 @@ public function fetch()
* @return ShortCodeInstance Updated ShortCodeInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ShortCodeInstance
{
+
$options = new Values($options);
- $data = Values::of(array('IsReserved' => Serialize::booleanToString($options['isReserved']),));
+ $data = Values::of([
+ 'IsReserved' =>
+ Serialize::booleanToString($options['isReserved']),
+ ]);
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new ShortCodeInstance(
$this->version,
@@ -103,17 +117,18 @@ public function update($options = array())
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Proxy.V1.ShortCodeContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/ShortCodeInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/ShortCodeInstance.php
index b2bab88..fa31cc2 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/ShortCodeInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/ShortCodeInstance.php
@@ -2,51 +2,58 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Proxy
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Proxy\V1\Service;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Base\PhoneNumberCapabilities;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property string $sid
- * @property string $accountSid
- * @property string $serviceSid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $shortCode
- * @property string $isoCountry
- * @property string $capabilities
- * @property string $url
- * @property bool $isReserved
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $shortCode
+ * @property string|null $isoCountry
+ * @property PhoneNumberCapabilities|null $capabilities
+ * @property string|null $url
+ * @property bool|null $isReserved
*/
class ShortCodeInstance extends InstanceResource
{
/**
* Initialize the ShortCodeInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the resource's parent Service
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Proxy\V1\Service\ShortCodeInstance
+ * @param string $serviceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) resource.
+ * @param string $sid The Twilio-provided string that uniquely identifies the ShortCode resource to delete.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
@@ -54,22 +61,21 @@ public function __construct(Version $version, array $payload, $serviceSid, $sid
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'shortCode' => Values::array_get($payload, 'short_code'),
'isoCountry' => Values::array_get($payload, 'iso_country'),
- 'capabilities' => Values::array_get($payload, 'capabilities'),
+ 'capabilities' => Deserialize::phoneNumberCapabilities(Values::array_get($payload, 'capabilities')),
'url' => Values::array_get($payload, 'url'),
'isReserved' => Values::array_get($payload, 'is_reserved'),
- );
+ ];
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Proxy\V1\Service\ShortCodeContext Context for this
- * ShortCodeInstance
+ * @return ShortCodeContext Context for this ShortCodeInstance
*/
- protected function proxy()
+ protected function proxy(): ShortCodeContext
{
if (!$this->context) {
$this->context = new ShortCodeContext(
@@ -83,24 +89,26 @@ protected function proxy()
}
/**
- * Deletes the ShortCodeInstance
+ * Delete the ShortCodeInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function delete(): bool
{
+
return $this->proxy()->delete();
}
/**
- * Fetch a ShortCodeInstance
+ * Fetch the ShortCodeInstance
*
* @return ShortCodeInstance Fetched ShortCodeInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): ShortCodeInstance
{
+
return $this->proxy()->fetch();
}
@@ -111,8 +119,9 @@ public function fetch()
* @return ShortCodeInstance Updated ShortCodeInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ShortCodeInstance
{
+
return $this->proxy()->update($options);
}
@@ -123,7 +132,7 @@ public function update($options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -142,12 +151,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Proxy.V1.ShortCodeInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/ShortCodeList.php b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/ShortCodeList.php
index 39b5b32..214b023 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/ShortCodeList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/ShortCodeList.php
@@ -2,59 +2,96 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Proxy
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Proxy\V1\Service;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
+
class ShortCodeList extends ListResource
-{
+ {
/**
* Construct the ShortCodeList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the resource's parent Service
- * @return \Twilio\Rest\Proxy\V1\Service\ShortCodeList
+ * @param string $serviceSid The SID of the parent [Service](https://www.twilio.com/docs/proxy/api/service) resource.
*/
- public function __construct(Version $version, $serviceSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/ShortCodes';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/ShortCodes';
}
/**
- * Create a new ShortCodeInstance
+ * Create the ShortCodeInstance
*
- * @param string $sid The SID of a Twilio ShortCode resource
- * @return ShortCodeInstance Newly created ShortCodeInstance
+ * @param string $sid The SID of a Twilio [ShortCode](https://www.twilio.com/en-us/messaging/channels/sms/short-codes) resource that represents the short code you would like to assign to your Proxy Service.
+ * @return ShortCodeInstance Created ShortCodeInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($sid)
+ public function create(string $sid): ShortCodeInstance
{
- $data = Values::of(array('Sid' => $sid,));
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'Sid' =>
+ $sid,
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new ShortCodeInstance(
+ $this->version,
+ $payload,
+ $this->solution['serviceSid']
);
+ }
+
- return new ShortCodeInstance($this->version, $payload, $this->solution['serviceSid']);
+ /**
+ * Reads ShortCodeInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return ShortCodeInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -73,9 +110,9 @@ public function create($sid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -84,26 +121,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads ShortCodeInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return ShortCodeInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of ShortCodeInstance records from the API.
* Request is executed immediately
@@ -111,21 +128,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of ShortCodeInstance
+ * @return ShortCodePage Page of ShortCodeInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): ShortCodePage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new ShortCodePage($this->version, $response, $this->solution);
}
@@ -135,9 +153,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of ShortCodeInstance
+ * @return ShortCodePage Page of ShortCodeInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): ShortCodePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -147,15 +165,22 @@ public function getPage($targetUrl)
return new ShortCodePage($this->version, $response, $this->solution);
}
+
/**
* Constructs a ShortCodeContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Proxy\V1\Service\ShortCodeContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the ShortCode resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): ShortCodeContext
{
- return new ShortCodeContext($this->version, $this->solution['serviceSid'], $sid);
+ return new ShortCodeContext(
+ $this->version,
+ $this->solution['serviceSid'],
+ $sid
+ );
}
/**
@@ -163,8 +188,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Proxy.V1.ShortCodeList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/ShortCodeOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/ShortCodeOptions.php
index f2ddfb7..9b66909 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/ShortCodeOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/ShortCodeOptions.php
@@ -1,10 +1,16 @@
options['isReserved'] = $isReserved;
}
/**
* Whether the short code should be reserved and not be assigned to a participant using proxy pool logic. See [Reserved Phone Numbers](https://www.twilio.com/docs/proxy/reserved-phone-numbers) for more information.
*
- * @param bool $isReserved Whether the short code should be reserved for manual
- * assignment to participants only
+ * @param bool $isReserved Whether the short code should be reserved and not be assigned to a participant using proxy pool logic. See [Reserved Phone Numbers](https://www.twilio.com/docs/proxy/reserved-phone-numbers) for more information.
* @return $this Fluent Builder
*/
- public function setIsReserved($isReserved)
+ public function setIsReserved(bool $isReserved): self
{
$this->options['isReserved'] = $isReserved;
return $this;
@@ -57,14 +75,10 @@ public function setIsReserved($isReserved)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Proxy.V1.UpdateShortCodeOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Proxy.V1.UpdateShortCodeOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/ShortCodePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/ShortCodePage.php
index 2b2a9e1..e365fe7 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/ShortCodePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/Service/ShortCodePage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return ShortCodeInstance \Twilio\Rest\Proxy\V1\Service\ShortCodeInstance
+ */
+ public function buildInstance(array $payload): ShortCodeInstance
{
return new ShortCodeInstance($this->version, $payload, $this->solution['serviceSid']);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Proxy.V1.ShortCodePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/ServiceContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/ServiceContext.php
index 7611b68..a9f3a88 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/ServiceContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/ServiceContext.php
@@ -2,85 +2,102 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Proxy
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Proxy\V1;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Proxy\V1\Service\PhoneNumberList;
-use Twilio\Rest\Proxy\V1\Service\SessionList;
-use Twilio\Rest\Proxy\V1\Service\ShortCodeList;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Proxy\V1\Service\PhoneNumberList;
+use Twilio\Rest\Proxy\V1\Service\ShortCodeList;
+use Twilio\Rest\Proxy\V1\Service\SessionList;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property \Twilio\Rest\Proxy\V1\Service\SessionList $sessions
- * @property \Twilio\Rest\Proxy\V1\Service\PhoneNumberList $phoneNumbers
- * @property \Twilio\Rest\Proxy\V1\Service\ShortCodeList $shortCodes
+ * @property PhoneNumberList $phoneNumbers
+ * @property ShortCodeList $shortCodes
+ * @property SessionList $sessions
* @method \Twilio\Rest\Proxy\V1\Service\SessionContext sessions(string $sid)
- * @method \Twilio\Rest\Proxy\V1\Service\PhoneNumberContext phoneNumbers(string $sid)
* @method \Twilio\Rest\Proxy\V1\Service\ShortCodeContext shortCodes(string $sid)
+ * @method \Twilio\Rest\Proxy\V1\Service\PhoneNumberContext phoneNumbers(string $sid)
*/
class ServiceContext extends InstanceContext
-{
- protected $_sessions = null;
- protected $_phoneNumbers = null;
- protected $_shortCodes = null;
+ {
+ protected $_phoneNumbers;
+ protected $_shortCodes;
+ protected $_sessions;
/**
* Initialize the ServiceContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Proxy\V1\ServiceContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid The Twilio-provided string that uniquely identifies the Service resource to delete.
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Services/' . \rawurlencode($sid) . '';
+ $this->uri = '/Services/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a ServiceInstance
+ * Delete the ServiceInstance
*
- * @return ServiceInstance Fetched ServiceInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
- return new ServiceInstance($this->version, $payload, $this->solution['sid']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Deletes the ServiceInstance
+ * Fetch the ServiceInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return ServiceInstance Fetched ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): ServiceInstance
{
- return $this->version->delete('delete', $this->uri);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
+
+ return new ServiceInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Update the ServiceInstance
*
@@ -88,54 +105,51 @@ public function delete()
* @return ServiceInstance Updated ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ServiceInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'UniqueName' => $options['uniqueName'],
- 'DefaultTtl' => $options['defaultTtl'],
- 'CallbackUrl' => $options['callbackUrl'],
- 'GeoMatchLevel' => $options['geoMatchLevel'],
- 'NumberSelectionBehavior' => $options['numberSelectionBehavior'],
- 'InterceptCallbackUrl' => $options['interceptCallbackUrl'],
- 'OutOfSessionCallbackUrl' => $options['outOfSessionCallbackUrl'],
- 'ChatInstanceSid' => $options['chatInstanceSid'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'UniqueName' =>
+ $options['uniqueName'],
+ 'DefaultTtl' =>
+ $options['defaultTtl'],
+ 'CallbackUrl' =>
+ $options['callbackUrl'],
+ 'GeoMatchLevel' =>
+ $options['geoMatchLevel'],
+ 'NumberSelectionBehavior' =>
+ $options['numberSelectionBehavior'],
+ 'InterceptCallbackUrl' =>
+ $options['interceptCallbackUrl'],
+ 'OutOfSessionCallbackUrl' =>
+ $options['outOfSessionCallbackUrl'],
+ 'ChatInstanceSid' =>
+ $options['chatInstanceSid'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
+
+ return new ServiceInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
);
-
- return new ServiceInstance($this->version, $payload, $this->solution['sid']);
}
- /**
- * Access the sessions
- *
- * @return \Twilio\Rest\Proxy\V1\Service\SessionList
- */
- protected function getSessions()
- {
- if (!$this->_sessions) {
- $this->_sessions = new SessionList($this->version, $this->solution['sid']);
- }
-
- return $this->_sessions;
- }
/**
* Access the phoneNumbers
- *
- * @return \Twilio\Rest\Proxy\V1\Service\PhoneNumberList
*/
- protected function getPhoneNumbers()
+ protected function getPhoneNumbers(): PhoneNumberList
{
if (!$this->_phoneNumbers) {
- $this->_phoneNumbers = new PhoneNumberList($this->version, $this->solution['sid']);
+ $this->_phoneNumbers = new PhoneNumberList(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->_phoneNumbers;
@@ -143,26 +157,42 @@ protected function getPhoneNumbers()
/**
* Access the shortCodes
- *
- * @return \Twilio\Rest\Proxy\V1\Service\ShortCodeList
*/
- protected function getShortCodes()
+ protected function getShortCodes(): ShortCodeList
{
if (!$this->_shortCodes) {
- $this->_shortCodes = new ShortCodeList($this->version, $this->solution['sid']);
+ $this->_shortCodes = new ShortCodeList(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->_shortCodes;
}
+ /**
+ * Access the sessions
+ */
+ protected function getSessions(): SessionList
+ {
+ if (!$this->_sessions) {
+ $this->_sessions = new SessionList(
+ $this->version,
+ $this->solution['sid']
+ );
+ }
+
+ return $this->_sessions;
+ }
+
/**
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -177,10 +207,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -195,12 +225,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Proxy.V1.ServiceContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/ServiceInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/ServiceInstance.php
index cf7ca3e..9d61812 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/ServiceInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/ServiceInstance.php
@@ -2,58 +2,67 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Proxy
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Proxy\V1;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Proxy\V1\Service\PhoneNumberList;
+use Twilio\Rest\Proxy\V1\Service\ShortCodeList;
+use Twilio\Rest\Proxy\V1\Service\SessionList;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property string $sid
- * @property string $uniqueName
- * @property string $accountSid
- * @property string $chatInstanceSid
- * @property string $callbackUrl
+ * @property string|null $sid
+ * @property string|null $uniqueName
+ * @property string|null $accountSid
+ * @property string|null $chatInstanceSid
+ * @property string|null $callbackUrl
* @property int $defaultTtl
* @property string $numberSelectionBehavior
* @property string $geoMatchLevel
- * @property string $interceptCallbackUrl
- * @property string $outOfSessionCallbackUrl
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
- * @property array $links
+ * @property string|null $interceptCallbackUrl
+ * @property string|null $outOfSessionCallbackUrl
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
+ * @property array|null $links
*/
class ServiceInstance extends InstanceResource
{
- protected $_sessions = null;
- protected $_phoneNumbers = null;
- protected $_shortCodes = null;
+ protected $_phoneNumbers;
+ protected $_shortCodes;
+ protected $_sessions;
/**
* Initialize the ServiceInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Proxy\V1\ServiceInstance
+ * @param string $sid The Twilio-provided string that uniquely identifies the Service resource to delete.
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'uniqueName' => Values::array_get($payload, 'unique_name'),
'accountSid' => Values::array_get($payload, 'account_sid'),
@@ -68,46 +77,51 @@ public function __construct(Version $version, array $payload, $sid = null)
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Proxy\V1\ServiceContext Context for this ServiceInstance
+ * @return ServiceContext Context for this ServiceInstance
*/
- protected function proxy()
+ protected function proxy(): ServiceContext
{
if (!$this->context) {
- $this->context = new ServiceContext($this->version, $this->solution['sid']);
+ $this->context = new ServiceContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a ServiceInstance
+ * Delete the ServiceInstance
*
- * @return ServiceInstance Fetched ServiceInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the ServiceInstance
+ * Fetch the ServiceInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return ServiceInstance Fetched ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): ServiceInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -117,39 +131,34 @@ public function delete()
* @return ServiceInstance Updated ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ServiceInstance
{
+
return $this->proxy()->update($options);
}
/**
- * Access the sessions
- *
- * @return \Twilio\Rest\Proxy\V1\Service\SessionList
+ * Access the phoneNumbers
*/
- protected function getSessions()
+ protected function getPhoneNumbers(): PhoneNumberList
{
- return $this->proxy()->sessions;
+ return $this->proxy()->phoneNumbers;
}
/**
- * Access the phoneNumbers
- *
- * @return \Twilio\Rest\Proxy\V1\Service\PhoneNumberList
+ * Access the shortCodes
*/
- protected function getPhoneNumbers()
+ protected function getShortCodes(): ShortCodeList
{
- return $this->proxy()->phoneNumbers;
+ return $this->proxy()->shortCodes;
}
/**
- * Access the shortCodes
- *
- * @return \Twilio\Rest\Proxy\V1\Service\ShortCodeList
+ * Access the sessions
*/
- protected function getShortCodes()
+ protected function getSessions(): SessionList
{
- return $this->proxy()->shortCodes;
+ return $this->proxy()->sessions;
}
/**
@@ -159,7 +168,7 @@ protected function getShortCodes()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -178,12 +187,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Proxy.V1.ServiceInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/ServiceList.php b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/ServiceList.php
index 285abf1..e98a77b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/ServiceList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/ServiceList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Proxy
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Proxy\V1;
@@ -12,57 +19,72 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
+
class ServiceList extends ListResource
-{
+ {
/**
* Construct the ServiceList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Proxy\V1\ServiceList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/Services';
}
/**
- * Streams ServiceInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the ServiceInstance
*
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @param string $uniqueName An application-defined string that uniquely identifies the resource. This value must be 191 characters or fewer in length and be unique. **This value should not have PII.**
+ * @param array|Options $options Optional Arguments
+ * @return ServiceInstance Created ServiceInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($limit = null, $pageSize = null)
+ public function create(string $uniqueName, array $options = []): ServiceInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'UniqueName' =>
+ $uniqueName,
+ 'DefaultTtl' =>
+ $options['defaultTtl'],
+ 'CallbackUrl' =>
+ $options['callbackUrl'],
+ 'GeoMatchLevel' =>
+ $options['geoMatchLevel'],
+ 'NumberSelectionBehavior' =>
+ $options['numberSelectionBehavior'],
+ 'InterceptCallbackUrl' =>
+ $options['interceptCallbackUrl'],
+ 'OutOfSessionCallbackUrl' =>
+ $options['outOfSessionCallbackUrl'],
+ 'ChatInstanceSid' =>
+ $options['chatInstanceSid'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new ServiceInstance(
+ $this->version,
+ $payload
+ );
}
+
/**
* Reads ServiceInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -78,11 +100,38 @@ public function stream($limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return ServiceInstance[] Array of results
*/
- public function read($limit = null, $pageSize = null)
+ public function read(int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($limit, $pageSize), false);
}
+ /**
+ * Streams ServiceInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of ServiceInstance records from the API.
* Request is executed immediately
@@ -90,21 +139,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of ServiceInstance
+ * @return ServicePage Page of ServiceInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): ServicePage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new ServicePage($this->version, $response, $this->solution);
}
@@ -114,9 +164,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of ServiceInstance
+ * @return ServicePage Page of ServiceInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): ServicePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -126,49 +176,21 @@ public function getPage($targetUrl)
return new ServicePage($this->version, $response, $this->solution);
}
- /**
- * Create a new ServiceInstance
- *
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the resource
- * @param array|Options $options Optional Arguments
- * @return ServiceInstance Newly created ServiceInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($uniqueName, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'UniqueName' => $uniqueName,
- 'DefaultTtl' => $options['defaultTtl'],
- 'CallbackUrl' => $options['callbackUrl'],
- 'GeoMatchLevel' => $options['geoMatchLevel'],
- 'NumberSelectionBehavior' => $options['numberSelectionBehavior'],
- 'InterceptCallbackUrl' => $options['interceptCallbackUrl'],
- 'OutOfSessionCallbackUrl' => $options['outOfSessionCallbackUrl'],
- 'ChatInstanceSid' => $options['chatInstanceSid'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new ServiceInstance($this->version, $payload);
- }
/**
* Constructs a ServiceContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Proxy\V1\ServiceContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the Service resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): ServiceContext
{
- return new ServiceContext($this->version, $sid);
+ return new ServiceContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -176,8 +198,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Proxy.V1.ServiceList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/ServiceOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/ServiceOptions.php
index a3cfc7e..2ea4c42 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/ServiceOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/ServiceOptions.php
@@ -1,10 +1,16 @@
options['defaultTtl'] = $defaultTtl;
$this->options['callbackUrl'] = $callbackUrl;
$this->options['geoMatchLevel'] = $geoMatchLevel;
@@ -90,10 +128,10 @@ public function __construct($defaultTtl = Values::NONE, $callbackUrl = Values::N
/**
* The default `ttl` value to set for Sessions created in the Service. The TTL (time to live) is measured in seconds after the Session's last create or last Interaction. The default value of `0` indicates an unlimited Session length. You can override a Session's default TTL value by setting its `ttl` value.
*
- * @param int $defaultTtl Default TTL for a Session, in seconds
+ * @param int $defaultTtl The default `ttl` value to set for Sessions created in the Service. The TTL (time to live) is measured in seconds after the Session's last create or last Interaction. The default value of `0` indicates an unlimited Session length. You can override a Session's default TTL value by setting its `ttl` value.
* @return $this Fluent Builder
*/
- public function setDefaultTtl($defaultTtl)
+ public function setDefaultTtl(int $defaultTtl): self
{
$this->options['defaultTtl'] = $defaultTtl;
return $this;
@@ -102,37 +140,30 @@ public function setDefaultTtl($defaultTtl)
/**
* The URL we should call when the interaction status changes.
*
- * @param string $callbackUrl The URL we should call when the interaction
- * status changes
+ * @param string $callbackUrl The URL we should call when the interaction status changes.
* @return $this Fluent Builder
*/
- public function setCallbackUrl($callbackUrl)
+ public function setCallbackUrl(string $callbackUrl): self
{
$this->options['callbackUrl'] = $callbackUrl;
return $this;
}
/**
- * Where a proxy number must be located relative to the participant identifier. Can be: `country`, `area-code`, or `extended-area-code`. The default value is `country` and more specific areas than `country` are only available in North America.
- *
- * @param string $geoMatchLevel Where a proxy number must be located relative
- * to the participant identifier
+ * @param string $geoMatchLevel
* @return $this Fluent Builder
*/
- public function setGeoMatchLevel($geoMatchLevel)
+ public function setGeoMatchLevel(string $geoMatchLevel): self
{
$this->options['geoMatchLevel'] = $geoMatchLevel;
return $this;
}
/**
- * The preference for Proxy Number selection in the Service instance. Can be: `prefer-sticky` or `avoid-sticky` and the default is `prefer-sticky`. `prefer-sticky` means that we will try and select the same Proxy Number for a given participant if they have previous [Sessions](https://www.twilio.com/docs/proxy/api/session), but we will not fail if that Proxy Number cannot be used. `avoid-sticky` means that we will try to use different Proxy Numbers as long as that is possible within a given pool rather than try and use a previously assigned number.
- *
- * @param string $numberSelectionBehavior The preference for Proxy Number
- * selection for the Service instance
+ * @param string $numberSelectionBehavior
* @return $this Fluent Builder
*/
- public function setNumberSelectionBehavior($numberSelectionBehavior)
+ public function setNumberSelectionBehavior(string $numberSelectionBehavior): self
{
$this->options['numberSelectionBehavior'] = $numberSelectionBehavior;
return $this;
@@ -141,24 +172,22 @@ public function setNumberSelectionBehavior($numberSelectionBehavior)
/**
* The URL we call on each interaction. If we receive a 403 status, we block the interaction; otherwise the interaction continues.
*
- * @param string $interceptCallbackUrl The URL we call on each interaction
+ * @param string $interceptCallbackUrl The URL we call on each interaction. If we receive a 403 status, we block the interaction; otherwise the interaction continues.
* @return $this Fluent Builder
*/
- public function setInterceptCallbackUrl($interceptCallbackUrl)
+ public function setInterceptCallbackUrl(string $interceptCallbackUrl): self
{
$this->options['interceptCallbackUrl'] = $interceptCallbackUrl;
return $this;
}
/**
- * The URL we should call when an inbound call or SMS action occurs on a closed or non-existent Session. If your server (or a Twilio [function](https://www.twilio.com/functions)) responds with valid [TwiML](https://www.twilio.com/docs/voice/twiml), we will process it. This means it is possible, for example, to play a message for a call, send an automated text message response, or redirect a call to another Phone Number. See [Out-of-Session Callback Response Guide](https://www.twilio.com/docs/proxy/out-session-callback-response-guide) for more information.
+ * The URL we should call when an inbound call or SMS action occurs on a closed or non-existent Session. If your server (or a Twilio [function](https://www.twilio.com/en-us/serverless/functions)) responds with valid [TwiML](https://www.twilio.com/docs/voice/twiml), we will process it. This means it is possible, for example, to play a message for a call, send an automated text message response, or redirect a call to another Phone Number. See [Out-of-Session Callback Response Guide](https://www.twilio.com/docs/proxy/out-session-callback-response-guide) for more information.
*
- * @param string $outOfSessionCallbackUrl The URL we call when an inbound call
- * or SMS action occurs on a closed or
- * non-existent Session
+ * @param string $outOfSessionCallbackUrl The URL we should call when an inbound call or SMS action occurs on a closed or non-existent Session. If your server (or a Twilio [function](https://www.twilio.com/en-us/serverless/functions)) responds with valid [TwiML](https://www.twilio.com/docs/voice/twiml), we will process it. This means it is possible, for example, to play a message for a call, send an automated text message response, or redirect a call to another Phone Number. See [Out-of-Session Callback Response Guide](https://www.twilio.com/docs/proxy/out-session-callback-response-guide) for more information.
* @return $this Fluent Builder
*/
- public function setOutOfSessionCallbackUrl($outOfSessionCallbackUrl)
+ public function setOutOfSessionCallbackUrl(string $outOfSessionCallbackUrl): self
{
$this->options['outOfSessionCallbackUrl'] = $outOfSessionCallbackUrl;
return $this;
@@ -167,10 +196,10 @@ public function setOutOfSessionCallbackUrl($outOfSessionCallbackUrl)
/**
* The SID of the Chat Service Instance managed by Proxy Service. The Chat Service enables Proxy to forward SMS and channel messages to this chat instance. This is a one-to-one relationship.
*
- * @param string $chatInstanceSid The SID of the Chat Service Instance
+ * @param string $chatInstanceSid The SID of the Chat Service Instance managed by Proxy Service. The Chat Service enables Proxy to forward SMS and channel messages to this chat instance. This is a one-to-one relationship.
* @return $this Fluent Builder
*/
- public function setChatInstanceSid($chatInstanceSid)
+ public function setChatInstanceSid(string $chatInstanceSid): self
{
$this->options['chatInstanceSid'] = $chatInstanceSid;
return $this;
@@ -181,38 +210,40 @@ public function setChatInstanceSid($chatInstanceSid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Proxy.V1.CreateServiceOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Proxy.V1.CreateServiceOptions ' . $options . ']';
}
}
+
+
+
class UpdateServiceOptions extends Options
-{
+ {
/**
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the resource
- * @param int $defaultTtl Default TTL for a Session, in seconds
- * @param string $callbackUrl The URL we should call when the interaction
- * status changes
- * @param string $geoMatchLevel Where a proxy number must be located relative
- * to the participant identifier
- * @param string $numberSelectionBehavior The preference for Proxy Number
- * selection for the Service instance
- * @param string $interceptCallbackUrl The URL we call on each interaction
- * @param string $outOfSessionCallbackUrl The URL we call when an inbound call
- * or SMS action occurs on a closed or
- * non-existent Session
- * @param string $chatInstanceSid The SID of the Chat Service Instance
+ * @param string $uniqueName An application-defined string that uniquely identifies the resource. This value must be 191 characters or fewer in length and be unique. **This value should not have PII.**
+ * @param int $defaultTtl The default `ttl` value to set for Sessions created in the Service. The TTL (time to live) is measured in seconds after the Session's last create or last Interaction. The default value of `0` indicates an unlimited Session length. You can override a Session's default TTL value by setting its `ttl` value.
+ * @param string $callbackUrl The URL we should call when the interaction status changes.
+ * @param string $geoMatchLevel
+ * @param string $numberSelectionBehavior
+ * @param string $interceptCallbackUrl The URL we call on each interaction. If we receive a 403 status, we block the interaction; otherwise the interaction continues.
+ * @param string $outOfSessionCallbackUrl The URL we should call when an inbound call or SMS action occurs on a closed or non-existent Session. If your server (or a Twilio [function](https://www.twilio.com/en-us/serverless/functions)) responds with valid [TwiML](https://www.twilio.com/docs/voice/twiml), we will process it. This means it is possible, for example, to play a message for a call, send an automated text message response, or redirect a call to another Phone Number. See [Out-of-Session Callback Response Guide](https://www.twilio.com/docs/proxy/out-session-callback-response-guide) for more information.
+ * @param string $chatInstanceSid The SID of the Chat Service Instance managed by Proxy Service. The Chat Service enables Proxy to forward SMS and channel messages to this chat instance. This is a one-to-one relationship.
*/
- public function __construct($uniqueName = Values::NONE, $defaultTtl = Values::NONE, $callbackUrl = Values::NONE, $geoMatchLevel = Values::NONE, $numberSelectionBehavior = Values::NONE, $interceptCallbackUrl = Values::NONE, $outOfSessionCallbackUrl = Values::NONE, $chatInstanceSid = Values::NONE)
- {
+ public function __construct(
+
+ string $uniqueName = Values::NONE,
+ int $defaultTtl = Values::INT_NONE,
+ string $callbackUrl = Values::NONE,
+ string $geoMatchLevel = Values::NONE,
+ string $numberSelectionBehavior = Values::NONE,
+ string $interceptCallbackUrl = Values::NONE,
+ string $outOfSessionCallbackUrl = Values::NONE,
+ string $chatInstanceSid = Values::NONE
+
+ ) {
$this->options['uniqueName'] = $uniqueName;
$this->options['defaultTtl'] = $defaultTtl;
$this->options['callbackUrl'] = $callbackUrl;
@@ -226,11 +257,10 @@ public function __construct($uniqueName = Values::NONE, $defaultTtl = Values::NO
/**
* An application-defined string that uniquely identifies the resource. This value must be 191 characters or fewer in length and be unique. **This value should not have PII.**
*
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the resource
+ * @param string $uniqueName An application-defined string that uniquely identifies the resource. This value must be 191 characters or fewer in length and be unique. **This value should not have PII.**
* @return $this Fluent Builder
*/
- public function setUniqueName($uniqueName)
+ public function setUniqueName(string $uniqueName): self
{
$this->options['uniqueName'] = $uniqueName;
return $this;
@@ -239,10 +269,10 @@ public function setUniqueName($uniqueName)
/**
* The default `ttl` value to set for Sessions created in the Service. The TTL (time to live) is measured in seconds after the Session's last create or last Interaction. The default value of `0` indicates an unlimited Session length. You can override a Session's default TTL value by setting its `ttl` value.
*
- * @param int $defaultTtl Default TTL for a Session, in seconds
+ * @param int $defaultTtl The default `ttl` value to set for Sessions created in the Service. The TTL (time to live) is measured in seconds after the Session's last create or last Interaction. The default value of `0` indicates an unlimited Session length. You can override a Session's default TTL value by setting its `ttl` value.
* @return $this Fluent Builder
*/
- public function setDefaultTtl($defaultTtl)
+ public function setDefaultTtl(int $defaultTtl): self
{
$this->options['defaultTtl'] = $defaultTtl;
return $this;
@@ -251,37 +281,30 @@ public function setDefaultTtl($defaultTtl)
/**
* The URL we should call when the interaction status changes.
*
- * @param string $callbackUrl The URL we should call when the interaction
- * status changes
+ * @param string $callbackUrl The URL we should call when the interaction status changes.
* @return $this Fluent Builder
*/
- public function setCallbackUrl($callbackUrl)
+ public function setCallbackUrl(string $callbackUrl): self
{
$this->options['callbackUrl'] = $callbackUrl;
return $this;
}
/**
- * Where a proxy number must be located relative to the participant identifier. Can be: `country`, `area-code`, or `extended-area-code`. The default value is `country` and more specific areas than `country` are only available in North America.
- *
- * @param string $geoMatchLevel Where a proxy number must be located relative
- * to the participant identifier
+ * @param string $geoMatchLevel
* @return $this Fluent Builder
*/
- public function setGeoMatchLevel($geoMatchLevel)
+ public function setGeoMatchLevel(string $geoMatchLevel): self
{
$this->options['geoMatchLevel'] = $geoMatchLevel;
return $this;
}
/**
- * The preference for Proxy Number selection in the Service instance. Can be: `prefer-sticky` or `avoid-sticky` and the default is `prefer-sticky`. `prefer-sticky` means that we will try and select the same Proxy Number for a given participant if they have previous [Sessions](https://www.twilio.com/docs/proxy/api/session), but we will not fail if that Proxy Number cannot be used. `avoid-sticky` means that we will try to use different Proxy Numbers as long as that is possible within a given pool rather than try and use a previously assigned number.
- *
- * @param string $numberSelectionBehavior The preference for Proxy Number
- * selection for the Service instance
+ * @param string $numberSelectionBehavior
* @return $this Fluent Builder
*/
- public function setNumberSelectionBehavior($numberSelectionBehavior)
+ public function setNumberSelectionBehavior(string $numberSelectionBehavior): self
{
$this->options['numberSelectionBehavior'] = $numberSelectionBehavior;
return $this;
@@ -290,24 +313,22 @@ public function setNumberSelectionBehavior($numberSelectionBehavior)
/**
* The URL we call on each interaction. If we receive a 403 status, we block the interaction; otherwise the interaction continues.
*
- * @param string $interceptCallbackUrl The URL we call on each interaction
+ * @param string $interceptCallbackUrl The URL we call on each interaction. If we receive a 403 status, we block the interaction; otherwise the interaction continues.
* @return $this Fluent Builder
*/
- public function setInterceptCallbackUrl($interceptCallbackUrl)
+ public function setInterceptCallbackUrl(string $interceptCallbackUrl): self
{
$this->options['interceptCallbackUrl'] = $interceptCallbackUrl;
return $this;
}
/**
- * The URL we should call when an inbound call or SMS action occurs on a closed or non-existent Session. If your server (or a Twilio [function](https://www.twilio.com/functions)) responds with valid [TwiML](https://www.twilio.com/docs/voice/twiml), we will process it. This means it is possible, for example, to play a message for a call, send an automated text message response, or redirect a call to another Phone Number. See [Out-of-Session Callback Response Guide](https://www.twilio.com/docs/proxy/out-session-callback-response-guide) for more information.
+ * The URL we should call when an inbound call or SMS action occurs on a closed or non-existent Session. If your server (or a Twilio [function](https://www.twilio.com/en-us/serverless/functions)) responds with valid [TwiML](https://www.twilio.com/docs/voice/twiml), we will process it. This means it is possible, for example, to play a message for a call, send an automated text message response, or redirect a call to another Phone Number. See [Out-of-Session Callback Response Guide](https://www.twilio.com/docs/proxy/out-session-callback-response-guide) for more information.
*
- * @param string $outOfSessionCallbackUrl The URL we call when an inbound call
- * or SMS action occurs on a closed or
- * non-existent Session
+ * @param string $outOfSessionCallbackUrl The URL we should call when an inbound call or SMS action occurs on a closed or non-existent Session. If your server (or a Twilio [function](https://www.twilio.com/en-us/serverless/functions)) responds with valid [TwiML](https://www.twilio.com/docs/voice/twiml), we will process it. This means it is possible, for example, to play a message for a call, send an automated text message response, or redirect a call to another Phone Number. See [Out-of-Session Callback Response Guide](https://www.twilio.com/docs/proxy/out-session-callback-response-guide) for more information.
* @return $this Fluent Builder
*/
- public function setOutOfSessionCallbackUrl($outOfSessionCallbackUrl)
+ public function setOutOfSessionCallbackUrl(string $outOfSessionCallbackUrl): self
{
$this->options['outOfSessionCallbackUrl'] = $outOfSessionCallbackUrl;
return $this;
@@ -316,10 +337,10 @@ public function setOutOfSessionCallbackUrl($outOfSessionCallbackUrl)
/**
* The SID of the Chat Service Instance managed by Proxy Service. The Chat Service enables Proxy to forward SMS and channel messages to this chat instance. This is a one-to-one relationship.
*
- * @param string $chatInstanceSid The SID of the Chat Service Instance
+ * @param string $chatInstanceSid The SID of the Chat Service Instance managed by Proxy Service. The Chat Service enables Proxy to forward SMS and channel messages to this chat instance. This is a one-to-one relationship.
* @return $this Fluent Builder
*/
- public function setChatInstanceSid($chatInstanceSid)
+ public function setChatInstanceSid(string $chatInstanceSid): self
{
$this->options['chatInstanceSid'] = $chatInstanceSid;
return $this;
@@ -330,14 +351,10 @@ public function setChatInstanceSid($chatInstanceSid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Proxy.V1.UpdateServiceOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Proxy.V1.UpdateServiceOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/ServicePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/ServicePage.php
index f578c01..ffd1de1 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/ServicePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Proxy/V1/ServicePage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return ServiceInstance \Twilio\Rest\Proxy\V1\ServiceInstance
+ */
+ public function buildInstance(array $payload): ServiceInstance
{
return new ServiceInstance($this->version, $payload);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Proxy.V1.ServicePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless.php
index 71f5061..d2512d0 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless.php
@@ -1,111 +1,24 @@
baseUrl = 'https://serverless.twilio.com';
- }
-
+class Serverless extends ServerlessBase {
/**
- * @return \Twilio\Rest\Serverless\V1 Version v1 of serverless
+ * @deprecated Use v1->services instead.
*/
- protected function getV1()
- {
- if (!$this->_v1) {
- $this->_v1 = new V1($this);
- }
- return $this->_v1;
- }
-
- /**
- * Magic getter to lazy load version
- *
- * @param string $name Version to return
- * @return \Twilio\Version The requested version
- * @throws TwilioException For unknown versions
- */
- public function __get($name)
- {
- $method = 'get' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return $this->$method();
- }
-
- throw new TwilioException('Unknown version ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $method = 'context' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return \call_user_func_array(array($this, $method), $arguments);
- }
-
- throw new TwilioException('Unknown context ' . $name);
- }
-
- /**
- * @return \Twilio\Rest\Serverless\V1\ServiceList
- */
- protected function getServices()
- {
+ protected function getServices(): \Twilio\Rest\Serverless\V1\ServiceList {
+ echo "services is deprecated. Use v1->services instead.";
return $this->v1->services;
}
/**
+ * @deprecated Use v1->services(\$sid) instead.
* @param string $sid The SID of the Service resource to fetch
- * @return \Twilio\Rest\Serverless\V1\ServiceContext
*/
- protected function contextServices($sid)
- {
+ protected function contextServices(string $sid): \Twilio\Rest\Serverless\V1\ServiceContext {
+ echo "services(\$sid) is deprecated. Use v1->services(\$sid) instead.";
return $this->v1->services($sid);
}
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Serverless]';
- }
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1.php
index 26b9c7d..1472720 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1.php
@@ -1,32 +1,38 @@
version = 'v1';
}
- /**
- * @return \Twilio\Rest\Serverless\V1\ServiceList
- */
- protected function getServices()
+ protected function getServices(): ServiceList
{
if (!$this->_services) {
$this->_services = new ServiceList($this);
@@ -52,7 +55,7 @@ protected function getServices()
* @return \Twilio\ListResource The requested resource
* @throws TwilioException For unknown resource
*/
- public function __get($name)
+ public function __get(string $name)
{
$method = 'get' . \ucfirst($name);
if (\method_exists($this, $method)) {
@@ -67,10 +70,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -85,8 +88,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Serverless.V1]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Asset/AssetVersionContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Asset/AssetVersionContext.php
index e92065d..8dcc4ed 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Asset/AssetVersionContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Asset/AssetVersionContext.php
@@ -2,60 +2,72 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Serverless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Serverless\V1\Service\Asset;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
class AssetVersionContext extends InstanceContext
-{
+ {
/**
* Initialize the AssetVersionContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the Asset Version
- * resource from
- * @param string $assetSid The SID of the Asset resource that is the parent of
- * the Asset Version resource to fetch
- * @param string $sid The SID that identifies the Asset Version resource to
- * fetch
- * @return \Twilio\Rest\Serverless\V1\Service\Asset\AssetVersionContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the Service to fetch the Asset Version resource from.
+ * @param string $assetSid The SID of the Asset resource that is the parent of the Asset Version resource to fetch.
+ * @param string $sid The SID of the Asset Version resource to fetch.
*/
- public function __construct(Version $version, $serviceSid, $assetSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $assetSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'assetSid' => $assetSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'assetSid' =>
+ $assetSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Assets/' . \rawurlencode($assetSid) . '/Versions/' . \rawurlencode($sid) . '';
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Assets/' . \rawurlencode($assetSid)
+ .'/Versions/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a AssetVersionInstance
+ * Fetch the AssetVersionInstance
*
* @return AssetVersionInstance Fetched AssetVersionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): AssetVersionInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new AssetVersionInstance(
$this->version,
@@ -66,17 +78,18 @@ public function fetch()
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Serverless.V1.AssetVersionContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Asset/AssetVersionInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Asset/AssetVersionInstance.php
index 6ee0ec1..407b394 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Asset/AssetVersionInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Asset/AssetVersionInstance.php
@@ -2,52 +2,55 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Serverless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Serverless\V1\Service\Asset;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property string $sid
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $assetSid
- * @property string $path
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $assetSid
+ * @property string|null $path
* @property string $visibility
- * @property \DateTime $dateCreated
- * @property string $url
+ * @property \DateTime|null $dateCreated
+ * @property string|null $url
*/
class AssetVersionInstance extends InstanceResource
{
/**
* Initialize the AssetVersionInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the Asset Version
- * resource is associated with
- * @param string $assetSid The SID of the Asset resource that is the parent of
- * the asset version
- * @param string $sid The SID that identifies the Asset Version resource to
- * fetch
- * @return \Twilio\Rest\Serverless\V1\Service\Asset\AssetVersionInstance
+ * @param string $serviceSid The SID of the Service to fetch the Asset Version resource from.
+ * @param string $assetSid The SID of the Asset resource that is the parent of the Asset Version resource to fetch.
+ * @param string $sid The SID of the Asset Version resource to fetch.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $assetSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $assetSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
@@ -56,25 +59,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $asse
'visibility' => Values::array_get($payload, 'visibility'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'assetSid' => $assetSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['serviceSid' => $serviceSid, 'assetSid' => $assetSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Serverless\V1\Service\Asset\AssetVersionContext Context
- * for
- * this
- * AssetVersionInstance
+ * @return AssetVersionContext Context for this AssetVersionInstance
*/
- protected function proxy()
+ protected function proxy(): AssetVersionContext
{
if (!$this->context) {
$this->context = new AssetVersionContext(
@@ -89,13 +85,14 @@ protected function proxy()
}
/**
- * Fetch a AssetVersionInstance
+ * Fetch the AssetVersionInstance
*
* @return AssetVersionInstance Fetched AssetVersionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): AssetVersionInstance
{
+
return $this->proxy()->fetch();
}
@@ -106,7 +103,7 @@ public function fetch()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -125,12 +122,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Serverless.V1.AssetVersionInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Asset/AssetVersionList.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Asset/AssetVersionList.php
index 1a34701..8dabd0b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Asset/AssetVersionList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Asset/AssetVersionList.php
@@ -2,40 +2,75 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Serverless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Serverless\V1\Service\Asset;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
+
class AssetVersionList extends ListResource
-{
+ {
/**
* Construct the AssetVersionList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the Asset Version
- * resource is associated with
- * @param string $assetSid The SID of the Asset resource that is the parent of
- * the asset version
- * @return \Twilio\Rest\Serverless\V1\Service\Asset\AssetVersionList
+ * @param string $serviceSid The SID of the Service to fetch the Asset Version resource from.
+ * @param string $assetSid The SID of the Asset resource that is the parent of the Asset Version resource to fetch.
*/
- public function __construct(Version $version, $serviceSid, $assetSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid,
+ string $assetSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'assetSid' => $assetSid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ 'assetSid' =>
+ $assetSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Assets/' . \rawurlencode($assetSid)
+ .'/Versions';
+ }
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Assets/' . \rawurlencode($assetSid) . '/Versions';
+ /**
+ * Reads AssetVersionInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return AssetVersionInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -54,9 +89,9 @@ public function __construct(Version $version, $serviceSid, $assetSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -65,26 +100,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads AssetVersionInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return AssetVersionInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of AssetVersionInstance records from the API.
* Request is executed immediately
@@ -92,21 +107,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of AssetVersionInstance
+ * @return AssetVersionPage Page of AssetVersionInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): AssetVersionPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new AssetVersionPage($this->version, $response, $this->solution);
}
@@ -116,9 +132,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of AssetVersionInstance
+ * @return AssetVersionPage Page of AssetVersionInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): AssetVersionPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -128,14 +144,16 @@ public function getPage($targetUrl)
return new AssetVersionPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a AssetVersionContext
*
- * @param string $sid The SID that identifies the Asset Version resource to
- * fetch
- * @return \Twilio\Rest\Serverless\V1\Service\Asset\AssetVersionContext
+ * @param string $sid The SID of the Asset Version resource to fetch.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): AssetVersionContext
{
return new AssetVersionContext(
$this->version,
@@ -150,8 +168,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Serverless.V1.AssetVersionList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Asset/AssetVersionPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Asset/AssetVersionPage.php
index ae8d11e..1293e65 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Asset/AssetVersionPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Asset/AssetVersionPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return AssetVersionInstance \Twilio\Rest\Serverless\V1\Service\Asset\AssetVersionInstance
+ */
+ public function buildInstance(array $payload): AssetVersionInstance
{
- return new AssetVersionInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['assetSid']
- );
+ return new AssetVersionInstance($this->version, $payload, $this->solution['serviceSid'], $this->solution['assetSid']);
}
/**
@@ -39,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Serverless.V1.AssetVersionPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/AssetContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/AssetContext.php
index 9438648..e40a2ea 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/AssetContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/AssetContext.php
@@ -2,63 +2,89 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Serverless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Serverless\V1\Service;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
-use Twilio\Rest\Serverless\V1\Service\Asset\AssetVersionList;
+use Twilio\ListResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Serverless\V1\Service\Asset\AssetVersionList;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property \Twilio\Rest\Serverless\V1\Service\Asset\AssetVersionList $assetVersions
+ * @property AssetVersionList $assetVersions
* @method \Twilio\Rest\Serverless\V1\Service\Asset\AssetVersionContext assetVersions(string $sid)
*/
class AssetContext extends InstanceContext
-{
- protected $_assetVersions = null;
+ {
+ protected $_assetVersions;
/**
* Initialize the AssetContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the Asset resource
- * from
- * @param string $sid The SID that identifies the Asset resource to fetch
- * @return \Twilio\Rest\Serverless\V1\Service\AssetContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the Service to create the Asset resource under.
+ * @param string $sid The SID that identifies the Asset resource to delete.
*/
- public function __construct(Version $version, $serviceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Assets/' . \rawurlencode($sid)
+ .'';
+ }
+
+ /**
+ * Delete the AssetInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Assets/' . \rawurlencode($sid) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a AssetInstance
+ * Fetch the AssetInstance
*
* @return AssetInstance Fetched AssetInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): AssetInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new AssetInstance(
$this->version,
@@ -68,34 +94,24 @@ public function fetch()
);
}
- /**
- * Deletes the AssetInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Update the AssetInstance
*
- * @param string $friendlyName A string to describe the Asset resource
+ * @param string $friendlyName A descriptive string that you create to describe the Asset resource. It can be a maximum of 255 characters.
* @return AssetInstance Updated AssetInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($friendlyName)
+ public function update(string $friendlyName): AssetInstance
{
- $data = Values::of(array('FriendlyName' => $friendlyName,));
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'FriendlyName' =>
+ $friendlyName,
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new AssetInstance(
$this->version,
@@ -105,12 +121,11 @@ public function update($friendlyName)
);
}
+
/**
* Access the assetVersions
- *
- * @return \Twilio\Rest\Serverless\V1\Service\Asset\AssetVersionList
*/
- protected function getAssetVersions()
+ protected function getAssetVersions(): AssetVersionList
{
if (!$this->_assetVersions) {
$this->_assetVersions = new AssetVersionList(
@@ -127,10 +142,10 @@ protected function getAssetVersions()
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -145,10 +160,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -163,12 +178,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Serverless.V1.AssetContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/AssetInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/AssetInstance.php
index 4c5e5df..19ca863 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/AssetInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/AssetInstance.php
@@ -2,51 +2,57 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Serverless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Serverless\V1\Service;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Serverless\V1\Service\Asset\AssetVersionList;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property string $sid
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $friendlyName
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
- * @property array $links
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $friendlyName
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
+ * @property array|null $links
*/
class AssetInstance extends InstanceResource
{
- protected $_assetVersions = null;
+ protected $_assetVersions;
/**
* Initialize the AssetInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the Asset resource is
- * associated with
- * @param string $sid The SID that identifies the Asset resource to fetch
- * @return \Twilio\Rest\Serverless\V1\Service\AssetInstance
+ * @param string $serviceSid The SID of the Service to create the Asset resource under.
+ * @param string $sid The SID that identifies the Asset resource to delete.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
@@ -55,19 +61,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $sid
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Serverless\V1\Service\AssetContext Context for this
- * AssetInstance
+ * @return AssetContext Context for this AssetInstance
*/
- protected function proxy()
+ protected function proxy(): AssetContext
{
if (!$this->context) {
$this->context = new AssetContext(
@@ -81,45 +86,46 @@ protected function proxy()
}
/**
- * Fetch a AssetInstance
+ * Delete the AssetInstance
*
- * @return AssetInstance Fetched AssetInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the AssetInstance
+ * Fetch the AssetInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return AssetInstance Fetched AssetInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): AssetInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
* Update the AssetInstance
*
- * @param string $friendlyName A string to describe the Asset resource
+ * @param string $friendlyName A descriptive string that you create to describe the Asset resource. It can be a maximum of 255 characters.
* @return AssetInstance Updated AssetInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($friendlyName)
+ public function update(string $friendlyName): AssetInstance
{
+
return $this->proxy()->update($friendlyName);
}
/**
* Access the assetVersions
- *
- * @return \Twilio\Rest\Serverless\V1\Service\Asset\AssetVersionList
*/
- protected function getAssetVersions()
+ protected function getAssetVersions(): AssetVersionList
{
return $this->proxy()->assetVersions;
}
@@ -131,7 +137,7 @@ protected function getAssetVersions()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -150,12 +156,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Serverless.V1.AssetInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/AssetList.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/AssetList.php
index 602ba11..e07820a 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/AssetList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/AssetList.php
@@ -2,68 +2,78 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Serverless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Serverless\V1\Service;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
+
class AssetList extends ListResource
-{
+ {
/**
* Construct the AssetList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the Asset resource is
- * associated with
- * @return \Twilio\Rest\Serverless\V1\Service\AssetList
+ * @param string $serviceSid The SID of the Service to create the Asset resource under.
*/
- public function __construct(Version $version, $serviceSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Assets';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Assets';
}
/**
- * Streams AssetInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the AssetInstance
*
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @param string $friendlyName A descriptive string that you create to describe the Asset resource. It can be a maximum of 255 characters.
+ * @return AssetInstance Created AssetInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($limit = null, $pageSize = null)
+ public function create(string $friendlyName): AssetInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($limits['pageSize']);
+ $data = Values::of([
+ 'FriendlyName' =>
+ $friendlyName,
+ ]);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new AssetInstance(
+ $this->version,
+ $payload,
+ $this->solution['serviceSid']
+ );
}
+
/**
* Reads AssetInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -79,11 +89,38 @@ public function stream($limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return AssetInstance[] Array of results
*/
- public function read($limit = null, $pageSize = null)
+ public function read(int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($limit, $pageSize), false);
}
+ /**
+ * Streams AssetInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of AssetInstance records from the API.
* Request is executed immediately
@@ -91,21 +128,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of AssetInstance
+ * @return AssetPage Page of AssetInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): AssetPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new AssetPage($this->version, $response, $this->solution);
}
@@ -115,9 +153,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of AssetInstance
+ * @return AssetPage Page of AssetInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): AssetPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -127,36 +165,22 @@ public function getPage($targetUrl)
return new AssetPage($this->version, $response, $this->solution);
}
- /**
- * Create a new AssetInstance
- *
- * @param string $friendlyName A string to describe the Asset resource
- * @return AssetInstance Newly created AssetInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($friendlyName)
- {
- $data = Values::of(array('FriendlyName' => $friendlyName,));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new AssetInstance($this->version, $payload, $this->solution['serviceSid']);
- }
/**
* Constructs a AssetContext
*
- * @param string $sid The SID that identifies the Asset resource to fetch
- * @return \Twilio\Rest\Serverless\V1\Service\AssetContext
+ * @param string $sid The SID that identifies the Asset resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): AssetContext
{
- return new AssetContext($this->version, $this->solution['serviceSid'], $sid);
+ return new AssetContext(
+ $this->version,
+ $this->solution['serviceSid'],
+ $sid
+ );
}
/**
@@ -164,8 +188,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Serverless.V1.AssetList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/AssetPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/AssetPage.php
index 50cf6e6..8bef94e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/AssetPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/AssetPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return AssetInstance \Twilio\Rest\Serverless\V1\Service\AssetInstance
+ */
+ public function buildInstance(array $payload): AssetInstance
{
return new AssetInstance($this->version, $payload, $this->solution['serviceSid']);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Serverless.V1.AssetPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/BuildContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/BuildContext.php
index 63c7d47..fc734a0 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/BuildContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/BuildContext.php
@@ -2,57 +2,89 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Serverless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Serverless\V1\Service;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Serverless\V1\Service\Build\BuildStatusList;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
+ * @property BuildStatusList $buildStatus
+ * @method \Twilio\Rest\Serverless\V1\Service\Build\BuildStatusContext buildStatus()
*/
class BuildContext extends InstanceContext
-{
+ {
+ protected $_buildStatus;
+
/**
* Initialize the BuildContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the Build resource
- * from
- * @param string $sid The SID of the Build resource to fetch
- * @return \Twilio\Rest\Serverless\V1\Service\BuildContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the Service to create the Build resource under.
+ * @param string $sid The SID of the Build resource to delete.
*/
- public function __construct(Version $version, $serviceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Builds/' . \rawurlencode($sid)
+ .'';
+ }
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Builds/' . \rawurlencode($sid) . '';
+ /**
+ * Delete the BuildInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a BuildInstance
+ * Fetch the BuildInstance
*
* @return BuildInstance Fetched BuildInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): BuildInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new BuildInstance(
$this->version,
@@ -62,15 +94,56 @@ public function fetch()
);
}
+
+ /**
+ * Access the buildStatus
+ */
+ protected function getBuildStatus(): BuildStatusList
+ {
+ if (!$this->_buildStatus) {
+ $this->_buildStatus = new BuildStatusList(
+ $this->version,
+ $this->solution['serviceSid'],
+ $this->solution['sid']
+ );
+ }
+
+ return $this->_buildStatus;
+ }
+
/**
- * Deletes the BuildInstance
+ * Magic getter to lazy load subresources
*
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
+ * @param string $name Subresource to return
+ * @return ListResource The requested subresource
+ * @throws TwilioException For unknown subresources
+ */
+ public function __get(string $name): ListResource
+ {
+ if (\property_exists($this, '_' . $name)) {
+ $method = 'get' . \ucfirst($name);
+ return $this->$method();
+ }
+
+ throw new TwilioException('Unknown subresource ' . $name);
+ }
+
+ /**
+ * Magic caller to get resource contexts
+ *
+ * @param string $name Resource to return
+ * @param array $arguments Context parameters
+ * @return InstanceContext The requested resource context
+ * @throws TwilioException For unknown resource
*/
- public function delete()
+ public function __call(string $name, array $arguments): InstanceContext
{
- return $this->version->delete('delete', $this->uri);
+ $property = $this->$name;
+ if (\method_exists($property, 'getContext')) {
+ return \call_user_func_array(array($property, 'getContext'), $arguments);
+ }
+
+ throw new TwilioException('Resource does not have a context');
}
/**
@@ -78,12 +151,12 @@ public function delete()
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Serverless.V1.BuildContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/BuildInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/BuildInstance.php
index a6df65c..013535d 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/BuildInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/BuildInstance.php
@@ -2,51 +2,61 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Serverless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Serverless\V1\Service;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Serverless\V1\Service\Build\BuildStatusList;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property string $sid
- * @property string $accountSid
- * @property string $serviceSid
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
* @property string $status
- * @property array $assetVersions
- * @property array $functionVersions
- * @property array $dependencies
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
+ * @property array[]|null $assetVersions
+ * @property array[]|null $functionVersions
+ * @property array[]|null $dependencies
+ * @property string $runtime
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
+ * @property array|null $links
*/
class BuildInstance extends InstanceResource
{
+ protected $_buildStatus;
+
/**
* Initialize the BuildInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the Build resource is
- * associated with
- * @param string $sid The SID of the Build resource to fetch
- * @return \Twilio\Rest\Serverless\V1\Service\BuildInstance
+ * @param string $serviceSid The SID of the Service to create the Build resource under.
+ * @param string $sid The SID of the Build resource to delete.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
@@ -54,22 +64,23 @@ public function __construct(Version $version, array $payload, $serviceSid, $sid
'assetVersions' => Values::array_get($payload, 'asset_versions'),
'functionVersions' => Values::array_get($payload, 'function_versions'),
'dependencies' => Values::array_get($payload, 'dependencies'),
+ 'runtime' => Values::array_get($payload, 'runtime'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
- );
+ 'links' => Values::array_get($payload, 'links'),
+ ];
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Serverless\V1\Service\BuildContext Context for this
- * BuildInstance
+ * @return BuildContext Context for this BuildInstance
*/
- protected function proxy()
+ protected function proxy(): BuildContext
{
if (!$this->context) {
$this->context = new BuildContext(
@@ -83,25 +94,35 @@ protected function proxy()
}
/**
- * Fetch a BuildInstance
+ * Delete the BuildInstance
*
- * @return BuildInstance Fetched BuildInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the BuildInstance
+ * Fetch the BuildInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return BuildInstance Fetched BuildInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): BuildInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
+ }
+
+ /**
+ * Access the buildStatus
+ */
+ protected function getBuildStatus(): BuildStatusList
+ {
+ return $this->proxy()->buildStatus;
}
/**
@@ -111,7 +132,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -130,12 +151,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Serverless.V1.BuildInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/BuildList.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/BuildList.php
index d71d761..5653682 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/BuildList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/BuildList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Serverless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Serverless\V1\Service;
@@ -12,60 +19,71 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
class BuildList extends ListResource
-{
+ {
/**
* Construct the BuildList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the Build resource is
- * associated with
- * @return \Twilio\Rest\Serverless\V1\Service\BuildList
+ * @param string $serviceSid The SID of the Service to create the Build resource under.
*/
- public function __construct(Version $version, $serviceSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Builds';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Builds';
}
/**
- * Streams BuildInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the BuildInstance
*
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @param array|Options $options Optional Arguments
+ * @return BuildInstance Created BuildInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($limit = null, $pageSize = null)
+ public function create(array $options = []): BuildInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'AssetVersions' =>
+ Serialize::map($options['assetVersions'], function ($e) { return $e; }),
+ 'FunctionVersions' =>
+ Serialize::map($options['functionVersions'], function ($e) { return $e; }),
+ 'Dependencies' =>
+ $options['dependencies'],
+ 'Runtime' =>
+ $options['runtime'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new BuildInstance(
+ $this->version,
+ $payload,
+ $this->solution['serviceSid']
+ );
}
+
/**
* Reads BuildInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -81,11 +99,38 @@ public function stream($limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return BuildInstance[] Array of results
*/
- public function read($limit = null, $pageSize = null)
+ public function read(int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($limit, $pageSize), false);
}
+ /**
+ * Streams BuildInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of BuildInstance records from the API.
* Request is executed immediately
@@ -93,21 +138,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of BuildInstance
+ * @return BuildPage Page of BuildInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): BuildPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new BuildPage($this->version, $response, $this->solution);
}
@@ -117,9 +163,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of BuildInstance
+ * @return BuildPage Page of BuildInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): BuildPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -129,46 +175,22 @@ public function getPage($targetUrl)
return new BuildPage($this->version, $response, $this->solution);
}
- /**
- * Create a new BuildInstance
- *
- * @param array|Options $options Optional Arguments
- * @return BuildInstance Newly created BuildInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'AssetVersions' => Serialize::map($options['assetVersions'], function ($e) {
- return $e;
- }),
- 'FunctionVersions' => Serialize::map($options['functionVersions'], function ($e) {
- return $e;
- }),
- 'Dependencies' => $options['dependencies'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new BuildInstance($this->version, $payload, $this->solution['serviceSid']);
- }
/**
* Constructs a BuildContext
*
- * @param string $sid The SID of the Build resource to fetch
- * @return \Twilio\Rest\Serverless\V1\Service\BuildContext
+ * @param string $sid The SID of the Build resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): BuildContext
{
- return new BuildContext($this->version, $this->solution['serviceSid'], $sid);
+ return new BuildContext(
+ $this->version,
+ $this->solution['serviceSid'],
+ $sid
+ );
}
/**
@@ -176,8 +198,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Serverless.V1.BuildList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/BuildOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/BuildOptions.php
index 6ed83ee..d3d1143 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/BuildOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/BuildOptions.php
@@ -1,106 +1,137 @@
options['assetVersions'] = $assetVersions;
$this->options['functionVersions'] = $functionVersions;
$this->options['dependencies'] = $dependencies;
+ $this->options['runtime'] = $runtime;
}
/**
- * The list of Asset Version resource SIDs to include in the build.
+ * The list of Asset Version resource SIDs to include in the Build.
*
- * @param string $assetVersions The list of Asset Version resource SIDs to
- * include in the build
+ * @param string[] $assetVersions The list of Asset Version resource SIDs to include in the Build.
* @return $this Fluent Builder
*/
- public function setAssetVersions($assetVersions)
+ public function setAssetVersions(array $assetVersions): self
{
$this->options['assetVersions'] = $assetVersions;
return $this;
}
/**
- * The list of the Variable resource SIDs to include in the build.
+ * The list of the Function Version resource SIDs to include in the Build.
*
- * @param string $functionVersions The list of the Variable resource SIDs to
- * include in the build
+ * @param string[] $functionVersions The list of the Function Version resource SIDs to include in the Build.
* @return $this Fluent Builder
*/
- public function setFunctionVersions($functionVersions)
+ public function setFunctionVersions(array $functionVersions): self
{
$this->options['functionVersions'] = $functionVersions;
return $this;
}
/**
- * A list of objects that describe the Dependencies included in the build. Each object contains the `name` and `version` of the dependency.
+ * A list of objects that describe the Dependencies included in the Build. Each object contains the `name` and `version` of the dependency.
*
- * @param string $dependencies A list of objects that describe the Dependencies
- * included in the build
+ * @param string $dependencies A list of objects that describe the Dependencies included in the Build. Each object contains the `name` and `version` of the dependency.
* @return $this Fluent Builder
*/
- public function setDependencies($dependencies)
+ public function setDependencies(string $dependencies): self
{
$this->options['dependencies'] = $dependencies;
return $this;
}
+ /**
+ * The Runtime version that will be used to run the Build resource when it is deployed.
+ *
+ * @param string $runtime The Runtime version that will be used to run the Build resource when it is deployed.
+ * @return $this Fluent Builder
+ */
+ public function setRuntime(string $runtime): self
+ {
+ $this->options['runtime'] = $runtime;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Serverless.V1.CreateBuildOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Serverless.V1.CreateBuildOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
+
+
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/BuildPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/BuildPage.php
index bef0323..a6b6750 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/BuildPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/BuildPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return BuildInstance \Twilio\Rest\Serverless\V1\Service\BuildInstance
+ */
+ public function buildInstance(array $payload): BuildInstance
{
return new BuildInstance($this->version, $payload, $this->solution['serviceSid']);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Serverless.V1.BuildPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/DeploymentContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/DeploymentContext.php
index 828a91d..63e4717 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/DeploymentContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/DeploymentContext.php
@@ -2,63 +2,72 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Serverless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Serverless\V1\Service\Environment;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
class DeploymentContext extends InstanceContext
-{
+ {
/**
* Initialize the DeploymentContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the Deployment
- * resource from
- * @param string $environmentSid The SID of the environment used by the
- * Deployment to fetch
- * @param string $sid The SID that identifies the Deployment resource to fetch
- * @return \Twilio\Rest\Serverless\V1\Service\Environment\DeploymentContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the Service to create the Deployment resource under.
+ * @param string $environmentSid The SID of the Environment for the Deployment.
+ * @param string $sid The SID that identifies the Deployment resource to fetch.
*/
- public function __construct(Version $version, $serviceSid, $environmentSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $environmentSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'environmentSid' => $environmentSid,
- 'sid' => $sid,
- );
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'environmentSid' =>
+ $environmentSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Environments/' . \rawurlencode($environmentSid) . '/Deployments/' . \rawurlencode($sid) . '';
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Environments/' . \rawurlencode($environmentSid)
+ .'/Deployments/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a DeploymentInstance
+ * Fetch the DeploymentInstance
*
* @return DeploymentInstance Fetched DeploymentInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): DeploymentInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new DeploymentInstance(
$this->version,
@@ -69,17 +78,18 @@ public function fetch()
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Serverless.V1.DeploymentContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/DeploymentInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/DeploymentInstance.php
index 961e6b5..8f2e6eb 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/DeploymentInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/DeploymentInstance.php
@@ -2,50 +2,55 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Serverless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Serverless\V1\Service\Environment;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property string $sid
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $environmentSid
- * @property string $buildSid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $environmentSid
+ * @property string|null $buildSid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
*/
class DeploymentInstance extends InstanceResource
{
/**
* Initialize the DeploymentInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the Deployment
- * resource is associated with
- * @param string $environmentSid The SID of the environment for the deployment
- * @param string $sid The SID that identifies the Deployment resource to fetch
- * @return \Twilio\Rest\Serverless\V1\Service\Environment\DeploymentInstance
+ * @param string $serviceSid The SID of the Service to create the Deployment resource under.
+ * @param string $environmentSid The SID of the Environment for the Deployment.
+ * @param string $sid The SID that identifies the Deployment resource to fetch.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $environmentSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $environmentSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
@@ -54,22 +59,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $envi
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'environmentSid' => $environmentSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['serviceSid' => $serviceSid, 'environmentSid' => $environmentSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Serverless\V1\Service\Environment\DeploymentContext Context for this DeploymentInstance
+ * @return DeploymentContext Context for this DeploymentInstance
*/
- protected function proxy()
+ protected function proxy(): DeploymentContext
{
if (!$this->context) {
$this->context = new DeploymentContext(
@@ -84,13 +85,14 @@ protected function proxy()
}
/**
- * Fetch a DeploymentInstance
+ * Fetch the DeploymentInstance
*
* @return DeploymentInstance Fetched DeploymentInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): DeploymentInstance
{
+
return $this->proxy()->fetch();
}
@@ -101,7 +103,7 @@ public function fetch()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -120,12 +122,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Serverless.V1.DeploymentInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/DeploymentList.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/DeploymentList.php
index 9e6c3b1..3588ec5 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/DeploymentList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/DeploymentList.php
@@ -2,69 +2,91 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Serverless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Serverless\V1\Service\Environment;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
+use Twilio\Options;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
class DeploymentList extends ListResource
-{
+ {
/**
* Construct the DeploymentList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the Deployment
- * resource is associated with
- * @param string $environmentSid The SID of the environment for the deployment
- * @return \Twilio\Rest\Serverless\V1\Service\Environment\DeploymentList
+ * @param string $serviceSid The SID of the Service to create the Deployment resource under.
+ * @param string $environmentSid The SID of the Environment for the Deployment.
*/
- public function __construct(Version $version, $serviceSid, $environmentSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid,
+ string $environmentSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'environmentSid' => $environmentSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Environments/' . \rawurlencode($environmentSid) . '/Deployments';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ 'environmentSid' =>
+ $environmentSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Environments/' . \rawurlencode($environmentSid)
+ .'/Deployments';
}
/**
- * Streams DeploymentInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the DeploymentInstance
*
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @param array|Options $options Optional Arguments
+ * @return DeploymentInstance Created DeploymentInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($limit = null, $pageSize = null)
+ public function create(array $options = []): DeploymentInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'BuildSid' =>
+ $options['buildSid'],
+ 'IsPlugin' =>
+ Serialize::booleanToString($options['isPlugin']),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new DeploymentInstance(
+ $this->version,
+ $payload,
+ $this->solution['serviceSid'],
+ $this->solution['environmentSid']
+ );
}
+
/**
* Reads DeploymentInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -80,11 +102,38 @@ public function stream($limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return DeploymentInstance[] Array of results
*/
- public function read($limit = null, $pageSize = null)
+ public function read(int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($limit, $pageSize), false);
}
+ /**
+ * Streams DeploymentInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of DeploymentInstance records from the API.
* Request is executed immediately
@@ -92,21 +141,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of DeploymentInstance
+ * @return DeploymentPage Page of DeploymentInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): DeploymentPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new DeploymentPage($this->version, $response, $this->solution);
}
@@ -116,9 +166,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of DeploymentInstance
+ * @return DeploymentPage Page of DeploymentInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): DeploymentPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -128,39 +178,16 @@ public function getPage($targetUrl)
return new DeploymentPage($this->version, $response, $this->solution);
}
- /**
- * Create a new DeploymentInstance
- *
- * @param string $buildSid The SID of the build for the deployment
- * @return DeploymentInstance Newly created DeploymentInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($buildSid)
- {
- $data = Values::of(array('BuildSid' => $buildSid,));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new DeploymentInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['environmentSid']
- );
- }
/**
* Constructs a DeploymentContext
*
- * @param string $sid The SID that identifies the Deployment resource to fetch
- * @return \Twilio\Rest\Serverless\V1\Service\Environment\DeploymentContext
+ * @param string $sid The SID that identifies the Deployment resource to fetch.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): DeploymentContext
{
return new DeploymentContext(
$this->version,
@@ -175,8 +202,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Serverless.V1.DeploymentList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/DeploymentPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/DeploymentPage.php
index fa97dfb..d82d856 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/DeploymentPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/DeploymentPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return DeploymentInstance \Twilio\Rest\Serverless\V1\Service\Environment\DeploymentInstance
+ */
+ public function buildInstance(array $payload): DeploymentInstance
{
- return new DeploymentInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['environmentSid']
- );
+ return new DeploymentInstance($this->version, $payload, $this->solution['serviceSid'], $this->solution['environmentSid']);
}
/**
@@ -39,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Serverless.V1.DeploymentPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/LogContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/LogContext.php
index a19c8fa..2ef779e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/LogContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/LogContext.php
@@ -2,63 +2,72 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Serverless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Serverless\V1\Service\Environment;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
class LogContext extends InstanceContext
-{
+ {
/**
* Initialize the LogContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the Log resource
- * from
- * @param string $environmentSid The SID of the environment with the Log
- * resource to fetch
- * @param string $sid The SID that identifies the Log resource to fetch
- * @return \Twilio\Rest\Serverless\V1\Service\Environment\LogContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the Service to fetch the Log resource from.
+ * @param string $environmentSid The SID of the environment with the Log resource to fetch.
+ * @param string $sid The SID of the Log resource to fetch.
*/
- public function __construct(Version $version, $serviceSid, $environmentSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $environmentSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'environmentSid' => $environmentSid,
- 'sid' => $sid,
- );
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'environmentSid' =>
+ $environmentSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Environments/' . \rawurlencode($environmentSid) . '/Logs/' . \rawurlencode($sid) . '';
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Environments/' . \rawurlencode($environmentSid)
+ .'/Logs/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a LogInstance
+ * Fetch the LogInstance
*
* @return LogInstance Fetched LogInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): LogInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new LogInstance(
$this->version,
@@ -69,17 +78,18 @@ public function fetch()
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Serverless.V1.LogContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/LogInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/LogInstance.php
index 217e277..7cc0b3d 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/LogInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/LogInstance.php
@@ -2,58 +2,64 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Serverless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Serverless\V1\Service\Environment;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property string $sid
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $environmentSid
- * @property string $deploymentSid
- * @property string $functionSid
- * @property string $requestSid
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $environmentSid
+ * @property string|null $buildSid
+ * @property string|null $deploymentSid
+ * @property string|null $functionSid
+ * @property string|null $requestSid
* @property string $level
- * @property string $message
- * @property \DateTime $dateCreated
- * @property string $url
+ * @property string|null $message
+ * @property \DateTime|null $dateCreated
+ * @property string|null $url
*/
class LogInstance extends InstanceResource
{
/**
* Initialize the LogInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the Log resource is
- * associated with
- * @param string $environmentSid The SID of the environment in which the log
- * occurred
- * @param string $sid The SID that identifies the Log resource to fetch
- * @return \Twilio\Rest\Serverless\V1\Service\Environment\LogInstance
+ * @param string $serviceSid The SID of the Service to fetch the Log resource from.
+ * @param string $environmentSid The SID of the environment with the Log resource to fetch.
+ * @param string $sid The SID of the Log resource to fetch.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $environmentSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $environmentSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
'environmentSid' => Values::array_get($payload, 'environment_sid'),
+ 'buildSid' => Values::array_get($payload, 'build_sid'),
'deploymentSid' => Values::array_get($payload, 'deployment_sid'),
'functionSid' => Values::array_get($payload, 'function_sid'),
'requestSid' => Values::array_get($payload, 'request_sid'),
@@ -61,24 +67,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $envi
'message' => Values::array_get($payload, 'message'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'environmentSid' => $environmentSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['serviceSid' => $serviceSid, 'environmentSid' => $environmentSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Serverless\V1\Service\Environment\LogContext Context
- * for this
- * LogInstance
+ * @return LogContext Context for this LogInstance
*/
- protected function proxy()
+ protected function proxy(): LogContext
{
if (!$this->context) {
$this->context = new LogContext(
@@ -93,13 +93,14 @@ protected function proxy()
}
/**
- * Fetch a LogInstance
+ * Fetch the LogInstance
*
* @return LogInstance Fetched LogInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): LogInstance
{
+
return $this->proxy()->fetch();
}
@@ -110,7 +111,7 @@ public function fetch()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -129,12 +130,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Serverless.V1.LogInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/LogList.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/LogList.php
index af8dbbe..983658c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/LogList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/LogList.php
@@ -2,42 +2,78 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Serverless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Serverless\V1\Service\Environment;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
class LogList extends ListResource
-{
+ {
/**
* Construct the LogList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the Log resource is
- * associated with
- * @param string $environmentSid The SID of the environment in which the log
- * occurred
- * @return \Twilio\Rest\Serverless\V1\Service\Environment\LogList
+ * @param string $serviceSid The SID of the Service to fetch the Log resource from.
+ * @param string $environmentSid The SID of the environment with the Log resource to fetch.
*/
- public function __construct(Version $version, $serviceSid, $environmentSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid,
+ string $environmentSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'environmentSid' => $environmentSid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ 'environmentSid' =>
+ $environmentSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Environments/' . \rawurlencode($environmentSid)
+ .'/Logs';
+ }
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Environments/' . \rawurlencode($environmentSid) . '/Logs';
+ /**
+ * Reads LogInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return LogInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -57,9 +93,9 @@ public function __construct(Version $version, $serviceSid, $environmentSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -68,54 +104,37 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads LogInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return LogInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of LogInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of LogInstance
+ * @return LogPage Page of LogInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): LogPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'FunctionSid' => $options['functionSid'],
- 'StartDate' => Serialize::iso8601DateTime($options['startDate']),
- 'EndDate' => Serialize::iso8601DateTime($options['endDate']),
+
+ $params = Values::of([
+ 'FunctionSid' =>
+ $options['functionSid'],
+ 'StartDate' =>
+ Serialize::iso8601DateTime($options['startDate']),
+ 'EndDate' =>
+ Serialize::iso8601DateTime($options['endDate']),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new LogPage($this->version, $response, $this->solution);
}
@@ -125,9 +144,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of LogInstance
+ * @return LogPage Page of LogInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): LogPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -137,13 +156,16 @@ public function getPage($targetUrl)
return new LogPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a LogContext
*
- * @param string $sid The SID that identifies the Log resource to fetch
- * @return \Twilio\Rest\Serverless\V1\Service\Environment\LogContext
+ * @param string $sid The SID of the Log resource to fetch.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): LogContext
{
return new LogContext(
$this->version,
@@ -158,8 +180,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Serverless.V1.LogList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/LogOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/LogOptions.php
index b1bab10..30ab789 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/LogOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/LogOptions.php
@@ -1,10 +1,16 @@
options['functionSid'] = $functionSid;
$this->options['startDate'] = $startDate;
$this->options['endDate'] = $endDate;
@@ -52,11 +67,10 @@ public function __construct($functionSid = Values::NONE, $startDate = Values::NO
/**
* The SID of the function whose invocation produced the Log resources to read.
*
- * @param string $functionSid The SID of the function whose invocation produced
- * the Log resources to read
+ * @param string $functionSid The SID of the function whose invocation produced the Log resources to read.
* @return $this Fluent Builder
*/
- public function setFunctionSid($functionSid)
+ public function setFunctionSid(string $functionSid): self
{
$this->options['functionSid'] = $functionSid;
return $this;
@@ -65,11 +79,10 @@ public function setFunctionSid($functionSid)
/**
* The date/time (in GMT, ISO 8601) after which the Log resources must have been created. Defaults to 1 day prior to current date/time.
*
- * @param \DateTime $startDate The date and time after which the Log resources
- * must have been created.
+ * @param \DateTime $startDate The date/time (in GMT, ISO 8601) after which the Log resources must have been created. Defaults to 1 day prior to current date/time.
* @return $this Fluent Builder
*/
- public function setStartDate($startDate)
+ public function setStartDate(\DateTime $startDate): self
{
$this->options['startDate'] = $startDate;
return $this;
@@ -78,11 +91,10 @@ public function setStartDate($startDate)
/**
* The date/time (in GMT, ISO 8601) before which the Log resources must have been created. Defaults to current date/time.
*
- * @param \DateTime $endDate The date and time before which the Log resource
- * must have been created.
+ * @param \DateTime $endDate The date/time (in GMT, ISO 8601) before which the Log resources must have been created. Defaults to current date/time.
* @return $this Fluent Builder
*/
- public function setEndDate($endDate)
+ public function setEndDate(\DateTime $endDate): self
{
$this->options['endDate'] = $endDate;
return $this;
@@ -93,14 +105,10 @@ public function setEndDate($endDate)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Serverless.V1.ReadLogOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Serverless.V1.ReadLogOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/LogPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/LogPage.php
index e7bb4a2..074ff00 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/LogPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/LogPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return LogInstance \Twilio\Rest\Serverless\V1\Service\Environment\LogInstance
+ */
+ public function buildInstance(array $payload): LogInstance
{
- return new LogInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['environmentSid']
- );
+ return new LogInstance($this->version, $payload, $this->solution['serviceSid'], $this->solution['environmentSid']);
}
/**
@@ -39,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Serverless.V1.LogPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/VariableContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/VariableContext.php
index 15f12e5..9c40c8d 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/VariableContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/VariableContext.php
@@ -2,64 +2,87 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Serverless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Serverless\V1\Service\Environment;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
class VariableContext extends InstanceContext
-{
+ {
/**
* Initialize the VariableContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the Variable
- * resource from
- * @param string $environmentSid The SID of the environment with the Variable
- * resource to fetch
- * @param string $sid The SID of the Variable resource to fetch
- * @return \Twilio\Rest\Serverless\V1\Service\Environment\VariableContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the Service to create the Variable resource under.
+ * @param string $environmentSid The SID of the Environment in which the Variable resource exists.
+ * @param string $sid The SID of the Variable resource to delete.
*/
- public function __construct(Version $version, $serviceSid, $environmentSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $environmentSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'environmentSid' => $environmentSid,
- 'sid' => $sid,
- );
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'environmentSid' =>
+ $environmentSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Environments/' . \rawurlencode($environmentSid)
+ .'/Variables/' . \rawurlencode($sid)
+ .'';
+ }
+
+ /**
+ * Delete the VariableInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Environments/' . \rawurlencode($environmentSid) . '/Variables/' . \rawurlencode($sid) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a VariableInstance
+ * Fetch the VariableInstance
*
* @return VariableInstance Fetched VariableInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): VariableInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new VariableInstance(
$this->version,
@@ -70,6 +93,7 @@ public function fetch()
);
}
+
/**
* Update the VariableInstance
*
@@ -77,18 +101,20 @@ public function fetch()
* @return VariableInstance Updated VariableInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): VariableInstance
{
+
$options = new Values($options);
- $data = Values::of(array('Key' => $options['key'], 'Value' => $options['value'],));
+ $data = Values::of([
+ 'Key' =>
+ $options['key'],
+ 'Value' =>
+ $options['value'],
+ ]);
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new VariableInstance(
$this->version,
@@ -99,28 +125,18 @@ public function update($options = array())
);
}
- /**
- * Deletes the VariableInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Serverless.V1.VariableContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/VariableInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/VariableInstance.php
index 52773c7..7357485 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/VariableInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/VariableInstance.php
@@ -2,53 +2,57 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Serverless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Serverless\V1\Service\Environment;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property string $sid
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $environmentSid
- * @property string $key
- * @property string $value
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $environmentSid
+ * @property string|null $key
+ * @property string|null $value
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
*/
class VariableInstance extends InstanceResource
{
/**
* Initialize the VariableInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the Variable resource
- * is associated with
- * @param string $environmentSid The SID of the environment in which the
- * variable exists
- * @param string $sid The SID of the Variable resource to fetch
- * @return \Twilio\Rest\Serverless\V1\Service\Environment\VariableInstance
+ * @param string $serviceSid The SID of the Service to create the Variable resource under.
+ * @param string $environmentSid The SID of the Environment in which the Variable resource exists.
+ * @param string $sid The SID of the Variable resource to delete.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $environmentSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $environmentSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
@@ -58,22 +62,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $envi
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'environmentSid' => $environmentSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['serviceSid' => $serviceSid, 'environmentSid' => $environmentSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Serverless\V1\Service\Environment\VariableContext Context for this VariableInstance
+ * @return VariableContext Context for this VariableInstance
*/
- protected function proxy()
+ protected function proxy(): VariableContext
{
if (!$this->context) {
$this->context = new VariableContext(
@@ -88,37 +88,40 @@ protected function proxy()
}
/**
- * Fetch a VariableInstance
+ * Delete the VariableInstance
*
- * @return VariableInstance Fetched VariableInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Update the VariableInstance
+ * Fetch the VariableInstance
*
- * @param array|Options $options Optional Arguments
- * @return VariableInstance Updated VariableInstance
+ * @return VariableInstance Fetched VariableInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): VariableInstance
{
- return $this->proxy()->update($options);
+
+ return $this->proxy()->fetch();
}
/**
- * Deletes the VariableInstance
+ * Update the VariableInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return VariableInstance Updated VariableInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): VariableInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->update($options);
}
/**
@@ -128,7 +131,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -147,12 +150,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Serverless.V1.VariableInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/VariableList.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/VariableList.php
index 722b61e..ceded14 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/VariableList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/VariableList.php
@@ -2,70 +2,88 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Serverless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Serverless\V1\Service\Environment;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
+
class VariableList extends ListResource
-{
+ {
/**
* Construct the VariableList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the Variable resource
- * is associated with
- * @param string $environmentSid The SID of the environment in which the
- * variable exists
- * @return \Twilio\Rest\Serverless\V1\Service\Environment\VariableList
+ * @param string $serviceSid The SID of the Service to create the Variable resource under.
+ * @param string $environmentSid The SID of the Environment in which the Variable resource exists.
*/
- public function __construct(Version $version, $serviceSid, $environmentSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid,
+ string $environmentSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'environmentSid' => $environmentSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Environments/' . \rawurlencode($environmentSid) . '/Variables';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ 'environmentSid' =>
+ $environmentSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Environments/' . \rawurlencode($environmentSid)
+ .'/Variables';
}
/**
- * Streams VariableInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the VariableInstance
*
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @param string $key A string by which the Variable resource can be referenced. It can be a maximum of 128 characters.
+ * @param string $value A string that contains the actual value of the Variable. It can be a maximum of 450 bytes in size.
+ * @return VariableInstance Created VariableInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($limit = null, $pageSize = null)
+ public function create(string $key, string $value): VariableInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($limits['pageSize']);
+ $data = Values::of([
+ 'Key' =>
+ $key,
+ 'Value' =>
+ $value,
+ ]);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new VariableInstance(
+ $this->version,
+ $payload,
+ $this->solution['serviceSid'],
+ $this->solution['environmentSid']
+ );
}
+
/**
* Reads VariableInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -81,11 +99,38 @@ public function stream($limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return VariableInstance[] Array of results
*/
- public function read($limit = null, $pageSize = null)
+ public function read(int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($limit, $pageSize), false);
}
+ /**
+ * Streams VariableInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of VariableInstance records from the API.
* Request is executed immediately
@@ -93,21 +138,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of VariableInstance
+ * @return VariablePage Page of VariableInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): VariablePage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new VariablePage($this->version, $response, $this->solution);
}
@@ -117,9 +163,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of VariableInstance
+ * @return VariablePage Page of VariableInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): VariablePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -129,40 +175,16 @@ public function getPage($targetUrl)
return new VariablePage($this->version, $response, $this->solution);
}
- /**
- * Create a new VariableInstance
- *
- * @param string $key A string by which the Variable resource can be referenced
- * @param string $value A string that contains the actual value of the variable
- * @return VariableInstance Newly created VariableInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($key, $value)
- {
- $data = Values::of(array('Key' => $key, 'Value' => $value,));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new VariableInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['environmentSid']
- );
- }
/**
* Constructs a VariableContext
*
- * @param string $sid The SID of the Variable resource to fetch
- * @return \Twilio\Rest\Serverless\V1\Service\Environment\VariableContext
+ * @param string $sid The SID of the Variable resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): VariableContext
{
return new VariableContext(
$this->version,
@@ -177,8 +199,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Serverless.V1.VariableList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/VariableOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/VariableOptions.php
index 8330877..7f0840a 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/VariableOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/VariableOptions.php
@@ -1,10 +1,16 @@
options['key'] = $key;
$this->options['value'] = $value;
}
/**
- * A string by which the Variable resource can be referenced. Must be less than 128 characters long.
+ * A string by which the Variable resource can be referenced. It can be a maximum of 128 characters.
*
- * @param string $key A string by which the Variable resource can be referenced
+ * @param string $key A string by which the Variable resource can be referenced. It can be a maximum of 128 characters.
* @return $this Fluent Builder
*/
- public function setKey($key)
+ public function setKey(string $key): self
{
$this->options['key'] = $key;
return $this;
}
/**
- * A string that contains the actual value of the variable. Must have less than 450 bytes.
+ * A string that contains the actual value of the Variable. It can be a maximum of 450 bytes in size.
*
- * @param string $value A string that contains the actual value of the variable
+ * @param string $value A string that contains the actual value of the Variable. It can be a maximum of 450 bytes in size.
* @return $this Fluent Builder
*/
- public function setValue($value)
+ public function setValue(string $value): self
{
$this->options['value'] = $value;
return $this;
@@ -69,14 +93,10 @@ public function setValue($value)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Serverless.V1.UpdateVariableOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Serverless.V1.UpdateVariableOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/VariablePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/VariablePage.php
index f25d258..f16a49c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/VariablePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/Environment/VariablePage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return VariableInstance \Twilio\Rest\Serverless\V1\Service\Environment\VariableInstance
+ */
+ public function buildInstance(array $payload): VariableInstance
{
- return new VariableInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['environmentSid']
- );
+ return new VariableInstance($this->version, $payload, $this->solution['serviceSid'], $this->solution['environmentSid']);
}
/**
@@ -39,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Serverless.V1.VariablePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/EnvironmentContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/EnvironmentContext.php
index c330952..ada5cfd 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/EnvironmentContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/EnvironmentContext.php
@@ -2,71 +2,97 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Serverless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Serverless\V1\Service;
use Twilio\Exceptions\TwilioException;
+use Twilio\ListResource;
+use Twilio\Values;
+use Twilio\Version;
use Twilio\InstanceContext;
-use Twilio\Rest\Serverless\V1\Service\Environment\DeploymentList;
use Twilio\Rest\Serverless\V1\Service\Environment\LogList;
+use Twilio\Rest\Serverless\V1\Service\Environment\DeploymentList;
use Twilio\Rest\Serverless\V1\Service\Environment\VariableList;
-use Twilio\Values;
-use Twilio\Version;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property \Twilio\Rest\Serverless\V1\Service\Environment\VariableList $variables
- * @property \Twilio\Rest\Serverless\V1\Service\Environment\DeploymentList $deployments
- * @property \Twilio\Rest\Serverless\V1\Service\Environment\LogList $logs
+ * @property LogList $logs
+ * @property DeploymentList $deployments
+ * @property VariableList $variables
+ * @method \Twilio\Rest\Serverless\V1\Service\Environment\LogContext logs(string $sid)
* @method \Twilio\Rest\Serverless\V1\Service\Environment\VariableContext variables(string $sid)
* @method \Twilio\Rest\Serverless\V1\Service\Environment\DeploymentContext deployments(string $sid)
- * @method \Twilio\Rest\Serverless\V1\Service\Environment\LogContext logs(string $sid)
*/
class EnvironmentContext extends InstanceContext
-{
- protected $_variables = null;
- protected $_deployments = null;
- protected $_logs = null;
+ {
+ protected $_logs;
+ protected $_deployments;
+ protected $_variables;
/**
* Initialize the EnvironmentContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the Environment
- * resource from
- * @param string $sid The SID of the Environment resource to fetch
- * @return \Twilio\Rest\Serverless\V1\Service\EnvironmentContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the Service to create the Environment resource under.
+ * @param string $sid The SID of the Environment resource to delete.
*/
- public function __construct(Version $version, $serviceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Environments/' . \rawurlencode($sid)
+ .'';
+ }
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Environments/' . \rawurlencode($sid) . '';
+ /**
+ * Delete the EnvironmentInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a EnvironmentInstance
+ * Fetch the EnvironmentInstance
*
* @return EnvironmentInstance Fetched EnvironmentInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): EnvironmentInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new EnvironmentInstance(
$this->version,
@@ -76,41 +102,27 @@ public function fetch()
);
}
- /**
- * Deletes the EnvironmentInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
- * Access the variables
- *
- * @return \Twilio\Rest\Serverless\V1\Service\Environment\VariableList
+ * Access the logs
*/
- protected function getVariables()
+ protected function getLogs(): LogList
{
- if (!$this->_variables) {
- $this->_variables = new VariableList(
+ if (!$this->_logs) {
+ $this->_logs = new LogList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sid']
);
}
- return $this->_variables;
+ return $this->_logs;
}
/**
* Access the deployments
- *
- * @return \Twilio\Rest\Serverless\V1\Service\Environment\DeploymentList
*/
- protected function getDeployments()
+ protected function getDeployments(): DeploymentList
{
if (!$this->_deployments) {
$this->_deployments = new DeploymentList(
@@ -124,27 +136,29 @@ protected function getDeployments()
}
/**
- * Access the logs
- *
- * @return \Twilio\Rest\Serverless\V1\Service\Environment\LogList
+ * Access the variables
*/
- protected function getLogs()
+ protected function getVariables(): VariableList
{
- if (!$this->_logs) {
- $this->_logs = new LogList($this->version, $this->solution['serviceSid'], $this->solution['sid']);
+ if (!$this->_variables) {
+ $this->_variables = new VariableList(
+ $this->version,
+ $this->solution['serviceSid'],
+ $this->solution['sid']
+ );
}
- return $this->_logs;
+ return $this->_variables;
}
/**
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -159,10 +173,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -177,12 +191,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Serverless.V1.EnvironmentContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/EnvironmentInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/EnvironmentInstance.php
index dfbbe78..c4cc8bc 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/EnvironmentInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/EnvironmentInstance.php
@@ -2,56 +2,64 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Serverless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Serverless\V1\Service;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Serverless\V1\Service\Environment\LogList;
+use Twilio\Rest\Serverless\V1\Service\Environment\DeploymentList;
+use Twilio\Rest\Serverless\V1\Service\Environment\VariableList;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property string $sid
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $buildSid
- * @property string $uniqueName
- * @property string $domainSuffix
- * @property string $domainName
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
- * @property array $links
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $buildSid
+ * @property string|null $uniqueName
+ * @property string|null $domainSuffix
+ * @property string|null $domainName
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
+ * @property array|null $links
*/
class EnvironmentInstance extends InstanceResource
{
- protected $_variables = null;
- protected $_deployments = null;
- protected $_logs = null;
+ protected $_logs;
+ protected $_deployments;
+ protected $_variables;
/**
* Initialize the EnvironmentInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the Environment
- * resource is associated with
- * @param string $sid The SID of the Environment resource to fetch
- * @return \Twilio\Rest\Serverless\V1\Service\EnvironmentInstance
+ * @param string $serviceSid The SID of the Service to create the Environment resource under.
+ * @param string $sid The SID of the Environment resource to delete.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
@@ -63,20 +71,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $sid
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Serverless\V1\Service\EnvironmentContext Context for
- * this
- * EnvironmentInstance
+ * @return EnvironmentContext Context for this EnvironmentInstance
*/
- protected function proxy()
+ protected function proxy(): EnvironmentContext
{
if (!$this->context) {
$this->context = new EnvironmentContext(
@@ -90,55 +96,51 @@ protected function proxy()
}
/**
- * Fetch a EnvironmentInstance
+ * Delete the EnvironmentInstance
*
- * @return EnvironmentInstance Fetched EnvironmentInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the EnvironmentInstance
+ * Fetch the EnvironmentInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return EnvironmentInstance Fetched EnvironmentInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): EnvironmentInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
- * Access the variables
- *
- * @return \Twilio\Rest\Serverless\V1\Service\Environment\VariableList
+ * Access the logs
*/
- protected function getVariables()
+ protected function getLogs(): LogList
{
- return $this->proxy()->variables;
+ return $this->proxy()->logs;
}
/**
* Access the deployments
- *
- * @return \Twilio\Rest\Serverless\V1\Service\Environment\DeploymentList
*/
- protected function getDeployments()
+ protected function getDeployments(): DeploymentList
{
return $this->proxy()->deployments;
}
/**
- * Access the logs
- *
- * @return \Twilio\Rest\Serverless\V1\Service\Environment\LogList
+ * Access the variables
*/
- protected function getLogs()
+ protected function getVariables(): VariableList
{
- return $this->proxy()->logs;
+ return $this->proxy()->variables;
}
/**
@@ -148,7 +150,7 @@ protected function getLogs()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -167,12 +169,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Serverless.V1.EnvironmentInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/EnvironmentList.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/EnvironmentList.php
index 624618d..f4be23c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/EnvironmentList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/EnvironmentList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Serverless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Serverless\V1\Service;
@@ -12,59 +19,67 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
+
class EnvironmentList extends ListResource
-{
+ {
/**
* Construct the EnvironmentList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the Environment
- * resource is associated with
- * @return \Twilio\Rest\Serverless\V1\Service\EnvironmentList
+ * @param string $serviceSid The SID of the Service to create the Environment resource under.
*/
- public function __construct(Version $version, $serviceSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Environments';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Environments';
}
/**
- * Streams EnvironmentInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the EnvironmentInstance
*
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @param string $uniqueName A user-defined string that uniquely identifies the Environment resource. It can be a maximum of 100 characters.
+ * @param array|Options $options Optional Arguments
+ * @return EnvironmentInstance Created EnvironmentInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($limit = null, $pageSize = null)
+ public function create(string $uniqueName, array $options = []): EnvironmentInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'UniqueName' =>
+ $uniqueName,
+ 'DomainSuffix' =>
+ $options['domainSuffix'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new EnvironmentInstance(
+ $this->version,
+ $payload,
+ $this->solution['serviceSid']
+ );
}
+
/**
* Reads EnvironmentInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -80,11 +95,38 @@ public function stream($limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return EnvironmentInstance[] Array of results
*/
- public function read($limit = null, $pageSize = null)
+ public function read(int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($limit, $pageSize), false);
}
+ /**
+ * Streams EnvironmentInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of EnvironmentInstance records from the API.
* Request is executed immediately
@@ -92,21 +134,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of EnvironmentInstance
+ * @return EnvironmentPage Page of EnvironmentInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): EnvironmentPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new EnvironmentPage($this->version, $response, $this->solution);
}
@@ -116,9 +159,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of EnvironmentInstance
+ * @return EnvironmentPage Page of EnvironmentInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): EnvironmentPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -128,40 +171,22 @@ public function getPage($targetUrl)
return new EnvironmentPage($this->version, $response, $this->solution);
}
- /**
- * Create a new EnvironmentInstance
- *
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the Environment resource
- * @param array|Options $options Optional Arguments
- * @return EnvironmentInstance Newly created EnvironmentInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($uniqueName, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array('UniqueName' => $uniqueName, 'DomainSuffix' => $options['domainSuffix'],));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new EnvironmentInstance($this->version, $payload, $this->solution['serviceSid']);
- }
/**
* Constructs a EnvironmentContext
*
- * @param string $sid The SID of the Environment resource to fetch
- * @return \Twilio\Rest\Serverless\V1\Service\EnvironmentContext
+ * @param string $sid The SID of the Environment resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): EnvironmentContext
{
- return new EnvironmentContext($this->version, $this->solution['serviceSid'], $sid);
+ return new EnvironmentContext(
+ $this->version,
+ $this->solution['serviceSid'],
+ $sid
+ );
}
/**
@@ -169,8 +194,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Serverless.V1.EnvironmentList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/EnvironmentOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/EnvironmentOptions.php
index 289dfd6..a6de4f2 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/EnvironmentOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/EnvironmentOptions.php
@@ -1,10 +1,16 @@
options['domainSuffix'] = $domainSuffix;
}
/**
- * A URL-friendly name that represents the environment and forms part of the domain name. Must have fewer than 32 characters.
+ * A URL-friendly name that represents the environment and forms part of the domain name. It can be a maximum of 16 characters.
*
- * @param string $domainSuffix A URL-friendly name that represents the
- * environment
+ * @param string $domainSuffix A URL-friendly name that represents the environment and forms part of the domain name. It can be a maximum of 16 characters.
* @return $this Fluent Builder
*/
- public function setDomainSuffix($domainSuffix)
+ public function setDomainSuffix(string $domainSuffix): self
{
$this->options['domainSuffix'] = $domainSuffix;
return $this;
@@ -57,14 +70,13 @@ public function setDomainSuffix($domainSuffix)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Serverless.V1.CreateEnvironmentOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Serverless.V1.CreateEnvironmentOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
+
+
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/EnvironmentPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/EnvironmentPage.php
index 4789a98..0e868ca 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/EnvironmentPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/EnvironmentPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return EnvironmentInstance \Twilio\Rest\Serverless\V1\Service\EnvironmentInstance
+ */
+ public function buildInstance(array $payload): EnvironmentInstance
{
return new EnvironmentInstance($this->version, $payload, $this->solution['serviceSid']);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Serverless.V1.EnvironmentPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/FunctionContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/FunctionContext.php
index 950234c..df37d21 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/FunctionContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/FunctionContext.php
@@ -2,63 +2,89 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Serverless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Serverless\V1\Service;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
-use Twilio\Rest\Serverless\V1\Service\TwilioFunction\FunctionVersionList;
+use Twilio\ListResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Serverless\V1\Service\TwilioFunction\FunctionVersionList;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property \Twilio\Rest\Serverless\V1\Service\TwilioFunction\FunctionVersionList $functionVersions
+ * @property FunctionVersionList $functionVersions
* @method \Twilio\Rest\Serverless\V1\Service\TwilioFunction\FunctionVersionContext functionVersions(string $sid)
*/
class FunctionContext extends InstanceContext
-{
- protected $_functionVersions = null;
+ {
+ protected $_functionVersions;
/**
* Initialize the FunctionContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the Function
- * resource from
- * @param string $sid The SID of the Function resource to fetch
- * @return \Twilio\Rest\Serverless\V1\Service\FunctionContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the Service to create the Function resource under.
+ * @param string $sid The SID of the Function resource to delete.
*/
- public function __construct(Version $version, $serviceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Functions/' . \rawurlencode($sid)
+ .'';
+ }
+
+ /**
+ * Delete the FunctionInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Functions/' . \rawurlencode($sid) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a FunctionInstance
+ * Fetch the FunctionInstance
*
* @return FunctionInstance Fetched FunctionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): FunctionInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new FunctionInstance(
$this->version,
@@ -68,34 +94,24 @@ public function fetch()
);
}
- /**
- * Deletes the FunctionInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Update the FunctionInstance
*
- * @param string $friendlyName A string to describe the Function resource
+ * @param string $friendlyName A descriptive string that you create to describe the Function resource. It can be a maximum of 255 characters.
* @return FunctionInstance Updated FunctionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($friendlyName)
+ public function update(string $friendlyName): FunctionInstance
{
- $data = Values::of(array('FriendlyName' => $friendlyName,));
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'FriendlyName' =>
+ $friendlyName,
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new FunctionInstance(
$this->version,
@@ -105,12 +121,11 @@ public function update($friendlyName)
);
}
+
/**
* Access the functionVersions
- *
- * @return \Twilio\Rest\Serverless\V1\Service\TwilioFunction\FunctionVersionList
*/
- protected function getFunctionVersions()
+ protected function getFunctionVersions(): FunctionVersionList
{
if (!$this->_functionVersions) {
$this->_functionVersions = new FunctionVersionList(
@@ -127,10 +142,10 @@ protected function getFunctionVersions()
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -145,10 +160,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -163,12 +178,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Serverless.V1.FunctionContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/FunctionInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/FunctionInstance.php
index 52f0110..893889f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/FunctionInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/FunctionInstance.php
@@ -2,51 +2,57 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Serverless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Serverless\V1\Service;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Serverless\V1\Service\TwilioFunction\FunctionVersionList;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property string $sid
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $friendlyName
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
- * @property array $links
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $friendlyName
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
+ * @property array|null $links
*/
class FunctionInstance extends InstanceResource
{
- protected $_functionVersions = null;
+ protected $_functionVersions;
/**
* Initialize the FunctionInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the Function resource
- * is associated with
- * @param string $sid The SID of the Function resource to fetch
- * @return \Twilio\Rest\Serverless\V1\Service\FunctionInstance
+ * @param string $serviceSid The SID of the Service to create the Function resource under.
+ * @param string $sid The SID of the Function resource to delete.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
@@ -55,19 +61,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $sid
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Serverless\V1\Service\FunctionContext Context for this
- * FunctionInstance
+ * @return FunctionContext Context for this FunctionInstance
*/
- protected function proxy()
+ protected function proxy(): FunctionContext
{
if (!$this->context) {
$this->context = new FunctionContext(
@@ -81,45 +86,46 @@ protected function proxy()
}
/**
- * Fetch a FunctionInstance
+ * Delete the FunctionInstance
*
- * @return FunctionInstance Fetched FunctionInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the FunctionInstance
+ * Fetch the FunctionInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return FunctionInstance Fetched FunctionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): FunctionInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
* Update the FunctionInstance
*
- * @param string $friendlyName A string to describe the Function resource
+ * @param string $friendlyName A descriptive string that you create to describe the Function resource. It can be a maximum of 255 characters.
* @return FunctionInstance Updated FunctionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($friendlyName)
+ public function update(string $friendlyName): FunctionInstance
{
+
return $this->proxy()->update($friendlyName);
}
/**
* Access the functionVersions
- *
- * @return \Twilio\Rest\Serverless\V1\Service\TwilioFunction\FunctionVersionList
*/
- protected function getFunctionVersions()
+ protected function getFunctionVersions(): FunctionVersionList
{
return $this->proxy()->functionVersions;
}
@@ -131,7 +137,7 @@ protected function getFunctionVersions()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -150,12 +156,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Serverless.V1.FunctionInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/FunctionList.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/FunctionList.php
index 7f86e92..d289e92 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/FunctionList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/FunctionList.php
@@ -2,68 +2,78 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Serverless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Serverless\V1\Service;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
+
class FunctionList extends ListResource
-{
+ {
/**
* Construct the FunctionList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the Function resource
- * is associated with
- * @return \Twilio\Rest\Serverless\V1\Service\FunctionList
+ * @param string $serviceSid The SID of the Service to create the Function resource under.
*/
- public function __construct(Version $version, $serviceSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Functions';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Functions';
}
/**
- * Streams FunctionInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the FunctionInstance
*
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @param string $friendlyName A descriptive string that you create to describe the Function resource. It can be a maximum of 255 characters.
+ * @return FunctionInstance Created FunctionInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($limit = null, $pageSize = null)
+ public function create(string $friendlyName): FunctionInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($limits['pageSize']);
+ $data = Values::of([
+ 'FriendlyName' =>
+ $friendlyName,
+ ]);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new FunctionInstance(
+ $this->version,
+ $payload,
+ $this->solution['serviceSid']
+ );
}
+
/**
* Reads FunctionInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -79,11 +89,38 @@ public function stream($limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return FunctionInstance[] Array of results
*/
- public function read($limit = null, $pageSize = null)
+ public function read(int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($limit, $pageSize), false);
}
+ /**
+ * Streams FunctionInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of FunctionInstance records from the API.
* Request is executed immediately
@@ -91,21 +128,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of FunctionInstance
+ * @return FunctionPage Page of FunctionInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): FunctionPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new FunctionPage($this->version, $response, $this->solution);
}
@@ -115,9 +153,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of FunctionInstance
+ * @return FunctionPage Page of FunctionInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): FunctionPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -127,36 +165,22 @@ public function getPage($targetUrl)
return new FunctionPage($this->version, $response, $this->solution);
}
- /**
- * Create a new FunctionInstance
- *
- * @param string $friendlyName A string to describe the Function resource
- * @return FunctionInstance Newly created FunctionInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($friendlyName)
- {
- $data = Values::of(array('FriendlyName' => $friendlyName,));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new FunctionInstance($this->version, $payload, $this->solution['serviceSid']);
- }
/**
* Constructs a FunctionContext
*
- * @param string $sid The SID of the Function resource to fetch
- * @return \Twilio\Rest\Serverless\V1\Service\FunctionContext
+ * @param string $sid The SID of the Function resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): FunctionContext
{
- return new FunctionContext($this->version, $this->solution['serviceSid'], $sid);
+ return new FunctionContext(
+ $this->version,
+ $this->solution['serviceSid'],
+ $sid
+ );
}
/**
@@ -164,8 +188,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Serverless.V1.FunctionList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/FunctionPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/FunctionPage.php
index 561b8f4..be7731f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/FunctionPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/FunctionPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return FunctionInstance \Twilio\Rest\Serverless\V1\Service\FunctionInstance
+ */
+ public function buildInstance(array $payload): FunctionInstance
{
return new FunctionInstance($this->version, $payload, $this->solution['serviceSid']);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Serverless.V1.FunctionPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/TwilioFunction/FunctionVersionContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/TwilioFunction/FunctionVersionContext.php
index 17e4b18..fa25ba4 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/TwilioFunction/FunctionVersionContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/TwilioFunction/FunctionVersionContext.php
@@ -2,60 +2,80 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Serverless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Serverless\V1\Service\TwilioFunction;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Serverless\V1\Service\TwilioFunction\FunctionVersion\FunctionVersionContentList;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
+ * @property FunctionVersionContentList $functionVersionContent
+ * @method \Twilio\Rest\Serverless\V1\Service\TwilioFunction\FunctionVersion\FunctionVersionContentContext functionVersionContent()
*/
class FunctionVersionContext extends InstanceContext
-{
+ {
+ protected $_functionVersionContent;
+
/**
* Initialize the FunctionVersionContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service to fetch the Function
- * Version resource from
- * @param string $functionSid The SID of the function that is the parent of the
- * Function Version resource to fetch
- * @param string $sid The SID that identifies the Function Version resource to
- * fetch
- * @return \Twilio\Rest\Serverless\V1\Service\TwilioFunction\FunctionVersionContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the Service to fetch the Function Version resource from.
+ * @param string $functionSid The SID of the function that is the parent of the Function Version resource to fetch.
+ * @param string $sid The SID of the Function Version resource to fetch.
*/
- public function __construct(Version $version, $serviceSid, $functionSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $functionSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'functionSid' => $functionSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'functionSid' =>
+ $functionSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Functions/' . \rawurlencode($functionSid) . '/Versions/' . \rawurlencode($sid) . '';
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Functions/' . \rawurlencode($functionSid)
+ .'/Versions/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a FunctionVersionInstance
+ * Fetch the FunctionVersionInstance
*
* @return FunctionVersionInstance Fetched FunctionVersionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): FunctionVersionInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new FunctionVersionInstance(
$this->version,
@@ -66,17 +86,70 @@ public function fetch()
);
}
+
+ /**
+ * Access the functionVersionContent
+ */
+ protected function getFunctionVersionContent(): FunctionVersionContentList
+ {
+ if (!$this->_functionVersionContent) {
+ $this->_functionVersionContent = new FunctionVersionContentList(
+ $this->version,
+ $this->solution['serviceSid'],
+ $this->solution['functionSid'],
+ $this->solution['sid']
+ );
+ }
+
+ return $this->_functionVersionContent;
+ }
+
+ /**
+ * Magic getter to lazy load subresources
+ *
+ * @param string $name Subresource to return
+ * @return ListResource The requested subresource
+ * @throws TwilioException For unknown subresources
+ */
+ public function __get(string $name): ListResource
+ {
+ if (\property_exists($this, '_' . $name)) {
+ $method = 'get' . \ucfirst($name);
+ return $this->$method();
+ }
+
+ throw new TwilioException('Unknown subresource ' . $name);
+ }
+
+ /**
+ * Magic caller to get resource contexts
+ *
+ * @param string $name Resource to return
+ * @param array $arguments Context parameters
+ * @return InstanceContext The requested resource context
+ * @throws TwilioException For unknown resource
+ */
+ public function __call(string $name, array $arguments): InstanceContext
+ {
+ $property = $this->$name;
+ if (\method_exists($property, 'getContext')) {
+ return \call_user_func_array(array($property, 'getContext'), $arguments);
+ }
+
+ throw new TwilioException('Resource does not have a context');
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Serverless.V1.FunctionVersionContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/TwilioFunction/FunctionVersionInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/TwilioFunction/FunctionVersionInstance.php
index f5e72bf..2d25e1c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/TwilioFunction/FunctionVersionInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/TwilioFunction/FunctionVersionInstance.php
@@ -2,52 +2,59 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Serverless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Serverless\V1\Service\TwilioFunction;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Serverless\V1\Service\TwilioFunction\FunctionVersion\FunctionVersionContentList;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property string $sid
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $functionSid
- * @property string $path
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $functionSid
+ * @property string|null $path
* @property string $visibility
- * @property \DateTime $dateCreated
- * @property string $url
+ * @property \DateTime|null $dateCreated
+ * @property string|null $url
+ * @property array|null $links
*/
class FunctionVersionInstance extends InstanceResource
{
+ protected $_functionVersionContent;
+
/**
* Initialize the FunctionVersionInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the Function Version
- * resource is associated with
- * @param string $functionSid The SID of the function that is the parent of the
- * function version
- * @param string $sid The SID that identifies the Function Version resource to
- * fetch
- * @return \Twilio\Rest\Serverless\V1\Service\TwilioFunction\FunctionVersionInstance
+ * @param string $serviceSid The SID of the Service to fetch the Function Version resource from.
+ * @param string $functionSid The SID of the function that is the parent of the Function Version resource to fetch.
+ * @param string $sid The SID of the Function Version resource to fetch.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $functionSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $functionSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
@@ -56,23 +63,19 @@ public function __construct(Version $version, array $payload, $serviceSid, $func
'visibility' => Values::array_get($payload, 'visibility'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'url' => Values::array_get($payload, 'url'),
- );
+ 'links' => Values::array_get($payload, 'links'),
+ ];
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'functionSid' => $functionSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['serviceSid' => $serviceSid, 'functionSid' => $functionSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Serverless\V1\Service\TwilioFunction\FunctionVersionContext Context for this
- * FunctionVersionInstance
+ * @return FunctionVersionContext Context for this FunctionVersionInstance
*/
- protected function proxy()
+ protected function proxy(): FunctionVersionContext
{
if (!$this->context) {
$this->context = new FunctionVersionContext(
@@ -87,16 +90,25 @@ protected function proxy()
}
/**
- * Fetch a FunctionVersionInstance
+ * Fetch the FunctionVersionInstance
*
* @return FunctionVersionInstance Fetched FunctionVersionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): FunctionVersionInstance
{
+
return $this->proxy()->fetch();
}
+ /**
+ * Access the functionVersionContent
+ */
+ protected function getFunctionVersionContent(): FunctionVersionContentList
+ {
+ return $this->proxy()->functionVersionContent;
+ }
+
/**
* Magic getter to access properties
*
@@ -104,7 +116,7 @@ public function fetch()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -123,12 +135,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Serverless.V1.FunctionVersionInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/TwilioFunction/FunctionVersionList.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/TwilioFunction/FunctionVersionList.php
index 3870272..8e5b0b0 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/TwilioFunction/FunctionVersionList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/TwilioFunction/FunctionVersionList.php
@@ -2,40 +2,75 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Serverless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Serverless\V1\Service\TwilioFunction;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
+
class FunctionVersionList extends ListResource
-{
+ {
/**
* Construct the FunctionVersionList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the Function Version
- * resource is associated with
- * @param string $functionSid The SID of the function that is the parent of the
- * function version
- * @return \Twilio\Rest\Serverless\V1\Service\TwilioFunction\FunctionVersionList
+ * @param string $serviceSid The SID of the Service to fetch the Function Version resource from.
+ * @param string $functionSid The SID of the function that is the parent of the Function Version resource to fetch.
*/
- public function __construct(Version $version, $serviceSid, $functionSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid,
+ string $functionSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'functionSid' => $functionSid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ 'functionSid' =>
+ $functionSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Functions/' . \rawurlencode($functionSid)
+ .'/Versions';
+ }
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Functions/' . \rawurlencode($functionSid) . '/Versions';
+ /**
+ * Reads FunctionVersionInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return FunctionVersionInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -54,9 +89,9 @@ public function __construct(Version $version, $serviceSid, $functionSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -65,26 +100,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads FunctionVersionInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return FunctionVersionInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of FunctionVersionInstance records from the API.
* Request is executed immediately
@@ -92,21 +107,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of FunctionVersionInstance
+ * @return FunctionVersionPage Page of FunctionVersionInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): FunctionVersionPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new FunctionVersionPage($this->version, $response, $this->solution);
}
@@ -116,9 +132,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of FunctionVersionInstance
+ * @return FunctionVersionPage Page of FunctionVersionInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): FunctionVersionPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -128,14 +144,16 @@ public function getPage($targetUrl)
return new FunctionVersionPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a FunctionVersionContext
*
- * @param string $sid The SID that identifies the Function Version resource to
- * fetch
- * @return \Twilio\Rest\Serverless\V1\Service\TwilioFunction\FunctionVersionContext
+ * @param string $sid The SID of the Function Version resource to fetch.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): FunctionVersionContext
{
return new FunctionVersionContext(
$this->version,
@@ -150,8 +168,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Serverless.V1.FunctionVersionList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/TwilioFunction/FunctionVersionPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/TwilioFunction/FunctionVersionPage.php
index acf9375..dd34213 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/TwilioFunction/FunctionVersionPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/TwilioFunction/FunctionVersionPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return FunctionVersionInstance \Twilio\Rest\Serverless\V1\Service\TwilioFunction\FunctionVersionInstance
+ */
+ public function buildInstance(array $payload): FunctionVersionInstance
{
- return new FunctionVersionInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['functionSid']
- );
+ return new FunctionVersionInstance($this->version, $payload, $this->solution['serviceSid'], $this->solution['functionSid']);
}
/**
@@ -39,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Serverless.V1.FunctionVersionPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/ServiceContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/ServiceContext.php
index 2604d68..9b40532 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/ServiceContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/ServiceContext.php
@@ -2,90 +2,107 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Serverless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Serverless\V1;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Serverless\V1\Service\AssetList;
-use Twilio\Rest\Serverless\V1\Service\BuildList;
-use Twilio\Rest\Serverless\V1\Service\EnvironmentList;
-use Twilio\Rest\Serverless\V1\Service\FunctionList;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+use Twilio\Rest\Serverless\V1\Service\FunctionList;
+use Twilio\Rest\Serverless\V1\Service\BuildList;
+use Twilio\Rest\Serverless\V1\Service\EnvironmentList;
+use Twilio\Rest\Serverless\V1\Service\AssetList;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property \Twilio\Rest\Serverless\V1\Service\EnvironmentList $environments
- * @property \Twilio\Rest\Serverless\V1\Service\FunctionList $functions
- * @property \Twilio\Rest\Serverless\V1\Service\AssetList $assets
- * @property \Twilio\Rest\Serverless\V1\Service\BuildList $builds
+ * @property FunctionList $functions
+ * @property BuildList $builds
+ * @property EnvironmentList $environments
+ * @property AssetList $assets
* @method \Twilio\Rest\Serverless\V1\Service\EnvironmentContext environments(string $sid)
* @method \Twilio\Rest\Serverless\V1\Service\FunctionContext functions(string $sid)
- * @method \Twilio\Rest\Serverless\V1\Service\AssetContext assets(string $sid)
* @method \Twilio\Rest\Serverless\V1\Service\BuildContext builds(string $sid)
+ * @method \Twilio\Rest\Serverless\V1\Service\AssetContext assets(string $sid)
*/
class ServiceContext extends InstanceContext
-{
- protected $_environments = null;
- protected $_functions = null;
- protected $_assets = null;
- protected $_builds = null;
+ {
+ protected $_functions;
+ protected $_builds;
+ protected $_environments;
+ protected $_assets;
/**
* Initialize the ServiceContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The SID of the Service resource to fetch
- * @return \Twilio\Rest\Serverless\V1\ServiceContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid The `sid` or `unique_name` of the Service resource to delete.
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Services/' . \rawurlencode($sid) . '';
+ $this->uri = '/Services/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a ServiceInstance
+ * Delete the ServiceInstance
*
- * @return ServiceInstance Fetched ServiceInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
- return new ServiceInstance($this->version, $payload, $this->solution['sid']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Deletes the ServiceInstance
+ * Fetch the ServiceInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return ServiceInstance Fetched ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): ServiceInstance
{
- return $this->version->delete('delete', $this->uri);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
+
+ return new ServiceInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Update the ServiceInstance
*
@@ -93,89 +110,99 @@ public function delete()
* @return ServiceInstance Updated ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ServiceInstance
{
- $options = new Values($options);
- $data = Values::of(array(
- 'IncludeCredentials' => Serialize::booleanToString($options['includeCredentials']),
- 'FriendlyName' => $options['friendlyName'],
- ));
+ $options = new Values($options);
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'IncludeCredentials' =>
+ Serialize::booleanToString($options['includeCredentials']),
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'UiEditable' =>
+ Serialize::booleanToString($options['uiEditable']),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
+
+ return new ServiceInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
);
-
- return new ServiceInstance($this->version, $payload, $this->solution['sid']);
}
+
/**
- * Access the environments
- *
- * @return \Twilio\Rest\Serverless\V1\Service\EnvironmentList
+ * Access the functions
*/
- protected function getEnvironments()
+ protected function getFunctions(): FunctionList
{
- if (!$this->_environments) {
- $this->_environments = new EnvironmentList($this->version, $this->solution['sid']);
+ if (!$this->_functions) {
+ $this->_functions = new FunctionList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_environments;
+ return $this->_functions;
}
/**
- * Access the functions
- *
- * @return \Twilio\Rest\Serverless\V1\Service\FunctionList
+ * Access the builds
*/
- protected function getFunctions()
+ protected function getBuilds(): BuildList
{
- if (!$this->_functions) {
- $this->_functions = new FunctionList($this->version, $this->solution['sid']);
+ if (!$this->_builds) {
+ $this->_builds = new BuildList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_functions;
+ return $this->_builds;
}
/**
- * Access the assets
- *
- * @return \Twilio\Rest\Serverless\V1\Service\AssetList
+ * Access the environments
*/
- protected function getAssets()
+ protected function getEnvironments(): EnvironmentList
{
- if (!$this->_assets) {
- $this->_assets = new AssetList($this->version, $this->solution['sid']);
+ if (!$this->_environments) {
+ $this->_environments = new EnvironmentList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_assets;
+ return $this->_environments;
}
/**
- * Access the builds
- *
- * @return \Twilio\Rest\Serverless\V1\Service\BuildList
+ * Access the assets
*/
- protected function getBuilds()
+ protected function getAssets(): AssetList
{
- if (!$this->_builds) {
- $this->_builds = new BuildList($this->version, $this->solution['sid']);
+ if (!$this->_assets) {
+ $this->_assets = new AssetList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_builds;
+ return $this->_assets;
}
/**
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -190,10 +217,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -208,12 +235,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Serverless.V1.ServiceContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/ServiceInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/ServiceInstance.php
index c0be465..4807e22 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/ServiceInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/ServiceInstance.php
@@ -2,104 +2,122 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Serverless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Serverless\V1;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Serverless\V1\Service\FunctionList;
+use Twilio\Rest\Serverless\V1\Service\BuildList;
+use Twilio\Rest\Serverless\V1\Service\EnvironmentList;
+use Twilio\Rest\Serverless\V1\Service\AssetList;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property string $sid
- * @property string $accountSid
- * @property string $friendlyName
- * @property string $uniqueName
- * @property bool $includeCredentials
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
- * @property array $links
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $friendlyName
+ * @property string|null $uniqueName
+ * @property bool|null $includeCredentials
+ * @property bool|null $uiEditable
+ * @property string|null $domainBase
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
+ * @property array|null $links
*/
class ServiceInstance extends InstanceResource
{
- protected $_environments = null;
- protected $_functions = null;
- protected $_assets = null;
- protected $_builds = null;
+ protected $_functions;
+ protected $_builds;
+ protected $_environments;
+ protected $_assets;
/**
* Initialize the ServiceInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The SID of the Service resource to fetch
- * @return \Twilio\Rest\Serverless\V1\ServiceInstance
+ * @param string $sid The `sid` or `unique_name` of the Service resource to delete.
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
'uniqueName' => Values::array_get($payload, 'unique_name'),
'includeCredentials' => Values::array_get($payload, 'include_credentials'),
+ 'uiEditable' => Values::array_get($payload, 'ui_editable'),
+ 'domainBase' => Values::array_get($payload, 'domain_base'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Serverless\V1\ServiceContext Context for this
- * ServiceInstance
+ * @return ServiceContext Context for this ServiceInstance
*/
- protected function proxy()
+ protected function proxy(): ServiceContext
{
if (!$this->context) {
- $this->context = new ServiceContext($this->version, $this->solution['sid']);
+ $this->context = new ServiceContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a ServiceInstance
+ * Delete the ServiceInstance
*
- * @return ServiceInstance Fetched ServiceInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the ServiceInstance
+ * Fetch the ServiceInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return ServiceInstance Fetched ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): ServiceInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -109,49 +127,42 @@ public function delete()
* @return ServiceInstance Updated ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ServiceInstance
{
+
return $this->proxy()->update($options);
}
/**
- * Access the environments
- *
- * @return \Twilio\Rest\Serverless\V1\Service\EnvironmentList
+ * Access the functions
*/
- protected function getEnvironments()
+ protected function getFunctions(): FunctionList
{
- return $this->proxy()->environments;
+ return $this->proxy()->functions;
}
/**
- * Access the functions
- *
- * @return \Twilio\Rest\Serverless\V1\Service\FunctionList
+ * Access the builds
*/
- protected function getFunctions()
+ protected function getBuilds(): BuildList
{
- return $this->proxy()->functions;
+ return $this->proxy()->builds;
}
/**
- * Access the assets
- *
- * @return \Twilio\Rest\Serverless\V1\Service\AssetList
+ * Access the environments
*/
- protected function getAssets()
+ protected function getEnvironments(): EnvironmentList
{
- return $this->proxy()->assets;
+ return $this->proxy()->environments;
}
/**
- * Access the builds
- *
- * @return \Twilio\Rest\Serverless\V1\Service\BuildList
+ * Access the assets
*/
- protected function getBuilds()
+ protected function getAssets(): AssetList
{
- return $this->proxy()->builds;
+ return $this->proxy()->assets;
}
/**
@@ -161,7 +172,7 @@ protected function getBuilds()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -180,12 +191,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Serverless.V1.ServiceInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/ServiceList.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/ServiceList.php
index bd73089..40af2d0 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/ServiceList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/ServiceList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Serverless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Serverless\V1;
@@ -12,58 +19,66 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
class ServiceList extends ListResource
-{
+ {
/**
* Construct the ServiceList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Serverless\V1\ServiceList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/Services';
}
/**
- * Streams ServiceInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the ServiceInstance
*
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @param string $uniqueName A user-defined string that uniquely identifies the Service resource. It can be used as an alternative to the `sid` in the URL path to address the Service resource. This value must be 50 characters or less in length and be unique.
+ * @param string $friendlyName A descriptive string that you create to describe the Service resource. It can be a maximum of 255 characters.
+ * @param array|Options $options Optional Arguments
+ * @return ServiceInstance Created ServiceInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($limit = null, $pageSize = null)
+ public function create(string $uniqueName, string $friendlyName, array $options = []): ServiceInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'UniqueName' =>
+ $uniqueName,
+ 'FriendlyName' =>
+ $friendlyName,
+ 'IncludeCredentials' =>
+ Serialize::booleanToString($options['includeCredentials']),
+ 'UiEditable' =>
+ Serialize::booleanToString($options['uiEditable']),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new ServiceInstance(
+ $this->version,
+ $payload
+ );
}
+
/**
* Reads ServiceInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -79,11 +94,38 @@ public function stream($limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return ServiceInstance[] Array of results
*/
- public function read($limit = null, $pageSize = null)
+ public function read(int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($limit, $pageSize), false);
}
+ /**
+ * Streams ServiceInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of ServiceInstance records from the API.
* Request is executed immediately
@@ -91,21 +133,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of ServiceInstance
+ * @return ServicePage Page of ServiceInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): ServicePage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new ServicePage($this->version, $response, $this->solution);
}
@@ -115,9 +158,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of ServiceInstance
+ * @return ServicePage Page of ServiceInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): ServicePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -127,45 +170,21 @@ public function getPage($targetUrl)
return new ServicePage($this->version, $response, $this->solution);
}
- /**
- * Create a new ServiceInstance
- *
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the Service resource
- * @param string $friendlyName A string to describe the Service resource
- * @param array|Options $options Optional Arguments
- * @return ServiceInstance Newly created ServiceInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($uniqueName, $friendlyName, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'UniqueName' => $uniqueName,
- 'FriendlyName' => $friendlyName,
- 'IncludeCredentials' => Serialize::booleanToString($options['includeCredentials']),
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new ServiceInstance($this->version, $payload);
- }
/**
* Constructs a ServiceContext
*
- * @param string $sid The SID of the Service resource to fetch
- * @return \Twilio\Rest\Serverless\V1\ServiceContext
+ * @param string $sid The `sid` or `unique_name` of the Service resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): ServiceContext
{
- return new ServiceContext($this->version, $sid);
+ return new ServiceContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -173,8 +192,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Serverless.V1.ServiceList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/ServiceOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/ServiceOptions.php
index 3dd1e96..40c5953 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/ServiceOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/ServiceOptions.php
@@ -1,10 +1,16 @@
options['includeCredentials'] = $includeCredentials;
+ $this->options['uiEditable'] = $uiEditable;
}
/**
- * Whether to inject Account credentials into a function invocation context. The default value is `false`.
+ * Whether to inject Account credentials into a function invocation context. The default value is `true`.
*
- * @param bool $includeCredentials Whether to inject Account credentials into a
- * function invocation context
+ * @param bool $includeCredentials Whether to inject Account credentials into a function invocation context. The default value is `true`.
* @return $this Fluent Builder
*/
- public function setIncludeCredentials($includeCredentials)
+ public function setIncludeCredentials(bool $includeCredentials): self
{
$this->options['includeCredentials'] = $includeCredentials;
return $this;
}
+ /**
+ * Whether the Service's properties and subresources can be edited via the UI. The default value is `false`.
+ *
+ * @param bool $uiEditable Whether the Service's properties and subresources can be edited via the UI. The default value is `false`.
+ * @return $this Fluent Builder
+ */
+ public function setUiEditable(bool $uiEditable): self
+ {
+ $this->options['uiEditable'] = $uiEditable;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Serverless.V1.CreateServiceOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Serverless.V1.CreateServiceOptions ' . $options . ']';
}
}
+
+
+
class UpdateServiceOptions extends Options
-{
+ {
/**
- * @param bool $includeCredentials Whether to inject Account credentials into a
- * function invocation context
- * @param string $friendlyName A string to describe the Service resource
+ * @param bool $includeCredentials Whether to inject Account credentials into a function invocation context.
+ * @param string $friendlyName A descriptive string that you create to describe the Service resource. It can be a maximum of 255 characters.
+ * @param bool $uiEditable Whether the Service resource's properties and subresources can be edited via the UI. The default value is `false`.
*/
- public function __construct($includeCredentials = Values::NONE, $friendlyName = Values::NONE)
- {
+ public function __construct(
+
+ bool $includeCredentials = Values::BOOL_NONE,
+ string $friendlyName = Values::NONE,
+ bool $uiEditable = Values::BOOL_NONE
+
+ ) {
$this->options['includeCredentials'] = $includeCredentials;
$this->options['friendlyName'] = $friendlyName;
+ $this->options['uiEditable'] = $uiEditable;
}
/**
* Whether to inject Account credentials into a function invocation context.
*
- * @param bool $includeCredentials Whether to inject Account credentials into a
- * function invocation context
+ * @param bool $includeCredentials Whether to inject Account credentials into a function invocation context.
* @return $this Fluent Builder
*/
- public function setIncludeCredentials($includeCredentials)
+ public function setIncludeCredentials(bool $includeCredentials): self
{
$this->options['includeCredentials'] = $includeCredentials;
return $this;
}
/**
- * A descriptive string that you create to describe the Service resource. It can be up to 255 characters long.
+ * A descriptive string that you create to describe the Service resource. It can be a maximum of 255 characters.
*
- * @param string $friendlyName A string to describe the Service resource
+ * @param string $friendlyName A descriptive string that you create to describe the Service resource. It can be a maximum of 255 characters.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
}
+ /**
+ * Whether the Service resource's properties and subresources can be edited via the UI. The default value is `false`.
+ *
+ * @param bool $uiEditable Whether the Service resource's properties and subresources can be edited via the UI. The default value is `false`.
+ * @return $this Fluent Builder
+ */
+ public function setUiEditable(bool $uiEditable): self
+ {
+ $this->options['uiEditable'] = $uiEditable;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Serverless.V1.UpdateServiceOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Serverless.V1.UpdateServiceOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/ServicePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/ServicePage.php
index 6923d0f..c6ff80b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/ServicePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/ServicePage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return ServiceInstance \Twilio\Rest\Serverless\V1\ServiceInstance
+ */
+ public function buildInstance(array $payload): ServiceInstance
{
return new ServiceInstance($this->version, $payload);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Serverless.V1.ServicePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio.php
index 2fd1dbc..6d0984c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio.php
@@ -1,134 +1,32 @@
baseUrl = 'https://studio.twilio.com';
- }
-
- /**
- * @return \Twilio\Rest\Studio\V1 Version v1 of studio
- */
- protected function getV1()
- {
- if (!$this->_v1) {
- $this->_v1 = new V1($this);
- }
- return $this->_v1;
- }
-
- /**
- * @return \Twilio\Rest\Studio\V2 Version v2 of studio
- */
- protected function getV2()
- {
- if (!$this->_v2) {
- $this->_v2 = new V2($this);
- }
- return $this->_v2;
- }
-
+class Studio extends StudioBase {
/**
- * Magic getter to lazy load version
- *
- * @param string $name Version to return
- * @return \Twilio\Version The requested version
- * @throws TwilioException For unknown versions
+ * @deprecated Use v2->flows instead.
*/
- public function __get($name)
- {
- $method = 'get' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return $this->$method();
- }
-
- throw new TwilioException('Unknown version ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $method = 'context' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return \call_user_func_array(array($this, $method), $arguments);
- }
-
- throw new TwilioException('Unknown context ' . $name);
- }
-
- /**
- * @return \Twilio\Rest\Studio\V2\FlowList
- */
- protected function getFlows()
- {
+ protected function getFlows(): \Twilio\Rest\Studio\V2\FlowList {
+ echo "flows is deprecated. Use v2->flows instead.";
return $this->v2->flows;
}
/**
+ * @deprecated Use v2->flows(\$sid) instead.
* @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Studio\V2\FlowContext
*/
- protected function contextFlows($sid)
- {
+ protected function contextFlows(string $sid): \Twilio\Rest\Studio\V2\FlowContext {
+ echo "flows(\$sid) is deprecated. Use v2->flows(\$sid) instead.";
return $this->v2->flows($sid);
}
/**
- * @return \Twilio\Rest\Studio\V2\FlowValidateList
- */
- protected function getFlowValid()
- {
- return $this->v2->flowValid;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
+ * @deprecated Use v2->flowValidate instead.
*/
- public function __toString()
- {
- return '[Twilio.Studio]';
+ protected function getFlowValidate(): \Twilio\Rest\Studio\V2\FlowValidateList {
+ echo "flowValidate is deprecated. Use v2->flowValidate instead.";
+ return $this->v2->flowValidate;
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1.php
index 0df4bb2..99ac82d 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1.php
@@ -1,32 +1,38 @@
version = 'v1';
}
- /**
- * @return \Twilio\Rest\Studio\V1\FlowList
- */
- protected function getFlows()
+ protected function getFlows(): FlowList
{
if (!$this->_flows) {
$this->_flows = new FlowList($this);
@@ -52,7 +55,7 @@ protected function getFlows()
* @return \Twilio\ListResource The requested resource
* @throws TwilioException For unknown resource
*/
- public function __get($name)
+ public function __get(string $name)
{
$method = 'get' . \ucfirst($name);
if (\method_exists($this, $method)) {
@@ -67,10 +70,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -85,8 +88,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Studio.V1]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/EngagementContextContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/EngagementContextContext.php
index e82265f..9f9a1ff 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/EngagementContextContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/EngagementContextContext.php
@@ -2,53 +2,67 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Studio
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Studio\V1\Flow\Engagement;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class EngagementContextContext extends InstanceContext
-{
+ {
/**
* Initialize the EngagementContextContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $flowSid Flow SID
- * @param string $engagementSid Engagement SID
- * @return \Twilio\Rest\Studio\V1\Flow\Engagement\EngagementContextContext
+ * @param Version $version Version that contains the resource
+ * @param string $flowSid The SID of the Flow.
+ * @param string $engagementSid The SID of the Engagement.
*/
- public function __construct(Version $version, $flowSid, $engagementSid)
- {
+ public function __construct(
+ Version $version,
+ $flowSid,
+ $engagementSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('flowSid' => $flowSid, 'engagementSid' => $engagementSid,);
+ $this->solution = [
+ 'flowSid' =>
+ $flowSid,
+ 'engagementSid' =>
+ $engagementSid,
+ ];
- $this->uri = '/Flows/' . \rawurlencode($flowSid) . '/Engagements/' . \rawurlencode($engagementSid) . '/Context';
+ $this->uri = '/Flows/' . \rawurlencode($flowSid)
+ .'/Engagements/' . \rawurlencode($engagementSid)
+ .'/Context';
}
/**
- * Fetch a EngagementContextInstance
+ * Fetch the EngagementContextInstance
*
* @return EngagementContextInstance Fetched EngagementContextInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): EngagementContextInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new EngagementContextInstance(
$this->version,
@@ -58,17 +72,18 @@ public function fetch()
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Studio.V1.EngagementContextContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/EngagementContextInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/EngagementContextInstance.php
index 7480ee8..5606e27 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/EngagementContextInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/EngagementContextInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Studio
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Studio\V1\Flow\Engagement;
use Twilio\Exceptions\TwilioException;
@@ -14,47 +22,47 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * @property string $accountSid
- * @property array $context
- * @property string $engagementSid
- * @property string $flowSid
- * @property string $url
+ * @property string|null $accountSid
+ * @property array|null $context
+ * @property string|null $engagementSid
+ * @property string|null $flowSid
+ * @property string|null $url
*/
class EngagementContextInstance extends InstanceResource
{
/**
* Initialize the EngagementContextInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $flowSid Flow SID
- * @param string $engagementSid Engagement SID
- * @return \Twilio\Rest\Studio\V1\Flow\Engagement\EngagementContextInstance
+ * @param string $flowSid The SID of the Flow.
+ * @param string $engagementSid The SID of the Engagement.
*/
- public function __construct(Version $version, array $payload, $flowSid, $engagementSid)
+ public function __construct(Version $version, array $payload, string $flowSid, string $engagementSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'context' => Values::array_get($payload, 'context'),
'engagementSid' => Values::array_get($payload, 'engagement_sid'),
'flowSid' => Values::array_get($payload, 'flow_sid'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('flowSid' => $flowSid, 'engagementSid' => $engagementSid,);
+ $this->solution = ['flowSid' => $flowSid, 'engagementSid' => $engagementSid, ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Studio\V1\Flow\Engagement\EngagementContextContext Context for this EngagementContextInstance
+ * @return EngagementContextContext Context for this EngagementContextInstance
*/
- protected function proxy()
+ protected function proxy(): EngagementContextContext
{
if (!$this->context) {
$this->context = new EngagementContextContext(
@@ -68,13 +76,14 @@ protected function proxy()
}
/**
- * Fetch a EngagementContextInstance
+ * Fetch the EngagementContextInstance
*
* @return EngagementContextInstance Fetched EngagementContextInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): EngagementContextInstance
{
+
return $this->proxy()->fetch();
}
@@ -85,7 +94,7 @@ public function fetch()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -104,12 +113,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Studio.V1.EngagementContextInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/EngagementContextList.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/EngagementContextList.php
index e82fe7f..f4484fc 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/EngagementContextList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/EngagementContextList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Studio
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Studio\V1\Flow\Engagement;
@@ -12,30 +19,40 @@
use Twilio\ListResource;
use Twilio\Version;
+
class EngagementContextList extends ListResource
-{
+ {
/**
* Construct the EngagementContextList
*
* @param Version $version Version that contains the resource
- * @param string $flowSid Flow SID
- * @param string $engagementSid Engagement SID
- * @return \Twilio\Rest\Studio\V1\Flow\Engagement\EngagementContextList
+ * @param string $flowSid The SID of the Flow.
+ * @param string $engagementSid The SID of the Engagement.
*/
- public function __construct(Version $version, $flowSid, $engagementSid)
- {
+ public function __construct(
+ Version $version,
+ string $flowSid,
+ string $engagementSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('flowSid' => $flowSid, 'engagementSid' => $engagementSid,);
+ $this->solution = [
+ 'flowSid' =>
+ $flowSid,
+
+ 'engagementSid' =>
+ $engagementSid,
+
+ ];
}
/**
* Constructs a EngagementContextContext
- *
- * @return \Twilio\Rest\Studio\V1\Flow\Engagement\EngagementContextContext
*/
- public function getContext()
+ public function getContext(
+
+ ): EngagementContextContext
{
return new EngagementContextContext(
$this->version,
@@ -49,8 +66,8 @@ public function getContext()
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Studio.V1.EngagementContextList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/EngagementContextPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/EngagementContextPage.php
index 2f683a2..5b59b7f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/EngagementContextPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/EngagementContextPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return EngagementContextInstance \Twilio\Rest\Studio\V1\Flow\Engagement\EngagementContextInstance
+ */
+ public function buildInstance(array $payload): EngagementContextInstance
{
- return new EngagementContextInstance(
- $this->version,
- $payload,
- $this->solution['flowSid'],
- $this->solution['engagementSid']
- );
+ return new EngagementContextInstance($this->version, $payload, $this->solution['flowSid'], $this->solution['engagementSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Studio.V1.EngagementContextPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/Step/StepContextContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/Step/StepContextContext.php
index 13f5f76..1dfd859 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/Step/StepContextContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/Step/StepContextContext.php
@@ -2,58 +2,72 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Studio
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Studio\V1\Flow\Engagement\Step;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class StepContextContext extends InstanceContext
-{
+ {
/**
* Initialize the StepContextContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $flowSid The SID of the Flow
- * @param string $engagementSid The SID of the Engagement
- * @param string $stepSid Step SID
- * @return \Twilio\Rest\Studio\V1\Flow\Engagement\Step\StepContextContext
+ * @param Version $version Version that contains the resource
+ * @param string $flowSid The SID of the Flow with the Step to fetch.
+ * @param string $engagementSid The SID of the Engagement with the Step to fetch.
+ * @param string $stepSid The SID of the Step to fetch
*/
- public function __construct(Version $version, $flowSid, $engagementSid, $stepSid)
- {
+ public function __construct(
+ Version $version,
+ $flowSid,
+ $engagementSid,
+ $stepSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array(
- 'flowSid' => $flowSid,
- 'engagementSid' => $engagementSid,
- 'stepSid' => $stepSid,
- );
+ $this->solution = [
+ 'flowSid' =>
+ $flowSid,
+ 'engagementSid' =>
+ $engagementSid,
+ 'stepSid' =>
+ $stepSid,
+ ];
- $this->uri = '/Flows/' . \rawurlencode($flowSid) . '/Engagements/' . \rawurlencode($engagementSid) . '/Steps/' . \rawurlencode($stepSid) . '/Context';
+ $this->uri = '/Flows/' . \rawurlencode($flowSid)
+ .'/Engagements/' . \rawurlencode($engagementSid)
+ .'/Steps/' . \rawurlencode($stepSid)
+ .'/Context';
}
/**
- * Fetch a StepContextInstance
+ * Fetch the StepContextInstance
*
* @return StepContextInstance Fetched StepContextInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): StepContextInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new StepContextInstance(
$this->version,
@@ -64,17 +78,18 @@ public function fetch()
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Studio.V1.StepContextContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/Step/StepContextInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/Step/StepContextInstance.php
index 0911691..6a4247c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/Step/StepContextInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/Step/StepContextInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Studio
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Studio\V1\Flow\Engagement\Step;
use Twilio\Exceptions\TwilioException;
@@ -14,54 +22,50 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * @property string $accountSid
- * @property array $context
- * @property string $engagementSid
- * @property string $flowSid
- * @property string $stepSid
- * @property string $url
+ * @property string|null $accountSid
+ * @property array|null $context
+ * @property string|null $engagementSid
+ * @property string|null $flowSid
+ * @property string|null $stepSid
+ * @property string|null $url
*/
class StepContextInstance extends InstanceResource
{
/**
* Initialize the StepContextInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $flowSid The SID of the Flow
- * @param string $engagementSid The SID of the Engagement
- * @param string $stepSid Step SID
- * @return \Twilio\Rest\Studio\V1\Flow\Engagement\Step\StepContextInstance
+ * @param string $flowSid The SID of the Flow with the Step to fetch.
+ * @param string $engagementSid The SID of the Engagement with the Step to fetch.
+ * @param string $stepSid The SID of the Step to fetch
*/
- public function __construct(Version $version, array $payload, $flowSid, $engagementSid, $stepSid)
+ public function __construct(Version $version, array $payload, string $flowSid, string $engagementSid, string $stepSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'context' => Values::array_get($payload, 'context'),
'engagementSid' => Values::array_get($payload, 'engagement_sid'),
'flowSid' => Values::array_get($payload, 'flow_sid'),
'stepSid' => Values::array_get($payload, 'step_sid'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array(
- 'flowSid' => $flowSid,
- 'engagementSid' => $engagementSid,
- 'stepSid' => $stepSid,
- );
+ $this->solution = ['flowSid' => $flowSid, 'engagementSid' => $engagementSid, 'stepSid' => $stepSid, ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Studio\V1\Flow\Engagement\Step\StepContextContext Context for this StepContextInstance
+ * @return StepContextContext Context for this StepContextInstance
*/
- protected function proxy()
+ protected function proxy(): StepContextContext
{
if (!$this->context) {
$this->context = new StepContextContext(
@@ -76,13 +80,14 @@ protected function proxy()
}
/**
- * Fetch a StepContextInstance
+ * Fetch the StepContextInstance
*
* @return StepContextInstance Fetched StepContextInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): StepContextInstance
{
+
return $this->proxy()->fetch();
}
@@ -93,7 +98,7 @@ public function fetch()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -112,12 +117,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Studio.V1.StepContextInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/Step/StepContextList.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/Step/StepContextList.php
index f430568..d319942 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/Step/StepContextList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/Step/StepContextList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Studio
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Studio\V1\Flow\Engagement\Step;
@@ -12,35 +19,45 @@
use Twilio\ListResource;
use Twilio\Version;
+
class StepContextList extends ListResource
-{
+ {
/**
* Construct the StepContextList
*
* @param Version $version Version that contains the resource
- * @param string $flowSid The SID of the Flow
- * @param string $engagementSid The SID of the Engagement
- * @param string $stepSid Step SID
- * @return \Twilio\Rest\Studio\V1\Flow\Engagement\Step\StepContextList
+ * @param string $flowSid The SID of the Flow with the Step to fetch.
+ * @param string $engagementSid The SID of the Engagement with the Step to fetch.
+ * @param string $stepSid The SID of the Step to fetch
*/
- public function __construct(Version $version, $flowSid, $engagementSid, $stepSid)
- {
+ public function __construct(
+ Version $version,
+ string $flowSid,
+ string $engagementSid,
+ string $stepSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array(
- 'flowSid' => $flowSid,
- 'engagementSid' => $engagementSid,
- 'stepSid' => $stepSid,
- );
+ $this->solution = [
+ 'flowSid' =>
+ $flowSid,
+
+ 'engagementSid' =>
+ $engagementSid,
+
+ 'stepSid' =>
+ $stepSid,
+
+ ];
}
/**
* Constructs a StepContextContext
- *
- * @return \Twilio\Rest\Studio\V1\Flow\Engagement\Step\StepContextContext
*/
- public function getContext()
+ public function getContext(
+
+ ): StepContextContext
{
return new StepContextContext(
$this->version,
@@ -55,8 +72,8 @@ public function getContext()
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Studio.V1.StepContextList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/Step/StepContextPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/Step/StepContextPage.php
index d7af3a5..9112c84 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/Step/StepContextPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/Step/StepContextPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return StepContextInstance \Twilio\Rest\Studio\V1\Flow\Engagement\Step\StepContextInstance
+ */
+ public function buildInstance(array $payload): StepContextInstance
{
- return new StepContextInstance(
- $this->version,
- $payload,
- $this->solution['flowSid'],
- $this->solution['engagementSid'],
- $this->solution['stepSid']
- );
+ return new StepContextInstance($this->version, $payload, $this->solution['flowSid'], $this->solution['engagementSid'], $this->solution['stepSid']);
}
/**
@@ -37,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Studio.V1.StepContextPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/StepContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/StepContext.php
index 049a470..d943d29 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/StepContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/StepContext.php
@@ -2,61 +2,80 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Studio
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Studio\V1\Flow\Engagement;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
-use Twilio\Rest\Studio\V1\Flow\Engagement\Step\StepContextList;
+use Twilio\ListResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Studio\V1\Flow\Engagement\Step\StepContextList;
+
/**
- * @property \Twilio\Rest\Studio\V1\Flow\Engagement\Step\StepContextList $stepContext
+ * @property StepContextList $stepContext
* @method \Twilio\Rest\Studio\V1\Flow\Engagement\Step\StepContextContext stepContext()
*/
class StepContext extends InstanceContext
-{
- protected $_stepContext = null;
+ {
+ protected $_stepContext;
/**
* Initialize the StepContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $flowSid The SID of the Flow
- * @param string $engagementSid The SID of the Engagement
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Studio\V1\Flow\Engagement\StepContext
+ * @param Version $version Version that contains the resource
+ * @param string $flowSid The SID of the Flow with the Step to fetch.
+ * @param string $engagementSid The SID of the Engagement with the Step to fetch.
+ * @param string $sid The SID of the Step resource to fetch.
*/
- public function __construct(Version $version, $flowSid, $engagementSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $flowSid,
+ $engagementSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('flowSid' => $flowSid, 'engagementSid' => $engagementSid, 'sid' => $sid,);
-
- $this->uri = '/Flows/' . \rawurlencode($flowSid) . '/Engagements/' . \rawurlencode($engagementSid) . '/Steps/' . \rawurlencode($sid) . '';
+ $this->solution = [
+ 'flowSid' =>
+ $flowSid,
+ 'engagementSid' =>
+ $engagementSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Flows/' . \rawurlencode($flowSid)
+ .'/Engagements/' . \rawurlencode($engagementSid)
+ .'/Steps/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a StepInstance
+ * Fetch the StepInstance
*
* @return StepInstance Fetched StepInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): StepInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new StepInstance(
$this->version,
@@ -67,12 +86,11 @@ public function fetch()
);
}
+
/**
* Access the stepContext
- *
- * @return \Twilio\Rest\Studio\V1\Flow\Engagement\Step\StepContextList
*/
- protected function getStepContext()
+ protected function getStepContext(): StepContextList
{
if (!$this->_stepContext) {
$this->_stepContext = new StepContextList(
@@ -90,10 +108,10 @@ protected function getStepContext()
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -108,10 +126,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -126,12 +144,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Studio.V1.StepContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/StepInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/StepInstance.php
index 196bfff..021f01f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/StepInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/StepInstance.php
@@ -2,53 +2,62 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Studio
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Studio\V1\Flow\Engagement;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Studio\V1\Flow\Engagement\Step\StepContextList;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $flowSid
- * @property string $engagementSid
- * @property string $name
- * @property array $context
- * @property string $transitionedFrom
- * @property string $transitionedTo
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
- * @property array $links
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $flowSid
+ * @property string|null $engagementSid
+ * @property string|null $name
+ * @property array|null $context
+ * @property string|null $transitionedFrom
+ * @property string|null $transitionedTo
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
+ * @property array|null $links
*/
class StepInstance extends InstanceResource
{
- protected $_stepContext = null;
+ protected $_stepContext;
/**
* Initialize the StepInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $flowSid The SID of the Flow
- * @param string $engagementSid The SID of the Engagement
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Studio\V1\Flow\Engagement\StepInstance
+ * @param string $flowSid The SID of the Flow with the Step to fetch.
+ * @param string $engagementSid The SID of the Engagement with the Step to fetch.
+ * @param string $sid The SID of the Step resource to fetch.
*/
- public function __construct(Version $version, array $payload, $flowSid, $engagementSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $flowSid, string $engagementSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'flowSid' => Values::array_get($payload, 'flow_sid'),
@@ -61,23 +70,18 @@ public function __construct(Version $version, array $payload, $flowSid, $engagem
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array(
- 'flowSid' => $flowSid,
- 'engagementSid' => $engagementSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['flowSid' => $flowSid, 'engagementSid' => $engagementSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Studio\V1\Flow\Engagement\StepContext Context for this
- * StepInstance
+ * @return StepContext Context for this StepInstance
*/
- protected function proxy()
+ protected function proxy(): StepContext
{
if (!$this->context) {
$this->context = new StepContext(
@@ -92,22 +96,21 @@ protected function proxy()
}
/**
- * Fetch a StepInstance
+ * Fetch the StepInstance
*
* @return StepInstance Fetched StepInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): StepInstance
{
+
return $this->proxy()->fetch();
}
/**
* Access the stepContext
- *
- * @return \Twilio\Rest\Studio\V1\Flow\Engagement\Step\StepContextList
*/
- protected function getStepContext()
+ protected function getStepContext(): StepContextList
{
return $this->proxy()->stepContext;
}
@@ -119,7 +122,7 @@ protected function getStepContext()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -138,12 +141,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Studio.V1.StepInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/StepList.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/StepList.php
index 7c3f0de..7c19779 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/StepList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/StepList.php
@@ -2,35 +2,75 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Studio
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Studio\V1\Flow\Engagement;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class StepList extends ListResource
-{
+ {
/**
* Construct the StepList
*
* @param Version $version Version that contains the resource
- * @param string $flowSid The SID of the Flow
- * @param string $engagementSid The SID of the Engagement
- * @return \Twilio\Rest\Studio\V1\Flow\Engagement\StepList
+ * @param string $flowSid The SID of the Flow with the Step to fetch.
+ * @param string $engagementSid The SID of the Engagement with the Step to fetch.
*/
- public function __construct(Version $version, $flowSid, $engagementSid)
- {
+ public function __construct(
+ Version $version,
+ string $flowSid,
+ string $engagementSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('flowSid' => $flowSid, 'engagementSid' => $engagementSid,);
+ $this->solution = [
+ 'flowSid' =>
+ $flowSid,
+
+ 'engagementSid' =>
+ $engagementSid,
+
+ ];
+
+ $this->uri = '/Flows/' . \rawurlencode($flowSid)
+ .'/Engagements/' . \rawurlencode($engagementSid)
+ .'/Steps';
+ }
- $this->uri = '/Flows/' . \rawurlencode($flowSid) . '/Engagements/' . \rawurlencode($engagementSid) . '/Steps';
+ /**
+ * Reads StepInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return StepInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -49,9 +89,9 @@ public function __construct(Version $version, $flowSid, $engagementSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -60,26 +100,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads StepInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return StepInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of StepInstance records from the API.
* Request is executed immediately
@@ -87,21 +107,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of StepInstance
+ * @return StepPage Page of StepInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): StepPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new StepPage($this->version, $response, $this->solution);
}
@@ -111,9 +132,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of StepInstance
+ * @return StepPage Page of StepInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): StepPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -123,13 +144,16 @@ public function getPage($targetUrl)
return new StepPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a StepContext
*
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Studio\V1\Flow\Engagement\StepContext
+ * @param string $sid The SID of the Step resource to fetch.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): StepContext
{
return new StepContext(
$this->version,
@@ -144,8 +168,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Studio.V1.StepList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/StepPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/StepPage.php
index 92edb3c..90704fc 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/StepPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Engagement/StepPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return StepInstance \Twilio\Rest\Studio\V1\Flow\Engagement\StepInstance
+ */
+ public function buildInstance(array $payload): StepInstance
{
- return new StepInstance(
- $this->version,
- $payload,
- $this->solution['flowSid'],
- $this->solution['engagementSid']
- );
+ return new StepInstance($this->version, $payload, $this->solution['flowSid'], $this->solution['engagementSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Studio.V1.StepPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/EngagementContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/EngagementContext.php
index 1af7b7e..9d14b66 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/EngagementContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/EngagementContext.php
@@ -2,64 +2,93 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Studio
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Studio\V1\Flow;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
-use Twilio\Rest\Studio\V1\Flow\Engagement\EngagementContextList;
-use Twilio\Rest\Studio\V1\Flow\Engagement\StepList;
+use Twilio\ListResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Studio\V1\Flow\Engagement\StepList;
+use Twilio\Rest\Studio\V1\Flow\Engagement\EngagementContextList;
+
/**
- * @property \Twilio\Rest\Studio\V1\Flow\Engagement\StepList $steps
- * @property \Twilio\Rest\Studio\V1\Flow\Engagement\EngagementContextList $engagementContext
+ * @property StepList $steps
+ * @property EngagementContextList $engagementContext
* @method \Twilio\Rest\Studio\V1\Flow\Engagement\StepContext steps(string $sid)
* @method \Twilio\Rest\Studio\V1\Flow\Engagement\EngagementContextContext engagementContext()
*/
class EngagementContext extends InstanceContext
-{
- protected $_steps = null;
- protected $_engagementContext = null;
+ {
+ protected $_steps;
+ protected $_engagementContext;
/**
* Initialize the EngagementContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $flowSid Flow SID
- * @param string $sid The SID of the Engagement resource to fetch
- * @return \Twilio\Rest\Studio\V1\Flow\EngagementContext
+ * @param Version $version Version that contains the resource
+ * @param string $flowSid The SID of the Flow.
+ * @param string $sid The SID of the Engagement resource to delete.
*/
- public function __construct(Version $version, $flowSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $flowSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('flowSid' => $flowSid, 'sid' => $sid,);
+ $this->solution = [
+ 'flowSid' =>
+ $flowSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Flows/' . \rawurlencode($flowSid)
+ .'/Engagements/' . \rawurlencode($sid)
+ .'';
+ }
- $this->uri = '/Flows/' . \rawurlencode($flowSid) . '/Engagements/' . \rawurlencode($sid) . '';
+ /**
+ * Delete the EngagementInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a EngagementInstance
+ * Fetch the EngagementInstance
*
* @return EngagementInstance Fetched EngagementInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): EngagementInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new EngagementInstance(
$this->version,
@@ -69,26 +98,18 @@ public function fetch()
);
}
- /**
- * Deletes the EngagementInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Access the steps
- *
- * @return \Twilio\Rest\Studio\V1\Flow\Engagement\StepList
*/
- protected function getSteps()
+ protected function getSteps(): StepList
{
if (!$this->_steps) {
- $this->_steps = new StepList($this->version, $this->solution['flowSid'], $this->solution['sid']);
+ $this->_steps = new StepList(
+ $this->version,
+ $this->solution['flowSid'],
+ $this->solution['sid']
+ );
}
return $this->_steps;
@@ -96,10 +117,8 @@ protected function getSteps()
/**
* Access the engagementContext
- *
- * @return \Twilio\Rest\Studio\V1\Flow\Engagement\EngagementContextList
*/
- protected function getEngagementContext()
+ protected function getEngagementContext(): EngagementContextList
{
if (!$this->_engagementContext) {
$this->_engagementContext = new EngagementContextList(
@@ -116,10 +135,10 @@ protected function getEngagementContext()
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -134,10 +153,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -152,12 +171,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Studio.V1.EngagementContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/EngagementInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/EngagementInstance.php
index 6d17725..c6f6624 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/EngagementInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/EngagementInstance.php
@@ -2,52 +2,62 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Studio
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Studio\V1\Flow;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Studio\V1\Flow\Engagement\StepList;
+use Twilio\Rest\Studio\V1\Flow\Engagement\EngagementContextList;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $flowSid
- * @property string $contactSid
- * @property string $contactChannelAddress
- * @property array $context
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $flowSid
+ * @property string|null $contactSid
+ * @property string|null $contactChannelAddress
+ * @property array|null $context
* @property string $status
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
- * @property array $links
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
+ * @property array|null $links
*/
class EngagementInstance extends InstanceResource
{
- protected $_steps = null;
- protected $_engagementContext = null;
+ protected $_steps;
+ protected $_engagementContext;
/**
* Initialize the EngagementInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $flowSid The SID of the Flow
- * @param string $sid The SID of the Engagement resource to fetch
- * @return \Twilio\Rest\Studio\V1\Flow\EngagementInstance
+ * @param string $flowSid The SID of the Flow.
+ * @param string $sid The SID of the Engagement resource to delete.
*/
- public function __construct(Version $version, array $payload, $flowSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $flowSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'flowSid' => Values::array_get($payload, 'flow_sid'),
@@ -59,19 +69,18 @@ public function __construct(Version $version, array $payload, $flowSid, $sid = n
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('flowSid' => $flowSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['flowSid' => $flowSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Studio\V1\Flow\EngagementContext Context for this
- * EngagementInstance
+ * @return EngagementContext Context for this EngagementInstance
*/
- protected function proxy()
+ protected function proxy(): EngagementContext
{
if (!$this->context) {
$this->context = new EngagementContext(
@@ -85,43 +94,41 @@ protected function proxy()
}
/**
- * Fetch a EngagementInstance
+ * Delete the EngagementInstance
*
- * @return EngagementInstance Fetched EngagementInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the EngagementInstance
+ * Fetch the EngagementInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return EngagementInstance Fetched EngagementInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): EngagementInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
* Access the steps
- *
- * @return \Twilio\Rest\Studio\V1\Flow\Engagement\StepList
*/
- protected function getSteps()
+ protected function getSteps(): StepList
{
return $this->proxy()->steps;
}
/**
* Access the engagementContext
- *
- * @return \Twilio\Rest\Studio\V1\Flow\Engagement\EngagementContextList
*/
- protected function getEngagementContext()
+ protected function getEngagementContext(): EngagementContextList
{
return $this->proxy()->engagementContext;
}
@@ -133,7 +140,7 @@ protected function getEngagementContext()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -152,12 +159,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Studio.V1.EngagementInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/EngagementList.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/EngagementList.php
index 9053bc6..540dcb4 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/EngagementList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/EngagementList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Studio
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Studio\V1\Flow;
@@ -12,56 +19,71 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class EngagementList extends ListResource
-{
+ {
/**
* Construct the EngagementList
*
* @param Version $version Version that contains the resource
- * @param string $flowSid The SID of the Flow
- * @return \Twilio\Rest\Studio\V1\Flow\EngagementList
+ * @param string $flowSid The SID of the Flow.
*/
- public function __construct(Version $version, $flowSid)
- {
+ public function __construct(
+ Version $version,
+ string $flowSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('flowSid' => $flowSid,);
-
- $this->uri = '/Flows/' . \rawurlencode($flowSid) . '/Engagements';
+ $this->solution = [
+ 'flowSid' =>
+ $flowSid,
+
+ ];
+
+ $this->uri = '/Flows/' . \rawurlencode($flowSid)
+ .'/Engagements';
}
/**
- * Streams EngagementInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the EngagementInstance
*
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @param string $to The Contact phone number to start a Studio Flow Engagement, available as variable `{{contact.channel.address}}`.
+ * @param string $from The Twilio phone number to send messages or initiate calls from during the Flow Engagement. Available as variable `{{flow.channel.address}}`
+ * @param array|Options $options Optional Arguments
+ * @return EngagementInstance Created EngagementInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($limit = null, $pageSize = null)
+ public function create(string $to, string $from, array $options = []): EngagementInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'To' =>
+ $to,
+ 'From' =>
+ $from,
+ 'Parameters' =>
+ Serialize::jsonObject($options['parameters']),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new EngagementInstance(
+ $this->version,
+ $payload,
+ $this->solution['flowSid']
+ );
}
+
/**
* Reads EngagementInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -77,11 +99,38 @@ public function stream($limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return EngagementInstance[] Array of results
*/
- public function read($limit = null, $pageSize = null)
+ public function read(int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($limit, $pageSize), false);
}
+ /**
+ * Streams EngagementInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of EngagementInstance records from the API.
* Request is executed immediately
@@ -89,21 +138,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of EngagementInstance
+ * @return EngagementPage Page of EngagementInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): EngagementPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new EngagementPage($this->version, $response, $this->solution);
}
@@ -113,9 +163,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of EngagementInstance
+ * @return EngagementPage Page of EngagementInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): EngagementPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -125,45 +175,22 @@ public function getPage($targetUrl)
return new EngagementPage($this->version, $response, $this->solution);
}
- /**
- * Create a new EngagementInstance
- *
- * @param string $to The Contact phone number to start a Studio Flow Engagement
- * @param string $from The Twilio phone number to send messages or initiate
- * calls from during the Flow Engagement
- * @param array|Options $options Optional Arguments
- * @return EngagementInstance Newly created EngagementInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($to, $from, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'To' => $to,
- 'From' => $from,
- 'Parameters' => Serialize::jsonObject($options['parameters']),
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new EngagementInstance($this->version, $payload, $this->solution['flowSid']);
- }
/**
* Constructs a EngagementContext
*
- * @param string $sid The SID of the Engagement resource to fetch
- * @return \Twilio\Rest\Studio\V1\Flow\EngagementContext
+ * @param string $sid The SID of the Engagement resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): EngagementContext
{
- return new EngagementContext($this->version, $this->solution['flowSid'], $sid);
+ return new EngagementContext(
+ $this->version,
+ $this->solution['flowSid'],
+ $sid
+ );
}
/**
@@ -171,8 +198,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Studio.V1.EngagementList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/EngagementOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/EngagementOptions.php
index c19a3e5..4e7b7ed 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/EngagementOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/EngagementOptions.php
@@ -1,10 +1,16 @@
options['parameters'] = $parameters;
}
/**
* A JSON string we will add to your flow's context and that you can access as variables inside your flow. For example, if you pass in `Parameters={'name':'Zeke'}` then inside a widget you can reference the variable `{{flow.data.name}}` which will return the string 'Zeke'. Note: the JSON value must explicitly be passed as a string, not as a hash object. Depending on your particular HTTP library, you may need to add quotes or URL encode your JSON string.
*
- * @param array $parameters A JSON string we will add to your flow's context
- * and that you can access as variables inside your
- * flow
+ * @param array $parameters A JSON string we will add to your flow's context and that you can access as variables inside your flow. For example, if you pass in `Parameters={'name':'Zeke'}` then inside a widget you can reference the variable `{{flow.data.name}}` which will return the string 'Zeke'. Note: the JSON value must explicitly be passed as a string, not as a hash object. Depending on your particular HTTP library, you may need to add quotes or URL encode your JSON string.
* @return $this Fluent Builder
*/
- public function setParameters($parameters)
+ public function setParameters(array $parameters): self
{
$this->options['parameters'] = $parameters;
return $this;
@@ -57,14 +70,13 @@ public function setParameters($parameters)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Studio.V1.CreateEngagementOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Studio.V1.CreateEngagementOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
+
+
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/EngagementPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/EngagementPage.php
index 39cf622..ed850a4 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/EngagementPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/EngagementPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return EngagementInstance \Twilio\Rest\Studio\V1\Flow\EngagementInstance
+ */
+ public function buildInstance(array $payload): EngagementInstance
{
return new EngagementInstance($this->version, $payload, $this->solution['flowSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Studio.V1.EngagementPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionContextContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionContextContext.php
index 12c1b4c..c049ecd 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionContextContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionContextContext.php
@@ -2,53 +2,67 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Studio
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Studio\V1\Flow\Execution;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class ExecutionContextContext extends InstanceContext
-{
+ {
/**
* Initialize the ExecutionContextContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $flowSid The SID of the Flow
- * @param string $executionSid The SID of the Execution
- * @return \Twilio\Rest\Studio\V1\Flow\Execution\ExecutionContextContext
+ * @param Version $version Version that contains the resource
+ * @param string $flowSid The SID of the Flow with the Execution context to fetch.
+ * @param string $executionSid The SID of the Execution context to fetch.
*/
- public function __construct(Version $version, $flowSid, $executionSid)
- {
+ public function __construct(
+ Version $version,
+ $flowSid,
+ $executionSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('flowSid' => $flowSid, 'executionSid' => $executionSid,);
+ $this->solution = [
+ 'flowSid' =>
+ $flowSid,
+ 'executionSid' =>
+ $executionSid,
+ ];
- $this->uri = '/Flows/' . \rawurlencode($flowSid) . '/Executions/' . \rawurlencode($executionSid) . '/Context';
+ $this->uri = '/Flows/' . \rawurlencode($flowSid)
+ .'/Executions/' . \rawurlencode($executionSid)
+ .'/Context';
}
/**
- * Fetch a ExecutionContextInstance
+ * Fetch the ExecutionContextInstance
*
* @return ExecutionContextInstance Fetched ExecutionContextInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): ExecutionContextInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new ExecutionContextInstance(
$this->version,
@@ -58,17 +72,18 @@ public function fetch()
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Studio.V1.ExecutionContextContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionContextInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionContextInstance.php
index 4334988..1c3d0bb 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionContextInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionContextInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Studio
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Studio\V1\Flow\Execution;
use Twilio\Exceptions\TwilioException;
@@ -14,47 +22,47 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * @property string $accountSid
- * @property array $context
- * @property string $flowSid
- * @property string $executionSid
- * @property string $url
+ * @property string|null $accountSid
+ * @property array|null $context
+ * @property string|null $flowSid
+ * @property string|null $executionSid
+ * @property string|null $url
*/
class ExecutionContextInstance extends InstanceResource
{
/**
* Initialize the ExecutionContextInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $flowSid The SID of the Flow
- * @param string $executionSid The SID of the Execution
- * @return \Twilio\Rest\Studio\V1\Flow\Execution\ExecutionContextInstance
+ * @param string $flowSid The SID of the Flow with the Execution context to fetch.
+ * @param string $executionSid The SID of the Execution context to fetch.
*/
- public function __construct(Version $version, array $payload, $flowSid, $executionSid)
+ public function __construct(Version $version, array $payload, string $flowSid, string $executionSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'context' => Values::array_get($payload, 'context'),
'flowSid' => Values::array_get($payload, 'flow_sid'),
'executionSid' => Values::array_get($payload, 'execution_sid'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('flowSid' => $flowSid, 'executionSid' => $executionSid,);
+ $this->solution = ['flowSid' => $flowSid, 'executionSid' => $executionSid, ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Studio\V1\Flow\Execution\ExecutionContextContext Context for this ExecutionContextInstance
+ * @return ExecutionContextContext Context for this ExecutionContextInstance
*/
- protected function proxy()
+ protected function proxy(): ExecutionContextContext
{
if (!$this->context) {
$this->context = new ExecutionContextContext(
@@ -68,13 +76,14 @@ protected function proxy()
}
/**
- * Fetch a ExecutionContextInstance
+ * Fetch the ExecutionContextInstance
*
* @return ExecutionContextInstance Fetched ExecutionContextInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): ExecutionContextInstance
{
+
return $this->proxy()->fetch();
}
@@ -85,7 +94,7 @@ public function fetch()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -104,12 +113,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Studio.V1.ExecutionContextInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionContextList.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionContextList.php
index abce293..f94b429 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionContextList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionContextList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Studio
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Studio\V1\Flow\Execution;
@@ -12,30 +19,40 @@
use Twilio\ListResource;
use Twilio\Version;
+
class ExecutionContextList extends ListResource
-{
+ {
/**
* Construct the ExecutionContextList
*
* @param Version $version Version that contains the resource
- * @param string $flowSid The SID of the Flow
- * @param string $executionSid The SID of the Execution
- * @return \Twilio\Rest\Studio\V1\Flow\Execution\ExecutionContextList
+ * @param string $flowSid The SID of the Flow with the Execution context to fetch.
+ * @param string $executionSid The SID of the Execution context to fetch.
*/
- public function __construct(Version $version, $flowSid, $executionSid)
- {
+ public function __construct(
+ Version $version,
+ string $flowSid,
+ string $executionSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('flowSid' => $flowSid, 'executionSid' => $executionSid,);
+ $this->solution = [
+ 'flowSid' =>
+ $flowSid,
+
+ 'executionSid' =>
+ $executionSid,
+
+ ];
}
/**
* Constructs a ExecutionContextContext
- *
- * @return \Twilio\Rest\Studio\V1\Flow\Execution\ExecutionContextContext
*/
- public function getContext()
+ public function getContext(
+
+ ): ExecutionContextContext
{
return new ExecutionContextContext(
$this->version,
@@ -49,8 +66,8 @@ public function getContext()
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Studio.V1.ExecutionContextList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionContextPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionContextPage.php
index 8e32eab..00459dd 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionContextPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionContextPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return ExecutionContextInstance \Twilio\Rest\Studio\V1\Flow\Execution\ExecutionContextInstance
+ */
+ public function buildInstance(array $payload): ExecutionContextInstance
{
- return new ExecutionContextInstance(
- $this->version,
- $payload,
- $this->solution['flowSid'],
- $this->solution['executionSid']
- );
+ return new ExecutionContextInstance($this->version, $payload, $this->solution['flowSid'], $this->solution['executionSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Studio.V1.ExecutionContextPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStep/ExecutionStepContextContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStep/ExecutionStepContextContext.php
index 2aae666..1db2867 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStep/ExecutionStepContextContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStep/ExecutionStepContextContext.php
@@ -2,58 +2,72 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Studio
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Studio\V1\Flow\Execution\ExecutionStep;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class ExecutionStepContextContext extends InstanceContext
-{
+ {
/**
* Initialize the ExecutionStepContextContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $flowSid The SID of the Flow
- * @param string $executionSid The SID of the Execution
- * @param string $stepSid Step SID
- * @return \Twilio\Rest\Studio\V1\Flow\Execution\ExecutionStep\ExecutionStepContextContext
+ * @param Version $version Version that contains the resource
+ * @param string $flowSid The SID of the Flow with the Step to fetch.
+ * @param string $executionSid The SID of the Execution resource with the Step to fetch.
+ * @param string $stepSid The SID of the Step to fetch.
*/
- public function __construct(Version $version, $flowSid, $executionSid, $stepSid)
- {
+ public function __construct(
+ Version $version,
+ $flowSid,
+ $executionSid,
+ $stepSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array(
- 'flowSid' => $flowSid,
- 'executionSid' => $executionSid,
- 'stepSid' => $stepSid,
- );
+ $this->solution = [
+ 'flowSid' =>
+ $flowSid,
+ 'executionSid' =>
+ $executionSid,
+ 'stepSid' =>
+ $stepSid,
+ ];
- $this->uri = '/Flows/' . \rawurlencode($flowSid) . '/Executions/' . \rawurlencode($executionSid) . '/Steps/' . \rawurlencode($stepSid) . '/Context';
+ $this->uri = '/Flows/' . \rawurlencode($flowSid)
+ .'/Executions/' . \rawurlencode($executionSid)
+ .'/Steps/' . \rawurlencode($stepSid)
+ .'/Context';
}
/**
- * Fetch a ExecutionStepContextInstance
+ * Fetch the ExecutionStepContextInstance
*
* @return ExecutionStepContextInstance Fetched ExecutionStepContextInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): ExecutionStepContextInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new ExecutionStepContextInstance(
$this->version,
@@ -64,17 +78,18 @@ public function fetch()
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Studio.V1.ExecutionStepContextContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStep/ExecutionStepContextInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStep/ExecutionStepContextInstance.php
index 8a63bf5..685945a 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStep/ExecutionStepContextInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStep/ExecutionStepContextInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Studio
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Studio\V1\Flow\Execution\ExecutionStep;
use Twilio\Exceptions\TwilioException;
@@ -14,55 +22,50 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * @property string $accountSid
- * @property array $context
- * @property string $executionSid
- * @property string $flowSid
- * @property string $stepSid
- * @property string $url
+ * @property string|null $accountSid
+ * @property array|null $context
+ * @property string|null $executionSid
+ * @property string|null $flowSid
+ * @property string|null $stepSid
+ * @property string|null $url
*/
class ExecutionStepContextInstance extends InstanceResource
{
/**
* Initialize the ExecutionStepContextInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $flowSid The SID of the Flow
- * @param string $executionSid The SID of the Execution
- * @param string $stepSid Step SID
- * @return \Twilio\Rest\Studio\V1\Flow\Execution\ExecutionStep\ExecutionStepContextInstance
+ * @param string $flowSid The SID of the Flow with the Step to fetch.
+ * @param string $executionSid The SID of the Execution resource with the Step to fetch.
+ * @param string $stepSid The SID of the Step to fetch.
*/
- public function __construct(Version $version, array $payload, $flowSid, $executionSid, $stepSid)
+ public function __construct(Version $version, array $payload, string $flowSid, string $executionSid, string $stepSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'context' => Values::array_get($payload, 'context'),
'executionSid' => Values::array_get($payload, 'execution_sid'),
'flowSid' => Values::array_get($payload, 'flow_sid'),
'stepSid' => Values::array_get($payload, 'step_sid'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array(
- 'flowSid' => $flowSid,
- 'executionSid' => $executionSid,
- 'stepSid' => $stepSid,
- );
+ $this->solution = ['flowSid' => $flowSid, 'executionSid' => $executionSid, 'stepSid' => $stepSid, ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Studio\V1\Flow\Execution\ExecutionStep\ExecutionStepContextContext Context for this
- * ExecutionStepContextInstance
+ * @return ExecutionStepContextContext Context for this ExecutionStepContextInstance
*/
- protected function proxy()
+ protected function proxy(): ExecutionStepContextContext
{
if (!$this->context) {
$this->context = new ExecutionStepContextContext(
@@ -77,13 +80,14 @@ protected function proxy()
}
/**
- * Fetch a ExecutionStepContextInstance
+ * Fetch the ExecutionStepContextInstance
*
* @return ExecutionStepContextInstance Fetched ExecutionStepContextInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): ExecutionStepContextInstance
{
+
return $this->proxy()->fetch();
}
@@ -94,7 +98,7 @@ public function fetch()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -113,12 +117,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Studio.V1.ExecutionStepContextInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStep/ExecutionStepContextList.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStep/ExecutionStepContextList.php
index 6f79463..79beff4 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStep/ExecutionStepContextList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStep/ExecutionStepContextList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Studio
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Studio\V1\Flow\Execution\ExecutionStep;
@@ -12,35 +19,45 @@
use Twilio\ListResource;
use Twilio\Version;
+
class ExecutionStepContextList extends ListResource
-{
+ {
/**
* Construct the ExecutionStepContextList
*
* @param Version $version Version that contains the resource
- * @param string $flowSid The SID of the Flow
- * @param string $executionSid The SID of the Execution
- * @param string $stepSid Step SID
- * @return \Twilio\Rest\Studio\V1\Flow\Execution\ExecutionStep\ExecutionStepContextList
+ * @param string $flowSid The SID of the Flow with the Step to fetch.
+ * @param string $executionSid The SID of the Execution resource with the Step to fetch.
+ * @param string $stepSid The SID of the Step to fetch.
*/
- public function __construct(Version $version, $flowSid, $executionSid, $stepSid)
- {
+ public function __construct(
+ Version $version,
+ string $flowSid,
+ string $executionSid,
+ string $stepSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array(
- 'flowSid' => $flowSid,
- 'executionSid' => $executionSid,
- 'stepSid' => $stepSid,
- );
+ $this->solution = [
+ 'flowSid' =>
+ $flowSid,
+
+ 'executionSid' =>
+ $executionSid,
+
+ 'stepSid' =>
+ $stepSid,
+
+ ];
}
/**
* Constructs a ExecutionStepContextContext
- *
- * @return \Twilio\Rest\Studio\V1\Flow\Execution\ExecutionStep\ExecutionStepContextContext
*/
- public function getContext()
+ public function getContext(
+
+ ): ExecutionStepContextContext
{
return new ExecutionStepContextContext(
$this->version,
@@ -55,8 +72,8 @@ public function getContext()
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Studio.V1.ExecutionStepContextList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStep/ExecutionStepContextPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStep/ExecutionStepContextPage.php
index 287122e..be9205f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStep/ExecutionStepContextPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStep/ExecutionStepContextPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return ExecutionStepContextInstance \Twilio\Rest\Studio\V1\Flow\Execution\ExecutionStep\ExecutionStepContextInstance
+ */
+ public function buildInstance(array $payload): ExecutionStepContextInstance
{
- return new ExecutionStepContextInstance(
- $this->version,
- $payload,
- $this->solution['flowSid'],
- $this->solution['executionSid'],
- $this->solution['stepSid']
- );
+ return new ExecutionStepContextInstance($this->version, $payload, $this->solution['flowSid'], $this->solution['executionSid'], $this->solution['stepSid']);
}
/**
@@ -37,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Studio.V1.ExecutionStepContextPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStepContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStepContext.php
index 02e9c0c..1f857bd 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStepContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStepContext.php
@@ -2,61 +2,80 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Studio
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Studio\V1\Flow\Execution;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
-use Twilio\Rest\Studio\V1\Flow\Execution\ExecutionStep\ExecutionStepContextList;
+use Twilio\ListResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Studio\V1\Flow\Execution\ExecutionStep\ExecutionStepContextList;
+
/**
- * @property \Twilio\Rest\Studio\V1\Flow\Execution\ExecutionStep\ExecutionStepContextList $stepContext
+ * @property ExecutionStepContextList $stepContext
* @method \Twilio\Rest\Studio\V1\Flow\Execution\ExecutionStep\ExecutionStepContextContext stepContext()
*/
class ExecutionStepContext extends InstanceContext
-{
- protected $_stepContext = null;
+ {
+ protected $_stepContext;
/**
* Initialize the ExecutionStepContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $flowSid The SID of the Flow
- * @param string $executionSid The SID of the Execution
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Studio\V1\Flow\Execution\ExecutionStepContext
+ * @param Version $version Version that contains the resource
+ * @param string $flowSid The SID of the Flow with the Step to fetch.
+ * @param string $executionSid The SID of the Execution resource with the Step to fetch.
+ * @param string $sid The SID of the ExecutionStep resource to fetch.
*/
- public function __construct(Version $version, $flowSid, $executionSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $flowSid,
+ $executionSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('flowSid' => $flowSid, 'executionSid' => $executionSid, 'sid' => $sid,);
-
- $this->uri = '/Flows/' . \rawurlencode($flowSid) . '/Executions/' . \rawurlencode($executionSid) . '/Steps/' . \rawurlencode($sid) . '';
+ $this->solution = [
+ 'flowSid' =>
+ $flowSid,
+ 'executionSid' =>
+ $executionSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Flows/' . \rawurlencode($flowSid)
+ .'/Executions/' . \rawurlencode($executionSid)
+ .'/Steps/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a ExecutionStepInstance
+ * Fetch the ExecutionStepInstance
*
* @return ExecutionStepInstance Fetched ExecutionStepInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): ExecutionStepInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new ExecutionStepInstance(
$this->version,
@@ -67,12 +86,11 @@ public function fetch()
);
}
+
/**
* Access the stepContext
- *
- * @return \Twilio\Rest\Studio\V1\Flow\Execution\ExecutionStep\ExecutionStepContextList
*/
- protected function getStepContext()
+ protected function getStepContext(): ExecutionStepContextList
{
if (!$this->_stepContext) {
$this->_stepContext = new ExecutionStepContextList(
@@ -90,10 +108,10 @@ protected function getStepContext()
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -108,10 +126,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -126,12 +144,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Studio.V1.ExecutionStepContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStepInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStepInstance.php
index e932b4e..6e9e9a8 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStepInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStepInstance.php
@@ -2,53 +2,62 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Studio
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Studio\V1\Flow\Execution;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Studio\V1\Flow\Execution\ExecutionStep\ExecutionStepContextList;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $flowSid
- * @property string $executionSid
- * @property string $name
- * @property array $context
- * @property string $transitionedFrom
- * @property string $transitionedTo
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
- * @property array $links
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $flowSid
+ * @property string|null $executionSid
+ * @property string|null $name
+ * @property array|null $context
+ * @property string|null $transitionedFrom
+ * @property string|null $transitionedTo
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
+ * @property array|null $links
*/
class ExecutionStepInstance extends InstanceResource
{
- protected $_stepContext = null;
+ protected $_stepContext;
/**
* Initialize the ExecutionStepInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $flowSid The SID of the Flow
- * @param string $executionSid The SID of the Execution
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Studio\V1\Flow\Execution\ExecutionStepInstance
+ * @param string $flowSid The SID of the Flow with the Step to fetch.
+ * @param string $executionSid The SID of the Execution resource with the Step to fetch.
+ * @param string $sid The SID of the ExecutionStep resource to fetch.
*/
- public function __construct(Version $version, array $payload, $flowSid, $executionSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $flowSid, string $executionSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'flowSid' => Values::array_get($payload, 'flow_sid'),
@@ -61,24 +70,18 @@ public function __construct(Version $version, array $payload, $flowSid, $executi
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array(
- 'flowSid' => $flowSid,
- 'executionSid' => $executionSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['flowSid' => $flowSid, 'executionSid' => $executionSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Studio\V1\Flow\Execution\ExecutionStepContext Context
- * for this
- * ExecutionStepInstance
+ * @return ExecutionStepContext Context for this ExecutionStepInstance
*/
- protected function proxy()
+ protected function proxy(): ExecutionStepContext
{
if (!$this->context) {
$this->context = new ExecutionStepContext(
@@ -93,22 +96,21 @@ protected function proxy()
}
/**
- * Fetch a ExecutionStepInstance
+ * Fetch the ExecutionStepInstance
*
* @return ExecutionStepInstance Fetched ExecutionStepInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): ExecutionStepInstance
{
+
return $this->proxy()->fetch();
}
/**
* Access the stepContext
- *
- * @return \Twilio\Rest\Studio\V1\Flow\Execution\ExecutionStep\ExecutionStepContextList
*/
- protected function getStepContext()
+ protected function getStepContext(): ExecutionStepContextList
{
return $this->proxy()->stepContext;
}
@@ -120,7 +122,7 @@ protected function getStepContext()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -139,12 +141,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Studio.V1.ExecutionStepInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStepList.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStepList.php
index 7da95ea..02f0b5a 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStepList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStepList.php
@@ -2,35 +2,75 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Studio
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Studio\V1\Flow\Execution;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class ExecutionStepList extends ListResource
-{
+ {
/**
* Construct the ExecutionStepList
*
* @param Version $version Version that contains the resource
- * @param string $flowSid The SID of the Flow
- * @param string $executionSid The SID of the Execution
- * @return \Twilio\Rest\Studio\V1\Flow\Execution\ExecutionStepList
+ * @param string $flowSid The SID of the Flow with the Step to fetch.
+ * @param string $executionSid The SID of the Execution resource with the Step to fetch.
*/
- public function __construct(Version $version, $flowSid, $executionSid)
- {
+ public function __construct(
+ Version $version,
+ string $flowSid,
+ string $executionSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('flowSid' => $flowSid, 'executionSid' => $executionSid,);
+ $this->solution = [
+ 'flowSid' =>
+ $flowSid,
+
+ 'executionSid' =>
+ $executionSid,
+
+ ];
+
+ $this->uri = '/Flows/' . \rawurlencode($flowSid)
+ .'/Executions/' . \rawurlencode($executionSid)
+ .'/Steps';
+ }
- $this->uri = '/Flows/' . \rawurlencode($flowSid) . '/Executions/' . \rawurlencode($executionSid) . '/Steps';
+ /**
+ * Reads ExecutionStepInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return ExecutionStepInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -49,9 +89,9 @@ public function __construct(Version $version, $flowSid, $executionSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -60,26 +100,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads ExecutionStepInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return ExecutionStepInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of ExecutionStepInstance records from the API.
* Request is executed immediately
@@ -87,21 +107,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of ExecutionStepInstance
+ * @return ExecutionStepPage Page of ExecutionStepInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): ExecutionStepPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new ExecutionStepPage($this->version, $response, $this->solution);
}
@@ -111,9 +132,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of ExecutionStepInstance
+ * @return ExecutionStepPage Page of ExecutionStepInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): ExecutionStepPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -123,13 +144,16 @@ public function getPage($targetUrl)
return new ExecutionStepPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a ExecutionStepContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Studio\V1\Flow\Execution\ExecutionStepContext
+ * @param string $sid The SID of the ExecutionStep resource to fetch.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): ExecutionStepContext
{
return new ExecutionStepContext(
$this->version,
@@ -144,8 +168,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Studio.V1.ExecutionStepList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStepPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStepPage.php
index bad07c8..5bb6fdc 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStepPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/Execution/ExecutionStepPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return ExecutionStepInstance \Twilio\Rest\Studio\V1\Flow\Execution\ExecutionStepInstance
+ */
+ public function buildInstance(array $payload): ExecutionStepInstance
{
- return new ExecutionStepInstance(
- $this->version,
- $payload,
- $this->solution['flowSid'],
- $this->solution['executionSid']
- );
+ return new ExecutionStepInstance($this->version, $payload, $this->solution['flowSid'], $this->solution['executionSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Studio.V1.ExecutionStepPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/ExecutionContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/ExecutionContext.php
index 237c5c5..9efd03b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/ExecutionContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/ExecutionContext.php
@@ -2,64 +2,93 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Studio
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Studio\V1\Flow;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
-use Twilio\Rest\Studio\V1\Flow\Execution\ExecutionContextList;
-use Twilio\Rest\Studio\V1\Flow\Execution\ExecutionStepList;
+use Twilio\ListResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Studio\V1\Flow\Execution\ExecutionStepList;
+use Twilio\Rest\Studio\V1\Flow\Execution\ExecutionContextList;
+
/**
- * @property \Twilio\Rest\Studio\V1\Flow\Execution\ExecutionStepList $steps
- * @property \Twilio\Rest\Studio\V1\Flow\Execution\ExecutionContextList $executionContext
- * @method \Twilio\Rest\Studio\V1\Flow\Execution\ExecutionStepContext steps(string $sid)
+ * @property ExecutionStepList $steps
+ * @property ExecutionContextList $executionContext
* @method \Twilio\Rest\Studio\V1\Flow\Execution\ExecutionContextContext executionContext()
+ * @method \Twilio\Rest\Studio\V1\Flow\Execution\ExecutionStepContext steps(string $sid)
*/
class ExecutionContext extends InstanceContext
-{
- protected $_steps = null;
- protected $_executionContext = null;
+ {
+ protected $_steps;
+ protected $_executionContext;
/**
* Initialize the ExecutionContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $flowSid The SID of the Flow
- * @param string $sid The SID of the Execution resource to fetch
- * @return \Twilio\Rest\Studio\V1\Flow\ExecutionContext
+ * @param Version $version Version that contains the resource
+ * @param string $flowSid The SID of the Excecution's Flow.
+ * @param string $sid The SID of the Execution resource to delete.
*/
- public function __construct(Version $version, $flowSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $flowSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('flowSid' => $flowSid, 'sid' => $sid,);
+ $this->solution = [
+ 'flowSid' =>
+ $flowSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Flows/' . \rawurlencode($flowSid)
+ .'/Executions/' . \rawurlencode($sid)
+ .'';
+ }
+
+ /**
+ * Delete the ExecutionInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Flows/' . \rawurlencode($flowSid) . '/Executions/' . \rawurlencode($sid) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a ExecutionInstance
+ * Fetch the ExecutionInstance
*
* @return ExecutionInstance Fetched ExecutionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): ExecutionInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new ExecutionInstance(
$this->version,
@@ -69,23 +98,38 @@ public function fetch()
);
}
+
/**
- * Deletes the ExecutionInstance
+ * Update the ExecutionInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param string $status
+ * @return ExecutionInstance Updated ExecutionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(string $status): ExecutionInstance
{
- return $this->version->delete('delete', $this->uri);
+
+ $data = Values::of([
+ 'Status' =>
+ $status,
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
+
+ return new ExecutionInstance(
+ $this->version,
+ $payload,
+ $this->solution['flowSid'],
+ $this->solution['sid']
+ );
}
+
/**
* Access the steps
- *
- * @return \Twilio\Rest\Studio\V1\Flow\Execution\ExecutionStepList
*/
- protected function getSteps()
+ protected function getSteps(): ExecutionStepList
{
if (!$this->_steps) {
$this->_steps = new ExecutionStepList(
@@ -100,10 +144,8 @@ protected function getSteps()
/**
* Access the executionContext
- *
- * @return \Twilio\Rest\Studio\V1\Flow\Execution\ExecutionContextList
*/
- protected function getExecutionContext()
+ protected function getExecutionContext(): ExecutionContextList
{
if (!$this->_executionContext) {
$this->_executionContext = new ExecutionContextList(
@@ -120,10 +162,10 @@ protected function getExecutionContext()
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -138,10 +180,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -156,12 +198,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Studio.V1.ExecutionContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/ExecutionInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/ExecutionInstance.php
index 5d33171..4a0307e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/ExecutionInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/ExecutionInstance.php
@@ -2,52 +2,62 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Studio
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Studio\V1\Flow;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Studio\V1\Flow\Execution\ExecutionStepList;
+use Twilio\Rest\Studio\V1\Flow\Execution\ExecutionContextList;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $flowSid
- * @property string $contactSid
- * @property string $contactChannelAddress
- * @property array $context
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $flowSid
+ * @property string|null $contactSid
+ * @property string|null $contactChannelAddress
+ * @property array|null $context
* @property string $status
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
- * @property array $links
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
+ * @property array|null $links
*/
class ExecutionInstance extends InstanceResource
{
- protected $_steps = null;
- protected $_executionContext = null;
+ protected $_steps;
+ protected $_executionContext;
/**
* Initialize the ExecutionInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $flowSid The SID of the Flow
- * @param string $sid The SID of the Execution resource to fetch
- * @return \Twilio\Rest\Studio\V1\Flow\ExecutionInstance
+ * @param string $flowSid The SID of the Excecution's Flow.
+ * @param string $sid The SID of the Execution resource to delete.
*/
- public function __construct(Version $version, array $payload, $flowSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $flowSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'flowSid' => Values::array_get($payload, 'flow_sid'),
@@ -59,19 +69,18 @@ public function __construct(Version $version, array $payload, $flowSid, $sid = n
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('flowSid' => $flowSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['flowSid' => $flowSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Studio\V1\Flow\ExecutionContext Context for this
- * ExecutionInstance
+ * @return ExecutionContext Context for this ExecutionInstance
*/
- protected function proxy()
+ protected function proxy(): ExecutionContext
{
if (!$this->context) {
$this->context = new ExecutionContext(
@@ -85,43 +94,54 @@ protected function proxy()
}
/**
- * Fetch a ExecutionInstance
+ * Delete the ExecutionInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ return $this->proxy()->delete();
+ }
+
+ /**
+ * Fetch the ExecutionInstance
*
* @return ExecutionInstance Fetched ExecutionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): ExecutionInstance
{
+
return $this->proxy()->fetch();
}
/**
- * Deletes the ExecutionInstance
+ * Update the ExecutionInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param string $status
+ * @return ExecutionInstance Updated ExecutionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(string $status): ExecutionInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->update($status);
}
/**
* Access the steps
- *
- * @return \Twilio\Rest\Studio\V1\Flow\Execution\ExecutionStepList
*/
- protected function getSteps()
+ protected function getSteps(): ExecutionStepList
{
return $this->proxy()->steps;
}
/**
* Access the executionContext
- *
- * @return \Twilio\Rest\Studio\V1\Flow\Execution\ExecutionContextList
*/
- protected function getExecutionContext()
+ protected function getExecutionContext(): ExecutionContextList
{
return $this->proxy()->executionContext;
}
@@ -133,7 +153,7 @@ protected function getExecutionContext()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -152,12 +172,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Studio.V1.ExecutionInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/ExecutionList.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/ExecutionList.php
index f4816c4..881ea95 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/ExecutionList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/ExecutionList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Studio
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Studio\V1\Flow;
@@ -12,57 +19,71 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class ExecutionList extends ListResource
-{
+ {
/**
* Construct the ExecutionList
*
* @param Version $version Version that contains the resource
- * @param string $flowSid The SID of the Flow
- * @return \Twilio\Rest\Studio\V1\Flow\ExecutionList
+ * @param string $flowSid The SID of the Excecution's Flow.
*/
- public function __construct(Version $version, $flowSid)
- {
+ public function __construct(
+ Version $version,
+ string $flowSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('flowSid' => $flowSid,);
-
- $this->uri = '/Flows/' . \rawurlencode($flowSid) . '/Executions';
+ $this->solution = [
+ 'flowSid' =>
+ $flowSid,
+
+ ];
+
+ $this->uri = '/Flows/' . \rawurlencode($flowSid)
+ .'/Executions';
}
/**
- * Streams ExecutionInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the ExecutionInstance
*
+ * @param string $to The Contact phone number to start a Studio Flow Execution, available as variable `{{contact.channel.address}}`.
+ * @param string $from The Twilio phone number to send messages or initiate calls from during the Flow's Execution. Available as variable `{{flow.channel.address}}`. For SMS, this can also be a Messaging Service SID.
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return ExecutionInstance Created ExecutionInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function create(string $to, string $from, array $options = []): ExecutionInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($options, $limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'To' =>
+ $to,
+ 'From' =>
+ $from,
+ 'Parameters' =>
+ Serialize::jsonObject($options['parameters']),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new ExecutionInstance(
+ $this->version,
+ $payload,
+ $this->solution['flowSid']
+ );
}
+
/**
* Reads ExecutionInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -79,37 +100,68 @@ public function stream($options = array(), $limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return ExecutionInstance[] Array of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
+ /**
+ * Streams ExecutionInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of ExecutionInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of ExecutionInstance
+ * @return ExecutionPage Page of ExecutionInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): ExecutionPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'DateCreatedFrom' => Serialize::iso8601DateTime($options['dateCreatedFrom']),
- 'DateCreatedTo' => Serialize::iso8601DateTime($options['dateCreatedTo']),
+
+ $params = Values::of([
+ 'DateCreatedFrom' =>
+ Serialize::iso8601DateTime($options['dateCreatedFrom']),
+ 'DateCreatedTo' =>
+ Serialize::iso8601DateTime($options['dateCreatedTo']),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new ExecutionPage($this->version, $response, $this->solution);
}
@@ -119,9 +171,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of ExecutionInstance
+ * @return ExecutionPage Page of ExecutionInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): ExecutionPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -131,45 +183,22 @@ public function getPage($targetUrl)
return new ExecutionPage($this->version, $response, $this->solution);
}
- /**
- * Create a new ExecutionInstance
- *
- * @param string $to The Contact phone number to start a Studio Flow Execution
- * @param string $from The Twilio phone number to send messages or initiate
- * calls from during the Flow Execution
- * @param array|Options $options Optional Arguments
- * @return ExecutionInstance Newly created ExecutionInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($to, $from, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'To' => $to,
- 'From' => $from,
- 'Parameters' => Serialize::jsonObject($options['parameters']),
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new ExecutionInstance($this->version, $payload, $this->solution['flowSid']);
- }
/**
* Constructs a ExecutionContext
*
- * @param string $sid The SID of the Execution resource to fetch
- * @return \Twilio\Rest\Studio\V1\Flow\ExecutionContext
+ * @param string $sid The SID of the Execution resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): ExecutionContext
{
- return new ExecutionContext($this->version, $this->solution['flowSid'], $sid);
+ return new ExecutionContext(
+ $this->version,
+ $this->solution['flowSid'],
+ $sid
+ );
}
/**
@@ -177,8 +206,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Studio.V1.ExecutionList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/ExecutionOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/ExecutionOptions.php
index e7bbe77..7008176 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/ExecutionOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/ExecutionOptions.php
@@ -1,10 +1,16 @@
options['dateCreatedFrom'] = $dateCreatedFrom;
- $this->options['dateCreatedTo'] = $dateCreatedTo;
- }
-
/**
- * Only show Execution resources starting on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`.
- *
- * @param \DateTime $dateCreatedFrom Only show Executions that started on or
- * after this ISO 8601 date-time
- * @return $this Fluent Builder
+ * @param array $parameters JSON data that will be added to the Flow's context and that can be accessed as variables inside your Flow. For example, if you pass in `Parameters={\\\"name\\\":\\\"Zeke\\\"}`, a widget in your Flow can reference the variable `{{flow.data.name}}`, which returns \\\"Zeke\\\". Note: the JSON value must explicitly be passed as a string, not as a hash object. Depending on your particular HTTP library, you may need to add quotes or URL encode the JSON string.
*/
- public function setDateCreatedFrom($dateCreatedFrom)
- {
- $this->options['dateCreatedFrom'] = $dateCreatedFrom;
- return $this;
+ public function __construct(
+
+ array $parameters = Values::ARRAY_NONE
+
+ ) {
+ $this->options['parameters'] = $parameters;
}
/**
- * Only show Execution resources starting before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`.
+ * JSON data that will be added to the Flow's context and that can be accessed as variables inside your Flow. For example, if you pass in `Parameters={\\\"name\\\":\\\"Zeke\\\"}`, a widget in your Flow can reference the variable `{{flow.data.name}}`, which returns \\\"Zeke\\\". Note: the JSON value must explicitly be passed as a string, not as a hash object. Depending on your particular HTTP library, you may need to add quotes or URL encode the JSON string.
*
- * @param \DateTime $dateCreatedTo Only show Executions that started before
- * this ISO 8601 date-time
+ * @param array $parameters JSON data that will be added to the Flow's context and that can be accessed as variables inside your Flow. For example, if you pass in `Parameters={\\\"name\\\":\\\"Zeke\\\"}`, a widget in your Flow can reference the variable `{{flow.data.name}}`, which returns \\\"Zeke\\\". Note: the JSON value must explicitly be passed as a string, not as a hash object. Depending on your particular HTTP library, you may need to add quotes or URL encode the JSON string.
* @return $this Fluent Builder
*/
- public function setDateCreatedTo($dateCreatedTo)
+ public function setParameters(array $parameters): self
{
- $this->options['dateCreatedTo'] = $dateCreatedTo;
+ $this->options['parameters'] = $parameters;
return $this;
}
@@ -81,37 +88,52 @@ public function setDateCreatedTo($dateCreatedTo)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Studio.V1.ReadExecutionOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Studio.V1.CreateExecutionOptions ' . $options . ']';
}
}
-class CreateExecutionOptions extends Options
-{
+
+
+class ReadExecutionOptions extends Options
+ {
+ /**
+ * @param \DateTime $dateCreatedFrom Only show Execution resources starting on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`.
+ * @param \DateTime $dateCreatedTo Only show Execution resources starting before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`.
+ */
+ public function __construct(
+
+ \DateTime $dateCreatedFrom = null,
+ \DateTime $dateCreatedTo = null
+
+ ) {
+ $this->options['dateCreatedFrom'] = $dateCreatedFrom;
+ $this->options['dateCreatedTo'] = $dateCreatedTo;
+ }
+
/**
- * @param array $parameters JSON data that will be added to the Flow's context
+ * Only show Execution resources starting on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`.
+ *
+ * @param \DateTime $dateCreatedFrom Only show Execution resources starting on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`.
+ * @return $this Fluent Builder
*/
- public function __construct($parameters = Values::NONE)
+ public function setDateCreatedFrom(\DateTime $dateCreatedFrom): self
{
- $this->options['parameters'] = $parameters;
+ $this->options['dateCreatedFrom'] = $dateCreatedFrom;
+ return $this;
}
/**
- * JSON data that will be added to the Flow's context and that can be accessed as variables inside your Flow. For example, if you pass in `Parameters={"name":"Zeke"}`, a widget in your Flow can reference the variable `{{flow.data.name}}`, which returns "Zeke". Note: the JSON value must explicitly be passed as a string, not as a hash object. Depending on your particular HTTP library, you may need to add quotes or URL encode the JSON string.
+ * Only show Execution resources starting before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`.
*
- * @param array $parameters JSON data that will be added to the Flow's context
+ * @param \DateTime $dateCreatedTo Only show Execution resources starting before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time, given as `YYYY-MM-DDThh:mm:ss-hh:mm`.
* @return $this Fluent Builder
*/
- public function setParameters($parameters)
+ public function setDateCreatedTo(\DateTime $dateCreatedTo): self
{
- $this->options['parameters'] = $parameters;
+ $this->options['dateCreatedTo'] = $dateCreatedTo;
return $this;
}
@@ -120,14 +142,11 @@ public function setParameters($parameters)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Studio.V1.CreateExecutionOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Studio.V1.ReadExecutionOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/ExecutionPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/ExecutionPage.php
index e86cb27..15deb40 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/ExecutionPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/Flow/ExecutionPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return ExecutionInstance \Twilio\Rest\Studio\V1\Flow\ExecutionInstance
+ */
+ public function buildInstance(array $payload): ExecutionInstance
{
return new ExecutionInstance($this->version, $payload, $this->solution['flowSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Studio.V1.ExecutionPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/FlowContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/FlowContext.php
index da855c4..1052d60 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/FlowContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/FlowContext.php
@@ -2,87 +2,107 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Studio
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Studio\V1;
use Twilio\Exceptions\TwilioException;
+use Twilio\ListResource;
+use Twilio\Values;
+use Twilio\Version;
use Twilio\InstanceContext;
use Twilio\Rest\Studio\V1\Flow\EngagementList;
use Twilio\Rest\Studio\V1\Flow\ExecutionList;
-use Twilio\Values;
-use Twilio\Version;
+
/**
- * @property \Twilio\Rest\Studio\V1\Flow\EngagementList $engagements
- * @property \Twilio\Rest\Studio\V1\Flow\ExecutionList $executions
- * @method \Twilio\Rest\Studio\V1\Flow\EngagementContext engagements(string $sid)
+ * @property EngagementList $engagements
+ * @property ExecutionList $executions
* @method \Twilio\Rest\Studio\V1\Flow\ExecutionContext executions(string $sid)
+ * @method \Twilio\Rest\Studio\V1\Flow\EngagementContext engagements(string $sid)
*/
class FlowContext extends InstanceContext
-{
- protected $_engagements = null;
- protected $_executions = null;
+ {
+ protected $_engagements;
+ protected $_executions;
/**
* Initialize the FlowContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Studio\V1\FlowContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid The SID of the Flow resource to delete.
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Flows/' . \rawurlencode($sid) . '';
+ $this->uri = '/Flows/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a FlowInstance
+ * Delete the FlowInstance
*
- * @return FlowInstance Fetched FlowInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new FlowInstance($this->version, $payload, $this->solution['sid']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Deletes the FlowInstance
+ * Fetch the FlowInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return FlowInstance Fetched FlowInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): FlowInstance
{
- return $this->version->delete('delete', $this->uri);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
+
+ return new FlowInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Access the engagements
- *
- * @return \Twilio\Rest\Studio\V1\Flow\EngagementList
*/
- protected function getEngagements()
+ protected function getEngagements(): EngagementList
{
if (!$this->_engagements) {
- $this->_engagements = new EngagementList($this->version, $this->solution['sid']);
+ $this->_engagements = new EngagementList(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->_engagements;
@@ -90,13 +110,14 @@ protected function getEngagements()
/**
* Access the executions
- *
- * @return \Twilio\Rest\Studio\V1\Flow\ExecutionList
*/
- protected function getExecutions()
+ protected function getExecutions(): ExecutionList
{
if (!$this->_executions) {
- $this->_executions = new ExecutionList($this->version, $this->solution['sid']);
+ $this->_executions = new ExecutionList(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->_executions;
@@ -106,10 +127,10 @@ protected function getExecutions()
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -124,10 +145,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -142,12 +163,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Studio.V1.FlowContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/FlowInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/FlowInstance.php
index 38d72a4..00ff1c4 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/FlowInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/FlowInstance.php
@@ -2,49 +2,59 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Studio
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Studio\V1;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Studio\V1\Flow\EngagementList;
+use Twilio\Rest\Studio\V1\Flow\ExecutionList;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $friendlyName
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $friendlyName
* @property string $status
* @property int $version
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
- * @property array $links
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
+ * @property array|null $links
*/
class FlowInstance extends InstanceResource
{
- protected $_engagements = null;
- protected $_executions = null;
+ protected $_engagements;
+ protected $_executions;
/**
* Initialize the FlowInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Studio\V1\FlowInstance
+ * @param string $sid The SID of the Flow resource to delete.
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
@@ -54,64 +64,65 @@ public function __construct(Version $version, array $payload, $sid = null)
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Studio\V1\FlowContext Context for this FlowInstance
+ * @return FlowContext Context for this FlowInstance
*/
- protected function proxy()
+ protected function proxy(): FlowContext
{
if (!$this->context) {
- $this->context = new FlowContext($this->version, $this->solution['sid']);
+ $this->context = new FlowContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a FlowInstance
+ * Delete the FlowInstance
*
- * @return FlowInstance Fetched FlowInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the FlowInstance
+ * Fetch the FlowInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return FlowInstance Fetched FlowInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): FlowInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
* Access the engagements
- *
- * @return \Twilio\Rest\Studio\V1\Flow\EngagementList
*/
- protected function getEngagements()
+ protected function getEngagements(): EngagementList
{
return $this->proxy()->engagements;
}
/**
* Access the executions
- *
- * @return \Twilio\Rest\Studio\V1\Flow\ExecutionList
*/
- protected function getExecutions()
+ protected function getExecutions(): ExecutionList
{
return $this->proxy()->executions;
}
@@ -123,7 +134,7 @@ protected function getExecutions()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -142,12 +153,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Studio.V1.FlowInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/FlowList.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/FlowList.php
index 30ff83c..599cd23 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/FlowList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/FlowList.php
@@ -2,35 +2,65 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Studio
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Studio\V1;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class FlowList extends ListResource
-{
+ {
/**
* Construct the FlowList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Studio\V1\FlowList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/Flows';
}
+ /**
+ * Reads FlowInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return FlowInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
+ }
+
/**
* Streams FlowInstance records from the API as a generator stream.
* This operation lazily loads records as efficiently as possible until the
@@ -47,9 +77,9 @@ public function __construct(Version $version)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -58,26 +88,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads FlowInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return FlowInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of FlowInstance records from the API.
* Request is executed immediately
@@ -85,21 +95,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of FlowInstance
+ * @return FlowPage Page of FlowInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): FlowPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new FlowPage($this->version, $response, $this->solution);
}
@@ -109,9 +120,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of FlowInstance
+ * @return FlowPage Page of FlowInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): FlowPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -121,15 +132,21 @@ public function getPage($targetUrl)
return new FlowPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a FlowContext
*
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Studio\V1\FlowContext
+ * @param string $sid The SID of the Flow resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): FlowContext
{
- return new FlowContext($this->version, $sid);
+ return new FlowContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -137,8 +154,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Studio.V1.FlowList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/FlowPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/FlowPage.php
index 90d2b5b..d9213f9 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/FlowPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V1/FlowPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return FlowInstance \Twilio\Rest\Studio\V1\FlowInstance
+ */
+ public function buildInstance(array $payload): FlowInstance
{
return new FlowInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Studio.V1.FlowPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2.php
index e9daf32..e24fa86 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2.php
@@ -1,35 +1,41 @@
version = 'v2';
}
- /**
- * @return \Twilio\Rest\Studio\V2\FlowList
- */
- protected function getFlows()
+ protected function getFlows(): FlowList
{
if (!$this->_flows) {
$this->_flows = new FlowList($this);
@@ -48,15 +51,12 @@ protected function getFlows()
return $this->_flows;
}
- /**
- * @return \Twilio\Rest\Studio\V2\FlowValidateList
- */
- protected function getFlowValid()
+ protected function getFlowValidate(): FlowValidateList
{
- if (!$this->_flowValid) {
- $this->_flowValid = new FlowValidateList($this);
+ if (!$this->_flowValidate) {
+ $this->_flowValidate = new FlowValidateList($this);
}
- return $this->_flowValid;
+ return $this->_flowValidate;
}
/**
@@ -66,7 +66,7 @@ protected function getFlowValid()
* @return \Twilio\ListResource The requested resource
* @throws TwilioException For unknown resource
*/
- public function __get($name)
+ public function __get(string $name)
{
$method = 'get' . \ucfirst($name);
if (\method_exists($this, $method)) {
@@ -81,10 +81,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -99,8 +99,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Studio.V2]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/Flow/FlowRevisionContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/Flow/FlowRevisionContext.php
index d09c438..0529a91 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/Flow/FlowRevisionContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/Flow/FlowRevisionContext.php
@@ -2,57 +2,67 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Studio
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Studio\V2\Flow;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
class FlowRevisionContext extends InstanceContext
-{
+ {
/**
* Initialize the FlowRevisionContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The SID that identifies the resource to fetch
- * @param string $revision Specific Revision number or can be `LatestPublished`
- * and `LatestRevision`
- * @return \Twilio\Rest\Studio\V2\Flow\FlowRevisionContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid The SID of the Flow resource to fetch.
+ * @param string $revision Specific Revision number or can be `LatestPublished` and `LatestRevision`.
*/
- public function __construct(Version $version, $sid, $revision)
- {
+ public function __construct(
+ Version $version,
+ $sid,
+ $revision
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid, 'revision' => $revision,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ 'revision' =>
+ $revision,
+ ];
- $this->uri = '/Flows/' . \rawurlencode($sid) . '/Revisions/' . \rawurlencode($revision) . '';
+ $this->uri = '/Flows/' . \rawurlencode($sid)
+ .'/Revisions/' . \rawurlencode($revision)
+ .'';
}
/**
- * Fetch a FlowRevisionInstance
+ * Fetch the FlowRevisionInstance
*
* @return FlowRevisionInstance Fetched FlowRevisionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): FlowRevisionInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new FlowRevisionInstance(
$this->version,
@@ -62,17 +72,18 @@ public function fetch()
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Studio.V2.FlowRevisionContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/Flow/FlowRevisionInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/Flow/FlowRevisionInstance.php
index abc0520..baccbb9 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/Flow/FlowRevisionInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/Flow/FlowRevisionInstance.php
@@ -2,53 +2,58 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Studio
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Studio\V2\Flow;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property string $sid
- * @property string $accountSid
- * @property string $friendlyName
- * @property array $definition
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $friendlyName
+ * @property array|null $definition
* @property string $status
* @property int $revision
- * @property string $commitMessage
- * @property bool $valid
- * @property array $errors
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
+ * @property string|null $commitMessage
+ * @property bool|null $valid
+ * @property array[]|null $errors
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
*/
class FlowRevisionInstance extends InstanceResource
{
/**
* Initialize the FlowRevisionInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The unique string that identifies the resource
- * @param string $revision Specific Revision number or can be `LatestPublished`
- * and `LatestRevision`
- * @return \Twilio\Rest\Studio\V2\Flow\FlowRevisionInstance
+ * @param string $sid The SID of the Flow resource to fetch.
+ * @param string $revision Specific Revision number or can be `LatestPublished` and `LatestRevision`.
*/
- public function __construct(Version $version, array $payload, $sid, $revision = null)
+ public function __construct(Version $version, array $payload, string $sid, string $revision = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
@@ -61,19 +66,18 @@ public function __construct(Version $version, array $payload, $sid, $revision =
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('sid' => $sid, 'revision' => $revision ?: $this->properties['revision'],);
+ $this->solution = ['sid' => $sid, 'revision' => $revision ?: $this->properties['revision'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Studio\V2\Flow\FlowRevisionContext Context for this
- * FlowRevisionInstance
+ * @return FlowRevisionContext Context for this FlowRevisionInstance
*/
- protected function proxy()
+ protected function proxy(): FlowRevisionContext
{
if (!$this->context) {
$this->context = new FlowRevisionContext(
@@ -87,13 +91,14 @@ protected function proxy()
}
/**
- * Fetch a FlowRevisionInstance
+ * Fetch the FlowRevisionInstance
*
* @return FlowRevisionInstance Fetched FlowRevisionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): FlowRevisionInstance
{
+
return $this->proxy()->fetch();
}
@@ -104,7 +109,7 @@ public function fetch()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -123,12 +128,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Studio.V2.FlowRevisionInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/Flow/FlowRevisionList.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/Flow/FlowRevisionList.php
index 2307a60..83e7aef 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/Flow/FlowRevisionList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/Flow/FlowRevisionList.php
@@ -2,37 +2,69 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Studio
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Studio\V2\Flow;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
+
class FlowRevisionList extends ListResource
-{
+ {
/**
* Construct the FlowRevisionList
*
* @param Version $version Version that contains the resource
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Studio\V2\Flow\FlowRevisionList
+ * @param string $sid The SID of the Flow resource to fetch.
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ string $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+
+ ];
+
+ $this->uri = '/Flows/' . \rawurlencode($sid)
+ .'/Revisions';
+ }
- $this->uri = '/Flows/' . \rawurlencode($sid) . '/Revisions';
+ /**
+ * Reads FlowRevisionInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return FlowRevisionInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -51,9 +83,9 @@ public function __construct(Version $version, $sid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -62,26 +94,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads FlowRevisionInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return FlowRevisionInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of FlowRevisionInstance records from the API.
* Request is executed immediately
@@ -89,21 +101,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of FlowRevisionInstance
+ * @return FlowRevisionPage Page of FlowRevisionInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): FlowRevisionPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new FlowRevisionPage($this->version, $response, $this->solution);
}
@@ -113,9 +126,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of FlowRevisionInstance
+ * @return FlowRevisionPage Page of FlowRevisionInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): FlowRevisionPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -125,16 +138,22 @@ public function getPage($targetUrl)
return new FlowRevisionPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a FlowRevisionContext
*
- * @param string $revision Specific Revision number or can be `LatestPublished`
- * and `LatestRevision`
- * @return \Twilio\Rest\Studio\V2\Flow\FlowRevisionContext
+ * @param string $revision Specific Revision number or can be `LatestPublished` and `LatestRevision`.
*/
- public function getContext($revision)
+ public function getContext(
+ string $revision
+
+ ): FlowRevisionContext
{
- return new FlowRevisionContext($this->version, $this->solution['sid'], $revision);
+ return new FlowRevisionContext(
+ $this->version,
+ $this->solution['sid'],
+ $revision
+ );
}
/**
@@ -142,8 +161,8 @@ public function getContext($revision)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Studio.V2.FlowRevisionList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/Flow/FlowRevisionPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/Flow/FlowRevisionPage.php
index 9519521..e424df9 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/Flow/FlowRevisionPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/Flow/FlowRevisionPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return FlowRevisionInstance \Twilio\Rest\Studio\V2\Flow\FlowRevisionInstance
+ */
+ public function buildInstance(array $payload): FlowRevisionInstance
{
return new FlowRevisionInstance($this->version, $payload, $this->solution['sid']);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Studio.V2.FlowRevisionPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/FlowContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/FlowContext.php
index 81bdfe7..1c7dad8 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/FlowContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/FlowContext.php
@@ -2,129 +2,191 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Studio
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Studio\V2;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Studio\V2\Flow\FlowRevisionList;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+use Twilio\Rest\Studio\V2\Flow\ExecutionList;
+use Twilio\Rest\Studio\V2\Flow\FlowRevisionList;
+use Twilio\Rest\Studio\V2\Flow\FlowTestUserList;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property \Twilio\Rest\Studio\V2\Flow\FlowRevisionList $revisions
+ * @property ExecutionList $executions
+ * @property FlowRevisionList $revisions
+ * @property FlowTestUserList $testUsers
+ * @method \Twilio\Rest\Studio\V2\Flow\ExecutionContext executions(string $sid)
+ * @method \Twilio\Rest\Studio\V2\Flow\FlowTestUserContext testUsers()
* @method \Twilio\Rest\Studio\V2\Flow\FlowRevisionContext revisions(string $revision)
*/
class FlowContext extends InstanceContext
-{
- protected $_revisions = null;
+ {
+ protected $_executions;
+ protected $_revisions;
+ protected $_testUsers;
/**
* Initialize the FlowContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Studio\V2\FlowContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid The SID of the Flow resource to delete.
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Flows/' . \rawurlencode($sid) . '';
+ $this->uri = '/Flows/' . \rawurlencode($sid)
+ .'';
}
/**
- * Update the FlowInstance
+ * Delete the FlowInstance
*
- * @param string $status The status of the Flow
- * @param array|Options $options Optional Arguments
- * @return FlowInstance Updated FlowInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($status, $options = array())
+ public function delete(): bool
{
- $options = new Values($options);
- $data = Values::of(array(
- 'Status' => $status,
- 'FriendlyName' => $options['friendlyName'],
- 'Definition' => Serialize::jsonObject($options['definition']),
- 'CommitMessage' => $options['commitMessage'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new FlowInstance($this->version, $payload, $this->solution['sid']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a FlowInstance
+ * Fetch the FlowInstance
*
* @return FlowInstance Fetched FlowInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): FlowInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
- return new FlowInstance($this->version, $payload, $this->solution['sid']);
+ return new FlowInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
- * Deletes the FlowInstance
+ * Update the FlowInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param string $status
+ * @param array|Options $options Optional Arguments
+ * @return FlowInstance Updated FlowInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(string $status, array $options = []): FlowInstance
{
- return $this->version->delete('delete', $this->uri);
+
+ $options = new Values($options);
+
+ $data = Values::of([
+ 'Status' =>
+ $status,
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'Definition' =>
+ Serialize::jsonObject($options['definition']),
+ 'CommitMessage' =>
+ $options['commitMessage'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
+
+ return new FlowInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
+ }
+
+
+ /**
+ * Access the executions
+ */
+ protected function getExecutions(): ExecutionList
+ {
+ if (!$this->_executions) {
+ $this->_executions = new ExecutionList(
+ $this->version,
+ $this->solution['sid']
+ );
+ }
+
+ return $this->_executions;
}
/**
* Access the revisions
- *
- * @return \Twilio\Rest\Studio\V2\Flow\FlowRevisionList
*/
- protected function getRevisions()
+ protected function getRevisions(): FlowRevisionList
{
if (!$this->_revisions) {
- $this->_revisions = new FlowRevisionList($this->version, $this->solution['sid']);
+ $this->_revisions = new FlowRevisionList(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->_revisions;
}
+ /**
+ * Access the testUsers
+ */
+ protected function getTestUsers(): FlowTestUserList
+ {
+ if (!$this->_testUsers) {
+ $this->_testUsers = new FlowTestUserList(
+ $this->version,
+ $this->solution['sid']
+ );
+ }
+
+ return $this->_testUsers;
+ }
+
/**
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -139,10 +201,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -157,12 +219,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Studio.V2.FlowContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/FlowInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/FlowInstance.php
index 62e78fc..4a13eef 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/FlowInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/FlowInstance.php
@@ -2,55 +2,68 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Studio
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Studio\V2;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Studio\V2\Flow\ExecutionList;
+use Twilio\Rest\Studio\V2\Flow\FlowRevisionList;
+use Twilio\Rest\Studio\V2\Flow\FlowTestUserList;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property string $sid
- * @property string $accountSid
- * @property string $friendlyName
- * @property array $definition
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $friendlyName
+ * @property array|null $definition
* @property string $status
* @property int $revision
- * @property string $commitMessage
- * @property bool $valid
- * @property array $errors
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
- * @property array $links
+ * @property string|null $commitMessage
+ * @property bool|null $valid
+ * @property array[]|null $errors
+ * @property array[]|null $warnings
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $webhookUrl
+ * @property string|null $url
+ * @property array|null $links
*/
class FlowInstance extends InstanceResource
{
- protected $_revisions = null;
+ protected $_executions;
+ protected $_revisions;
+ protected $_testUsers;
/**
* Initialize the FlowInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Studio\V2\FlowInstance
+ * @param string $sid The SID of the Flow resource to delete.
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
@@ -60,75 +73,97 @@ public function __construct(Version $version, array $payload, $sid = null)
'commitMessage' => Values::array_get($payload, 'commit_message'),
'valid' => Values::array_get($payload, 'valid'),
'errors' => Values::array_get($payload, 'errors'),
+ 'warnings' => Values::array_get($payload, 'warnings'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
+ 'webhookUrl' => Values::array_get($payload, 'webhook_url'),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Studio\V2\FlowContext Context for this FlowInstance
+ * @return FlowContext Context for this FlowInstance
*/
- protected function proxy()
+ protected function proxy(): FlowContext
{
if (!$this->context) {
- $this->context = new FlowContext($this->version, $this->solution['sid']);
+ $this->context = new FlowContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Update the FlowInstance
+ * Delete the FlowInstance
*
- * @param string $status The status of the Flow
- * @param array|Options $options Optional Arguments
- * @return FlowInstance Updated FlowInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($status, $options = array())
+ public function delete(): bool
{
- return $this->proxy()->update($status, $options);
+
+ return $this->proxy()->delete();
}
/**
- * Fetch a FlowInstance
+ * Fetch the FlowInstance
*
* @return FlowInstance Fetched FlowInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): FlowInstance
{
+
return $this->proxy()->fetch();
}
/**
- * Deletes the FlowInstance
+ * Update the FlowInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param string $status
+ * @param array|Options $options Optional Arguments
+ * @return FlowInstance Updated FlowInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(string $status, array $options = []): FlowInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->update($status, $options);
+ }
+
+ /**
+ * Access the executions
+ */
+ protected function getExecutions(): ExecutionList
+ {
+ return $this->proxy()->executions;
}
/**
* Access the revisions
- *
- * @return \Twilio\Rest\Studio\V2\Flow\FlowRevisionList
*/
- protected function getRevisions()
+ protected function getRevisions(): FlowRevisionList
{
return $this->proxy()->revisions;
}
+ /**
+ * Access the testUsers
+ */
+ protected function getTestUsers(): FlowTestUserList
+ {
+ return $this->proxy()->testUsers;
+ }
+
/**
* Magic getter to access properties
*
@@ -136,7 +171,7 @@ protected function getRevisions()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -155,12 +190,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Studio.V2.FlowInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/FlowList.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/FlowList.php
index c2e7698..10cea53 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/FlowList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/FlowList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Studio
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Studio\V2;
@@ -12,60 +19,85 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
class FlowList extends ListResource
-{
+ {
/**
* Construct the FlowList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Studio\V2\FlowList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/Flows';
}
/**
- * Create a new FlowInstance
+ * Create the FlowInstance
*
- * @param string $friendlyName The string that you assigned to describe the Flow
- * @param string $status The status of the Flow
- * @param array $definition JSON representation of flow definition
+ * @param string $friendlyName The string that you assigned to describe the Flow.
+ * @param string $status
+ * @param array $definition JSON representation of flow definition.
* @param array|Options $options Optional Arguments
- * @return FlowInstance Newly created FlowInstance
+ * @return FlowInstance Created FlowInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($friendlyName, $status, $definition, $options = array())
+ public function create(string $friendlyName, string $status, array $definition, array $options = []): FlowInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $friendlyName,
- 'Status' => $status,
- 'Definition' => Serialize::jsonObject($definition),
- 'CommitMessage' => $options['commitMessage'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'FriendlyName' =>
+ $friendlyName,
+ 'Status' =>
+ $status,
+ 'Definition' =>
+ Serialize::jsonObject($definition),
+ 'CommitMessage' =>
+ $options['commitMessage'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new FlowInstance(
+ $this->version,
+ $payload
);
+ }
+
- return new FlowInstance($this->version, $payload);
+ /**
+ * Reads FlowInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return FlowInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -84,9 +116,9 @@ public function create($friendlyName, $status, $definition, $options = array())
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -95,26 +127,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads FlowInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return FlowInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of FlowInstance records from the API.
* Request is executed immediately
@@ -122,21 +134,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of FlowInstance
+ * @return FlowPage Page of FlowInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): FlowPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new FlowPage($this->version, $response, $this->solution);
}
@@ -146,9 +159,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of FlowInstance
+ * @return FlowPage Page of FlowInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): FlowPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -158,15 +171,21 @@ public function getPage($targetUrl)
return new FlowPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a FlowContext
*
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Studio\V2\FlowContext
+ * @param string $sid The SID of the Flow resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): FlowContext
{
- return new FlowContext($this->version, $sid);
+ return new FlowContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -174,8 +193,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Studio.V2.FlowList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/FlowOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/FlowOptions.php
index 9b2d88d..1068188 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/FlowOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/FlowOptions.php
@@ -1,10 +1,16 @@
options['commitMessage'] = $commitMessage;
}
/**
- * Description on change made in the revision.
+ * Description of change made in the revision.
*
- * @param string $commitMessage Description on change made in the revision
+ * @param string $commitMessage Description of change made in the revision.
* @return $this Fluent Builder
*/
- public function setCommitMessage($commitMessage)
+ public function setCommitMessage(string $commitMessage): self
{
$this->options['commitMessage'] = $commitMessage;
return $this;
@@ -65,27 +91,30 @@ public function setCommitMessage($commitMessage)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Studio.V2.CreateFlowOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Studio.V2.CreateFlowOptions ' . $options . ']';
}
}
+
+
+
class UpdateFlowOptions extends Options
-{
+ {
/**
- * @param string $friendlyName The string that you assigned to describe the Flow
- * @param array $definition JSON representation of flow definition
- * @param string $commitMessage Description on change made in the revision
+ * @param string $friendlyName The string that you assigned to describe the Flow.
+ * @param array $definition JSON representation of flow definition.
+ * @param string $commitMessage Description of change made in the revision.
*/
- public function __construct($friendlyName = Values::NONE, $definition = Values::NONE, $commitMessage = Values::NONE)
- {
+ public function __construct(
+
+ string $friendlyName = Values::NONE,
+ array $definition = Values::ARRAY_NONE,
+ string $commitMessage = Values::NONE
+
+ ) {
$this->options['friendlyName'] = $friendlyName;
$this->options['definition'] = $definition;
$this->options['commitMessage'] = $commitMessage;
@@ -94,10 +123,10 @@ public function __construct($friendlyName = Values::NONE, $definition = Values::
/**
* The string that you assigned to describe the Flow.
*
- * @param string $friendlyName The string that you assigned to describe the Flow
+ * @param string $friendlyName The string that you assigned to describe the Flow.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -106,22 +135,22 @@ public function setFriendlyName($friendlyName)
/**
* JSON representation of flow definition.
*
- * @param array $definition JSON representation of flow definition
+ * @param array $definition JSON representation of flow definition.
* @return $this Fluent Builder
*/
- public function setDefinition($definition)
+ public function setDefinition(array $definition): self
{
$this->options['definition'] = $definition;
return $this;
}
/**
- * Description on change made in the revision.
+ * Description of change made in the revision.
*
- * @param string $commitMessage Description on change made in the revision
+ * @param string $commitMessage Description of change made in the revision.
* @return $this Fluent Builder
*/
- public function setCommitMessage($commitMessage)
+ public function setCommitMessage(string $commitMessage): self
{
$this->options['commitMessage'] = $commitMessage;
return $this;
@@ -132,14 +161,10 @@ public function setCommitMessage($commitMessage)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Studio.V2.UpdateFlowOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Studio.V2.UpdateFlowOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/FlowPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/FlowPage.php
index 0e3e4bd..a835e84 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/FlowPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/FlowPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return FlowInstance \Twilio\Rest\Studio\V2\FlowInstance
+ */
+ public function buildInstance(array $payload): FlowInstance
{
return new FlowInstance($this->version, $payload);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Studio.V2.FlowPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/FlowValidateInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/FlowValidateInstance.php
index 19a9d61..d09e5f9 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/FlowValidateInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/FlowValidateInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Studio
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Studio\V2;
use Twilio\Exceptions\TwilioException;
@@ -14,28 +22,28 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property bool $valid
+ * @property bool|null $valid
*/
class FlowValidateInstance extends InstanceResource
{
/**
* Initialize the FlowValidateInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @return \Twilio\Rest\Studio\V2\FlowValidateInstance
*/
public function __construct(Version $version, array $payload)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array('valid' => Values::array_get($payload, 'valid'),);
+ $this->properties = [
+ 'valid' => Values::array_get($payload, 'valid'),
+ ];
- $this->solution = array();
+ $this->solution = [];
}
/**
@@ -45,7 +53,7 @@ public function __construct(Version $version, array $payload)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -64,8 +72,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Studio.V2.FlowValidateInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/FlowValidateList.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/FlowValidateList.php
index de74d89..ef4fc66 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/FlowValidateList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/FlowValidateList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Studio
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Studio\V2;
@@ -12,27 +19,26 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
class FlowValidateList extends ListResource
-{
+ {
/**
* Construct the FlowValidateList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Studio\V2\FlowValidateList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/Flows/Validate';
}
@@ -40,41 +46,46 @@ public function __construct(Version $version)
/**
* Update the FlowValidateInstance
*
- * @param string $friendlyName The friendly_name
- * @param string $status The status
- * @param array $definition The definition
+ * @param string $friendlyName The string that you assigned to describe the Flow.
+ * @param string $status
+ * @param array $definition JSON representation of flow definition.
* @param array|Options $options Optional Arguments
* @return FlowValidateInstance Updated FlowValidateInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($friendlyName, $status, $definition, $options = array())
+ public function update(string $friendlyName, string $status, array $definition, array $options = []): FlowValidateInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $friendlyName,
- 'Status' => $status,
- 'Definition' => Serialize::jsonObject($definition),
- 'CommitMessage' => $options['commitMessage'],
- ));
+ $data = Values::of([
+ 'FriendlyName' =>
+ $friendlyName,
+ 'Status' =>
+ $status,
+ 'Definition' =>
+ Serialize::jsonObject($definition),
+ 'CommitMessage' =>
+ $options['commitMessage'],
+ ]);
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
- return new FlowValidateInstance($this->version, $payload);
+ return new FlowValidateInstance(
+ $this->version,
+ $payload
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Studio.V2.FlowValidateList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/FlowValidateOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/FlowValidateOptions.php
index 0b608e3..a167058 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/FlowValidateOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/FlowValidateOptions.php
@@ -1,10 +1,16 @@
options['commitMessage'] = $commitMessage;
}
/**
- * The commit_message
+ * Description of change made in the revision.
*
- * @param string $commitMessage The commit_message
+ * @param string $commitMessage Description of change made in the revision.
* @return $this Fluent Builder
*/
- public function setCommitMessage($commitMessage)
+ public function setCommitMessage(string $commitMessage): self
{
$this->options['commitMessage'] = $commitMessage;
return $this;
@@ -54,14 +67,10 @@ public function setCommitMessage($commitMessage)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Studio.V2.UpdateFlowValidateOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Studio.V2.UpdateFlowValidateOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/FlowValidatePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/FlowValidatePage.php
index 6ac3f9f..e8da3ff 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/FlowValidatePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Studio/V2/FlowValidatePage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return FlowValidateInstance \Twilio\Rest\Studio\V2\FlowValidateInstance
+ */
+ public function buildInstance(array $payload): FlowValidateInstance
{
return new FlowValidateInstance($this->version, $payload);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Studio.V2.FlowValidatePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync.php
index 960f459..9b72e0a 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync.php
@@ -1,111 +1,23 @@
baseUrl = 'https://sync.twilio.com';
- }
-
- /**
- * @return \Twilio\Rest\Sync\V1 Version v1 of sync
- */
- protected function getV1()
- {
- if (!$this->_v1) {
- $this->_v1 = new V1($this);
- }
- return $this->_v1;
- }
-
- /**
- * Magic getter to lazy load version
- *
- * @param string $name Version to return
- * @return \Twilio\Version The requested version
- * @throws TwilioException For unknown versions
- */
- public function __get($name)
- {
- $method = 'get' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return $this->$method();
- }
-
- throw new TwilioException('Unknown version ' . $name);
- }
-
+class Sync extends SyncBase {
/**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
+ * @deprecated Use v1->services instead.
*/
- public function __call($name, $arguments)
- {
- $method = 'context' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return \call_user_func_array(array($this, $method), $arguments);
- }
-
- throw new TwilioException('Unknown context ' . $name);
- }
-
- /**
- * @return \Twilio\Rest\Sync\V1\ServiceList
- */
- protected function getServices()
- {
+ protected function getServices(): \Twilio\Rest\Sync\V1\ServiceList {
+ echo "services is deprecated. Use v1->services instead.";
return $this->v1->services;
}
/**
+ * @deprecated Use v1->services(\$sid) instead.
* @param string $sid The SID of the Service resource to fetch
- * @return \Twilio\Rest\Sync\V1\ServiceContext
*/
- protected function contextServices($sid)
- {
+ protected function contextServices(string $sid): \Twilio\Rest\Sync\V1\ServiceContext {
+ echo "services(\$sid) is deprecated. Use v1->services(\$sid) instead.";
return $this->v1->services($sid);
}
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Sync]';
- }
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1.php
index 69c28c4..b7eb372 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1.php
@@ -1,32 +1,38 @@
version = 'v1';
}
- /**
- * @return \Twilio\Rest\Sync\V1\ServiceList
- */
- protected function getServices()
+ protected function getServices(): ServiceList
{
if (!$this->_services) {
$this->_services = new ServiceList($this);
@@ -52,7 +55,7 @@ protected function getServices()
* @return \Twilio\ListResource The requested resource
* @throws TwilioException For unknown resource
*/
- public function __get($name)
+ public function __get(string $name)
{
$method = 'get' . \ucfirst($name);
if (\method_exists($this, $method)) {
@@ -67,10 +70,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -85,8 +88,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Sync.V1]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionContext.php
index c537e87..c9d2bf6 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionContext.php
@@ -2,66 +2,87 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Sync
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Sync\V1\Service\Document;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
class DocumentPermissionContext extends InstanceContext
-{
+ {
/**
* Initialize the DocumentPermissionContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Sync Service with the Document
- * Permission resource to fetch
- * @param string $documentSid The SID of the Sync Document with the Document
- * Permission resource to fetch
- * @param string $identity The application-defined string that uniquely
- * identifies the User's Document Permission resource
- * to fetch
- * @return \Twilio\Rest\Sync\V1\Service\Document\DocumentPermissionContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Document Permission resource to delete.
+ * @param string $documentSid The SID of the Sync Document with the Document Permission resource to delete. Can be the Document resource's `sid` or its `unique_name`.
+ * @param string $identity The application-defined string that uniquely identifies the User's Document Permission resource to delete.
*/
- public function __construct(Version $version, $serviceSid, $documentSid, $identity)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $documentSid,
+ $identity
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'documentSid' => $documentSid,
- 'identity' => $identity,
- );
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'documentSid' =>
+ $documentSid,
+ 'identity' =>
+ $identity,
+ ];
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Documents/' . \rawurlencode($documentSid) . '/Permissions/' . \rawurlencode($identity) . '';
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Documents/' . \rawurlencode($documentSid)
+ .'/Permissions/' . \rawurlencode($identity)
+ .'';
}
/**
- * Fetch a DocumentPermissionInstance
+ * Delete the DocumentPermissionInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
+ }
+
+
+ /**
+ * Fetch the DocumentPermissionInstance
*
* @return DocumentPermissionInstance Fetched DocumentPermissionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): DocumentPermissionInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new DocumentPermissionInstance(
$this->version,
@@ -72,40 +93,30 @@ public function fetch()
);
}
- /**
- * Deletes the DocumentPermissionInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Update the DocumentPermissionInstance
*
- * @param bool $read Read access
- * @param bool $write Write access
- * @param bool $manage Manage access
+ * @param bool $read Whether the identity can read the Sync Document. Default value is `false`.
+ * @param bool $write Whether the identity can update the Sync Document. Default value is `false`.
+ * @param bool $manage Whether the identity can delete the Sync Document. Default value is `false`.
* @return DocumentPermissionInstance Updated DocumentPermissionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($read, $write, $manage)
+ public function update(bool $read, bool $write, bool $manage): DocumentPermissionInstance
{
- $data = Values::of(array(
- 'Read' => Serialize::booleanToString($read),
- 'Write' => Serialize::booleanToString($write),
- 'Manage' => Serialize::booleanToString($manage),
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+
+ $data = Values::of([
+ 'Read' =>
+ Serialize::booleanToString($read),
+ 'Write' =>
+ Serialize::booleanToString($write),
+ 'Manage' =>
+ Serialize::booleanToString($manage),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new DocumentPermissionInstance(
$this->version,
@@ -116,17 +127,18 @@ public function update($read, $write, $manage)
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Sync.V1.DocumentPermissionContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionInstance.php
index d2517f8..4954032 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Sync
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Sync\V1\Service\Document;
use Twilio\Exceptions\TwilioException;
@@ -14,39 +22,34 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $documentSid
- * @property string $identity
- * @property bool $read
- * @property bool $write
- * @property bool $manage
- * @property string $url
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $documentSid
+ * @property string|null $identity
+ * @property bool|null $read
+ * @property bool|null $write
+ * @property bool|null $manage
+ * @property string|null $url
*/
class DocumentPermissionInstance extends InstanceResource
{
/**
* Initialize the DocumentPermissionInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Sync Service that the resource is
- * associated with
- * @param string $documentSid The Sync Document SID
- * @param string $identity The application-defined string that uniquely
- * identifies the User's Document Permission resource
- * to fetch
- * @return \Twilio\Rest\Sync\V1\Service\Document\DocumentPermissionInstance
+ * @param string $serviceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Document Permission resource to delete.
+ * @param string $documentSid The SID of the Sync Document with the Document Permission resource to delete. Can be the Document resource's `sid` or its `unique_name`.
+ * @param string $identity The application-defined string that uniquely identifies the User's Document Permission resource to delete.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $documentSid, $identity = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $documentSid, string $identity = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
'documentSid' => Values::array_get($payload, 'document_sid'),
@@ -55,22 +58,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $docu
'write' => Values::array_get($payload, 'write'),
'manage' => Values::array_get($payload, 'manage'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'documentSid' => $documentSid,
- 'identity' => $identity ?: $this->properties['identity'],
- );
+ $this->solution = ['serviceSid' => $serviceSid, 'documentSid' => $documentSid, 'identity' => $identity ?: $this->properties['identity'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Sync\V1\Service\Document\DocumentPermissionContext Context for this DocumentPermissionInstance
+ * @return DocumentPermissionContext Context for this DocumentPermissionInstance
*/
- protected function proxy()
+ protected function proxy(): DocumentPermissionContext
{
if (!$this->context) {
$this->context = new DocumentPermissionContext(
@@ -85,38 +84,41 @@ protected function proxy()
}
/**
- * Fetch a DocumentPermissionInstance
+ * Delete the DocumentPermissionInstance
*
- * @return DocumentPermissionInstance Fetched DocumentPermissionInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the DocumentPermissionInstance
+ * Fetch the DocumentPermissionInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return DocumentPermissionInstance Fetched DocumentPermissionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): DocumentPermissionInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
* Update the DocumentPermissionInstance
*
- * @param bool $read Read access
- * @param bool $write Write access
- * @param bool $manage Manage access
+ * @param bool $read Whether the identity can read the Sync Document. Default value is `false`.
+ * @param bool $write Whether the identity can update the Sync Document. Default value is `false`.
+ * @param bool $manage Whether the identity can delete the Sync Document. Default value is `false`.
* @return DocumentPermissionInstance Updated DocumentPermissionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($read, $write, $manage)
+ public function update(bool $read, bool $write, bool $manage): DocumentPermissionInstance
{
+
return $this->proxy()->update($read, $write, $manage);
}
@@ -127,7 +129,7 @@ public function update($read, $write, $manage)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -146,12 +148,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Sync.V1.DocumentPermissionInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionList.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionList.php
index 7ae72fe..47800c9 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionList.php
@@ -2,44 +2,79 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Sync
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Sync\V1\Service\Document;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
+
class DocumentPermissionList extends ListResource
-{
+ {
/**
* Construct the DocumentPermissionList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Sync Service that the resource is
- * associated with
- * @param string $documentSid The Sync Document SID
- * @return \Twilio\Rest\Sync\V1\Service\Document\DocumentPermissionList
+ * @param string $serviceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Document Permission resource to delete.
+ * @param string $documentSid The SID of the Sync Document with the Document Permission resource to delete. Can be the Document resource's `sid` or its `unique_name`.
*/
- public function __construct(Version $version, $serviceSid, $documentSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid,
+ string $documentSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'documentSid' => $documentSid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ 'documentSid' =>
+ $documentSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Documents/' . \rawurlencode($documentSid)
+ .'/Permissions';
+ }
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Documents/' . \rawurlencode($documentSid) . '/Permissions';
+ /**
+ * Reads DocumentPermissionInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return DocumentPermissionInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
- * Streams DocumentPermissionInstance records from the API as a generator
- * stream.
+ * Streams DocumentPermissionInstance records from the API as a generator stream.
* This operation lazily loads records as efficiently as possible until the
* limit
* is reached.
@@ -54,9 +89,9 @@ public function __construct(Version $version, $serviceSid, $documentSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -65,26 +100,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads DocumentPermissionInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return DocumentPermissionInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of DocumentPermissionInstance records from the API.
* Request is executed immediately
@@ -92,21 +107,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of DocumentPermissionInstance
+ * @return DocumentPermissionPage Page of DocumentPermissionInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): DocumentPermissionPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new DocumentPermissionPage($this->version, $response, $this->solution);
}
@@ -116,9 +132,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of DocumentPermissionInstance
+ * @return DocumentPermissionPage Page of DocumentPermissionInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): DocumentPermissionPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -128,15 +144,16 @@ public function getPage($targetUrl)
return new DocumentPermissionPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a DocumentPermissionContext
*
- * @param string $identity The application-defined string that uniquely
- * identifies the User's Document Permission resource
- * to fetch
- * @return \Twilio\Rest\Sync\V1\Service\Document\DocumentPermissionContext
+ * @param string $identity The application-defined string that uniquely identifies the User's Document Permission resource to delete.
*/
- public function getContext($identity)
+ public function getContext(
+ string $identity
+
+ ): DocumentPermissionContext
{
return new DocumentPermissionContext(
$this->version,
@@ -151,8 +168,8 @@ public function getContext($identity)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Sync.V1.DocumentPermissionList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionPage.php
index 0fe3529..bc06d0e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return DocumentPermissionInstance \Twilio\Rest\Sync\V1\Service\Document\DocumentPermissionInstance
+ */
+ public function buildInstance(array $payload): DocumentPermissionInstance
{
- return new DocumentPermissionInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['documentSid']
- );
+ return new DocumentPermissionInstance($this->version, $payload, $this->solution['serviceSid'], $this->solution['documentSid']);
}
/**
@@ -39,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Sync.V1.DocumentPermissionPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/DocumentContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/DocumentContext.php
index c7f814f..dce0f53 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/DocumentContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/DocumentContext.php
@@ -2,65 +2,91 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Sync
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Sync\V1\Service;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Sync\V1\Service\Document\DocumentPermissionList;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+use Twilio\Rest\Sync\V1\Service\Document\DocumentPermissionList;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property \Twilio\Rest\Sync\V1\Service\Document\DocumentPermissionList $documentPermissions
+ * @property DocumentPermissionList $documentPermissions
* @method \Twilio\Rest\Sync\V1\Service\Document\DocumentPermissionContext documentPermissions(string $identity)
*/
class DocumentContext extends InstanceContext
-{
- protected $_documentPermissions = null;
+ {
+ protected $_documentPermissions;
/**
* Initialize the DocumentContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Sync Service with the Document
- * resource to fetch
- * @param string $sid The SID of the Document resource to fetch
- * @return \Twilio\Rest\Sync\V1\Service\DocumentContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) to create the new Document resource in.
+ * @param string $sid The SID of the Document resource to delete. Can be the Document resource's `sid` or its `unique_name`.
*/
- public function __construct(Version $version, $serviceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Documents/' . \rawurlencode($sid)
+ .'';
+ }
+
+ /**
+ * Delete the DocumentInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Documents/' . \rawurlencode($sid) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a DocumentInstance
+ * Fetch the DocumentInstance
*
* @return DocumentInstance Fetched DocumentInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): DocumentInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new DocumentInstance(
$this->version,
@@ -70,16 +96,6 @@ public function fetch()
);
}
- /**
- * Deletes the DocumentInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Update the DocumentInstance
@@ -88,21 +104,20 @@ public function delete()
* @return DocumentInstance Updated DocumentInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): DocumentInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'Data' => Serialize::jsonObject($options['data']),
- 'Ttl' => $options['ttl'],
- ));
+ $data = Values::of([
+ 'Data' =>
+ Serialize::jsonObject($options['data']),
+ 'Ttl' =>
+ $options['ttl'],
+ ]);
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'If-Match' => $options['ifMatch']]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new DocumentInstance(
$this->version,
@@ -112,12 +127,11 @@ public function update($options = array())
);
}
+
/**
* Access the documentPermissions
- *
- * @return \Twilio\Rest\Sync\V1\Service\Document\DocumentPermissionList
*/
- protected function getDocumentPermissions()
+ protected function getDocumentPermissions(): DocumentPermissionList
{
if (!$this->_documentPermissions) {
$this->_documentPermissions = new DocumentPermissionList(
@@ -134,10 +148,10 @@ protected function getDocumentPermissions()
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -152,10 +166,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -170,12 +184,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Sync.V1.DocumentContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/DocumentInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/DocumentInstance.php
index 3ed1eeb..2a18c07 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/DocumentInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/DocumentInstance.php
@@ -2,56 +2,62 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Sync
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Sync\V1\Service;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Sync\V1\Service\Document\DocumentPermissionList;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property string $sid
- * @property string $uniqueName
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $url
- * @property array $links
- * @property string $revision
- * @property array $data
- * @property \DateTime $dateExpires
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $createdBy
+ * @property string|null $sid
+ * @property string|null $uniqueName
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $url
+ * @property array|null $links
+ * @property string|null $revision
+ * @property array|null $data
+ * @property \DateTime|null $dateExpires
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $createdBy
*/
class DocumentInstance extends InstanceResource
{
- protected $_documentPermissions = null;
+ protected $_documentPermissions;
/**
* Initialize the DocumentInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Sync Service that the resource is
- * associated with
- * @param string $sid The SID of the Document resource to fetch
- * @return \Twilio\Rest\Sync\V1\Service\DocumentInstance
+ * @param string $serviceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) to create the new Document resource in.
+ * @param string $sid The SID of the Document resource to delete. Can be the Document resource's `sid` or its `unique_name`.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'uniqueName' => Values::array_get($payload, 'unique_name'),
'accountSid' => Values::array_get($payload, 'account_sid'),
@@ -64,19 +70,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $sid
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'createdBy' => Values::array_get($payload, 'created_by'),
- );
+ ];
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Sync\V1\Service\DocumentContext Context for this
- * DocumentInstance
+ * @return DocumentContext Context for this DocumentInstance
*/
- protected function proxy()
+ protected function proxy(): DocumentContext
{
if (!$this->context) {
$this->context = new DocumentContext(
@@ -90,25 +95,27 @@ protected function proxy()
}
/**
- * Fetch a DocumentInstance
+ * Delete the DocumentInstance
*
- * @return DocumentInstance Fetched DocumentInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the DocumentInstance
+ * Fetch the DocumentInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return DocumentInstance Fetched DocumentInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): DocumentInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -118,17 +125,16 @@ public function delete()
* @return DocumentInstance Updated DocumentInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): DocumentInstance
{
+
return $this->proxy()->update($options);
}
/**
* Access the documentPermissions
- *
- * @return \Twilio\Rest\Sync\V1\Service\Document\DocumentPermissionList
*/
- protected function getDocumentPermissions()
+ protected function getDocumentPermissions(): DocumentPermissionList
{
return $this->proxy()->documentPermissions;
}
@@ -140,7 +146,7 @@ protected function getDocumentPermissions()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -159,12 +165,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Sync.V1.DocumentInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/DocumentList.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/DocumentList.php
index 614f63a..6aad582 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/DocumentList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/DocumentList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Sync
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Sync\V1\Service;
@@ -12,58 +19,87 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
class DocumentList extends ListResource
-{
+ {
/**
* Construct the DocumentList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Sync Service that the resource is
- * associated with
- * @return \Twilio\Rest\Sync\V1\Service\DocumentList
+ * @param string $serviceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) to create the new Document resource in.
*/
- public function __construct(Version $version, $serviceSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Documents';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Documents';
}
/**
- * Create a new DocumentInstance
+ * Create the DocumentInstance
*
* @param array|Options $options Optional Arguments
- * @return DocumentInstance Newly created DocumentInstance
+ * @return DocumentInstance Created DocumentInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($options = array())
+ public function create(array $options = []): DocumentInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'UniqueName' => $options['uniqueName'],
- 'Data' => Serialize::jsonObject($options['data']),
- 'Ttl' => $options['ttl'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'UniqueName' =>
+ $options['uniqueName'],
+ 'Data' =>
+ Serialize::jsonObject($options['data']),
+ 'Ttl' =>
+ $options['ttl'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new DocumentInstance(
+ $this->version,
+ $payload,
+ $this->solution['serviceSid']
);
+ }
- return new DocumentInstance($this->version, $payload, $this->solution['serviceSid']);
+
+ /**
+ * Reads DocumentInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return DocumentInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -82,9 +118,9 @@ public function create($options = array())
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -93,26 +129,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads DocumentInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return DocumentInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of DocumentInstance records from the API.
* Request is executed immediately
@@ -120,21 +136,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of DocumentInstance
+ * @return DocumentPage Page of DocumentInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): DocumentPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new DocumentPage($this->version, $response, $this->solution);
}
@@ -144,9 +161,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of DocumentInstance
+ * @return DocumentPage Page of DocumentInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): DocumentPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -156,15 +173,22 @@ public function getPage($targetUrl)
return new DocumentPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a DocumentContext
*
- * @param string $sid The SID of the Document resource to fetch
- * @return \Twilio\Rest\Sync\V1\Service\DocumentContext
+ * @param string $sid The SID of the Document resource to delete. Can be the Document resource's `sid` or its `unique_name`.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): DocumentContext
{
- return new DocumentContext($this->version, $this->solution['serviceSid'], $sid);
+ return new DocumentContext(
+ $this->version,
+ $this->solution['serviceSid'],
+ $sid
+ );
}
/**
@@ -172,8 +196,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Sync.V1.DocumentList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/DocumentOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/DocumentOptions.php
index 694bb5e..917eeed 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/DocumentOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/DocumentOptions.php
@@ -1,10 +1,16 @@
options['uniqueName'] = $uniqueName;
$this->options['data'] = $data;
$this->options['ttl'] = $ttl;
@@ -64,37 +89,34 @@ public function __construct($uniqueName = Values::NONE, $data = Values::NONE, $t
/**
* An application-defined string that uniquely identifies the Sync Document
*
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the Sync Document
+ * @param string $uniqueName An application-defined string that uniquely identifies the Sync Document
* @return $this Fluent Builder
*/
- public function setUniqueName($uniqueName)
+ public function setUniqueName(string $uniqueName): self
{
$this->options['uniqueName'] = $uniqueName;
return $this;
}
/**
- * A JSON string that represents an arbitrary, schema-less object that the Sync Document stores. Can be up to 16KB in length.
+ * A JSON string that represents an arbitrary, schema-less object that the Sync Document stores. Can be up to 16 KiB in length.
*
- * @param array $data A JSON string that represents an arbitrary, schema-less
- * object that the Sync Document stores
+ * @param array $data A JSON string that represents an arbitrary, schema-less object that the Sync Document stores. Can be up to 16 KiB in length.
* @return $this Fluent Builder
*/
- public function setData($data)
+ public function setData(array $data): self
{
$this->options['data'] = $data;
return $this;
}
/**
- * How long, in seconds, before the Sync Document expires and is deleted (the Sync Document's time-to-live). Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Sync Document does not expire. The Sync Document will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion.
+ * How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Sync Document expires and is deleted (the Sync Document's time-to-live).
*
- * @param int $ttl How long, in seconds, before the Sync Document expires and
- * is deleted
+ * @param int $ttl How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Sync Document expires and is deleted (the Sync Document's time-to-live).
* @return $this Fluent Builder
*/
- public function setTtl($ttl)
+ public function setTtl(int $ttl): self
{
$this->options['ttl'] = $ttl;
return $this;
@@ -105,71 +127,80 @@ public function setTtl($ttl)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Sync.V1.CreateDocumentOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Sync.V1.CreateDocumentOptions ' . $options . ']';
}
}
+
+
+
class UpdateDocumentOptions extends Options
-{
+ {
/**
- * @param array $data A JSON string that represents an arbitrary, schema-less
- * object that the Sync Document stores
- * @param int $ttl How long, in seconds, before the Document resource expires
- * and is deleted
+ * @param array $data A JSON string that represents an arbitrary, schema-less object that the Sync Document stores. Can be up to 16 KiB in length.
+ * @param int $ttl How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Sync Document expires and is deleted (time-to-live).
+ * @param string $ifMatch The If-Match HTTP request header
*/
- public function __construct($data = Values::NONE, $ttl = Values::NONE)
- {
+ public function __construct(
+
+ array $data = Values::ARRAY_NONE,
+ int $ttl = Values::INT_NONE,
+ string $ifMatch = Values::NONE
+
+ ) {
$this->options['data'] = $data;
$this->options['ttl'] = $ttl;
+ $this->options['ifMatch'] = $ifMatch;
}
/**
- * A JSON string that represents an arbitrary, schema-less object that the Sync Document stores. Can be up to 16KB in length.
+ * A JSON string that represents an arbitrary, schema-less object that the Sync Document stores. Can be up to 16 KiB in length.
*
- * @param array $data A JSON string that represents an arbitrary, schema-less
- * object that the Sync Document stores
+ * @param array $data A JSON string that represents an arbitrary, schema-less object that the Sync Document stores. Can be up to 16 KiB in length.
* @return $this Fluent Builder
*/
- public function setData($data)
+ public function setData(array $data): self
{
$this->options['data'] = $data;
return $this;
}
/**
- * How long, in seconds, before the Sync Document expires and is deleted (time-to-live). Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Document resource does not expire. The Document resource will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion.
+ * How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Sync Document expires and is deleted (time-to-live).
*
- * @param int $ttl How long, in seconds, before the Document resource expires
- * and is deleted
+ * @param int $ttl How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Sync Document expires and is deleted (time-to-live).
* @return $this Fluent Builder
*/
- public function setTtl($ttl)
+ public function setTtl(int $ttl): self
{
$this->options['ttl'] = $ttl;
return $this;
}
+ /**
+ * The If-Match HTTP request header
+ *
+ * @param string $ifMatch The If-Match HTTP request header
+ * @return $this Fluent Builder
+ */
+ public function setIfMatch(string $ifMatch): self
+ {
+ $this->options['ifMatch'] = $ifMatch;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Sync.V1.UpdateDocumentOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Sync.V1.UpdateDocumentOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/DocumentPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/DocumentPage.php
index 7b3575d..2d2d811 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/DocumentPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/DocumentPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return DocumentInstance \Twilio\Rest\Sync\V1\Service\DocumentInstance
+ */
+ public function buildInstance(array $payload): DocumentInstance
{
return new DocumentInstance($this->version, $payload, $this->solution['serviceSid']);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Sync.V1.DocumentPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemContext.php
index e8fb909..fc8b7d7 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemContext.php
@@ -2,61 +2,91 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Sync
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Sync\V1\Service\SyncList;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
class SyncListItemContext extends InstanceContext
-{
+ {
/**
* Initialize the SyncListItemContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Sync Service with the Sync List
- * Item resource to fetch
- * @param string $listSid The SID of the Sync List with the Sync List Item
- * resource to fetch
- * @param int $index The index of the Sync List Item resource to fetch
- * @return \Twilio\Rest\Sync\V1\Service\SyncList\SyncListItemContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) to create the new List Item in.
+ * @param string $listSid The SID of the Sync List to add the new List Item to. Can be the Sync List resource's `sid` or its `unique_name`.
+ * @param int $index The index of the Sync List Item resource to delete.
*/
- public function __construct(Version $version, $serviceSid, $listSid, $index)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $listSid,
+ $index
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'listSid' => $listSid, 'index' => $index,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'listSid' =>
+ $listSid,
+ 'index' =>
+ $index,
+ ];
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Lists/' . \rawurlencode($listSid) . '/Items/' . \rawurlencode($index) . '';
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Lists/' . \rawurlencode($listSid)
+ .'/Items/' . \rawurlencode($index)
+ .'';
}
/**
- * Fetch a SyncListItemInstance
+ * Delete the SyncListItemInstance
+ *
+ * @param array|Options $options Optional Arguments
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(array $options = []): bool
+ {
+
+ $options = new Values($options);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'If-Match' => $options['ifMatch']]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
+ }
+
+
+ /**
+ * Fetch the SyncListItemInstance
*
* @return SyncListItemInstance Fetched SyncListItemInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): SyncListItemInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new SyncListItemInstance(
$this->version,
@@ -67,16 +97,6 @@ public function fetch()
);
}
- /**
- * Deletes the SyncListItemInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Update the SyncListItemInstance
@@ -85,23 +105,24 @@ public function delete()
* @return SyncListItemInstance Updated SyncListItemInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): SyncListItemInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'Data' => Serialize::jsonObject($options['data']),
- 'Ttl' => $options['ttl'],
- 'ItemTtl' => $options['itemTtl'],
- 'CollectionTtl' => $options['collectionTtl'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'Data' =>
+ Serialize::jsonObject($options['data']),
+ 'Ttl' =>
+ $options['ttl'],
+ 'ItemTtl' =>
+ $options['itemTtl'],
+ 'CollectionTtl' =>
+ $options['collectionTtl'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'If-Match' => $options['ifMatch']]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new SyncListItemInstance(
$this->version,
@@ -112,17 +133,18 @@ public function update($options = array())
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Sync.V1.SyncListItemContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemInstance.php
index cd8d53f..524b17b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemInstance.php
@@ -2,54 +2,59 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Sync
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Sync\V1\Service\SyncList;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
* @property int $index
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $listSid
- * @property string $url
- * @property string $revision
- * @property array $data
- * @property \DateTime $dateExpires
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $createdBy
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $listSid
+ * @property string|null $url
+ * @property string|null $revision
+ * @property array|null $data
+ * @property \DateTime|null $dateExpires
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $createdBy
*/
class SyncListItemInstance extends InstanceResource
{
/**
* Initialize the SyncListItemInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Sync Service that the resource is
- * associated with
- * @param string $listSid The SID of the Sync List that contains the List Item
- * @param int $index The index of the Sync List Item resource to fetch
- * @return \Twilio\Rest\Sync\V1\Service\SyncList\SyncListItemInstance
+ * @param string $serviceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) to create the new List Item in.
+ * @param string $listSid The SID of the Sync List to add the new List Item to. Can be the Sync List resource's `sid` or its `unique_name`.
+ * @param int $index The index of the Sync List Item resource to delete.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $listSid, $index = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $listSid, int $index = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'index' => Values::array_get($payload, 'index'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
@@ -61,24 +66,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $list
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'createdBy' => Values::array_get($payload, 'created_by'),
- );
+ ];
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'listSid' => $listSid,
- 'index' => $index ?: $this->properties['index'],
- );
+ $this->solution = ['serviceSid' => $serviceSid, 'listSid' => $listSid, 'index' => $index ?: $this->properties['index'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Sync\V1\Service\SyncList\SyncListItemContext Context
- * for this
- * SyncListItemInstance
+ * @return SyncListItemContext Context for this SyncListItemInstance
*/
- protected function proxy()
+ protected function proxy(): SyncListItemContext
{
if (!$this->context) {
$this->context = new SyncListItemContext(
@@ -93,25 +92,28 @@ protected function proxy()
}
/**
- * Fetch a SyncListItemInstance
+ * Delete the SyncListItemInstance
*
- * @return SyncListItemInstance Fetched SyncListItemInstance
+ * @param array|Options $options Optional Arguments
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(array $options = []): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete($options);
}
/**
- * Deletes the SyncListItemInstance
+ * Fetch the SyncListItemInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return SyncListItemInstance Fetched SyncListItemInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): SyncListItemInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -121,8 +123,9 @@ public function delete()
* @return SyncListItemInstance Updated SyncListItemInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): SyncListItemInstance
{
+
return $this->proxy()->update($options);
}
@@ -133,7 +136,7 @@ public function update($options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -152,12 +155,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Sync.V1.SyncListItemInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemList.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemList.php
index 027a5a7..b271b0a 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Sync
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Sync\V1\Service\SyncList;
@@ -12,60 +19,69 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
class SyncListItemList extends ListResource
-{
+ {
/**
* Construct the SyncListItemList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Sync Service that the resource is
- * associated with
- * @param string $listSid The SID of the Sync List that contains the List Item
- * @return \Twilio\Rest\Sync\V1\Service\SyncList\SyncListItemList
+ * @param string $serviceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) to create the new List Item in.
+ * @param string $listSid The SID of the Sync List to add the new List Item to. Can be the Sync List resource's `sid` or its `unique_name`.
*/
- public function __construct(Version $version, $serviceSid, $listSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid,
+ string $listSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'listSid' => $listSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Lists/' . \rawurlencode($listSid) . '/Items';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ 'listSid' =>
+ $listSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Lists/' . \rawurlencode($listSid)
+ .'/Items';
}
/**
- * Create a new SyncListItemInstance
+ * Create the SyncListItemInstance
*
- * @param array $data A JSON string that represents an arbitrary, schema-less
- * object that the List Item stores
+ * @param array $data A JSON string that represents an arbitrary, schema-less object that the List Item stores. Can be up to 16 KiB in length.
* @param array|Options $options Optional Arguments
- * @return SyncListItemInstance Newly created SyncListItemInstance
+ * @return SyncListItemInstance Created SyncListItemInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($data, $options = array())
+ public function create(array $data, array $options = []): SyncListItemInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'Data' => Serialize::jsonObject($data),
- 'Ttl' => $options['ttl'],
- 'ItemTtl' => $options['itemTtl'],
- 'CollectionTtl' => $options['collectionTtl'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'Data' =>
+ Serialize::jsonObject($data),
+ 'Ttl' =>
+ $options['ttl'],
+ 'ItemTtl' =>
+ $options['itemTtl'],
+ 'CollectionTtl' =>
+ $options['collectionTtl'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
return new SyncListItemInstance(
$this->version,
@@ -75,82 +91,87 @@ public function create($data, $options = array())
);
}
+
/**
- * Streams SyncListItemInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Reads SyncListItemInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
+ * @param int $limit Upper limit for the number of records to return. read()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
+ * page_size is defined but a limit is defined, read()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return SyncListItemInstance[] Array of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($options, $limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
- * Reads SyncListItemInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
+ * Streams SyncListItemInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
+ * @param int $limit Upper limit for the number of records to return. stream()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
+ * page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return SyncListItemInstance[] Array of results
+ * @return Stream stream of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
/**
* Retrieve a single page of SyncListItemInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of SyncListItemInstance
+ * @return SyncListItemPage Page of SyncListItemInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): SyncListItemPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Order' => $options['order'],
- 'From' => $options['from'],
- 'Bounds' => $options['bounds'],
+
+ $params = Values::of([
+ 'Order' =>
+ $options['order'],
+ 'From' =>
+ $options['from'],
+ 'Bounds' =>
+ $options['bounds'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new SyncListItemPage($this->version, $response, $this->solution);
}
@@ -160,9 +181,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of SyncListItemInstance
+ * @return SyncListItemPage Page of SyncListItemInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): SyncListItemPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -172,13 +193,16 @@ public function getPage($targetUrl)
return new SyncListItemPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a SyncListItemContext
*
- * @param int $index The index of the Sync List Item resource to fetch
- * @return \Twilio\Rest\Sync\V1\Service\SyncList\SyncListItemContext
+ * @param int $index The index of the Sync List Item resource to delete.
*/
- public function getContext($index)
+ public function getContext(
+ int $index
+
+ ): SyncListItemContext
{
return new SyncListItemContext(
$this->version,
@@ -193,8 +217,8 @@ public function getContext($index)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Sync.V1.SyncListItemList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemOptions.php
index f84adba..f428f87 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemOptions.php
@@ -1,10 +1,16 @@
options['ttl'] = $ttl;
$this->options['itemTtl'] = $itemTtl;
$this->options['collectionTtl'] = $collectionTtl;
@@ -74,35 +129,34 @@ public function __construct($ttl = Values::NONE, $itemTtl = Values::NONE, $colle
/**
* An alias for `item_ttl`. If both parameters are provided, this value is ignored.
*
- * @param int $ttl An alias for item_ttl
+ * @param int $ttl An alias for `item_ttl`. If both parameters are provided, this value is ignored.
* @return $this Fluent Builder
*/
- public function setTtl($ttl)
+ public function setTtl(int $ttl): self
{
$this->options['ttl'] = $ttl;
return $this;
}
/**
- * How long, in seconds, before the List Item expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the List Item does not expire. The List Item will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion.
+ * How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the List Item expires (time-to-live) and is deleted.
*
- * @param int $itemTtl How long, in seconds, before the List Item expires
+ * @param int $itemTtl How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the List Item expires (time-to-live) and is deleted.
* @return $this Fluent Builder
*/
- public function setItemTtl($itemTtl)
+ public function setItemTtl(int $itemTtl): self
{
$this->options['itemTtl'] = $itemTtl;
return $this;
}
/**
- * How long, in seconds, before the List Item's parent Sync List expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the parent Sync List does not expire. The Sync List will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion.
+ * How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the List Item's parent Sync List expires (time-to-live) and is deleted.
*
- * @param int $collectionTtl How long, in seconds, before the List Item's
- * parent Sync List expires
+ * @param int $collectionTtl How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the List Item's parent Sync List expires (time-to-live) and is deleted.
* @return $this Fluent Builder
*/
- public function setCollectionTtl($collectionTtl)
+ public function setCollectionTtl(int $collectionTtl): self
{
$this->options['collectionTtl'] = $collectionTtl;
return $this;
@@ -113,28 +167,65 @@ public function setCollectionTtl($collectionTtl)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Sync.V1.CreateSyncListItemOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Sync.V1.CreateSyncListItemOptions ' . $options . ']';
}
}
-class ReadSyncListItemOptions extends Options
-{
+class DeleteSyncListItemOptions extends Options
+ {
+ /**
+ * @param string $ifMatch If provided, applies this mutation if (and only if) the “revision” field of this [map item] matches the provided value. This matches the semantics of (and is implemented with) the HTTP [If-Match header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match).
+ */
+ public function __construct(
+
+ string $ifMatch = Values::NONE
+
+ ) {
+ $this->options['ifMatch'] = $ifMatch;
+ }
+
+ /**
+ * If provided, applies this mutation if (and only if) the “revision” field of this [map item] matches the provided value. This matches the semantics of (and is implemented with) the HTTP [If-Match header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match).
+ *
+ * @param string $ifMatch If provided, applies this mutation if (and only if) the “revision” field of this [map item] matches the provided value. This matches the semantics of (and is implemented with) the HTTP [If-Match header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match).
+ * @return $this Fluent Builder
+ */
+ public function setIfMatch(string $ifMatch): self
+ {
+ $this->options['ifMatch'] = $ifMatch;
+ return $this;
+ }
+
/**
- * @param string $order The order to return the List Items
- * @param string $from The index of the first Sync List Item resource to read
- * @param string $bounds Whether to include the List Item referenced by the
- * from parameter
+ * Provide a friendly representation
+ *
+ * @return string Machine friendly representation
*/
- public function __construct($order = Values::NONE, $from = Values::NONE, $bounds = Values::NONE)
+ public function __toString(): string
{
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Sync.V1.DeleteSyncListItemOptions ' . $options . ']';
+ }
+}
+
+
+class ReadSyncListItemOptions extends Options
+ {
+ /**
+ * @param string $order How to order the List Items returned by their `index` value. Can be: `asc` (ascending) or `desc` (descending) and the default is ascending.
+ * @param string $from The `index` of the first Sync List Item resource to read. See also `bounds`.
+ * @param string $bounds Whether to include the List Item referenced by the `from` parameter. Can be: `inclusive` to include the List Item referenced by the `from` parameter or `exclusive` to start with the next List Item. The default value is `inclusive`.
+ */
+ public function __construct(
+
+ string $order = Values::NONE,
+ string $from = Values::NONE,
+ string $bounds = Values::NONE
+
+ ) {
$this->options['order'] = $order;
$this->options['from'] = $from;
$this->options['bounds'] = $bounds;
@@ -143,10 +234,10 @@ public function __construct($order = Values::NONE, $from = Values::NONE, $bounds
/**
* How to order the List Items returned by their `index` value. Can be: `asc` (ascending) or `desc` (descending) and the default is ascending.
*
- * @param string $order The order to return the List Items
+ * @param string $order How to order the List Items returned by their `index` value. Can be: `asc` (ascending) or `desc` (descending) and the default is ascending.
* @return $this Fluent Builder
*/
- public function setOrder($order)
+ public function setOrder(string $order): self
{
$this->options['order'] = $order;
return $this;
@@ -155,10 +246,10 @@ public function setOrder($order)
/**
* The `index` of the first Sync List Item resource to read. See also `bounds`.
*
- * @param string $from The index of the first Sync List Item resource to read
+ * @param string $from The `index` of the first Sync List Item resource to read. See also `bounds`.
* @return $this Fluent Builder
*/
- public function setFrom($from)
+ public function setFrom(string $from): self
{
$this->options['from'] = $from;
return $this;
@@ -167,11 +258,10 @@ public function setFrom($from)
/**
* Whether to include the List Item referenced by the `from` parameter. Can be: `inclusive` to include the List Item referenced by the `from` parameter or `exclusive` to start with the next List Item. The default value is `inclusive`.
*
- * @param string $bounds Whether to include the List Item referenced by the
- * from parameter
+ * @param string $bounds Whether to include the List Item referenced by the `from` parameter. Can be: `inclusive` to include the List Item referenced by the `from` parameter or `exclusive` to start with the next List Item. The default value is `inclusive`.
* @return $this Fluent Builder
*/
- public function setBounds($bounds)
+ public function setBounds(string $bounds): self
{
$this->options['bounds'] = $bounds;
return $this;
@@ -182,44 +272,45 @@ public function setBounds($bounds)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Sync.V1.ReadSyncListItemOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Sync.V1.ReadSyncListItemOptions ' . $options . ']';
}
}
class UpdateSyncListItemOptions extends Options
-{
+ {
/**
- * @param array $data A JSON string that represents an arbitrary, schema-less
- * object that the List Item stores
- * @param int $ttl An alias for item_ttl
- * @param int $itemTtl How long, in seconds, before the List Item expires
- * @param int $collectionTtl How long, in seconds, before the List Item's
- * parent Sync List expires
+ * @param array $data A JSON string that represents an arbitrary, schema-less object that the List Item stores. Can be up to 16 KiB in length.
+ * @param int $ttl An alias for `item_ttl`. If both parameters are provided, this value is ignored.
+ * @param int $itemTtl How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the List Item expires (time-to-live) and is deleted.
+ * @param int $collectionTtl How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the List Item's parent Sync List expires (time-to-live) and is deleted. This parameter can only be used when the List Item's `data` or `ttl` is updated in the same request.
+ * @param string $ifMatch If provided, applies this mutation if (and only if) the “revision” field of this [map item] matches the provided value. This matches the semantics of (and is implemented with) the HTTP [If-Match header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match).
*/
- public function __construct($data = Values::NONE, $ttl = Values::NONE, $itemTtl = Values::NONE, $collectionTtl = Values::NONE)
- {
+ public function __construct(
+
+ array $data = Values::ARRAY_NONE,
+ int $ttl = Values::INT_NONE,
+ int $itemTtl = Values::INT_NONE,
+ int $collectionTtl = Values::INT_NONE,
+ string $ifMatch = Values::NONE
+
+ ) {
$this->options['data'] = $data;
$this->options['ttl'] = $ttl;
$this->options['itemTtl'] = $itemTtl;
$this->options['collectionTtl'] = $collectionTtl;
+ $this->options['ifMatch'] = $ifMatch;
}
/**
- * A JSON string that represents an arbitrary, schema-less object that the List Item stores. Can be up to 16KB in length.
+ * A JSON string that represents an arbitrary, schema-less object that the List Item stores. Can be up to 16 KiB in length.
*
- * @param array $data A JSON string that represents an arbitrary, schema-less
- * object that the List Item stores
+ * @param array $data A JSON string that represents an arbitrary, schema-less object that the List Item stores. Can be up to 16 KiB in length.
* @return $this Fluent Builder
*/
- public function setData($data)
+ public function setData(array $data): self
{
$this->options['data'] = $data;
return $this;
@@ -228,53 +319,60 @@ public function setData($data)
/**
* An alias for `item_ttl`. If both parameters are provided, this value is ignored.
*
- * @param int $ttl An alias for item_ttl
+ * @param int $ttl An alias for `item_ttl`. If both parameters are provided, this value is ignored.
* @return $this Fluent Builder
*/
- public function setTtl($ttl)
+ public function setTtl(int $ttl): self
{
$this->options['ttl'] = $ttl;
return $this;
}
/**
- * How long, in seconds, before the List Item expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the List Item does not expire. The List Item will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion.
+ * How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the List Item expires (time-to-live) and is deleted.
*
- * @param int $itemTtl How long, in seconds, before the List Item expires
+ * @param int $itemTtl How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the List Item expires (time-to-live) and is deleted.
* @return $this Fluent Builder
*/
- public function setItemTtl($itemTtl)
+ public function setItemTtl(int $itemTtl): self
{
$this->options['itemTtl'] = $itemTtl;
return $this;
}
/**
- * How long, in seconds, before the List Item's parent Sync List expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the parent Sync List does not expire. The Sync List will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion.
+ * How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the List Item's parent Sync List expires (time-to-live) and is deleted. This parameter can only be used when the List Item's `data` or `ttl` is updated in the same request.
*
- * @param int $collectionTtl How long, in seconds, before the List Item's
- * parent Sync List expires
+ * @param int $collectionTtl How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the List Item's parent Sync List expires (time-to-live) and is deleted. This parameter can only be used when the List Item's `data` or `ttl` is updated in the same request.
* @return $this Fluent Builder
*/
- public function setCollectionTtl($collectionTtl)
+ public function setCollectionTtl(int $collectionTtl): self
{
$this->options['collectionTtl'] = $collectionTtl;
return $this;
}
+ /**
+ * If provided, applies this mutation if (and only if) the “revision” field of this [map item] matches the provided value. This matches the semantics of (and is implemented with) the HTTP [If-Match header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match).
+ *
+ * @param string $ifMatch If provided, applies this mutation if (and only if) the “revision” field of this [map item] matches the provided value. This matches the semantics of (and is implemented with) the HTTP [If-Match header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match).
+ * @return $this Fluent Builder
+ */
+ public function setIfMatch(string $ifMatch): self
+ {
+ $this->options['ifMatch'] = $ifMatch;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Sync.V1.UpdateSyncListItemOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Sync.V1.UpdateSyncListItemOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemPage.php
index e227251..70fa95d 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListItemPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return SyncListItemInstance \Twilio\Rest\Sync\V1\Service\SyncList\SyncListItemInstance
+ */
+ public function buildInstance(array $payload): SyncListItemInstance
{
- return new SyncListItemInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['listSid']
- );
+ return new SyncListItemInstance($this->version, $payload, $this->solution['serviceSid'], $this->solution['listSid']);
}
/**
@@ -39,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Sync.V1.SyncListItemPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionContext.php
index 37e062c..4407906 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionContext.php
@@ -2,66 +2,87 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Sync
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Sync\V1\Service\SyncList;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
class SyncListPermissionContext extends InstanceContext
-{
+ {
/**
* Initialize the SyncListPermissionContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Sync Service with the Sync List
- * Permission resource to fetch
- * @param string $listSid The SID of the Sync List with the Sync List
- * Permission resource to fetch
- * @param string $identity The application-defined string that uniquely
- * identifies the User's Sync List Permission resource
- * to fetch
- * @return \Twilio\Rest\Sync\V1\Service\SyncList\SyncListPermissionContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync List Permission resource to delete.
+ * @param string $listSid The SID of the Sync List with the Sync List Permission resource to delete. Can be the Sync List resource's `sid` or its `unique_name`.
+ * @param string $identity The application-defined string that uniquely identifies the User's Sync List Permission resource to delete.
*/
- public function __construct(Version $version, $serviceSid, $listSid, $identity)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $listSid,
+ $identity
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'listSid' => $listSid,
- 'identity' => $identity,
- );
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'listSid' =>
+ $listSid,
+ 'identity' =>
+ $identity,
+ ];
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Lists/' . \rawurlencode($listSid) . '/Permissions/' . \rawurlencode($identity) . '';
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Lists/' . \rawurlencode($listSid)
+ .'/Permissions/' . \rawurlencode($identity)
+ .'';
}
/**
- * Fetch a SyncListPermissionInstance
+ * Delete the SyncListPermissionInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
+ }
+
+
+ /**
+ * Fetch the SyncListPermissionInstance
*
* @return SyncListPermissionInstance Fetched SyncListPermissionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): SyncListPermissionInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new SyncListPermissionInstance(
$this->version,
@@ -72,40 +93,30 @@ public function fetch()
);
}
- /**
- * Deletes the SyncListPermissionInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Update the SyncListPermissionInstance
*
- * @param bool $read Read access
- * @param bool $write Write access
- * @param bool $manage Manage access
+ * @param bool $read Whether the identity can read the Sync List and its Items. Default value is `false`.
+ * @param bool $write Whether the identity can create, update, and delete Items in the Sync List. Default value is `false`.
+ * @param bool $manage Whether the identity can delete the Sync List. Default value is `false`.
* @return SyncListPermissionInstance Updated SyncListPermissionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($read, $write, $manage)
+ public function update(bool $read, bool $write, bool $manage): SyncListPermissionInstance
{
- $data = Values::of(array(
- 'Read' => Serialize::booleanToString($read),
- 'Write' => Serialize::booleanToString($write),
- 'Manage' => Serialize::booleanToString($manage),
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+
+ $data = Values::of([
+ 'Read' =>
+ Serialize::booleanToString($read),
+ 'Write' =>
+ Serialize::booleanToString($write),
+ 'Manage' =>
+ Serialize::booleanToString($manage),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new SyncListPermissionInstance(
$this->version,
@@ -116,17 +127,18 @@ public function update($read, $write, $manage)
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Sync.V1.SyncListPermissionContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionInstance.php
index b591e5f..43d7919 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Sync
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Sync\V1\Service\SyncList;
use Twilio\Exceptions\TwilioException;
@@ -14,40 +22,34 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $listSid
- * @property string $identity
- * @property bool $read
- * @property bool $write
- * @property bool $manage
- * @property string $url
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $listSid
+ * @property string|null $identity
+ * @property bool|null $read
+ * @property bool|null $write
+ * @property bool|null $manage
+ * @property string|null $url
*/
class SyncListPermissionInstance extends InstanceResource
{
/**
* Initialize the SyncListPermissionInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Sync Service that the resource is
- * associated with
- * @param string $listSid The SID of the Sync List to which the Permission
- * applies
- * @param string $identity The application-defined string that uniquely
- * identifies the User's Sync List Permission resource
- * to fetch
- * @return \Twilio\Rest\Sync\V1\Service\SyncList\SyncListPermissionInstance
+ * @param string $serviceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync List Permission resource to delete.
+ * @param string $listSid The SID of the Sync List with the Sync List Permission resource to delete. Can be the Sync List resource's `sid` or its `unique_name`.
+ * @param string $identity The application-defined string that uniquely identifies the User's Sync List Permission resource to delete.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $listSid, $identity = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $listSid, string $identity = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
'listSid' => Values::array_get($payload, 'list_sid'),
@@ -56,22 +58,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $list
'write' => Values::array_get($payload, 'write'),
'manage' => Values::array_get($payload, 'manage'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'listSid' => $listSid,
- 'identity' => $identity ?: $this->properties['identity'],
- );
+ $this->solution = ['serviceSid' => $serviceSid, 'listSid' => $listSid, 'identity' => $identity ?: $this->properties['identity'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Sync\V1\Service\SyncList\SyncListPermissionContext Context for this SyncListPermissionInstance
+ * @return SyncListPermissionContext Context for this SyncListPermissionInstance
*/
- protected function proxy()
+ protected function proxy(): SyncListPermissionContext
{
if (!$this->context) {
$this->context = new SyncListPermissionContext(
@@ -86,38 +84,41 @@ protected function proxy()
}
/**
- * Fetch a SyncListPermissionInstance
+ * Delete the SyncListPermissionInstance
*
- * @return SyncListPermissionInstance Fetched SyncListPermissionInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the SyncListPermissionInstance
+ * Fetch the SyncListPermissionInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return SyncListPermissionInstance Fetched SyncListPermissionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): SyncListPermissionInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
* Update the SyncListPermissionInstance
*
- * @param bool $read Read access
- * @param bool $write Write access
- * @param bool $manage Manage access
+ * @param bool $read Whether the identity can read the Sync List and its Items. Default value is `false`.
+ * @param bool $write Whether the identity can create, update, and delete Items in the Sync List. Default value is `false`.
+ * @param bool $manage Whether the identity can delete the Sync List. Default value is `false`.
* @return SyncListPermissionInstance Updated SyncListPermissionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($read, $write, $manage)
+ public function update(bool $read, bool $write, bool $manage): SyncListPermissionInstance
{
+
return $this->proxy()->update($read, $write, $manage);
}
@@ -128,7 +129,7 @@ public function update($read, $write, $manage)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -147,12 +148,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Sync.V1.SyncListPermissionInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionList.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionList.php
index c22ce58..20c928c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionList.php
@@ -2,45 +2,79 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Sync
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Sync\V1\Service\SyncList;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
+
class SyncListPermissionList extends ListResource
-{
+ {
/**
* Construct the SyncListPermissionList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Sync Service that the resource is
- * associated with
- * @param string $listSid The SID of the Sync List to which the Permission
- * applies
- * @return \Twilio\Rest\Sync\V1\Service\SyncList\SyncListPermissionList
+ * @param string $serviceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync List Permission resource to delete.
+ * @param string $listSid The SID of the Sync List with the Sync List Permission resource to delete. Can be the Sync List resource's `sid` or its `unique_name`.
*/
- public function __construct(Version $version, $serviceSid, $listSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid,
+ string $listSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'listSid' => $listSid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ 'listSid' =>
+ $listSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Lists/' . \rawurlencode($listSid)
+ .'/Permissions';
+ }
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Lists/' . \rawurlencode($listSid) . '/Permissions';
+ /**
+ * Reads SyncListPermissionInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return SyncListPermissionInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
- * Streams SyncListPermissionInstance records from the API as a generator
- * stream.
+ * Streams SyncListPermissionInstance records from the API as a generator stream.
* This operation lazily loads records as efficiently as possible until the
* limit
* is reached.
@@ -55,9 +89,9 @@ public function __construct(Version $version, $serviceSid, $listSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -66,26 +100,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads SyncListPermissionInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return SyncListPermissionInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of SyncListPermissionInstance records from the API.
* Request is executed immediately
@@ -93,21 +107,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of SyncListPermissionInstance
+ * @return SyncListPermissionPage Page of SyncListPermissionInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): SyncListPermissionPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new SyncListPermissionPage($this->version, $response, $this->solution);
}
@@ -117,9 +132,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of SyncListPermissionInstance
+ * @return SyncListPermissionPage Page of SyncListPermissionInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): SyncListPermissionPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -129,15 +144,16 @@ public function getPage($targetUrl)
return new SyncListPermissionPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a SyncListPermissionContext
*
- * @param string $identity The application-defined string that uniquely
- * identifies the User's Sync List Permission resource
- * to fetch
- * @return \Twilio\Rest\Sync\V1\Service\SyncList\SyncListPermissionContext
+ * @param string $identity The application-defined string that uniquely identifies the User's Sync List Permission resource to delete.
*/
- public function getContext($identity)
+ public function getContext(
+ string $identity
+
+ ): SyncListPermissionContext
{
return new SyncListPermissionContext(
$this->version,
@@ -152,8 +168,8 @@ public function getContext($identity)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Sync.V1.SyncListPermissionList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionPage.php
index e2cca1a..828e878 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncList/SyncListPermissionPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return SyncListPermissionInstance \Twilio\Rest\Sync\V1\Service\SyncList\SyncListPermissionInstance
+ */
+ public function buildInstance(array $payload): SyncListPermissionInstance
{
- return new SyncListPermissionInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['listSid']
- );
+ return new SyncListPermissionInstance($this->version, $payload, $this->solution['serviceSid'], $this->solution['listSid']);
}
/**
@@ -39,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Sync.V1.SyncListPermissionPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncListContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncListContext.php
index 70083bc..3598117 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncListContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncListContext.php
@@ -2,68 +2,94 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Sync
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Sync\V1\Service;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Sync\V1\Service\SyncList\SyncListItemList;
-use Twilio\Rest\Sync\V1\Service\SyncList\SyncListPermissionList;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Sync\V1\Service\SyncList\SyncListPermissionList;
+use Twilio\Rest\Sync\V1\Service\SyncList\SyncListItemList;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property \Twilio\Rest\Sync\V1\Service\SyncList\SyncListItemList $syncListItems
- * @property \Twilio\Rest\Sync\V1\Service\SyncList\SyncListPermissionList $syncListPermissions
- * @method \Twilio\Rest\Sync\V1\Service\SyncList\SyncListItemContext syncListItems(int $index)
+ * @property SyncListPermissionList $syncListPermissions
+ * @property SyncListItemList $syncListItems
* @method \Twilio\Rest\Sync\V1\Service\SyncList\SyncListPermissionContext syncListPermissions(string $identity)
+ * @method \Twilio\Rest\Sync\V1\Service\SyncList\SyncListItemContext syncListItems(string $index)
*/
class SyncListContext extends InstanceContext
-{
- protected $_syncListItems = null;
- protected $_syncListPermissions = null;
+ {
+ protected $_syncListPermissions;
+ protected $_syncListItems;
/**
* Initialize the SyncListContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Sync Service with the Sync List
- * resource to fetch
- * @param string $sid The SID of the Sync List resource to fetch
- * @return \Twilio\Rest\Sync\V1\Service\SyncListContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) to create the new Sync List in.
+ * @param string $sid The SID of the Sync List resource to delete. Can be the Sync List resource's `sid` or its `unique_name`.
*/
- public function __construct(Version $version, $serviceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Lists/' . \rawurlencode($sid)
+ .'';
+ }
+
+ /**
+ * Delete the SyncListInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Lists/' . \rawurlencode($sid) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a SyncListInstance
+ * Fetch the SyncListInstance
*
* @return SyncListInstance Fetched SyncListInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): SyncListInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new SyncListInstance(
$this->version,
@@ -73,16 +99,6 @@ public function fetch()
);
}
- /**
- * Deletes the SyncListInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Update the SyncListInstance
@@ -91,18 +107,20 @@ public function delete()
* @return SyncListInstance Updated SyncListInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): SyncListInstance
{
+
$options = new Values($options);
- $data = Values::of(array('Ttl' => $options['ttl'], 'CollectionTtl' => $options['collectionTtl'],));
+ $data = Values::of([
+ 'Ttl' =>
+ $options['ttl'],
+ 'CollectionTtl' =>
+ $options['collectionTtl'],
+ ]);
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new SyncListInstance(
$this->version,
@@ -112,50 +130,47 @@ public function update($options = array())
);
}
+
/**
- * Access the syncListItems
- *
- * @return \Twilio\Rest\Sync\V1\Service\SyncList\SyncListItemList
+ * Access the syncListPermissions
*/
- protected function getSyncListItems()
+ protected function getSyncListPermissions(): SyncListPermissionList
{
- if (!$this->_syncListItems) {
- $this->_syncListItems = new SyncListItemList(
+ if (!$this->_syncListPermissions) {
+ $this->_syncListPermissions = new SyncListPermissionList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sid']
);
}
- return $this->_syncListItems;
+ return $this->_syncListPermissions;
}
/**
- * Access the syncListPermissions
- *
- * @return \Twilio\Rest\Sync\V1\Service\SyncList\SyncListPermissionList
+ * Access the syncListItems
*/
- protected function getSyncListPermissions()
+ protected function getSyncListItems(): SyncListItemList
{
- if (!$this->_syncListPermissions) {
- $this->_syncListPermissions = new SyncListPermissionList(
+ if (!$this->_syncListItems) {
+ $this->_syncListItems = new SyncListItemList(
$this->version,
$this->solution['serviceSid'],
$this->solution['sid']
);
}
- return $this->_syncListPermissions;
+ return $this->_syncListItems;
}
/**
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -170,10 +185,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -188,12 +203,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Sync.V1.SyncListContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncListInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncListInstance.php
index cc7d248..a62f372 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncListInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncListInstance.php
@@ -2,56 +2,63 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Sync
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Sync\V1\Service;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Sync\V1\Service\SyncList\SyncListPermissionList;
+use Twilio\Rest\Sync\V1\Service\SyncList\SyncListItemList;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property string $sid
- * @property string $uniqueName
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $url
- * @property array $links
- * @property string $revision
- * @property \DateTime $dateExpires
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $createdBy
+ * @property string|null $sid
+ * @property string|null $uniqueName
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $url
+ * @property array|null $links
+ * @property string|null $revision
+ * @property \DateTime|null $dateExpires
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $createdBy
*/
class SyncListInstance extends InstanceResource
{
- protected $_syncListItems = null;
- protected $_syncListPermissions = null;
+ protected $_syncListPermissions;
+ protected $_syncListItems;
/**
* Initialize the SyncListInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Sync Service that the resource is
- * associated with
- * @param string $sid The SID of the Sync List resource to fetch
- * @return \Twilio\Rest\Sync\V1\Service\SyncListInstance
+ * @param string $serviceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) to create the new Sync List in.
+ * @param string $sid The SID of the Sync List resource to delete. Can be the Sync List resource's `sid` or its `unique_name`.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'uniqueName' => Values::array_get($payload, 'unique_name'),
'accountSid' => Values::array_get($payload, 'account_sid'),
@@ -63,19 +70,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $sid
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'createdBy' => Values::array_get($payload, 'created_by'),
- );
+ ];
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Sync\V1\Service\SyncListContext Context for this
- * SyncListInstance
+ * @return SyncListContext Context for this SyncListInstance
*/
- protected function proxy()
+ protected function proxy(): SyncListContext
{
if (!$this->context) {
$this->context = new SyncListContext(
@@ -89,25 +95,27 @@ protected function proxy()
}
/**
- * Fetch a SyncListInstance
+ * Delete the SyncListInstance
*
- * @return SyncListInstance Fetched SyncListInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the SyncListInstance
+ * Fetch the SyncListInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return SyncListInstance Fetched SyncListInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): SyncListInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -117,29 +125,26 @@ public function delete()
* @return SyncListInstance Updated SyncListInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): SyncListInstance
{
+
return $this->proxy()->update($options);
}
/**
- * Access the syncListItems
- *
- * @return \Twilio\Rest\Sync\V1\Service\SyncList\SyncListItemList
+ * Access the syncListPermissions
*/
- protected function getSyncListItems()
+ protected function getSyncListPermissions(): SyncListPermissionList
{
- return $this->proxy()->syncListItems;
+ return $this->proxy()->syncListPermissions;
}
/**
- * Access the syncListPermissions
- *
- * @return \Twilio\Rest\Sync\V1\Service\SyncList\SyncListPermissionList
+ * Access the syncListItems
*/
- protected function getSyncListPermissions()
+ protected function getSyncListItems(): SyncListItemList
{
- return $this->proxy()->syncListPermissions;
+ return $this->proxy()->syncListItems;
}
/**
@@ -149,7 +154,7 @@ protected function getSyncListPermissions()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -168,12 +173,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Sync.V1.SyncListInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncListList.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncListList.php
index 1e58b87..a02a518 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncListList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncListList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Sync
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Sync\V1\Service;
@@ -12,57 +19,86 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
+
class SyncListList extends ListResource
-{
+ {
/**
* Construct the SyncListList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Sync Service that the resource is
- * associated with
- * @return \Twilio\Rest\Sync\V1\Service\SyncListList
+ * @param string $serviceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) to create the new Sync List in.
*/
- public function __construct(Version $version, $serviceSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Lists';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Lists';
}
/**
- * Create a new SyncListInstance
+ * Create the SyncListInstance
*
* @param array|Options $options Optional Arguments
- * @return SyncListInstance Newly created SyncListInstance
+ * @return SyncListInstance Created SyncListInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($options = array())
+ public function create(array $options = []): SyncListInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'UniqueName' => $options['uniqueName'],
- 'Ttl' => $options['ttl'],
- 'CollectionTtl' => $options['collectionTtl'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'UniqueName' =>
+ $options['uniqueName'],
+ 'Ttl' =>
+ $options['ttl'],
+ 'CollectionTtl' =>
+ $options['collectionTtl'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new SyncListInstance(
+ $this->version,
+ $payload,
+ $this->solution['serviceSid']
);
+ }
+
- return new SyncListInstance($this->version, $payload, $this->solution['serviceSid']);
+ /**
+ * Reads SyncListInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return SyncListInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -81,9 +117,9 @@ public function create($options = array())
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -92,26 +128,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads SyncListInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return SyncListInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of SyncListInstance records from the API.
* Request is executed immediately
@@ -119,21 +135,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of SyncListInstance
+ * @return SyncListPage Page of SyncListInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): SyncListPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new SyncListPage($this->version, $response, $this->solution);
}
@@ -143,9 +160,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of SyncListInstance
+ * @return SyncListPage Page of SyncListInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): SyncListPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -155,15 +172,22 @@ public function getPage($targetUrl)
return new SyncListPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a SyncListContext
*
- * @param string $sid The SID of the Sync List resource to fetch
- * @return \Twilio\Rest\Sync\V1\Service\SyncListContext
+ * @param string $sid The SID of the Sync List resource to delete. Can be the Sync List resource's `sid` or its `unique_name`.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): SyncListContext
{
- return new SyncListContext($this->version, $this->solution['serviceSid'], $sid);
+ return new SyncListContext(
+ $this->version,
+ $this->solution['serviceSid'],
+ $sid
+ );
}
/**
@@ -171,8 +195,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Sync.V1.SyncListList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncListOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncListOptions.php
index 5917646..4a1211b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncListOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncListOptions.php
@@ -1,10 +1,16 @@
options['uniqueName'] = $uniqueName;
$this->options['ttl'] = $ttl;
$this->options['collectionTtl'] = $collectionTtl;
@@ -61,11 +86,10 @@ public function __construct($uniqueName = Values::NONE, $ttl = Values::NONE, $co
/**
* An application-defined string that uniquely identifies the resource. This value must be unique within its Service and it can be up to 320 characters long. The `unique_name` value can be used as an alternative to the `sid` in the URL path to address the resource.
*
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the resource
+ * @param string $uniqueName An application-defined string that uniquely identifies the resource. This value must be unique within its Service and it can be up to 320 characters long. The `unique_name` value can be used as an alternative to the `sid` in the URL path to address the resource.
* @return $this Fluent Builder
*/
- public function setUniqueName($uniqueName)
+ public function setUniqueName(string $uniqueName): self
{
$this->options['uniqueName'] = $uniqueName;
return $this;
@@ -74,23 +98,22 @@ public function setUniqueName($uniqueName)
/**
* Alias for collection_ttl. If both are provided, this value is ignored.
*
- * @param int $ttl Alias for collection_ttl
+ * @param int $ttl Alias for collection_ttl. If both are provided, this value is ignored.
* @return $this Fluent Builder
*/
- public function setTtl($ttl)
+ public function setTtl(int $ttl): self
{
$this->options['ttl'] = $ttl;
return $this;
}
/**
- * How long, in seconds, before the Sync List expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Sync List does not expire. The Sync List will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion.
+ * How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Sync List expires (time-to-live) and is deleted.
*
- * @param int $collectionTtl How long, in seconds, before the Sync List expires
- * and is deleted
+ * @param int $collectionTtl How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Sync List expires (time-to-live) and is deleted.
* @return $this Fluent Builder
*/
- public function setCollectionTtl($collectionTtl)
+ public function setCollectionTtl(int $collectionTtl): self
{
$this->options['collectionTtl'] = $collectionTtl;
return $this;
@@ -101,27 +124,28 @@ public function setCollectionTtl($collectionTtl)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Sync.V1.CreateSyncListOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Sync.V1.CreateSyncListOptions ' . $options . ']';
}
}
+
+
+
class UpdateSyncListOptions extends Options
-{
+ {
/**
- * @param int $ttl An alias for collection_ttl
- * @param int $collectionTtl How long, in seconds, before the Sync List expires
- * and is deleted
+ * @param int $ttl An alias for `collection_ttl`. If both are provided, this value is ignored.
+ * @param int $collectionTtl How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Sync List expires (time-to-live) and is deleted.
*/
- public function __construct($ttl = Values::NONE, $collectionTtl = Values::NONE)
- {
+ public function __construct(
+
+ int $ttl = Values::INT_NONE,
+ int $collectionTtl = Values::INT_NONE
+
+ ) {
$this->options['ttl'] = $ttl;
$this->options['collectionTtl'] = $collectionTtl;
}
@@ -129,23 +153,22 @@ public function __construct($ttl = Values::NONE, $collectionTtl = Values::NONE)
/**
* An alias for `collection_ttl`. If both are provided, this value is ignored.
*
- * @param int $ttl An alias for collection_ttl
+ * @param int $ttl An alias for `collection_ttl`. If both are provided, this value is ignored.
* @return $this Fluent Builder
*/
- public function setTtl($ttl)
+ public function setTtl(int $ttl): self
{
$this->options['ttl'] = $ttl;
return $this;
}
/**
- * How long, in seconds, before the Sync List expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Sync List does not expire. The Sync List will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion.
+ * How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Sync List expires (time-to-live) and is deleted.
*
- * @param int $collectionTtl How long, in seconds, before the Sync List expires
- * and is deleted
+ * @param int $collectionTtl How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Sync List expires (time-to-live) and is deleted.
* @return $this Fluent Builder
*/
- public function setCollectionTtl($collectionTtl)
+ public function setCollectionTtl(int $collectionTtl): self
{
$this->options['collectionTtl'] = $collectionTtl;
return $this;
@@ -156,14 +179,10 @@ public function setCollectionTtl($collectionTtl)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Sync.V1.UpdateSyncListOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Sync.V1.UpdateSyncListOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncListPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncListPage.php
index 62307a2..a3b0e55 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncListPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncListPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return SyncListInstance \Twilio\Rest\Sync\V1\Service\SyncListInstance
+ */
+ public function buildInstance(array $payload): SyncListInstance
{
return new SyncListInstance($this->version, $payload, $this->solution['serviceSid']);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Sync.V1.SyncListPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemContext.php
index 63abb35..85d3075 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemContext.php
@@ -2,61 +2,91 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Sync
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Sync\V1\Service\SyncMap;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
class SyncMapItemContext extends InstanceContext
-{
+ {
/**
* Initialize the SyncMapItemContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Sync Service with the Sync Map Item
- * resource to fetch
- * @param string $mapSid The SID of the Sync Map with the Sync Map Item
- * resource to fetch
- * @param string $key The key value of the Sync Map Item resource to fetch
- * @return \Twilio\Rest\Sync\V1\Service\SyncMap\SyncMapItemContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) to create the Map Item in.
+ * @param string $mapSid The SID of the Sync Map to add the new Map Item to. Can be the Sync Map resource's `sid` or its `unique_name`.
+ * @param string $key The `key` value of the Sync Map Item resource to delete.
*/
- public function __construct(Version $version, $serviceSid, $mapSid, $key)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $mapSid,
+ $key
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'mapSid' => $mapSid, 'key' => $key,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'mapSid' =>
+ $mapSid,
+ 'key' =>
+ $key,
+ ];
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Maps/' . \rawurlencode($mapSid) . '/Items/' . \rawurlencode($key) . '';
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Maps/' . \rawurlencode($mapSid)
+ .'/Items/' . \rawurlencode($key)
+ .'';
}
/**
- * Fetch a SyncMapItemInstance
+ * Delete the SyncMapItemInstance
+ *
+ * @param array|Options $options Optional Arguments
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(array $options = []): bool
+ {
+
+ $options = new Values($options);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'If-Match' => $options['ifMatch']]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
+ }
+
+
+ /**
+ * Fetch the SyncMapItemInstance
*
* @return SyncMapItemInstance Fetched SyncMapItemInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): SyncMapItemInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new SyncMapItemInstance(
$this->version,
@@ -67,16 +97,6 @@ public function fetch()
);
}
- /**
- * Deletes the SyncMapItemInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Update the SyncMapItemInstance
@@ -85,23 +105,24 @@ public function delete()
* @return SyncMapItemInstance Updated SyncMapItemInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): SyncMapItemInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'Data' => Serialize::jsonObject($options['data']),
- 'Ttl' => $options['ttl'],
- 'ItemTtl' => $options['itemTtl'],
- 'CollectionTtl' => $options['collectionTtl'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'Data' =>
+ Serialize::jsonObject($options['data']),
+ 'Ttl' =>
+ $options['ttl'],
+ 'ItemTtl' =>
+ $options['itemTtl'],
+ 'CollectionTtl' =>
+ $options['collectionTtl'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'If-Match' => $options['ifMatch']]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new SyncMapItemInstance(
$this->version,
@@ -112,17 +133,18 @@ public function update($options = array())
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Sync.V1.SyncMapItemContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemInstance.php
index 5c429eb..a525779 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemInstance.php
@@ -2,54 +2,59 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Sync
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Sync\V1\Service\SyncMap;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property string $key
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $mapSid
- * @property string $url
- * @property string $revision
- * @property array $data
- * @property \DateTime $dateExpires
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $createdBy
+ * @property string|null $key
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $mapSid
+ * @property string|null $url
+ * @property string|null $revision
+ * @property array|null $data
+ * @property \DateTime|null $dateExpires
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $createdBy
*/
class SyncMapItemInstance extends InstanceResource
{
/**
* Initialize the SyncMapItemInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Sync Service that the resource is
- * associated with
- * @param string $mapSid The SID of the Sync Map that contains the Map Item
- * @param string $key The key value of the Sync Map Item resource to fetch
- * @return \Twilio\Rest\Sync\V1\Service\SyncMap\SyncMapItemInstance
+ * @param string $serviceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) to create the Map Item in.
+ * @param string $mapSid The SID of the Sync Map to add the new Map Item to. Can be the Sync Map resource's `sid` or its `unique_name`.
+ * @param string $key The `key` value of the Sync Map Item resource to delete.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $mapSid, $key = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $mapSid, string $key = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'key' => Values::array_get($payload, 'key'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
@@ -61,24 +66,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $mapS
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'createdBy' => Values::array_get($payload, 'created_by'),
- );
+ ];
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'mapSid' => $mapSid,
- 'key' => $key ?: $this->properties['key'],
- );
+ $this->solution = ['serviceSid' => $serviceSid, 'mapSid' => $mapSid, 'key' => $key ?: $this->properties['key'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Sync\V1\Service\SyncMap\SyncMapItemContext Context for
- * this
- * SyncMapItemInstance
+ * @return SyncMapItemContext Context for this SyncMapItemInstance
*/
- protected function proxy()
+ protected function proxy(): SyncMapItemContext
{
if (!$this->context) {
$this->context = new SyncMapItemContext(
@@ -93,25 +92,28 @@ protected function proxy()
}
/**
- * Fetch a SyncMapItemInstance
+ * Delete the SyncMapItemInstance
*
- * @return SyncMapItemInstance Fetched SyncMapItemInstance
+ * @param array|Options $options Optional Arguments
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(array $options = []): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete($options);
}
/**
- * Deletes the SyncMapItemInstance
+ * Fetch the SyncMapItemInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return SyncMapItemInstance Fetched SyncMapItemInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): SyncMapItemInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -121,8 +123,9 @@ public function delete()
* @return SyncMapItemInstance Updated SyncMapItemInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): SyncMapItemInstance
{
+
return $this->proxy()->update($options);
}
@@ -133,7 +136,7 @@ public function update($options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -152,12 +155,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Sync.V1.SyncMapItemInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemList.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemList.php
index 67e0c0a..0ee5ec2 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Sync
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Sync\V1\Service\SyncMap;
@@ -12,62 +19,72 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
class SyncMapItemList extends ListResource
-{
+ {
/**
* Construct the SyncMapItemList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Sync Service that the resource is
- * associated with
- * @param string $mapSid The SID of the Sync Map that contains the Map Item
- * @return \Twilio\Rest\Sync\V1\Service\SyncMap\SyncMapItemList
+ * @param string $serviceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) to create the Map Item in.
+ * @param string $mapSid The SID of the Sync Map to add the new Map Item to. Can be the Sync Map resource's `sid` or its `unique_name`.
*/
- public function __construct(Version $version, $serviceSid, $mapSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid,
+ string $mapSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'mapSid' => $mapSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Maps/' . \rawurlencode($mapSid) . '/Items';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ 'mapSid' =>
+ $mapSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Maps/' . \rawurlencode($mapSid)
+ .'/Items';
}
/**
- * Create a new SyncMapItemInstance
+ * Create the SyncMapItemInstance
*
- * @param string $key The unique, user-defined key for the Map Item
- * @param array $data A JSON string that represents an arbitrary, schema-less
- * object that the Map Item stores
+ * @param string $key The unique, user-defined key for the Map Item. Can be up to 320 characters long.
+ * @param array $data A JSON string that represents an arbitrary, schema-less object that the Map Item stores. Can be up to 16 KiB in length.
* @param array|Options $options Optional Arguments
- * @return SyncMapItemInstance Newly created SyncMapItemInstance
+ * @return SyncMapItemInstance Created SyncMapItemInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($key, $data, $options = array())
+ public function create(string $key, array $data, array $options = []): SyncMapItemInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'Key' => $key,
- 'Data' => Serialize::jsonObject($data),
- 'Ttl' => $options['ttl'],
- 'ItemTtl' => $options['itemTtl'],
- 'CollectionTtl' => $options['collectionTtl'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'Key' =>
+ $key,
+ 'Data' =>
+ Serialize::jsonObject($data),
+ 'Ttl' =>
+ $options['ttl'],
+ 'ItemTtl' =>
+ $options['itemTtl'],
+ 'CollectionTtl' =>
+ $options['collectionTtl'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
return new SyncMapItemInstance(
$this->version,
@@ -77,82 +94,87 @@ public function create($key, $data, $options = array())
);
}
+
/**
- * Streams SyncMapItemInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Reads SyncMapItemInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
+ * @param int $limit Upper limit for the number of records to return. read()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
+ * page_size is defined but a limit is defined, read()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return SyncMapItemInstance[] Array of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($options, $limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
- * Reads SyncMapItemInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
+ * Streams SyncMapItemInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
+ * @param int $limit Upper limit for the number of records to return. stream()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
+ * page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return SyncMapItemInstance[] Array of results
+ * @return Stream stream of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
/**
* Retrieve a single page of SyncMapItemInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of SyncMapItemInstance
+ * @return SyncMapItemPage Page of SyncMapItemInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): SyncMapItemPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Order' => $options['order'],
- 'From' => $options['from'],
- 'Bounds' => $options['bounds'],
+
+ $params = Values::of([
+ 'Order' =>
+ $options['order'],
+ 'From' =>
+ $options['from'],
+ 'Bounds' =>
+ $options['bounds'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new SyncMapItemPage($this->version, $response, $this->solution);
}
@@ -162,9 +184,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of SyncMapItemInstance
+ * @return SyncMapItemPage Page of SyncMapItemInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): SyncMapItemPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -174,13 +196,16 @@ public function getPage($targetUrl)
return new SyncMapItemPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a SyncMapItemContext
*
- * @param string $key The key value of the Sync Map Item resource to fetch
- * @return \Twilio\Rest\Sync\V1\Service\SyncMap\SyncMapItemContext
+ * @param string $key The `key` value of the Sync Map Item resource to delete.
*/
- public function getContext($key)
+ public function getContext(
+ string $key
+
+ ): SyncMapItemContext
{
return new SyncMapItemContext(
$this->version,
@@ -195,8 +220,8 @@ public function getContext($key)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Sync.V1.SyncMapItemList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemOptions.php
index 676bd3a..473305e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemOptions.php
@@ -1,10 +1,16 @@
options['ttl'] = $ttl;
$this->options['itemTtl'] = $itemTtl;
$this->options['collectionTtl'] = $collectionTtl;
@@ -74,35 +129,34 @@ public function __construct($ttl = Values::NONE, $itemTtl = Values::NONE, $colle
/**
* An alias for `item_ttl`. If both parameters are provided, this value is ignored.
*
- * @param int $ttl An alias for item_ttl
+ * @param int $ttl An alias for `item_ttl`. If both parameters are provided, this value is ignored.
* @return $this Fluent Builder
*/
- public function setTtl($ttl)
+ public function setTtl(int $ttl): self
{
$this->options['ttl'] = $ttl;
return $this;
}
/**
- * How long, in seconds, before the Map Item expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Map Item does not expire. The Map Item will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion.
+ * How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Map Item expires (time-to-live) and is deleted.
*
- * @param int $itemTtl How long, in seconds, before the Map Item expires
+ * @param int $itemTtl How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Map Item expires (time-to-live) and is deleted.
* @return $this Fluent Builder
*/
- public function setItemTtl($itemTtl)
+ public function setItemTtl(int $itemTtl): self
{
$this->options['itemTtl'] = $itemTtl;
return $this;
}
/**
- * How long, in seconds, before the Map Item's parent Sync Map expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the parent Sync Map does not expire. The Sync Map will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion.
+ * How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Map Item's parent Sync Map expires (time-to-live) and is deleted.
*
- * @param int $collectionTtl How long, in seconds, before the Map Item's parent
- * Sync Map expires and is deleted
+ * @param int $collectionTtl How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Map Item's parent Sync Map expires (time-to-live) and is deleted.
* @return $this Fluent Builder
*/
- public function setCollectionTtl($collectionTtl)
+ public function setCollectionTtl(int $collectionTtl): self
{
$this->options['collectionTtl'] = $collectionTtl;
return $this;
@@ -113,28 +167,65 @@ public function setCollectionTtl($collectionTtl)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Sync.V1.CreateSyncMapItemOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Sync.V1.CreateSyncMapItemOptions ' . $options . ']';
}
}
-class ReadSyncMapItemOptions extends Options
-{
+class DeleteSyncMapItemOptions extends Options
+ {
+ /**
+ * @param string $ifMatch If provided, applies this mutation if (and only if) the “revision” field of this [map item] matches the provided value. This matches the semantics of (and is implemented with) the HTTP [If-Match header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match).
+ */
+ public function __construct(
+
+ string $ifMatch = Values::NONE
+
+ ) {
+ $this->options['ifMatch'] = $ifMatch;
+ }
+
+ /**
+ * If provided, applies this mutation if (and only if) the “revision” field of this [map item] matches the provided value. This matches the semantics of (and is implemented with) the HTTP [If-Match header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match).
+ *
+ * @param string $ifMatch If provided, applies this mutation if (and only if) the “revision” field of this [map item] matches the provided value. This matches the semantics of (and is implemented with) the HTTP [If-Match header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match).
+ * @return $this Fluent Builder
+ */
+ public function setIfMatch(string $ifMatch): self
+ {
+ $this->options['ifMatch'] = $ifMatch;
+ return $this;
+ }
+
/**
- * @param string $order How to order the Map Items returned by their key value
- * @param string $from The index of the first Sync Map Item resource to read
- * @param string $bounds Whether to include the Map Item referenced by the from
- * parameter
+ * Provide a friendly representation
+ *
+ * @return string Machine friendly representation
*/
- public function __construct($order = Values::NONE, $from = Values::NONE, $bounds = Values::NONE)
+ public function __toString(): string
{
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Sync.V1.DeleteSyncMapItemOptions ' . $options . ']';
+ }
+}
+
+
+class ReadSyncMapItemOptions extends Options
+ {
+ /**
+ * @param string $order How to order the Map Items returned by their `key` value. Can be: `asc` (ascending) or `desc` (descending) and the default is ascending. Map Items are [ordered lexicographically](https://en.wikipedia.org/wiki/Lexicographical_order) by Item key.
+ * @param string $from The `key` of the first Sync Map Item resource to read. See also `bounds`.
+ * @param string $bounds Whether to include the Map Item referenced by the `from` parameter. Can be: `inclusive` to include the Map Item referenced by the `from` parameter or `exclusive` to start with the next Map Item. The default value is `inclusive`.
+ */
+ public function __construct(
+
+ string $order = Values::NONE,
+ string $from = Values::NONE,
+ string $bounds = Values::NONE
+
+ ) {
$this->options['order'] = $order;
$this->options['from'] = $from;
$this->options['bounds'] = $bounds;
@@ -143,10 +234,10 @@ public function __construct($order = Values::NONE, $from = Values::NONE, $bounds
/**
* How to order the Map Items returned by their `key` value. Can be: `asc` (ascending) or `desc` (descending) and the default is ascending. Map Items are [ordered lexicographically](https://en.wikipedia.org/wiki/Lexicographical_order) by Item key.
*
- * @param string $order How to order the Map Items returned by their key value
+ * @param string $order How to order the Map Items returned by their `key` value. Can be: `asc` (ascending) or `desc` (descending) and the default is ascending. Map Items are [ordered lexicographically](https://en.wikipedia.org/wiki/Lexicographical_order) by Item key.
* @return $this Fluent Builder
*/
- public function setOrder($order)
+ public function setOrder(string $order): self
{
$this->options['order'] = $order;
return $this;
@@ -155,10 +246,10 @@ public function setOrder($order)
/**
* The `key` of the first Sync Map Item resource to read. See also `bounds`.
*
- * @param string $from The index of the first Sync Map Item resource to read
+ * @param string $from The `key` of the first Sync Map Item resource to read. See also `bounds`.
* @return $this Fluent Builder
*/
- public function setFrom($from)
+ public function setFrom(string $from): self
{
$this->options['from'] = $from;
return $this;
@@ -167,11 +258,10 @@ public function setFrom($from)
/**
* Whether to include the Map Item referenced by the `from` parameter. Can be: `inclusive` to include the Map Item referenced by the `from` parameter or `exclusive` to start with the next Map Item. The default value is `inclusive`.
*
- * @param string $bounds Whether to include the Map Item referenced by the from
- * parameter
+ * @param string $bounds Whether to include the Map Item referenced by the `from` parameter. Can be: `inclusive` to include the Map Item referenced by the `from` parameter or `exclusive` to start with the next Map Item. The default value is `inclusive`.
* @return $this Fluent Builder
*/
- public function setBounds($bounds)
+ public function setBounds(string $bounds): self
{
$this->options['bounds'] = $bounds;
return $this;
@@ -182,44 +272,45 @@ public function setBounds($bounds)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Sync.V1.ReadSyncMapItemOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Sync.V1.ReadSyncMapItemOptions ' . $options . ']';
}
}
class UpdateSyncMapItemOptions extends Options
-{
+ {
/**
- * @param array $data A JSON string that represents an arbitrary, schema-less
- * object that the Map Item stores
- * @param int $ttl An alias for item_ttl
- * @param int $itemTtl How long, in seconds, before the Map Item expires
- * @param int $collectionTtl How long, in seconds, before the Map Item's parent
- * Sync Map expires and is deleted
+ * @param array $data A JSON string that represents an arbitrary, schema-less object that the Map Item stores. Can be up to 16 KiB in length.
+ * @param int $ttl An alias for `item_ttl`. If both parameters are provided, this value is ignored.
+ * @param int $itemTtl How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Map Item expires (time-to-live) and is deleted.
+ * @param int $collectionTtl How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Map Item's parent Sync Map expires (time-to-live) and is deleted. This parameter can only be used when the Map Item's `data` or `ttl` is updated in the same request.
+ * @param string $ifMatch If provided, applies this mutation if (and only if) the “revision” field of this [map item] matches the provided value. This matches the semantics of (and is implemented with) the HTTP [If-Match header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match).
*/
- public function __construct($data = Values::NONE, $ttl = Values::NONE, $itemTtl = Values::NONE, $collectionTtl = Values::NONE)
- {
+ public function __construct(
+
+ array $data = Values::ARRAY_NONE,
+ int $ttl = Values::INT_NONE,
+ int $itemTtl = Values::INT_NONE,
+ int $collectionTtl = Values::INT_NONE,
+ string $ifMatch = Values::NONE
+
+ ) {
$this->options['data'] = $data;
$this->options['ttl'] = $ttl;
$this->options['itemTtl'] = $itemTtl;
$this->options['collectionTtl'] = $collectionTtl;
+ $this->options['ifMatch'] = $ifMatch;
}
/**
- * A JSON string that represents an arbitrary, schema-less object that the Map Item stores. Can be up to 16KB in length.
+ * A JSON string that represents an arbitrary, schema-less object that the Map Item stores. Can be up to 16 KiB in length.
*
- * @param array $data A JSON string that represents an arbitrary, schema-less
- * object that the Map Item stores
+ * @param array $data A JSON string that represents an arbitrary, schema-less object that the Map Item stores. Can be up to 16 KiB in length.
* @return $this Fluent Builder
*/
- public function setData($data)
+ public function setData(array $data): self
{
$this->options['data'] = $data;
return $this;
@@ -228,53 +319,60 @@ public function setData($data)
/**
* An alias for `item_ttl`. If both parameters are provided, this value is ignored.
*
- * @param int $ttl An alias for item_ttl
+ * @param int $ttl An alias for `item_ttl`. If both parameters are provided, this value is ignored.
* @return $this Fluent Builder
*/
- public function setTtl($ttl)
+ public function setTtl(int $ttl): self
{
$this->options['ttl'] = $ttl;
return $this;
}
/**
- * How long, in seconds, before the Map Item expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Map Item does not expire. The Map Item will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion.
+ * How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Map Item expires (time-to-live) and is deleted.
*
- * @param int $itemTtl How long, in seconds, before the Map Item expires
+ * @param int $itemTtl How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Map Item expires (time-to-live) and is deleted.
* @return $this Fluent Builder
*/
- public function setItemTtl($itemTtl)
+ public function setItemTtl(int $itemTtl): self
{
$this->options['itemTtl'] = $itemTtl;
return $this;
}
/**
- * How long, in seconds, before the Map Item's parent Sync Map expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the parent Sync Map does not expire. This parameter can only be used when the Map Item's `data` or `ttl` is updated in the same request. The Sync Map will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion.
+ * How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Map Item's parent Sync Map expires (time-to-live) and is deleted. This parameter can only be used when the Map Item's `data` or `ttl` is updated in the same request.
*
- * @param int $collectionTtl How long, in seconds, before the Map Item's parent
- * Sync Map expires and is deleted
+ * @param int $collectionTtl How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Map Item's parent Sync Map expires (time-to-live) and is deleted. This parameter can only be used when the Map Item's `data` or `ttl` is updated in the same request.
* @return $this Fluent Builder
*/
- public function setCollectionTtl($collectionTtl)
+ public function setCollectionTtl(int $collectionTtl): self
{
$this->options['collectionTtl'] = $collectionTtl;
return $this;
}
+ /**
+ * If provided, applies this mutation if (and only if) the “revision” field of this [map item] matches the provided value. This matches the semantics of (and is implemented with) the HTTP [If-Match header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match).
+ *
+ * @param string $ifMatch If provided, applies this mutation if (and only if) the “revision” field of this [map item] matches the provided value. This matches the semantics of (and is implemented with) the HTTP [If-Match header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match).
+ * @return $this Fluent Builder
+ */
+ public function setIfMatch(string $ifMatch): self
+ {
+ $this->options['ifMatch'] = $ifMatch;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Sync.V1.UpdateSyncMapItemOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Sync.V1.UpdateSyncMapItemOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemPage.php
index e88c233..7df0d29 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapItemPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return SyncMapItemInstance \Twilio\Rest\Sync\V1\Service\SyncMap\SyncMapItemInstance
+ */
+ public function buildInstance(array $payload): SyncMapItemInstance
{
- return new SyncMapItemInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['mapSid']
- );
+ return new SyncMapItemInstance($this->version, $payload, $this->solution['serviceSid'], $this->solution['mapSid']);
}
/**
@@ -39,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Sync.V1.SyncMapItemPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionContext.php
index 48462de..6734c61 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionContext.php
@@ -2,62 +2,87 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Sync
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Sync\V1\Service\SyncMap;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
class SyncMapPermissionContext extends InstanceContext
-{
+ {
/**
* Initialize the SyncMapPermissionContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Sync Service with the Sync Map
- * Permission resource to fetch
- * @param string $mapSid The SID of the Sync Map with the Sync Map Permission
- * resource to fetch
- * @param string $identity The application-defined string that uniquely
- * identifies the User's Sync Map Permission resource
- * to fetch
- * @return \Twilio\Rest\Sync\V1\Service\SyncMap\SyncMapPermissionContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Map Permission resource to delete. Can be the Service's `sid` value or `default`.
+ * @param string $mapSid The SID of the Sync Map with the Sync Map Permission resource to delete. Can be the Sync Map resource's `sid` or its `unique_name`.
+ * @param string $identity The application-defined string that uniquely identifies the User's Sync Map Permission resource to delete.
*/
- public function __construct(Version $version, $serviceSid, $mapSid, $identity)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $mapSid,
+ $identity
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'mapSid' => $mapSid, 'identity' => $identity,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'mapSid' =>
+ $mapSid,
+ 'identity' =>
+ $identity,
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Maps/' . \rawurlencode($mapSid)
+ .'/Permissions/' . \rawurlencode($identity)
+ .'';
+ }
+
+ /**
+ * Delete the SyncMapPermissionInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Maps/' . \rawurlencode($mapSid) . '/Permissions/' . \rawurlencode($identity) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a SyncMapPermissionInstance
+ * Fetch the SyncMapPermissionInstance
*
* @return SyncMapPermissionInstance Fetched SyncMapPermissionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): SyncMapPermissionInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new SyncMapPermissionInstance(
$this->version,
@@ -68,40 +93,30 @@ public function fetch()
);
}
- /**
- * Deletes the SyncMapPermissionInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Update the SyncMapPermissionInstance
*
- * @param bool $read Read access
- * @param bool $write Write access
- * @param bool $manage Manage access
+ * @param bool $read Whether the identity can read the Sync Map and its Items. Default value is `false`.
+ * @param bool $write Whether the identity can create, update, and delete Items in the Sync Map. Default value is `false`.
+ * @param bool $manage Whether the identity can delete the Sync Map. Default value is `false`.
* @return SyncMapPermissionInstance Updated SyncMapPermissionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($read, $write, $manage)
+ public function update(bool $read, bool $write, bool $manage): SyncMapPermissionInstance
{
- $data = Values::of(array(
- 'Read' => Serialize::booleanToString($read),
- 'Write' => Serialize::booleanToString($write),
- 'Manage' => Serialize::booleanToString($manage),
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+
+ $data = Values::of([
+ 'Read' =>
+ Serialize::booleanToString($read),
+ 'Write' =>
+ Serialize::booleanToString($write),
+ 'Manage' =>
+ Serialize::booleanToString($manage),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new SyncMapPermissionInstance(
$this->version,
@@ -112,17 +127,18 @@ public function update($read, $write, $manage)
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Sync.V1.SyncMapPermissionContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionInstance.php
index 1afd766..17a3990 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Sync
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Sync\V1\Service\SyncMap;
use Twilio\Exceptions\TwilioException;
@@ -14,39 +22,34 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $mapSid
- * @property string $identity
- * @property bool $read
- * @property bool $write
- * @property bool $manage
- * @property string $url
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $mapSid
+ * @property string|null $identity
+ * @property bool|null $read
+ * @property bool|null $write
+ * @property bool|null $manage
+ * @property string|null $url
*/
class SyncMapPermissionInstance extends InstanceResource
{
/**
* Initialize the SyncMapPermissionInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Sync Service that the resource is
- * associated with
- * @param string $mapSid Sync Map SID
- * @param string $identity The application-defined string that uniquely
- * identifies the User's Sync Map Permission resource
- * to fetch
- * @return \Twilio\Rest\Sync\V1\Service\SyncMap\SyncMapPermissionInstance
+ * @param string $serviceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Map Permission resource to delete. Can be the Service's `sid` value or `default`.
+ * @param string $mapSid The SID of the Sync Map with the Sync Map Permission resource to delete. Can be the Sync Map resource's `sid` or its `unique_name`.
+ * @param string $identity The application-defined string that uniquely identifies the User's Sync Map Permission resource to delete.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $mapSid, $identity = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $mapSid, string $identity = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
'mapSid' => Values::array_get($payload, 'map_sid'),
@@ -55,22 +58,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $mapS
'write' => Values::array_get($payload, 'write'),
'manage' => Values::array_get($payload, 'manage'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'mapSid' => $mapSid,
- 'identity' => $identity ?: $this->properties['identity'],
- );
+ $this->solution = ['serviceSid' => $serviceSid, 'mapSid' => $mapSid, 'identity' => $identity ?: $this->properties['identity'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Sync\V1\Service\SyncMap\SyncMapPermissionContext Context for this SyncMapPermissionInstance
+ * @return SyncMapPermissionContext Context for this SyncMapPermissionInstance
*/
- protected function proxy()
+ protected function proxy(): SyncMapPermissionContext
{
if (!$this->context) {
$this->context = new SyncMapPermissionContext(
@@ -85,38 +84,41 @@ protected function proxy()
}
/**
- * Fetch a SyncMapPermissionInstance
+ * Delete the SyncMapPermissionInstance
*
- * @return SyncMapPermissionInstance Fetched SyncMapPermissionInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the SyncMapPermissionInstance
+ * Fetch the SyncMapPermissionInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return SyncMapPermissionInstance Fetched SyncMapPermissionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): SyncMapPermissionInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
* Update the SyncMapPermissionInstance
*
- * @param bool $read Read access
- * @param bool $write Write access
- * @param bool $manage Manage access
+ * @param bool $read Whether the identity can read the Sync Map and its Items. Default value is `false`.
+ * @param bool $write Whether the identity can create, update, and delete Items in the Sync Map. Default value is `false`.
+ * @param bool $manage Whether the identity can delete the Sync Map. Default value is `false`.
* @return SyncMapPermissionInstance Updated SyncMapPermissionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($read, $write, $manage)
+ public function update(bool $read, bool $write, bool $manage): SyncMapPermissionInstance
{
+
return $this->proxy()->update($read, $write, $manage);
}
@@ -127,7 +129,7 @@ public function update($read, $write, $manage)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -146,12 +148,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Sync.V1.SyncMapPermissionInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionList.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionList.php
index 9b7b64b..77005c5 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionList.php
@@ -2,39 +2,75 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Sync
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Sync\V1\Service\SyncMap;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
+
class SyncMapPermissionList extends ListResource
-{
+ {
/**
* Construct the SyncMapPermissionList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Sync Service that the resource is
- * associated with
- * @param string $mapSid Sync Map SID
- * @return \Twilio\Rest\Sync\V1\Service\SyncMap\SyncMapPermissionList
+ * @param string $serviceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) with the Sync Map Permission resource to delete. Can be the Service's `sid` value or `default`.
+ * @param string $mapSid The SID of the Sync Map with the Sync Map Permission resource to delete. Can be the Sync Map resource's `sid` or its `unique_name`.
*/
- public function __construct(Version $version, $serviceSid, $mapSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid,
+ string $mapSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'mapSid' => $mapSid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ 'mapSid' =>
+ $mapSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Maps/' . \rawurlencode($mapSid)
+ .'/Permissions';
+ }
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Maps/' . \rawurlencode($mapSid) . '/Permissions';
+ /**
+ * Reads SyncMapPermissionInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return SyncMapPermissionInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -53,9 +89,9 @@ public function __construct(Version $version, $serviceSid, $mapSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -64,26 +100,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads SyncMapPermissionInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return SyncMapPermissionInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of SyncMapPermissionInstance records from the API.
* Request is executed immediately
@@ -91,21 +107,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of SyncMapPermissionInstance
+ * @return SyncMapPermissionPage Page of SyncMapPermissionInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): SyncMapPermissionPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new SyncMapPermissionPage($this->version, $response, $this->solution);
}
@@ -115,9 +132,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of SyncMapPermissionInstance
+ * @return SyncMapPermissionPage Page of SyncMapPermissionInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): SyncMapPermissionPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -127,15 +144,16 @@ public function getPage($targetUrl)
return new SyncMapPermissionPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a SyncMapPermissionContext
*
- * @param string $identity The application-defined string that uniquely
- * identifies the User's Sync Map Permission resource
- * to fetch
- * @return \Twilio\Rest\Sync\V1\Service\SyncMap\SyncMapPermissionContext
+ * @param string $identity The application-defined string that uniquely identifies the User's Sync Map Permission resource to delete.
*/
- public function getContext($identity)
+ public function getContext(
+ string $identity
+
+ ): SyncMapPermissionContext
{
return new SyncMapPermissionContext(
$this->version,
@@ -150,8 +168,8 @@ public function getContext($identity)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Sync.V1.SyncMapPermissionList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionPage.php
index 77e38c4..36d2641 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return SyncMapPermissionInstance \Twilio\Rest\Sync\V1\Service\SyncMap\SyncMapPermissionInstance
+ */
+ public function buildInstance(array $payload): SyncMapPermissionInstance
{
- return new SyncMapPermissionInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['mapSid']
- );
+ return new SyncMapPermissionInstance($this->version, $payload, $this->solution['serviceSid'], $this->solution['mapSid']);
}
/**
@@ -39,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Sync.V1.SyncMapPermissionPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMapContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMapContext.php
index 36bf5f3..598779b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMapContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMapContext.php
@@ -2,68 +2,94 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Sync
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Sync\V1\Service;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Sync\V1\Service\SyncMap\SyncMapItemList;
-use Twilio\Rest\Sync\V1\Service\SyncMap\SyncMapPermissionList;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Sync\V1\Service\SyncMap\SyncMapItemList;
+use Twilio\Rest\Sync\V1\Service\SyncMap\SyncMapPermissionList;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property \Twilio\Rest\Sync\V1\Service\SyncMap\SyncMapItemList $syncMapItems
- * @property \Twilio\Rest\Sync\V1\Service\SyncMap\SyncMapPermissionList $syncMapPermissions
+ * @property SyncMapItemList $syncMapItems
+ * @property SyncMapPermissionList $syncMapPermissions
* @method \Twilio\Rest\Sync\V1\Service\SyncMap\SyncMapItemContext syncMapItems(string $key)
* @method \Twilio\Rest\Sync\V1\Service\SyncMap\SyncMapPermissionContext syncMapPermissions(string $identity)
*/
class SyncMapContext extends InstanceContext
-{
- protected $_syncMapItems = null;
- protected $_syncMapPermissions = null;
+ {
+ protected $_syncMapItems;
+ protected $_syncMapPermissions;
/**
* Initialize the SyncMapContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Sync Service with the Sync Map
- * resource to fetch
- * @param string $sid The SID of the Sync Map resource to fetch
- * @return \Twilio\Rest\Sync\V1\Service\SyncMapContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) to create the Sync Map in.
+ * @param string $sid The SID of the Sync Map resource to delete. Can be the Sync Map's `sid` or its `unique_name`.
*/
- public function __construct(Version $version, $serviceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Maps/' . \rawurlencode($sid)
+ .'';
+ }
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Maps/' . \rawurlencode($sid) . '';
+ /**
+ * Delete the SyncMapInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a SyncMapInstance
+ * Fetch the SyncMapInstance
*
* @return SyncMapInstance Fetched SyncMapInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): SyncMapInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new SyncMapInstance(
$this->version,
@@ -73,16 +99,6 @@ public function fetch()
);
}
- /**
- * Deletes the SyncMapInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Update the SyncMapInstance
@@ -91,18 +107,20 @@ public function delete()
* @return SyncMapInstance Updated SyncMapInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): SyncMapInstance
{
+
$options = new Values($options);
- $data = Values::of(array('Ttl' => $options['ttl'], 'CollectionTtl' => $options['collectionTtl'],));
+ $data = Values::of([
+ 'Ttl' =>
+ $options['ttl'],
+ 'CollectionTtl' =>
+ $options['collectionTtl'],
+ ]);
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new SyncMapInstance(
$this->version,
@@ -112,12 +130,11 @@ public function update($options = array())
);
}
+
/**
* Access the syncMapItems
- *
- * @return \Twilio\Rest\Sync\V1\Service\SyncMap\SyncMapItemList
*/
- protected function getSyncMapItems()
+ protected function getSyncMapItems(): SyncMapItemList
{
if (!$this->_syncMapItems) {
$this->_syncMapItems = new SyncMapItemList(
@@ -132,10 +149,8 @@ protected function getSyncMapItems()
/**
* Access the syncMapPermissions
- *
- * @return \Twilio\Rest\Sync\V1\Service\SyncMap\SyncMapPermissionList
*/
- protected function getSyncMapPermissions()
+ protected function getSyncMapPermissions(): SyncMapPermissionList
{
if (!$this->_syncMapPermissions) {
$this->_syncMapPermissions = new SyncMapPermissionList(
@@ -152,10 +167,10 @@ protected function getSyncMapPermissions()
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -170,10 +185,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -188,12 +203,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Sync.V1.SyncMapContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMapInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMapInstance.php
index 2094ee5..be58125 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMapInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMapInstance.php
@@ -2,56 +2,63 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Sync
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Sync\V1\Service;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Sync\V1\Service\SyncMap\SyncMapItemList;
+use Twilio\Rest\Sync\V1\Service\SyncMap\SyncMapPermissionList;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property string $sid
- * @property string $uniqueName
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $url
- * @property array $links
- * @property string $revision
- * @property \DateTime $dateExpires
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $createdBy
+ * @property string|null $sid
+ * @property string|null $uniqueName
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $url
+ * @property array|null $links
+ * @property string|null $revision
+ * @property \DateTime|null $dateExpires
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $createdBy
*/
class SyncMapInstance extends InstanceResource
{
- protected $_syncMapItems = null;
- protected $_syncMapPermissions = null;
+ protected $_syncMapItems;
+ protected $_syncMapPermissions;
/**
* Initialize the SyncMapInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Sync Service that the resource is
- * associated with
- * @param string $sid The SID of the Sync Map resource to fetch
- * @return \Twilio\Rest\Sync\V1\Service\SyncMapInstance
+ * @param string $serviceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) to create the Sync Map in.
+ * @param string $sid The SID of the Sync Map resource to delete. Can be the Sync Map's `sid` or its `unique_name`.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'uniqueName' => Values::array_get($payload, 'unique_name'),
'accountSid' => Values::array_get($payload, 'account_sid'),
@@ -63,19 +70,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $sid
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'createdBy' => Values::array_get($payload, 'created_by'),
- );
+ ];
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Sync\V1\Service\SyncMapContext Context for this
- * SyncMapInstance
+ * @return SyncMapContext Context for this SyncMapInstance
*/
- protected function proxy()
+ protected function proxy(): SyncMapContext
{
if (!$this->context) {
$this->context = new SyncMapContext(
@@ -89,25 +95,27 @@ protected function proxy()
}
/**
- * Fetch a SyncMapInstance
+ * Delete the SyncMapInstance
*
- * @return SyncMapInstance Fetched SyncMapInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the SyncMapInstance
+ * Fetch the SyncMapInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return SyncMapInstance Fetched SyncMapInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): SyncMapInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -117,27 +125,24 @@ public function delete()
* @return SyncMapInstance Updated SyncMapInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): SyncMapInstance
{
+
return $this->proxy()->update($options);
}
/**
* Access the syncMapItems
- *
- * @return \Twilio\Rest\Sync\V1\Service\SyncMap\SyncMapItemList
*/
- protected function getSyncMapItems()
+ protected function getSyncMapItems(): SyncMapItemList
{
return $this->proxy()->syncMapItems;
}
/**
* Access the syncMapPermissions
- *
- * @return \Twilio\Rest\Sync\V1\Service\SyncMap\SyncMapPermissionList
*/
- protected function getSyncMapPermissions()
+ protected function getSyncMapPermissions(): SyncMapPermissionList
{
return $this->proxy()->syncMapPermissions;
}
@@ -149,7 +154,7 @@ protected function getSyncMapPermissions()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -168,12 +173,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Sync.V1.SyncMapInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMapList.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMapList.php
index 93aea62..b4930ad 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMapList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMapList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Sync
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Sync\V1\Service;
@@ -12,57 +19,86 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
+
class SyncMapList extends ListResource
-{
+ {
/**
* Construct the SyncMapList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Sync Service that the resource is
- * associated with
- * @return \Twilio\Rest\Sync\V1\Service\SyncMapList
+ * @param string $serviceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) to create the Sync Map in.
*/
- public function __construct(Version $version, $serviceSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Maps';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Maps';
}
/**
- * Create a new SyncMapInstance
+ * Create the SyncMapInstance
*
* @param array|Options $options Optional Arguments
- * @return SyncMapInstance Newly created SyncMapInstance
+ * @return SyncMapInstance Created SyncMapInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($options = array())
+ public function create(array $options = []): SyncMapInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'UniqueName' => $options['uniqueName'],
- 'Ttl' => $options['ttl'],
- 'CollectionTtl' => $options['collectionTtl'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'UniqueName' =>
+ $options['uniqueName'],
+ 'Ttl' =>
+ $options['ttl'],
+ 'CollectionTtl' =>
+ $options['collectionTtl'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new SyncMapInstance(
+ $this->version,
+ $payload,
+ $this->solution['serviceSid']
);
+ }
+
- return new SyncMapInstance($this->version, $payload, $this->solution['serviceSid']);
+ /**
+ * Reads SyncMapInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return SyncMapInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -81,9 +117,9 @@ public function create($options = array())
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -92,26 +128,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads SyncMapInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return SyncMapInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of SyncMapInstance records from the API.
* Request is executed immediately
@@ -119,21 +135,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of SyncMapInstance
+ * @return SyncMapPage Page of SyncMapInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): SyncMapPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new SyncMapPage($this->version, $response, $this->solution);
}
@@ -143,9 +160,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of SyncMapInstance
+ * @return SyncMapPage Page of SyncMapInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): SyncMapPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -155,15 +172,22 @@ public function getPage($targetUrl)
return new SyncMapPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a SyncMapContext
*
- * @param string $sid The SID of the Sync Map resource to fetch
- * @return \Twilio\Rest\Sync\V1\Service\SyncMapContext
+ * @param string $sid The SID of the Sync Map resource to delete. Can be the Sync Map's `sid` or its `unique_name`.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): SyncMapContext
{
- return new SyncMapContext($this->version, $this->solution['serviceSid'], $sid);
+ return new SyncMapContext(
+ $this->version,
+ $this->solution['serviceSid'],
+ $sid
+ );
}
/**
@@ -171,8 +195,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Sync.V1.SyncMapList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMapOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMapOptions.php
index 4dbfefe..7655584 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMapOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMapOptions.php
@@ -1,10 +1,16 @@
options['uniqueName'] = $uniqueName;
$this->options['ttl'] = $ttl;
$this->options['collectionTtl'] = $collectionTtl;
@@ -61,11 +86,10 @@ public function __construct($uniqueName = Values::NONE, $ttl = Values::NONE, $co
/**
* An application-defined string that uniquely identifies the resource. It can be used as an alternative to the `sid` in the URL path to address the resource.
*
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the resource
+ * @param string $uniqueName An application-defined string that uniquely identifies the resource. It can be used as an alternative to the `sid` in the URL path to address the resource.
* @return $this Fluent Builder
*/
- public function setUniqueName($uniqueName)
+ public function setUniqueName(string $uniqueName): self
{
$this->options['uniqueName'] = $uniqueName;
return $this;
@@ -74,23 +98,22 @@ public function setUniqueName($uniqueName)
/**
* An alias for `collection_ttl`. If both parameters are provided, this value is ignored.
*
- * @param int $ttl An alias for collection_ttl
+ * @param int $ttl An alias for `collection_ttl`. If both parameters are provided, this value is ignored.
* @return $this Fluent Builder
*/
- public function setTtl($ttl)
+ public function setTtl(int $ttl): self
{
$this->options['ttl'] = $ttl;
return $this;
}
/**
- * How long, in seconds, before the Sync Map expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Sync Map does not expire. The Sync Map will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion.
+ * How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Sync Map expires (time-to-live) and is deleted.
*
- * @param int $collectionTtl How long, in seconds, before the Sync Map expires
- * and is deleted
+ * @param int $collectionTtl How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Sync Map expires (time-to-live) and is deleted.
* @return $this Fluent Builder
*/
- public function setCollectionTtl($collectionTtl)
+ public function setCollectionTtl(int $collectionTtl): self
{
$this->options['collectionTtl'] = $collectionTtl;
return $this;
@@ -101,27 +124,28 @@ public function setCollectionTtl($collectionTtl)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Sync.V1.CreateSyncMapOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Sync.V1.CreateSyncMapOptions ' . $options . ']';
}
}
+
+
+
class UpdateSyncMapOptions extends Options
-{
+ {
/**
- * @param int $ttl An alias for collection_ttl
- * @param int $collectionTtl How long, in seconds, before the Sync Map expires
- * and is deleted
+ * @param int $ttl An alias for `collection_ttl`. If both parameters are provided, this value is ignored.
+ * @param int $collectionTtl How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Sync Map expires (time-to-live) and is deleted.
*/
- public function __construct($ttl = Values::NONE, $collectionTtl = Values::NONE)
- {
+ public function __construct(
+
+ int $ttl = Values::INT_NONE,
+ int $collectionTtl = Values::INT_NONE
+
+ ) {
$this->options['ttl'] = $ttl;
$this->options['collectionTtl'] = $collectionTtl;
}
@@ -129,23 +153,22 @@ public function __construct($ttl = Values::NONE, $collectionTtl = Values::NONE)
/**
* An alias for `collection_ttl`. If both parameters are provided, this value is ignored.
*
- * @param int $ttl An alias for collection_ttl
+ * @param int $ttl An alias for `collection_ttl`. If both parameters are provided, this value is ignored.
* @return $this Fluent Builder
*/
- public function setTtl($ttl)
+ public function setTtl(int $ttl): self
{
$this->options['ttl'] = $ttl;
return $this;
}
/**
- * How long, in seconds, before the Sync Map expires (time-to-live) and is deleted. Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Sync Map does not expire. The Sync Map will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion.
+ * How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Sync Map expires (time-to-live) and is deleted.
*
- * @param int $collectionTtl How long, in seconds, before the Sync Map expires
- * and is deleted
+ * @param int $collectionTtl How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Sync Map expires (time-to-live) and is deleted.
* @return $this Fluent Builder
*/
- public function setCollectionTtl($collectionTtl)
+ public function setCollectionTtl(int $collectionTtl): self
{
$this->options['collectionTtl'] = $collectionTtl;
return $this;
@@ -156,14 +179,10 @@ public function setCollectionTtl($collectionTtl)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Sync.V1.UpdateSyncMapOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Sync.V1.UpdateSyncMapOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMapPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMapPage.php
index 5ee4dd3..4c58f69 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMapPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncMapPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return SyncMapInstance \Twilio\Rest\Sync\V1\Service\SyncMapInstance
+ */
+ public function buildInstance(array $payload): SyncMapInstance
{
return new SyncMapInstance($this->version, $payload, $this->solution['serviceSid']);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Sync.V1.SyncMapPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncStream/StreamMessageInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncStream/StreamMessageInstance.php
index 2bd91f0..56a8b33 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncStream/StreamMessageInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncStream/StreamMessageInstance.php
@@ -2,47 +2,53 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Sync
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Sync\V1\Service\SyncStream;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property string $sid
- * @property array $data
+ * @property string|null $sid
+ * @property array|null $data
*/
class StreamMessageInstance extends InstanceResource
{
/**
* Initialize the StreamMessageInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Sync Service that the resource is
- * associated with
- * @param string $streamSid The unique string that identifies the resource
- * @return \Twilio\Rest\Sync\V1\Service\SyncStream\StreamMessageInstance
+ * @param string $serviceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) to create the new Stream Message in.
+ * @param string $streamSid The SID of the Sync Stream to create the new Stream Message resource for.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $streamSid)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $streamSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'data' => Values::array_get($payload, 'data'),
- );
+ ];
- $this->solution = array('serviceSid' => $serviceSid, 'streamSid' => $streamSid,);
+ $this->solution = ['serviceSid' => $serviceSid, 'streamSid' => $streamSid, ];
}
/**
@@ -52,7 +58,7 @@ public function __construct(Version $version, array $payload, $serviceSid, $stre
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -71,8 +77,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Sync.V1.StreamMessageInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncStream/StreamMessageList.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncStream/StreamMessageList.php
index 77afe81..b78228e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncStream/StreamMessageList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncStream/StreamMessageList.php
@@ -2,61 +2,76 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Sync
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Sync\V1\Service\SyncStream;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
class StreamMessageList extends ListResource
-{
+ {
/**
* Construct the StreamMessageList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Sync Service that the resource is
- * associated with
- * @param string $streamSid The unique string that identifies the resource
- * @return \Twilio\Rest\Sync\V1\Service\SyncStream\StreamMessageList
+ * @param string $serviceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) to create the new Stream Message in.
+ * @param string $streamSid The SID of the Sync Stream to create the new Stream Message resource for.
*/
- public function __construct(Version $version, $serviceSid, $streamSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid,
+ string $streamSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'streamSid' => $streamSid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ 'streamSid' =>
+ $streamSid,
+
+ ];
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Streams/' . \rawurlencode($streamSid) . '/Messages';
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Streams/' . \rawurlencode($streamSid)
+ .'/Messages';
}
/**
- * Create a new StreamMessageInstance
+ * Create the StreamMessageInstance
*
- * @param array $data A JSON string that represents an arbitrary, schema-less
- * object that makes up the Stream Message body
- * @return StreamMessageInstance Newly created StreamMessageInstance
+ * @param array $data A JSON string that represents an arbitrary, schema-less object that makes up the Stream Message body. Can be up to 4 KiB in length.
+ * @return StreamMessageInstance Created StreamMessageInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($data)
+ public function create(array $data): StreamMessageInstance
{
- $data = Values::of(array('Data' => Serialize::jsonObject($data),));
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'Data' =>
+ Serialize::jsonObject($data),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
return new StreamMessageInstance(
$this->version,
@@ -66,13 +81,14 @@ public function create($data)
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Sync.V1.StreamMessageList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncStream/StreamMessagePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncStream/StreamMessagePage.php
index f4b81d1..e1e9d02 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncStream/StreamMessagePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncStream/StreamMessagePage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return StreamMessageInstance \Twilio\Rest\Sync\V1\Service\SyncStream\StreamMessageInstance
+ */
+ public function buildInstance(array $payload): StreamMessageInstance
{
- return new StreamMessageInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['streamSid']
- );
+ return new StreamMessageInstance($this->version, $payload, $this->solution['serviceSid'], $this->solution['streamSid']);
}
/**
@@ -39,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Sync.V1.StreamMessagePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncStreamContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncStreamContext.php
index 89621e6..47d71bc 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncStreamContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncStreamContext.php
@@ -2,63 +2,90 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Sync
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Sync\V1\Service;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Sync\V1\Service\SyncStream\StreamMessageList;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Sync\V1\Service\SyncStream\StreamMessageList;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property \Twilio\Rest\Sync\V1\Service\SyncStream\StreamMessageList $streamMessages
+ * @property StreamMessageList $streamMessages
*/
class SyncStreamContext extends InstanceContext
-{
- protected $_streamMessages = null;
+ {
+ protected $_streamMessages;
/**
* Initialize the SyncStreamContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Sync Service with the Sync Stream
- * resource to fetch
- * @param string $sid The SID of the Stream resource to fetch
- * @return \Twilio\Rest\Sync\V1\Service\SyncStreamContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) to create the new Stream in.
+ * @param string $sid The SID of the Stream resource to delete.
*/
- public function __construct(Version $version, $serviceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Streams/' . \rawurlencode($sid)
+ .'';
+ }
+
+ /**
+ * Delete the SyncStreamInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Streams/' . \rawurlencode($sid) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a SyncStreamInstance
+ * Fetch the SyncStreamInstance
*
* @return SyncStreamInstance Fetched SyncStreamInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): SyncStreamInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new SyncStreamInstance(
$this->version,
@@ -68,16 +95,6 @@ public function fetch()
);
}
- /**
- * Deletes the SyncStreamInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Update the SyncStreamInstance
@@ -86,18 +103,18 @@ public function delete()
* @return SyncStreamInstance Updated SyncStreamInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): SyncStreamInstance
{
+
$options = new Values($options);
- $data = Values::of(array('Ttl' => $options['ttl'],));
+ $data = Values::of([
+ 'Ttl' =>
+ $options['ttl'],
+ ]);
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new SyncStreamInstance(
$this->version,
@@ -107,12 +124,11 @@ public function update($options = array())
);
}
+
/**
* Access the streamMessages
- *
- * @return \Twilio\Rest\Sync\V1\Service\SyncStream\StreamMessageList
*/
- protected function getStreamMessages()
+ protected function getStreamMessages(): StreamMessageList
{
if (!$this->_streamMessages) {
$this->_streamMessages = new StreamMessageList(
@@ -129,10 +145,10 @@ protected function getStreamMessages()
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -147,10 +163,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -165,12 +181,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Sync.V1.SyncStreamContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncStreamInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncStreamInstance.php
index 781bb5c..04ef763 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncStreamInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncStreamInstance.php
@@ -2,54 +2,61 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Sync
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Sync\V1\Service;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Sync\V1\Service\SyncStream\StreamMessageList;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property string $sid
- * @property string $uniqueName
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $url
- * @property array $links
- * @property \DateTime $dateExpires
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $createdBy
+ * @property string|null $sid
+ * @property string|null $uniqueName
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $url
+ * @property array|null $links
+ * @property \DateTime|null $dateExpires
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $createdBy
*/
class SyncStreamInstance extends InstanceResource
{
- protected $_streamMessages = null;
+ protected $_streamMessages;
/**
* Initialize the SyncStreamInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Sync Service that the resource is
- * associated with
- * @param string $sid The SID of the Stream resource to fetch
- * @return \Twilio\Rest\Sync\V1\Service\SyncStreamInstance
+ * @param string $serviceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) to create the new Stream in.
+ * @param string $sid The SID of the Stream resource to delete.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'uniqueName' => Values::array_get($payload, 'unique_name'),
'accountSid' => Values::array_get($payload, 'account_sid'),
@@ -60,19 +67,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $sid
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'createdBy' => Values::array_get($payload, 'created_by'),
- );
+ ];
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Sync\V1\Service\SyncStreamContext Context for this
- * SyncStreamInstance
+ * @return SyncStreamContext Context for this SyncStreamInstance
*/
- protected function proxy()
+ protected function proxy(): SyncStreamContext
{
if (!$this->context) {
$this->context = new SyncStreamContext(
@@ -86,25 +92,27 @@ protected function proxy()
}
/**
- * Fetch a SyncStreamInstance
+ * Delete the SyncStreamInstance
*
- * @return SyncStreamInstance Fetched SyncStreamInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the SyncStreamInstance
+ * Fetch the SyncStreamInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return SyncStreamInstance Fetched SyncStreamInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): SyncStreamInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -114,17 +122,16 @@ public function delete()
* @return SyncStreamInstance Updated SyncStreamInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): SyncStreamInstance
{
+
return $this->proxy()->update($options);
}
/**
* Access the streamMessages
- *
- * @return \Twilio\Rest\Sync\V1\Service\SyncStream\StreamMessageList
*/
- protected function getStreamMessages()
+ protected function getStreamMessages(): StreamMessageList
{
return $this->proxy()->streamMessages;
}
@@ -136,7 +143,7 @@ protected function getStreamMessages()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -155,12 +162,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Sync.V1.SyncStreamInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncStreamList.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncStreamList.php
index 39584b3..987ff58 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncStreamList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncStreamList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Sync
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Sync\V1\Service;
@@ -12,53 +19,84 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
+
class SyncStreamList extends ListResource
-{
+ {
/**
* Construct the SyncStreamList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Sync Service that the resource is
- * associated with
- * @return \Twilio\Rest\Sync\V1\Service\SyncStreamList
+ * @param string $serviceSid The SID of the [Sync Service](https://www.twilio.com/docs/sync/api/service) to create the new Stream in.
*/
- public function __construct(Version $version, $serviceSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Streams';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Streams';
}
/**
- * Create a new SyncStreamInstance
+ * Create the SyncStreamInstance
*
* @param array|Options $options Optional Arguments
- * @return SyncStreamInstance Newly created SyncStreamInstance
+ * @return SyncStreamInstance Created SyncStreamInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($options = array())
+ public function create(array $options = []): SyncStreamInstance
{
+
$options = new Values($options);
- $data = Values::of(array('UniqueName' => $options['uniqueName'], 'Ttl' => $options['ttl'],));
+ $data = Values::of([
+ 'UniqueName' =>
+ $options['uniqueName'],
+ 'Ttl' =>
+ $options['ttl'],
+ ]);
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new SyncStreamInstance(
+ $this->version,
+ $payload,
+ $this->solution['serviceSid']
);
+ }
+
- return new SyncStreamInstance($this->version, $payload, $this->solution['serviceSid']);
+ /**
+ * Reads SyncStreamInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return SyncStreamInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -77,9 +115,9 @@ public function create($options = array())
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -88,26 +126,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads SyncStreamInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return SyncStreamInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of SyncStreamInstance records from the API.
* Request is executed immediately
@@ -115,21 +133,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of SyncStreamInstance
+ * @return SyncStreamPage Page of SyncStreamInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): SyncStreamPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new SyncStreamPage($this->version, $response, $this->solution);
}
@@ -139,9 +158,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of SyncStreamInstance
+ * @return SyncStreamPage Page of SyncStreamInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): SyncStreamPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -151,15 +170,22 @@ public function getPage($targetUrl)
return new SyncStreamPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a SyncStreamContext
*
- * @param string $sid The SID of the Stream resource to fetch
- * @return \Twilio\Rest\Sync\V1\Service\SyncStreamContext
+ * @param string $sid The SID of the Stream resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): SyncStreamContext
{
- return new SyncStreamContext($this->version, $this->solution['serviceSid'], $sid);
+ return new SyncStreamContext(
+ $this->version,
+ $this->solution['serviceSid'],
+ $sid
+ );
}
/**
@@ -167,8 +193,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Sync.V1.SyncStreamList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncStreamOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncStreamOptions.php
index 9eec726..f18a7f1 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncStreamOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncStreamOptions.php
@@ -1,55 +1,76 @@
options['uniqueName'] = $uniqueName;
$this->options['ttl'] = $ttl;
}
@@ -57,24 +78,22 @@ public function __construct($uniqueName = Values::NONE, $ttl = Values::NONE)
/**
* An application-defined string that uniquely identifies the resource. This value must be unique within its Service and it can be up to 320 characters long. The `unique_name` value can be used as an alternative to the `sid` in the URL path to address the resource.
*
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the resource
+ * @param string $uniqueName An application-defined string that uniquely identifies the resource. This value must be unique within its Service and it can be up to 320 characters long. The `unique_name` value can be used as an alternative to the `sid` in the URL path to address the resource.
* @return $this Fluent Builder
*/
- public function setUniqueName($uniqueName)
+ public function setUniqueName(string $uniqueName): self
{
$this->options['uniqueName'] = $uniqueName;
return $this;
}
/**
- * How long, in seconds, before the Stream expires and is deleted (time-to-live). Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Stream does not expire. The Stream will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion.
+ * How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Stream expires and is deleted (time-to-live).
*
- * @param int $ttl How long, in seconds, before the Stream expires and is
- * deleted
+ * @param int $ttl How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Stream expires and is deleted (time-to-live).
* @return $this Fluent Builder
*/
- public function setTtl($ttl)
+ public function setTtl(int $ttl): self
{
$this->options['ttl'] = $ttl;
return $this;
@@ -85,37 +104,36 @@ public function setTtl($ttl)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Sync.V1.CreateSyncStreamOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Sync.V1.CreateSyncStreamOptions ' . $options . ']';
}
}
+
+
+
class UpdateSyncStreamOptions extends Options
-{
+ {
/**
- * @param int $ttl How long, in seconds, before the Stream expires and is
- * deleted
+ * @param int $ttl How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Stream expires and is deleted (time-to-live).
*/
- public function __construct($ttl = Values::NONE)
- {
+ public function __construct(
+
+ int $ttl = Values::INT_NONE
+
+ ) {
$this->options['ttl'] = $ttl;
}
/**
- * How long, in seconds, before the Stream expires and is deleted (time-to-live). Can be an integer from 0 to 31,536,000 (1 year). The default value is `0`, which means the Stream does not expire. The Stream will be deleted automatically after it expires, but there can be a delay between the expiration time and the resources's deletion.
+ * How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Stream expires and is deleted (time-to-live).
*
- * @param int $ttl How long, in seconds, before the Stream expires and is
- * deleted
+ * @param int $ttl How long, [in seconds](https://www.twilio.com/docs/sync/limits#sync-payload-limits), before the Stream expires and is deleted (time-to-live).
* @return $this Fluent Builder
*/
- public function setTtl($ttl)
+ public function setTtl(int $ttl): self
{
$this->options['ttl'] = $ttl;
return $this;
@@ -126,14 +144,10 @@ public function setTtl($ttl)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Sync.V1.UpdateSyncStreamOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Sync.V1.UpdateSyncStreamOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncStreamPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncStreamPage.php
index c80ee06..3ac3e84 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncStreamPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/Service/SyncStreamPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return SyncStreamInstance \Twilio\Rest\Sync\V1\Service\SyncStreamInstance
+ */
+ public function buildInstance(array $payload): SyncStreamInstance
{
return new SyncStreamInstance($this->version, $payload, $this->solution['serviceSid']);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Sync.V1.SyncStreamPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/ServiceContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/ServiceContext.php
index 345df9b..24ef948 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/ServiceContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/ServiceContext.php
@@ -2,90 +2,107 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Sync
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Sync\V1;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Sync\V1\Service\DocumentList;
-use Twilio\Rest\Sync\V1\Service\SyncListList;
-use Twilio\Rest\Sync\V1\Service\SyncMapList;
-use Twilio\Rest\Sync\V1\Service\SyncStreamList;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+use Twilio\Rest\Sync\V1\Service\SyncListList;
+use Twilio\Rest\Sync\V1\Service\SyncStreamList;
+use Twilio\Rest\Sync\V1\Service\DocumentList;
+use Twilio\Rest\Sync\V1\Service\SyncMapList;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property \Twilio\Rest\Sync\V1\Service\DocumentList $documents
- * @property \Twilio\Rest\Sync\V1\Service\SyncListList $syncLists
- * @property \Twilio\Rest\Sync\V1\Service\SyncMapList $syncMaps
- * @property \Twilio\Rest\Sync\V1\Service\SyncStreamList $syncStreams
- * @method \Twilio\Rest\Sync\V1\Service\DocumentContext documents(string $sid)
+ * @property SyncListList $syncLists
+ * @property SyncStreamList $syncStreams
+ * @property DocumentList $documents
+ * @property SyncMapList $syncMaps
+ * @method \Twilio\Rest\Sync\V1\Service\SyncStreamContext syncStreams(string $sid)
* @method \Twilio\Rest\Sync\V1\Service\SyncListContext syncLists(string $sid)
* @method \Twilio\Rest\Sync\V1\Service\SyncMapContext syncMaps(string $sid)
- * @method \Twilio\Rest\Sync\V1\Service\SyncStreamContext syncStreams(string $sid)
+ * @method \Twilio\Rest\Sync\V1\Service\DocumentContext documents(string $sid)
*/
class ServiceContext extends InstanceContext
-{
- protected $_documents = null;
- protected $_syncLists = null;
- protected $_syncMaps = null;
- protected $_syncStreams = null;
+ {
+ protected $_syncLists;
+ protected $_syncStreams;
+ protected $_documents;
+ protected $_syncMaps;
/**
* Initialize the ServiceContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The SID of the Service resource to fetch
- * @return \Twilio\Rest\Sync\V1\ServiceContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid The SID of the Service resource to delete.
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Services/' . \rawurlencode($sid) . '';
+ $this->uri = '/Services/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a ServiceInstance
+ * Delete the ServiceInstance
*
- * @return ServiceInstance Fetched ServiceInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new ServiceInstance($this->version, $payload, $this->solution['sid']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Deletes the ServiceInstance
+ * Fetch the ServiceInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return ServiceInstance Fetched ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): ServiceInstance
{
- return $this->version->delete('delete', $this->uri);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
+
+ return new ServiceInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Update the ServiceInstance
*
@@ -93,94 +110,107 @@ public function delete()
* @return ServiceInstance Updated ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ServiceInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'WebhookUrl' => $options['webhookUrl'],
- 'FriendlyName' => $options['friendlyName'],
- 'ReachabilityWebhooksEnabled' => Serialize::booleanToString($options['reachabilityWebhooksEnabled']),
- 'AclEnabled' => Serialize::booleanToString($options['aclEnabled']),
- 'ReachabilityDebouncingEnabled' => Serialize::booleanToString($options['reachabilityDebouncingEnabled']),
- 'ReachabilityDebouncingWindow' => $options['reachabilityDebouncingWindow'],
- 'WebhooksFromRestEnabled' => Serialize::booleanToString($options['webhooksFromRestEnabled']),
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'WebhookUrl' =>
+ $options['webhookUrl'],
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'ReachabilityWebhooksEnabled' =>
+ Serialize::booleanToString($options['reachabilityWebhooksEnabled']),
+ 'AclEnabled' =>
+ Serialize::booleanToString($options['aclEnabled']),
+ 'ReachabilityDebouncingEnabled' =>
+ Serialize::booleanToString($options['reachabilityDebouncingEnabled']),
+ 'ReachabilityDebouncingWindow' =>
+ $options['reachabilityDebouncingWindow'],
+ 'WebhooksFromRestEnabled' =>
+ Serialize::booleanToString($options['webhooksFromRestEnabled']),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
+
+ return new ServiceInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
);
-
- return new ServiceInstance($this->version, $payload, $this->solution['sid']);
}
+
/**
- * Access the documents
- *
- * @return \Twilio\Rest\Sync\V1\Service\DocumentList
+ * Access the syncLists
*/
- protected function getDocuments()
+ protected function getSyncLists(): SyncListList
{
- if (!$this->_documents) {
- $this->_documents = new DocumentList($this->version, $this->solution['sid']);
+ if (!$this->_syncLists) {
+ $this->_syncLists = new SyncListList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_documents;
+ return $this->_syncLists;
}
/**
- * Access the syncLists
- *
- * @return \Twilio\Rest\Sync\V1\Service\SyncListList
+ * Access the syncStreams
*/
- protected function getSyncLists()
+ protected function getSyncStreams(): SyncStreamList
{
- if (!$this->_syncLists) {
- $this->_syncLists = new SyncListList($this->version, $this->solution['sid']);
+ if (!$this->_syncStreams) {
+ $this->_syncStreams = new SyncStreamList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_syncLists;
+ return $this->_syncStreams;
}
/**
- * Access the syncMaps
- *
- * @return \Twilio\Rest\Sync\V1\Service\SyncMapList
+ * Access the documents
*/
- protected function getSyncMaps()
+ protected function getDocuments(): DocumentList
{
- if (!$this->_syncMaps) {
- $this->_syncMaps = new SyncMapList($this->version, $this->solution['sid']);
+ if (!$this->_documents) {
+ $this->_documents = new DocumentList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_syncMaps;
+ return $this->_documents;
}
/**
- * Access the syncStreams
- *
- * @return \Twilio\Rest\Sync\V1\Service\SyncStreamList
+ * Access the syncMaps
*/
- protected function getSyncStreams()
+ protected function getSyncMaps(): SyncMapList
{
- if (!$this->_syncStreams) {
- $this->_syncStreams = new SyncStreamList($this->version, $this->solution['sid']);
+ if (!$this->_syncMaps) {
+ $this->_syncMaps = new SyncMapList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_syncStreams;
+ return $this->_syncMaps;
}
/**
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -195,10 +225,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -213,12 +243,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Sync.V1.ServiceContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/ServiceInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/ServiceInstance.php
index 7b4be63..448c8de 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/ServiceInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/ServiceInstance.php
@@ -2,59 +2,69 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Sync
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Sync\V1;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Sync\V1\Service\SyncListList;
+use Twilio\Rest\Sync\V1\Service\SyncStreamList;
+use Twilio\Rest\Sync\V1\Service\DocumentList;
+use Twilio\Rest\Sync\V1\Service\SyncMapList;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property string $sid
- * @property string $uniqueName
- * @property string $accountSid
- * @property string $friendlyName
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
- * @property string $webhookUrl
- * @property bool $webhooksFromRestEnabled
- * @property bool $reachabilityWebhooksEnabled
- * @property bool $aclEnabled
- * @property bool $reachabilityDebouncingEnabled
+ * @property string|null $sid
+ * @property string|null $uniqueName
+ * @property string|null $accountSid
+ * @property string|null $friendlyName
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
+ * @property string|null $webhookUrl
+ * @property bool|null $webhooksFromRestEnabled
+ * @property bool|null $reachabilityWebhooksEnabled
+ * @property bool|null $aclEnabled
+ * @property bool|null $reachabilityDebouncingEnabled
* @property int $reachabilityDebouncingWindow
- * @property array $links
+ * @property array|null $links
*/
class ServiceInstance extends InstanceResource
{
- protected $_documents = null;
- protected $_syncLists = null;
- protected $_syncMaps = null;
- protected $_syncStreams = null;
+ protected $_syncLists;
+ protected $_syncStreams;
+ protected $_documents;
+ protected $_syncMaps;
/**
* Initialize the ServiceInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The SID of the Service resource to fetch
- * @return \Twilio\Rest\Sync\V1\ServiceInstance
+ * @param string $sid The SID of the Service resource to delete.
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'uniqueName' => Values::array_get($payload, 'unique_name'),
'accountSid' => Values::array_get($payload, 'account_sid'),
@@ -69,46 +79,51 @@ public function __construct(Version $version, array $payload, $sid = null)
'reachabilityDebouncingEnabled' => Values::array_get($payload, 'reachability_debouncing_enabled'),
'reachabilityDebouncingWindow' => Values::array_get($payload, 'reachability_debouncing_window'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Sync\V1\ServiceContext Context for this ServiceInstance
+ * @return ServiceContext Context for this ServiceInstance
*/
- protected function proxy()
+ protected function proxy(): ServiceContext
{
if (!$this->context) {
- $this->context = new ServiceContext($this->version, $this->solution['sid']);
+ $this->context = new ServiceContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a ServiceInstance
+ * Delete the ServiceInstance
*
- * @return ServiceInstance Fetched ServiceInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the ServiceInstance
+ * Fetch the ServiceInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return ServiceInstance Fetched ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): ServiceInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -118,49 +133,42 @@ public function delete()
* @return ServiceInstance Updated ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ServiceInstance
{
+
return $this->proxy()->update($options);
}
/**
- * Access the documents
- *
- * @return \Twilio\Rest\Sync\V1\Service\DocumentList
+ * Access the syncLists
*/
- protected function getDocuments()
+ protected function getSyncLists(): SyncListList
{
- return $this->proxy()->documents;
+ return $this->proxy()->syncLists;
}
/**
- * Access the syncLists
- *
- * @return \Twilio\Rest\Sync\V1\Service\SyncListList
+ * Access the syncStreams
*/
- protected function getSyncLists()
+ protected function getSyncStreams(): SyncStreamList
{
- return $this->proxy()->syncLists;
+ return $this->proxy()->syncStreams;
}
/**
- * Access the syncMaps
- *
- * @return \Twilio\Rest\Sync\V1\Service\SyncMapList
+ * Access the documents
*/
- protected function getSyncMaps()
+ protected function getDocuments(): DocumentList
{
- return $this->proxy()->syncMaps;
+ return $this->proxy()->documents;
}
/**
- * Access the syncStreams
- *
- * @return \Twilio\Rest\Sync\V1\Service\SyncStreamList
+ * Access the syncMaps
*/
- protected function getSyncStreams()
+ protected function getSyncMaps(): SyncMapList
{
- return $this->proxy()->syncStreams;
+ return $this->proxy()->syncMaps;
}
/**
@@ -170,7 +178,7 @@ protected function getSyncStreams()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -189,12 +197,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Sync.V1.ServiceInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/ServiceList.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/ServiceList.php
index 052d3b3..0c00c16 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/ServiceList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/ServiceList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Sync
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Sync\V1;
@@ -12,60 +19,88 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
class ServiceList extends ListResource
-{
+ {
/**
* Construct the ServiceList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Sync\V1\ServiceList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/Services';
}
/**
- * Create a new ServiceInstance
+ * Create the ServiceInstance
*
* @param array|Options $options Optional Arguments
- * @return ServiceInstance Newly created ServiceInstance
+ * @return ServiceInstance Created ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($options = array())
+ public function create(array $options = []): ServiceInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'WebhookUrl' => $options['webhookUrl'],
- 'ReachabilityWebhooksEnabled' => Serialize::booleanToString($options['reachabilityWebhooksEnabled']),
- 'AclEnabled' => Serialize::booleanToString($options['aclEnabled']),
- 'ReachabilityDebouncingEnabled' => Serialize::booleanToString($options['reachabilityDebouncingEnabled']),
- 'ReachabilityDebouncingWindow' => $options['reachabilityDebouncingWindow'],
- 'WebhooksFromRestEnabled' => Serialize::booleanToString($options['webhooksFromRestEnabled']),
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'WebhookUrl' =>
+ $options['webhookUrl'],
+ 'ReachabilityWebhooksEnabled' =>
+ Serialize::booleanToString($options['reachabilityWebhooksEnabled']),
+ 'AclEnabled' =>
+ Serialize::booleanToString($options['aclEnabled']),
+ 'ReachabilityDebouncingEnabled' =>
+ Serialize::booleanToString($options['reachabilityDebouncingEnabled']),
+ 'ReachabilityDebouncingWindow' =>
+ $options['reachabilityDebouncingWindow'],
+ 'WebhooksFromRestEnabled' =>
+ Serialize::booleanToString($options['webhooksFromRestEnabled']),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new ServiceInstance(
+ $this->version,
+ $payload
);
+ }
+
- return new ServiceInstance($this->version, $payload);
+ /**
+ * Reads ServiceInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return ServiceInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -84,9 +119,9 @@ public function create($options = array())
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -95,26 +130,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads ServiceInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return ServiceInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of ServiceInstance records from the API.
* Request is executed immediately
@@ -122,21 +137,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of ServiceInstance
+ * @return ServicePage Page of ServiceInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): ServicePage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new ServicePage($this->version, $response, $this->solution);
}
@@ -146,9 +162,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of ServiceInstance
+ * @return ServicePage Page of ServiceInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): ServicePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -158,15 +174,21 @@ public function getPage($targetUrl)
return new ServicePage($this->version, $response, $this->solution);
}
+
/**
* Constructs a ServiceContext
*
- * @param string $sid The SID of the Service resource to fetch
- * @return \Twilio\Rest\Sync\V1\ServiceContext
+ * @param string $sid The SID of the Service resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): ServiceContext
{
- return new ServiceContext($this->version, $sid);
+ return new ServiceContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -174,8 +196,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Sync.V1.ServiceList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/ServiceOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/ServiceOptions.php
index f610637..9123846 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/ServiceOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/ServiceOptions.php
@@ -1,10 +1,16 @@
options['friendlyName'] = $friendlyName;
$this->options['webhookUrl'] = $webhookUrl;
$this->options['reachabilityWebhooksEnabled'] = $reachabilityWebhooksEnabled;
@@ -103,10 +125,10 @@ public function __construct($friendlyName = Values::NONE, $webhookUrl = Values::
/**
* A string that you assign to describe the resource.
*
- * @param string $friendlyName A string that you assign to describe the resource
+ * @param string $friendlyName A string that you assign to describe the resource.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -115,11 +137,10 @@ public function setFriendlyName($friendlyName)
/**
* The URL we should call when Sync objects are manipulated.
*
- * @param string $webhookUrl The URL we should call when Sync objects are
- * manipulated
+ * @param string $webhookUrl The URL we should call when Sync objects are manipulated.
* @return $this Fluent Builder
*/
- public function setWebhookUrl($webhookUrl)
+ public function setWebhookUrl(string $webhookUrl): self
{
$this->options['webhookUrl'] = $webhookUrl;
return $this;
@@ -128,12 +149,10 @@ public function setWebhookUrl($webhookUrl)
/**
* Whether the service instance should call `webhook_url` when client endpoints connect to Sync. The default is `false`.
*
- * @param bool $reachabilityWebhooksEnabled Whether the service instance should
- * call webhook_url when client
- * endpoints connect to Sync
+ * @param bool $reachabilityWebhooksEnabled Whether the service instance should call `webhook_url` when client endpoints connect to Sync. The default is `false`.
* @return $this Fluent Builder
*/
- public function setReachabilityWebhooksEnabled($reachabilityWebhooksEnabled)
+ public function setReachabilityWebhooksEnabled(bool $reachabilityWebhooksEnabled): self
{
$this->options['reachabilityWebhooksEnabled'] = $reachabilityWebhooksEnabled;
return $this;
@@ -142,12 +161,10 @@ public function setReachabilityWebhooksEnabled($reachabilityWebhooksEnabled)
/**
* Whether token identities in the Service must be granted access to Sync objects by using the [Permissions](https://www.twilio.com/docs/sync/api/sync-permissions) resource.
*
- * @param bool $aclEnabled Whether token identities in the Service must be
- * granted access to Sync objects by using the
- * Permissions resource
+ * @param bool $aclEnabled Whether token identities in the Service must be granted access to Sync objects by using the [Permissions](https://www.twilio.com/docs/sync/api/sync-permissions) resource.
* @return $this Fluent Builder
*/
- public function setAclEnabled($aclEnabled)
+ public function setAclEnabled(bool $aclEnabled): self
{
$this->options['aclEnabled'] = $aclEnabled;
return $this;
@@ -156,12 +173,10 @@ public function setAclEnabled($aclEnabled)
/**
* Whether every `endpoint_disconnected` event should occur after a configurable delay. The default is `false`, where the `endpoint_disconnected` event occurs immediately after disconnection. When `true`, intervening reconnections can prevent the `endpoint_disconnected` event.
*
- * @param bool $reachabilityDebouncingEnabled Whether every
- * endpoint_disconnected event
- * occurs after a configurable delay
+ * @param bool $reachabilityDebouncingEnabled Whether every `endpoint_disconnected` event should occur after a configurable delay. The default is `false`, where the `endpoint_disconnected` event occurs immediately after disconnection. When `true`, intervening reconnections can prevent the `endpoint_disconnected` event.
* @return $this Fluent Builder
*/
- public function setReachabilityDebouncingEnabled($reachabilityDebouncingEnabled)
+ public function setReachabilityDebouncingEnabled(bool $reachabilityDebouncingEnabled): self
{
$this->options['reachabilityDebouncingEnabled'] = $reachabilityDebouncingEnabled;
return $this;
@@ -170,11 +185,10 @@ public function setReachabilityDebouncingEnabled($reachabilityDebouncingEnabled)
/**
* The reachability event delay in milliseconds if `reachability_debouncing_enabled` = `true`. Must be between 1,000 and 30,000 and defaults to 5,000. This is the number of milliseconds after the last running client disconnects, and a Sync identity is declared offline, before the `webhook_url` is called if all endpoints remain offline. A reconnection from the same identity by any endpoint during this interval prevents the call to `webhook_url`.
*
- * @param int $reachabilityDebouncingWindow The reachability event delay in
- * milliseconds
+ * @param int $reachabilityDebouncingWindow The reachability event delay in milliseconds if `reachability_debouncing_enabled` = `true`. Must be between 1,000 and 30,000 and defaults to 5,000. This is the number of milliseconds after the last running client disconnects, and a Sync identity is declared offline, before the `webhook_url` is called if all endpoints remain offline. A reconnection from the same identity by any endpoint during this interval prevents the call to `webhook_url`.
* @return $this Fluent Builder
*/
- public function setReachabilityDebouncingWindow($reachabilityDebouncingWindow)
+ public function setReachabilityDebouncingWindow(int $reachabilityDebouncingWindow): self
{
$this->options['reachabilityDebouncingWindow'] = $reachabilityDebouncingWindow;
return $this;
@@ -183,12 +197,10 @@ public function setReachabilityDebouncingWindow($reachabilityDebouncingWindow)
/**
* Whether the Service instance should call `webhook_url` when the REST API is used to update Sync objects. The default is `false`.
*
- * @param bool $webhooksFromRestEnabled Whether the Service instance should
- * call webhook_url when the REST API is
- * used to update Sync objects
+ * @param bool $webhooksFromRestEnabled Whether the Service instance should call `webhook_url` when the REST API is used to update Sync objects. The default is `false`.
* @return $this Fluent Builder
*/
- public function setWebhooksFromRestEnabled($webhooksFromRestEnabled)
+ public function setWebhooksFromRestEnabled(bool $webhooksFromRestEnabled): self
{
$this->options['webhooksFromRestEnabled'] = $webhooksFromRestEnabled;
return $this;
@@ -199,41 +211,38 @@ public function setWebhooksFromRestEnabled($webhooksFromRestEnabled)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Sync.V1.CreateServiceOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Sync.V1.CreateServiceOptions ' . $options . ']';
}
}
+
+
+
class UpdateServiceOptions extends Options
-{
+ {
/**
- * @param string $webhookUrl The URL we should call when Sync objects are
- * manipulated
- * @param string $friendlyName A string that you assign to describe the resource
- * @param bool $reachabilityWebhooksEnabled Whether the service instance should
- * call webhook_url when client
- * endpoints connect to Sync
- * @param bool $aclEnabled Whether token identities in the Service must be
- * granted access to Sync objects by using the
- * Permissions resource
- * @param bool $reachabilityDebouncingEnabled Whether every
- * endpoint_disconnected event
- * occurs after a configurable delay
- * @param int $reachabilityDebouncingWindow The reachability event delay in
- * milliseconds
- * @param bool $webhooksFromRestEnabled Whether the Service instance should
- * call webhook_url when the REST API is
- * used to update Sync objects
+ * @param string $webhookUrl The URL we should call when Sync objects are manipulated.
+ * @param string $friendlyName A string that you assign to describe the resource.
+ * @param bool $reachabilityWebhooksEnabled Whether the service instance should call `webhook_url` when client endpoints connect to Sync. The default is `false`.
+ * @param bool $aclEnabled Whether token identities in the Service must be granted access to Sync objects by using the [Permissions](https://www.twilio.com/docs/sync/api/sync-permissions) resource.
+ * @param bool $reachabilityDebouncingEnabled Whether every `endpoint_disconnected` event should occur after a configurable delay. The default is `false`, where the `endpoint_disconnected` event occurs immediately after disconnection. When `true`, intervening reconnections can prevent the `endpoint_disconnected` event.
+ * @param int $reachabilityDebouncingWindow The reachability event delay in milliseconds if `reachability_debouncing_enabled` = `true`. Must be between 1,000 and 30,000 and defaults to 5,000. This is the number of milliseconds after the last running client disconnects, and a Sync identity is declared offline, before the webhook is called if all endpoints remain offline. A reconnection from the same identity by any endpoint during this interval prevents the webhook from being called.
+ * @param bool $webhooksFromRestEnabled Whether the Service instance should call `webhook_url` when the REST API is used to update Sync objects. The default is `false`.
*/
- public function __construct($webhookUrl = Values::NONE, $friendlyName = Values::NONE, $reachabilityWebhooksEnabled = Values::NONE, $aclEnabled = Values::NONE, $reachabilityDebouncingEnabled = Values::NONE, $reachabilityDebouncingWindow = Values::NONE, $webhooksFromRestEnabled = Values::NONE)
- {
+ public function __construct(
+
+ string $webhookUrl = Values::NONE,
+ string $friendlyName = Values::NONE,
+ bool $reachabilityWebhooksEnabled = Values::BOOL_NONE,
+ bool $aclEnabled = Values::BOOL_NONE,
+ bool $reachabilityDebouncingEnabled = Values::BOOL_NONE,
+ int $reachabilityDebouncingWindow = Values::INT_NONE,
+ bool $webhooksFromRestEnabled = Values::BOOL_NONE
+
+ ) {
$this->options['webhookUrl'] = $webhookUrl;
$this->options['friendlyName'] = $friendlyName;
$this->options['reachabilityWebhooksEnabled'] = $reachabilityWebhooksEnabled;
@@ -246,11 +255,10 @@ public function __construct($webhookUrl = Values::NONE, $friendlyName = Values::
/**
* The URL we should call when Sync objects are manipulated.
*
- * @param string $webhookUrl The URL we should call when Sync objects are
- * manipulated
+ * @param string $webhookUrl The URL we should call when Sync objects are manipulated.
* @return $this Fluent Builder
*/
- public function setWebhookUrl($webhookUrl)
+ public function setWebhookUrl(string $webhookUrl): self
{
$this->options['webhookUrl'] = $webhookUrl;
return $this;
@@ -259,10 +267,10 @@ public function setWebhookUrl($webhookUrl)
/**
* A string that you assign to describe the resource.
*
- * @param string $friendlyName A string that you assign to describe the resource
+ * @param string $friendlyName A string that you assign to describe the resource.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -271,12 +279,10 @@ public function setFriendlyName($friendlyName)
/**
* Whether the service instance should call `webhook_url` when client endpoints connect to Sync. The default is `false`.
*
- * @param bool $reachabilityWebhooksEnabled Whether the service instance should
- * call webhook_url when client
- * endpoints connect to Sync
+ * @param bool $reachabilityWebhooksEnabled Whether the service instance should call `webhook_url` when client endpoints connect to Sync. The default is `false`.
* @return $this Fluent Builder
*/
- public function setReachabilityWebhooksEnabled($reachabilityWebhooksEnabled)
+ public function setReachabilityWebhooksEnabled(bool $reachabilityWebhooksEnabled): self
{
$this->options['reachabilityWebhooksEnabled'] = $reachabilityWebhooksEnabled;
return $this;
@@ -285,12 +291,10 @@ public function setReachabilityWebhooksEnabled($reachabilityWebhooksEnabled)
/**
* Whether token identities in the Service must be granted access to Sync objects by using the [Permissions](https://www.twilio.com/docs/sync/api/sync-permissions) resource.
*
- * @param bool $aclEnabled Whether token identities in the Service must be
- * granted access to Sync objects by using the
- * Permissions resource
+ * @param bool $aclEnabled Whether token identities in the Service must be granted access to Sync objects by using the [Permissions](https://www.twilio.com/docs/sync/api/sync-permissions) resource.
* @return $this Fluent Builder
*/
- public function setAclEnabled($aclEnabled)
+ public function setAclEnabled(bool $aclEnabled): self
{
$this->options['aclEnabled'] = $aclEnabled;
return $this;
@@ -299,12 +303,10 @@ public function setAclEnabled($aclEnabled)
/**
* Whether every `endpoint_disconnected` event should occur after a configurable delay. The default is `false`, where the `endpoint_disconnected` event occurs immediately after disconnection. When `true`, intervening reconnections can prevent the `endpoint_disconnected` event.
*
- * @param bool $reachabilityDebouncingEnabled Whether every
- * endpoint_disconnected event
- * occurs after a configurable delay
+ * @param bool $reachabilityDebouncingEnabled Whether every `endpoint_disconnected` event should occur after a configurable delay. The default is `false`, where the `endpoint_disconnected` event occurs immediately after disconnection. When `true`, intervening reconnections can prevent the `endpoint_disconnected` event.
* @return $this Fluent Builder
*/
- public function setReachabilityDebouncingEnabled($reachabilityDebouncingEnabled)
+ public function setReachabilityDebouncingEnabled(bool $reachabilityDebouncingEnabled): self
{
$this->options['reachabilityDebouncingEnabled'] = $reachabilityDebouncingEnabled;
return $this;
@@ -313,11 +315,10 @@ public function setReachabilityDebouncingEnabled($reachabilityDebouncingEnabled)
/**
* The reachability event delay in milliseconds if `reachability_debouncing_enabled` = `true`. Must be between 1,000 and 30,000 and defaults to 5,000. This is the number of milliseconds after the last running client disconnects, and a Sync identity is declared offline, before the webhook is called if all endpoints remain offline. A reconnection from the same identity by any endpoint during this interval prevents the webhook from being called.
*
- * @param int $reachabilityDebouncingWindow The reachability event delay in
- * milliseconds
+ * @param int $reachabilityDebouncingWindow The reachability event delay in milliseconds if `reachability_debouncing_enabled` = `true`. Must be between 1,000 and 30,000 and defaults to 5,000. This is the number of milliseconds after the last running client disconnects, and a Sync identity is declared offline, before the webhook is called if all endpoints remain offline. A reconnection from the same identity by any endpoint during this interval prevents the webhook from being called.
* @return $this Fluent Builder
*/
- public function setReachabilityDebouncingWindow($reachabilityDebouncingWindow)
+ public function setReachabilityDebouncingWindow(int $reachabilityDebouncingWindow): self
{
$this->options['reachabilityDebouncingWindow'] = $reachabilityDebouncingWindow;
return $this;
@@ -326,12 +327,10 @@ public function setReachabilityDebouncingWindow($reachabilityDebouncingWindow)
/**
* Whether the Service instance should call `webhook_url` when the REST API is used to update Sync objects. The default is `false`.
*
- * @param bool $webhooksFromRestEnabled Whether the Service instance should
- * call webhook_url when the REST API is
- * used to update Sync objects
+ * @param bool $webhooksFromRestEnabled Whether the Service instance should call `webhook_url` when the REST API is used to update Sync objects. The default is `false`.
* @return $this Fluent Builder
*/
- public function setWebhooksFromRestEnabled($webhooksFromRestEnabled)
+ public function setWebhooksFromRestEnabled(bool $webhooksFromRestEnabled): self
{
$this->options['webhooksFromRestEnabled'] = $webhooksFromRestEnabled;
return $this;
@@ -342,14 +341,10 @@ public function setWebhooksFromRestEnabled($webhooksFromRestEnabled)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Sync.V1.UpdateServiceOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Sync.V1.UpdateServiceOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/ServicePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/ServicePage.php
index a9e7a78..ddcf0fd 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/ServicePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Sync/V1/ServicePage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return ServiceInstance \Twilio\Rest\Sync\V1\ServiceInstance
+ */
+ public function buildInstance(array $payload): ServiceInstance
{
return new ServiceInstance($this->version, $payload);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Sync.V1.ServicePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter.php
index d6b4f40..18ba3c5 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter.php
@@ -1,111 +1,24 @@
baseUrl = 'https://taskrouter.twilio.com';
- }
+class Taskrouter extends TaskrouterBase {
/**
- * @return \Twilio\Rest\Taskrouter\V1 Version v1 of taskrouter
+ * @deprecated Use v1->workspaces instead.
*/
- protected function getV1()
- {
- if (!$this->_v1) {
- $this->_v1 = new V1($this);
- }
- return $this->_v1;
- }
-
- /**
- * Magic getter to lazy load version
- *
- * @param string $name Version to return
- * @return \Twilio\Version The requested version
- * @throws TwilioException For unknown versions
- */
- public function __get($name)
- {
- $method = 'get' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return $this->$method();
- }
-
- throw new TwilioException('Unknown version ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $method = 'context' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return \call_user_func_array(array($this, $method), $arguments);
- }
-
- throw new TwilioException('Unknown context ' . $name);
- }
-
- /**
- * @return \Twilio\Rest\Taskrouter\V1\WorkspaceList
- */
- protected function getWorkspaces()
- {
+ protected function getWorkspaces(): \Twilio\Rest\Taskrouter\V1\WorkspaceList {
+ echo "workspaces is deprecated. Use v1->workspaces instead.";
return $this->v1->workspaces;
}
/**
+ * @deprecated Use v1->workspaces(\$sid) instead.
* @param string $sid The SID of the resource to fetch
- * @return \Twilio\Rest\Taskrouter\V1\WorkspaceContext
*/
- protected function contextWorkspaces($sid)
- {
+ protected function contextWorkspaces(string $sid): \Twilio\Rest\Taskrouter\V1\WorkspaceContext {
+ echo "workspaces(\$sid) is deprecated. Use v1->workspaces(\$sid) instead.";
return $this->v1->workspaces($sid);
}
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Taskrouter]';
- }
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1.php
index 5256594..add29e8 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1.php
@@ -1,32 +1,38 @@
version = 'v1';
}
- /**
- * @return \Twilio\Rest\Taskrouter\V1\WorkspaceList
- */
- protected function getWorkspaces()
+ protected function getWorkspaces(): WorkspaceList
{
if (!$this->_workspaces) {
$this->_workspaces = new WorkspaceList($this);
@@ -52,7 +55,7 @@ protected function getWorkspaces()
* @return \Twilio\ListResource The requested resource
* @throws TwilioException For unknown resource
*/
- public function __get($name)
+ public function __get(string $name)
{
$method = 'get' . \ucfirst($name);
if (\method_exists($this, $method)) {
@@ -67,10 +70,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -85,8 +88,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/ActivityContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/ActivityContext.php
index 3081a24..b9382b6 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/ActivityContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/ActivityContext.php
@@ -2,55 +2,82 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class ActivityContext extends InstanceContext
-{
+ {
/**
* Initialize the ActivityContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace with the Activity
- * resources to fetch
- * @param string $sid The SID of the resource to fetch
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\ActivityContext
+ * @param Version $version Version that contains the resource
+ * @param string $workspaceSid The SID of the Workspace that the new Activity belongs to.
+ * @param string $sid The SID of the Activity resource to delete.
*/
- public function __construct(Version $version, $workspaceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $workspaceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid, 'sid' => $sid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Activities/' . \rawurlencode($sid) . '';
+ $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid)
+ .'/Activities/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a ActivityInstance
+ * Delete the ActivityInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
+ }
+
+
+ /**
+ * Fetch the ActivityInstance
*
* @return ActivityInstance Fetched ActivityInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): ActivityInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new ActivityInstance(
$this->version,
@@ -60,6 +87,7 @@ public function fetch()
);
}
+
/**
* Update the ActivityInstance
*
@@ -67,18 +95,18 @@ public function fetch()
* @return ActivityInstance Updated ActivityInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ActivityInstance
{
+
$options = new Values($options);
- $data = Values::of(array('FriendlyName' => $options['friendlyName'],));
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ ]);
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new ActivityInstance(
$this->version,
@@ -88,28 +116,18 @@ public function update($options = array())
);
}
- /**
- * Deletes the ActivityInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.ActivityContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/ActivityInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/ActivityInstance.php
index a67ac0f..7c5efc9 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/ActivityInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/ActivityInstance.php
@@ -2,48 +2,56 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property bool $available
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $friendlyName
- * @property string $sid
- * @property string $workspaceSid
- * @property string $url
+ * @property string|null $accountSid
+ * @property bool|null $available
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $friendlyName
+ * @property string|null $sid
+ * @property string|null $workspaceSid
+ * @property string|null $url
+ * @property array|null $links
*/
class ActivityInstance extends InstanceResource
{
/**
* Initialize the ActivityInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $workspaceSid The SID of the Workspace that contains the
- * Activity
- * @param string $sid The SID of the resource to fetch
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\ActivityInstance
+ * @param string $workspaceSid The SID of the Workspace that the new Activity belongs to.
+ * @param string $sid The SID of the Activity resource to delete.
*/
- public function __construct(Version $version, array $payload, $workspaceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $workspaceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'available' => Values::array_get($payload, 'available'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
@@ -52,20 +60,19 @@ public function __construct(Version $version, array $payload, $workspaceSid, $si
'sid' => Values::array_get($payload, 'sid'),
'workspaceSid' => Values::array_get($payload, 'workspace_sid'),
'url' => Values::array_get($payload, 'url'),
- );
+ 'links' => Values::array_get($payload, 'links'),
+ ];
- $this->solution = array('workspaceSid' => $workspaceSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['workspaceSid' => $workspaceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\ActivityContext Context for
- * this
- * ActivityInstance
+ * @return ActivityContext Context for this ActivityInstance
*/
- protected function proxy()
+ protected function proxy(): ActivityContext
{
if (!$this->context) {
$this->context = new ActivityContext(
@@ -79,37 +86,40 @@ protected function proxy()
}
/**
- * Fetch a ActivityInstance
+ * Delete the ActivityInstance
*
- * @return ActivityInstance Fetched ActivityInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Update the ActivityInstance
+ * Fetch the ActivityInstance
*
- * @param array|Options $options Optional Arguments
- * @return ActivityInstance Updated ActivityInstance
+ * @return ActivityInstance Fetched ActivityInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): ActivityInstance
{
- return $this->proxy()->update($options);
+
+ return $this->proxy()->fetch();
}
/**
- * Deletes the ActivityInstance
+ * Update the ActivityInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return ActivityInstance Updated ActivityInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): ActivityInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->update($options);
}
/**
@@ -119,7 +129,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -138,12 +148,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.ActivityInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/ActivityList.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/ActivityList.php
index bff61a4..021b0b0 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/ActivityList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/ActivityList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Taskrouter\V1\Workspace;
@@ -12,58 +19,68 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class ActivityList extends ListResource
-{
+ {
/**
* Construct the ActivityList
*
* @param Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace that contains the
- * Activity
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\ActivityList
+ * @param string $workspaceSid The SID of the Workspace that the new Activity belongs to.
*/
- public function __construct(Version $version, $workspaceSid)
- {
+ public function __construct(
+ Version $version,
+ string $workspaceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid,);
-
- $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Activities';
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+
+ ];
+
+ $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid)
+ .'/Activities';
}
/**
- * Streams ActivityInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the ActivityInstance
*
+ * @param string $friendlyName A descriptive string that you create to describe the Activity resource. It can be up to 64 characters long. These names are used to calculate and expose statistics about Workers, and provide visibility into the state of each Worker. Examples of friendly names include: `on-call`, `break`, and `email`.
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return ActivityInstance Created ActivityInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function create(string $friendlyName, array $options = []): ActivityInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($options, $limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'FriendlyName' =>
+ $friendlyName,
+ 'Available' =>
+ Serialize::booleanToString($options['available']),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new ActivityInstance(
+ $this->version,
+ $payload,
+ $this->solution['workspaceSid']
+ );
}
+
/**
* Reads ActivityInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -80,37 +97,68 @@ public function stream($options = array(), $limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return ActivityInstance[] Array of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
+ /**
+ * Streams ActivityInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of ActivityInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of ActivityInstance
+ * @return ActivityPage Page of ActivityInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): ActivityPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'Available' => $options['available'],
+
+ $params = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'Available' =>
+ $options['available'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new ActivityPage($this->version, $response, $this->solution);
}
@@ -120,9 +168,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of ActivityInstance
+ * @return ActivityPage Page of ActivityInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): ActivityPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -132,42 +180,22 @@ public function getPage($targetUrl)
return new ActivityPage($this->version, $response, $this->solution);
}
- /**
- * Create a new ActivityInstance
- *
- * @param string $friendlyName A string to describe the Activity resource
- * @param array|Options $options Optional Arguments
- * @return ActivityInstance Newly created ActivityInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($friendlyName, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'FriendlyName' => $friendlyName,
- 'Available' => Serialize::booleanToString($options['available']),
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new ActivityInstance($this->version, $payload, $this->solution['workspaceSid']);
- }
/**
* Constructs a ActivityContext
*
- * @param string $sid The SID of the resource to fetch
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\ActivityContext
+ * @param string $sid The SID of the Activity resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): ActivityContext
{
- return new ActivityContext($this->version, $this->solution['workspaceSid'], $sid);
+ return new ActivityContext(
+ $this->version,
+ $this->solution['workspaceSid'],
+ $sid
+ );
}
/**
@@ -175,8 +203,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.ActivityList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/ActivityOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/ActivityOptions.php
index f8da77d..8cd2afe 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/ActivityOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/ActivityOptions.php
@@ -1,10 +1,16 @@
options['friendlyName'] = $friendlyName;
+ public function __construct(
+
+ bool $available = Values::BOOL_NONE
+
+ ) {
+ $this->options['available'] = $available;
}
/**
- * A descriptive string that you create to describe the Activity resource. It can be up to 64 characters long. These names are used to calculate and expose statistics about Workers, and provide visibility into the state of each Worker. Examples of friendly names include: `on-call`, `break`, and `email`.
+ * Whether the Worker should be eligible to receive a Task when it occupies the Activity. A value of `true`, `1`, or `yes` specifies the Activity is available. All other values specify that it is not. The value cannot be changed after the Activity is created.
*
- * @param string $friendlyName A string to describe the Activity resource
+ * @param bool $available Whether the Worker should be eligible to receive a Task when it occupies the Activity. A value of `true`, `1`, or `yes` specifies the Activity is available. All other values specify that it is not. The value cannot be changed after the Activity is created.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setAvailable(bool $available): self
{
- $this->options['friendlyName'] = $friendlyName;
+ $this->options['available'] = $available;
return $this;
}
@@ -73,28 +102,27 @@ public function setFriendlyName($friendlyName)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Taskrouter.V1.UpdateActivityOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.CreateActivityOptions ' . $options . ']';
}
}
+
+
class ReadActivityOptions extends Options
-{
+ {
/**
- * @param string $friendlyName The friendly_name of the Activity resources to
- * read
- * @param string $available Whether to return activities that are available or
- * unavailable
+ * @param string $friendlyName The `friendly_name` of the Activity resources to read.
+ * @param string $available Whether return only Activity resources that are available or unavailable. A value of `true` returns only available activities. Values of '1' or `yes` also indicate `true`. All other values represent `false` and return activities that are unavailable.
*/
- public function __construct($friendlyName = Values::NONE, $available = Values::NONE)
- {
+ public function __construct(
+
+ string $friendlyName = Values::NONE,
+ string $available = Values::NONE
+
+ ) {
$this->options['friendlyName'] = $friendlyName;
$this->options['available'] = $available;
}
@@ -102,11 +130,10 @@ public function __construct($friendlyName = Values::NONE, $available = Values::N
/**
* The `friendly_name` of the Activity resources to read.
*
- * @param string $friendlyName The friendly_name of the Activity resources to
- * read
+ * @param string $friendlyName The `friendly_name` of the Activity resources to read.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -115,11 +142,10 @@ public function setFriendlyName($friendlyName)
/**
* Whether return only Activity resources that are available or unavailable. A value of `true` returns only available activities. Values of '1' or `yes` also indicate `true`. All other values represent `false` and return activities that are unavailable.
*
- * @param string $available Whether to return activities that are available or
- * unavailable
+ * @param string $available Whether return only Activity resources that are available or unavailable. A value of `true` returns only available activities. Values of '1' or `yes` also indicate `true`. All other values represent `false` and return activities that are unavailable.
* @return $this Fluent Builder
*/
- public function setAvailable($available)
+ public function setAvailable(string $available): self
{
$this->options['available'] = $available;
return $this;
@@ -130,39 +156,35 @@ public function setAvailable($available)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Taskrouter.V1.ReadActivityOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.ReadActivityOptions ' . $options . ']';
}
}
-class CreateActivityOptions extends Options
-{
+class UpdateActivityOptions extends Options
+ {
/**
- * @param bool $available Whether the Worker should be eligible to receive a
- * Task when it occupies the Activity
+ * @param string $friendlyName A descriptive string that you create to describe the Activity resource. It can be up to 64 characters long. These names are used to calculate and expose statistics about Workers, and provide visibility into the state of each Worker. Examples of friendly names include: `on-call`, `break`, and `email`.
*/
- public function __construct($available = Values::NONE)
- {
- $this->options['available'] = $available;
+ public function __construct(
+
+ string $friendlyName = Values::NONE
+
+ ) {
+ $this->options['friendlyName'] = $friendlyName;
}
/**
- * Whether the Worker should be eligible to receive a Task when it occupies the Activity. A value of `true`, `1`, or `yes` specifies the Activity is available. All other values specify that it is not.
+ * A descriptive string that you create to describe the Activity resource. It can be up to 64 characters long. These names are used to calculate and expose statistics about Workers, and provide visibility into the state of each Worker. Examples of friendly names include: `on-call`, `break`, and `email`.
*
- * @param bool $available Whether the Worker should be eligible to receive a
- * Task when it occupies the Activity
+ * @param string $friendlyName A descriptive string that you create to describe the Activity resource. It can be up to 64 characters long. These names are used to calculate and expose statistics about Workers, and provide visibility into the state of each Worker. Examples of friendly names include: `on-call`, `break`, and `email`.
* @return $this Fluent Builder
*/
- public function setAvailable($available)
+ public function setFriendlyName(string $friendlyName): self
{
- $this->options['available'] = $available;
+ $this->options['friendlyName'] = $friendlyName;
return $this;
}
@@ -171,14 +193,10 @@ public function setAvailable($available)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Taskrouter.V1.CreateActivityOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.UpdateActivityOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/ActivityPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/ActivityPage.php
index b348536..3bda8fe 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/ActivityPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/ActivityPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return ActivityInstance \Twilio\Rest\Taskrouter\V1\Workspace\ActivityInstance
+ */
+ public function buildInstance(array $payload): ActivityInstance
{
return new ActivityInstance($this->version, $payload, $this->solution['workspaceSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.ActivityPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/EventContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/EventContext.php
index 6c92c40..783c13d 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/EventContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/EventContext.php
@@ -2,53 +2,67 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class EventContext extends InstanceContext
-{
+ {
/**
* Initialize the EventContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace with the Event to fetch
- * @param string $sid The SID of the resource to fetch
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\EventContext
+ * @param Version $version Version that contains the resource
+ * @param string $workspaceSid The SID of the Workspace with the Event to fetch.
+ * @param string $sid The SID of the Event resource to fetch.
*/
- public function __construct(Version $version, $workspaceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $workspaceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid, 'sid' => $sid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Events/' . \rawurlencode($sid) . '';
+ $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid)
+ .'/Events/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a EventInstance
+ * Fetch the EventInstance
*
* @return EventInstance Fetched EventInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): EventInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new EventInstance(
$this->version,
@@ -58,17 +72,18 @@ public function fetch()
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.EventContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/EventInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/EventInstance.php
index 014d974..ee7b531 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/EventInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/EventInstance.php
@@ -2,55 +2,63 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property string $actorSid
- * @property string $actorType
- * @property string $actorUrl
- * @property string $description
- * @property array $eventData
- * @property \DateTime $eventDate
- * @property string $eventDateMs
- * @property string $eventType
- * @property string $resourceSid
- * @property string $resourceType
- * @property string $resourceUrl
- * @property string $sid
- * @property string $source
- * @property string $sourceIpAddress
- * @property string $url
- * @property string $workspaceSid
+ * @property string|null $accountSid
+ * @property string|null $actorSid
+ * @property string|null $actorType
+ * @property string|null $actorUrl
+ * @property string|null $description
+ * @property array|null $eventData
+ * @property \DateTime|null $eventDate
+ * @property int|null $eventDateMs
+ * @property string|null $eventType
+ * @property string|null $resourceSid
+ * @property string|null $resourceType
+ * @property string|null $resourceUrl
+ * @property string|null $sid
+ * @property string|null $source
+ * @property string|null $sourceIpAddress
+ * @property string|null $url
+ * @property string|null $workspaceSid
*/
class EventInstance extends InstanceResource
{
/**
* Initialize the EventInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $workspaceSid The SID of the Workspace that contains the Event
- * @param string $sid The SID of the resource to fetch
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\EventInstance
+ * @param string $workspaceSid The SID of the Workspace with the Event to fetch.
+ * @param string $sid The SID of the Event resource to fetch.
*/
- public function __construct(Version $version, array $payload, $workspaceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $workspaceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'actorSid' => Values::array_get($payload, 'actor_sid'),
'actorType' => Values::array_get($payload, 'actor_type'),
@@ -68,19 +76,18 @@ public function __construct(Version $version, array $payload, $workspaceSid, $si
'sourceIpAddress' => Values::array_get($payload, 'source_ip_address'),
'url' => Values::array_get($payload, 'url'),
'workspaceSid' => Values::array_get($payload, 'workspace_sid'),
- );
+ ];
- $this->solution = array('workspaceSid' => $workspaceSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['workspaceSid' => $workspaceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\EventContext Context for this
- * EventInstance
+ * @return EventContext Context for this EventInstance
*/
- protected function proxy()
+ protected function proxy(): EventContext
{
if (!$this->context) {
$this->context = new EventContext(
@@ -94,13 +101,14 @@ protected function proxy()
}
/**
- * Fetch a EventInstance
+ * Fetch the EventInstance
*
* @return EventInstance Fetched EventInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): EventInstance
{
+
return $this->proxy()->fetch();
}
@@ -111,7 +119,7 @@ public function fetch()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -130,12 +138,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.EventInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/EventList.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/EventList.php
index 455995e..7b1770e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/EventList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/EventList.php
@@ -2,36 +2,72 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Taskrouter\V1\Workspace;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class EventList extends ListResource
-{
+ {
/**
* Construct the EventList
*
* @param Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace that contains the Event
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\EventList
+ * @param string $workspaceSid The SID of the Workspace with the Event to fetch.
*/
- public function __construct(Version $version, $workspaceSid)
- {
+ public function __construct(
+ Version $version,
+ string $workspaceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+
+ ];
+
+ $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid)
+ .'/Events';
+ }
- $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Events';
+ /**
+ * Reads EventInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return EventInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -51,9 +87,9 @@ public function __construct(Version $version, $workspaceSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -62,62 +98,53 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads EventInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return EventInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of EventInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of EventInstance
+ * @return EventPage Page of EventInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): EventPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'EndDate' => Serialize::iso8601DateTime($options['endDate']),
- 'EventType' => $options['eventType'],
- 'Minutes' => $options['minutes'],
- 'ReservationSid' => $options['reservationSid'],
- 'StartDate' => Serialize::iso8601DateTime($options['startDate']),
- 'TaskQueueSid' => $options['taskQueueSid'],
- 'TaskSid' => $options['taskSid'],
- 'WorkerSid' => $options['workerSid'],
- 'WorkflowSid' => $options['workflowSid'],
- 'TaskChannel' => $options['taskChannel'],
- 'Sid' => $options['sid'],
+
+ $params = Values::of([
+ 'EndDate' =>
+ Serialize::iso8601DateTime($options['endDate']),
+ 'EventType' =>
+ $options['eventType'],
+ 'Minutes' =>
+ $options['minutes'],
+ 'ReservationSid' =>
+ $options['reservationSid'],
+ 'StartDate' =>
+ Serialize::iso8601DateTime($options['startDate']),
+ 'TaskQueueSid' =>
+ $options['taskQueueSid'],
+ 'TaskSid' =>
+ $options['taskSid'],
+ 'WorkerSid' =>
+ $options['workerSid'],
+ 'WorkflowSid' =>
+ $options['workflowSid'],
+ 'TaskChannel' =>
+ $options['taskChannel'],
+ 'Sid' =>
+ $options['sid'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new EventPage($this->version, $response, $this->solution);
}
@@ -127,9 +154,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of EventInstance
+ * @return EventPage Page of EventInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): EventPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -139,15 +166,22 @@ public function getPage($targetUrl)
return new EventPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a EventContext
*
- * @param string $sid The SID of the resource to fetch
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\EventContext
+ * @param string $sid The SID of the Event resource to fetch.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): EventContext
{
- return new EventContext($this->version, $this->solution['workspaceSid'], $sid);
+ return new EventContext(
+ $this->version,
+ $this->solution['workspaceSid'],
+ $sid
+ );
}
/**
@@ -155,8 +189,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.EventList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/EventOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/EventOptions.php
index 67bf5dc..8e94e3f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/EventOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/EventOptions.php
@@ -1,10 +1,16 @@
options['endDate'] = $endDate;
$this->options['eventType'] = $eventType;
$this->options['minutes'] = $minutes;
@@ -71,11 +115,10 @@ public function __construct($endDate = Values::NONE, $eventType = Values::NONE,
/**
* Only include Events that occurred on or before this date, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
*
- * @param \DateTime $endDate Only include usage that occurred on or before this
- * date
+ * @param \DateTime $endDate Only include Events that occurred on or before this date, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
* @return $this Fluent Builder
*/
- public function setEndDate($endDate)
+ public function setEndDate(\DateTime $endDate): self
{
$this->options['endDate'] = $endDate;
return $this;
@@ -84,22 +127,22 @@ public function setEndDate($endDate)
/**
* The type of Events to read. Returns only Events of the type specified.
*
- * @param string $eventType The type of Events to read
+ * @param string $eventType The type of Events to read. Returns only Events of the type specified.
* @return $this Fluent Builder
*/
- public function setEventType($eventType)
+ public function setEventType(string $eventType): self
{
$this->options['eventType'] = $eventType;
return $this;
}
/**
- * The period of events to read in minutes. Returns only Events that occurred since this many minutes in the past. The default is `15` minutes.
+ * The period of events to read in minutes. Returns only Events that occurred since this many minutes in the past. The default is `15` minutes. Task Attributes for Events occuring more 43,200 minutes ago will be redacted.
*
- * @param int $minutes The period of events to read in minutes
+ * @param int $minutes The period of events to read in minutes. Returns only Events that occurred since this many minutes in the past. The default is `15` minutes. Task Attributes for Events occuring more 43,200 minutes ago will be redacted.
* @return $this Fluent Builder
*/
- public function setMinutes($minutes)
+ public function setMinutes(int $minutes): self
{
$this->options['minutes'] = $minutes;
return $this;
@@ -108,23 +151,22 @@ public function setMinutes($minutes)
/**
* The SID of the Reservation with the Events to read. Returns only Events that pertain to the specified Reservation.
*
- * @param string $reservationSid The SID of the Reservation with the Events to
- * read
+ * @param string $reservationSid The SID of the Reservation with the Events to read. Returns only Events that pertain to the specified Reservation.
* @return $this Fluent Builder
*/
- public function setReservationSid($reservationSid)
+ public function setReservationSid(string $reservationSid): self
{
$this->options['reservationSid'] = $reservationSid;
return $this;
}
/**
- * Only include Events from on or after this date and time, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
+ * Only include Events from on or after this date and time, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Task Attributes for Events older than 30 days will be redacted.
*
- * @param \DateTime $startDate Only include Events from on or after this date
+ * @param \DateTime $startDate Only include Events from on or after this date and time, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Task Attributes for Events older than 30 days will be redacted.
* @return $this Fluent Builder
*/
- public function setStartDate($startDate)
+ public function setStartDate(\DateTime $startDate): self
{
$this->options['startDate'] = $startDate;
return $this;
@@ -133,10 +175,10 @@ public function setStartDate($startDate)
/**
* The SID of the TaskQueue with the Events to read. Returns only the Events that pertain to the specified TaskQueue.
*
- * @param string $taskQueueSid The SID of the TaskQueue with the Events to read
+ * @param string $taskQueueSid The SID of the TaskQueue with the Events to read. Returns only the Events that pertain to the specified TaskQueue.
* @return $this Fluent Builder
*/
- public function setTaskQueueSid($taskQueueSid)
+ public function setTaskQueueSid(string $taskQueueSid): self
{
$this->options['taskQueueSid'] = $taskQueueSid;
return $this;
@@ -145,10 +187,10 @@ public function setTaskQueueSid($taskQueueSid)
/**
* The SID of the Task with the Events to read. Returns only the Events that pertain to the specified Task.
*
- * @param string $taskSid The SID of the Task with the Events to read
+ * @param string $taskSid The SID of the Task with the Events to read. Returns only the Events that pertain to the specified Task.
* @return $this Fluent Builder
*/
- public function setTaskSid($taskSid)
+ public function setTaskSid(string $taskSid): self
{
$this->options['taskSid'] = $taskSid;
return $this;
@@ -157,10 +199,10 @@ public function setTaskSid($taskSid)
/**
* The SID of the Worker with the Events to read. Returns only the Events that pertain to the specified Worker.
*
- * @param string $workerSid The SID of the Worker with the Events to read
+ * @param string $workerSid The SID of the Worker with the Events to read. Returns only the Events that pertain to the specified Worker.
* @return $this Fluent Builder
*/
- public function setWorkerSid($workerSid)
+ public function setWorkerSid(string $workerSid): self
{
$this->options['workerSid'] = $workerSid;
return $this;
@@ -169,10 +211,10 @@ public function setWorkerSid($workerSid)
/**
* The SID of the Workflow with the Events to read. Returns only the Events that pertain to the specified Workflow.
*
- * @param string $workflowSid The SID of the Worker with the Events to read
+ * @param string $workflowSid The SID of the Workflow with the Events to read. Returns only the Events that pertain to the specified Workflow.
* @return $this Fluent Builder
*/
- public function setWorkflowSid($workflowSid)
+ public function setWorkflowSid(string $workflowSid): self
{
$this->options['workflowSid'] = $workflowSid;
return $this;
@@ -181,10 +223,10 @@ public function setWorkflowSid($workflowSid)
/**
* The TaskChannel with the Events to read. Returns only the Events that pertain to the specified TaskChannel.
*
- * @param string $taskChannel The TaskChannel with the Events to read
+ * @param string $taskChannel The TaskChannel with the Events to read. Returns only the Events that pertain to the specified TaskChannel.
* @return $this Fluent Builder
*/
- public function setTaskChannel($taskChannel)
+ public function setTaskChannel(string $taskChannel): self
{
$this->options['taskChannel'] = $taskChannel;
return $this;
@@ -193,10 +235,10 @@ public function setTaskChannel($taskChannel)
/**
* The SID of the Event resource to read.
*
- * @param string $sid The unique string that identifies the resource
+ * @param string $sid The SID of the Event resource to read.
* @return $this Fluent Builder
*/
- public function setSid($sid)
+ public function setSid(string $sid): self
{
$this->options['sid'] = $sid;
return $this;
@@ -207,14 +249,10 @@ public function setSid($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Taskrouter.V1.ReadEventOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.ReadEventOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/EventPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/EventPage.php
index 12f9c11..898a6b6 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/EventPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/EventPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return EventInstance \Twilio\Rest\Taskrouter\V1\Workspace\EventInstance
+ */
+ public function buildInstance(array $payload): EventInstance
{
return new EventInstance($this->version, $payload, $this->solution['workspaceSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.EventPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationContext.php
index 4c2374c..b6c5bfb 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationContext.php
@@ -2,58 +2,74 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace\Task;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
class ReservationContext extends InstanceContext
-{
+ {
/**
* Initialize the ReservationContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace with the
- * TaskReservation resource to fetch
- * @param string $taskSid The SID of the reserved Task resource with the
- * TaskReservation resource to fetch
- * @param string $sid The SID of the TaskReservation resource to fetch
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Task\ReservationContext
+ * @param Version $version Version that contains the resource
+ * @param string $workspaceSid The SID of the Workspace with the TaskReservation resource to fetch.
+ * @param string $taskSid The SID of the reserved Task resource with the TaskReservation resource to fetch.
+ * @param string $sid The SID of the TaskReservation resource to fetch.
*/
- public function __construct(Version $version, $workspaceSid, $taskSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $workspaceSid,
+ $taskSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid, 'taskSid' => $taskSid, 'sid' => $sid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+ 'taskSid' =>
+ $taskSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Tasks/' . \rawurlencode($taskSid) . '/Reservations/' . \rawurlencode($sid) . '';
+ $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid)
+ .'/Tasks/' . \rawurlencode($taskSid)
+ .'/Reservations/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a ReservationInstance
+ * Fetch the ReservationInstance
*
* @return ReservationInstance Fetched ReservationInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): ReservationInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new ReservationInstance(
$this->version,
@@ -64,6 +80,7 @@ public function fetch()
);
}
+
/**
* Update the ReservationInstance
*
@@ -71,78 +88,124 @@ public function fetch()
* @return ReservationInstance Updated ReservationInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ReservationInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'ReservationStatus' => $options['reservationStatus'],
- 'WorkerActivitySid' => $options['workerActivitySid'],
- 'Instruction' => $options['instruction'],
- 'DequeuePostWorkActivitySid' => $options['dequeuePostWorkActivitySid'],
- 'DequeueFrom' => $options['dequeueFrom'],
- 'DequeueRecord' => $options['dequeueRecord'],
- 'DequeueTimeout' => $options['dequeueTimeout'],
- 'DequeueTo' => $options['dequeueTo'],
- 'DequeueStatusCallbackUrl' => $options['dequeueStatusCallbackUrl'],
- 'CallFrom' => $options['callFrom'],
- 'CallRecord' => $options['callRecord'],
- 'CallTimeout' => $options['callTimeout'],
- 'CallTo' => $options['callTo'],
- 'CallUrl' => $options['callUrl'],
- 'CallStatusCallbackUrl' => $options['callStatusCallbackUrl'],
- 'CallAccept' => Serialize::booleanToString($options['callAccept']),
- 'RedirectCallSid' => $options['redirectCallSid'],
- 'RedirectAccept' => Serialize::booleanToString($options['redirectAccept']),
- 'RedirectUrl' => $options['redirectUrl'],
- 'To' => $options['to'],
- 'From' => $options['from'],
- 'StatusCallback' => $options['statusCallback'],
- 'StatusCallbackMethod' => $options['statusCallbackMethod'],
- 'StatusCallbackEvent' => Serialize::map($options['statusCallbackEvent'], function ($e) {
- return $e;
- }),
- 'Timeout' => $options['timeout'],
- 'Record' => Serialize::booleanToString($options['record']),
- 'Muted' => Serialize::booleanToString($options['muted']),
- 'Beep' => $options['beep'],
- 'StartConferenceOnEnter' => Serialize::booleanToString($options['startConferenceOnEnter']),
- 'EndConferenceOnExit' => Serialize::booleanToString($options['endConferenceOnExit']),
- 'WaitUrl' => $options['waitUrl'],
- 'WaitMethod' => $options['waitMethod'],
- 'EarlyMedia' => Serialize::booleanToString($options['earlyMedia']),
- 'MaxParticipants' => $options['maxParticipants'],
- 'ConferenceStatusCallback' => $options['conferenceStatusCallback'],
- 'ConferenceStatusCallbackMethod' => $options['conferenceStatusCallbackMethod'],
- 'ConferenceStatusCallbackEvent' => Serialize::map($options['conferenceStatusCallbackEvent'], function ($e) {
- return $e;
- }),
- 'ConferenceRecord' => $options['conferenceRecord'],
- 'ConferenceTrim' => $options['conferenceTrim'],
- 'RecordingChannels' => $options['recordingChannels'],
- 'RecordingStatusCallback' => $options['recordingStatusCallback'],
- 'RecordingStatusCallbackMethod' => $options['recordingStatusCallbackMethod'],
- 'ConferenceRecordingStatusCallback' => $options['conferenceRecordingStatusCallback'],
- 'ConferenceRecordingStatusCallbackMethod' => $options['conferenceRecordingStatusCallbackMethod'],
- 'Region' => $options['region'],
- 'SipAuthUsername' => $options['sipAuthUsername'],
- 'SipAuthPassword' => $options['sipAuthPassword'],
- 'DequeueStatusCallbackEvent' => Serialize::map($options['dequeueStatusCallbackEvent'], function ($e) {
- return $e;
- }),
- 'PostWorkActivitySid' => $options['postWorkActivitySid'],
- 'SupervisorMode' => $options['supervisorMode'],
- 'Supervisor' => $options['supervisor'],
- 'EndConferenceOnCustomerExit' => Serialize::booleanToString($options['endConferenceOnCustomerExit']),
- 'BeepOnCustomerEntrance' => Serialize::booleanToString($options['beepOnCustomerEntrance']),
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'ReservationStatus' =>
+ $options['reservationStatus'],
+ 'WorkerActivitySid' =>
+ $options['workerActivitySid'],
+ 'Instruction' =>
+ $options['instruction'],
+ 'DequeuePostWorkActivitySid' =>
+ $options['dequeuePostWorkActivitySid'],
+ 'DequeueFrom' =>
+ $options['dequeueFrom'],
+ 'DequeueRecord' =>
+ $options['dequeueRecord'],
+ 'DequeueTimeout' =>
+ $options['dequeueTimeout'],
+ 'DequeueTo' =>
+ $options['dequeueTo'],
+ 'DequeueStatusCallbackUrl' =>
+ $options['dequeueStatusCallbackUrl'],
+ 'CallFrom' =>
+ $options['callFrom'],
+ 'CallRecord' =>
+ $options['callRecord'],
+ 'CallTimeout' =>
+ $options['callTimeout'],
+ 'CallTo' =>
+ $options['callTo'],
+ 'CallUrl' =>
+ $options['callUrl'],
+ 'CallStatusCallbackUrl' =>
+ $options['callStatusCallbackUrl'],
+ 'CallAccept' =>
+ Serialize::booleanToString($options['callAccept']),
+ 'RedirectCallSid' =>
+ $options['redirectCallSid'],
+ 'RedirectAccept' =>
+ Serialize::booleanToString($options['redirectAccept']),
+ 'RedirectUrl' =>
+ $options['redirectUrl'],
+ 'To' =>
+ $options['to'],
+ 'From' =>
+ $options['from'],
+ 'StatusCallback' =>
+ $options['statusCallback'],
+ 'StatusCallbackMethod' =>
+ $options['statusCallbackMethod'],
+ 'StatusCallbackEvent' =>
+ $options['statusCallbackEvent'],
+ 'Timeout' =>
+ $options['timeout'],
+ 'Record' =>
+ Serialize::booleanToString($options['record']),
+ 'Muted' =>
+ Serialize::booleanToString($options['muted']),
+ 'Beep' =>
+ $options['beep'],
+ 'StartConferenceOnEnter' =>
+ Serialize::booleanToString($options['startConferenceOnEnter']),
+ 'EndConferenceOnExit' =>
+ Serialize::booleanToString($options['endConferenceOnExit']),
+ 'WaitUrl' =>
+ $options['waitUrl'],
+ 'WaitMethod' =>
+ $options['waitMethod'],
+ 'EarlyMedia' =>
+ Serialize::booleanToString($options['earlyMedia']),
+ 'MaxParticipants' =>
+ $options['maxParticipants'],
+ 'ConferenceStatusCallback' =>
+ $options['conferenceStatusCallback'],
+ 'ConferenceStatusCallbackMethod' =>
+ $options['conferenceStatusCallbackMethod'],
+ 'ConferenceStatusCallbackEvent' =>
+ $options['conferenceStatusCallbackEvent'],
+ 'ConferenceRecord' =>
+ $options['conferenceRecord'],
+ 'ConferenceTrim' =>
+ $options['conferenceTrim'],
+ 'RecordingChannels' =>
+ $options['recordingChannels'],
+ 'RecordingStatusCallback' =>
+ $options['recordingStatusCallback'],
+ 'RecordingStatusCallbackMethod' =>
+ $options['recordingStatusCallbackMethod'],
+ 'ConferenceRecordingStatusCallback' =>
+ $options['conferenceRecordingStatusCallback'],
+ 'ConferenceRecordingStatusCallbackMethod' =>
+ $options['conferenceRecordingStatusCallbackMethod'],
+ 'Region' =>
+ $options['region'],
+ 'SipAuthUsername' =>
+ $options['sipAuthUsername'],
+ 'SipAuthPassword' =>
+ $options['sipAuthPassword'],
+ 'DequeueStatusCallbackEvent' =>
+ Serialize::map($options['dequeueStatusCallbackEvent'], function ($e) { return $e; }),
+ 'PostWorkActivitySid' =>
+ $options['postWorkActivitySid'],
+ 'SupervisorMode' =>
+ $options['supervisorMode'],
+ 'Supervisor' =>
+ $options['supervisor'],
+ 'EndConferenceOnCustomerExit' =>
+ Serialize::booleanToString($options['endConferenceOnCustomerExit']),
+ 'BeepOnCustomerEntrance' =>
+ Serialize::booleanToString($options['beepOnCustomerEntrance']),
+ 'JitterBufferSize' =>
+ $options['jitterBufferSize'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'If-Match' => $options['ifMatch']]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new ReservationInstance(
$this->version,
@@ -153,17 +216,18 @@ public function update($options = array())
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.ReservationContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationInstance.php
index cc0a9e6..696ff18 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationInstance.php
@@ -2,52 +2,59 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace\Task;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
+ * @property string|null $accountSid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
* @property string $reservationStatus
- * @property string $sid
- * @property string $taskSid
- * @property string $workerName
- * @property string $workerSid
- * @property string $workspaceSid
- * @property string $url
- * @property array $links
+ * @property string|null $sid
+ * @property string|null $taskSid
+ * @property string|null $workerName
+ * @property string|null $workerSid
+ * @property string|null $workspaceSid
+ * @property string|null $url
+ * @property array|null $links
*/
class ReservationInstance extends InstanceResource
{
/**
* Initialize the ReservationInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $workspaceSid The SID of the Workspace that this task is
- * contained within.
- * @param string $taskSid The SID of the reserved Task resource
- * @param string $sid The SID of the TaskReservation resource to fetch
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Task\ReservationInstance
+ * @param string $workspaceSid The SID of the Workspace with the TaskReservation resource to fetch.
+ * @param string $taskSid The SID of the reserved Task resource with the TaskReservation resource to fetch.
+ * @param string $sid The SID of the TaskReservation resource to fetch.
*/
- public function __construct(Version $version, array $payload, $workspaceSid, $taskSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $workspaceSid, string $taskSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
@@ -59,25 +66,18 @@ public function __construct(Version $version, array $payload, $workspaceSid, $ta
'workspaceSid' => Values::array_get($payload, 'workspace_sid'),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array(
- 'workspaceSid' => $workspaceSid,
- 'taskSid' => $taskSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['workspaceSid' => $workspaceSid, 'taskSid' => $taskSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Task\ReservationContext Context
- * for
- * this
- * ReservationInstance
+ * @return ReservationContext Context for this ReservationInstance
*/
- protected function proxy()
+ protected function proxy(): ReservationContext
{
if (!$this->context) {
$this->context = new ReservationContext(
@@ -92,13 +92,14 @@ protected function proxy()
}
/**
- * Fetch a ReservationInstance
+ * Fetch the ReservationInstance
*
* @return ReservationInstance Fetched ReservationInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): ReservationInstance
{
+
return $this->proxy()->fetch();
}
@@ -109,8 +110,9 @@ public function fetch()
* @return ReservationInstance Updated ReservationInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ReservationInstance
{
+
return $this->proxy()->update($options);
}
@@ -121,7 +123,7 @@ public function update($options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -140,12 +142,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.ReservationInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationList.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationList.php
index 23afbac..742f7a0 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationList.php
@@ -2,37 +2,77 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Taskrouter\V1\Workspace\Task;
use Twilio\ListResource;
use Twilio\Options;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class ReservationList extends ListResource
-{
+ {
/**
* Construct the ReservationList
*
* @param Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace that this task is
- * contained within.
- * @param string $taskSid The SID of the reserved Task resource
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Task\ReservationList
+ * @param string $workspaceSid The SID of the Workspace with the TaskReservation resource to fetch.
+ * @param string $taskSid The SID of the reserved Task resource with the TaskReservation resource to fetch.
*/
- public function __construct(Version $version, $workspaceSid, $taskSid)
- {
+ public function __construct(
+ Version $version,
+ string $workspaceSid,
+ string $taskSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid, 'taskSid' => $taskSid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+
+ 'taskSid' =>
+ $taskSid,
+
+ ];
+
+ $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid)
+ .'/Tasks/' . \rawurlencode($taskSid)
+ .'/Reservations';
+ }
- $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Tasks/' . \rawurlencode($taskSid) . '/Reservations';
+ /**
+ * Reads ReservationInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return ReservationInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -52,9 +92,9 @@ public function __construct(Version $version, $workspaceSid, $taskSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -63,52 +103,35 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads ReservationInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return ReservationInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of ReservationInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of ReservationInstance
+ * @return ReservationPage Page of ReservationInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): ReservationPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'ReservationStatus' => $options['reservationStatus'],
+
+ $params = Values::of([
+ 'ReservationStatus' =>
+ $options['reservationStatus'],
+ 'WorkerSid' =>
+ $options['workerSid'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new ReservationPage($this->version, $response, $this->solution);
}
@@ -118,9 +141,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of ReservationInstance
+ * @return ReservationPage Page of ReservationInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): ReservationPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -130,13 +153,16 @@ public function getPage($targetUrl)
return new ReservationPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a ReservationContext
*
- * @param string $sid The SID of the TaskReservation resource to fetch
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Task\ReservationContext
+ * @param string $sid The SID of the TaskReservation resource to fetch.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): ReservationContext
{
return new ReservationContext(
$this->version,
@@ -151,8 +177,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.ReservationList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationOptions.php
index df8b4ed..1d7c4d8 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationOptions.php
@@ -1,10 +1,16 @@
options['reservationStatus'] = $reservationStatus;
+ $this->options['workerSid'] = $workerSid;
}
/**
* Returns the list of reservations for a task with a specified ReservationStatus. Can be: `pending`, `accepted`, `rejected`, or `timeout`.
*
- * @param string $reservationStatus Returns the list of reservations for a task
- * with a specified ReservationStatus
+ * @param string $reservationStatus Returns the list of reservations for a task with a specified ReservationStatus. Can be: `pending`, `accepted`, `rejected`, or `timeout`.
* @return $this Fluent Builder
*/
- public function setReservationStatus($reservationStatus)
+ public function setReservationStatus(string $reservationStatus): self
{
$this->options['reservationStatus'] = $reservationStatus;
return $this;
}
+ /**
+ * The SID of the reserved Worker resource to read.
+ *
+ * @param string $workerSid The SID of the reserved Worker resource to read.
+ * @return $this Fluent Builder
+ */
+ public function setWorkerSid(string $workerSid): self
+ {
+ $this->options['workerSid'] = $workerSid;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Taskrouter.V1.ReadReservationOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.ReadReservationOptions ' . $options . ']';
}
}
class UpdateReservationOptions extends Options
-{
+ {
/**
- * @param string $reservationStatus The new status of the reservation
- * @param string $workerActivitySid The new worker activity SID if rejecting a
- * reservation
- * @param string $instruction The assignment instruction for reservation
- * @param string $dequeuePostWorkActivitySid The SID of the Activity resource
- * to start after executing a Dequeue
- * instruction
- * @param string $dequeueFrom The Caller ID of the call to the worker when
- * executing a Dequeue instruction
- * @param string $dequeueRecord Whether to record both legs of a call when
- * executing a Dequeue instruction
- * @param int $dequeueTimeout Timeout for call when executing a Dequeue
- * instruction
- * @param string $dequeueTo The Contact URI of the worker when executing a
- * Dequeue instruction
- * @param string $dequeueStatusCallbackUrl The Callback URL for completed call
- * event when executing a Dequeue
- * instruction
- * @param string $callFrom The Caller ID of the outbound call when executing a
- * Call instruction
- * @param string $callRecord Whether to record both legs of a call when
- * executing a Call instruction
- * @param int $callTimeout Timeout for call when executing a Call instruction
- * @param string $callTo The Contact URI of the worker when executing a Call
- * instruction
- * @param string $callUrl TwiML URI executed on answering the worker's leg as a
- * result of the Call instruction
- * @param string $callStatusCallbackUrl The URL to call for the completed call
- * event when executing a Call instruction
- * @param bool $callAccept Whether to accept a reservation when executing a
- * Call instruction
- * @param string $redirectCallSid The Call SID of the call parked in the queue
- * when executing a Redirect instruction
- * @param bool $redirectAccept Whether the reservation should be accepted when
- * executing a Redirect instruction
- * @param string $redirectUrl TwiML URI to redirect the call to when executing
- * the Redirect instruction
- * @param string $to The Contact URI of the worker when executing a Conference
- * instruction
- * @param string $from The Caller ID of the call to the worker when executing a
- * Conference instruction
- * @param string $statusCallback The URL we should call to send status
- * information to your application
- * @param string $statusCallbackMethod The HTTP method we should use to call
- * status_callback
- * @param string $statusCallbackEvent The call progress events that we will
- * send to status_callback
- * @param int $timeout Timeout for call when executing a Conference instruction
- * @param bool $record Whether to record the participant and their conferences
- * @param bool $muted Whether to mute the agent
- * @param string $beep Whether to play a notification beep when the participant
- * joins
- * @param bool $startConferenceOnEnter Whether the conference starts when the
- * participant joins the conference
- * @param bool $endConferenceOnExit Whether to end the conference when the
- * agent leaves
- * @param string $waitUrl URL that hosts pre-conference hold music
- * @param string $waitMethod The HTTP method we should use to call `wait_url`
- * @param bool $earlyMedia Whether agents can hear the state of the outbound
- * call
- * @param int $maxParticipants The maximum number of agent conference
- * participants
- * @param string $conferenceStatusCallback The callback URL for conference
- * events
- * @param string $conferenceStatusCallbackMethod HTTP method for requesting
- * `conference_status_callback`
- * URL
- * @param string $conferenceStatusCallbackEvent The conference status events
- * that we will send to
- * conference_status_callback
- * @param string $conferenceRecord Whether to record the conference the
- * participant is joining
- * @param string $conferenceTrim How to trim leading and trailing silence from
- * your recorded conference audio files
- * @param string $recordingChannels Specify `mono` or `dual` recording channels
- * @param string $recordingStatusCallback The URL that we should call using the
- * `recording_status_callback_method`
- * when the recording status changes
- * @param string $recordingStatusCallbackMethod The HTTP method we should use
- * when we call
- * `recording_status_callback`
- * @param string $conferenceRecordingStatusCallback The URL we should call
- * using the
- * `conference_recording_status_callback_method` when the conference recording is available
- * @param string $conferenceRecordingStatusCallbackMethod The HTTP method we
- * should use to call
- * `conference_recording_status_callback`
- * @param string $region The region where we should mix the conference audio
- * @param string $sipAuthUsername The SIP username used for authentication
- * @param string $sipAuthPassword The SIP password for authentication
- * @param string $dequeueStatusCallbackEvent The Call progress events sent via
- * webhooks as a result of a Dequeue
- * instruction
- * @param string $postWorkActivitySid The new worker activity SID after
- * executing a Conference instruction
- * @param string $supervisorMode The Supervisor mode when executing the
- * Supervise instruction
- * @param string $supervisor The Supervisor SID/URI when executing the
- * Supervise instruction
- * @param bool $endConferenceOnCustomerExit Whether to end the conference when
- * the customer leaves
- * @param bool $beepOnCustomerEntrance Whether to play a notification beep when
- * the customer joins
+ * @param string $reservationStatus
+ * @param string $workerActivitySid The new worker activity SID if rejecting a reservation.
+ * @param string $instruction The assignment instruction for reservation.
+ * @param string $dequeuePostWorkActivitySid The SID of the Activity resource to start after executing a Dequeue instruction.
+ * @param string $dequeueFrom The Caller ID of the call to the worker when executing a Dequeue instruction.
+ * @param string $dequeueRecord Whether to record both legs of a call when executing a Dequeue instruction or which leg to record.
+ * @param int $dequeueTimeout Timeout for call when executing a Dequeue instruction.
+ * @param string $dequeueTo The Contact URI of the worker when executing a Dequeue instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination.
+ * @param string $dequeueStatusCallbackUrl The Callback URL for completed call event when executing a Dequeue instruction.
+ * @param string $callFrom The Caller ID of the outbound call when executing a Call instruction.
+ * @param string $callRecord Whether to record both legs of a call when executing a Call instruction or which leg to record.
+ * @param int $callTimeout Timeout for call when executing a Call instruction.
+ * @param string $callTo The Contact URI of the worker when executing a Call instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination.
+ * @param string $callUrl TwiML URI executed on answering the worker's leg as a result of the Call instruction.
+ * @param string $callStatusCallbackUrl The URL to call for the completed call event when executing a Call instruction.
+ * @param bool $callAccept Whether to accept a reservation when executing a Call instruction.
+ * @param string $redirectCallSid The Call SID of the call parked in the queue when executing a Redirect instruction.
+ * @param bool $redirectAccept Whether the reservation should be accepted when executing a Redirect instruction.
+ * @param string $redirectUrl TwiML URI to redirect the call to when executing the Redirect instruction.
+ * @param string $to The Contact URI of the worker when executing a Conference instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination.
+ * @param string $from The Caller ID of the call to the worker when executing a Conference instruction.
+ * @param string $statusCallback The URL we should call using the `status_callback_method` to send status information to your application.
+ * @param string $statusCallbackMethod The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`.
+ * @param string $statusCallbackEvent The call progress events that we will send to `status_callback`. Can be: `initiated`, `ringing`, `answered`, or `completed`.
+ * @param int $timeout Timeout for call when executing a Conference instruction.
+ * @param bool $record Whether to record the participant and their conferences, including the time between conferences. The default is `false`.
+ * @param bool $muted Whether the agent is muted in the conference. The default is `false`.
+ * @param string $beep Whether to play a notification beep when the participant joins or when to play a beep. Can be: `true`, `false`, `onEnter`, or `onExit`. The default value is `true`.
+ * @param bool $startConferenceOnEnter Whether to start the conference when the participant joins, if it has not already started. The default is `true`. If `false` and the conference has not started, the participant is muted and hears background music until another participant starts the conference.
+ * @param bool $endConferenceOnExit Whether to end the conference when the agent leaves.
+ * @param string $waitUrl The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic).
+ * @param string $waitMethod The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file.
+ * @param bool $earlyMedia Whether to allow an agent to hear the state of the outbound call, including ringing or disconnect messages. The default is `true`.
+ * @param int $maxParticipants The maximum number of participants in the conference. Can be a positive integer from `2` to `250`. The default value is `250`.
+ * @param string $conferenceStatusCallback The URL we should call using the `conference_status_callback_method` when the conference events in `conference_status_callback_event` occur. Only the value set by the first participant to join the conference is used. Subsequent `conference_status_callback` values are ignored.
+ * @param string $conferenceStatusCallbackMethod The HTTP method we should use to call `conference_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
+ * @param string $conferenceStatusCallbackEvent The conference status events that we will send to `conference_status_callback`. Can be: `start`, `end`, `join`, `leave`, `mute`, `hold`, `speaker`.
+ * @param string $conferenceRecord Whether to record the conference the participant is joining or when to record the conference. Can be: `true`, `false`, `record-from-start`, and `do-not-record`. The default value is `false`.
+ * @param string $conferenceTrim How to trim the leading and trailing silence from your recorded conference audio files. Can be: `trim-silence` or `do-not-trim` and defaults to `trim-silence`.
+ * @param string $recordingChannels The recording channels for the final recording. Can be: `mono` or `dual` and the default is `mono`.
+ * @param string $recordingStatusCallback The URL that we should call using the `recording_status_callback_method` when the recording status changes.
+ * @param string $recordingStatusCallbackMethod The HTTP method we should use when we call `recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
+ * @param string $conferenceRecordingStatusCallback The URL we should call using the `conference_recording_status_callback_method` when the conference recording is available.
+ * @param string $conferenceRecordingStatusCallbackMethod The HTTP method we should use to call `conference_recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
+ * @param string $region The [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls) where we should mix the recorded audio. Can be:`us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, or `jp1`.
+ * @param string $sipAuthUsername The SIP username used for authentication.
+ * @param string $sipAuthPassword The SIP password for authentication.
+ * @param string[] $dequeueStatusCallbackEvent The Call progress events sent via webhooks as a result of a Dequeue instruction.
+ * @param string $postWorkActivitySid The new worker activity SID after executing a Conference instruction.
+ * @param string $supervisorMode
+ * @param string $supervisor The Supervisor SID/URI when executing the Supervise instruction.
+ * @param bool $endConferenceOnCustomerExit Whether to end the conference when the customer leaves.
+ * @param bool $beepOnCustomerEntrance Whether to play a notification beep when the customer joins.
+ * @param string $jitterBufferSize The jitter buffer size for conference. Can be: `small`, `medium`, `large`, `off`.
+ * @param string $ifMatch The If-Match HTTP request header
*/
- public function __construct($reservationStatus = Values::NONE, $workerActivitySid = Values::NONE, $instruction = Values::NONE, $dequeuePostWorkActivitySid = Values::NONE, $dequeueFrom = Values::NONE, $dequeueRecord = Values::NONE, $dequeueTimeout = Values::NONE, $dequeueTo = Values::NONE, $dequeueStatusCallbackUrl = Values::NONE, $callFrom = Values::NONE, $callRecord = Values::NONE, $callTimeout = Values::NONE, $callTo = Values::NONE, $callUrl = Values::NONE, $callStatusCallbackUrl = Values::NONE, $callAccept = Values::NONE, $redirectCallSid = Values::NONE, $redirectAccept = Values::NONE, $redirectUrl = Values::NONE, $to = Values::NONE, $from = Values::NONE, $statusCallback = Values::NONE, $statusCallbackMethod = Values::NONE, $statusCallbackEvent = Values::NONE, $timeout = Values::NONE, $record = Values::NONE, $muted = Values::NONE, $beep = Values::NONE, $startConferenceOnEnter = Values::NONE, $endConferenceOnExit = Values::NONE, $waitUrl = Values::NONE, $waitMethod = Values::NONE, $earlyMedia = Values::NONE, $maxParticipants = Values::NONE, $conferenceStatusCallback = Values::NONE, $conferenceStatusCallbackMethod = Values::NONE, $conferenceStatusCallbackEvent = Values::NONE, $conferenceRecord = Values::NONE, $conferenceTrim = Values::NONE, $recordingChannels = Values::NONE, $recordingStatusCallback = Values::NONE, $recordingStatusCallbackMethod = Values::NONE, $conferenceRecordingStatusCallback = Values::NONE, $conferenceRecordingStatusCallbackMethod = Values::NONE, $region = Values::NONE, $sipAuthUsername = Values::NONE, $sipAuthPassword = Values::NONE, $dequeueStatusCallbackEvent = Values::NONE, $postWorkActivitySid = Values::NONE, $supervisorMode = Values::NONE, $supervisor = Values::NONE, $endConferenceOnCustomerExit = Values::NONE, $beepOnCustomerEntrance = Values::NONE)
- {
+ public function __construct(
+
+ string $reservationStatus = Values::NONE,
+ string $workerActivitySid = Values::NONE,
+ string $instruction = Values::NONE,
+ string $dequeuePostWorkActivitySid = Values::NONE,
+ string $dequeueFrom = Values::NONE,
+ string $dequeueRecord = Values::NONE,
+ int $dequeueTimeout = Values::INT_NONE,
+ string $dequeueTo = Values::NONE,
+ string $dequeueStatusCallbackUrl = Values::NONE,
+ string $callFrom = Values::NONE,
+ string $callRecord = Values::NONE,
+ int $callTimeout = Values::INT_NONE,
+ string $callTo = Values::NONE,
+ string $callUrl = Values::NONE,
+ string $callStatusCallbackUrl = Values::NONE,
+ bool $callAccept = Values::BOOL_NONE,
+ string $redirectCallSid = Values::NONE,
+ bool $redirectAccept = Values::BOOL_NONE,
+ string $redirectUrl = Values::NONE,
+ string $to = Values::NONE,
+ string $from = Values::NONE,
+ string $statusCallback = Values::NONE,
+ string $statusCallbackMethod = Values::NONE,
+ array $statusCallbackEvent = Values::ARRAY_NONE,
+ int $timeout = Values::INT_NONE,
+ bool $record = Values::BOOL_NONE,
+ bool $muted = Values::BOOL_NONE,
+ string $beep = Values::NONE,
+ bool $startConferenceOnEnter = Values::BOOL_NONE,
+ bool $endConferenceOnExit = Values::BOOL_NONE,
+ string $waitUrl = Values::NONE,
+ string $waitMethod = Values::NONE,
+ bool $earlyMedia = Values::BOOL_NONE,
+ int $maxParticipants = Values::INT_NONE,
+ string $conferenceStatusCallback = Values::NONE,
+ string $conferenceStatusCallbackMethod = Values::NONE,
+ array $conferenceStatusCallbackEvent = Values::ARRAY_NONE,
+ string $conferenceRecord = Values::NONE,
+ string $conferenceTrim = Values::NONE,
+ string $recordingChannels = Values::NONE,
+ string $recordingStatusCallback = Values::NONE,
+ string $recordingStatusCallbackMethod = Values::NONE,
+ string $conferenceRecordingStatusCallback = Values::NONE,
+ string $conferenceRecordingStatusCallbackMethod = Values::NONE,
+ string $region = Values::NONE,
+ string $sipAuthUsername = Values::NONE,
+ string $sipAuthPassword = Values::NONE,
+ array $dequeueStatusCallbackEvent = Values::ARRAY_NONE,
+ string $postWorkActivitySid = Values::NONE,
+ string $supervisorMode = Values::NONE,
+ string $supervisor = Values::NONE,
+ bool $endConferenceOnCustomerExit = Values::BOOL_NONE,
+ bool $beepOnCustomerEntrance = Values::BOOL_NONE,
+ string $jitterBufferSize = Values::NONE,
+ string $ifMatch = Values::NONE
+
+ ) {
$this->options['reservationStatus'] = $reservationStatus;
$this->options['workerActivitySid'] = $workerActivitySid;
$this->options['instruction'] = $instruction;
@@ -339,15 +442,15 @@ public function __construct($reservationStatus = Values::NONE, $workerActivitySi
$this->options['supervisor'] = $supervisor;
$this->options['endConferenceOnCustomerExit'] = $endConferenceOnCustomerExit;
$this->options['beepOnCustomerEntrance'] = $beepOnCustomerEntrance;
+ $this->options['jitterBufferSize'] = $jitterBufferSize;
+ $this->options['ifMatch'] = $ifMatch;
}
/**
- * The new status of the reservation. Can be: `pending`, `accepted`, `rejected`, or `timeout`.
- *
- * @param string $reservationStatus The new status of the reservation
+ * @param string $reservationStatus
* @return $this Fluent Builder
*/
- public function setReservationStatus($reservationStatus)
+ public function setReservationStatus(string $reservationStatus): self
{
$this->options['reservationStatus'] = $reservationStatus;
return $this;
@@ -356,11 +459,10 @@ public function setReservationStatus($reservationStatus)
/**
* The new worker activity SID if rejecting a reservation.
*
- * @param string $workerActivitySid The new worker activity SID if rejecting a
- * reservation
+ * @param string $workerActivitySid The new worker activity SID if rejecting a reservation.
* @return $this Fluent Builder
*/
- public function setWorkerActivitySid($workerActivitySid)
+ public function setWorkerActivitySid(string $workerActivitySid): self
{
$this->options['workerActivitySid'] = $workerActivitySid;
return $this;
@@ -369,10 +471,10 @@ public function setWorkerActivitySid($workerActivitySid)
/**
* The assignment instruction for reservation.
*
- * @param string $instruction The assignment instruction for reservation
+ * @param string $instruction The assignment instruction for reservation.
* @return $this Fluent Builder
*/
- public function setInstruction($instruction)
+ public function setInstruction(string $instruction): self
{
$this->options['instruction'] = $instruction;
return $this;
@@ -381,12 +483,10 @@ public function setInstruction($instruction)
/**
* The SID of the Activity resource to start after executing a Dequeue instruction.
*
- * @param string $dequeuePostWorkActivitySid The SID of the Activity resource
- * to start after executing a Dequeue
- * instruction
+ * @param string $dequeuePostWorkActivitySid The SID of the Activity resource to start after executing a Dequeue instruction.
* @return $this Fluent Builder
*/
- public function setDequeuePostWorkActivitySid($dequeuePostWorkActivitySid)
+ public function setDequeuePostWorkActivitySid(string $dequeuePostWorkActivitySid): self
{
$this->options['dequeuePostWorkActivitySid'] = $dequeuePostWorkActivitySid;
return $this;
@@ -395,11 +495,10 @@ public function setDequeuePostWorkActivitySid($dequeuePostWorkActivitySid)
/**
* The Caller ID of the call to the worker when executing a Dequeue instruction.
*
- * @param string $dequeueFrom The Caller ID of the call to the worker when
- * executing a Dequeue instruction
+ * @param string $dequeueFrom The Caller ID of the call to the worker when executing a Dequeue instruction.
* @return $this Fluent Builder
*/
- public function setDequeueFrom($dequeueFrom)
+ public function setDequeueFrom(string $dequeueFrom): self
{
$this->options['dequeueFrom'] = $dequeueFrom;
return $this;
@@ -408,11 +507,10 @@ public function setDequeueFrom($dequeueFrom)
/**
* Whether to record both legs of a call when executing a Dequeue instruction or which leg to record.
*
- * @param string $dequeueRecord Whether to record both legs of a call when
- * executing a Dequeue instruction
+ * @param string $dequeueRecord Whether to record both legs of a call when executing a Dequeue instruction or which leg to record.
* @return $this Fluent Builder
*/
- public function setDequeueRecord($dequeueRecord)
+ public function setDequeueRecord(string $dequeueRecord): self
{
$this->options['dequeueRecord'] = $dequeueRecord;
return $this;
@@ -421,11 +519,10 @@ public function setDequeueRecord($dequeueRecord)
/**
* Timeout for call when executing a Dequeue instruction.
*
- * @param int $dequeueTimeout Timeout for call when executing a Dequeue
- * instruction
+ * @param int $dequeueTimeout Timeout for call when executing a Dequeue instruction.
* @return $this Fluent Builder
*/
- public function setDequeueTimeout($dequeueTimeout)
+ public function setDequeueTimeout(int $dequeueTimeout): self
{
$this->options['dequeueTimeout'] = $dequeueTimeout;
return $this;
@@ -434,11 +531,10 @@ public function setDequeueTimeout($dequeueTimeout)
/**
* The Contact URI of the worker when executing a Dequeue instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination.
*
- * @param string $dequeueTo The Contact URI of the worker when executing a
- * Dequeue instruction
+ * @param string $dequeueTo The Contact URI of the worker when executing a Dequeue instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination.
* @return $this Fluent Builder
*/
- public function setDequeueTo($dequeueTo)
+ public function setDequeueTo(string $dequeueTo): self
{
$this->options['dequeueTo'] = $dequeueTo;
return $this;
@@ -447,12 +543,10 @@ public function setDequeueTo($dequeueTo)
/**
* The Callback URL for completed call event when executing a Dequeue instruction.
*
- * @param string $dequeueStatusCallbackUrl The Callback URL for completed call
- * event when executing a Dequeue
- * instruction
+ * @param string $dequeueStatusCallbackUrl The Callback URL for completed call event when executing a Dequeue instruction.
* @return $this Fluent Builder
*/
- public function setDequeueStatusCallbackUrl($dequeueStatusCallbackUrl)
+ public function setDequeueStatusCallbackUrl(string $dequeueStatusCallbackUrl): self
{
$this->options['dequeueStatusCallbackUrl'] = $dequeueStatusCallbackUrl;
return $this;
@@ -461,11 +555,10 @@ public function setDequeueStatusCallbackUrl($dequeueStatusCallbackUrl)
/**
* The Caller ID of the outbound call when executing a Call instruction.
*
- * @param string $callFrom The Caller ID of the outbound call when executing a
- * Call instruction
+ * @param string $callFrom The Caller ID of the outbound call when executing a Call instruction.
* @return $this Fluent Builder
*/
- public function setCallFrom($callFrom)
+ public function setCallFrom(string $callFrom): self
{
$this->options['callFrom'] = $callFrom;
return $this;
@@ -474,11 +567,10 @@ public function setCallFrom($callFrom)
/**
* Whether to record both legs of a call when executing a Call instruction or which leg to record.
*
- * @param string $callRecord Whether to record both legs of a call when
- * executing a Call instruction
+ * @param string $callRecord Whether to record both legs of a call when executing a Call instruction or which leg to record.
* @return $this Fluent Builder
*/
- public function setCallRecord($callRecord)
+ public function setCallRecord(string $callRecord): self
{
$this->options['callRecord'] = $callRecord;
return $this;
@@ -487,10 +579,10 @@ public function setCallRecord($callRecord)
/**
* Timeout for call when executing a Call instruction.
*
- * @param int $callTimeout Timeout for call when executing a Call instruction
+ * @param int $callTimeout Timeout for call when executing a Call instruction.
* @return $this Fluent Builder
*/
- public function setCallTimeout($callTimeout)
+ public function setCallTimeout(int $callTimeout): self
{
$this->options['callTimeout'] = $callTimeout;
return $this;
@@ -499,11 +591,10 @@ public function setCallTimeout($callTimeout)
/**
* The Contact URI of the worker when executing a Call instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination.
*
- * @param string $callTo The Contact URI of the worker when executing a Call
- * instruction
+ * @param string $callTo The Contact URI of the worker when executing a Call instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination.
* @return $this Fluent Builder
*/
- public function setCallTo($callTo)
+ public function setCallTo(string $callTo): self
{
$this->options['callTo'] = $callTo;
return $this;
@@ -512,11 +603,10 @@ public function setCallTo($callTo)
/**
* TwiML URI executed on answering the worker's leg as a result of the Call instruction.
*
- * @param string $callUrl TwiML URI executed on answering the worker's leg as a
- * result of the Call instruction
+ * @param string $callUrl TwiML URI executed on answering the worker's leg as a result of the Call instruction.
* @return $this Fluent Builder
*/
- public function setCallUrl($callUrl)
+ public function setCallUrl(string $callUrl): self
{
$this->options['callUrl'] = $callUrl;
return $this;
@@ -525,11 +615,10 @@ public function setCallUrl($callUrl)
/**
* The URL to call for the completed call event when executing a Call instruction.
*
- * @param string $callStatusCallbackUrl The URL to call for the completed call
- * event when executing a Call instruction
+ * @param string $callStatusCallbackUrl The URL to call for the completed call event when executing a Call instruction.
* @return $this Fluent Builder
*/
- public function setCallStatusCallbackUrl($callStatusCallbackUrl)
+ public function setCallStatusCallbackUrl(string $callStatusCallbackUrl): self
{
$this->options['callStatusCallbackUrl'] = $callStatusCallbackUrl;
return $this;
@@ -538,11 +627,10 @@ public function setCallStatusCallbackUrl($callStatusCallbackUrl)
/**
* Whether to accept a reservation when executing a Call instruction.
*
- * @param bool $callAccept Whether to accept a reservation when executing a
- * Call instruction
+ * @param bool $callAccept Whether to accept a reservation when executing a Call instruction.
* @return $this Fluent Builder
*/
- public function setCallAccept($callAccept)
+ public function setCallAccept(bool $callAccept): self
{
$this->options['callAccept'] = $callAccept;
return $this;
@@ -551,11 +639,10 @@ public function setCallAccept($callAccept)
/**
* The Call SID of the call parked in the queue when executing a Redirect instruction.
*
- * @param string $redirectCallSid The Call SID of the call parked in the queue
- * when executing a Redirect instruction
+ * @param string $redirectCallSid The Call SID of the call parked in the queue when executing a Redirect instruction.
* @return $this Fluent Builder
*/
- public function setRedirectCallSid($redirectCallSid)
+ public function setRedirectCallSid(string $redirectCallSid): self
{
$this->options['redirectCallSid'] = $redirectCallSid;
return $this;
@@ -564,11 +651,10 @@ public function setRedirectCallSid($redirectCallSid)
/**
* Whether the reservation should be accepted when executing a Redirect instruction.
*
- * @param bool $redirectAccept Whether the reservation should be accepted when
- * executing a Redirect instruction
+ * @param bool $redirectAccept Whether the reservation should be accepted when executing a Redirect instruction.
* @return $this Fluent Builder
*/
- public function setRedirectAccept($redirectAccept)
+ public function setRedirectAccept(bool $redirectAccept): self
{
$this->options['redirectAccept'] = $redirectAccept;
return $this;
@@ -577,11 +663,10 @@ public function setRedirectAccept($redirectAccept)
/**
* TwiML URI to redirect the call to when executing the Redirect instruction.
*
- * @param string $redirectUrl TwiML URI to redirect the call to when executing
- * the Redirect instruction
+ * @param string $redirectUrl TwiML URI to redirect the call to when executing the Redirect instruction.
* @return $this Fluent Builder
*/
- public function setRedirectUrl($redirectUrl)
+ public function setRedirectUrl(string $redirectUrl): self
{
$this->options['redirectUrl'] = $redirectUrl;
return $this;
@@ -590,11 +675,10 @@ public function setRedirectUrl($redirectUrl)
/**
* The Contact URI of the worker when executing a Conference instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination.
*
- * @param string $to The Contact URI of the worker when executing a Conference
- * instruction
+ * @param string $to The Contact URI of the worker when executing a Conference instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination.
* @return $this Fluent Builder
*/
- public function setTo($to)
+ public function setTo(string $to): self
{
$this->options['to'] = $to;
return $this;
@@ -603,11 +687,10 @@ public function setTo($to)
/**
* The Caller ID of the call to the worker when executing a Conference instruction.
*
- * @param string $from The Caller ID of the call to the worker when executing a
- * Conference instruction
+ * @param string $from The Caller ID of the call to the worker when executing a Conference instruction.
* @return $this Fluent Builder
*/
- public function setFrom($from)
+ public function setFrom(string $from): self
{
$this->options['from'] = $from;
return $this;
@@ -616,11 +699,10 @@ public function setFrom($from)
/**
* The URL we should call using the `status_callback_method` to send status information to your application.
*
- * @param string $statusCallback The URL we should call to send status
- * information to your application
+ * @param string $statusCallback The URL we should call using the `status_callback_method` to send status information to your application.
* @return $this Fluent Builder
*/
- public function setStatusCallback($statusCallback)
+ public function setStatusCallback(string $statusCallback): self
{
$this->options['statusCallback'] = $statusCallback;
return $this;
@@ -629,11 +711,10 @@ public function setStatusCallback($statusCallback)
/**
* The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`.
*
- * @param string $statusCallbackMethod The HTTP method we should use to call
- * status_callback
+ * @param string $statusCallbackMethod The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`.
* @return $this Fluent Builder
*/
- public function setStatusCallbackMethod($statusCallbackMethod)
+ public function setStatusCallbackMethod(string $statusCallbackMethod): self
{
$this->options['statusCallbackMethod'] = $statusCallbackMethod;
return $this;
@@ -642,11 +723,10 @@ public function setStatusCallbackMethod($statusCallbackMethod)
/**
* The call progress events that we will send to `status_callback`. Can be: `initiated`, `ringing`, `answered`, or `completed`.
*
- * @param string $statusCallbackEvent The call progress events that we will
- * send to status_callback
+ * @param string $statusCallbackEvent The call progress events that we will send to `status_callback`. Can be: `initiated`, `ringing`, `answered`, or `completed`.
* @return $this Fluent Builder
*/
- public function setStatusCallbackEvent($statusCallbackEvent)
+ public function setStatusCallbackEvent(array $statusCallbackEvent): self
{
$this->options['statusCallbackEvent'] = $statusCallbackEvent;
return $this;
@@ -655,10 +735,10 @@ public function setStatusCallbackEvent($statusCallbackEvent)
/**
* Timeout for call when executing a Conference instruction.
*
- * @param int $timeout Timeout for call when executing a Conference instruction
+ * @param int $timeout Timeout for call when executing a Conference instruction.
* @return $this Fluent Builder
*/
- public function setTimeout($timeout)
+ public function setTimeout(int $timeout): self
{
$this->options['timeout'] = $timeout;
return $this;
@@ -667,10 +747,10 @@ public function setTimeout($timeout)
/**
* Whether to record the participant and their conferences, including the time between conferences. The default is `false`.
*
- * @param bool $record Whether to record the participant and their conferences
+ * @param bool $record Whether to record the participant and their conferences, including the time between conferences. The default is `false`.
* @return $this Fluent Builder
*/
- public function setRecord($record)
+ public function setRecord(bool $record): self
{
$this->options['record'] = $record;
return $this;
@@ -679,10 +759,10 @@ public function setRecord($record)
/**
* Whether the agent is muted in the conference. The default is `false`.
*
- * @param bool $muted Whether to mute the agent
+ * @param bool $muted Whether the agent is muted in the conference. The default is `false`.
* @return $this Fluent Builder
*/
- public function setMuted($muted)
+ public function setMuted(bool $muted): self
{
$this->options['muted'] = $muted;
return $this;
@@ -691,11 +771,10 @@ public function setMuted($muted)
/**
* Whether to play a notification beep when the participant joins or when to play a beep. Can be: `true`, `false`, `onEnter`, or `onExit`. The default value is `true`.
*
- * @param string $beep Whether to play a notification beep when the participant
- * joins
+ * @param string $beep Whether to play a notification beep when the participant joins or when to play a beep. Can be: `true`, `false`, `onEnter`, or `onExit`. The default value is `true`.
* @return $this Fluent Builder
*/
- public function setBeep($beep)
+ public function setBeep(string $beep): self
{
$this->options['beep'] = $beep;
return $this;
@@ -704,11 +783,10 @@ public function setBeep($beep)
/**
* Whether to start the conference when the participant joins, if it has not already started. The default is `true`. If `false` and the conference has not started, the participant is muted and hears background music until another participant starts the conference.
*
- * @param bool $startConferenceOnEnter Whether the conference starts when the
- * participant joins the conference
+ * @param bool $startConferenceOnEnter Whether to start the conference when the participant joins, if it has not already started. The default is `true`. If `false` and the conference has not started, the participant is muted and hears background music until another participant starts the conference.
* @return $this Fluent Builder
*/
- public function setStartConferenceOnEnter($startConferenceOnEnter)
+ public function setStartConferenceOnEnter(bool $startConferenceOnEnter): self
{
$this->options['startConferenceOnEnter'] = $startConferenceOnEnter;
return $this;
@@ -717,11 +795,10 @@ public function setStartConferenceOnEnter($startConferenceOnEnter)
/**
* Whether to end the conference when the agent leaves.
*
- * @param bool $endConferenceOnExit Whether to end the conference when the
- * agent leaves
+ * @param bool $endConferenceOnExit Whether to end the conference when the agent leaves.
* @return $this Fluent Builder
*/
- public function setEndConferenceOnExit($endConferenceOnExit)
+ public function setEndConferenceOnExit(bool $endConferenceOnExit): self
{
$this->options['endConferenceOnExit'] = $endConferenceOnExit;
return $this;
@@ -730,10 +807,10 @@ public function setEndConferenceOnExit($endConferenceOnExit)
/**
* The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic).
*
- * @param string $waitUrl URL that hosts pre-conference hold music
+ * @param string $waitUrl The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic).
* @return $this Fluent Builder
*/
- public function setWaitUrl($waitUrl)
+ public function setWaitUrl(string $waitUrl): self
{
$this->options['waitUrl'] = $waitUrl;
return $this;
@@ -742,10 +819,10 @@ public function setWaitUrl($waitUrl)
/**
* The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file.
*
- * @param string $waitMethod The HTTP method we should use to call `wait_url`
+ * @param string $waitMethod The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file.
* @return $this Fluent Builder
*/
- public function setWaitMethod($waitMethod)
+ public function setWaitMethod(string $waitMethod): self
{
$this->options['waitMethod'] = $waitMethod;
return $this;
@@ -754,11 +831,10 @@ public function setWaitMethod($waitMethod)
/**
* Whether to allow an agent to hear the state of the outbound call, including ringing or disconnect messages. The default is `true`.
*
- * @param bool $earlyMedia Whether agents can hear the state of the outbound
- * call
+ * @param bool $earlyMedia Whether to allow an agent to hear the state of the outbound call, including ringing or disconnect messages. The default is `true`.
* @return $this Fluent Builder
*/
- public function setEarlyMedia($earlyMedia)
+ public function setEarlyMedia(bool $earlyMedia): self
{
$this->options['earlyMedia'] = $earlyMedia;
return $this;
@@ -767,11 +843,10 @@ public function setEarlyMedia($earlyMedia)
/**
* The maximum number of participants in the conference. Can be a positive integer from `2` to `250`. The default value is `250`.
*
- * @param int $maxParticipants The maximum number of agent conference
- * participants
+ * @param int $maxParticipants The maximum number of participants in the conference. Can be a positive integer from `2` to `250`. The default value is `250`.
* @return $this Fluent Builder
*/
- public function setMaxParticipants($maxParticipants)
+ public function setMaxParticipants(int $maxParticipants): self
{
$this->options['maxParticipants'] = $maxParticipants;
return $this;
@@ -780,11 +855,10 @@ public function setMaxParticipants($maxParticipants)
/**
* The URL we should call using the `conference_status_callback_method` when the conference events in `conference_status_callback_event` occur. Only the value set by the first participant to join the conference is used. Subsequent `conference_status_callback` values are ignored.
*
- * @param string $conferenceStatusCallback The callback URL for conference
- * events
+ * @param string $conferenceStatusCallback The URL we should call using the `conference_status_callback_method` when the conference events in `conference_status_callback_event` occur. Only the value set by the first participant to join the conference is used. Subsequent `conference_status_callback` values are ignored.
* @return $this Fluent Builder
*/
- public function setConferenceStatusCallback($conferenceStatusCallback)
+ public function setConferenceStatusCallback(string $conferenceStatusCallback): self
{
$this->options['conferenceStatusCallback'] = $conferenceStatusCallback;
return $this;
@@ -793,12 +867,10 @@ public function setConferenceStatusCallback($conferenceStatusCallback)
/**
* The HTTP method we should use to call `conference_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
*
- * @param string $conferenceStatusCallbackMethod HTTP method for requesting
- * `conference_status_callback`
- * URL
+ * @param string $conferenceStatusCallbackMethod The HTTP method we should use to call `conference_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
* @return $this Fluent Builder
*/
- public function setConferenceStatusCallbackMethod($conferenceStatusCallbackMethod)
+ public function setConferenceStatusCallbackMethod(string $conferenceStatusCallbackMethod): self
{
$this->options['conferenceStatusCallbackMethod'] = $conferenceStatusCallbackMethod;
return $this;
@@ -807,12 +879,10 @@ public function setConferenceStatusCallbackMethod($conferenceStatusCallbackMetho
/**
* The conference status events that we will send to `conference_status_callback`. Can be: `start`, `end`, `join`, `leave`, `mute`, `hold`, `speaker`.
*
- * @param string $conferenceStatusCallbackEvent The conference status events
- * that we will send to
- * conference_status_callback
+ * @param string $conferenceStatusCallbackEvent The conference status events that we will send to `conference_status_callback`. Can be: `start`, `end`, `join`, `leave`, `mute`, `hold`, `speaker`.
* @return $this Fluent Builder
*/
- public function setConferenceStatusCallbackEvent($conferenceStatusCallbackEvent)
+ public function setConferenceStatusCallbackEvent(array $conferenceStatusCallbackEvent): self
{
$this->options['conferenceStatusCallbackEvent'] = $conferenceStatusCallbackEvent;
return $this;
@@ -821,11 +891,10 @@ public function setConferenceStatusCallbackEvent($conferenceStatusCallbackEvent)
/**
* Whether to record the conference the participant is joining or when to record the conference. Can be: `true`, `false`, `record-from-start`, and `do-not-record`. The default value is `false`.
*
- * @param string $conferenceRecord Whether to record the conference the
- * participant is joining
+ * @param string $conferenceRecord Whether to record the conference the participant is joining or when to record the conference. Can be: `true`, `false`, `record-from-start`, and `do-not-record`. The default value is `false`.
* @return $this Fluent Builder
*/
- public function setConferenceRecord($conferenceRecord)
+ public function setConferenceRecord(string $conferenceRecord): self
{
$this->options['conferenceRecord'] = $conferenceRecord;
return $this;
@@ -834,11 +903,10 @@ public function setConferenceRecord($conferenceRecord)
/**
* How to trim the leading and trailing silence from your recorded conference audio files. Can be: `trim-silence` or `do-not-trim` and defaults to `trim-silence`.
*
- * @param string $conferenceTrim How to trim leading and trailing silence from
- * your recorded conference audio files
+ * @param string $conferenceTrim How to trim the leading and trailing silence from your recorded conference audio files. Can be: `trim-silence` or `do-not-trim` and defaults to `trim-silence`.
* @return $this Fluent Builder
*/
- public function setConferenceTrim($conferenceTrim)
+ public function setConferenceTrim(string $conferenceTrim): self
{
$this->options['conferenceTrim'] = $conferenceTrim;
return $this;
@@ -847,10 +915,10 @@ public function setConferenceTrim($conferenceTrim)
/**
* The recording channels for the final recording. Can be: `mono` or `dual` and the default is `mono`.
*
- * @param string $recordingChannels Specify `mono` or `dual` recording channels
+ * @param string $recordingChannels The recording channels for the final recording. Can be: `mono` or `dual` and the default is `mono`.
* @return $this Fluent Builder
*/
- public function setRecordingChannels($recordingChannels)
+ public function setRecordingChannels(string $recordingChannels): self
{
$this->options['recordingChannels'] = $recordingChannels;
return $this;
@@ -859,12 +927,10 @@ public function setRecordingChannels($recordingChannels)
/**
* The URL that we should call using the `recording_status_callback_method` when the recording status changes.
*
- * @param string $recordingStatusCallback The URL that we should call using the
- * `recording_status_callback_method`
- * when the recording status changes
+ * @param string $recordingStatusCallback The URL that we should call using the `recording_status_callback_method` when the recording status changes.
* @return $this Fluent Builder
*/
- public function setRecordingStatusCallback($recordingStatusCallback)
+ public function setRecordingStatusCallback(string $recordingStatusCallback): self
{
$this->options['recordingStatusCallback'] = $recordingStatusCallback;
return $this;
@@ -873,12 +939,10 @@ public function setRecordingStatusCallback($recordingStatusCallback)
/**
* The HTTP method we should use when we call `recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
*
- * @param string $recordingStatusCallbackMethod The HTTP method we should use
- * when we call
- * `recording_status_callback`
+ * @param string $recordingStatusCallbackMethod The HTTP method we should use when we call `recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
* @return $this Fluent Builder
*/
- public function setRecordingStatusCallbackMethod($recordingStatusCallbackMethod)
+ public function setRecordingStatusCallbackMethod(string $recordingStatusCallbackMethod): self
{
$this->options['recordingStatusCallbackMethod'] = $recordingStatusCallbackMethod;
return $this;
@@ -887,12 +951,10 @@ public function setRecordingStatusCallbackMethod($recordingStatusCallbackMethod)
/**
* The URL we should call using the `conference_recording_status_callback_method` when the conference recording is available.
*
- * @param string $conferenceRecordingStatusCallback The URL we should call
- * using the
- * `conference_recording_status_callback_method` when the conference recording is available
+ * @param string $conferenceRecordingStatusCallback The URL we should call using the `conference_recording_status_callback_method` when the conference recording is available.
* @return $this Fluent Builder
*/
- public function setConferenceRecordingStatusCallback($conferenceRecordingStatusCallback)
+ public function setConferenceRecordingStatusCallback(string $conferenceRecordingStatusCallback): self
{
$this->options['conferenceRecordingStatusCallback'] = $conferenceRecordingStatusCallback;
return $this;
@@ -901,12 +963,10 @@ public function setConferenceRecordingStatusCallback($conferenceRecordingStatusC
/**
* The HTTP method we should use to call `conference_recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
*
- * @param string $conferenceRecordingStatusCallbackMethod The HTTP method we
- * should use to call
- * `conference_recording_status_callback`
+ * @param string $conferenceRecordingStatusCallbackMethod The HTTP method we should use to call `conference_recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
* @return $this Fluent Builder
*/
- public function setConferenceRecordingStatusCallbackMethod($conferenceRecordingStatusCallbackMethod)
+ public function setConferenceRecordingStatusCallbackMethod(string $conferenceRecordingStatusCallbackMethod): self
{
$this->options['conferenceRecordingStatusCallbackMethod'] = $conferenceRecordingStatusCallbackMethod;
return $this;
@@ -915,10 +975,10 @@ public function setConferenceRecordingStatusCallbackMethod($conferenceRecordingS
/**
* The [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls) where we should mix the recorded audio. Can be:`us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, or `jp1`.
*
- * @param string $region The region where we should mix the conference audio
+ * @param string $region The [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls) where we should mix the recorded audio. Can be:`us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, or `jp1`.
* @return $this Fluent Builder
*/
- public function setRegion($region)
+ public function setRegion(string $region): self
{
$this->options['region'] = $region;
return $this;
@@ -927,10 +987,10 @@ public function setRegion($region)
/**
* The SIP username used for authentication.
*
- * @param string $sipAuthUsername The SIP username used for authentication
+ * @param string $sipAuthUsername The SIP username used for authentication.
* @return $this Fluent Builder
*/
- public function setSipAuthUsername($sipAuthUsername)
+ public function setSipAuthUsername(string $sipAuthUsername): self
{
$this->options['sipAuthUsername'] = $sipAuthUsername;
return $this;
@@ -939,10 +999,10 @@ public function setSipAuthUsername($sipAuthUsername)
/**
* The SIP password for authentication.
*
- * @param string $sipAuthPassword The SIP password for authentication
+ * @param string $sipAuthPassword The SIP password for authentication.
* @return $this Fluent Builder
*/
- public function setSipAuthPassword($sipAuthPassword)
+ public function setSipAuthPassword(string $sipAuthPassword): self
{
$this->options['sipAuthPassword'] = $sipAuthPassword;
return $this;
@@ -951,12 +1011,10 @@ public function setSipAuthPassword($sipAuthPassword)
/**
* The Call progress events sent via webhooks as a result of a Dequeue instruction.
*
- * @param string $dequeueStatusCallbackEvent The Call progress events sent via
- * webhooks as a result of a Dequeue
- * instruction
+ * @param string[] $dequeueStatusCallbackEvent The Call progress events sent via webhooks as a result of a Dequeue instruction.
* @return $this Fluent Builder
*/
- public function setDequeueStatusCallbackEvent($dequeueStatusCallbackEvent)
+ public function setDequeueStatusCallbackEvent(array $dequeueStatusCallbackEvent): self
{
$this->options['dequeueStatusCallbackEvent'] = $dequeueStatusCallbackEvent;
return $this;
@@ -965,24 +1023,20 @@ public function setDequeueStatusCallbackEvent($dequeueStatusCallbackEvent)
/**
* The new worker activity SID after executing a Conference instruction.
*
- * @param string $postWorkActivitySid The new worker activity SID after
- * executing a Conference instruction
+ * @param string $postWorkActivitySid The new worker activity SID after executing a Conference instruction.
* @return $this Fluent Builder
*/
- public function setPostWorkActivitySid($postWorkActivitySid)
+ public function setPostWorkActivitySid(string $postWorkActivitySid): self
{
$this->options['postWorkActivitySid'] = $postWorkActivitySid;
return $this;
}
/**
- * The Supervisor mode when executing the Supervise instruction.
- *
- * @param string $supervisorMode The Supervisor mode when executing the
- * Supervise instruction
+ * @param string $supervisorMode
* @return $this Fluent Builder
*/
- public function setSupervisorMode($supervisorMode)
+ public function setSupervisorMode(string $supervisorMode): self
{
$this->options['supervisorMode'] = $supervisorMode;
return $this;
@@ -991,11 +1045,10 @@ public function setSupervisorMode($supervisorMode)
/**
* The Supervisor SID/URI when executing the Supervise instruction.
*
- * @param string $supervisor The Supervisor SID/URI when executing the
- * Supervise instruction
+ * @param string $supervisor The Supervisor SID/URI when executing the Supervise instruction.
* @return $this Fluent Builder
*/
- public function setSupervisor($supervisor)
+ public function setSupervisor(string $supervisor): self
{
$this->options['supervisor'] = $supervisor;
return $this;
@@ -1004,11 +1057,10 @@ public function setSupervisor($supervisor)
/**
* Whether to end the conference when the customer leaves.
*
- * @param bool $endConferenceOnCustomerExit Whether to end the conference when
- * the customer leaves
+ * @param bool $endConferenceOnCustomerExit Whether to end the conference when the customer leaves.
* @return $this Fluent Builder
*/
- public function setEndConferenceOnCustomerExit($endConferenceOnCustomerExit)
+ public function setEndConferenceOnCustomerExit(bool $endConferenceOnCustomerExit): self
{
$this->options['endConferenceOnCustomerExit'] = $endConferenceOnCustomerExit;
return $this;
@@ -1017,29 +1069,48 @@ public function setEndConferenceOnCustomerExit($endConferenceOnCustomerExit)
/**
* Whether to play a notification beep when the customer joins.
*
- * @param bool $beepOnCustomerEntrance Whether to play a notification beep when
- * the customer joins
+ * @param bool $beepOnCustomerEntrance Whether to play a notification beep when the customer joins.
* @return $this Fluent Builder
*/
- public function setBeepOnCustomerEntrance($beepOnCustomerEntrance)
+ public function setBeepOnCustomerEntrance(bool $beepOnCustomerEntrance): self
{
$this->options['beepOnCustomerEntrance'] = $beepOnCustomerEntrance;
return $this;
}
+ /**
+ * The jitter buffer size for conference. Can be: `small`, `medium`, `large`, `off`.
+ *
+ * @param string $jitterBufferSize The jitter buffer size for conference. Can be: `small`, `medium`, `large`, `off`.
+ * @return $this Fluent Builder
+ */
+ public function setJitterBufferSize(string $jitterBufferSize): self
+ {
+ $this->options['jitterBufferSize'] = $jitterBufferSize;
+ return $this;
+ }
+
+ /**
+ * The If-Match HTTP request header
+ *
+ * @param string $ifMatch The If-Match HTTP request header
+ * @return $this Fluent Builder
+ */
+ public function setIfMatch(string $ifMatch): self
+ {
+ $this->options['ifMatch'] = $ifMatch;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Taskrouter.V1.UpdateReservationOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.UpdateReservationOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationPage.php
index 19cf398..d50bfef 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return ReservationInstance \Twilio\Rest\Taskrouter\V1\Workspace\Task\ReservationInstance
+ */
+ public function buildInstance(array $payload): ReservationInstance
{
- return new ReservationInstance(
- $this->version,
- $payload,
- $this->solution['workspaceSid'],
- $this->solution['taskSid']
- );
+ return new ReservationInstance($this->version, $payload, $this->solution['workspaceSid'], $this->solution['taskSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.ReservationPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskChannelContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskChannelContext.php
index f6d45f7..5232e3f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskChannelContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskChannelContext.php
@@ -2,56 +2,83 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
class TaskChannelContext extends InstanceContext
-{
+ {
/**
* Initialize the TaskChannelContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace with the TaskChannel to
- * fetch
- * @param string $sid The SID of the TaskChannel resource to fetch
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskChannelContext
+ * @param Version $version Version that contains the resource
+ * @param string $workspaceSid The SID of the Workspace that the new Task Channel belongs to.
+ * @param string $sid The SID of the Task Channel resource to delete.
*/
- public function __construct(Version $version, $workspaceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $workspaceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid, 'sid' => $sid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/TaskChannels/' . \rawurlencode($sid) . '';
+ $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid)
+ .'/TaskChannels/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a TaskChannelInstance
+ * Delete the TaskChannelInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
+ }
+
+
+ /**
+ * Fetch the TaskChannelInstance
*
* @return TaskChannelInstance Fetched TaskChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): TaskChannelInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new TaskChannelInstance(
$this->version,
@@ -61,6 +88,7 @@ public function fetch()
);
}
+
/**
* Update the TaskChannelInstance
*
@@ -68,21 +96,20 @@ public function fetch()
* @return TaskChannelInstance Updated TaskChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): TaskChannelInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'ChannelOptimizedRouting' => Serialize::booleanToString($options['channelOptimizedRouting']),
- ));
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'ChannelOptimizedRouting' =>
+ Serialize::booleanToString($options['channelOptimizedRouting']),
+ ]);
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new TaskChannelInstance(
$this->version,
@@ -92,28 +119,18 @@ public function update($options = array())
);
}
- /**
- * Deletes the TaskChannelInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.TaskChannelContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskChannelInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskChannelInstance.php
index f90a88d..f9bccfb 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskChannelInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskChannelInstance.php
@@ -2,50 +2,57 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $friendlyName
- * @property string $sid
- * @property string $uniqueName
- * @property string $workspaceSid
- * @property bool $channelOptimizedRouting
- * @property string $url
- * @property array $links
+ * @property string|null $accountSid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $friendlyName
+ * @property string|null $sid
+ * @property string|null $uniqueName
+ * @property string|null $workspaceSid
+ * @property bool|null $channelOptimizedRouting
+ * @property string|null $url
+ * @property array|null $links
*/
class TaskChannelInstance extends InstanceResource
{
/**
* Initialize the TaskChannelInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $workspaceSid The SID of the Workspace that contains the
- * TaskChannel
- * @param string $sid The SID of the TaskChannel resource to fetch
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskChannelInstance
+ * @param string $workspaceSid The SID of the Workspace that the new Task Channel belongs to.
+ * @param string $sid The SID of the Task Channel resource to delete.
*/
- public function __construct(Version $version, array $payload, $workspaceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $workspaceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
@@ -56,20 +63,18 @@ public function __construct(Version $version, array $payload, $workspaceSid, $si
'channelOptimizedRouting' => Values::array_get($payload, 'channel_optimized_routing'),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('workspaceSid' => $workspaceSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['workspaceSid' => $workspaceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskChannelContext Context for
- * this
- * TaskChannelInstance
+ * @return TaskChannelContext Context for this TaskChannelInstance
*/
- protected function proxy()
+ protected function proxy(): TaskChannelContext
{
if (!$this->context) {
$this->context = new TaskChannelContext(
@@ -83,37 +88,40 @@ protected function proxy()
}
/**
- * Fetch a TaskChannelInstance
+ * Delete the TaskChannelInstance
*
- * @return TaskChannelInstance Fetched TaskChannelInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Update the TaskChannelInstance
+ * Fetch the TaskChannelInstance
*
- * @param array|Options $options Optional Arguments
- * @return TaskChannelInstance Updated TaskChannelInstance
+ * @return TaskChannelInstance Fetched TaskChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): TaskChannelInstance
{
- return $this->proxy()->update($options);
+
+ return $this->proxy()->fetch();
}
/**
- * Deletes the TaskChannelInstance
+ * Update the TaskChannelInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return TaskChannelInstance Updated TaskChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): TaskChannelInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->update($options);
}
/**
@@ -123,7 +131,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -142,12 +150,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.TaskChannelInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskChannelList.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskChannelList.php
index 1a4d53d..f325423 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskChannelList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskChannelList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Taskrouter\V1\Workspace;
@@ -12,57 +19,71 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class TaskChannelList extends ListResource
-{
+ {
/**
* Construct the TaskChannelList
*
* @param Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace that contains the
- * TaskChannel
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskChannelList
+ * @param string $workspaceSid The SID of the Workspace that the new Task Channel belongs to.
*/
- public function __construct(Version $version, $workspaceSid)
- {
+ public function __construct(
+ Version $version,
+ string $workspaceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid,);
-
- $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/TaskChannels';
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+
+ ];
+
+ $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid)
+ .'/TaskChannels';
}
/**
- * Streams TaskChannelInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the TaskChannelInstance
*
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @param string $friendlyName A descriptive string that you create to describe the Task Channel. It can be up to 64 characters long.
+ * @param string $uniqueName An application-defined string that uniquely identifies the Task Channel, such as `voice` or `sms`.
+ * @param array|Options $options Optional Arguments
+ * @return TaskChannelInstance Created TaskChannelInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($limit = null, $pageSize = null)
+ public function create(string $friendlyName, string $uniqueName, array $options = []): TaskChannelInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'FriendlyName' =>
+ $friendlyName,
+ 'UniqueName' =>
+ $uniqueName,
+ 'ChannelOptimizedRouting' =>
+ Serialize::booleanToString($options['channelOptimizedRouting']),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new TaskChannelInstance(
+ $this->version,
+ $payload,
+ $this->solution['workspaceSid']
+ );
}
+
/**
* Reads TaskChannelInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -78,11 +99,38 @@ public function stream($limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return TaskChannelInstance[] Array of results
*/
- public function read($limit = null, $pageSize = null)
+ public function read(int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($limit, $pageSize), false);
}
+ /**
+ * Streams TaskChannelInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of TaskChannelInstance records from the API.
* Request is executed immediately
@@ -90,21 +138,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of TaskChannelInstance
+ * @return TaskChannelPage Page of TaskChannelInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): TaskChannelPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new TaskChannelPage($this->version, $response, $this->solution);
}
@@ -114,9 +163,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of TaskChannelInstance
+ * @return TaskChannelPage Page of TaskChannelInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): TaskChannelPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -126,45 +175,22 @@ public function getPage($targetUrl)
return new TaskChannelPage($this->version, $response, $this->solution);
}
- /**
- * Create a new TaskChannelInstance
- *
- * @param string $friendlyName A string to describe the TaskChannel resource
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the TaskChannel
- * @param array|Options $options Optional Arguments
- * @return TaskChannelInstance Newly created TaskChannelInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($friendlyName, $uniqueName, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'FriendlyName' => $friendlyName,
- 'UniqueName' => $uniqueName,
- 'ChannelOptimizedRouting' => Serialize::booleanToString($options['channelOptimizedRouting']),
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new TaskChannelInstance($this->version, $payload, $this->solution['workspaceSid']);
- }
/**
* Constructs a TaskChannelContext
*
- * @param string $sid The SID of the TaskChannel resource to fetch
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskChannelContext
+ * @param string $sid The SID of the Task Channel resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): TaskChannelContext
{
- return new TaskChannelContext($this->version, $this->solution['workspaceSid'], $sid);
+ return new TaskChannelContext(
+ $this->version,
+ $this->solution['workspaceSid'],
+ $sid
+ );
}
/**
@@ -172,8 +198,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.TaskChannelList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskChannelOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskChannelOptions.php
index d17d5c2..fce3235 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskChannelOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskChannelOptions.php
@@ -1,10 +1,16 @@
options['friendlyName'] = $friendlyName;
- $this->options['channelOptimizedRouting'] = $channelOptimizedRouting;
- }
-
/**
- * A descriptive string that you create to describe the TaskChannel. It can be up to 64 characters long.
- *
- * @param string $friendlyName A string to describe the TaskChannel resource
- * @return $this Fluent Builder
+ * @param bool $channelOptimizedRouting Whether the Task Channel should prioritize Workers that have been idle. If `true`, Workers that have been idle the longest are prioritized.
*/
- public function setFriendlyName($friendlyName)
- {
- $this->options['friendlyName'] = $friendlyName;
- return $this;
+ public function __construct(
+
+ bool $channelOptimizedRouting = Values::BOOL_NONE
+
+ ) {
+ $this->options['channelOptimizedRouting'] = $channelOptimizedRouting;
}
/**
- * Whether the TaskChannel should prioritize Workers that have been idle. If `true`, Workers that have been idle the longest are prioritized.
+ * Whether the Task Channel should prioritize Workers that have been idle. If `true`, Workers that have been idle the longest are prioritized.
*
- * @param bool $channelOptimizedRouting Whether the TaskChannel should
- * prioritize Workers that have been idle
+ * @param bool $channelOptimizedRouting Whether the Task Channel should prioritize Workers that have been idle. If `true`, Workers that have been idle the longest are prioritized.
* @return $this Fluent Builder
*/
- public function setChannelOptimizedRouting($channelOptimizedRouting)
+ public function setChannelOptimizedRouting(bool $channelOptimizedRouting): self
{
$this->options['channelOptimizedRouting'] = $channelOptimizedRouting;
return $this;
@@ -79,37 +88,51 @@ public function setChannelOptimizedRouting($channelOptimizedRouting)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Taskrouter.V1.UpdateTaskChannelOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.CreateTaskChannelOptions ' . $options . ']';
}
}
-class CreateTaskChannelOptions extends Options
-{
+
+
+
+class UpdateTaskChannelOptions extends Options
+ {
/**
- * @param bool $channelOptimizedRouting Whether the TaskChannel should
- * prioritize Workers that have been idle
+ * @param string $friendlyName A descriptive string that you create to describe the Task Channel. It can be up to 64 characters long.
+ * @param bool $channelOptimizedRouting Whether the TaskChannel should prioritize Workers that have been idle. If `true`, Workers that have been idle the longest are prioritized.
*/
- public function __construct($channelOptimizedRouting = Values::NONE)
- {
+ public function __construct(
+
+ string $friendlyName = Values::NONE,
+ bool $channelOptimizedRouting = Values::BOOL_NONE
+
+ ) {
+ $this->options['friendlyName'] = $friendlyName;
$this->options['channelOptimizedRouting'] = $channelOptimizedRouting;
}
+ /**
+ * A descriptive string that you create to describe the Task Channel. It can be up to 64 characters long.
+ *
+ * @param string $friendlyName A descriptive string that you create to describe the Task Channel. It can be up to 64 characters long.
+ * @return $this Fluent Builder
+ */
+ public function setFriendlyName(string $friendlyName): self
+ {
+ $this->options['friendlyName'] = $friendlyName;
+ return $this;
+ }
+
/**
* Whether the TaskChannel should prioritize Workers that have been idle. If `true`, Workers that have been idle the longest are prioritized.
*
- * @param bool $channelOptimizedRouting Whether the TaskChannel should
- * prioritize Workers that have been idle
+ * @param bool $channelOptimizedRouting Whether the TaskChannel should prioritize Workers that have been idle. If `true`, Workers that have been idle the longest are prioritized.
* @return $this Fluent Builder
*/
- public function setChannelOptimizedRouting($channelOptimizedRouting)
+ public function setChannelOptimizedRouting(bool $channelOptimizedRouting): self
{
$this->options['channelOptimizedRouting'] = $channelOptimizedRouting;
return $this;
@@ -120,14 +143,10 @@ public function setChannelOptimizedRouting($channelOptimizedRouting)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Taskrouter.V1.CreateTaskChannelOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.UpdateTaskChannelOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskChannelPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskChannelPage.php
index 2c9a3e6..6e4e3db 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskChannelPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskChannelPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return TaskChannelInstance \Twilio\Rest\Taskrouter\V1\Workspace\TaskChannelInstance
+ */
+ public function buildInstance(array $payload): TaskChannelInstance
{
return new TaskChannelInstance($this->version, $payload, $this->solution['workspaceSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.TaskChannelPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskContext.php
index c6b76b7..003d1b3 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskContext.php
@@ -2,61 +2,94 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Taskrouter\V1\Workspace\Task\ReservationList;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+use Twilio\Rest\Taskrouter\V1\Workspace\Task\ReservationList;
+
/**
- * @property \Twilio\Rest\Taskrouter\V1\Workspace\Task\ReservationList $reservations
+ * @property ReservationList $reservations
* @method \Twilio\Rest\Taskrouter\V1\Workspace\Task\ReservationContext reservations(string $sid)
*/
class TaskContext extends InstanceContext
-{
- protected $_reservations = null;
+ {
+ protected $_reservations;
/**
* Initialize the TaskContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace with the Task to fetch
- * @param string $sid The SID of the resource to fetch
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskContext
+ * @param Version $version Version that contains the resource
+ * @param string $workspaceSid The SID of the Workspace that the new Task belongs to.
+ * @param string $sid The SID of the Task resource to delete.
*/
- public function __construct(Version $version, $workspaceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $workspaceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid, 'sid' => $sid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid)
+ .'/Tasks/' . \rawurlencode($sid)
+ .'';
+ }
+
+ /**
+ * Delete the TaskInstance
+ *
+ * @param array|Options $options Optional Arguments
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(array $options = []): bool
+ {
+
+ $options = new Values($options);
- $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Tasks/' . \rawurlencode($sid) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'If-Match' => $options['ifMatch']]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a TaskInstance
+ * Fetch the TaskInstance
*
* @return TaskInstance Fetched TaskInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): TaskInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new TaskInstance(
$this->version,
@@ -66,6 +99,7 @@ public function fetch()
);
}
+
/**
* Update the TaskInstance
*
@@ -73,24 +107,28 @@ public function fetch()
* @return TaskInstance Updated TaskInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): TaskInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'Attributes' => $options['attributes'],
- 'AssignmentStatus' => $options['assignmentStatus'],
- 'Reason' => $options['reason'],
- 'Priority' => $options['priority'],
- 'TaskChannel' => $options['taskChannel'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'Attributes' =>
+ $options['attributes'],
+ 'AssignmentStatus' =>
+ $options['assignmentStatus'],
+ 'Reason' =>
+ $options['reason'],
+ 'Priority' =>
+ $options['priority'],
+ 'TaskChannel' =>
+ $options['taskChannel'],
+ 'VirtualStartTime' =>
+ Serialize::iso8601DateTime($options['virtualStartTime']),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'If-Match' => $options['ifMatch']]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new TaskInstance(
$this->version,
@@ -100,23 +138,11 @@ public function update($options = array())
);
}
- /**
- * Deletes the TaskInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Access the reservations
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Task\ReservationList
*/
- protected function getReservations()
+ protected function getReservations(): ReservationList
{
if (!$this->_reservations) {
$this->_reservations = new ReservationList(
@@ -133,10 +159,10 @@ protected function getReservations()
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -151,10 +177,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -169,12 +195,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.TaskContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskInstance.php
index 44f0c69..9df7d0e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskInstance.php
@@ -2,61 +2,74 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Taskrouter\V1\Workspace\Task\ReservationList;
+
/**
- * @property string $accountSid
+ * @property string|null $accountSid
* @property int $age
* @property string $assignmentStatus
- * @property string $attributes
- * @property string $addons
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
+ * @property string|null $attributes
+ * @property string|null $addons
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property \DateTime|null $taskQueueEnteredDate
* @property int $priority
- * @property string $reason
- * @property string $sid
- * @property string $taskQueueSid
- * @property string $taskQueueFriendlyName
- * @property string $taskChannelSid
- * @property string $taskChannelUniqueName
+ * @property string|null $reason
+ * @property string|null $sid
+ * @property string|null $taskQueueSid
+ * @property string|null $taskQueueFriendlyName
+ * @property string|null $taskChannelSid
+ * @property string|null $taskChannelUniqueName
* @property int $timeout
- * @property string $workflowSid
- * @property string $workflowFriendlyName
- * @property string $workspaceSid
- * @property string $url
- * @property array $links
+ * @property string|null $workflowSid
+ * @property string|null $workflowFriendlyName
+ * @property string|null $workspaceSid
+ * @property string|null $url
+ * @property array|null $links
+ * @property \DateTime|null $virtualStartTime
+ * @property bool|null $ignoreCapacity
+ * @property string|null $routingTarget
*/
class TaskInstance extends InstanceResource
{
- protected $_reservations = null;
+ protected $_reservations;
/**
* Initialize the TaskInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $workspaceSid The SID of the Workspace that contains the Task
- * @param string $sid The SID of the resource to fetch
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskInstance
+ * @param string $workspaceSid The SID of the Workspace that the new Task belongs to.
+ * @param string $sid The SID of the Task resource to delete.
*/
- public function __construct(Version $version, array $payload, $workspaceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $workspaceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'age' => Values::array_get($payload, 'age'),
'assignmentStatus' => Values::array_get($payload, 'assignment_status'),
@@ -64,6 +77,7 @@ public function __construct(Version $version, array $payload, $workspaceSid, $si
'addons' => Values::array_get($payload, 'addons'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
+ 'taskQueueEnteredDate' => Deserialize::dateTime(Values::array_get($payload, 'task_queue_entered_date')),
'priority' => Values::array_get($payload, 'priority'),
'reason' => Values::array_get($payload, 'reason'),
'sid' => Values::array_get($payload, 'sid'),
@@ -77,19 +91,21 @@ public function __construct(Version $version, array $payload, $workspaceSid, $si
'workspaceSid' => Values::array_get($payload, 'workspace_sid'),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ 'virtualStartTime' => Deserialize::dateTime(Values::array_get($payload, 'virtual_start_time')),
+ 'ignoreCapacity' => Values::array_get($payload, 'ignore_capacity'),
+ 'routingTarget' => Values::array_get($payload, 'routing_target'),
+ ];
- $this->solution = array('workspaceSid' => $workspaceSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['workspaceSid' => $workspaceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskContext Context for this
- * TaskInstance
+ * @return TaskContext Context for this TaskInstance
*/
- protected function proxy()
+ protected function proxy(): TaskContext
{
if (!$this->context) {
$this->context = new TaskContext(
@@ -103,45 +119,47 @@ protected function proxy()
}
/**
- * Fetch a TaskInstance
+ * Delete the TaskInstance
*
- * @return TaskInstance Fetched TaskInstance
+ * @param array|Options $options Optional Arguments
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(array $options = []): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete($options);
}
/**
- * Update the TaskInstance
+ * Fetch the TaskInstance
*
- * @param array|Options $options Optional Arguments
- * @return TaskInstance Updated TaskInstance
+ * @return TaskInstance Fetched TaskInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): TaskInstance
{
- return $this->proxy()->update($options);
+
+ return $this->proxy()->fetch();
}
/**
- * Deletes the TaskInstance
+ * Update the TaskInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return TaskInstance Updated TaskInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): TaskInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->update($options);
}
/**
* Access the reservations
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Task\ReservationList
*/
- protected function getReservations()
+ protected function getReservations(): ReservationList
{
return $this->proxy()->reservations;
}
@@ -153,7 +171,7 @@ protected function getReservations()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -172,12 +190,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.TaskInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskList.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskList.php
index 9e471e0..7443286 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Taskrouter\V1\Workspace;
@@ -12,57 +19,81 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class TaskList extends ListResource
-{
+ {
/**
* Construct the TaskList
*
* @param Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace that contains the Task
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskList
+ * @param string $workspaceSid The SID of the Workspace that the new Task belongs to.
*/
- public function __construct(Version $version, $workspaceSid)
- {
+ public function __construct(
+ Version $version,
+ string $workspaceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid,);
-
- $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Tasks';
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+
+ ];
+
+ $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid)
+ .'/Tasks';
}
/**
- * Streams TaskInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the TaskInstance
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return TaskInstance Created TaskInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function create(array $options = []): TaskInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($options, $limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'Timeout' =>
+ $options['timeout'],
+ 'Priority' =>
+ $options['priority'],
+ 'TaskChannel' =>
+ $options['taskChannel'],
+ 'WorkflowSid' =>
+ $options['workflowSid'],
+ 'Attributes' =>
+ $options['attributes'],
+ 'VirtualStartTime' =>
+ Serialize::iso8601DateTime($options['virtualStartTime']),
+ 'RoutingTarget' =>
+ $options['routingTarget'],
+ 'IgnoreCapacity' =>
+ $options['ignoreCapacity'],
+ 'TaskQueueSid' =>
+ $options['taskQueueSid'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new TaskInstance(
+ $this->version,
+ $payload,
+ $this->solution['workspaceSid']
+ );
}
+
/**
* Reads TaskInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -79,46 +110,84 @@ public function stream($options = array(), $limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return TaskInstance[] Array of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
+ /**
+ * Streams TaskInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of TaskInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of TaskInstance
+ * @return TaskPage Page of TaskInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): TaskPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Priority' => $options['priority'],
- 'AssignmentStatus' => Serialize::map($options['assignmentStatus'], function ($e) {
- return $e;
- }),
- 'WorkflowSid' => $options['workflowSid'],
- 'WorkflowName' => $options['workflowName'],
- 'TaskQueueSid' => $options['taskQueueSid'],
- 'TaskQueueName' => $options['taskQueueName'],
- 'EvaluateTaskAttributes' => $options['evaluateTaskAttributes'],
- 'Ordering' => $options['ordering'],
- 'HasAddons' => Serialize::booleanToString($options['hasAddons']),
+
+ $params = Values::of([
+ 'Priority' =>
+ $options['priority'],
+ 'AssignmentStatus' =>
+ Serialize::map($options['assignmentStatus'], function ($e) { return $e; }),
+ 'WorkflowSid' =>
+ $options['workflowSid'],
+ 'WorkflowName' =>
+ $options['workflowName'],
+ 'TaskQueueSid' =>
+ $options['taskQueueSid'],
+ 'TaskQueueName' =>
+ $options['taskQueueName'],
+ 'EvaluateTaskAttributes' =>
+ $options['evaluateTaskAttributes'],
+ 'RoutingTarget' =>
+ $options['routingTarget'],
+ 'Ordering' =>
+ $options['ordering'],
+ 'HasAddons' =>
+ Serialize::booleanToString($options['hasAddons']),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new TaskPage($this->version, $response, $this->solution);
}
@@ -128,9 +197,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of TaskInstance
+ * @return TaskPage Page of TaskInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): TaskPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -140,44 +209,22 @@ public function getPage($targetUrl)
return new TaskPage($this->version, $response, $this->solution);
}
- /**
- * Create a new TaskInstance
- *
- * @param array|Options $options Optional Arguments
- * @return TaskInstance Newly created TaskInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'Timeout' => $options['timeout'],
- 'Priority' => $options['priority'],
- 'TaskChannel' => $options['taskChannel'],
- 'WorkflowSid' => $options['workflowSid'],
- 'Attributes' => $options['attributes'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new TaskInstance($this->version, $payload, $this->solution['workspaceSid']);
- }
/**
* Constructs a TaskContext
*
- * @param string $sid The SID of the resource to fetch
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskContext
+ * @param string $sid The SID of the Task resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): TaskContext
{
- return new TaskContext($this->version, $this->solution['workspaceSid'], $sid);
+ return new TaskContext(
+ $this->version,
+ $this->solution['workspaceSid'],
+ $sid
+ );
}
/**
@@ -185,8 +232,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.TaskList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskOptions.php
index eb6cbf9..4821b2f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskOptions.php
@@ -1,10 +1,16 @@
options['timeout'] = $timeout;
+ $this->options['priority'] = $priority;
+ $this->options['taskChannel'] = $taskChannel;
+ $this->options['workflowSid'] = $workflowSid;
$this->options['attributes'] = $attributes;
- $this->options['assignmentStatus'] = $assignmentStatus;
- $this->options['reason'] = $reason;
+ $this->options['virtualStartTime'] = $virtualStartTime;
+ $this->options['routingTarget'] = $routingTarget;
+ $this->options['ignoreCapacity'] = $ignoreCapacity;
+ $this->options['taskQueueSid'] = $taskQueueSid;
+ }
+
+ /**
+ * The amount of time in seconds the new task can live before being assigned. Can be up to a maximum of 2 weeks (1,209,600 seconds). The default value is 24 hours (86,400 seconds). On timeout, the `task.canceled` event will fire with description `Task TTL Exceeded`.
+ *
+ * @param int $timeout The amount of time in seconds the new task can live before being assigned. Can be up to a maximum of 2 weeks (1,209,600 seconds). The default value is 24 hours (86,400 seconds). On timeout, the `task.canceled` event will fire with description `Task TTL Exceeded`.
+ * @return $this Fluent Builder
+ */
+ public function setTimeout(int $timeout): self
+ {
+ $this->options['timeout'] = $timeout;
+ return $this;
+ }
+
+ /**
+ * The priority to assign the new task and override the default. When supplied, the new Task will have this priority unless it matches a Workflow Target with a Priority set. When not supplied, the new Task will have the priority of the matching Workflow Target. Value can be 0 to 2^31^ (2,147,483,647).
+ *
+ * @param int $priority The priority to assign the new task and override the default. When supplied, the new Task will have this priority unless it matches a Workflow Target with a Priority set. When not supplied, the new Task will have the priority of the matching Workflow Target. Value can be 0 to 2^31^ (2,147,483,647).
+ * @return $this Fluent Builder
+ */
+ public function setPriority(int $priority): self
+ {
$this->options['priority'] = $priority;
+ return $this;
+ }
+
+ /**
+ * When MultiTasking is enabled, specify the TaskChannel by passing either its `unique_name` or `sid`. Default value is `default`.
+ *
+ * @param string $taskChannel When MultiTasking is enabled, specify the TaskChannel by passing either its `unique_name` or `sid`. Default value is `default`.
+ * @return $this Fluent Builder
+ */
+ public function setTaskChannel(string $taskChannel): self
+ {
$this->options['taskChannel'] = $taskChannel;
+ return $this;
}
/**
- * The JSON string that describes the custom attributes of the task.
+ * The SID of the Workflow that you would like to handle routing for the new Task. If there is only one Workflow defined for the Workspace that you are posting the new task to, this parameter is optional.
+ *
+ * @param string $workflowSid The SID of the Workflow that you would like to handle routing for the new Task. If there is only one Workflow defined for the Workspace that you are posting the new task to, this parameter is optional.
+ * @return $this Fluent Builder
+ */
+ public function setWorkflowSid(string $workflowSid): self
+ {
+ $this->options['workflowSid'] = $workflowSid;
+ return $this;
+ }
+
+ /**
+ * A URL-encoded JSON string with the attributes of the new task. This value is passed to the Workflow's `assignment_callback_url` when the Task is assigned to a Worker. For example: `{ \\\"task_type\\\": \\\"call\\\", \\\"twilio_call_sid\\\": \\\"CAxxx\\\", \\\"customer_ticket_number\\\": \\\"12345\\\" }`.
*
- * @param string $attributes The JSON string that describes the custom
- * attributes of the task
+ * @param string $attributes A URL-encoded JSON string with the attributes of the new task. This value is passed to the Workflow's `assignment_callback_url` when the Task is assigned to a Worker. For example: `{ \\\"task_type\\\": \\\"call\\\", \\\"twilio_call_sid\\\": \\\"CAxxx\\\", \\\"customer_ticket_number\\\": \\\"12345\\\" }`.
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setAttributes(string $attributes): self
{
$this->options['attributes'] = $attributes;
return $this;
}
/**
- * The new status of the task. Can be: `canceled`, to cancel a Task that is currently `pending` or `reserved`; `wrapping`, to move the Task to wrapup state; or `completed`, to move a Task to the completed state.
+ * The virtual start time to assign the new task and override the default. When supplied, the new task will have this virtual start time. When not supplied, the new task will have the virtual start time equal to `date_created`. Value can't be in the future or before the year of 1900.
*
- * @param string $assignmentStatus The new status of the task
+ * @param \DateTime $virtualStartTime The virtual start time to assign the new task and override the default. When supplied, the new task will have this virtual start time. When not supplied, the new task will have the virtual start time equal to `date_created`. Value can't be in the future or before the year of 1900.
* @return $this Fluent Builder
*/
- public function setAssignmentStatus($assignmentStatus)
+ public function setVirtualStartTime(\DateTime $virtualStartTime): self
{
- $this->options['assignmentStatus'] = $assignmentStatus;
+ $this->options['virtualStartTime'] = $virtualStartTime;
return $this;
}
/**
- * The reason that the Task was canceled or completed. This parameter is required only if the Task is canceled or completed. Setting this value queues the task for deletion and logs the reason.
+ * A SID of a Worker, Queue, or Workflow to route a Task to
*
- * @param string $reason The reason that the Task was canceled or complete
+ * @param string $routingTarget A SID of a Worker, Queue, or Workflow to route a Task to
* @return $this Fluent Builder
*/
- public function setReason($reason)
+ public function setRoutingTarget(string $routingTarget): self
{
- $this->options['reason'] = $reason;
+ $this->options['routingTarget'] = $routingTarget;
return $this;
}
/**
- * The Task's new priority value. When supplied, the Task takes on the specified priority unless it matches a Workflow Target with a Priority set.
+ * A boolean that indicates if the Task should respect a Worker's capacity and availability during assignment. This field can only be used when the `RoutingTarget` field is set to a Worker SID. By setting `IgnoreCapacity` to a value of `true`, `1`, or `yes`, the Task will be routed to the Worker without respecting their capacity and availability. Any other value will enforce the Worker's capacity and availability. The default value of `IgnoreCapacity` is `true` when the `RoutingTarget` is set to a Worker SID.
*
- * @param int $priority The Task's new priority value
+ * @param string $ignoreCapacity A boolean that indicates if the Task should respect a Worker's capacity and availability during assignment. This field can only be used when the `RoutingTarget` field is set to a Worker SID. By setting `IgnoreCapacity` to a value of `true`, `1`, or `yes`, the Task will be routed to the Worker without respecting their capacity and availability. Any other value will enforce the Worker's capacity and availability. The default value of `IgnoreCapacity` is `true` when the `RoutingTarget` is set to a Worker SID.
* @return $this Fluent Builder
*/
- public function setPriority($priority)
+ public function setIgnoreCapacity(string $ignoreCapacity): self
{
- $this->options['priority'] = $priority;
+ $this->options['ignoreCapacity'] = $ignoreCapacity;
return $this;
}
/**
- * When MultiTasking is enabled, specify the TaskChannel with the task to update. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.
+ * The SID of the TaskQueue in which the Task belongs
*
- * @param string $taskChannel When MultiTasking is enabled, specify the
- * TaskChannel with the task to update
+ * @param string $taskQueueSid The SID of the TaskQueue in which the Task belongs
* @return $this Fluent Builder
*/
- public function setTaskChannel($taskChannel)
+ public function setTaskQueueSid(string $taskQueueSid): self
{
- $this->options['taskChannel'] = $taskChannel;
+ $this->options['taskQueueSid'] = $taskQueueSid;
return $this;
}
@@ -157,38 +302,79 @@ public function setTaskChannel($taskChannel)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Taskrouter.V1.UpdateTaskOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.CreateTaskOptions ' . $options . ']';
}
}
-class ReadTaskOptions extends Options
-{
+class DeleteTaskOptions extends Options
+ {
+ /**
+ * @param string $ifMatch If provided, deletes this Task if (and only if) the [ETag](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag) header of the Task matches the provided value. This matches the semantics of (and is implemented with) the HTTP [If-Match header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match).
+ */
+ public function __construct(
+
+ string $ifMatch = Values::NONE
+
+ ) {
+ $this->options['ifMatch'] = $ifMatch;
+ }
+
/**
- * @param int $priority The priority value of the Tasks to read
- * @param string $assignmentStatus Returns the list of all Tasks in the
- * Workspace with the specified
- * assignment_status
- * @param string $workflowSid The SID of the Workflow with the Tasks to read
- * @param string $workflowName The friendly name of the Workflow with the Tasks
- * to read
- * @param string $taskQueueSid The SID of the TaskQueue with the Tasks to read
- * @param string $taskQueueName The friendly_name of the TaskQueue with the
- * Tasks to read
- * @param string $evaluateTaskAttributes The task attributes of the Tasks to
- * read
- * @param string $ordering Controls the order of the Tasks returned
- * @param bool $hasAddons Whether to read Tasks with addons
- */
- public function __construct($priority = Values::NONE, $assignmentStatus = Values::NONE, $workflowSid = Values::NONE, $workflowName = Values::NONE, $taskQueueSid = Values::NONE, $taskQueueName = Values::NONE, $evaluateTaskAttributes = Values::NONE, $ordering = Values::NONE, $hasAddons = Values::NONE)
+ * If provided, deletes this Task if (and only if) the [ETag](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag) header of the Task matches the provided value. This matches the semantics of (and is implemented with) the HTTP [If-Match header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match).
+ *
+ * @param string $ifMatch If provided, deletes this Task if (and only if) the [ETag](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag) header of the Task matches the provided value. This matches the semantics of (and is implemented with) the HTTP [If-Match header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match).
+ * @return $this Fluent Builder
+ */
+ public function setIfMatch(string $ifMatch): self
+ {
+ $this->options['ifMatch'] = $ifMatch;
+ return $this;
+ }
+
+ /**
+ * Provide a friendly representation
+ *
+ * @return string Machine friendly representation
+ */
+ public function __toString(): string
{
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.DeleteTaskOptions ' . $options . ']';
+ }
+}
+
+
+class ReadTaskOptions extends Options
+ {
+ /**
+ * @param int $priority The priority value of the Tasks to read. Returns the list of all Tasks in the Workspace with the specified priority.
+ * @param string[] $assignmentStatus The `assignment_status` of the Tasks you want to read. Can be: `pending`, `reserved`, `assigned`, `canceled`, `wrapping`, or `completed`. Returns all Tasks in the Workspace with the specified `assignment_status`.
+ * @param string $workflowSid The SID of the Workflow with the Tasks to read. Returns the Tasks controlled by the Workflow identified by this SID.
+ * @param string $workflowName The friendly name of the Workflow with the Tasks to read. Returns the Tasks controlled by the Workflow identified by this friendly name.
+ * @param string $taskQueueSid The SID of the TaskQueue with the Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this SID.
+ * @param string $taskQueueName The `friendly_name` of the TaskQueue with the Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this friendly name.
+ * @param string $evaluateTaskAttributes The attributes of the Tasks to read. Returns the Tasks that match the attributes specified in this parameter.
+ * @param string $routingTarget A SID of a Worker, Queue, or Workflow to route a Task to
+ * @param string $ordering How to order the returned Task resources. By default, Tasks are sorted by ascending DateCreated. This value is specified as: `Attribute:Order`, where `Attribute` can be either `DateCreated`, `Priority`, or `VirtualStartTime` and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered in descending order of their Priority. Pairings of sort orders can be specified in a comma-separated list such as `Priority:desc,DateCreated:asc`, which returns the Tasks in descending Priority order and ascending DateCreated Order. The only ordering pairing not allowed is DateCreated and VirtualStartTime.
+ * @param bool $hasAddons Whether to read Tasks with Add-ons. If `true`, returns only Tasks with Add-ons. If `false`, returns only Tasks without Add-ons.
+ */
+ public function __construct(
+
+ int $priority = Values::INT_NONE,
+ array $assignmentStatus = Values::ARRAY_NONE,
+ string $workflowSid = Values::NONE,
+ string $workflowName = Values::NONE,
+ string $taskQueueSid = Values::NONE,
+ string $taskQueueName = Values::NONE,
+ string $evaluateTaskAttributes = Values::NONE,
+ string $routingTarget = Values::NONE,
+ string $ordering = Values::NONE,
+ bool $hasAddons = Values::BOOL_NONE
+
+ ) {
$this->options['priority'] = $priority;
$this->options['assignmentStatus'] = $assignmentStatus;
$this->options['workflowSid'] = $workflowSid;
@@ -196,6 +382,7 @@ public function __construct($priority = Values::NONE, $assignmentStatus = Values
$this->options['taskQueueSid'] = $taskQueueSid;
$this->options['taskQueueName'] = $taskQueueName;
$this->options['evaluateTaskAttributes'] = $evaluateTaskAttributes;
+ $this->options['routingTarget'] = $routingTarget;
$this->options['ordering'] = $ordering;
$this->options['hasAddons'] = $hasAddons;
}
@@ -203,24 +390,22 @@ public function __construct($priority = Values::NONE, $assignmentStatus = Values
/**
* The priority value of the Tasks to read. Returns the list of all Tasks in the Workspace with the specified priority.
*
- * @param int $priority The priority value of the Tasks to read
+ * @param int $priority The priority value of the Tasks to read. Returns the list of all Tasks in the Workspace with the specified priority.
* @return $this Fluent Builder
*/
- public function setPriority($priority)
+ public function setPriority(int $priority): self
{
$this->options['priority'] = $priority;
return $this;
}
/**
- * The `assignment_status` of the Tasks to read. Can be: `pending`, `reserved`, `assigned`, `canceled`, and `completed`. Returns all Tasks in the Workspace with the specified `assignment_status`.
+ * The `assignment_status` of the Tasks you want to read. Can be: `pending`, `reserved`, `assigned`, `canceled`, `wrapping`, or `completed`. Returns all Tasks in the Workspace with the specified `assignment_status`.
*
- * @param string $assignmentStatus Returns the list of all Tasks in the
- * Workspace with the specified
- * assignment_status
+ * @param string[] $assignmentStatus The `assignment_status` of the Tasks you want to read. Can be: `pending`, `reserved`, `assigned`, `canceled`, `wrapping`, or `completed`. Returns all Tasks in the Workspace with the specified `assignment_status`.
* @return $this Fluent Builder
*/
- public function setAssignmentStatus($assignmentStatus)
+ public function setAssignmentStatus(array $assignmentStatus): self
{
$this->options['assignmentStatus'] = $assignmentStatus;
return $this;
@@ -229,10 +414,10 @@ public function setAssignmentStatus($assignmentStatus)
/**
* The SID of the Workflow with the Tasks to read. Returns the Tasks controlled by the Workflow identified by this SID.
*
- * @param string $workflowSid The SID of the Workflow with the Tasks to read
+ * @param string $workflowSid The SID of the Workflow with the Tasks to read. Returns the Tasks controlled by the Workflow identified by this SID.
* @return $this Fluent Builder
*/
- public function setWorkflowSid($workflowSid)
+ public function setWorkflowSid(string $workflowSid): self
{
$this->options['workflowSid'] = $workflowSid;
return $this;
@@ -241,11 +426,10 @@ public function setWorkflowSid($workflowSid)
/**
* The friendly name of the Workflow with the Tasks to read. Returns the Tasks controlled by the Workflow identified by this friendly name.
*
- * @param string $workflowName The friendly name of the Workflow with the Tasks
- * to read
+ * @param string $workflowName The friendly name of the Workflow with the Tasks to read. Returns the Tasks controlled by the Workflow identified by this friendly name.
* @return $this Fluent Builder
*/
- public function setWorkflowName($workflowName)
+ public function setWorkflowName(string $workflowName): self
{
$this->options['workflowName'] = $workflowName;
return $this;
@@ -254,10 +438,10 @@ public function setWorkflowName($workflowName)
/**
* The SID of the TaskQueue with the Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this SID.
*
- * @param string $taskQueueSid The SID of the TaskQueue with the Tasks to read
+ * @param string $taskQueueSid The SID of the TaskQueue with the Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this SID.
* @return $this Fluent Builder
*/
- public function setTaskQueueSid($taskQueueSid)
+ public function setTaskQueueSid(string $taskQueueSid): self
{
$this->options['taskQueueSid'] = $taskQueueSid;
return $this;
@@ -266,11 +450,10 @@ public function setTaskQueueSid($taskQueueSid)
/**
* The `friendly_name` of the TaskQueue with the Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this friendly name.
*
- * @param string $taskQueueName The friendly_name of the TaskQueue with the
- * Tasks to read
+ * @param string $taskQueueName The `friendly_name` of the TaskQueue with the Tasks to read. Returns the Tasks waiting in the TaskQueue identified by this friendly name.
* @return $this Fluent Builder
*/
- public function setTaskQueueName($taskQueueName)
+ public function setTaskQueueName(string $taskQueueName): self
{
$this->options['taskQueueName'] = $taskQueueName;
return $this;
@@ -279,35 +462,46 @@ public function setTaskQueueName($taskQueueName)
/**
* The attributes of the Tasks to read. Returns the Tasks that match the attributes specified in this parameter.
*
- * @param string $evaluateTaskAttributes The task attributes of the Tasks to
- * read
+ * @param string $evaluateTaskAttributes The attributes of the Tasks to read. Returns the Tasks that match the attributes specified in this parameter.
* @return $this Fluent Builder
*/
- public function setEvaluateTaskAttributes($evaluateTaskAttributes)
+ public function setEvaluateTaskAttributes(string $evaluateTaskAttributes): self
{
$this->options['evaluateTaskAttributes'] = $evaluateTaskAttributes;
return $this;
}
/**
- * How to order the returned Task resources. y default, Tasks are sorted by ascending DateCreated. This value is specified as: `Attribute:Order`, where `Attribute` can be either `Priority` or `DateCreated` and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered in descending order of their Priority. Multiple sort orders can be specified in a comma-separated list such as `Priority:desc,DateCreated:asc`, which returns the Tasks in descending Priority order and ascending DateCreated Order.
+ * A SID of a Worker, Queue, or Workflow to route a Task to
*
- * @param string $ordering Controls the order of the Tasks returned
+ * @param string $routingTarget A SID of a Worker, Queue, or Workflow to route a Task to
* @return $this Fluent Builder
*/
- public function setOrdering($ordering)
+ public function setRoutingTarget(string $routingTarget): self
+ {
+ $this->options['routingTarget'] = $routingTarget;
+ return $this;
+ }
+
+ /**
+ * How to order the returned Task resources. By default, Tasks are sorted by ascending DateCreated. This value is specified as: `Attribute:Order`, where `Attribute` can be either `DateCreated`, `Priority`, or `VirtualStartTime` and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered in descending order of their Priority. Pairings of sort orders can be specified in a comma-separated list such as `Priority:desc,DateCreated:asc`, which returns the Tasks in descending Priority order and ascending DateCreated Order. The only ordering pairing not allowed is DateCreated and VirtualStartTime.
+ *
+ * @param string $ordering How to order the returned Task resources. By default, Tasks are sorted by ascending DateCreated. This value is specified as: `Attribute:Order`, where `Attribute` can be either `DateCreated`, `Priority`, or `VirtualStartTime` and `Order` can be either `asc` or `desc`. For example, `Priority:desc` returns Tasks ordered in descending order of their Priority. Pairings of sort orders can be specified in a comma-separated list such as `Priority:desc,DateCreated:asc`, which returns the Tasks in descending Priority order and ascending DateCreated Order. The only ordering pairing not allowed is DateCreated and VirtualStartTime.
+ * @return $this Fluent Builder
+ */
+ public function setOrdering(string $ordering): self
{
$this->options['ordering'] = $ordering;
return $this;
}
/**
- * Whether to read Tasks with addons. If `true`, returns only Tasks with addons. If `false`, returns only Tasks without addons.
+ * Whether to read Tasks with Add-ons. If `true`, returns only Tasks with Add-ons. If `false`, returns only Tasks without Add-ons.
*
- * @param bool $hasAddons Whether to read Tasks with addons
+ * @param bool $hasAddons Whether to read Tasks with Add-ons. If `true`, returns only Tasks with Add-ons. If `false`, returns only Tasks without Add-ons.
* @return $this Fluent Builder
*/
- public function setHasAddons($hasAddons)
+ public function setHasAddons(bool $hasAddons): self
{
$this->options['hasAddons'] = $hasAddons;
return $this;
@@ -318,103 +512,123 @@ public function setHasAddons($hasAddons)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Taskrouter.V1.ReadTaskOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.ReadTaskOptions ' . $options . ']';
}
}
-class CreateTaskOptions extends Options
-{
+class UpdateTaskOptions extends Options
+ {
/**
- * @param int $timeout The amount of time in seconds the task is allowed to live
- * @param int $priority The priority to assign the new task and override the
- * default
- * @param string $taskChannel When MultiTasking is enabled specify the
- * TaskChannel by passing either its unique_name or
- * SID
- * @param string $workflowSid The SID of the Workflow that you would like to
- * handle routing for the new Task
- * @param string $attributes A URL-encoded JSON string describing the
- * attributes of the task
+ * @param string $attributes The JSON string that describes the custom attributes of the task.
+ * @param string $assignmentStatus
+ * @param string $reason The reason that the Task was canceled or completed. This parameter is required only if the Task is canceled or completed. Setting this value queues the task for deletion and logs the reason.
+ * @param int $priority The Task's new priority value. When supplied, the Task takes on the specified priority unless it matches a Workflow Target with a Priority set. Value can be 0 to 2^31^ (2,147,483,647).
+ * @param string $taskChannel When MultiTasking is enabled, specify the TaskChannel with the task to update. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.
+ * @param \DateTime $virtualStartTime The task's new virtual start time value. When supplied, the Task takes on the specified virtual start time. Value can't be in the future or before the year of 1900.
+ * @param string $ifMatch If provided, applies this mutation if (and only if) the [ETag](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag) header of the Task matches the provided value. This matches the semantics of (and is implemented with) the HTTP [If-Match header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match).
*/
- public function __construct($timeout = Values::NONE, $priority = Values::NONE, $taskChannel = Values::NONE, $workflowSid = Values::NONE, $attributes = Values::NONE)
- {
- $this->options['timeout'] = $timeout;
+ public function __construct(
+
+ string $attributes = Values::NONE,
+ string $assignmentStatus = Values::NONE,
+ string $reason = Values::NONE,
+ int $priority = Values::INT_NONE,
+ string $taskChannel = Values::NONE,
+ \DateTime $virtualStartTime = null,
+ string $ifMatch = Values::NONE
+
+ ) {
+ $this->options['attributes'] = $attributes;
+ $this->options['assignmentStatus'] = $assignmentStatus;
+ $this->options['reason'] = $reason;
$this->options['priority'] = $priority;
$this->options['taskChannel'] = $taskChannel;
- $this->options['workflowSid'] = $workflowSid;
+ $this->options['virtualStartTime'] = $virtualStartTime;
+ $this->options['ifMatch'] = $ifMatch;
+ }
+
+ /**
+ * The JSON string that describes the custom attributes of the task.
+ *
+ * @param string $attributes The JSON string that describes the custom attributes of the task.
+ * @return $this Fluent Builder
+ */
+ public function setAttributes(string $attributes): self
+ {
$this->options['attributes'] = $attributes;
+ return $this;
}
/**
- * The amount of time in seconds the new task is allowed to live. Can be up to a maximum of 2 weeks (1,209,600 seconds). The default value is 24 hours (86,400 seconds). On timeout, the `task.canceled` event will fire with description `Task TTL Exceeded`.
+ * @param string $assignmentStatus
+ * @return $this Fluent Builder
+ */
+ public function setAssignmentStatus(string $assignmentStatus): self
+ {
+ $this->options['assignmentStatus'] = $assignmentStatus;
+ return $this;
+ }
+
+ /**
+ * The reason that the Task was canceled or completed. This parameter is required only if the Task is canceled or completed. Setting this value queues the task for deletion and logs the reason.
*
- * @param int $timeout The amount of time in seconds the task is allowed to live
+ * @param string $reason The reason that the Task was canceled or completed. This parameter is required only if the Task is canceled or completed. Setting this value queues the task for deletion and logs the reason.
* @return $this Fluent Builder
*/
- public function setTimeout($timeout)
+ public function setReason(string $reason): self
{
- $this->options['timeout'] = $timeout;
+ $this->options['reason'] = $reason;
return $this;
}
/**
- * The priority to assign the new task and override the default. When supplied, the new Task will have this priority unless it matches a Workflow Target with a Priority set. When not supplied, the new Task will have the priority of the matching Workflow Target.
+ * The Task's new priority value. When supplied, the Task takes on the specified priority unless it matches a Workflow Target with a Priority set. Value can be 0 to 2^31^ (2,147,483,647).
*
- * @param int $priority The priority to assign the new task and override the
- * default
+ * @param int $priority The Task's new priority value. When supplied, the Task takes on the specified priority unless it matches a Workflow Target with a Priority set. Value can be 0 to 2^31^ (2,147,483,647).
* @return $this Fluent Builder
*/
- public function setPriority($priority)
+ public function setPriority(int $priority): self
{
$this->options['priority'] = $priority;
return $this;
}
/**
- * When MultiTasking is enabled, specify the TaskChannel by passing either its `unique_name` or `sid`. Default value is `default`.
+ * When MultiTasking is enabled, specify the TaskChannel with the task to update. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.
*
- * @param string $taskChannel When MultiTasking is enabled specify the
- * TaskChannel by passing either its unique_name or
- * SID
+ * @param string $taskChannel When MultiTasking is enabled, specify the TaskChannel with the task to update. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.
* @return $this Fluent Builder
*/
- public function setTaskChannel($taskChannel)
+ public function setTaskChannel(string $taskChannel): self
{
$this->options['taskChannel'] = $taskChannel;
return $this;
}
/**
- * The SID of the Workflow that you would like to handle routing for the new Task. If there is only one Workflow defined for the Workspace that you are posting the new task to, this parameter is optional.
+ * The task's new virtual start time value. When supplied, the Task takes on the specified virtual start time. Value can't be in the future or before the year of 1900.
*
- * @param string $workflowSid The SID of the Workflow that you would like to
- * handle routing for the new Task
+ * @param \DateTime $virtualStartTime The task's new virtual start time value. When supplied, the Task takes on the specified virtual start time. Value can't be in the future or before the year of 1900.
* @return $this Fluent Builder
*/
- public function setWorkflowSid($workflowSid)
+ public function setVirtualStartTime(\DateTime $virtualStartTime): self
{
- $this->options['workflowSid'] = $workflowSid;
+ $this->options['virtualStartTime'] = $virtualStartTime;
return $this;
}
/**
- * A URL-encoded JSON string with the attributes of the new task. This value is passed to the Workflow's `assignment_callback_url` when the Task is assigned to a Worker. For example: `{ "task_type": "call", "twilio_call_sid": "CAxxx", "customer_ticket_number": "12345" }`.
+ * If provided, applies this mutation if (and only if) the [ETag](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag) header of the Task matches the provided value. This matches the semantics of (and is implemented with) the HTTP [If-Match header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match).
*
- * @param string $attributes A URL-encoded JSON string describing the
- * attributes of the task
+ * @param string $ifMatch If provided, applies this mutation if (and only if) the [ETag](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag) header of the Task matches the provided value. This matches the semantics of (and is implemented with) the HTTP [If-Match header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match).
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setIfMatch(string $ifMatch): self
{
- $this->options['attributes'] = $attributes;
+ $this->options['ifMatch'] = $ifMatch;
return $this;
}
@@ -423,14 +637,10 @@ public function setAttributes($attributes)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Taskrouter.V1.CreateTaskOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.UpdateTaskOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskPage.php
index 32eecf7..75198c1 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return TaskInstance \Twilio\Rest\Taskrouter\V1\Workspace\TaskInstance
+ */
+ public function buildInstance(array $payload): TaskInstance
{
return new TaskInstance($this->version, $payload, $this->solution['workspaceSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.TaskPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueCumulativeStatisticsContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueCumulativeStatisticsContext.php
index d6d3477..0292c5c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueCumulativeStatisticsContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueCumulativeStatisticsContext.php
@@ -2,67 +2,85 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
class TaskQueueCumulativeStatisticsContext extends InstanceContext
-{
+ {
/**
* Initialize the TaskQueueCumulativeStatisticsContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace with the TaskQueue to
- * fetch
- * @param string $taskQueueSid The SID of the TaskQueue for which to fetch
- * statistics
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueCumulativeStatisticsContext
+ * @param Version $version Version that contains the resource
+ * @param string $workspaceSid The SID of the Workspace with the TaskQueue to fetch.
+ * @param string $taskQueueSid The SID of the TaskQueue for which to fetch statistics.
*/
- public function __construct(Version $version, $workspaceSid, $taskQueueSid)
- {
+ public function __construct(
+ Version $version,
+ $workspaceSid,
+ $taskQueueSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid, 'taskQueueSid' => $taskQueueSid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+ 'taskQueueSid' =>
+ $taskQueueSid,
+ ];
- $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/TaskQueues/' . \rawurlencode($taskQueueSid) . '/CumulativeStatistics';
+ $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid)
+ .'/TaskQueues/' . \rawurlencode($taskQueueSid)
+ .'/CumulativeStatistics';
}
/**
- * Fetch a TaskQueueCumulativeStatisticsInstance
+ * Fetch the TaskQueueCumulativeStatisticsInstance
*
* @param array|Options $options Optional Arguments
- * @return TaskQueueCumulativeStatisticsInstance Fetched
- * TaskQueueCumulativeStatisticsInstance
+ * @return TaskQueueCumulativeStatisticsInstance Fetched TaskQueueCumulativeStatisticsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch($options = array())
+ public function fetch(array $options = []): TaskQueueCumulativeStatisticsInstance
{
+
$options = new Values($options);
- $params = Values::of(array(
- 'EndDate' => Serialize::iso8601DateTime($options['endDate']),
- 'Minutes' => $options['minutes'],
- 'StartDate' => Serialize::iso8601DateTime($options['startDate']),
- 'TaskChannel' => $options['taskChannel'],
- 'SplitByWaitTime' => $options['splitByWaitTime'],
- ));
+ $params = Values::of([
+ 'EndDate' =>
+ Serialize::iso8601DateTime($options['endDate']),
+ 'Minutes' =>
+ $options['minutes'],
+ 'StartDate' =>
+ Serialize::iso8601DateTime($options['startDate']),
+ 'TaskChannel' =>
+ $options['taskChannel'],
+ 'SplitByWaitTime' =>
+ $options['splitByWaitTime'],
+ ]);
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, $params, [], $headers);
return new TaskQueueCumulativeStatisticsInstance(
$this->version,
@@ -72,17 +90,18 @@ public function fetch($options = array())
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.TaskQueueCumulativeStatisticsContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueCumulativeStatisticsInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueCumulativeStatisticsInstance.php
index 9613b22..7cca9c9 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueCumulativeStatisticsInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueCumulativeStatisticsInstance.php
@@ -2,62 +2,69 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
+ * @property string|null $accountSid
* @property int $avgTaskAcceptanceTime
- * @property \DateTime $startTime
- * @property \DateTime $endTime
+ * @property \DateTime|null $startTime
+ * @property \DateTime|null $endTime
* @property int $reservationsCreated
* @property int $reservationsAccepted
* @property int $reservationsRejected
* @property int $reservationsTimedOut
* @property int $reservationsCanceled
* @property int $reservationsRescinded
- * @property array $splitByWaitTime
- * @property string $taskQueueSid
- * @property array $waitDurationUntilAccepted
- * @property array $waitDurationUntilCanceled
+ * @property array|null $splitByWaitTime
+ * @property string|null $taskQueueSid
+ * @property array|null $waitDurationUntilAccepted
+ * @property array|null $waitDurationUntilCanceled
+ * @property array|null $waitDurationInQueueUntilAccepted
* @property int $tasksCanceled
* @property int $tasksCompleted
* @property int $tasksDeleted
* @property int $tasksEntered
* @property int $tasksMoved
- * @property string $workspaceSid
- * @property string $url
+ * @property string|null $workspaceSid
+ * @property string|null $url
*/
class TaskQueueCumulativeStatisticsInstance extends InstanceResource
{
/**
* Initialize the TaskQueueCumulativeStatisticsInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $workspaceSid The SID of the Workspace that contains the
- * TaskQueue
- * @param string $taskQueueSid The SID of the TaskQueue from which these
- * statistics were calculated
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueCumulativeStatisticsInstance
+ * @param string $workspaceSid The SID of the Workspace with the TaskQueue to fetch.
+ * @param string $taskQueueSid The SID of the TaskQueue for which to fetch statistics.
*/
- public function __construct(Version $version, array $payload, $workspaceSid, $taskQueueSid)
+ public function __construct(Version $version, array $payload, string $workspaceSid, string $taskQueueSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'avgTaskAcceptanceTime' => Values::array_get($payload, 'avg_task_acceptance_time'),
'startTime' => Deserialize::dateTime(Values::array_get($payload, 'start_time')),
@@ -72,6 +79,7 @@ public function __construct(Version $version, array $payload, $workspaceSid, $ta
'taskQueueSid' => Values::array_get($payload, 'task_queue_sid'),
'waitDurationUntilAccepted' => Values::array_get($payload, 'wait_duration_until_accepted'),
'waitDurationUntilCanceled' => Values::array_get($payload, 'wait_duration_until_canceled'),
+ 'waitDurationInQueueUntilAccepted' => Values::array_get($payload, 'wait_duration_in_queue_until_accepted'),
'tasksCanceled' => Values::array_get($payload, 'tasks_canceled'),
'tasksCompleted' => Values::array_get($payload, 'tasks_completed'),
'tasksDeleted' => Values::array_get($payload, 'tasks_deleted'),
@@ -79,19 +87,18 @@ public function __construct(Version $version, array $payload, $workspaceSid, $ta
'tasksMoved' => Values::array_get($payload, 'tasks_moved'),
'workspaceSid' => Values::array_get($payload, 'workspace_sid'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('workspaceSid' => $workspaceSid, 'taskQueueSid' => $taskQueueSid,);
+ $this->solution = ['workspaceSid' => $workspaceSid, 'taskQueueSid' => $taskQueueSid, ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueCumulativeStatisticsContext Context for this
- * TaskQueueCumulativeStatisticsInstance
+ * @return TaskQueueCumulativeStatisticsContext Context for this TaskQueueCumulativeStatisticsInstance
*/
- protected function proxy()
+ protected function proxy(): TaskQueueCumulativeStatisticsContext
{
if (!$this->context) {
$this->context = new TaskQueueCumulativeStatisticsContext(
@@ -105,15 +112,15 @@ protected function proxy()
}
/**
- * Fetch a TaskQueueCumulativeStatisticsInstance
+ * Fetch the TaskQueueCumulativeStatisticsInstance
*
* @param array|Options $options Optional Arguments
- * @return TaskQueueCumulativeStatisticsInstance Fetched
- * TaskQueueCumulativeStatisticsInstance
+ * @return TaskQueueCumulativeStatisticsInstance Fetched TaskQueueCumulativeStatisticsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch($options = array())
+ public function fetch(array $options = []): TaskQueueCumulativeStatisticsInstance
{
+
return $this->proxy()->fetch($options);
}
@@ -124,7 +131,7 @@ public function fetch($options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -143,12 +150,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.TaskQueueCumulativeStatisticsInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueCumulativeStatisticsList.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueCumulativeStatisticsList.php
index 371e356..258468b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueCumulativeStatisticsList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueCumulativeStatisticsList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue;
@@ -12,32 +19,40 @@
use Twilio\ListResource;
use Twilio\Version;
+
class TaskQueueCumulativeStatisticsList extends ListResource
-{
+ {
/**
* Construct the TaskQueueCumulativeStatisticsList
*
* @param Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace that contains the
- * TaskQueue
- * @param string $taskQueueSid The SID of the TaskQueue from which these
- * statistics were calculated
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueCumulativeStatisticsList
+ * @param string $workspaceSid The SID of the Workspace with the TaskQueue to fetch.
+ * @param string $taskQueueSid The SID of the TaskQueue for which to fetch statistics.
*/
- public function __construct(Version $version, $workspaceSid, $taskQueueSid)
- {
+ public function __construct(
+ Version $version,
+ string $workspaceSid,
+ string $taskQueueSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid, 'taskQueueSid' => $taskQueueSid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+
+ 'taskQueueSid' =>
+ $taskQueueSid,
+
+ ];
}
/**
* Constructs a TaskQueueCumulativeStatisticsContext
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueCumulativeStatisticsContext
*/
- public function getContext()
+ public function getContext(
+
+ ): TaskQueueCumulativeStatisticsContext
{
return new TaskQueueCumulativeStatisticsContext(
$this->version,
@@ -51,8 +66,8 @@ public function getContext()
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.TaskQueueCumulativeStatisticsList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueCumulativeStatisticsOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueCumulativeStatisticsOptions.php
index 399afce..eb3d6fa 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueCumulativeStatisticsOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueCumulativeStatisticsOptions.php
@@ -1,10 +1,16 @@
options['endDate'] = $endDate;
$this->options['minutes'] = $minutes;
$this->options['startDate'] = $startDate;
@@ -61,11 +77,10 @@ public function __construct($endDate = Values::NONE, $minutes = Values::NONE, $s
/**
* Only calculate statistics from this date and time and earlier, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
*
- * @param \DateTime $endDate Only calculate statistics from on or before this
- * date
+ * @param \DateTime $endDate Only calculate statistics from this date and time and earlier, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
* @return $this Fluent Builder
*/
- public function setEndDate($endDate)
+ public function setEndDate(\DateTime $endDate): self
{
$this->options['endDate'] = $endDate;
return $this;
@@ -74,11 +89,10 @@ public function setEndDate($endDate)
/**
* Only calculate statistics since this many minutes in the past. The default is 15 minutes.
*
- * @param int $minutes Only calculate statistics since this many minutes in the
- * past
+ * @param int $minutes Only calculate statistics since this many minutes in the past. The default is 15 minutes.
* @return $this Fluent Builder
*/
- public function setMinutes($minutes)
+ public function setMinutes(int $minutes): self
{
$this->options['minutes'] = $minutes;
return $this;
@@ -87,11 +101,10 @@ public function setMinutes($minutes)
/**
* Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
*
- * @param \DateTime $startDate Only calculate statistics from on or after this
- * date
+ * @param \DateTime $startDate Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
* @return $this Fluent Builder
*/
- public function setStartDate($startDate)
+ public function setStartDate(\DateTime $startDate): self
{
$this->options['startDate'] = $startDate;
return $this;
@@ -100,25 +113,22 @@ public function setStartDate($startDate)
/**
* Only calculate cumulative statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.
*
- * @param string $taskChannel Only calculate cumulative statistics on this
- * TaskChannel
+ * @param string $taskChannel Only calculate cumulative statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.
* @return $this Fluent Builder
*/
- public function setTaskChannel($taskChannel)
+ public function setTaskChannel(string $taskChannel): self
{
$this->options['taskChannel'] = $taskChannel;
return $this;
}
/**
- * A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed.
+ * A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. TaskRouter will calculate statistics on up to 10,000 Tasks/Reservations for any given threshold.
*
- * @param string $splitByWaitTime A comma separated list of values that
- * describes the thresholds to calculate
- * statistics on
+ * @param string $splitByWaitTime A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. TaskRouter will calculate statistics on up to 10,000 Tasks/Reservations for any given threshold.
* @return $this Fluent Builder
*/
- public function setSplitByWaitTime($splitByWaitTime)
+ public function setSplitByWaitTime(string $splitByWaitTime): self
{
$this->options['splitByWaitTime'] = $splitByWaitTime;
return $this;
@@ -129,14 +139,10 @@ public function setSplitByWaitTime($splitByWaitTime)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Taskrouter.V1.FetchTaskQueueCumulativeStatisticsOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.FetchTaskQueueCumulativeStatisticsOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueCumulativeStatisticsPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueCumulativeStatisticsPage.php
index d460dba..917640d 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueCumulativeStatisticsPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueCumulativeStatisticsPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return TaskQueueCumulativeStatisticsInstance \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueCumulativeStatisticsInstance
+ */
+ public function buildInstance(array $payload): TaskQueueCumulativeStatisticsInstance
{
- return new TaskQueueCumulativeStatisticsInstance(
- $this->version,
- $payload,
- $this->solution['workspaceSid'],
- $this->solution['taskQueueSid']
- );
+ return new TaskQueueCumulativeStatisticsInstance($this->version, $payload, $this->solution['workspaceSid'], $this->solution['taskQueueSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.TaskQueueCumulativeStatisticsPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueRealTimeStatisticsContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueRealTimeStatisticsContext.php
index 196a9b5..b5f15e6 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueRealTimeStatisticsContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueRealTimeStatisticsContext.php
@@ -2,60 +2,76 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class TaskQueueRealTimeStatisticsContext extends InstanceContext
-{
+ {
/**
* Initialize the TaskQueueRealTimeStatisticsContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace with the TaskQueue to
- * fetch
- * @param string $taskQueueSid The SID of the TaskQueue for which to fetch
- * statistics
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueRealTimeStatisticsContext
+ * @param Version $version Version that contains the resource
+ * @param string $workspaceSid The SID of the Workspace with the TaskQueue to fetch.
+ * @param string $taskQueueSid The SID of the TaskQueue for which to fetch statistics.
*/
- public function __construct(Version $version, $workspaceSid, $taskQueueSid)
- {
+ public function __construct(
+ Version $version,
+ $workspaceSid,
+ $taskQueueSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid, 'taskQueueSid' => $taskQueueSid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+ 'taskQueueSid' =>
+ $taskQueueSid,
+ ];
- $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/TaskQueues/' . \rawurlencode($taskQueueSid) . '/RealTimeStatistics';
+ $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid)
+ .'/TaskQueues/' . \rawurlencode($taskQueueSid)
+ .'/RealTimeStatistics';
}
/**
- * Fetch a TaskQueueRealTimeStatisticsInstance
+ * Fetch the TaskQueueRealTimeStatisticsInstance
*
* @param array|Options $options Optional Arguments
- * @return TaskQueueRealTimeStatisticsInstance Fetched
- * TaskQueueRealTimeStatisticsInstance
+ * @return TaskQueueRealTimeStatisticsInstance Fetched TaskQueueRealTimeStatisticsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch($options = array())
+ public function fetch(array $options = []): TaskQueueRealTimeStatisticsInstance
{
+
$options = new Values($options);
- $params = Values::of(array('TaskChannel' => $options['taskChannel'],));
+ $params = Values::of([
+ 'TaskChannel' =>
+ $options['taskChannel'],
+ ]);
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, $params, [], $headers);
return new TaskQueueRealTimeStatisticsInstance(
$this->version,
@@ -65,17 +81,18 @@ public function fetch($options = array())
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.TaskQueueRealTimeStatisticsContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueRealTimeStatisticsInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueRealTimeStatisticsInstance.php
index 5d34c20..f28f1bc 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueRealTimeStatisticsInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueRealTimeStatisticsInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue;
use Twilio\Exceptions\TwilioException;
@@ -15,43 +23,45 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * @property string $accountSid
- * @property array $activityStatistics
+ * @property string|null $accountSid
+ * @property array[]|null $activityStatistics
* @property int $longestTaskWaitingAge
- * @property string $longestTaskWaitingSid
- * @property string $taskQueueSid
- * @property array $tasksByPriority
- * @property array $tasksByStatus
+ * @property string|null $longestTaskWaitingSid
+ * @property int $longestRelativeTaskAgeInQueue
+ * @property string|null $longestRelativeTaskSidInQueue
+ * @property string|null $taskQueueSid
+ * @property array|null $tasksByPriority
+ * @property array|null $tasksByStatus
* @property int $totalAvailableWorkers
* @property int $totalEligibleWorkers
* @property int $totalTasks
- * @property string $workspaceSid
- * @property string $url
+ * @property string|null $workspaceSid
+ * @property string|null $url
*/
class TaskQueueRealTimeStatisticsInstance extends InstanceResource
{
/**
* Initialize the TaskQueueRealTimeStatisticsInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $workspaceSid The SID of the Workspace that contains the
- * TaskQueue
- * @param string $taskQueueSid The SID of the TaskQueue from which these
- * statistics were calculated
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueRealTimeStatisticsInstance
+ * @param string $workspaceSid The SID of the Workspace with the TaskQueue to fetch.
+ * @param string $taskQueueSid The SID of the TaskQueue for which to fetch statistics.
*/
- public function __construct(Version $version, array $payload, $workspaceSid, $taskQueueSid)
+ public function __construct(Version $version, array $payload, string $workspaceSid, string $taskQueueSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'activityStatistics' => Values::array_get($payload, 'activity_statistics'),
'longestTaskWaitingAge' => Values::array_get($payload, 'longest_task_waiting_age'),
'longestTaskWaitingSid' => Values::array_get($payload, 'longest_task_waiting_sid'),
+ 'longestRelativeTaskAgeInQueue' => Values::array_get($payload, 'longest_relative_task_age_in_queue'),
+ 'longestRelativeTaskSidInQueue' => Values::array_get($payload, 'longest_relative_task_sid_in_queue'),
'taskQueueSid' => Values::array_get($payload, 'task_queue_sid'),
'tasksByPriority' => Values::array_get($payload, 'tasks_by_priority'),
'tasksByStatus' => Values::array_get($payload, 'tasks_by_status'),
@@ -60,19 +70,18 @@ public function __construct(Version $version, array $payload, $workspaceSid, $ta
'totalTasks' => Values::array_get($payload, 'total_tasks'),
'workspaceSid' => Values::array_get($payload, 'workspace_sid'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('workspaceSid' => $workspaceSid, 'taskQueueSid' => $taskQueueSid,);
+ $this->solution = ['workspaceSid' => $workspaceSid, 'taskQueueSid' => $taskQueueSid, ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueRealTimeStatisticsContext Context for this
- * TaskQueueRealTimeStatisticsInstance
+ * @return TaskQueueRealTimeStatisticsContext Context for this TaskQueueRealTimeStatisticsInstance
*/
- protected function proxy()
+ protected function proxy(): TaskQueueRealTimeStatisticsContext
{
if (!$this->context) {
$this->context = new TaskQueueRealTimeStatisticsContext(
@@ -86,15 +95,15 @@ protected function proxy()
}
/**
- * Fetch a TaskQueueRealTimeStatisticsInstance
+ * Fetch the TaskQueueRealTimeStatisticsInstance
*
* @param array|Options $options Optional Arguments
- * @return TaskQueueRealTimeStatisticsInstance Fetched
- * TaskQueueRealTimeStatisticsInstance
+ * @return TaskQueueRealTimeStatisticsInstance Fetched TaskQueueRealTimeStatisticsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch($options = array())
+ public function fetch(array $options = []): TaskQueueRealTimeStatisticsInstance
{
+
return $this->proxy()->fetch($options);
}
@@ -105,7 +114,7 @@ public function fetch($options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -124,12 +133,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.TaskQueueRealTimeStatisticsInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueRealTimeStatisticsList.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueRealTimeStatisticsList.php
index c5eba26..ccbaf99 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueRealTimeStatisticsList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueRealTimeStatisticsList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue;
@@ -12,32 +19,40 @@
use Twilio\ListResource;
use Twilio\Version;
+
class TaskQueueRealTimeStatisticsList extends ListResource
-{
+ {
/**
* Construct the TaskQueueRealTimeStatisticsList
*
* @param Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace that contains the
- * TaskQueue
- * @param string $taskQueueSid The SID of the TaskQueue from which these
- * statistics were calculated
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueRealTimeStatisticsList
+ * @param string $workspaceSid The SID of the Workspace with the TaskQueue to fetch.
+ * @param string $taskQueueSid The SID of the TaskQueue for which to fetch statistics.
*/
- public function __construct(Version $version, $workspaceSid, $taskQueueSid)
- {
+ public function __construct(
+ Version $version,
+ string $workspaceSid,
+ string $taskQueueSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid, 'taskQueueSid' => $taskQueueSid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+
+ 'taskQueueSid' =>
+ $taskQueueSid,
+
+ ];
}
/**
* Constructs a TaskQueueRealTimeStatisticsContext
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueRealTimeStatisticsContext
*/
- public function getContext()
+ public function getContext(
+
+ ): TaskQueueRealTimeStatisticsContext
{
return new TaskQueueRealTimeStatisticsContext(
$this->version,
@@ -51,8 +66,8 @@ public function getContext()
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.TaskQueueRealTimeStatisticsList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueRealTimeStatisticsOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueRealTimeStatisticsOptions.php
index 06f05ad..a85990c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueRealTimeStatisticsOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueRealTimeStatisticsOptions.php
@@ -1,10 +1,16 @@
options['taskChannel'] = $taskChannel;
}
/**
* The TaskChannel for which to fetch statistics. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.
*
- * @param string $taskChannel The TaskChannel for which to fetch statistics
+ * @param string $taskChannel The TaskChannel for which to fetch statistics. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.
* @return $this Fluent Builder
*/
- public function setTaskChannel($taskChannel)
+ public function setTaskChannel(string $taskChannel): self
{
$this->options['taskChannel'] = $taskChannel;
return $this;
@@ -51,14 +67,10 @@ public function setTaskChannel($taskChannel)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Taskrouter.V1.FetchTaskQueueRealTimeStatisticsOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.FetchTaskQueueRealTimeStatisticsOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueRealTimeStatisticsPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueRealTimeStatisticsPage.php
index 2615576..404eeca 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueRealTimeStatisticsPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueRealTimeStatisticsPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return TaskQueueRealTimeStatisticsInstance \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueRealTimeStatisticsInstance
+ */
+ public function buildInstance(array $payload): TaskQueueRealTimeStatisticsInstance
{
- return new TaskQueueRealTimeStatisticsInstance(
- $this->version,
- $payload,
- $this->solution['workspaceSid'],
- $this->solution['taskQueueSid']
- );
+ return new TaskQueueRealTimeStatisticsInstance($this->version, $payload, $this->solution['workspaceSid'], $this->solution['taskQueueSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.TaskQueueRealTimeStatisticsPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueStatisticsContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueStatisticsContext.php
index 903c66c..fe96bc3 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueStatisticsContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueStatisticsContext.php
@@ -2,66 +2,85 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
class TaskQueueStatisticsContext extends InstanceContext
-{
+ {
/**
* Initialize the TaskQueueStatisticsContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace with the TaskQueue to
- * fetch
- * @param string $taskQueueSid The SID of the TaskQueue for which to fetch
- * statistics
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueStatisticsContext
+ * @param Version $version Version that contains the resource
+ * @param string $workspaceSid The SID of the Workspace with the TaskQueue to fetch.
+ * @param string $taskQueueSid The SID of the TaskQueue for which to fetch statistics.
*/
- public function __construct(Version $version, $workspaceSid, $taskQueueSid)
- {
+ public function __construct(
+ Version $version,
+ $workspaceSid,
+ $taskQueueSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid, 'taskQueueSid' => $taskQueueSid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+ 'taskQueueSid' =>
+ $taskQueueSid,
+ ];
- $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/TaskQueues/' . \rawurlencode($taskQueueSid) . '/Statistics';
+ $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid)
+ .'/TaskQueues/' . \rawurlencode($taskQueueSid)
+ .'/Statistics';
}
/**
- * Fetch a TaskQueueStatisticsInstance
+ * Fetch the TaskQueueStatisticsInstance
*
* @param array|Options $options Optional Arguments
* @return TaskQueueStatisticsInstance Fetched TaskQueueStatisticsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch($options = array())
+ public function fetch(array $options = []): TaskQueueStatisticsInstance
{
+
$options = new Values($options);
- $params = Values::of(array(
- 'EndDate' => Serialize::iso8601DateTime($options['endDate']),
- 'Minutes' => $options['minutes'],
- 'StartDate' => Serialize::iso8601DateTime($options['startDate']),
- 'TaskChannel' => $options['taskChannel'],
- 'SplitByWaitTime' => $options['splitByWaitTime'],
- ));
+ $params = Values::of([
+ 'EndDate' =>
+ Serialize::iso8601DateTime($options['endDate']),
+ 'Minutes' =>
+ $options['minutes'],
+ 'StartDate' =>
+ Serialize::iso8601DateTime($options['startDate']),
+ 'TaskChannel' =>
+ $options['taskChannel'],
+ 'SplitByWaitTime' =>
+ $options['splitByWaitTime'],
+ ]);
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, $params, [], $headers);
return new TaskQueueStatisticsInstance(
$this->version,
@@ -71,17 +90,18 @@ public function fetch($options = array())
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.TaskQueueStatisticsContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueStatisticsInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueStatisticsInstance.php
index efbfae5..d4c9d36 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueStatisticsInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueStatisticsInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue;
use Twilio\Exceptions\TwilioException;
@@ -15,52 +23,49 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * @property string $accountSid
- * @property array $cumulative
- * @property array $realtime
- * @property string $taskQueueSid
- * @property string $workspaceSid
- * @property string $url
+ * @property string|null $accountSid
+ * @property array|null $cumulative
+ * @property array|null $realtime
+ * @property string|null $taskQueueSid
+ * @property string|null $workspaceSid
+ * @property string|null $url
*/
class TaskQueueStatisticsInstance extends InstanceResource
{
/**
* Initialize the TaskQueueStatisticsInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $workspaceSid The SID of the Workspace that contains the
- * TaskQueue
- * @param string $taskQueueSid The SID of the TaskQueue from which these
- * statistics were calculated
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueStatisticsInstance
+ * @param string $workspaceSid The SID of the Workspace with the TaskQueue to fetch.
+ * @param string $taskQueueSid The SID of the TaskQueue for which to fetch statistics.
*/
- public function __construct(Version $version, array $payload, $workspaceSid, $taskQueueSid)
+ public function __construct(Version $version, array $payload, string $workspaceSid, string $taskQueueSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'cumulative' => Values::array_get($payload, 'cumulative'),
'realtime' => Values::array_get($payload, 'realtime'),
'taskQueueSid' => Values::array_get($payload, 'task_queue_sid'),
'workspaceSid' => Values::array_get($payload, 'workspace_sid'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('workspaceSid' => $workspaceSid, 'taskQueueSid' => $taskQueueSid,);
+ $this->solution = ['workspaceSid' => $workspaceSid, 'taskQueueSid' => $taskQueueSid, ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueStatisticsContext Context for this
- * TaskQueueStatisticsInstance
+ * @return TaskQueueStatisticsContext Context for this TaskQueueStatisticsInstance
*/
- protected function proxy()
+ protected function proxy(): TaskQueueStatisticsContext
{
if (!$this->context) {
$this->context = new TaskQueueStatisticsContext(
@@ -74,14 +79,15 @@ protected function proxy()
}
/**
- * Fetch a TaskQueueStatisticsInstance
+ * Fetch the TaskQueueStatisticsInstance
*
* @param array|Options $options Optional Arguments
* @return TaskQueueStatisticsInstance Fetched TaskQueueStatisticsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch($options = array())
+ public function fetch(array $options = []): TaskQueueStatisticsInstance
{
+
return $this->proxy()->fetch($options);
}
@@ -92,7 +98,7 @@ public function fetch($options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -111,12 +117,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.TaskQueueStatisticsInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueStatisticsList.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueStatisticsList.php
index fd3b3b7..2c72b3a 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueStatisticsList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueStatisticsList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue;
@@ -12,32 +19,40 @@
use Twilio\ListResource;
use Twilio\Version;
+
class TaskQueueStatisticsList extends ListResource
-{
+ {
/**
* Construct the TaskQueueStatisticsList
*
* @param Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace that contains the
- * TaskQueue
- * @param string $taskQueueSid The SID of the TaskQueue from which these
- * statistics were calculated
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueStatisticsList
+ * @param string $workspaceSid The SID of the Workspace with the TaskQueue to fetch.
+ * @param string $taskQueueSid The SID of the TaskQueue for which to fetch statistics.
*/
- public function __construct(Version $version, $workspaceSid, $taskQueueSid)
- {
+ public function __construct(
+ Version $version,
+ string $workspaceSid,
+ string $taskQueueSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid, 'taskQueueSid' => $taskQueueSid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+
+ 'taskQueueSid' =>
+ $taskQueueSid,
+
+ ];
}
/**
* Constructs a TaskQueueStatisticsContext
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueStatisticsContext
*/
- public function getContext()
+ public function getContext(
+
+ ): TaskQueueStatisticsContext
{
return new TaskQueueStatisticsContext(
$this->version,
@@ -51,8 +66,8 @@ public function getContext()
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.TaskQueueStatisticsList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueStatisticsOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueStatisticsOptions.php
index e3d03cf..1648a2b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueStatisticsOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueStatisticsOptions.php
@@ -1,10 +1,16 @@
options['endDate'] = $endDate;
$this->options['minutes'] = $minutes;
$this->options['startDate'] = $startDate;
@@ -61,11 +77,10 @@ public function __construct($endDate = Values::NONE, $minutes = Values::NONE, $s
/**
* Only calculate statistics from this date and time and earlier, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
*
- * @param \DateTime $endDate Only calculate statistics from on or before this
- * date
+ * @param \DateTime $endDate Only calculate statistics from this date and time and earlier, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
* @return $this Fluent Builder
*/
- public function setEndDate($endDate)
+ public function setEndDate(\DateTime $endDate): self
{
$this->options['endDate'] = $endDate;
return $this;
@@ -74,11 +89,10 @@ public function setEndDate($endDate)
/**
* Only calculate statistics since this many minutes in the past. The default is 15 minutes.
*
- * @param int $minutes Only calculate statistics since this many minutes in the
- * past
+ * @param int $minutes Only calculate statistics since this many minutes in the past. The default is 15 minutes.
* @return $this Fluent Builder
*/
- public function setMinutes($minutes)
+ public function setMinutes(int $minutes): self
{
$this->options['minutes'] = $minutes;
return $this;
@@ -87,11 +101,10 @@ public function setMinutes($minutes)
/**
* Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
*
- * @param \DateTime $startDate Only calculate statistics from on or after this
- * date
+ * @param \DateTime $startDate Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
* @return $this Fluent Builder
*/
- public function setStartDate($startDate)
+ public function setStartDate(\DateTime $startDate): self
{
$this->options['startDate'] = $startDate;
return $this;
@@ -100,11 +113,10 @@ public function setStartDate($startDate)
/**
* Only calculate real-time and cumulative statistics for the specified TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.
*
- * @param string $taskChannel Only calculate real-time and cumulative
- * statistics for the specified TaskChannel
+ * @param string $taskChannel Only calculate real-time and cumulative statistics for the specified TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.
* @return $this Fluent Builder
*/
- public function setTaskChannel($taskChannel)
+ public function setTaskChannel(string $taskChannel): self
{
$this->options['taskChannel'] = $taskChannel;
return $this;
@@ -113,12 +125,10 @@ public function setTaskChannel($taskChannel)
/**
* A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed.
*
- * @param string $splitByWaitTime A comma separated list of values that
- * describes the thresholds to calculate
- * statistics on
+ * @param string $splitByWaitTime A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed.
* @return $this Fluent Builder
*/
- public function setSplitByWaitTime($splitByWaitTime)
+ public function setSplitByWaitTime(string $splitByWaitTime): self
{
$this->options['splitByWaitTime'] = $splitByWaitTime;
return $this;
@@ -129,14 +139,10 @@ public function setSplitByWaitTime($splitByWaitTime)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Taskrouter.V1.FetchTaskQueueStatisticsOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.FetchTaskQueueStatisticsOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueStatisticsPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueStatisticsPage.php
index 32af1b6..dfcf2f8 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueStatisticsPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueStatisticsPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return TaskQueueStatisticsInstance \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueStatisticsInstance
+ */
+ public function buildInstance(array $payload): TaskQueueStatisticsInstance
{
- return new TaskQueueStatisticsInstance(
- $this->version,
- $payload,
- $this->solution['workspaceSid'],
- $this->solution['taskQueueSid']
- );
+ return new TaskQueueStatisticsInstance($this->version, $payload, $this->solution['workspaceSid'], $this->solution['taskQueueSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.TaskQueueStatisticsPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueuesStatisticsInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueuesStatisticsInstance.php
index 3021694..eb938fa 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueuesStatisticsInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueuesStatisticsInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue;
use Twilio\Exceptions\TwilioException;
@@ -14,38 +22,37 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * @property string $accountSid
- * @property array $cumulative
- * @property array $realtime
- * @property string $taskQueueSid
- * @property string $workspaceSid
+ * @property string|null $accountSid
+ * @property array|null $cumulative
+ * @property array|null $realtime
+ * @property string|null $taskQueueSid
+ * @property string|null $workspaceSid
*/
class TaskQueuesStatisticsInstance extends InstanceResource
{
/**
* Initialize the TaskQueuesStatisticsInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $workspaceSid The SID of the Workspace that contains the
- * TaskQueue
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueuesStatisticsInstance
+ * @param string $workspaceSid The SID of the Workspace with the TaskQueues to read.
*/
- public function __construct(Version $version, array $payload, $workspaceSid)
+ public function __construct(Version $version, array $payload, string $workspaceSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'cumulative' => Values::array_get($payload, 'cumulative'),
'realtime' => Values::array_get($payload, 'realtime'),
'taskQueueSid' => Values::array_get($payload, 'task_queue_sid'),
'workspaceSid' => Values::array_get($payload, 'workspace_sid'),
- );
+ ];
- $this->solution = array('workspaceSid' => $workspaceSid,);
+ $this->solution = ['workspaceSid' => $workspaceSid, ];
}
/**
@@ -55,7 +62,7 @@ public function __construct(Version $version, array $payload, $workspaceSid)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -74,8 +81,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.TaskQueuesStatisticsInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueuesStatisticsList.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueuesStatisticsList.php
index 3bfc496..1d266cf 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueuesStatisticsList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueuesStatisticsList.php
@@ -2,132 +2,151 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class TaskQueuesStatisticsList extends ListResource
-{
+ {
/**
* Construct the TaskQueuesStatisticsList
*
* @param Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace that contains the
- * TaskQueue
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueuesStatisticsList
+ * @param string $workspaceSid The SID of the Workspace with the TaskQueues to read.
*/
- public function __construct(Version $version, $workspaceSid)
- {
+ public function __construct(
+ Version $version,
+ string $workspaceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid,);
-
- $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/TaskQueues/Statistics';
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+
+ ];
+
+ $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid)
+ .'/TaskQueues/Statistics';
}
/**
- * Streams TaskQueuesStatisticsInstance records from the API as a generator
- * stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Reads TaskQueuesStatisticsInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
+ * @param int $limit Upper limit for the number of records to return. read()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
+ * page_size is defined but a limit is defined, read()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return TaskQueuesStatisticsInstance[] Array of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($options, $limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
- * Reads TaskQueuesStatisticsInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
+ * Streams TaskQueuesStatisticsInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
+ * @param int $limit Upper limit for the number of records to return. stream()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
+ * page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return TaskQueuesStatisticsInstance[] Array of results
+ * @return Stream stream of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
/**
* Retrieve a single page of TaskQueuesStatisticsInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of TaskQueuesStatisticsInstance
+ * @return TaskQueuesStatisticsPage Page of TaskQueuesStatisticsInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): TaskQueuesStatisticsPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'EndDate' => Serialize::iso8601DateTime($options['endDate']),
- 'FriendlyName' => $options['friendlyName'],
- 'Minutes' => $options['minutes'],
- 'StartDate' => Serialize::iso8601DateTime($options['startDate']),
- 'TaskChannel' => $options['taskChannel'],
- 'SplitByWaitTime' => $options['splitByWaitTime'],
+
+ $params = Values::of([
+ 'EndDate' =>
+ Serialize::iso8601DateTime($options['endDate']),
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'Minutes' =>
+ $options['minutes'],
+ 'StartDate' =>
+ Serialize::iso8601DateTime($options['startDate']),
+ 'TaskChannel' =>
+ $options['taskChannel'],
+ 'SplitByWaitTime' =>
+ $options['splitByWaitTime'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new TaskQueuesStatisticsPage($this->version, $response, $this->solution);
}
/**
- * Retrieve a specific page of TaskQueuesStatisticsInstance records from the
- * API.
+ * Retrieve a specific page of TaskQueuesStatisticsInstance records from the API.
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of TaskQueuesStatisticsInstance
+ * @return TaskQueuesStatisticsPage Page of TaskQueuesStatisticsInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): TaskQueuesStatisticsPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -137,13 +156,14 @@ public function getPage($targetUrl)
return new TaskQueuesStatisticsPage($this->version, $response, $this->solution);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.TaskQueuesStatisticsList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueuesStatisticsOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueuesStatisticsOptions.php
index 0f935c9..279316c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueuesStatisticsOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueuesStatisticsOptions.php
@@ -1,10 +1,16 @@
options['endDate'] = $endDate;
$this->options['friendlyName'] = $friendlyName;
$this->options['minutes'] = $minutes;
@@ -64,11 +83,10 @@ public function __construct($endDate = Values::NONE, $friendlyName = Values::NON
/**
* Only calculate statistics from this date and time and earlier, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
*
- * @param \DateTime $endDate Only calculate statistics from on or before this
- * date
+ * @param \DateTime $endDate Only calculate statistics from this date and time and earlier, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
* @return $this Fluent Builder
*/
- public function setEndDate($endDate)
+ public function setEndDate(\DateTime $endDate): self
{
$this->options['endDate'] = $endDate;
return $this;
@@ -77,11 +95,10 @@ public function setEndDate($endDate)
/**
* The `friendly_name` of the TaskQueue statistics to read.
*
- * @param string $friendlyName The friendly_name of the TaskQueue statistics to
- * read
+ * @param string $friendlyName The `friendly_name` of the TaskQueue statistics to read.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -90,11 +107,10 @@ public function setFriendlyName($friendlyName)
/**
* Only calculate statistics since this many minutes in the past. The default is 15 minutes.
*
- * @param int $minutes Only calculate statistics since this many minutes in the
- * past
+ * @param int $minutes Only calculate statistics since this many minutes in the past. The default is 15 minutes.
* @return $this Fluent Builder
*/
- public function setMinutes($minutes)
+ public function setMinutes(int $minutes): self
{
$this->options['minutes'] = $minutes;
return $this;
@@ -103,11 +119,10 @@ public function setMinutes($minutes)
/**
* Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
*
- * @param \DateTime $startDate Only calculate statistics from on or after this
- * date
+ * @param \DateTime $startDate Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
* @return $this Fluent Builder
*/
- public function setStartDate($startDate)
+ public function setStartDate(\DateTime $startDate): self
{
$this->options['startDate'] = $startDate;
return $this;
@@ -116,10 +131,10 @@ public function setStartDate($startDate)
/**
* Only calculate statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.
*
- * @param string $taskChannel Only calculate statistics on this TaskChannel.
+ * @param string $taskChannel Only calculate statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.
* @return $this Fluent Builder
*/
- public function setTaskChannel($taskChannel)
+ public function setTaskChannel(string $taskChannel): self
{
$this->options['taskChannel'] = $taskChannel;
return $this;
@@ -128,12 +143,10 @@ public function setTaskChannel($taskChannel)
/**
* A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed.
*
- * @param string $splitByWaitTime A comma separated list of values that
- * describes the thresholds to calculate
- * statistics on
+ * @param string $splitByWaitTime A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed.
* @return $this Fluent Builder
*/
- public function setSplitByWaitTime($splitByWaitTime)
+ public function setSplitByWaitTime(string $splitByWaitTime): self
{
$this->options['splitByWaitTime'] = $splitByWaitTime;
return $this;
@@ -144,14 +157,10 @@ public function setSplitByWaitTime($splitByWaitTime)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Taskrouter.V1.ReadTaskQueuesStatisticsOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.ReadTaskQueuesStatisticsOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueuesStatisticsPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueuesStatisticsPage.php
index 2697f68..4446586 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueuesStatisticsPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueuesStatisticsPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return TaskQueuesStatisticsInstance \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueuesStatisticsInstance
+ */
+ public function buildInstance(array $payload): TaskQueuesStatisticsInstance
{
return new TaskQueuesStatisticsInstance($this->version, $payload, $this->solution['workspaceSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.TaskQueuesStatisticsPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueueContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueueContext.php
index 21b8b9e..3f7b5d5 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueueContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueueContext.php
@@ -2,70 +2,98 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueCumulativeStatisticsList;
-use Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueRealTimeStatisticsList;
-use Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueStatisticsList;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueCumulativeStatisticsList;
+use Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueStatisticsList;
+use Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueRealTimeStatisticsList;
+
/**
- * @property \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueStatisticsList $statistics
- * @property \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueRealTimeStatisticsList $realTimeStatistics
- * @property \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueCumulativeStatisticsList $cumulativeStatistics
+ * @property TaskQueueCumulativeStatisticsList $cumulativeStatistics
+ * @property TaskQueueStatisticsList $statistics
+ * @property TaskQueueRealTimeStatisticsList $realTimeStatistics
+ * @method \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueCumulativeStatisticsContext cumulativeStatistics()
* @method \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueStatisticsContext statistics()
* @method \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueRealTimeStatisticsContext realTimeStatistics()
- * @method \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueCumulativeStatisticsContext cumulativeStatistics()
*/
class TaskQueueContext extends InstanceContext
-{
- protected $_statistics = null;
- protected $_realTimeStatistics = null;
- protected $_cumulativeStatistics = null;
+ {
+ protected $_cumulativeStatistics;
+ protected $_statistics;
+ protected $_realTimeStatistics;
/**
* Initialize the TaskQueueContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace with the TaskQueue to
- * fetch
- * @param string $sid The SID of the resource to
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueueContext
+ * @param Version $version Version that contains the resource
+ * @param string $workspaceSid The SID of the Workspace that the new TaskQueue belongs to.
+ * @param string $sid The SID of the TaskQueue resource to delete.
*/
- public function __construct(Version $version, $workspaceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $workspaceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid, 'sid' => $sid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid)
+ .'/TaskQueues/' . \rawurlencode($sid)
+ .'';
+ }
- $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/TaskQueues/' . \rawurlencode($sid) . '';
+ /**
+ * Delete the TaskQueueInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a TaskQueueInstance
+ * Fetch the TaskQueueInstance
*
* @return TaskQueueInstance Fetched TaskQueueInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): TaskQueueInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new TaskQueueInstance(
$this->version,
@@ -75,6 +103,7 @@ public function fetch()
);
}
+
/**
* Update the TaskQueueInstance
*
@@ -82,25 +111,28 @@ public function fetch()
* @return TaskQueueInstance Updated TaskQueueInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): TaskQueueInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'TargetWorkers' => $options['targetWorkers'],
- 'ReservationActivitySid' => $options['reservationActivitySid'],
- 'AssignmentActivitySid' => $options['assignmentActivitySid'],
- 'MaxReservedWorkers' => $options['maxReservedWorkers'],
- 'TaskOrder' => $options['taskOrder'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'TargetWorkers' =>
+ $options['targetWorkers'],
+ 'ReservationActivitySid' =>
+ $options['reservationActivitySid'],
+ 'AssignmentActivitySid' =>
+ $options['assignmentActivitySid'],
+ 'MaxReservedWorkers' =>
+ $options['maxReservedWorkers'],
+ 'TaskOrder' =>
+ $options['taskOrder'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new TaskQueueInstance(
$this->version,
@@ -110,23 +142,27 @@ public function update($options = array())
);
}
+
/**
- * Deletes the TaskQueueInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
+ * Access the cumulativeStatistics
*/
- public function delete()
+ protected function getCumulativeStatistics(): TaskQueueCumulativeStatisticsList
{
- return $this->version->delete('delete', $this->uri);
+ if (!$this->_cumulativeStatistics) {
+ $this->_cumulativeStatistics = new TaskQueueCumulativeStatisticsList(
+ $this->version,
+ $this->solution['workspaceSid'],
+ $this->solution['sid']
+ );
+ }
+
+ return $this->_cumulativeStatistics;
}
/**
* Access the statistics
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueStatisticsList
*/
- protected function getStatistics()
+ protected function getStatistics(): TaskQueueStatisticsList
{
if (!$this->_statistics) {
$this->_statistics = new TaskQueueStatisticsList(
@@ -141,10 +177,8 @@ protected function getStatistics()
/**
* Access the realTimeStatistics
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueRealTimeStatisticsList
*/
- protected function getRealTimeStatistics()
+ protected function getRealTimeStatistics(): TaskQueueRealTimeStatisticsList
{
if (!$this->_realTimeStatistics) {
$this->_realTimeStatistics = new TaskQueueRealTimeStatisticsList(
@@ -157,32 +191,14 @@ protected function getRealTimeStatistics()
return $this->_realTimeStatistics;
}
- /**
- * Access the cumulativeStatistics
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueCumulativeStatisticsList
- */
- protected function getCumulativeStatistics()
- {
- if (!$this->_cumulativeStatistics) {
- $this->_cumulativeStatistics = new TaskQueueCumulativeStatisticsList(
- $this->version,
- $this->solution['workspaceSid'],
- $this->solution['sid']
- );
- }
-
- return $this->_cumulativeStatistics;
- }
-
/**
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -197,10 +213,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -215,12 +231,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.TaskQueueContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueueInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueueInstance.php
index 5cb7acf..58d82c1 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueueInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueueInstance.php
@@ -2,59 +2,69 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueCumulativeStatisticsList;
+use Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueStatisticsList;
+use Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueRealTimeStatisticsList;
+
/**
- * @property string $accountSid
- * @property string $assignmentActivitySid
- * @property string $assignmentActivityName
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $friendlyName
+ * @property string|null $accountSid
+ * @property string|null $assignmentActivitySid
+ * @property string|null $assignmentActivityName
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $friendlyName
* @property int $maxReservedWorkers
- * @property string $reservationActivitySid
- * @property string $reservationActivityName
- * @property string $sid
- * @property string $targetWorkers
+ * @property string|null $reservationActivitySid
+ * @property string|null $reservationActivityName
+ * @property string|null $sid
+ * @property string|null $targetWorkers
* @property string $taskOrder
- * @property string $url
- * @property string $workspaceSid
- * @property array $links
+ * @property string|null $url
+ * @property string|null $workspaceSid
+ * @property array|null $links
*/
class TaskQueueInstance extends InstanceResource
{
- protected $_statistics = null;
- protected $_realTimeStatistics = null;
- protected $_cumulativeStatistics = null;
+ protected $_cumulativeStatistics;
+ protected $_statistics;
+ protected $_realTimeStatistics;
/**
* Initialize the TaskQueueInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $workspaceSid The SID of the Workspace that contains the
- * TaskQueue
- * @param string $sid The SID of the resource to
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueueInstance
+ * @param string $workspaceSid The SID of the Workspace that the new TaskQueue belongs to.
+ * @param string $sid The SID of the TaskQueue resource to delete.
*/
- public function __construct(Version $version, array $payload, $workspaceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $workspaceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'assignmentActivitySid' => Values::array_get($payload, 'assignment_activity_sid'),
'assignmentActivityName' => Values::array_get($payload, 'assignment_activity_name'),
@@ -70,20 +80,18 @@ public function __construct(Version $version, array $payload, $workspaceSid, $si
'url' => Values::array_get($payload, 'url'),
'workspaceSid' => Values::array_get($payload, 'workspace_sid'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('workspaceSid' => $workspaceSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['workspaceSid' => $workspaceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueueContext Context for
- * this
- * TaskQueueInstance
+ * @return TaskQueueContext Context for this TaskQueueInstance
*/
- protected function proxy()
+ protected function proxy(): TaskQueueContext
{
if (!$this->context) {
$this->context = new TaskQueueContext(
@@ -97,13 +105,26 @@ protected function proxy()
}
/**
- * Fetch a TaskQueueInstance
+ * Delete the TaskQueueInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ return $this->proxy()->delete();
+ }
+
+ /**
+ * Fetch the TaskQueueInstance
*
* @return TaskQueueInstance Fetched TaskQueueInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): TaskQueueInstance
{
+
return $this->proxy()->fetch();
}
@@ -114,52 +135,36 @@ public function fetch()
* @return TaskQueueInstance Updated TaskQueueInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): TaskQueueInstance
{
+
return $this->proxy()->update($options);
}
/**
- * Deletes the TaskQueueInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
+ * Access the cumulativeStatistics
*/
- public function delete()
+ protected function getCumulativeStatistics(): TaskQueueCumulativeStatisticsList
{
- return $this->proxy()->delete();
+ return $this->proxy()->cumulativeStatistics;
}
/**
* Access the statistics
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueStatisticsList
*/
- protected function getStatistics()
+ protected function getStatistics(): TaskQueueStatisticsList
{
return $this->proxy()->statistics;
}
/**
* Access the realTimeStatistics
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueRealTimeStatisticsList
*/
- protected function getRealTimeStatistics()
+ protected function getRealTimeStatistics(): TaskQueueRealTimeStatisticsList
{
return $this->proxy()->realTimeStatistics;
}
- /**
- * Access the cumulativeStatistics
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueCumulativeStatisticsList
- */
- protected function getCumulativeStatistics()
- {
- return $this->proxy()->cumulativeStatistics;
- }
-
/**
* Magic getter to access properties
*
@@ -167,7 +172,7 @@ protected function getCumulativeStatistics()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -186,12 +191,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.TaskQueueInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueueList.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueueList.php
index 0e90feb..9e29c0e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueueList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueueList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Taskrouter\V1\Workspace;
@@ -12,63 +19,85 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueuesStatisticsList;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueueBulkRealTimeStatisticsList;
+use Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueuesStatisticsList;
+
/**
- * @property \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueue\TaskQueuesStatisticsList $statistics
+ * @property TaskQueueBulkRealTimeStatisticsList $bulkRealTimeStatistics
+ * @property TaskQueuesStatisticsList $statistics
*/
class TaskQueueList extends ListResource
-{
+ {
+ protected $_bulkRealTimeStatistics = null;
protected $_statistics = null;
/**
* Construct the TaskQueueList
*
* @param Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace that contains the
- * TaskQueue
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueueList
+ * @param string $workspaceSid The SID of the Workspace that the new TaskQueue belongs to.
*/
- public function __construct(Version $version, $workspaceSid)
- {
+ public function __construct(
+ Version $version,
+ string $workspaceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+
+ ];
- $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/TaskQueues';
+ $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid)
+ .'/TaskQueues';
}
/**
- * Streams TaskQueueInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the TaskQueueInstance
*
+ * @param string $friendlyName A descriptive string that you create to describe the TaskQueue. For example `Support-Tier 1`, `Sales`, or `Escalation`.
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return TaskQueueInstance Created TaskQueueInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function create(string $friendlyName, array $options = []): TaskQueueInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($options, $limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'FriendlyName' =>
+ $friendlyName,
+ 'TargetWorkers' =>
+ $options['targetWorkers'],
+ 'MaxReservedWorkers' =>
+ $options['maxReservedWorkers'],
+ 'TaskOrder' =>
+ $options['taskOrder'],
+ 'ReservationActivitySid' =>
+ $options['reservationActivitySid'],
+ 'AssignmentActivitySid' =>
+ $options['assignmentActivitySid'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new TaskQueueInstance(
+ $this->version,
+ $payload,
+ $this->solution['workspaceSid']
+ );
}
+
/**
* Reads TaskQueueInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -85,38 +114,72 @@ public function stream($options = array(), $limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return TaskQueueInstance[] Array of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
+ /**
+ * Streams TaskQueueInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of TaskQueueInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of TaskQueueInstance
+ * @return TaskQueuePage Page of TaskQueueInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): TaskQueuePage
{
$options = new Values($options);
- $params = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'EvaluateWorkerAttributes' => $options['evaluateWorkerAttributes'],
- 'WorkerSid' => $options['workerSid'],
+
+ $params = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'EvaluateWorkerAttributes' =>
+ $options['evaluateWorkerAttributes'],
+ 'WorkerSid' =>
+ $options['workerSid'],
+ 'Ordering' =>
+ $options['ordering'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new TaskQueuePage($this->version, $response, $this->solution);
}
@@ -126,9 +189,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of TaskQueueInstance
+ * @return TaskQueuePage Page of TaskQueueInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): TaskQueuePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -138,58 +201,50 @@ public function getPage($targetUrl)
return new TaskQueuePage($this->version, $response, $this->solution);
}
+
/**
- * Create a new TaskQueueInstance
+ * Constructs a TaskQueueContext
*
- * @param string $friendlyName A string to describe the resource
- * @param array|Options $options Optional Arguments
- * @return TaskQueueInstance Newly created TaskQueueInstance
- * @throws TwilioException When an HTTP error occurs.
+ * @param string $sid The SID of the TaskQueue resource to delete.
*/
- public function create($friendlyName, $options = array())
+ public function getContext(
+ string $sid
+
+ ): TaskQueueContext
{
- $options = new Values($options);
-
- $data = Values::of(array(
- 'FriendlyName' => $friendlyName,
- 'TargetWorkers' => $options['targetWorkers'],
- 'MaxReservedWorkers' => $options['maxReservedWorkers'],
- 'TaskOrder' => $options['taskOrder'],
- 'ReservationActivitySid' => $options['reservationActivitySid'],
- 'AssignmentActivitySid' => $options['assignmentActivitySid'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ return new TaskQueueContext(
+ $this->version,
+ $this->solution['workspaceSid'],
+ $sid
);
-
- return new TaskQueueInstance($this->version, $payload, $this->solution['workspaceSid']);
}
/**
- * Access the statistics
+ * Access the bulkRealTimeStatistics
*/
- protected function getStatistics()
+ protected function getBulkRealTimeStatistics(): TaskQueueBulkRealTimeStatisticsList
{
- if (!$this->_statistics) {
- $this->_statistics = new TaskQueuesStatisticsList($this->version, $this->solution['workspaceSid']);
+ if (!$this->_bulkRealTimeStatistics) {
+ $this->_bulkRealTimeStatistics = new TaskQueueBulkRealTimeStatisticsList(
+ $this->version,
+ $this->solution['workspaceSid']
+ );
}
-
- return $this->_statistics;
+ return $this->_bulkRealTimeStatistics;
}
/**
- * Constructs a TaskQueueContext
- *
- * @param string $sid The SID of the resource to
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueueContext
+ * Access the statistics
*/
- public function getContext($sid)
+ protected function getStatistics(): TaskQueuesStatisticsList
{
- return new TaskQueueContext($this->version, $this->solution['workspaceSid'], $sid);
+ if (!$this->_statistics) {
+ $this->_statistics = new TaskQueuesStatisticsList(
+ $this->version,
+ $this->solution['workspaceSid']
+ );
+ }
+ return $this->_statistics;
}
/**
@@ -199,7 +254,7 @@ public function getContext($sid)
* @return \Twilio\ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -214,10 +269,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -232,8 +287,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.TaskQueueList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueueOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueueOptions.php
index 7b3e21e..1442ab3 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueueOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueueOptions.php
@@ -1,10 +1,16 @@
options['friendlyName'] = $friendlyName;
+ public function __construct(
+
+ string $targetWorkers = Values::NONE,
+ int $maxReservedWorkers = Values::INT_NONE,
+ string $taskOrder = Values::NONE,
+ string $reservationActivitySid = Values::NONE,
+ string $assignmentActivitySid = Values::NONE
+
+ ) {
$this->options['targetWorkers'] = $targetWorkers;
- $this->options['reservationActivitySid'] = $reservationActivitySid;
- $this->options['assignmentActivitySid'] = $assignmentActivitySid;
$this->options['maxReservedWorkers'] = $maxReservedWorkers;
$this->options['taskOrder'] = $taskOrder;
+ $this->options['reservationActivitySid'] = $reservationActivitySid;
+ $this->options['assignmentActivitySid'] = $assignmentActivitySid;
}
/**
- * A descriptive string that you create to describe the TaskQueue. For example `Support-Tier 1`, `Sales`, or `Escalation`.
- *
- * @param string $friendlyName A string to describe the resource
- * @return $this Fluent Builder
- */
- public function setFriendlyName($friendlyName)
- {
- $this->options['friendlyName'] = $friendlyName;
- return $this;
- }
-
- /**
- * A string describing the Worker selection criteria for any Tasks that enter the TaskQueue. For example '"language" == "spanish"' If no TargetWorkers parameter is provided, Tasks will wait in the queue until they are either deleted or moved to another queue. Additional examples on how to describing Worker selection criteria below.
+ * A string that describes the Worker selection criteria for any Tasks that enter the TaskQueue. For example, `'\\\"language\\\" == \\\"spanish\\\"'`. The default value is `1==1`. If this value is empty, Tasks will wait in the TaskQueue until they are deleted or moved to another TaskQueue. For more information about Worker selection, see [Describing Worker selection criteria](https://www.twilio.com/docs/taskrouter/api/taskqueues#target-workers).
*
- * @param string $targetWorkers A string describing the Worker selection
- * criteria for any Tasks that enter the TaskQueue
+ * @param string $targetWorkers A string that describes the Worker selection criteria for any Tasks that enter the TaskQueue. For example, `'\\\"language\\\" == \\\"spanish\\\"'`. The default value is `1==1`. If this value is empty, Tasks will wait in the TaskQueue until they are deleted or moved to another TaskQueue. For more information about Worker selection, see [Describing Worker selection criteria](https://www.twilio.com/docs/taskrouter/api/taskqueues#target-workers).
* @return $this Fluent Builder
*/
- public function setTargetWorkers($targetWorkers)
+ public function setTargetWorkers(string $targetWorkers): self
{
$this->options['targetWorkers'] = $targetWorkers;
return $this;
}
/**
- * The SID of the Activity to assign Workers when a task is reserved for them.
+ * The maximum number of Workers to reserve for the assignment of a Task in the queue. Can be an integer between 1 and 50, inclusive and defaults to 1.
*
- * @param string $reservationActivitySid The SID of the Activity to assign
- * Workers when a task is reserved for
- * them
+ * @param int $maxReservedWorkers The maximum number of Workers to reserve for the assignment of a Task in the queue. Can be an integer between 1 and 50, inclusive and defaults to 1.
* @return $this Fluent Builder
*/
- public function setReservationActivitySid($reservationActivitySid)
+ public function setMaxReservedWorkers(int $maxReservedWorkers): self
{
- $this->options['reservationActivitySid'] = $reservationActivitySid;
+ $this->options['maxReservedWorkers'] = $maxReservedWorkers;
return $this;
}
/**
- * The SID of the Activity to assign Workers when a task is assigned for them.
- *
- * @param string $assignmentActivitySid The SID of the Activity to assign
- * Workers when a task is assigned for them
+ * @param string $taskOrder
* @return $this Fluent Builder
*/
- public function setAssignmentActivitySid($assignmentActivitySid)
+ public function setTaskOrder(string $taskOrder): self
{
- $this->options['assignmentActivitySid'] = $assignmentActivitySid;
+ $this->options['taskOrder'] = $taskOrder;
return $this;
}
/**
- * The maximum number of Workers to create reservations for the assignment of a task while in the queue. Maximum of 50.
+ * The SID of the Activity to assign Workers when a task is reserved for them.
*
- * @param int $maxReservedWorkers The maximum number of Workers to create
- * reservations for the assignment of a task
- * while in the queue
+ * @param string $reservationActivitySid The SID of the Activity to assign Workers when a task is reserved for them.
* @return $this Fluent Builder
*/
- public function setMaxReservedWorkers($maxReservedWorkers)
+ public function setReservationActivitySid(string $reservationActivitySid): self
{
- $this->options['maxReservedWorkers'] = $maxReservedWorkers;
+ $this->options['reservationActivitySid'] = $reservationActivitySid;
return $this;
}
/**
- * How Tasks will be assigned to Workers. Can be: `FIFO` or `LIFO` and the default is `FIFO`. Use `FIFO` to assign the oldest task first and `LIFO` to assign the most recent task first. For more information, see [Queue Ordering](https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo).
+ * The SID of the Activity to assign Workers when a task is assigned to them.
*
- * @param string $taskOrder How Tasks will be assigned to Workers
+ * @param string $assignmentActivitySid The SID of the Activity to assign Workers when a task is assigned to them.
* @return $this Fluent Builder
*/
- public function setTaskOrder($taskOrder)
+ public function setAssignmentActivitySid(string $assignmentActivitySid): self
{
- $this->options['taskOrder'] = $taskOrder;
+ $this->options['assignmentActivitySid'] = $assignmentActivitySid;
return $this;
}
@@ -174,42 +193,44 @@ public function setTaskOrder($taskOrder)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Taskrouter.V1.UpdateTaskQueueOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.CreateTaskQueueOptions ' . $options . ']';
}
}
+
+
class ReadTaskQueueOptions extends Options
-{
+ {
/**
- * @param string $friendlyName The friendly_name of the TaskQueue resources to
- * read
- * @param string $evaluateWorkerAttributes The attributes of the Workers to read
- * @param string $workerSid The SID of the Worker with the TaskQueue resources
- * to read
+ * @param string $friendlyName The `friendly_name` of the TaskQueue resources to read.
+ * @param string $evaluateWorkerAttributes The attributes of the Workers to read. Returns the TaskQueues with Workers that match the attributes specified in this parameter.
+ * @param string $workerSid The SID of the Worker with the TaskQueue resources to read.
+ * @param string $ordering Sorting parameter for TaskQueues
*/
- public function __construct($friendlyName = Values::NONE, $evaluateWorkerAttributes = Values::NONE, $workerSid = Values::NONE)
- {
+ public function __construct(
+
+ string $friendlyName = Values::NONE,
+ string $evaluateWorkerAttributes = Values::NONE,
+ string $workerSid = Values::NONE,
+ string $ordering = Values::NONE
+
+ ) {
$this->options['friendlyName'] = $friendlyName;
$this->options['evaluateWorkerAttributes'] = $evaluateWorkerAttributes;
$this->options['workerSid'] = $workerSid;
+ $this->options['ordering'] = $ordering;
}
/**
* The `friendly_name` of the TaskQueue resources to read.
*
- * @param string $friendlyName The friendly_name of the TaskQueue resources to
- * read
+ * @param string $friendlyName The `friendly_name` of the TaskQueue resources to read.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -218,10 +239,10 @@ public function setFriendlyName($friendlyName)
/**
* The attributes of the Workers to read. Returns the TaskQueues with Workers that match the attributes specified in this parameter.
*
- * @param string $evaluateWorkerAttributes The attributes of the Workers to read
+ * @param string $evaluateWorkerAttributes The attributes of the Workers to read. Returns the TaskQueues with Workers that match the attributes specified in this parameter.
* @return $this Fluent Builder
*/
- public function setEvaluateWorkerAttributes($evaluateWorkerAttributes)
+ public function setEvaluateWorkerAttributes(string $evaluateWorkerAttributes): self
{
$this->options['evaluateWorkerAttributes'] = $evaluateWorkerAttributes;
return $this;
@@ -230,116 +251,134 @@ public function setEvaluateWorkerAttributes($evaluateWorkerAttributes)
/**
* The SID of the Worker with the TaskQueue resources to read.
*
- * @param string $workerSid The SID of the Worker with the TaskQueue resources
- * to read
+ * @param string $workerSid The SID of the Worker with the TaskQueue resources to read.
* @return $this Fluent Builder
*/
- public function setWorkerSid($workerSid)
+ public function setWorkerSid(string $workerSid): self
{
$this->options['workerSid'] = $workerSid;
return $this;
}
+ /**
+ * Sorting parameter for TaskQueues
+ *
+ * @param string $ordering Sorting parameter for TaskQueues
+ * @return $this Fluent Builder
+ */
+ public function setOrdering(string $ordering): self
+ {
+ $this->options['ordering'] = $ordering;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Taskrouter.V1.ReadTaskQueueOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.ReadTaskQueueOptions ' . $options . ']';
}
}
-class CreateTaskQueueOptions extends Options
-{
+class UpdateTaskQueueOptions extends Options
+ {
/**
- * @param string $targetWorkers A string describing the Worker selection
- * criteria for any Tasks that enter the TaskQueue
- * @param int $maxReservedWorkers The maximum number of Workers to reserve
- * @param string $taskOrder How Tasks will be assigned to Workers
- * @param string $reservationActivitySid The SID of the Activity to assign
- * Workers when a task is reserved for
- * them
- * @param string $assignmentActivitySid The SID of the Activity to assign
- * Workers once a task is assigned to them
+ * @param string $friendlyName A descriptive string that you create to describe the TaskQueue. For example `Support-Tier 1`, `Sales`, or `Escalation`.
+ * @param string $targetWorkers A string describing the Worker selection criteria for any Tasks that enter the TaskQueue. For example '\\\"language\\\" == \\\"spanish\\\"' If no TargetWorkers parameter is provided, Tasks will wait in the queue until they are either deleted or moved to another queue. Additional examples on how to describing Worker selection criteria below.
+ * @param string $reservationActivitySid The SID of the Activity to assign Workers when a task is reserved for them.
+ * @param string $assignmentActivitySid The SID of the Activity to assign Workers when a task is assigned for them.
+ * @param int $maxReservedWorkers The maximum number of Workers to create reservations for the assignment of a task while in the queue. Maximum of 50.
+ * @param string $taskOrder
*/
- public function __construct($targetWorkers = Values::NONE, $maxReservedWorkers = Values::NONE, $taskOrder = Values::NONE, $reservationActivitySid = Values::NONE, $assignmentActivitySid = Values::NONE)
- {
+ public function __construct(
+
+ string $friendlyName = Values::NONE,
+ string $targetWorkers = Values::NONE,
+ string $reservationActivitySid = Values::NONE,
+ string $assignmentActivitySid = Values::NONE,
+ int $maxReservedWorkers = Values::INT_NONE,
+ string $taskOrder = Values::NONE
+
+ ) {
+ $this->options['friendlyName'] = $friendlyName;
$this->options['targetWorkers'] = $targetWorkers;
- $this->options['maxReservedWorkers'] = $maxReservedWorkers;
- $this->options['taskOrder'] = $taskOrder;
$this->options['reservationActivitySid'] = $reservationActivitySid;
$this->options['assignmentActivitySid'] = $assignmentActivitySid;
+ $this->options['maxReservedWorkers'] = $maxReservedWorkers;
+ $this->options['taskOrder'] = $taskOrder;
}
/**
- * A string that describes the Worker selection criteria for any Tasks that enter the TaskQueue. For example, `'"language" == "spanish"'`. The default value is `1==1`. If this value is empty, Tasks will wait in the TaskQueue until they are deleted or moved to another TaskQueue. For more information about Worker selection, see [Describing Worker selection criteria](https://www.twilio.com/docs/taskrouter/api/taskqueues#target-workers).
+ * A descriptive string that you create to describe the TaskQueue. For example `Support-Tier 1`, `Sales`, or `Escalation`.
*
- * @param string $targetWorkers A string describing the Worker selection
- * criteria for any Tasks that enter the TaskQueue
+ * @param string $friendlyName A descriptive string that you create to describe the TaskQueue. For example `Support-Tier 1`, `Sales`, or `Escalation`.
* @return $this Fluent Builder
*/
- public function setTargetWorkers($targetWorkers)
+ public function setFriendlyName(string $friendlyName): self
{
- $this->options['targetWorkers'] = $targetWorkers;
+ $this->options['friendlyName'] = $friendlyName;
return $this;
}
/**
- * The maximum number of Workers to reserve for the assignment of a Task in the queue. Can be an integer between 1 and 50, inclusive and defaults to 1.
+ * A string describing the Worker selection criteria for any Tasks that enter the TaskQueue. For example '\\\"language\\\" == \\\"spanish\\\"' If no TargetWorkers parameter is provided, Tasks will wait in the queue until they are either deleted or moved to another queue. Additional examples on how to describing Worker selection criteria below.
*
- * @param int $maxReservedWorkers The maximum number of Workers to reserve
+ * @param string $targetWorkers A string describing the Worker selection criteria for any Tasks that enter the TaskQueue. For example '\\\"language\\\" == \\\"spanish\\\"' If no TargetWorkers parameter is provided, Tasks will wait in the queue until they are either deleted or moved to another queue. Additional examples on how to describing Worker selection criteria below.
* @return $this Fluent Builder
*/
- public function setMaxReservedWorkers($maxReservedWorkers)
+ public function setTargetWorkers(string $targetWorkers): self
{
- $this->options['maxReservedWorkers'] = $maxReservedWorkers;
+ $this->options['targetWorkers'] = $targetWorkers;
return $this;
}
/**
- * How Tasks will be assigned to Workers. Set this parameter to `LIFO` to assign most recently created Task first or FIFO to assign the oldest Task first. Default is `FIFO`. [Click here](https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo) to learn more.
+ * The SID of the Activity to assign Workers when a task is reserved for them.
*
- * @param string $taskOrder How Tasks will be assigned to Workers
+ * @param string $reservationActivitySid The SID of the Activity to assign Workers when a task is reserved for them.
* @return $this Fluent Builder
*/
- public function setTaskOrder($taskOrder)
+ public function setReservationActivitySid(string $reservationActivitySid): self
{
- $this->options['taskOrder'] = $taskOrder;
+ $this->options['reservationActivitySid'] = $reservationActivitySid;
return $this;
}
/**
- * The SID of the Activity to assign Workers when a task is reserved for them.
+ * The SID of the Activity to assign Workers when a task is assigned for them.
*
- * @param string $reservationActivitySid The SID of the Activity to assign
- * Workers when a task is reserved for
- * them
+ * @param string $assignmentActivitySid The SID of the Activity to assign Workers when a task is assigned for them.
* @return $this Fluent Builder
*/
- public function setReservationActivitySid($reservationActivitySid)
+ public function setAssignmentActivitySid(string $assignmentActivitySid): self
{
- $this->options['reservationActivitySid'] = $reservationActivitySid;
+ $this->options['assignmentActivitySid'] = $assignmentActivitySid;
return $this;
}
/**
- * The SID of the Activity to assign Workers when a task is assigned to them.
+ * The maximum number of Workers to create reservations for the assignment of a task while in the queue. Maximum of 50.
*
- * @param string $assignmentActivitySid The SID of the Activity to assign
- * Workers once a task is assigned to them
+ * @param int $maxReservedWorkers The maximum number of Workers to create reservations for the assignment of a task while in the queue. Maximum of 50.
* @return $this Fluent Builder
*/
- public function setAssignmentActivitySid($assignmentActivitySid)
+ public function setMaxReservedWorkers(int $maxReservedWorkers): self
{
- $this->options['assignmentActivitySid'] = $assignmentActivitySid;
+ $this->options['maxReservedWorkers'] = $maxReservedWorkers;
+ return $this;
+ }
+
+ /**
+ * @param string $taskOrder
+ * @return $this Fluent Builder
+ */
+ public function setTaskOrder(string $taskOrder): self
+ {
+ $this->options['taskOrder'] = $taskOrder;
return $this;
}
@@ -348,14 +387,10 @@ public function setAssignmentActivitySid($assignmentActivitySid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Taskrouter.V1.CreateTaskQueueOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.UpdateTaskQueueOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueuePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueuePage.php
index 52e60ec..fae8604 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueuePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueuePage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return TaskQueueInstance \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueueInstance
+ */
+ public function buildInstance(array $payload): TaskQueueInstance
{
return new TaskQueueInstance($this->version, $payload, $this->solution['workspaceSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.TaskQueuePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/ReservationContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/ReservationContext.php
index 0e2ffad..aa65631 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/ReservationContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/ReservationContext.php
@@ -2,58 +2,74 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace\Worker;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
class ReservationContext extends InstanceContext
-{
+ {
/**
* Initialize the ReservationContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace with the
- * WorkerReservation resource to fetch
- * @param string $workerSid The SID of the reserved Worker resource with the
- * WorkerReservation resource to fetch
- * @param string $sid The SID of the WorkerReservation resource to fetch
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\ReservationContext
+ * @param Version $version Version that contains the resource
+ * @param string $workspaceSid The SID of the Workspace with the WorkerReservation resource to fetch.
+ * @param string $workerSid The SID of the reserved Worker resource with the WorkerReservation resource to fetch.
+ * @param string $sid The SID of the WorkerReservation resource to fetch.
*/
- public function __construct(Version $version, $workspaceSid, $workerSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $workspaceSid,
+ $workerSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid, 'workerSid' => $workerSid, 'sid' => $sid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+ 'workerSid' =>
+ $workerSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Workers/' . \rawurlencode($workerSid) . '/Reservations/' . \rawurlencode($sid) . '';
+ $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid)
+ .'/Workers/' . \rawurlencode($workerSid)
+ .'/Reservations/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a ReservationInstance
+ * Fetch the ReservationInstance
*
* @return ReservationInstance Fetched ReservationInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): ReservationInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new ReservationInstance(
$this->version,
@@ -64,6 +80,7 @@ public function fetch()
);
}
+
/**
* Update the ReservationInstance
*
@@ -71,76 +88,120 @@ public function fetch()
* @return ReservationInstance Updated ReservationInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ReservationInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'ReservationStatus' => $options['reservationStatus'],
- 'WorkerActivitySid' => $options['workerActivitySid'],
- 'Instruction' => $options['instruction'],
- 'DequeuePostWorkActivitySid' => $options['dequeuePostWorkActivitySid'],
- 'DequeueFrom' => $options['dequeueFrom'],
- 'DequeueRecord' => $options['dequeueRecord'],
- 'DequeueTimeout' => $options['dequeueTimeout'],
- 'DequeueTo' => $options['dequeueTo'],
- 'DequeueStatusCallbackUrl' => $options['dequeueStatusCallbackUrl'],
- 'CallFrom' => $options['callFrom'],
- 'CallRecord' => $options['callRecord'],
- 'CallTimeout' => $options['callTimeout'],
- 'CallTo' => $options['callTo'],
- 'CallUrl' => $options['callUrl'],
- 'CallStatusCallbackUrl' => $options['callStatusCallbackUrl'],
- 'CallAccept' => Serialize::booleanToString($options['callAccept']),
- 'RedirectCallSid' => $options['redirectCallSid'],
- 'RedirectAccept' => Serialize::booleanToString($options['redirectAccept']),
- 'RedirectUrl' => $options['redirectUrl'],
- 'To' => $options['to'],
- 'From' => $options['from'],
- 'StatusCallback' => $options['statusCallback'],
- 'StatusCallbackMethod' => $options['statusCallbackMethod'],
- 'StatusCallbackEvent' => Serialize::map($options['statusCallbackEvent'], function ($e) {
- return $e;
- }),
- 'Timeout' => $options['timeout'],
- 'Record' => Serialize::booleanToString($options['record']),
- 'Muted' => Serialize::booleanToString($options['muted']),
- 'Beep' => $options['beep'],
- 'StartConferenceOnEnter' => Serialize::booleanToString($options['startConferenceOnEnter']),
- 'EndConferenceOnExit' => Serialize::booleanToString($options['endConferenceOnExit']),
- 'WaitUrl' => $options['waitUrl'],
- 'WaitMethod' => $options['waitMethod'],
- 'EarlyMedia' => Serialize::booleanToString($options['earlyMedia']),
- 'MaxParticipants' => $options['maxParticipants'],
- 'ConferenceStatusCallback' => $options['conferenceStatusCallback'],
- 'ConferenceStatusCallbackMethod' => $options['conferenceStatusCallbackMethod'],
- 'ConferenceStatusCallbackEvent' => Serialize::map($options['conferenceStatusCallbackEvent'], function ($e) {
- return $e;
- }),
- 'ConferenceRecord' => $options['conferenceRecord'],
- 'ConferenceTrim' => $options['conferenceTrim'],
- 'RecordingChannels' => $options['recordingChannels'],
- 'RecordingStatusCallback' => $options['recordingStatusCallback'],
- 'RecordingStatusCallbackMethod' => $options['recordingStatusCallbackMethod'],
- 'ConferenceRecordingStatusCallback' => $options['conferenceRecordingStatusCallback'],
- 'ConferenceRecordingStatusCallbackMethod' => $options['conferenceRecordingStatusCallbackMethod'],
- 'Region' => $options['region'],
- 'SipAuthUsername' => $options['sipAuthUsername'],
- 'SipAuthPassword' => $options['sipAuthPassword'],
- 'DequeueStatusCallbackEvent' => Serialize::map($options['dequeueStatusCallbackEvent'], function ($e) {
- return $e;
- }),
- 'PostWorkActivitySid' => $options['postWorkActivitySid'],
- 'EndConferenceOnCustomerExit' => Serialize::booleanToString($options['endConferenceOnCustomerExit']),
- 'BeepOnCustomerEntrance' => Serialize::booleanToString($options['beepOnCustomerEntrance']),
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'ReservationStatus' =>
+ $options['reservationStatus'],
+ 'WorkerActivitySid' =>
+ $options['workerActivitySid'],
+ 'Instruction' =>
+ $options['instruction'],
+ 'DequeuePostWorkActivitySid' =>
+ $options['dequeuePostWorkActivitySid'],
+ 'DequeueFrom' =>
+ $options['dequeueFrom'],
+ 'DequeueRecord' =>
+ $options['dequeueRecord'],
+ 'DequeueTimeout' =>
+ $options['dequeueTimeout'],
+ 'DequeueTo' =>
+ $options['dequeueTo'],
+ 'DequeueStatusCallbackUrl' =>
+ $options['dequeueStatusCallbackUrl'],
+ 'CallFrom' =>
+ $options['callFrom'],
+ 'CallRecord' =>
+ $options['callRecord'],
+ 'CallTimeout' =>
+ $options['callTimeout'],
+ 'CallTo' =>
+ $options['callTo'],
+ 'CallUrl' =>
+ $options['callUrl'],
+ 'CallStatusCallbackUrl' =>
+ $options['callStatusCallbackUrl'],
+ 'CallAccept' =>
+ Serialize::booleanToString($options['callAccept']),
+ 'RedirectCallSid' =>
+ $options['redirectCallSid'],
+ 'RedirectAccept' =>
+ Serialize::booleanToString($options['redirectAccept']),
+ 'RedirectUrl' =>
+ $options['redirectUrl'],
+ 'To' =>
+ $options['to'],
+ 'From' =>
+ $options['from'],
+ 'StatusCallback' =>
+ $options['statusCallback'],
+ 'StatusCallbackMethod' =>
+ $options['statusCallbackMethod'],
+ 'StatusCallbackEvent' =>
+ $options['statusCallbackEvent'],
+ 'Timeout' =>
+ $options['timeout'],
+ 'Record' =>
+ Serialize::booleanToString($options['record']),
+ 'Muted' =>
+ Serialize::booleanToString($options['muted']),
+ 'Beep' =>
+ $options['beep'],
+ 'StartConferenceOnEnter' =>
+ Serialize::booleanToString($options['startConferenceOnEnter']),
+ 'EndConferenceOnExit' =>
+ Serialize::booleanToString($options['endConferenceOnExit']),
+ 'WaitUrl' =>
+ $options['waitUrl'],
+ 'WaitMethod' =>
+ $options['waitMethod'],
+ 'EarlyMedia' =>
+ Serialize::booleanToString($options['earlyMedia']),
+ 'MaxParticipants' =>
+ $options['maxParticipants'],
+ 'ConferenceStatusCallback' =>
+ $options['conferenceStatusCallback'],
+ 'ConferenceStatusCallbackMethod' =>
+ $options['conferenceStatusCallbackMethod'],
+ 'ConferenceStatusCallbackEvent' =>
+ $options['conferenceStatusCallbackEvent'],
+ 'ConferenceRecord' =>
+ $options['conferenceRecord'],
+ 'ConferenceTrim' =>
+ $options['conferenceTrim'],
+ 'RecordingChannels' =>
+ $options['recordingChannels'],
+ 'RecordingStatusCallback' =>
+ $options['recordingStatusCallback'],
+ 'RecordingStatusCallbackMethod' =>
+ $options['recordingStatusCallbackMethod'],
+ 'ConferenceRecordingStatusCallback' =>
+ $options['conferenceRecordingStatusCallback'],
+ 'ConferenceRecordingStatusCallbackMethod' =>
+ $options['conferenceRecordingStatusCallbackMethod'],
+ 'Region' =>
+ $options['region'],
+ 'SipAuthUsername' =>
+ $options['sipAuthUsername'],
+ 'SipAuthPassword' =>
+ $options['sipAuthPassword'],
+ 'DequeueStatusCallbackEvent' =>
+ Serialize::map($options['dequeueStatusCallbackEvent'], function ($e) { return $e; }),
+ 'PostWorkActivitySid' =>
+ $options['postWorkActivitySid'],
+ 'EndConferenceOnCustomerExit' =>
+ Serialize::booleanToString($options['endConferenceOnCustomerExit']),
+ 'BeepOnCustomerEntrance' =>
+ Serialize::booleanToString($options['beepOnCustomerEntrance']),
+ 'JitterBufferSize' =>
+ $options['jitterBufferSize'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'If-Match' => $options['ifMatch']]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new ReservationInstance(
$this->version,
@@ -151,17 +212,18 @@ public function update($options = array())
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.ReservationContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/ReservationInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/ReservationInstance.php
index c0bb649..a2dd5a3 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/ReservationInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/ReservationInstance.php
@@ -2,52 +2,59 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace\Worker;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
+ * @property string|null $accountSid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
* @property string $reservationStatus
- * @property string $sid
- * @property string $taskSid
- * @property string $workerName
- * @property string $workerSid
- * @property string $workspaceSid
- * @property string $url
- * @property array $links
+ * @property string|null $sid
+ * @property string|null $taskSid
+ * @property string|null $workerName
+ * @property string|null $workerSid
+ * @property string|null $workspaceSid
+ * @property string|null $url
+ * @property array|null $links
*/
class ReservationInstance extends InstanceResource
{
/**
* Initialize the ReservationInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $workspaceSid The SID of the Workspace that this worker is
- * contained within.
- * @param string $workerSid The SID of the reserved Worker resource
- * @param string $sid The SID of the WorkerReservation resource to fetch
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\ReservationInstance
+ * @param string $workspaceSid The SID of the Workspace with the WorkerReservation resource to fetch.
+ * @param string $workerSid The SID of the reserved Worker resource with the WorkerReservation resource to fetch.
+ * @param string $sid The SID of the WorkerReservation resource to fetch.
*/
- public function __construct(Version $version, array $payload, $workspaceSid, $workerSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $workspaceSid, string $workerSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
@@ -59,22 +66,18 @@ public function __construct(Version $version, array $payload, $workspaceSid, $wo
'workspaceSid' => Values::array_get($payload, 'workspace_sid'),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array(
- 'workspaceSid' => $workspaceSid,
- 'workerSid' => $workerSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['workspaceSid' => $workspaceSid, 'workerSid' => $workerSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\ReservationContext Context for this ReservationInstance
+ * @return ReservationContext Context for this ReservationInstance
*/
- protected function proxy()
+ protected function proxy(): ReservationContext
{
if (!$this->context) {
$this->context = new ReservationContext(
@@ -89,13 +92,14 @@ protected function proxy()
}
/**
- * Fetch a ReservationInstance
+ * Fetch the ReservationInstance
*
* @return ReservationInstance Fetched ReservationInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): ReservationInstance
{
+
return $this->proxy()->fetch();
}
@@ -106,8 +110,9 @@ public function fetch()
* @return ReservationInstance Updated ReservationInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ReservationInstance
{
+
return $this->proxy()->update($options);
}
@@ -118,7 +123,7 @@ public function update($options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -137,12 +142,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.ReservationInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/ReservationList.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/ReservationList.php
index f54609d..7b33fee 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/ReservationList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/ReservationList.php
@@ -2,37 +2,77 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Taskrouter\V1\Workspace\Worker;
use Twilio\ListResource;
use Twilio\Options;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class ReservationList extends ListResource
-{
+ {
/**
* Construct the ReservationList
*
* @param Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace that this worker is
- * contained within.
- * @param string $workerSid The SID of the reserved Worker resource
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\ReservationList
+ * @param string $workspaceSid The SID of the Workspace with the WorkerReservation resource to fetch.
+ * @param string $workerSid The SID of the reserved Worker resource with the WorkerReservation resource to fetch.
*/
- public function __construct(Version $version, $workspaceSid, $workerSid)
- {
+ public function __construct(
+ Version $version,
+ string $workspaceSid,
+ string $workerSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid, 'workerSid' => $workerSid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+
+ 'workerSid' =>
+ $workerSid,
+
+ ];
+
+ $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid)
+ .'/Workers/' . \rawurlencode($workerSid)
+ .'/Reservations';
+ }
- $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Workers/' . \rawurlencode($workerSid) . '/Reservations';
+ /**
+ * Reads ReservationInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return ReservationInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -52,9 +92,9 @@ public function __construct(Version $version, $workspaceSid, $workerSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -63,52 +103,33 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads ReservationInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return ReservationInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of ReservationInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of ReservationInstance
+ * @return ReservationPage Page of ReservationInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): ReservationPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'ReservationStatus' => $options['reservationStatus'],
+
+ $params = Values::of([
+ 'ReservationStatus' =>
+ $options['reservationStatus'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new ReservationPage($this->version, $response, $this->solution);
}
@@ -118,9 +139,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of ReservationInstance
+ * @return ReservationPage Page of ReservationInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): ReservationPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -130,13 +151,16 @@ public function getPage($targetUrl)
return new ReservationPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a ReservationContext
*
- * @param string $sid The SID of the WorkerReservation resource to fetch
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\ReservationContext
+ * @param string $sid The SID of the WorkerReservation resource to fetch.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): ReservationContext
{
return new ReservationContext(
$this->version,
@@ -151,8 +175,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.ReservationList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/ReservationOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/ReservationOptions.php
index 9418ecf..1eae508 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/ReservationOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/ReservationOptions.php
@@ -1,10 +1,16 @@
options['reservationStatus'] = $reservationStatus;
}
/**
* Returns the list of reservations for a worker with a specified ReservationStatus. Can be: `pending`, `accepted`, `rejected`, `timeout`, `canceled`, or `rescinded`.
*
- * @param string $reservationStatus Returns the list of reservations for a
- * worker with a specified ReservationStatus
+ * @param string $reservationStatus Returns the list of reservations for a worker with a specified ReservationStatus. Can be: `pending`, `accepted`, `rejected`, `timeout`, `canceled`, or `rescinded`.
* @return $this Fluent Builder
*/
- public function setReservationStatus($reservationStatus)
+ public function setReservationStatus(string $reservationStatus): self
{
$this->options['reservationStatus'] = $reservationStatus;
return $this;
@@ -163,125 +240,127 @@ public function setReservationStatus($reservationStatus)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Taskrouter.V1.ReadReservationOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.ReadReservationOptions ' . $options . ']';
}
}
class UpdateReservationOptions extends Options
-{
- /**
- * @param string $reservationStatus The new status of the reservation
- * @param string $workerActivitySid The new worker activity SID if rejecting a
- * reservation
- * @param string $instruction The assignment instruction for the reservation
- * @param string $dequeuePostWorkActivitySid The SID of the Activity resource
- * to start after executing a Dequeue
- * instruction
- * @param string $dequeueFrom The caller ID of the call to the worker when
- * executing a Dequeue instruction
- * @param string $dequeueRecord Whether to record both legs of a call when
- * executing a Dequeue instruction
- * @param int $dequeueTimeout The timeout for call when executing a Dequeue
- * instruction
- * @param string $dequeueTo The contact URI of the worker when executing a
- * Dequeue instruction
- * @param string $dequeueStatusCallbackUrl The callback URL for completed call
- * event when executing a Dequeue
- * instruction
- * @param string $callFrom The Caller ID of the outbound call when executing a
- * Call instruction
- * @param string $callRecord Whether to record both legs of a call when
- * executing a Call instruction
- * @param int $callTimeout The timeout for a call when executing a Call
- * instruction
- * @param string $callTo The contact URI of the worker when executing a Call
- * instruction
- * @param string $callUrl TwiML URI executed on answering the worker's leg as a
- * result of the Call instruction
- * @param string $callStatusCallbackUrl The URL to call for the completed call
- * event when executing a Call instruction
- * @param bool $callAccept Whether to accept a reservation when executing a
- * Call instruction
- * @param string $redirectCallSid The Call SID of the call parked in the queue
- * when executing a Redirect instruction
- * @param bool $redirectAccept Whether the reservation should be accepted when
- * executing a Redirect instruction
- * @param string $redirectUrl TwiML URI to redirect the call to when executing
- * the Redirect instruction
- * @param string $to The Contact URI of the worker when executing a Conference
- * instruction
- * @param string $from The caller ID of the call to the worker when executing a
- * Conference instruction
- * @param string $statusCallback The URL we should call to send status
- * information to your application
- * @param string $statusCallbackMethod The HTTP method we should use to call
- * status_callback
- * @param string $statusCallbackEvent The call progress events that we will
- * send to status_callback
- * @param int $timeout The timeout for a call when executing a Conference
- * instruction
- * @param bool $record Whether to record the participant and their conferences
- * @param bool $muted Whether to mute the agent
- * @param string $beep Whether to play a notification beep when the participant
- * joins
- * @param bool $startConferenceOnEnter Whether the conference starts when the
- * participant joins the conference
- * @param bool $endConferenceOnExit Whether to end the conference when the
- * agent leaves
- * @param string $waitUrl URL that hosts pre-conference hold music
- * @param string $waitMethod The HTTP method we should use to call `wait_url`
- * @param bool $earlyMedia Whether agents can hear the state of the outbound
- * call
- * @param int $maxParticipants The maximum number of agent conference
- * participants
- * @param string $conferenceStatusCallback The callback URL for conference
- * events
- * @param string $conferenceStatusCallbackMethod HTTP method for requesting
- * `conference_status_callback`
- * URL
- * @param string $conferenceStatusCallbackEvent The conference status events
- * that we will send to
- * conference_status_callback
- * @param string $conferenceRecord Whether to record the conference the
- * participant is joining
- * @param string $conferenceTrim Whether to trim leading and trailing silence
- * from your recorded conference audio files
- * @param string $recordingChannels Specify `mono` or `dual` recording channels
- * @param string $recordingStatusCallback The URL that we should call using the
- * `recording_status_callback_method`
- * when the recording status changes
- * @param string $recordingStatusCallbackMethod The HTTP method we should use
- * when we call
- * `recording_status_callback`
- * @param string $conferenceRecordingStatusCallback The URL we should call
- * using the
- * `conference_recording_status_callback_method` when the conference recording is available
- * @param string $conferenceRecordingStatusCallbackMethod The HTTP method we
- * should use to call
- * `conference_recording_status_callback`
- * @param string $region The region where we should mix the conference audio
- * @param string $sipAuthUsername The SIP username used for authentication
- * @param string $sipAuthPassword The SIP password for authentication
- * @param string $dequeueStatusCallbackEvent The call progress events sent via
- * webhooks as a result of a Dequeue
- * instruction
- * @param string $postWorkActivitySid The new worker activity SID after
- * executing a Conference instruction
- * @param bool $endConferenceOnCustomerExit Whether to end the conference when
- * the customer leaves
- * @param bool $beepOnCustomerEntrance Whether to play a notification beep when
- * the customer joins
- */
- public function __construct($reservationStatus = Values::NONE, $workerActivitySid = Values::NONE, $instruction = Values::NONE, $dequeuePostWorkActivitySid = Values::NONE, $dequeueFrom = Values::NONE, $dequeueRecord = Values::NONE, $dequeueTimeout = Values::NONE, $dequeueTo = Values::NONE, $dequeueStatusCallbackUrl = Values::NONE, $callFrom = Values::NONE, $callRecord = Values::NONE, $callTimeout = Values::NONE, $callTo = Values::NONE, $callUrl = Values::NONE, $callStatusCallbackUrl = Values::NONE, $callAccept = Values::NONE, $redirectCallSid = Values::NONE, $redirectAccept = Values::NONE, $redirectUrl = Values::NONE, $to = Values::NONE, $from = Values::NONE, $statusCallback = Values::NONE, $statusCallbackMethod = Values::NONE, $statusCallbackEvent = Values::NONE, $timeout = Values::NONE, $record = Values::NONE, $muted = Values::NONE, $beep = Values::NONE, $startConferenceOnEnter = Values::NONE, $endConferenceOnExit = Values::NONE, $waitUrl = Values::NONE, $waitMethod = Values::NONE, $earlyMedia = Values::NONE, $maxParticipants = Values::NONE, $conferenceStatusCallback = Values::NONE, $conferenceStatusCallbackMethod = Values::NONE, $conferenceStatusCallbackEvent = Values::NONE, $conferenceRecord = Values::NONE, $conferenceTrim = Values::NONE, $recordingChannels = Values::NONE, $recordingStatusCallback = Values::NONE, $recordingStatusCallbackMethod = Values::NONE, $conferenceRecordingStatusCallback = Values::NONE, $conferenceRecordingStatusCallbackMethod = Values::NONE, $region = Values::NONE, $sipAuthUsername = Values::NONE, $sipAuthPassword = Values::NONE, $dequeueStatusCallbackEvent = Values::NONE, $postWorkActivitySid = Values::NONE, $endConferenceOnCustomerExit = Values::NONE, $beepOnCustomerEntrance = Values::NONE)
{
+ /**
+ * @param string $reservationStatus
+ * @param string $workerActivitySid The new worker activity SID if rejecting a reservation.
+ * @param string $instruction The assignment instruction for the reservation.
+ * @param string $dequeuePostWorkActivitySid The SID of the Activity resource to start after executing a Dequeue instruction.
+ * @param string $dequeueFrom The caller ID of the call to the worker when executing a Dequeue instruction.
+ * @param string $dequeueRecord Whether to record both legs of a call when executing a Dequeue instruction or which leg to record.
+ * @param int $dequeueTimeout The timeout for call when executing a Dequeue instruction.
+ * @param string $dequeueTo The contact URI of the worker when executing a Dequeue instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination.
+ * @param string $dequeueStatusCallbackUrl The callback URL for completed call event when executing a Dequeue instruction.
+ * @param string $callFrom The Caller ID of the outbound call when executing a Call instruction.
+ * @param string $callRecord Whether to record both legs of a call when executing a Call instruction.
+ * @param int $callTimeout The timeout for a call when executing a Call instruction.
+ * @param string $callTo The contact URI of the worker when executing a Call instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination.
+ * @param string $callUrl TwiML URI executed on answering the worker's leg as a result of the Call instruction.
+ * @param string $callStatusCallbackUrl The URL to call for the completed call event when executing a Call instruction.
+ * @param bool $callAccept Whether to accept a reservation when executing a Call instruction.
+ * @param string $redirectCallSid The Call SID of the call parked in the queue when executing a Redirect instruction.
+ * @param bool $redirectAccept Whether the reservation should be accepted when executing a Redirect instruction.
+ * @param string $redirectUrl TwiML URI to redirect the call to when executing the Redirect instruction.
+ * @param string $to The Contact URI of the worker when executing a Conference instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination.
+ * @param string $from The caller ID of the call to the worker when executing a Conference instruction.
+ * @param string $statusCallback The URL we should call using the `status_callback_method` to send status information to your application.
+ * @param string $statusCallbackMethod The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`.
+ * @param string $statusCallbackEvent The call progress events that we will send to `status_callback`. Can be: `initiated`, `ringing`, `answered`, or `completed`.
+ * @param int $timeout The timeout for a call when executing a Conference instruction.
+ * @param bool $record Whether to record the participant and their conferences, including the time between conferences. Can be `true` or `false` and the default is `false`.
+ * @param bool $muted Whether the agent is muted in the conference. Defaults to `false`.
+ * @param string $beep Whether to play a notification beep when the participant joins or when to play a beep. Can be: `true`, `false`, `onEnter`, or `onExit`. The default value is `true`.
+ * @param bool $startConferenceOnEnter Whether to start the conference when the participant joins, if it has not already started. Can be: `true` or `false` and the default is `true`. If `false` and the conference has not started, the participant is muted and hears background music until another participant starts the conference.
+ * @param bool $endConferenceOnExit Whether to end the conference when the agent leaves.
+ * @param string $waitUrl The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic).
+ * @param string $waitMethod The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file.
+ * @param bool $earlyMedia Whether to allow an agent to hear the state of the outbound call, including ringing or disconnect messages. The default is `true`.
+ * @param int $maxParticipants The maximum number of participants allowed in the conference. Can be a positive integer from `2` to `250`. The default value is `250`.
+ * @param string $conferenceStatusCallback The URL we should call using the `conference_status_callback_method` when the conference events in `conference_status_callback_event` occur. Only the value set by the first participant to join the conference is used. Subsequent `conference_status_callback` values are ignored.
+ * @param string $conferenceStatusCallbackMethod The HTTP method we should use to call `conference_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
+ * @param string $conferenceStatusCallbackEvent The conference status events that we will send to `conference_status_callback`. Can be: `start`, `end`, `join`, `leave`, `mute`, `hold`, `speaker`.
+ * @param string $conferenceRecord Whether to record the conference the participant is joining or when to record the conference. Can be: `true`, `false`, `record-from-start`, and `do-not-record`. The default value is `false`.
+ * @param string $conferenceTrim Whether to trim leading and trailing silence from your recorded conference audio files. Can be: `trim-silence` or `do-not-trim` and defaults to `trim-silence`.
+ * @param string $recordingChannels The recording channels for the final recording. Can be: `mono` or `dual` and the default is `mono`.
+ * @param string $recordingStatusCallback The URL that we should call using the `recording_status_callback_method` when the recording status changes.
+ * @param string $recordingStatusCallbackMethod The HTTP method we should use when we call `recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
+ * @param string $conferenceRecordingStatusCallback The URL we should call using the `conference_recording_status_callback_method` when the conference recording is available.
+ * @param string $conferenceRecordingStatusCallbackMethod The HTTP method we should use to call `conference_recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
+ * @param string $region The [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls) where we should mix the recorded audio. Can be:`us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, or `jp1`.
+ * @param string $sipAuthUsername The SIP username used for authentication.
+ * @param string $sipAuthPassword The SIP password for authentication.
+ * @param string[] $dequeueStatusCallbackEvent The call progress events sent via webhooks as a result of a Dequeue instruction.
+ * @param string $postWorkActivitySid The new worker activity SID after executing a Conference instruction.
+ * @param bool $endConferenceOnCustomerExit Whether to end the conference when the customer leaves.
+ * @param bool $beepOnCustomerEntrance Whether to play a notification beep when the customer joins.
+ * @param string $jitterBufferSize The jitter buffer size for conference. Can be: `small`, `medium`, `large`, `off`.
+ * @param string $ifMatch The If-Match HTTP request header
+ */
+ public function __construct(
+
+ string $reservationStatus = Values::NONE,
+ string $workerActivitySid = Values::NONE,
+ string $instruction = Values::NONE,
+ string $dequeuePostWorkActivitySid = Values::NONE,
+ string $dequeueFrom = Values::NONE,
+ string $dequeueRecord = Values::NONE,
+ int $dequeueTimeout = Values::INT_NONE,
+ string $dequeueTo = Values::NONE,
+ string $dequeueStatusCallbackUrl = Values::NONE,
+ string $callFrom = Values::NONE,
+ string $callRecord = Values::NONE,
+ int $callTimeout = Values::INT_NONE,
+ string $callTo = Values::NONE,
+ string $callUrl = Values::NONE,
+ string $callStatusCallbackUrl = Values::NONE,
+ bool $callAccept = Values::BOOL_NONE,
+ string $redirectCallSid = Values::NONE,
+ bool $redirectAccept = Values::BOOL_NONE,
+ string $redirectUrl = Values::NONE,
+ string $to = Values::NONE,
+ string $from = Values::NONE,
+ string $statusCallback = Values::NONE,
+ string $statusCallbackMethod = Values::NONE,
+ array $statusCallbackEvent = Values::ARRAY_NONE,
+ int $timeout = Values::INT_NONE,
+ bool $record = Values::BOOL_NONE,
+ bool $muted = Values::BOOL_NONE,
+ string $beep = Values::NONE,
+ bool $startConferenceOnEnter = Values::BOOL_NONE,
+ bool $endConferenceOnExit = Values::BOOL_NONE,
+ string $waitUrl = Values::NONE,
+ string $waitMethod = Values::NONE,
+ bool $earlyMedia = Values::BOOL_NONE,
+ int $maxParticipants = Values::INT_NONE,
+ string $conferenceStatusCallback = Values::NONE,
+ string $conferenceStatusCallbackMethod = Values::NONE,
+ array $conferenceStatusCallbackEvent = Values::ARRAY_NONE,
+ string $conferenceRecord = Values::NONE,
+ string $conferenceTrim = Values::NONE,
+ string $recordingChannels = Values::NONE,
+ string $recordingStatusCallback = Values::NONE,
+ string $recordingStatusCallbackMethod = Values::NONE,
+ string $conferenceRecordingStatusCallback = Values::NONE,
+ string $conferenceRecordingStatusCallbackMethod = Values::NONE,
+ string $region = Values::NONE,
+ string $sipAuthUsername = Values::NONE,
+ string $sipAuthPassword = Values::NONE,
+ array $dequeueStatusCallbackEvent = Values::ARRAY_NONE,
+ string $postWorkActivitySid = Values::NONE,
+ bool $endConferenceOnCustomerExit = Values::BOOL_NONE,
+ bool $beepOnCustomerEntrance = Values::BOOL_NONE,
+ string $jitterBufferSize = Values::NONE,
+ string $ifMatch = Values::NONE
+
+ ) {
$this->options['reservationStatus'] = $reservationStatus;
$this->options['workerActivitySid'] = $workerActivitySid;
$this->options['instruction'] = $instruction;
@@ -333,15 +412,15 @@ public function __construct($reservationStatus = Values::NONE, $workerActivitySi
$this->options['postWorkActivitySid'] = $postWorkActivitySid;
$this->options['endConferenceOnCustomerExit'] = $endConferenceOnCustomerExit;
$this->options['beepOnCustomerEntrance'] = $beepOnCustomerEntrance;
+ $this->options['jitterBufferSize'] = $jitterBufferSize;
+ $this->options['ifMatch'] = $ifMatch;
}
/**
- * The new status of the reservation. Can be: `pending`, `accepted`, `rejected`, `timeout`, `canceled`, or `rescinded`.
- *
- * @param string $reservationStatus The new status of the reservation
+ * @param string $reservationStatus
* @return $this Fluent Builder
*/
- public function setReservationStatus($reservationStatus)
+ public function setReservationStatus(string $reservationStatus): self
{
$this->options['reservationStatus'] = $reservationStatus;
return $this;
@@ -350,11 +429,10 @@ public function setReservationStatus($reservationStatus)
/**
* The new worker activity SID if rejecting a reservation.
*
- * @param string $workerActivitySid The new worker activity SID if rejecting a
- * reservation
+ * @param string $workerActivitySid The new worker activity SID if rejecting a reservation.
* @return $this Fluent Builder
*/
- public function setWorkerActivitySid($workerActivitySid)
+ public function setWorkerActivitySid(string $workerActivitySid): self
{
$this->options['workerActivitySid'] = $workerActivitySid;
return $this;
@@ -363,10 +441,10 @@ public function setWorkerActivitySid($workerActivitySid)
/**
* The assignment instruction for the reservation.
*
- * @param string $instruction The assignment instruction for the reservation
+ * @param string $instruction The assignment instruction for the reservation.
* @return $this Fluent Builder
*/
- public function setInstruction($instruction)
+ public function setInstruction(string $instruction): self
{
$this->options['instruction'] = $instruction;
return $this;
@@ -375,12 +453,10 @@ public function setInstruction($instruction)
/**
* The SID of the Activity resource to start after executing a Dequeue instruction.
*
- * @param string $dequeuePostWorkActivitySid The SID of the Activity resource
- * to start after executing a Dequeue
- * instruction
+ * @param string $dequeuePostWorkActivitySid The SID of the Activity resource to start after executing a Dequeue instruction.
* @return $this Fluent Builder
*/
- public function setDequeuePostWorkActivitySid($dequeuePostWorkActivitySid)
+ public function setDequeuePostWorkActivitySid(string $dequeuePostWorkActivitySid): self
{
$this->options['dequeuePostWorkActivitySid'] = $dequeuePostWorkActivitySid;
return $this;
@@ -389,11 +465,10 @@ public function setDequeuePostWorkActivitySid($dequeuePostWorkActivitySid)
/**
* The caller ID of the call to the worker when executing a Dequeue instruction.
*
- * @param string $dequeueFrom The caller ID of the call to the worker when
- * executing a Dequeue instruction
+ * @param string $dequeueFrom The caller ID of the call to the worker when executing a Dequeue instruction.
* @return $this Fluent Builder
*/
- public function setDequeueFrom($dequeueFrom)
+ public function setDequeueFrom(string $dequeueFrom): self
{
$this->options['dequeueFrom'] = $dequeueFrom;
return $this;
@@ -402,11 +477,10 @@ public function setDequeueFrom($dequeueFrom)
/**
* Whether to record both legs of a call when executing a Dequeue instruction or which leg to record.
*
- * @param string $dequeueRecord Whether to record both legs of a call when
- * executing a Dequeue instruction
+ * @param string $dequeueRecord Whether to record both legs of a call when executing a Dequeue instruction or which leg to record.
* @return $this Fluent Builder
*/
- public function setDequeueRecord($dequeueRecord)
+ public function setDequeueRecord(string $dequeueRecord): self
{
$this->options['dequeueRecord'] = $dequeueRecord;
return $this;
@@ -415,11 +489,10 @@ public function setDequeueRecord($dequeueRecord)
/**
* The timeout for call when executing a Dequeue instruction.
*
- * @param int $dequeueTimeout The timeout for call when executing a Dequeue
- * instruction
+ * @param int $dequeueTimeout The timeout for call when executing a Dequeue instruction.
* @return $this Fluent Builder
*/
- public function setDequeueTimeout($dequeueTimeout)
+ public function setDequeueTimeout(int $dequeueTimeout): self
{
$this->options['dequeueTimeout'] = $dequeueTimeout;
return $this;
@@ -428,11 +501,10 @@ public function setDequeueTimeout($dequeueTimeout)
/**
* The contact URI of the worker when executing a Dequeue instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination.
*
- * @param string $dequeueTo The contact URI of the worker when executing a
- * Dequeue instruction
+ * @param string $dequeueTo The contact URI of the worker when executing a Dequeue instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination.
* @return $this Fluent Builder
*/
- public function setDequeueTo($dequeueTo)
+ public function setDequeueTo(string $dequeueTo): self
{
$this->options['dequeueTo'] = $dequeueTo;
return $this;
@@ -441,12 +513,10 @@ public function setDequeueTo($dequeueTo)
/**
* The callback URL for completed call event when executing a Dequeue instruction.
*
- * @param string $dequeueStatusCallbackUrl The callback URL for completed call
- * event when executing a Dequeue
- * instruction
+ * @param string $dequeueStatusCallbackUrl The callback URL for completed call event when executing a Dequeue instruction.
* @return $this Fluent Builder
*/
- public function setDequeueStatusCallbackUrl($dequeueStatusCallbackUrl)
+ public function setDequeueStatusCallbackUrl(string $dequeueStatusCallbackUrl): self
{
$this->options['dequeueStatusCallbackUrl'] = $dequeueStatusCallbackUrl;
return $this;
@@ -455,11 +525,10 @@ public function setDequeueStatusCallbackUrl($dequeueStatusCallbackUrl)
/**
* The Caller ID of the outbound call when executing a Call instruction.
*
- * @param string $callFrom The Caller ID of the outbound call when executing a
- * Call instruction
+ * @param string $callFrom The Caller ID of the outbound call when executing a Call instruction.
* @return $this Fluent Builder
*/
- public function setCallFrom($callFrom)
+ public function setCallFrom(string $callFrom): self
{
$this->options['callFrom'] = $callFrom;
return $this;
@@ -468,11 +537,10 @@ public function setCallFrom($callFrom)
/**
* Whether to record both legs of a call when executing a Call instruction.
*
- * @param string $callRecord Whether to record both legs of a call when
- * executing a Call instruction
+ * @param string $callRecord Whether to record both legs of a call when executing a Call instruction.
* @return $this Fluent Builder
*/
- public function setCallRecord($callRecord)
+ public function setCallRecord(string $callRecord): self
{
$this->options['callRecord'] = $callRecord;
return $this;
@@ -481,11 +549,10 @@ public function setCallRecord($callRecord)
/**
* The timeout for a call when executing a Call instruction.
*
- * @param int $callTimeout The timeout for a call when executing a Call
- * instruction
+ * @param int $callTimeout The timeout for a call when executing a Call instruction.
* @return $this Fluent Builder
*/
- public function setCallTimeout($callTimeout)
+ public function setCallTimeout(int $callTimeout): self
{
$this->options['callTimeout'] = $callTimeout;
return $this;
@@ -494,11 +561,10 @@ public function setCallTimeout($callTimeout)
/**
* The contact URI of the worker when executing a Call instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination.
*
- * @param string $callTo The contact URI of the worker when executing a Call
- * instruction
+ * @param string $callTo The contact URI of the worker when executing a Call instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination.
* @return $this Fluent Builder
*/
- public function setCallTo($callTo)
+ public function setCallTo(string $callTo): self
{
$this->options['callTo'] = $callTo;
return $this;
@@ -507,11 +573,10 @@ public function setCallTo($callTo)
/**
* TwiML URI executed on answering the worker's leg as a result of the Call instruction.
*
- * @param string $callUrl TwiML URI executed on answering the worker's leg as a
- * result of the Call instruction
+ * @param string $callUrl TwiML URI executed on answering the worker's leg as a result of the Call instruction.
* @return $this Fluent Builder
*/
- public function setCallUrl($callUrl)
+ public function setCallUrl(string $callUrl): self
{
$this->options['callUrl'] = $callUrl;
return $this;
@@ -520,11 +585,10 @@ public function setCallUrl($callUrl)
/**
* The URL to call for the completed call event when executing a Call instruction.
*
- * @param string $callStatusCallbackUrl The URL to call for the completed call
- * event when executing a Call instruction
+ * @param string $callStatusCallbackUrl The URL to call for the completed call event when executing a Call instruction.
* @return $this Fluent Builder
*/
- public function setCallStatusCallbackUrl($callStatusCallbackUrl)
+ public function setCallStatusCallbackUrl(string $callStatusCallbackUrl): self
{
$this->options['callStatusCallbackUrl'] = $callStatusCallbackUrl;
return $this;
@@ -533,11 +597,10 @@ public function setCallStatusCallbackUrl($callStatusCallbackUrl)
/**
* Whether to accept a reservation when executing a Call instruction.
*
- * @param bool $callAccept Whether to accept a reservation when executing a
- * Call instruction
+ * @param bool $callAccept Whether to accept a reservation when executing a Call instruction.
* @return $this Fluent Builder
*/
- public function setCallAccept($callAccept)
+ public function setCallAccept(bool $callAccept): self
{
$this->options['callAccept'] = $callAccept;
return $this;
@@ -546,11 +609,10 @@ public function setCallAccept($callAccept)
/**
* The Call SID of the call parked in the queue when executing a Redirect instruction.
*
- * @param string $redirectCallSid The Call SID of the call parked in the queue
- * when executing a Redirect instruction
+ * @param string $redirectCallSid The Call SID of the call parked in the queue when executing a Redirect instruction.
* @return $this Fluent Builder
*/
- public function setRedirectCallSid($redirectCallSid)
+ public function setRedirectCallSid(string $redirectCallSid): self
{
$this->options['redirectCallSid'] = $redirectCallSid;
return $this;
@@ -559,11 +621,10 @@ public function setRedirectCallSid($redirectCallSid)
/**
* Whether the reservation should be accepted when executing a Redirect instruction.
*
- * @param bool $redirectAccept Whether the reservation should be accepted when
- * executing a Redirect instruction
+ * @param bool $redirectAccept Whether the reservation should be accepted when executing a Redirect instruction.
* @return $this Fluent Builder
*/
- public function setRedirectAccept($redirectAccept)
+ public function setRedirectAccept(bool $redirectAccept): self
{
$this->options['redirectAccept'] = $redirectAccept;
return $this;
@@ -572,11 +633,10 @@ public function setRedirectAccept($redirectAccept)
/**
* TwiML URI to redirect the call to when executing the Redirect instruction.
*
- * @param string $redirectUrl TwiML URI to redirect the call to when executing
- * the Redirect instruction
+ * @param string $redirectUrl TwiML URI to redirect the call to when executing the Redirect instruction.
* @return $this Fluent Builder
*/
- public function setRedirectUrl($redirectUrl)
+ public function setRedirectUrl(string $redirectUrl): self
{
$this->options['redirectUrl'] = $redirectUrl;
return $this;
@@ -585,11 +645,10 @@ public function setRedirectUrl($redirectUrl)
/**
* The Contact URI of the worker when executing a Conference instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination.
*
- * @param string $to The Contact URI of the worker when executing a Conference
- * instruction
+ * @param string $to The Contact URI of the worker when executing a Conference instruction. Can be the URI of the Twilio Client, the SIP URI for Programmable SIP, or the [E.164](https://www.twilio.com/docs/glossary/what-e164) formatted phone number, depending on the destination.
* @return $this Fluent Builder
*/
- public function setTo($to)
+ public function setTo(string $to): self
{
$this->options['to'] = $to;
return $this;
@@ -598,11 +657,10 @@ public function setTo($to)
/**
* The caller ID of the call to the worker when executing a Conference instruction.
*
- * @param string $from The caller ID of the call to the worker when executing a
- * Conference instruction
+ * @param string $from The caller ID of the call to the worker when executing a Conference instruction.
* @return $this Fluent Builder
*/
- public function setFrom($from)
+ public function setFrom(string $from): self
{
$this->options['from'] = $from;
return $this;
@@ -611,11 +669,10 @@ public function setFrom($from)
/**
* The URL we should call using the `status_callback_method` to send status information to your application.
*
- * @param string $statusCallback The URL we should call to send status
- * information to your application
+ * @param string $statusCallback The URL we should call using the `status_callback_method` to send status information to your application.
* @return $this Fluent Builder
*/
- public function setStatusCallback($statusCallback)
+ public function setStatusCallback(string $statusCallback): self
{
$this->options['statusCallback'] = $statusCallback;
return $this;
@@ -624,11 +681,10 @@ public function setStatusCallback($statusCallback)
/**
* The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`.
*
- * @param string $statusCallbackMethod The HTTP method we should use to call
- * status_callback
+ * @param string $statusCallbackMethod The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`.
* @return $this Fluent Builder
*/
- public function setStatusCallbackMethod($statusCallbackMethod)
+ public function setStatusCallbackMethod(string $statusCallbackMethod): self
{
$this->options['statusCallbackMethod'] = $statusCallbackMethod;
return $this;
@@ -637,11 +693,10 @@ public function setStatusCallbackMethod($statusCallbackMethod)
/**
* The call progress events that we will send to `status_callback`. Can be: `initiated`, `ringing`, `answered`, or `completed`.
*
- * @param string $statusCallbackEvent The call progress events that we will
- * send to status_callback
+ * @param string $statusCallbackEvent The call progress events that we will send to `status_callback`. Can be: `initiated`, `ringing`, `answered`, or `completed`.
* @return $this Fluent Builder
*/
- public function setStatusCallbackEvent($statusCallbackEvent)
+ public function setStatusCallbackEvent(array $statusCallbackEvent): self
{
$this->options['statusCallbackEvent'] = $statusCallbackEvent;
return $this;
@@ -650,11 +705,10 @@ public function setStatusCallbackEvent($statusCallbackEvent)
/**
* The timeout for a call when executing a Conference instruction.
*
- * @param int $timeout The timeout for a call when executing a Conference
- * instruction
+ * @param int $timeout The timeout for a call when executing a Conference instruction.
* @return $this Fluent Builder
*/
- public function setTimeout($timeout)
+ public function setTimeout(int $timeout): self
{
$this->options['timeout'] = $timeout;
return $this;
@@ -663,10 +717,10 @@ public function setTimeout($timeout)
/**
* Whether to record the participant and their conferences, including the time between conferences. Can be `true` or `false` and the default is `false`.
*
- * @param bool $record Whether to record the participant and their conferences
+ * @param bool $record Whether to record the participant and their conferences, including the time between conferences. Can be `true` or `false` and the default is `false`.
* @return $this Fluent Builder
*/
- public function setRecord($record)
+ public function setRecord(bool $record): self
{
$this->options['record'] = $record;
return $this;
@@ -675,10 +729,10 @@ public function setRecord($record)
/**
* Whether the agent is muted in the conference. Defaults to `false`.
*
- * @param bool $muted Whether to mute the agent
+ * @param bool $muted Whether the agent is muted in the conference. Defaults to `false`.
* @return $this Fluent Builder
*/
- public function setMuted($muted)
+ public function setMuted(bool $muted): self
{
$this->options['muted'] = $muted;
return $this;
@@ -687,11 +741,10 @@ public function setMuted($muted)
/**
* Whether to play a notification beep when the participant joins or when to play a beep. Can be: `true`, `false`, `onEnter`, or `onExit`. The default value is `true`.
*
- * @param string $beep Whether to play a notification beep when the participant
- * joins
+ * @param string $beep Whether to play a notification beep when the participant joins or when to play a beep. Can be: `true`, `false`, `onEnter`, or `onExit`. The default value is `true`.
* @return $this Fluent Builder
*/
- public function setBeep($beep)
+ public function setBeep(string $beep): self
{
$this->options['beep'] = $beep;
return $this;
@@ -700,11 +753,10 @@ public function setBeep($beep)
/**
* Whether to start the conference when the participant joins, if it has not already started. Can be: `true` or `false` and the default is `true`. If `false` and the conference has not started, the participant is muted and hears background music until another participant starts the conference.
*
- * @param bool $startConferenceOnEnter Whether the conference starts when the
- * participant joins the conference
+ * @param bool $startConferenceOnEnter Whether to start the conference when the participant joins, if it has not already started. Can be: `true` or `false` and the default is `true`. If `false` and the conference has not started, the participant is muted and hears background music until another participant starts the conference.
* @return $this Fluent Builder
*/
- public function setStartConferenceOnEnter($startConferenceOnEnter)
+ public function setStartConferenceOnEnter(bool $startConferenceOnEnter): self
{
$this->options['startConferenceOnEnter'] = $startConferenceOnEnter;
return $this;
@@ -713,11 +765,10 @@ public function setStartConferenceOnEnter($startConferenceOnEnter)
/**
* Whether to end the conference when the agent leaves.
*
- * @param bool $endConferenceOnExit Whether to end the conference when the
- * agent leaves
+ * @param bool $endConferenceOnExit Whether to end the conference when the agent leaves.
* @return $this Fluent Builder
*/
- public function setEndConferenceOnExit($endConferenceOnExit)
+ public function setEndConferenceOnExit(bool $endConferenceOnExit): self
{
$this->options['endConferenceOnExit'] = $endConferenceOnExit;
return $this;
@@ -726,10 +777,10 @@ public function setEndConferenceOnExit($endConferenceOnExit)
/**
* The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic).
*
- * @param string $waitUrl URL that hosts pre-conference hold music
+ * @param string $waitUrl The URL we should call using the `wait_method` for the music to play while participants are waiting for the conference to start. The default value is the URL of our standard hold music. [Learn more about hold music](https://www.twilio.com/labs/twimlets/holdmusic).
* @return $this Fluent Builder
*/
- public function setWaitUrl($waitUrl)
+ public function setWaitUrl(string $waitUrl): self
{
$this->options['waitUrl'] = $waitUrl;
return $this;
@@ -738,10 +789,10 @@ public function setWaitUrl($waitUrl)
/**
* The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file.
*
- * @param string $waitMethod The HTTP method we should use to call `wait_url`
+ * @param string $waitMethod The HTTP method we should use to call `wait_url`. Can be `GET` or `POST` and the default is `POST`. When using a static audio file, this should be `GET` so that we can cache the file.
* @return $this Fluent Builder
*/
- public function setWaitMethod($waitMethod)
+ public function setWaitMethod(string $waitMethod): self
{
$this->options['waitMethod'] = $waitMethod;
return $this;
@@ -750,11 +801,10 @@ public function setWaitMethod($waitMethod)
/**
* Whether to allow an agent to hear the state of the outbound call, including ringing or disconnect messages. The default is `true`.
*
- * @param bool $earlyMedia Whether agents can hear the state of the outbound
- * call
+ * @param bool $earlyMedia Whether to allow an agent to hear the state of the outbound call, including ringing or disconnect messages. The default is `true`.
* @return $this Fluent Builder
*/
- public function setEarlyMedia($earlyMedia)
+ public function setEarlyMedia(bool $earlyMedia): self
{
$this->options['earlyMedia'] = $earlyMedia;
return $this;
@@ -763,11 +813,10 @@ public function setEarlyMedia($earlyMedia)
/**
* The maximum number of participants allowed in the conference. Can be a positive integer from `2` to `250`. The default value is `250`.
*
- * @param int $maxParticipants The maximum number of agent conference
- * participants
+ * @param int $maxParticipants The maximum number of participants allowed in the conference. Can be a positive integer from `2` to `250`. The default value is `250`.
* @return $this Fluent Builder
*/
- public function setMaxParticipants($maxParticipants)
+ public function setMaxParticipants(int $maxParticipants): self
{
$this->options['maxParticipants'] = $maxParticipants;
return $this;
@@ -776,11 +825,10 @@ public function setMaxParticipants($maxParticipants)
/**
* The URL we should call using the `conference_status_callback_method` when the conference events in `conference_status_callback_event` occur. Only the value set by the first participant to join the conference is used. Subsequent `conference_status_callback` values are ignored.
*
- * @param string $conferenceStatusCallback The callback URL for conference
- * events
+ * @param string $conferenceStatusCallback The URL we should call using the `conference_status_callback_method` when the conference events in `conference_status_callback_event` occur. Only the value set by the first participant to join the conference is used. Subsequent `conference_status_callback` values are ignored.
* @return $this Fluent Builder
*/
- public function setConferenceStatusCallback($conferenceStatusCallback)
+ public function setConferenceStatusCallback(string $conferenceStatusCallback): self
{
$this->options['conferenceStatusCallback'] = $conferenceStatusCallback;
return $this;
@@ -789,12 +837,10 @@ public function setConferenceStatusCallback($conferenceStatusCallback)
/**
* The HTTP method we should use to call `conference_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
*
- * @param string $conferenceStatusCallbackMethod HTTP method for requesting
- * `conference_status_callback`
- * URL
+ * @param string $conferenceStatusCallbackMethod The HTTP method we should use to call `conference_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
* @return $this Fluent Builder
*/
- public function setConferenceStatusCallbackMethod($conferenceStatusCallbackMethod)
+ public function setConferenceStatusCallbackMethod(string $conferenceStatusCallbackMethod): self
{
$this->options['conferenceStatusCallbackMethod'] = $conferenceStatusCallbackMethod;
return $this;
@@ -803,12 +849,10 @@ public function setConferenceStatusCallbackMethod($conferenceStatusCallbackMetho
/**
* The conference status events that we will send to `conference_status_callback`. Can be: `start`, `end`, `join`, `leave`, `mute`, `hold`, `speaker`.
*
- * @param string $conferenceStatusCallbackEvent The conference status events
- * that we will send to
- * conference_status_callback
+ * @param string $conferenceStatusCallbackEvent The conference status events that we will send to `conference_status_callback`. Can be: `start`, `end`, `join`, `leave`, `mute`, `hold`, `speaker`.
* @return $this Fluent Builder
*/
- public function setConferenceStatusCallbackEvent($conferenceStatusCallbackEvent)
+ public function setConferenceStatusCallbackEvent(array $conferenceStatusCallbackEvent): self
{
$this->options['conferenceStatusCallbackEvent'] = $conferenceStatusCallbackEvent;
return $this;
@@ -817,11 +861,10 @@ public function setConferenceStatusCallbackEvent($conferenceStatusCallbackEvent)
/**
* Whether to record the conference the participant is joining or when to record the conference. Can be: `true`, `false`, `record-from-start`, and `do-not-record`. The default value is `false`.
*
- * @param string $conferenceRecord Whether to record the conference the
- * participant is joining
+ * @param string $conferenceRecord Whether to record the conference the participant is joining or when to record the conference. Can be: `true`, `false`, `record-from-start`, and `do-not-record`. The default value is `false`.
* @return $this Fluent Builder
*/
- public function setConferenceRecord($conferenceRecord)
+ public function setConferenceRecord(string $conferenceRecord): self
{
$this->options['conferenceRecord'] = $conferenceRecord;
return $this;
@@ -830,11 +873,10 @@ public function setConferenceRecord($conferenceRecord)
/**
* Whether to trim leading and trailing silence from your recorded conference audio files. Can be: `trim-silence` or `do-not-trim` and defaults to `trim-silence`.
*
- * @param string $conferenceTrim Whether to trim leading and trailing silence
- * from your recorded conference audio files
+ * @param string $conferenceTrim Whether to trim leading and trailing silence from your recorded conference audio files. Can be: `trim-silence` or `do-not-trim` and defaults to `trim-silence`.
* @return $this Fluent Builder
*/
- public function setConferenceTrim($conferenceTrim)
+ public function setConferenceTrim(string $conferenceTrim): self
{
$this->options['conferenceTrim'] = $conferenceTrim;
return $this;
@@ -843,10 +885,10 @@ public function setConferenceTrim($conferenceTrim)
/**
* The recording channels for the final recording. Can be: `mono` or `dual` and the default is `mono`.
*
- * @param string $recordingChannels Specify `mono` or `dual` recording channels
+ * @param string $recordingChannels The recording channels for the final recording. Can be: `mono` or `dual` and the default is `mono`.
* @return $this Fluent Builder
*/
- public function setRecordingChannels($recordingChannels)
+ public function setRecordingChannels(string $recordingChannels): self
{
$this->options['recordingChannels'] = $recordingChannels;
return $this;
@@ -855,12 +897,10 @@ public function setRecordingChannels($recordingChannels)
/**
* The URL that we should call using the `recording_status_callback_method` when the recording status changes.
*
- * @param string $recordingStatusCallback The URL that we should call using the
- * `recording_status_callback_method`
- * when the recording status changes
+ * @param string $recordingStatusCallback The URL that we should call using the `recording_status_callback_method` when the recording status changes.
* @return $this Fluent Builder
*/
- public function setRecordingStatusCallback($recordingStatusCallback)
+ public function setRecordingStatusCallback(string $recordingStatusCallback): self
{
$this->options['recordingStatusCallback'] = $recordingStatusCallback;
return $this;
@@ -869,12 +909,10 @@ public function setRecordingStatusCallback($recordingStatusCallback)
/**
* The HTTP method we should use when we call `recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
*
- * @param string $recordingStatusCallbackMethod The HTTP method we should use
- * when we call
- * `recording_status_callback`
+ * @param string $recordingStatusCallbackMethod The HTTP method we should use when we call `recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
* @return $this Fluent Builder
*/
- public function setRecordingStatusCallbackMethod($recordingStatusCallbackMethod)
+ public function setRecordingStatusCallbackMethod(string $recordingStatusCallbackMethod): self
{
$this->options['recordingStatusCallbackMethod'] = $recordingStatusCallbackMethod;
return $this;
@@ -883,12 +921,10 @@ public function setRecordingStatusCallbackMethod($recordingStatusCallbackMethod)
/**
* The URL we should call using the `conference_recording_status_callback_method` when the conference recording is available.
*
- * @param string $conferenceRecordingStatusCallback The URL we should call
- * using the
- * `conference_recording_status_callback_method` when the conference recording is available
+ * @param string $conferenceRecordingStatusCallback The URL we should call using the `conference_recording_status_callback_method` when the conference recording is available.
* @return $this Fluent Builder
*/
- public function setConferenceRecordingStatusCallback($conferenceRecordingStatusCallback)
+ public function setConferenceRecordingStatusCallback(string $conferenceRecordingStatusCallback): self
{
$this->options['conferenceRecordingStatusCallback'] = $conferenceRecordingStatusCallback;
return $this;
@@ -897,12 +933,10 @@ public function setConferenceRecordingStatusCallback($conferenceRecordingStatusC
/**
* The HTTP method we should use to call `conference_recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
*
- * @param string $conferenceRecordingStatusCallbackMethod The HTTP method we
- * should use to call
- * `conference_recording_status_callback`
+ * @param string $conferenceRecordingStatusCallbackMethod The HTTP method we should use to call `conference_recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
* @return $this Fluent Builder
*/
- public function setConferenceRecordingStatusCallbackMethod($conferenceRecordingStatusCallbackMethod)
+ public function setConferenceRecordingStatusCallbackMethod(string $conferenceRecordingStatusCallbackMethod): self
{
$this->options['conferenceRecordingStatusCallbackMethod'] = $conferenceRecordingStatusCallbackMethod;
return $this;
@@ -911,10 +945,10 @@ public function setConferenceRecordingStatusCallbackMethod($conferenceRecordingS
/**
* The [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls) where we should mix the recorded audio. Can be:`us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, or `jp1`.
*
- * @param string $region The region where we should mix the conference audio
+ * @param string $region The [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls) where we should mix the recorded audio. Can be:`us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, or `jp1`.
* @return $this Fluent Builder
*/
- public function setRegion($region)
+ public function setRegion(string $region): self
{
$this->options['region'] = $region;
return $this;
@@ -923,10 +957,10 @@ public function setRegion($region)
/**
* The SIP username used for authentication.
*
- * @param string $sipAuthUsername The SIP username used for authentication
+ * @param string $sipAuthUsername The SIP username used for authentication.
* @return $this Fluent Builder
*/
- public function setSipAuthUsername($sipAuthUsername)
+ public function setSipAuthUsername(string $sipAuthUsername): self
{
$this->options['sipAuthUsername'] = $sipAuthUsername;
return $this;
@@ -935,10 +969,10 @@ public function setSipAuthUsername($sipAuthUsername)
/**
* The SIP password for authentication.
*
- * @param string $sipAuthPassword The SIP password for authentication
+ * @param string $sipAuthPassword The SIP password for authentication.
* @return $this Fluent Builder
*/
- public function setSipAuthPassword($sipAuthPassword)
+ public function setSipAuthPassword(string $sipAuthPassword): self
{
$this->options['sipAuthPassword'] = $sipAuthPassword;
return $this;
@@ -947,12 +981,10 @@ public function setSipAuthPassword($sipAuthPassword)
/**
* The call progress events sent via webhooks as a result of a Dequeue instruction.
*
- * @param string $dequeueStatusCallbackEvent The call progress events sent via
- * webhooks as a result of a Dequeue
- * instruction
+ * @param string[] $dequeueStatusCallbackEvent The call progress events sent via webhooks as a result of a Dequeue instruction.
* @return $this Fluent Builder
*/
- public function setDequeueStatusCallbackEvent($dequeueStatusCallbackEvent)
+ public function setDequeueStatusCallbackEvent(array $dequeueStatusCallbackEvent): self
{
$this->options['dequeueStatusCallbackEvent'] = $dequeueStatusCallbackEvent;
return $this;
@@ -961,11 +993,10 @@ public function setDequeueStatusCallbackEvent($dequeueStatusCallbackEvent)
/**
* The new worker activity SID after executing a Conference instruction.
*
- * @param string $postWorkActivitySid The new worker activity SID after
- * executing a Conference instruction
+ * @param string $postWorkActivitySid The new worker activity SID after executing a Conference instruction.
* @return $this Fluent Builder
*/
- public function setPostWorkActivitySid($postWorkActivitySid)
+ public function setPostWorkActivitySid(string $postWorkActivitySid): self
{
$this->options['postWorkActivitySid'] = $postWorkActivitySid;
return $this;
@@ -974,11 +1005,10 @@ public function setPostWorkActivitySid($postWorkActivitySid)
/**
* Whether to end the conference when the customer leaves.
*
- * @param bool $endConferenceOnCustomerExit Whether to end the conference when
- * the customer leaves
+ * @param bool $endConferenceOnCustomerExit Whether to end the conference when the customer leaves.
* @return $this Fluent Builder
*/
- public function setEndConferenceOnCustomerExit($endConferenceOnCustomerExit)
+ public function setEndConferenceOnCustomerExit(bool $endConferenceOnCustomerExit): self
{
$this->options['endConferenceOnCustomerExit'] = $endConferenceOnCustomerExit;
return $this;
@@ -987,29 +1017,48 @@ public function setEndConferenceOnCustomerExit($endConferenceOnCustomerExit)
/**
* Whether to play a notification beep when the customer joins.
*
- * @param bool $beepOnCustomerEntrance Whether to play a notification beep when
- * the customer joins
+ * @param bool $beepOnCustomerEntrance Whether to play a notification beep when the customer joins.
* @return $this Fluent Builder
*/
- public function setBeepOnCustomerEntrance($beepOnCustomerEntrance)
+ public function setBeepOnCustomerEntrance(bool $beepOnCustomerEntrance): self
{
$this->options['beepOnCustomerEntrance'] = $beepOnCustomerEntrance;
return $this;
}
+ /**
+ * The jitter buffer size for conference. Can be: `small`, `medium`, `large`, `off`.
+ *
+ * @param string $jitterBufferSize The jitter buffer size for conference. Can be: `small`, `medium`, `large`, `off`.
+ * @return $this Fluent Builder
+ */
+ public function setJitterBufferSize(string $jitterBufferSize): self
+ {
+ $this->options['jitterBufferSize'] = $jitterBufferSize;
+ return $this;
+ }
+
+ /**
+ * The If-Match HTTP request header
+ *
+ * @param string $ifMatch The If-Match HTTP request header
+ * @return $this Fluent Builder
+ */
+ public function setIfMatch(string $ifMatch): self
+ {
+ $this->options['ifMatch'] = $ifMatch;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Taskrouter.V1.UpdateReservationOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.UpdateReservationOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/ReservationPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/ReservationPage.php
index cc9f6c0..c26b09a 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/ReservationPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/ReservationPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return ReservationInstance \Twilio\Rest\Taskrouter\V1\Workspace\Worker\ReservationInstance
+ */
+ public function buildInstance(array $payload): ReservationInstance
{
- return new ReservationInstance(
- $this->version,
- $payload,
- $this->solution['workspaceSid'],
- $this->solution['workerSid']
- );
+ return new ReservationInstance($this->version, $payload, $this->solution['workspaceSid'], $this->solution['workerSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.ReservationPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerChannelContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerChannelContext.php
index 814bbe4..52d2818 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerChannelContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerChannelContext.php
@@ -2,58 +2,74 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace\Worker;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
class WorkerChannelContext extends InstanceContext
-{
+ {
/**
* Initialize the WorkerChannelContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace with the WorkerChannel
- * to fetch
- * @param string $workerSid The SID of the Worker with the WorkerChannel to
- * fetch
- * @param string $sid The SID of the to fetch
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkerChannelContext
+ * @param Version $version Version that contains the resource
+ * @param string $workspaceSid The SID of the Workspace with the WorkerChannel to fetch.
+ * @param string $workerSid The SID of the Worker with the WorkerChannel to fetch.
+ * @param string $sid The SID of the WorkerChannel to fetch.
*/
- public function __construct(Version $version, $workspaceSid, $workerSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $workspaceSid,
+ $workerSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid, 'workerSid' => $workerSid, 'sid' => $sid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+ 'workerSid' =>
+ $workerSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Workers/' . \rawurlencode($workerSid) . '/Channels/' . \rawurlencode($sid) . '';
+ $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid)
+ .'/Workers/' . \rawurlencode($workerSid)
+ .'/Channels/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a WorkerChannelInstance
+ * Fetch the WorkerChannelInstance
*
* @return WorkerChannelInstance Fetched WorkerChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): WorkerChannelInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new WorkerChannelInstance(
$this->version,
@@ -64,6 +80,7 @@ public function fetch()
);
}
+
/**
* Update the WorkerChannelInstance
*
@@ -71,21 +88,20 @@ public function fetch()
* @return WorkerChannelInstance Updated WorkerChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): WorkerChannelInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'Capacity' => $options['capacity'],
- 'Available' => Serialize::booleanToString($options['available']),
- ));
+ $data = Values::of([
+ 'Capacity' =>
+ $options['capacity'],
+ 'Available' =>
+ Serialize::booleanToString($options['available']),
+ ]);
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new WorkerChannelInstance(
$this->version,
@@ -96,17 +112,18 @@ public function update($options = array())
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.WorkerChannelContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerChannelInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerChannelInstance.php
index 06e4373..e267f6c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerChannelInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerChannelInstance.php
@@ -2,55 +2,61 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace\Worker;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
+ * @property string|null $accountSid
* @property int $assignedTasks
- * @property bool $available
+ * @property bool|null $available
* @property int $availableCapacityPercentage
* @property int $configuredCapacity
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $sid
- * @property string $taskChannelSid
- * @property string $taskChannelUniqueName
- * @property string $workerSid
- * @property string $workspaceSid
- * @property string $url
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $sid
+ * @property string|null $taskChannelSid
+ * @property string|null $taskChannelUniqueName
+ * @property string|null $workerSid
+ * @property string|null $workspaceSid
+ * @property string|null $url
*/
class WorkerChannelInstance extends InstanceResource
{
/**
* Initialize the WorkerChannelInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $workspaceSid The SID of the Workspace that contains the
- * WorkerChannel
- * @param string $workerSid The SID of the Worker that contains the
- * WorkerChannel
- * @param string $sid The SID of the to fetch
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkerChannelInstance
+ * @param string $workspaceSid The SID of the Workspace with the WorkerChannel to fetch.
+ * @param string $workerSid The SID of the Worker with the WorkerChannel to fetch.
+ * @param string $sid The SID of the WorkerChannel to fetch.
*/
- public function __construct(Version $version, array $payload, $workspaceSid, $workerSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $workspaceSid, string $workerSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'assignedTasks' => Values::array_get($payload, 'assigned_tasks'),
'available' => Values::array_get($payload, 'available'),
@@ -64,22 +70,18 @@ public function __construct(Version $version, array $payload, $workspaceSid, $wo
'workerSid' => Values::array_get($payload, 'worker_sid'),
'workspaceSid' => Values::array_get($payload, 'workspace_sid'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array(
- 'workspaceSid' => $workspaceSid,
- 'workerSid' => $workerSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['workspaceSid' => $workspaceSid, 'workerSid' => $workerSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkerChannelContext Context for this WorkerChannelInstance
+ * @return WorkerChannelContext Context for this WorkerChannelInstance
*/
- protected function proxy()
+ protected function proxy(): WorkerChannelContext
{
if (!$this->context) {
$this->context = new WorkerChannelContext(
@@ -94,13 +96,14 @@ protected function proxy()
}
/**
- * Fetch a WorkerChannelInstance
+ * Fetch the WorkerChannelInstance
*
* @return WorkerChannelInstance Fetched WorkerChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): WorkerChannelInstance
{
+
return $this->proxy()->fetch();
}
@@ -111,8 +114,9 @@ public function fetch()
* @return WorkerChannelInstance Updated WorkerChannelInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): WorkerChannelInstance
{
+
return $this->proxy()->update($options);
}
@@ -123,7 +127,7 @@ public function update($options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -142,12 +146,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.WorkerChannelInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerChannelList.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerChannelList.php
index 9fb07c2..1b63ebe 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerChannelList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerChannelList.php
@@ -2,37 +2,75 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Taskrouter\V1\Workspace\Worker;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class WorkerChannelList extends ListResource
-{
+ {
/**
* Construct the WorkerChannelList
*
* @param Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace that contains the
- * WorkerChannel
- * @param string $workerSid The SID of the Worker that contains the
- * WorkerChannel
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkerChannelList
+ * @param string $workspaceSid The SID of the Workspace with the WorkerChannel to fetch.
+ * @param string $workerSid The SID of the Worker with the WorkerChannel to fetch.
*/
- public function __construct(Version $version, $workspaceSid, $workerSid)
- {
+ public function __construct(
+ Version $version,
+ string $workspaceSid,
+ string $workerSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid, 'workerSid' => $workerSid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+
+ 'workerSid' =>
+ $workerSid,
+
+ ];
+
+ $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid)
+ .'/Workers/' . \rawurlencode($workerSid)
+ .'/Channels';
+ }
- $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Workers/' . \rawurlencode($workerSid) . '/Channels';
+ /**
+ * Reads WorkerChannelInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return WorkerChannelInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -51,9 +89,9 @@ public function __construct(Version $version, $workspaceSid, $workerSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -62,26 +100,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads WorkerChannelInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return WorkerChannelInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of WorkerChannelInstance records from the API.
* Request is executed immediately
@@ -89,21 +107,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of WorkerChannelInstance
+ * @return WorkerChannelPage Page of WorkerChannelInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): WorkerChannelPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new WorkerChannelPage($this->version, $response, $this->solution);
}
@@ -113,9 +132,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of WorkerChannelInstance
+ * @return WorkerChannelPage Page of WorkerChannelInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): WorkerChannelPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -125,13 +144,16 @@ public function getPage($targetUrl)
return new WorkerChannelPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a WorkerChannelContext
*
- * @param string $sid The SID of the to fetch
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkerChannelContext
+ * @param string $sid The SID of the WorkerChannel to fetch.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): WorkerChannelContext
{
return new WorkerChannelContext(
$this->version,
@@ -146,8 +168,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.WorkerChannelList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerChannelOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerChannelOptions.php
index ff1c5ac..3da4f30 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerChannelOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerChannelOptions.php
@@ -1,10 +1,16 @@
options['capacity'] = $capacity;
$this->options['available'] = $available;
}
@@ -42,11 +63,10 @@ public function __construct($capacity = Values::NONE, $available = Values::NONE)
/**
* The total number of Tasks that the Worker should handle for the TaskChannel type. TaskRouter creates reservations for Tasks of this TaskChannel type up to the specified capacity. If the capacity is 0, no new reservations will be created.
*
- * @param int $capacity The total number of Tasks that the Worker should handle
- * for the TaskChannel type
+ * @param int $capacity The total number of Tasks that the Worker should handle for the TaskChannel type. TaskRouter creates reservations for Tasks of this TaskChannel type up to the specified capacity. If the capacity is 0, no new reservations will be created.
* @return $this Fluent Builder
*/
- public function setCapacity($capacity)
+ public function setCapacity(int $capacity): self
{
$this->options['capacity'] = $capacity;
return $this;
@@ -55,10 +75,10 @@ public function setCapacity($capacity)
/**
* Whether the WorkerChannel is available. Set to `false` to prevent the Worker from receiving any new Tasks of this TaskChannel type.
*
- * @param bool $available Whether the WorkerChannel is available
+ * @param bool $available Whether the WorkerChannel is available. Set to `false` to prevent the Worker from receiving any new Tasks of this TaskChannel type.
* @return $this Fluent Builder
*/
- public function setAvailable($available)
+ public function setAvailable(bool $available): self
{
$this->options['available'] = $available;
return $this;
@@ -69,14 +89,10 @@ public function setAvailable($available)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Taskrouter.V1.UpdateWorkerChannelOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.UpdateWorkerChannelOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerChannelPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerChannelPage.php
index f39ad39..7ac390f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerChannelPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerChannelPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return WorkerChannelInstance \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkerChannelInstance
+ */
+ public function buildInstance(array $payload): WorkerChannelInstance
{
- return new WorkerChannelInstance(
- $this->version,
- $payload,
- $this->solution['workspaceSid'],
- $this->solution['workerSid']
- );
+ return new WorkerChannelInstance($this->version, $payload, $this->solution['workspaceSid'], $this->solution['workerSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.WorkerChannelPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerStatisticsContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerStatisticsContext.php
index 6354c4b..5e22ec3 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerStatisticsContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerStatisticsContext.php
@@ -2,65 +2,83 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace\Worker;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
class WorkerStatisticsContext extends InstanceContext
-{
+ {
/**
* Initialize the WorkerStatisticsContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace with the WorkerChannel
- * to fetch
- * @param string $workerSid The SID of the Worker with the WorkerChannel to
- * fetch
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkerStatisticsContext
+ * @param Version $version Version that contains the resource
+ * @param string $workspaceSid The SID of the Workspace with the WorkerChannel to fetch.
+ * @param string $workerSid The SID of the Worker with the WorkerChannel to fetch.
*/
- public function __construct(Version $version, $workspaceSid, $workerSid)
- {
+ public function __construct(
+ Version $version,
+ $workspaceSid,
+ $workerSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid, 'workerSid' => $workerSid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+ 'workerSid' =>
+ $workerSid,
+ ];
- $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Workers/' . \rawurlencode($workerSid) . '/Statistics';
+ $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid)
+ .'/Workers/' . \rawurlencode($workerSid)
+ .'/Statistics';
}
/**
- * Fetch a WorkerStatisticsInstance
+ * Fetch the WorkerStatisticsInstance
*
* @param array|Options $options Optional Arguments
* @return WorkerStatisticsInstance Fetched WorkerStatisticsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch($options = array())
+ public function fetch(array $options = []): WorkerStatisticsInstance
{
+
$options = new Values($options);
- $params = Values::of(array(
- 'Minutes' => $options['minutes'],
- 'StartDate' => Serialize::iso8601DateTime($options['startDate']),
- 'EndDate' => Serialize::iso8601DateTime($options['endDate']),
- 'TaskChannel' => $options['taskChannel'],
- ));
+ $params = Values::of([
+ 'Minutes' =>
+ $options['minutes'],
+ 'StartDate' =>
+ Serialize::iso8601DateTime($options['startDate']),
+ 'EndDate' =>
+ Serialize::iso8601DateTime($options['endDate']),
+ 'TaskChannel' =>
+ $options['taskChannel'],
+ ]);
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, $params, [], $headers);
return new WorkerStatisticsInstance(
$this->version,
@@ -70,17 +88,18 @@ public function fetch($options = array())
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.WorkerStatisticsContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerStatisticsInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerStatisticsInstance.php
index 48b417c..12bb811 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerStatisticsInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerStatisticsInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace\Worker;
use Twilio\Exceptions\TwilioException;
@@ -15,49 +23,47 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * @property string $accountSid
- * @property array $cumulative
- * @property string $workerSid
- * @property string $workspaceSid
- * @property string $url
+ * @property string|null $accountSid
+ * @property array|null $cumulative
+ * @property string|null $workerSid
+ * @property string|null $workspaceSid
+ * @property string|null $url
*/
class WorkerStatisticsInstance extends InstanceResource
{
/**
* Initialize the WorkerStatisticsInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $workspaceSid The SID of the Workspace that contains the
- * WorkerChannel
- * @param string $workerSid The SID of the Worker that contains the
- * WorkerChannel
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkerStatisticsInstance
+ * @param string $workspaceSid The SID of the Workspace with the WorkerChannel to fetch.
+ * @param string $workerSid The SID of the Worker with the WorkerChannel to fetch.
*/
- public function __construct(Version $version, array $payload, $workspaceSid, $workerSid)
+ public function __construct(Version $version, array $payload, string $workspaceSid, string $workerSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'cumulative' => Values::array_get($payload, 'cumulative'),
'workerSid' => Values::array_get($payload, 'worker_sid'),
'workspaceSid' => Values::array_get($payload, 'workspace_sid'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('workspaceSid' => $workspaceSid, 'workerSid' => $workerSid,);
+ $this->solution = ['workspaceSid' => $workspaceSid, 'workerSid' => $workerSid, ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkerStatisticsContext Context for this WorkerStatisticsInstance
+ * @return WorkerStatisticsContext Context for this WorkerStatisticsInstance
*/
- protected function proxy()
+ protected function proxy(): WorkerStatisticsContext
{
if (!$this->context) {
$this->context = new WorkerStatisticsContext(
@@ -71,14 +77,15 @@ protected function proxy()
}
/**
- * Fetch a WorkerStatisticsInstance
+ * Fetch the WorkerStatisticsInstance
*
* @param array|Options $options Optional Arguments
* @return WorkerStatisticsInstance Fetched WorkerStatisticsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch($options = array())
+ public function fetch(array $options = []): WorkerStatisticsInstance
{
+
return $this->proxy()->fetch($options);
}
@@ -89,7 +96,7 @@ public function fetch($options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -108,12 +115,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.WorkerStatisticsInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerStatisticsList.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerStatisticsList.php
index 61b6f33..42be214 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerStatisticsList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerStatisticsList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Taskrouter\V1\Workspace\Worker;
@@ -12,32 +19,40 @@
use Twilio\ListResource;
use Twilio\Version;
+
class WorkerStatisticsList extends ListResource
-{
+ {
/**
* Construct the WorkerStatisticsList
*
* @param Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace that contains the
- * WorkerChannel
- * @param string $workerSid The SID of the Worker that contains the
- * WorkerChannel
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkerStatisticsList
+ * @param string $workspaceSid The SID of the Workspace with the WorkerChannel to fetch.
+ * @param string $workerSid The SID of the Worker with the WorkerChannel to fetch.
*/
- public function __construct(Version $version, $workspaceSid, $workerSid)
- {
+ public function __construct(
+ Version $version,
+ string $workspaceSid,
+ string $workerSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid, 'workerSid' => $workerSid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+
+ 'workerSid' =>
+ $workerSid,
+
+ ];
}
/**
* Constructs a WorkerStatisticsContext
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkerStatisticsContext
*/
- public function getContext()
+ public function getContext(
+
+ ): WorkerStatisticsContext
{
return new WorkerStatisticsContext(
$this->version,
@@ -51,8 +66,8 @@ public function getContext()
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.WorkerStatisticsList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerStatisticsOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerStatisticsOptions.php
index 97accd7..68454e0 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerStatisticsOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerStatisticsOptions.php
@@ -1,10 +1,16 @@
options['minutes'] = $minutes;
$this->options['startDate'] = $startDate;
$this->options['endDate'] = $endDate;
@@ -52,11 +71,10 @@ public function __construct($minutes = Values::NONE, $startDate = Values::NONE,
/**
* Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends.
*
- * @param int $minutes Only calculate statistics since this many minutes in the
- * past
+ * @param int $minutes Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends.
* @return $this Fluent Builder
*/
- public function setMinutes($minutes)
+ public function setMinutes(int $minutes): self
{
$this->options['minutes'] = $minutes;
return $this;
@@ -65,11 +83,10 @@ public function setMinutes($minutes)
/**
* Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
*
- * @param \DateTime $startDate Only calculate statistics from on or after this
- * date
+ * @param \DateTime $startDate Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
* @return $this Fluent Builder
*/
- public function setStartDate($startDate)
+ public function setStartDate(\DateTime $startDate): self
{
$this->options['startDate'] = $startDate;
return $this;
@@ -78,11 +95,10 @@ public function setStartDate($startDate)
/**
* Only include usage that occurred on or before this date, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
*
- * @param \DateTime $endDate Only include usage that occurred on or before this
- * date
+ * @param \DateTime $endDate Only include usage that occurred on or before this date, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
* @return $this Fluent Builder
*/
- public function setEndDate($endDate)
+ public function setEndDate(\DateTime $endDate): self
{
$this->options['endDate'] = $endDate;
return $this;
@@ -91,10 +107,10 @@ public function setEndDate($endDate)
/**
* Only calculate statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.
*
- * @param string $taskChannel Only calculate statistics on this TaskChannel
+ * @param string $taskChannel Only calculate statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.
* @return $this Fluent Builder
*/
- public function setTaskChannel($taskChannel)
+ public function setTaskChannel(string $taskChannel): self
{
$this->options['taskChannel'] = $taskChannel;
return $this;
@@ -105,14 +121,10 @@ public function setTaskChannel($taskChannel)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Taskrouter.V1.FetchWorkerStatisticsOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.FetchWorkerStatisticsOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerStatisticsPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerStatisticsPage.php
index 5bdf679..722c1d9 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerStatisticsPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkerStatisticsPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return WorkerStatisticsInstance \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkerStatisticsInstance
+ */
+ public function buildInstance(array $payload): WorkerStatisticsInstance
{
- return new WorkerStatisticsInstance(
- $this->version,
- $payload,
- $this->solution['workspaceSid'],
- $this->solution['workerSid']
- );
+ return new WorkerStatisticsInstance($this->version, $payload, $this->solution['workspaceSid'], $this->solution['workerSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.WorkerStatisticsPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersCumulativeStatisticsContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersCumulativeStatisticsContext.php
index 76bcd90..5385601 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersCumulativeStatisticsContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersCumulativeStatisticsContext.php
@@ -2,64 +2,78 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace\Worker;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
class WorkersCumulativeStatisticsContext extends InstanceContext
-{
+ {
/**
* Initialize the WorkersCumulativeStatisticsContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace with the resource to
- * fetch
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkersCumulativeStatisticsContext
+ * @param Version $version Version that contains the resource
+ * @param string $workspaceSid The SID of the Workspace with the resource to fetch.
*/
- public function __construct(Version $version, $workspaceSid)
- {
+ public function __construct(
+ Version $version,
+ $workspaceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+ ];
- $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Workers/CumulativeStatistics';
+ $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid)
+ .'/Workers/CumulativeStatistics';
}
/**
- * Fetch a WorkersCumulativeStatisticsInstance
+ * Fetch the WorkersCumulativeStatisticsInstance
*
* @param array|Options $options Optional Arguments
- * @return WorkersCumulativeStatisticsInstance Fetched
- * WorkersCumulativeStatisticsInstance
+ * @return WorkersCumulativeStatisticsInstance Fetched WorkersCumulativeStatisticsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch($options = array())
+ public function fetch(array $options = []): WorkersCumulativeStatisticsInstance
{
+
$options = new Values($options);
- $params = Values::of(array(
- 'EndDate' => Serialize::iso8601DateTime($options['endDate']),
- 'Minutes' => $options['minutes'],
- 'StartDate' => Serialize::iso8601DateTime($options['startDate']),
- 'TaskChannel' => $options['taskChannel'],
- ));
+ $params = Values::of([
+ 'EndDate' =>
+ Serialize::iso8601DateTime($options['endDate']),
+ 'Minutes' =>
+ $options['minutes'],
+ 'StartDate' =>
+ Serialize::iso8601DateTime($options['startDate']),
+ 'TaskChannel' =>
+ $options['taskChannel'],
+ ]);
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, $params, [], $headers);
return new WorkersCumulativeStatisticsInstance(
$this->version,
@@ -68,17 +82,18 @@ public function fetch($options = array())
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.WorkersCumulativeStatisticsContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersCumulativeStatisticsInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersCumulativeStatisticsInstance.php
index 104d9ad..0a3bdf5 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersCumulativeStatisticsInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersCumulativeStatisticsInstance.php
@@ -2,51 +2,58 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace\Worker;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property \DateTime $startTime
- * @property \DateTime $endTime
- * @property array $activityDurations
+ * @property string|null $accountSid
+ * @property \DateTime|null $startTime
+ * @property \DateTime|null $endTime
+ * @property array[]|null $activityDurations
* @property int $reservationsCreated
* @property int $reservationsAccepted
* @property int $reservationsRejected
* @property int $reservationsTimedOut
* @property int $reservationsCanceled
* @property int $reservationsRescinded
- * @property string $workspaceSid
- * @property string $url
+ * @property string|null $workspaceSid
+ * @property string|null $url
*/
class WorkersCumulativeStatisticsInstance extends InstanceResource
{
/**
* Initialize the WorkersCumulativeStatisticsInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $workspaceSid The SID of the Workspace that contains the
- * Workers
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkersCumulativeStatisticsInstance
+ * @param string $workspaceSid The SID of the Workspace with the resource to fetch.
*/
- public function __construct(Version $version, array $payload, $workspaceSid)
+ public function __construct(Version $version, array $payload, string $workspaceSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'startTime' => Deserialize::dateTime(Values::array_get($payload, 'start_time')),
'endTime' => Deserialize::dateTime(Values::array_get($payload, 'end_time')),
@@ -59,19 +66,18 @@ public function __construct(Version $version, array $payload, $workspaceSid)
'reservationsRescinded' => Values::array_get($payload, 'reservations_rescinded'),
'workspaceSid' => Values::array_get($payload, 'workspace_sid'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('workspaceSid' => $workspaceSid,);
+ $this->solution = ['workspaceSid' => $workspaceSid, ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkersCumulativeStatisticsContext Context for this
- * WorkersCumulativeStatisticsInstance
+ * @return WorkersCumulativeStatisticsContext Context for this WorkersCumulativeStatisticsInstance
*/
- protected function proxy()
+ protected function proxy(): WorkersCumulativeStatisticsContext
{
if (!$this->context) {
$this->context = new WorkersCumulativeStatisticsContext(
@@ -84,15 +90,15 @@ protected function proxy()
}
/**
- * Fetch a WorkersCumulativeStatisticsInstance
+ * Fetch the WorkersCumulativeStatisticsInstance
*
* @param array|Options $options Optional Arguments
- * @return WorkersCumulativeStatisticsInstance Fetched
- * WorkersCumulativeStatisticsInstance
+ * @return WorkersCumulativeStatisticsInstance Fetched WorkersCumulativeStatisticsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch($options = array())
+ public function fetch(array $options = []): WorkersCumulativeStatisticsInstance
{
+
return $this->proxy()->fetch($options);
}
@@ -103,7 +109,7 @@ public function fetch($options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -122,12 +128,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.WorkersCumulativeStatisticsInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersCumulativeStatisticsList.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersCumulativeStatisticsList.php
index e67f423..a1ef103 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersCumulativeStatisticsList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersCumulativeStatisticsList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Taskrouter\V1\Workspace\Worker;
@@ -12,32 +19,40 @@
use Twilio\ListResource;
use Twilio\Version;
+
class WorkersCumulativeStatisticsList extends ListResource
-{
+ {
/**
* Construct the WorkersCumulativeStatisticsList
*
* @param Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace that contains the
- * Workers
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkersCumulativeStatisticsList
+ * @param string $workspaceSid The SID of the Workspace with the resource to fetch.
*/
- public function __construct(Version $version, $workspaceSid)
- {
+ public function __construct(
+ Version $version,
+ string $workspaceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+
+ ];
}
/**
* Constructs a WorkersCumulativeStatisticsContext
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkersCumulativeStatisticsContext
*/
- public function getContext()
+ public function getContext(
+
+ ): WorkersCumulativeStatisticsContext
{
- return new WorkersCumulativeStatisticsContext($this->version, $this->solution['workspaceSid']);
+ return new WorkersCumulativeStatisticsContext(
+ $this->version,
+ $this->solution['workspaceSid']
+ );
}
/**
@@ -45,8 +60,8 @@ public function getContext()
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.WorkersCumulativeStatisticsList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersCumulativeStatisticsOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersCumulativeStatisticsOptions.php
index 2e92c1b..8291f21 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersCumulativeStatisticsOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersCumulativeStatisticsOptions.php
@@ -1,10 +1,16 @@
options['endDate'] = $endDate;
$this->options['minutes'] = $minutes;
$this->options['startDate'] = $startDate;
@@ -54,11 +71,10 @@ public function __construct($endDate = Values::NONE, $minutes = Values::NONE, $s
/**
* Only calculate statistics from this date and time and earlier, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
*
- * @param \DateTime $endDate Only calculate statistics from on or before this
- * date
+ * @param \DateTime $endDate Only calculate statistics from this date and time and earlier, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
* @return $this Fluent Builder
*/
- public function setEndDate($endDate)
+ public function setEndDate(\DateTime $endDate): self
{
$this->options['endDate'] = $endDate;
return $this;
@@ -67,11 +83,10 @@ public function setEndDate($endDate)
/**
* Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends.
*
- * @param int $minutes Only calculate statistics since this many minutes in the
- * past
+ * @param int $minutes Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends.
* @return $this Fluent Builder
*/
- public function setMinutes($minutes)
+ public function setMinutes(int $minutes): self
{
$this->options['minutes'] = $minutes;
return $this;
@@ -80,11 +95,10 @@ public function setMinutes($minutes)
/**
* Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
*
- * @param \DateTime $startDate Only calculate statistics from on or after this
- * date
+ * @param \DateTime $startDate Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
* @return $this Fluent Builder
*/
- public function setStartDate($startDate)
+ public function setStartDate(\DateTime $startDate): self
{
$this->options['startDate'] = $startDate;
return $this;
@@ -93,11 +107,10 @@ public function setStartDate($startDate)
/**
* Only calculate cumulative statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.
*
- * @param string $taskChannel Only calculate cumulative statistics on this
- * TaskChannel
+ * @param string $taskChannel Only calculate cumulative statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.
* @return $this Fluent Builder
*/
- public function setTaskChannel($taskChannel)
+ public function setTaskChannel(string $taskChannel): self
{
$this->options['taskChannel'] = $taskChannel;
return $this;
@@ -108,14 +121,10 @@ public function setTaskChannel($taskChannel)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Taskrouter.V1.FetchWorkersCumulativeStatisticsOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.FetchWorkersCumulativeStatisticsOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersCumulativeStatisticsPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersCumulativeStatisticsPage.php
index 49593ba..aa71da1 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersCumulativeStatisticsPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersCumulativeStatisticsPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return WorkersCumulativeStatisticsInstance \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkersCumulativeStatisticsInstance
+ */
+ public function buildInstance(array $payload): WorkersCumulativeStatisticsInstance
{
- return new WorkersCumulativeStatisticsInstance(
- $this->version,
- $payload,
- $this->solution['workspaceSid']
- );
+ return new WorkersCumulativeStatisticsInstance($this->version, $payload, $this->solution['workspaceSid']);
}
/**
@@ -35,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.WorkersCumulativeStatisticsPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersRealTimeStatisticsContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersRealTimeStatisticsContext.php
index ceecdea..702a870 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersRealTimeStatisticsContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersRealTimeStatisticsContext.php
@@ -2,58 +2,71 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace\Worker;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class WorkersRealTimeStatisticsContext extends InstanceContext
-{
+ {
/**
* Initialize the WorkersRealTimeStatisticsContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace with the resource to
- * fetch
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkersRealTimeStatisticsContext
+ * @param Version $version Version that contains the resource
+ * @param string $workspaceSid The SID of the Workspace with the resource to fetch.
*/
- public function __construct(Version $version, $workspaceSid)
- {
+ public function __construct(
+ Version $version,
+ $workspaceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+ ];
- $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Workers/RealTimeStatistics';
+ $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid)
+ .'/Workers/RealTimeStatistics';
}
/**
- * Fetch a WorkersRealTimeStatisticsInstance
+ * Fetch the WorkersRealTimeStatisticsInstance
*
* @param array|Options $options Optional Arguments
- * @return WorkersRealTimeStatisticsInstance Fetched
- * WorkersRealTimeStatisticsInstance
+ * @return WorkersRealTimeStatisticsInstance Fetched WorkersRealTimeStatisticsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch($options = array())
+ public function fetch(array $options = []): WorkersRealTimeStatisticsInstance
{
+
$options = new Values($options);
- $params = Values::of(array('TaskChannel' => $options['taskChannel'],));
+ $params = Values::of([
+ 'TaskChannel' =>
+ $options['taskChannel'],
+ ]);
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, $params, [], $headers);
return new WorkersRealTimeStatisticsInstance(
$this->version,
@@ -62,17 +75,18 @@ public function fetch($options = array())
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.WorkersRealTimeStatisticsContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersRealTimeStatisticsInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersRealTimeStatisticsInstance.php
index 4e54e27..75100b9 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersRealTimeStatisticsInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersRealTimeStatisticsInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace\Worker;
use Twilio\Exceptions\TwilioException;
@@ -15,48 +23,46 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * @property string $accountSid
- * @property array $activityStatistics
+ * @property string|null $accountSid
+ * @property array[]|null $activityStatistics
* @property int $totalWorkers
- * @property string $workspaceSid
- * @property string $url
+ * @property string|null $workspaceSid
+ * @property string|null $url
*/
class WorkersRealTimeStatisticsInstance extends InstanceResource
{
/**
* Initialize the WorkersRealTimeStatisticsInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $workspaceSid The SID of the Workspace that contains the
- * Workers
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkersRealTimeStatisticsInstance
+ * @param string $workspaceSid The SID of the Workspace with the resource to fetch.
*/
- public function __construct(Version $version, array $payload, $workspaceSid)
+ public function __construct(Version $version, array $payload, string $workspaceSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'activityStatistics' => Values::array_get($payload, 'activity_statistics'),
'totalWorkers' => Values::array_get($payload, 'total_workers'),
'workspaceSid' => Values::array_get($payload, 'workspace_sid'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('workspaceSid' => $workspaceSid,);
+ $this->solution = ['workspaceSid' => $workspaceSid, ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkersRealTimeStatisticsContext Context for this
- * WorkersRealTimeStatisticsInstance
+ * @return WorkersRealTimeStatisticsContext Context for this WorkersRealTimeStatisticsInstance
*/
- protected function proxy()
+ protected function proxy(): WorkersRealTimeStatisticsContext
{
if (!$this->context) {
$this->context = new WorkersRealTimeStatisticsContext(
@@ -69,15 +75,15 @@ protected function proxy()
}
/**
- * Fetch a WorkersRealTimeStatisticsInstance
+ * Fetch the WorkersRealTimeStatisticsInstance
*
* @param array|Options $options Optional Arguments
- * @return WorkersRealTimeStatisticsInstance Fetched
- * WorkersRealTimeStatisticsInstance
+ * @return WorkersRealTimeStatisticsInstance Fetched WorkersRealTimeStatisticsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch($options = array())
+ public function fetch(array $options = []): WorkersRealTimeStatisticsInstance
{
+
return $this->proxy()->fetch($options);
}
@@ -88,7 +94,7 @@ public function fetch($options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -107,12 +113,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.WorkersRealTimeStatisticsInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersRealTimeStatisticsList.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersRealTimeStatisticsList.php
index 0e38ead..f7ea954 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersRealTimeStatisticsList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersRealTimeStatisticsList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Taskrouter\V1\Workspace\Worker;
@@ -12,32 +19,40 @@
use Twilio\ListResource;
use Twilio\Version;
+
class WorkersRealTimeStatisticsList extends ListResource
-{
+ {
/**
* Construct the WorkersRealTimeStatisticsList
*
* @param Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace that contains the
- * Workers
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkersRealTimeStatisticsList
+ * @param string $workspaceSid The SID of the Workspace with the resource to fetch.
*/
- public function __construct(Version $version, $workspaceSid)
- {
+ public function __construct(
+ Version $version,
+ string $workspaceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+
+ ];
}
/**
* Constructs a WorkersRealTimeStatisticsContext
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkersRealTimeStatisticsContext
*/
- public function getContext()
+ public function getContext(
+
+ ): WorkersRealTimeStatisticsContext
{
- return new WorkersRealTimeStatisticsContext($this->version, $this->solution['workspaceSid']);
+ return new WorkersRealTimeStatisticsContext(
+ $this->version,
+ $this->solution['workspaceSid']
+ );
}
/**
@@ -45,8 +60,8 @@ public function getContext()
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.WorkersRealTimeStatisticsList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersRealTimeStatisticsOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersRealTimeStatisticsOptions.php
index 49f2d0b..32e3855 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersRealTimeStatisticsOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersRealTimeStatisticsOptions.php
@@ -1,10 +1,16 @@
options['taskChannel'] = $taskChannel;
}
/**
* Only calculate real-time statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.
*
- * @param string $taskChannel Only calculate real-time statistics on this
- * TaskChannel
+ * @param string $taskChannel Only calculate real-time statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.
* @return $this Fluent Builder
*/
- public function setTaskChannel($taskChannel)
+ public function setTaskChannel(string $taskChannel): self
{
$this->options['taskChannel'] = $taskChannel;
return $this;
@@ -54,14 +67,10 @@ public function setTaskChannel($taskChannel)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Taskrouter.V1.FetchWorkersRealTimeStatisticsOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.FetchWorkersRealTimeStatisticsOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersRealTimeStatisticsPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersRealTimeStatisticsPage.php
index 7dc83e9..66a3d9e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersRealTimeStatisticsPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersRealTimeStatisticsPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return WorkersRealTimeStatisticsInstance \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkersRealTimeStatisticsInstance
+ */
+ public function buildInstance(array $payload): WorkersRealTimeStatisticsInstance
{
- return new WorkersRealTimeStatisticsInstance(
- $this->version,
- $payload,
- $this->solution['workspaceSid']
- );
+ return new WorkersRealTimeStatisticsInstance($this->version, $payload, $this->solution['workspaceSid']);
}
/**
@@ -35,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.WorkersRealTimeStatisticsPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersStatisticsContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersStatisticsContext.php
index fa48c3f..2bc9980 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersStatisticsContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersStatisticsContext.php
@@ -2,80 +2,104 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace\Worker;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
class WorkersStatisticsContext extends InstanceContext
-{
+ {
/**
* Initialize the WorkersStatisticsContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace with the Worker to fetch
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkersStatisticsContext
+ * @param Version $version Version that contains the resource
+ * @param string $workspaceSid The SID of the Workspace with the Worker to fetch.
*/
- public function __construct(Version $version, $workspaceSid)
- {
+ public function __construct(
+ Version $version,
+ $workspaceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+ ];
- $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Workers/Statistics';
+ $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid)
+ .'/Workers/Statistics';
}
/**
- * Fetch a WorkersStatisticsInstance
+ * Fetch the WorkersStatisticsInstance
*
* @param array|Options $options Optional Arguments
* @return WorkersStatisticsInstance Fetched WorkersStatisticsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch($options = array())
+ public function fetch(array $options = []): WorkersStatisticsInstance
{
+
$options = new Values($options);
- $params = Values::of(array(
- 'Minutes' => $options['minutes'],
- 'StartDate' => Serialize::iso8601DateTime($options['startDate']),
- 'EndDate' => Serialize::iso8601DateTime($options['endDate']),
- 'TaskQueueSid' => $options['taskQueueSid'],
- 'TaskQueueName' => $options['taskQueueName'],
- 'FriendlyName' => $options['friendlyName'],
- 'TaskChannel' => $options['taskChannel'],
- ));
+ $params = Values::of([
+ 'Minutes' =>
+ $options['minutes'],
+ 'StartDate' =>
+ Serialize::iso8601DateTime($options['startDate']),
+ 'EndDate' =>
+ Serialize::iso8601DateTime($options['endDate']),
+ 'TaskQueueSid' =>
+ $options['taskQueueSid'],
+ 'TaskQueueName' =>
+ $options['taskQueueName'],
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'TaskChannel' =>
+ $options['taskChannel'],
+ ]);
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, $params, [], $headers);
- return new WorkersStatisticsInstance($this->version, $payload, $this->solution['workspaceSid']);
+ return new WorkersStatisticsInstance(
+ $this->version,
+ $payload,
+ $this->solution['workspaceSid']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.WorkersStatisticsContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersStatisticsInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersStatisticsInstance.php
index eb6f16e..6f84355 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersStatisticsInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersStatisticsInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace\Worker;
use Twilio\Exceptions\TwilioException;
@@ -15,63 +23,67 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * @property array $realtime
- * @property array $cumulative
- * @property string $accountSid
- * @property string $workspaceSid
- * @property string $url
+ * @property array|null $realtime
+ * @property array|null $cumulative
+ * @property string|null $accountSid
+ * @property string|null $workspaceSid
+ * @property string|null $url
*/
class WorkersStatisticsInstance extends InstanceResource
{
/**
* Initialize the WorkersStatisticsInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $workspaceSid The SID of the Workspace that contains the Worker
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkersStatisticsInstance
+ * @param string $workspaceSid The SID of the Workspace with the Worker to fetch.
*/
- public function __construct(Version $version, array $payload, $workspaceSid)
+ public function __construct(Version $version, array $payload, string $workspaceSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'realtime' => Values::array_get($payload, 'realtime'),
'cumulative' => Values::array_get($payload, 'cumulative'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'workspaceSid' => Values::array_get($payload, 'workspace_sid'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('workspaceSid' => $workspaceSid,);
+ $this->solution = ['workspaceSid' => $workspaceSid, ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkersStatisticsContext Context for this WorkersStatisticsInstance
+ * @return WorkersStatisticsContext Context for this WorkersStatisticsInstance
*/
- protected function proxy()
+ protected function proxy(): WorkersStatisticsContext
{
if (!$this->context) {
- $this->context = new WorkersStatisticsContext($this->version, $this->solution['workspaceSid']);
+ $this->context = new WorkersStatisticsContext(
+ $this->version,
+ $this->solution['workspaceSid']
+ );
}
return $this->context;
}
/**
- * Fetch a WorkersStatisticsInstance
+ * Fetch the WorkersStatisticsInstance
*
* @param array|Options $options Optional Arguments
* @return WorkersStatisticsInstance Fetched WorkersStatisticsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch($options = array())
+ public function fetch(array $options = []): WorkersStatisticsInstance
{
+
return $this->proxy()->fetch($options);
}
@@ -82,7 +94,7 @@ public function fetch($options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -101,12 +113,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.WorkersStatisticsInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersStatisticsList.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersStatisticsList.php
index ea198c5..e8f488f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersStatisticsList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersStatisticsList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Taskrouter\V1\Workspace\Worker;
@@ -12,31 +19,40 @@
use Twilio\ListResource;
use Twilio\Version;
+
class WorkersStatisticsList extends ListResource
-{
+ {
/**
* Construct the WorkersStatisticsList
*
* @param Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace that contains the Worker
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkersStatisticsList
+ * @param string $workspaceSid The SID of the Workspace with the Worker to fetch.
*/
- public function __construct(Version $version, $workspaceSid)
- {
+ public function __construct(
+ Version $version,
+ string $workspaceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+
+ ];
}
/**
* Constructs a WorkersStatisticsContext
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkersStatisticsContext
*/
- public function getContext()
+ public function getContext(
+
+ ): WorkersStatisticsContext
{
- return new WorkersStatisticsContext($this->version, $this->solution['workspaceSid']);
+ return new WorkersStatisticsContext(
+ $this->version,
+ $this->solution['workspaceSid']
+ );
}
/**
@@ -44,8 +60,8 @@ public function getContext()
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.WorkersStatisticsList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersStatisticsOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersStatisticsOptions.php
index 6b1dac9..b74024a 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersStatisticsOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersStatisticsOptions.php
@@ -1,10 +1,16 @@
options['minutes'] = $minutes;
$this->options['startDate'] = $startDate;
$this->options['endDate'] = $endDate;
@@ -67,11 +89,10 @@ public function __construct($minutes = Values::NONE, $startDate = Values::NONE,
/**
* Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends.
*
- * @param int $minutes Only calculate statistics since this many minutes in the
- * past
+ * @param int $minutes Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends.
* @return $this Fluent Builder
*/
- public function setMinutes($minutes)
+ public function setMinutes(int $minutes): self
{
$this->options['minutes'] = $minutes;
return $this;
@@ -80,11 +101,10 @@ public function setMinutes($minutes)
/**
* Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
*
- * @param \DateTime $startDate Only calculate statistics from on or after this
- * date
+ * @param \DateTime $startDate Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
* @return $this Fluent Builder
*/
- public function setStartDate($startDate)
+ public function setStartDate(\DateTime $startDate): self
{
$this->options['startDate'] = $startDate;
return $this;
@@ -93,11 +113,10 @@ public function setStartDate($startDate)
/**
* Only calculate statistics from this date and time and earlier, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
*
- * @param \DateTime $endDate Only calculate statistics from this date and time
- * and earlier
+ * @param \DateTime $endDate Only calculate statistics from this date and time and earlier, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
* @return $this Fluent Builder
*/
- public function setEndDate($endDate)
+ public function setEndDate(\DateTime $endDate): self
{
$this->options['endDate'] = $endDate;
return $this;
@@ -106,11 +125,10 @@ public function setEndDate($endDate)
/**
* The SID of the TaskQueue for which to fetch Worker statistics.
*
- * @param string $taskQueueSid The SID of the TaskQueue for which to fetch
- * Worker statistics
+ * @param string $taskQueueSid The SID of the TaskQueue for which to fetch Worker statistics.
* @return $this Fluent Builder
*/
- public function setTaskQueueSid($taskQueueSid)
+ public function setTaskQueueSid(string $taskQueueSid): self
{
$this->options['taskQueueSid'] = $taskQueueSid;
return $this;
@@ -119,11 +137,10 @@ public function setTaskQueueSid($taskQueueSid)
/**
* The `friendly_name` of the TaskQueue for which to fetch Worker statistics.
*
- * @param string $taskQueueName The friendly_name of the TaskQueue for which to
- * fetch Worker statistics
+ * @param string $taskQueueName The `friendly_name` of the TaskQueue for which to fetch Worker statistics.
* @return $this Fluent Builder
*/
- public function setTaskQueueName($taskQueueName)
+ public function setTaskQueueName(string $taskQueueName): self
{
$this->options['taskQueueName'] = $taskQueueName;
return $this;
@@ -132,11 +149,10 @@ public function setTaskQueueName($taskQueueName)
/**
* Only include Workers with `friendly_name` values that match this parameter.
*
- * @param string $friendlyName Only include Workers with `friendly_name` values
- * that match this parameter
+ * @param string $friendlyName Only include Workers with `friendly_name` values that match this parameter.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -145,10 +161,10 @@ public function setFriendlyName($friendlyName)
/**
* Only calculate statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.
*
- * @param string $taskChannel Only calculate statistics on this TaskChannel
+ * @param string $taskChannel Only calculate statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.
* @return $this Fluent Builder
*/
- public function setTaskChannel($taskChannel)
+ public function setTaskChannel(string $taskChannel): self
{
$this->options['taskChannel'] = $taskChannel;
return $this;
@@ -159,14 +175,10 @@ public function setTaskChannel($taskChannel)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Taskrouter.V1.FetchWorkersStatisticsOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.FetchWorkersStatisticsOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersStatisticsPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersStatisticsPage.php
index fe66d1f..eb2585e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersStatisticsPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersStatisticsPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return WorkersStatisticsInstance \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkersStatisticsInstance
+ */
+ public function buildInstance(array $payload): WorkersStatisticsInstance
{
return new WorkersStatisticsInstance($this->version, $payload, $this->solution['workspaceSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.WorkersStatisticsPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkerContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkerContext.php
index 4a6184f..9c04ec2 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkerContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkerContext.php
@@ -2,78 +2,110 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Taskrouter\V1\Workspace\Worker\ReservationList;
+use Twilio\Values;
+use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
use Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkerChannelList;
+use Twilio\Rest\Taskrouter\V1\Workspace\Worker\ReservationList;
+use Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkersRealTimeStatisticsList;
use Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkerStatisticsList;
use Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkersCumulativeStatisticsList;
-use Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkersRealTimeStatisticsList;
-use Twilio\Serialize;
-use Twilio\Values;
-use Twilio\Version;
+
/**
- * @property \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkersRealTimeStatisticsList $realTimeStatistics
- * @property \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkersCumulativeStatisticsList $cumulativeStatistics
- * @property \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkerStatisticsList $statistics
- * @property \Twilio\Rest\Taskrouter\V1\Workspace\Worker\ReservationList $reservations
- * @property \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkerChannelList $workerChannels
+ * @property WorkerChannelList $workerChannels
+ * @property ReservationList $reservations
+ * @property WorkersRealTimeStatisticsList $realTimeStatistics
+ * @property WorkerStatisticsList $statistics
+ * @property WorkersCumulativeStatisticsList $cumulativeStatistics
+ * @method \Twilio\Rest\Taskrouter\V1\Workspace\Worker\ReservationContext reservations(string $sid)
* @method \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkersRealTimeStatisticsContext realTimeStatistics()
- * @method \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkersCumulativeStatisticsContext cumulativeStatistics()
* @method \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkerStatisticsContext statistics()
- * @method \Twilio\Rest\Taskrouter\V1\Workspace\Worker\ReservationContext reservations(string $sid)
+ * @method \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkersCumulativeStatisticsContext cumulativeStatistics()
* @method \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkerChannelContext workerChannels(string $sid)
*/
class WorkerContext extends InstanceContext
-{
- protected $_realTimeStatistics = null;
- protected $_cumulativeStatistics = null;
- protected $_statistics = null;
- protected $_reservations = null;
- protected $_workerChannels = null;
+ {
+ protected $_workerChannels;
+ protected $_reservations;
+ protected $_realTimeStatistics;
+ protected $_statistics;
+ protected $_cumulativeStatistics;
/**
* Initialize the WorkerContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace with the Worker to fetch
- * @param string $sid The SID of the resource to fetch
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\WorkerContext
+ * @param Version $version Version that contains the resource
+ * @param string $workspaceSid The SID of the Workspace that the new Worker belongs to.
+ * @param string $sid The SID of the Worker resource to delete.
*/
- public function __construct(Version $version, $workspaceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $workspaceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid, 'sid' => $sid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid)
+ .'/Workers/' . \rawurlencode($sid)
+ .'';
+ }
+
+ /**
+ * Delete the WorkerInstance
+ *
+ * @param array|Options $options Optional Arguments
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(array $options = []): bool
+ {
- $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Workers/' . \rawurlencode($sid) . '';
+ $options = new Values($options);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'If-Match' => $options['ifMatch']]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a WorkerInstance
+ * Fetch the WorkerInstance
*
* @return WorkerInstance Fetched WorkerInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): WorkerInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new WorkerInstance(
$this->version,
@@ -83,6 +115,7 @@ public function fetch()
);
}
+
/**
* Update the WorkerInstance
*
@@ -90,23 +123,24 @@ public function fetch()
* @return WorkerInstance Updated WorkerInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): WorkerInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'ActivitySid' => $options['activitySid'],
- 'Attributes' => $options['attributes'],
- 'FriendlyName' => $options['friendlyName'],
- 'RejectPendingReservations' => Serialize::booleanToString($options['rejectPendingReservations']),
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'ActivitySid' =>
+ $options['activitySid'],
+ 'Attributes' =>
+ $options['attributes'],
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'RejectPendingReservations' =>
+ Serialize::booleanToString($options['rejectPendingReservations']),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' , 'If-Match' => $options['ifMatch']]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new WorkerInstance(
$this->version,
@@ -116,113 +150,95 @@ public function update($options = array())
);
}
- /**
- * Deletes the WorkerInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
- * Access the realTimeStatistics
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkersRealTimeStatisticsList
+ * Access the workerChannels
*/
- protected function getRealTimeStatistics()
+ protected function getWorkerChannels(): WorkerChannelList
{
- if (!$this->_realTimeStatistics) {
- $this->_realTimeStatistics = new WorkersRealTimeStatisticsList(
+ if (!$this->_workerChannels) {
+ $this->_workerChannels = new WorkerChannelList(
$this->version,
- $this->solution['workspaceSid']
+ $this->solution['workspaceSid'],
+ $this->solution['sid']
);
}
- return $this->_realTimeStatistics;
+ return $this->_workerChannels;
}
/**
- * Access the cumulativeStatistics
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkersCumulativeStatisticsList
+ * Access the reservations
*/
- protected function getCumulativeStatistics()
+ protected function getReservations(): ReservationList
{
- if (!$this->_cumulativeStatistics) {
- $this->_cumulativeStatistics = new WorkersCumulativeStatisticsList(
+ if (!$this->_reservations) {
+ $this->_reservations = new ReservationList(
$this->version,
- $this->solution['workspaceSid']
+ $this->solution['workspaceSid'],
+ $this->solution['sid']
);
}
- return $this->_cumulativeStatistics;
+ return $this->_reservations;
}
/**
- * Access the statistics
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkerStatisticsList
+ * Access the realTimeStatistics
*/
- protected function getStatistics()
+ protected function getRealTimeStatistics(): WorkersRealTimeStatisticsList
{
- if (!$this->_statistics) {
- $this->_statistics = new WorkerStatisticsList(
+ if (!$this->_realTimeStatistics) {
+ $this->_realTimeStatistics = new WorkersRealTimeStatisticsList(
$this->version,
$this->solution['workspaceSid'],
$this->solution['sid']
);
}
- return $this->_statistics;
+ return $this->_realTimeStatistics;
}
/**
- * Access the reservations
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\ReservationList
+ * Access the statistics
*/
- protected function getReservations()
+ protected function getStatistics(): WorkerStatisticsList
{
- if (!$this->_reservations) {
- $this->_reservations = new ReservationList(
+ if (!$this->_statistics) {
+ $this->_statistics = new WorkerStatisticsList(
$this->version,
$this->solution['workspaceSid'],
$this->solution['sid']
);
}
- return $this->_reservations;
+ return $this->_statistics;
}
/**
- * Access the workerChannels
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkerChannelList
+ * Access the cumulativeStatistics
*/
- protected function getWorkerChannels()
+ protected function getCumulativeStatistics(): WorkersCumulativeStatisticsList
{
- if (!$this->_workerChannels) {
- $this->_workerChannels = new WorkerChannelList(
+ if (!$this->_cumulativeStatistics) {
+ $this->_cumulativeStatistics = new WorkersCumulativeStatisticsList(
$this->version,
$this->solution['workspaceSid'],
$this->solution['sid']
);
}
- return $this->_workerChannels;
+ return $this->_cumulativeStatistics;
}
/**
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -237,10 +253,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -255,12 +271,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.WorkerContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkerInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkerInstance.php
index ac116e5..6320177 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkerInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkerInstance.php
@@ -2,58 +2,71 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkerChannelList;
+use Twilio\Rest\Taskrouter\V1\Workspace\Worker\ReservationList;
+use Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkersRealTimeStatisticsList;
+use Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkerStatisticsList;
+use Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkersCumulativeStatisticsList;
+
/**
- * @property string $accountSid
- * @property string $activityName
- * @property string $activitySid
- * @property string $attributes
- * @property bool $available
- * @property \DateTime $dateCreated
- * @property \DateTime $dateStatusChanged
- * @property \DateTime $dateUpdated
- * @property string $friendlyName
- * @property string $sid
- * @property string $workspaceSid
- * @property string $url
- * @property array $links
+ * @property string|null $accountSid
+ * @property string|null $activityName
+ * @property string|null $activitySid
+ * @property string|null $attributes
+ * @property bool|null $available
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateStatusChanged
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $friendlyName
+ * @property string|null $sid
+ * @property string|null $workspaceSid
+ * @property string|null $url
+ * @property array|null $links
*/
class WorkerInstance extends InstanceResource
{
- protected $_realTimeStatistics = null;
- protected $_cumulativeStatistics = null;
- protected $_statistics = null;
- protected $_reservations = null;
- protected $_workerChannels = null;
+ protected $_workerChannels;
+ protected $_reservations;
+ protected $_realTimeStatistics;
+ protected $_statistics;
+ protected $_cumulativeStatistics;
/**
* Initialize the WorkerInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $workspaceSid The SID of the Workspace that contains the Worker
- * @param string $sid The SID of the resource to fetch
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\WorkerInstance
+ * @param string $workspaceSid The SID of the Workspace that the new Worker belongs to.
+ * @param string $sid The SID of the Worker resource to delete.
*/
- public function __construct(Version $version, array $payload, $workspaceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $workspaceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'activityName' => Values::array_get($payload, 'activity_name'),
'activitySid' => Values::array_get($payload, 'activity_sid'),
@@ -67,19 +80,18 @@ public function __construct(Version $version, array $payload, $workspaceSid, $si
'workspaceSid' => Values::array_get($payload, 'workspace_sid'),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('workspaceSid' => $workspaceSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['workspaceSid' => $workspaceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\WorkerContext Context for this
- * WorkerInstance
+ * @return WorkerContext Context for this WorkerInstance
*/
- protected function proxy()
+ protected function proxy(): WorkerContext
{
if (!$this->context) {
$this->context = new WorkerContext(
@@ -93,13 +105,27 @@ protected function proxy()
}
/**
- * Fetch a WorkerInstance
+ * Delete the WorkerInstance
+ *
+ * @param array|Options $options Optional Arguments
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(array $options = []): bool
+ {
+
+ return $this->proxy()->delete($options);
+ }
+
+ /**
+ * Fetch the WorkerInstance
*
* @return WorkerInstance Fetched WorkerInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): WorkerInstance
{
+
return $this->proxy()->fetch();
}
@@ -110,70 +136,50 @@ public function fetch()
* @return WorkerInstance Updated WorkerInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): WorkerInstance
{
+
return $this->proxy()->update($options);
}
/**
- * Deletes the WorkerInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
+ * Access the workerChannels
*/
- public function delete()
+ protected function getWorkerChannels(): WorkerChannelList
{
- return $this->proxy()->delete();
+ return $this->proxy()->workerChannels;
}
/**
- * Access the realTimeStatistics
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkersRealTimeStatisticsList
+ * Access the reservations
*/
- protected function getRealTimeStatistics()
+ protected function getReservations(): ReservationList
{
- return $this->proxy()->realTimeStatistics;
+ return $this->proxy()->reservations;
}
/**
- * Access the cumulativeStatistics
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkersCumulativeStatisticsList
+ * Access the realTimeStatistics
*/
- protected function getCumulativeStatistics()
+ protected function getRealTimeStatistics(): WorkersRealTimeStatisticsList
{
- return $this->proxy()->cumulativeStatistics;
+ return $this->proxy()->realTimeStatistics;
}
/**
* Access the statistics
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkerStatisticsList
*/
- protected function getStatistics()
+ protected function getStatistics(): WorkerStatisticsList
{
return $this->proxy()->statistics;
}
/**
- * Access the reservations
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\ReservationList
- */
- protected function getReservations()
- {
- return $this->proxy()->reservations;
- }
-
- /**
- * Access the workerChannels
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkerChannelList
+ * Access the cumulativeStatistics
*/
- protected function getWorkerChannels()
+ protected function getCumulativeStatistics(): WorkersCumulativeStatisticsList
{
- return $this->proxy()->workerChannels;
+ return $this->proxy()->cumulativeStatistics;
}
/**
@@ -183,7 +189,7 @@ protected function getWorkerChannels()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -202,12 +208,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.WorkerInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkerList.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkerList.php
index a6803b6..71b361e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkerList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkerList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Taskrouter\V1\Workspace;
@@ -12,63 +19,77 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkersStatisticsList;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkersStatisticsList;
+
/**
- * @property \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkersStatisticsList $statistics
+ * @property WorkersStatisticsList $statistics
* @method \Twilio\Rest\Taskrouter\V1\Workspace\Worker\WorkersStatisticsContext statistics()
*/
class WorkerList extends ListResource
-{
+ {
protected $_statistics = null;
/**
* Construct the WorkerList
*
* @param Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace that contains the Worker
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\WorkerList
+ * @param string $workspaceSid The SID of the Workspace that the new Worker belongs to.
*/
- public function __construct(Version $version, $workspaceSid)
- {
+ public function __construct(
+ Version $version,
+ string $workspaceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+
+ ];
- $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Workers';
+ $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid)
+ .'/Workers';
}
/**
- * Streams WorkerInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the WorkerInstance
*
+ * @param string $friendlyName A descriptive string that you create to describe the new Worker. It can be up to 64 characters long.
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return WorkerInstance Created WorkerInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function create(string $friendlyName, array $options = []): WorkerInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($options, $limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'FriendlyName' =>
+ $friendlyName,
+ 'ActivitySid' =>
+ $options['activitySid'],
+ 'Attributes' =>
+ $options['attributes'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new WorkerInstance(
+ $this->version,
+ $payload,
+ $this->solution['workspaceSid']
+ );
}
+
/**
* Reads WorkerInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -85,42 +106,80 @@ public function stream($options = array(), $limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return WorkerInstance[] Array of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
+ /**
+ * Streams WorkerInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of WorkerInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of WorkerInstance
+ * @return WorkerPage Page of WorkerInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): WorkerPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'ActivityName' => $options['activityName'],
- 'ActivitySid' => $options['activitySid'],
- 'Available' => $options['available'],
- 'FriendlyName' => $options['friendlyName'],
- 'TargetWorkersExpression' => $options['targetWorkersExpression'],
- 'TaskQueueName' => $options['taskQueueName'],
- 'TaskQueueSid' => $options['taskQueueSid'],
+
+ $params = Values::of([
+ 'ActivityName' =>
+ $options['activityName'],
+ 'ActivitySid' =>
+ $options['activitySid'],
+ 'Available' =>
+ $options['available'],
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'TargetWorkersExpression' =>
+ $options['targetWorkersExpression'],
+ 'TaskQueueName' =>
+ $options['taskQueueName'],
+ 'TaskQueueSid' =>
+ $options['taskQueueSid'],
+ 'Ordering' =>
+ $options['ordering'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new WorkerPage($this->version, $response, $this->solution);
}
@@ -130,9 +189,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of WorkerInstance
+ * @return WorkerPage Page of WorkerInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): WorkerPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -142,57 +201,38 @@ public function getPage($targetUrl)
return new WorkerPage($this->version, $response, $this->solution);
}
+
/**
- * Create a new WorkerInstance
+ * Constructs a WorkerContext
*
- * @param string $friendlyName A string to describe the resource
- * @param array|Options $options Optional Arguments
- * @return WorkerInstance Newly created WorkerInstance
- * @throws TwilioException When an HTTP error occurs.
+ * @param string $sid The SID of the Worker resource to delete.
*/
- public function create($friendlyName, $options = array())
+ public function getContext(
+ string $sid
+
+ ): WorkerContext
{
- $options = new Values($options);
-
- $data = Values::of(array(
- 'FriendlyName' => $friendlyName,
- 'ActivitySid' => $options['activitySid'],
- 'Attributes' => $options['attributes'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ return new WorkerContext(
+ $this->version,
+ $this->solution['workspaceSid'],
+ $sid
);
-
- return new WorkerInstance($this->version, $payload, $this->solution['workspaceSid']);
}
/**
* Access the statistics
*/
- protected function getStatistics()
+ protected function getStatistics(): WorkersStatisticsList
{
if (!$this->_statistics) {
- $this->_statistics = new WorkersStatisticsList($this->version, $this->solution['workspaceSid']);
+ $this->_statistics = new WorkersStatisticsList(
+ $this->version,
+ $this->solution['workspaceSid']
+ );
}
-
return $this->_statistics;
}
- /**
- * Constructs a WorkerContext
- *
- * @param string $sid The SID of the resource to fetch
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\WorkerContext
- */
- public function getContext($sid)
- {
- return new WorkerContext($this->version, $this->solution['workspaceSid'], $sid);
- }
-
/**
* Magic getter to lazy load subresources
*
@@ -200,7 +240,7 @@ public function getContext($sid)
* @return \Twilio\ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -215,10 +255,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -233,8 +273,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.WorkerList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkerOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkerOptions.php
index c42444d..0c894dc 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkerOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkerOptions.php
@@ -1,10 +1,16 @@
options['activitySid'] = $activitySid;
+ $this->options['attributes'] = $attributes;
+ }
+
+ /**
+ * The SID of a valid Activity that will describe the new Worker's initial state. See [Activities](https://www.twilio.com/docs/taskrouter/api/activity) for more information. If not provided, the new Worker's initial state is the `default_activity_sid` configured on the Workspace.
+ *
+ * @param string $activitySid The SID of a valid Activity that will describe the new Worker's initial state. See [Activities](https://www.twilio.com/docs/taskrouter/api/activity) for more information. If not provided, the new Worker's initial state is the `default_activity_sid` configured on the Workspace.
+ * @return $this Fluent Builder
+ */
+ public function setActivitySid(string $activitySid): self
+ {
+ $this->options['activitySid'] = $activitySid;
+ return $this;
+ }
+
+ /**
+ * A valid JSON string that describes the new Worker. For example: `{ \\\"email\\\": \\\"Bob@example.com\\\", \\\"phone\\\": \\\"+5095551234\\\" }`. This data is passed to the `assignment_callback_url` when TaskRouter assigns a Task to the Worker. Defaults to {}.
+ *
+ * @param string $attributes A valid JSON string that describes the new Worker. For example: `{ \\\"email\\\": \\\"Bob@example.com\\\", \\\"phone\\\": \\\"+5095551234\\\" }`. This data is passed to the `assignment_callback_url` when TaskRouter assigns a Task to the Worker. Defaults to {}.
+ * @return $this Fluent Builder
+ */
+ public function setAttributes(string $attributes): self
+ {
+ $this->options['attributes'] = $attributes;
+ return $this;
+ }
+
+ /**
+ * Provide a friendly representation
+ *
+ * @return string Machine friendly representation
+ */
+ public function __toString(): string
+ {
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.CreateWorkerOptions ' . $options . ']';
+ }
+}
+
+class DeleteWorkerOptions extends Options
+ {
+ /**
+ * @param string $ifMatch The If-Match HTTP request header
+ */
+ public function __construct(
+
+ string $ifMatch = Values::NONE
+
+ ) {
+ $this->options['ifMatch'] = $ifMatch;
+ }
+
+ /**
+ * The If-Match HTTP request header
+ *
+ * @param string $ifMatch The If-Match HTTP request header
+ * @return $this Fluent Builder
+ */
+ public function setIfMatch(string $ifMatch): self
+ {
+ $this->options['ifMatch'] = $ifMatch;
+ return $this;
+ }
+
/**
- * @param string $activityName The activity_name of the Worker resources to read
- * @param string $activitySid The activity_sid of the Worker resources to read
- * @param string $available Whether to return Worker resources that are
- * available or unavailable
- * @param string $friendlyName The friendly_name of the Worker resources to read
- * @param string $targetWorkersExpression Filter by Workers that would match an
- * expression on a TaskQueue
- * @param string $taskQueueName The friendly_name of the TaskQueue that the
- * Workers to read are eligible for
- * @param string $taskQueueSid The SID of the TaskQueue that the Workers to
- * read are eligible for
+ * Provide a friendly representation
+ *
+ * @return string Machine friendly representation
*/
- public function __construct($activityName = Values::NONE, $activitySid = Values::NONE, $available = Values::NONE, $friendlyName = Values::NONE, $targetWorkersExpression = Values::NONE, $taskQueueName = Values::NONE, $taskQueueSid = Values::NONE)
+ public function __toString(): string
+ {
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.DeleteWorkerOptions ' . $options . ']';
+ }
+}
+
+
+class ReadWorkerOptions extends Options
{
+ /**
+ * @param string $activityName The `activity_name` of the Worker resources to read.
+ * @param string $activitySid The `activity_sid` of the Worker resources to read.
+ * @param string $available Whether to return only Worker resources that are available or unavailable. Can be `true`, `1`, or `yes` to return Worker resources that are available, and `false`, or any value returns the Worker resources that are not available.
+ * @param string $friendlyName The `friendly_name` of the Worker resources to read.
+ * @param string $targetWorkersExpression Filter by Workers that would match an expression. In addition to fields in the workers' attributes, the expression can include the following worker fields: `sid`, `friendly_name`, `activity_sid`, or `activity_name`
+ * @param string $taskQueueName The `friendly_name` of the TaskQueue that the Workers to read are eligible for.
+ * @param string $taskQueueSid The SID of the TaskQueue that the Workers to read are eligible for.
+ * @param string $ordering Sorting parameter for Workers
+ */
+ public function __construct(
+
+ string $activityName = Values::NONE,
+ string $activitySid = Values::NONE,
+ string $available = Values::NONE,
+ string $friendlyName = Values::NONE,
+ string $targetWorkersExpression = Values::NONE,
+ string $taskQueueName = Values::NONE,
+ string $taskQueueSid = Values::NONE,
+ string $ordering = Values::NONE
+
+ ) {
$this->options['activityName'] = $activityName;
$this->options['activitySid'] = $activitySid;
$this->options['available'] = $available;
@@ -82,15 +240,16 @@ public function __construct($activityName = Values::NONE, $activitySid = Values:
$this->options['targetWorkersExpression'] = $targetWorkersExpression;
$this->options['taskQueueName'] = $taskQueueName;
$this->options['taskQueueSid'] = $taskQueueSid;
+ $this->options['ordering'] = $ordering;
}
/**
* The `activity_name` of the Worker resources to read.
*
- * @param string $activityName The activity_name of the Worker resources to read
+ * @param string $activityName The `activity_name` of the Worker resources to read.
* @return $this Fluent Builder
*/
- public function setActivityName($activityName)
+ public function setActivityName(string $activityName): self
{
$this->options['activityName'] = $activityName;
return $this;
@@ -99,10 +258,10 @@ public function setActivityName($activityName)
/**
* The `activity_sid` of the Worker resources to read.
*
- * @param string $activitySid The activity_sid of the Worker resources to read
+ * @param string $activitySid The `activity_sid` of the Worker resources to read.
* @return $this Fluent Builder
*/
- public function setActivitySid($activitySid)
+ public function setActivitySid(string $activitySid): self
{
$this->options['activitySid'] = $activitySid;
return $this;
@@ -111,11 +270,10 @@ public function setActivitySid($activitySid)
/**
* Whether to return only Worker resources that are available or unavailable. Can be `true`, `1`, or `yes` to return Worker resources that are available, and `false`, or any value returns the Worker resources that are not available.
*
- * @param string $available Whether to return Worker resources that are
- * available or unavailable
+ * @param string $available Whether to return only Worker resources that are available or unavailable. Can be `true`, `1`, or `yes` to return Worker resources that are available, and `false`, or any value returns the Worker resources that are not available.
* @return $this Fluent Builder
*/
- public function setAvailable($available)
+ public function setAvailable(string $available): self
{
$this->options['available'] = $available;
return $this;
@@ -124,23 +282,22 @@ public function setAvailable($available)
/**
* The `friendly_name` of the Worker resources to read.
*
- * @param string $friendlyName The friendly_name of the Worker resources to read
+ * @param string $friendlyName The `friendly_name` of the Worker resources to read.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
}
/**
- * Filter by Workers that would match an expression on a TaskQueue. This is helpful for debugging which Workers would match a potential queue.
+ * Filter by Workers that would match an expression. In addition to fields in the workers' attributes, the expression can include the following worker fields: `sid`, `friendly_name`, `activity_sid`, or `activity_name`
*
- * @param string $targetWorkersExpression Filter by Workers that would match an
- * expression on a TaskQueue
+ * @param string $targetWorkersExpression Filter by Workers that would match an expression. In addition to fields in the workers' attributes, the expression can include the following worker fields: `sid`, `friendly_name`, `activity_sid`, or `activity_name`
* @return $this Fluent Builder
*/
- public function setTargetWorkersExpression($targetWorkersExpression)
+ public function setTargetWorkersExpression(string $targetWorkersExpression): self
{
$this->options['targetWorkersExpression'] = $targetWorkersExpression;
return $this;
@@ -149,11 +306,10 @@ public function setTargetWorkersExpression($targetWorkersExpression)
/**
* The `friendly_name` of the TaskQueue that the Workers to read are eligible for.
*
- * @param string $taskQueueName The friendly_name of the TaskQueue that the
- * Workers to read are eligible for
+ * @param string $taskQueueName The `friendly_name` of the TaskQueue that the Workers to read are eligible for.
* @return $this Fluent Builder
*/
- public function setTaskQueueName($taskQueueName)
+ public function setTaskQueueName(string $taskQueueName): self
{
$this->options['taskQueueName'] = $taskQueueName;
return $this;
@@ -162,68 +318,24 @@ public function setTaskQueueName($taskQueueName)
/**
* The SID of the TaskQueue that the Workers to read are eligible for.
*
- * @param string $taskQueueSid The SID of the TaskQueue that the Workers to
- * read are eligible for
+ * @param string $taskQueueSid The SID of the TaskQueue that the Workers to read are eligible for.
* @return $this Fluent Builder
*/
- public function setTaskQueueSid($taskQueueSid)
+ public function setTaskQueueSid(string $taskQueueSid): self
{
$this->options['taskQueueSid'] = $taskQueueSid;
return $this;
}
/**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Taskrouter.V1.ReadWorkerOptions ' . \implode(' ', $options) . ']';
- }
-}
-
-class CreateWorkerOptions extends Options
-{
- /**
- * @param string $activitySid The SID of a valid Activity that describes the
- * new Worker's initial state
- * @param string $attributes A valid JSON string that describes the new Worker
- */
- public function __construct($activitySid = Values::NONE, $attributes = Values::NONE)
- {
- $this->options['activitySid'] = $activitySid;
- $this->options['attributes'] = $attributes;
- }
-
- /**
- * The SID of a valid Activity that will describe the new Worker's initial state. See [Activities](https://www.twilio.com/docs/taskrouter/api/activity) for more information. If not provided, the new Worker's initial state is the `default_activity_sid` configured on the Workspace.
- *
- * @param string $activitySid The SID of a valid Activity that describes the
- * new Worker's initial state
- * @return $this Fluent Builder
- */
- public function setActivitySid($activitySid)
- {
- $this->options['activitySid'] = $activitySid;
- return $this;
- }
-
- /**
- * A valid JSON string that describes the new Worker. For example: `{ "email": "Bob@example.com", "phone": "+5095551234" }`. This data is passed to the `assignment_callback_url` when TaskRouter assigns a Task to the Worker. Defaults to {}.
+ * Sorting parameter for Workers
*
- * @param string $attributes A valid JSON string that describes the new Worker
+ * @param string $ordering Sorting parameter for Workers
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setOrdering(string $ordering): self
{
- $this->options['attributes'] = $attributes;
+ $this->options['ordering'] = $ordering;
return $this;
}
@@ -232,55 +344,57 @@ public function setAttributes($attributes)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Taskrouter.V1.CreateWorkerOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.ReadWorkerOptions ' . $options . ']';
}
}
class UpdateWorkerOptions extends Options
-{
+ {
/**
- * @param string $activitySid The SID of the Activity that describes the
- * Worker's initial state
- * @param string $attributes The JSON string that describes the Worker
- * @param string $friendlyName A string to describe the Worker
- * @param bool $rejectPendingReservations Whether to reject pending reservations
+ * @param string $activitySid The SID of a valid Activity that will describe the Worker's initial state. See [Activities](https://www.twilio.com/docs/taskrouter/api/activity) for more information.
+ * @param string $attributes The JSON string that describes the Worker. For example: `{ \\\"email\\\": \\\"Bob@example.com\\\", \\\"phone\\\": \\\"+5095551234\\\" }`. This data is passed to the `assignment_callback_url` when TaskRouter assigns a Task to the Worker. Defaults to {}.
+ * @param string $friendlyName A descriptive string that you create to describe the Worker. It can be up to 64 characters long.
+ * @param bool $rejectPendingReservations Whether to reject the Worker's pending reservations. This option is only valid if the Worker's new [Activity](https://www.twilio.com/docs/taskrouter/api/activity) resource has its `availability` property set to `False`.
+ * @param string $ifMatch The If-Match HTTP request header
*/
- public function __construct($activitySid = Values::NONE, $attributes = Values::NONE, $friendlyName = Values::NONE, $rejectPendingReservations = Values::NONE)
- {
+ public function __construct(
+
+ string $activitySid = Values::NONE,
+ string $attributes = Values::NONE,
+ string $friendlyName = Values::NONE,
+ bool $rejectPendingReservations = Values::BOOL_NONE,
+ string $ifMatch = Values::NONE
+
+ ) {
$this->options['activitySid'] = $activitySid;
$this->options['attributes'] = $attributes;
$this->options['friendlyName'] = $friendlyName;
$this->options['rejectPendingReservations'] = $rejectPendingReservations;
+ $this->options['ifMatch'] = $ifMatch;
}
/**
* The SID of a valid Activity that will describe the Worker's initial state. See [Activities](https://www.twilio.com/docs/taskrouter/api/activity) for more information.
*
- * @param string $activitySid The SID of the Activity that describes the
- * Worker's initial state
+ * @param string $activitySid The SID of a valid Activity that will describe the Worker's initial state. See [Activities](https://www.twilio.com/docs/taskrouter/api/activity) for more information.
* @return $this Fluent Builder
*/
- public function setActivitySid($activitySid)
+ public function setActivitySid(string $activitySid): self
{
$this->options['activitySid'] = $activitySid;
return $this;
}
/**
- * The JSON string that describes the Worker. For example: `{ "email": "Bob@example.com", "phone": "+5095551234" }`. This data is passed to the `assignment_callback_url` when TaskRouter assigns a Task to the Worker. Defaults to {}.
+ * The JSON string that describes the Worker. For example: `{ \\\"email\\\": \\\"Bob@example.com\\\", \\\"phone\\\": \\\"+5095551234\\\" }`. This data is passed to the `assignment_callback_url` when TaskRouter assigns a Task to the Worker. Defaults to {}.
*
- * @param string $attributes The JSON string that describes the Worker
+ * @param string $attributes The JSON string that describes the Worker. For example: `{ \\\"email\\\": \\\"Bob@example.com\\\", \\\"phone\\\": \\\"+5095551234\\\" }`. This data is passed to the `assignment_callback_url` when TaskRouter assigns a Task to the Worker. Defaults to {}.
* @return $this Fluent Builder
*/
- public function setAttributes($attributes)
+ public function setAttributes(string $attributes): self
{
$this->options['attributes'] = $attributes;
return $this;
@@ -289,40 +403,48 @@ public function setAttributes($attributes)
/**
* A descriptive string that you create to describe the Worker. It can be up to 64 characters long.
*
- * @param string $friendlyName A string to describe the Worker
+ * @param string $friendlyName A descriptive string that you create to describe the Worker. It can be up to 64 characters long.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
}
/**
- * Whether to reject pending reservations.
+ * Whether to reject the Worker's pending reservations. This option is only valid if the Worker's new [Activity](https://www.twilio.com/docs/taskrouter/api/activity) resource has its `availability` property set to `False`.
*
- * @param bool $rejectPendingReservations Whether to reject pending reservations
+ * @param bool $rejectPendingReservations Whether to reject the Worker's pending reservations. This option is only valid if the Worker's new [Activity](https://www.twilio.com/docs/taskrouter/api/activity) resource has its `availability` property set to `False`.
* @return $this Fluent Builder
*/
- public function setRejectPendingReservations($rejectPendingReservations)
+ public function setRejectPendingReservations(bool $rejectPendingReservations): self
{
$this->options['rejectPendingReservations'] = $rejectPendingReservations;
return $this;
}
+ /**
+ * The If-Match HTTP request header
+ *
+ * @param string $ifMatch The If-Match HTTP request header
+ * @return $this Fluent Builder
+ */
+ public function setIfMatch(string $ifMatch): self
+ {
+ $this->options['ifMatch'] = $ifMatch;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Taskrouter.V1.UpdateWorkerOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.UpdateWorkerOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkerPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkerPage.php
index 49f6ce7..c7c8359 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkerPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkerPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return WorkerInstance \Twilio\Rest\Taskrouter\V1\Workspace\WorkerInstance
+ */
+ public function buildInstance(array $payload): WorkerInstance
{
return new WorkerInstance($this->version, $payload, $this->solution['workspaceSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.WorkerPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowCumulativeStatisticsContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowCumulativeStatisticsContext.php
index cabb33b..f89d86d 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowCumulativeStatisticsContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowCumulativeStatisticsContext.php
@@ -2,68 +2,85 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace\Workflow;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
class WorkflowCumulativeStatisticsContext extends InstanceContext
-{
+ {
/**
* Initialize the WorkflowCumulativeStatisticsContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace with the resource to
- * fetch
- * @param string $workflowSid Returns the list of Tasks that are being
- * controlled by the Workflow with the specified Sid
- * value
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowCumulativeStatisticsContext
+ * @param Version $version Version that contains the resource
+ * @param string $workspaceSid The SID of the Workspace with the resource to fetch.
+ * @param string $workflowSid Returns the list of Tasks that are being controlled by the Workflow with the specified Sid value.
*/
- public function __construct(Version $version, $workspaceSid, $workflowSid)
- {
+ public function __construct(
+ Version $version,
+ $workspaceSid,
+ $workflowSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid, 'workflowSid' => $workflowSid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+ 'workflowSid' =>
+ $workflowSid,
+ ];
- $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Workflows/' . \rawurlencode($workflowSid) . '/CumulativeStatistics';
+ $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid)
+ .'/Workflows/' . \rawurlencode($workflowSid)
+ .'/CumulativeStatistics';
}
/**
- * Fetch a WorkflowCumulativeStatisticsInstance
+ * Fetch the WorkflowCumulativeStatisticsInstance
*
* @param array|Options $options Optional Arguments
- * @return WorkflowCumulativeStatisticsInstance Fetched
- * WorkflowCumulativeStatisticsInstance
+ * @return WorkflowCumulativeStatisticsInstance Fetched WorkflowCumulativeStatisticsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch($options = array())
+ public function fetch(array $options = []): WorkflowCumulativeStatisticsInstance
{
+
$options = new Values($options);
- $params = Values::of(array(
- 'EndDate' => Serialize::iso8601DateTime($options['endDate']),
- 'Minutes' => $options['minutes'],
- 'StartDate' => Serialize::iso8601DateTime($options['startDate']),
- 'TaskChannel' => $options['taskChannel'],
- 'SplitByWaitTime' => $options['splitByWaitTime'],
- ));
+ $params = Values::of([
+ 'EndDate' =>
+ Serialize::iso8601DateTime($options['endDate']),
+ 'Minutes' =>
+ $options['minutes'],
+ 'StartDate' =>
+ Serialize::iso8601DateTime($options['startDate']),
+ 'TaskChannel' =>
+ $options['taskChannel'],
+ 'SplitByWaitTime' =>
+ $options['splitByWaitTime'],
+ ]);
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, $params, [], $headers);
return new WorkflowCumulativeStatisticsInstance(
$this->version,
@@ -73,17 +90,18 @@ public function fetch($options = array())
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.WorkflowCumulativeStatisticsContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowCumulativeStatisticsInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowCumulativeStatisticsInstance.php
index 21e2d96..8f83739 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowCumulativeStatisticsInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowCumulativeStatisticsInstance.php
@@ -2,64 +2,69 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace\Workflow;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
+ * @property string|null $accountSid
* @property int $avgTaskAcceptanceTime
- * @property \DateTime $startTime
- * @property \DateTime $endTime
+ * @property \DateTime|null $startTime
+ * @property \DateTime|null $endTime
* @property int $reservationsCreated
* @property int $reservationsAccepted
* @property int $reservationsRejected
* @property int $reservationsTimedOut
* @property int $reservationsCanceled
* @property int $reservationsRescinded
- * @property array $splitByWaitTime
- * @property array $waitDurationUntilAccepted
- * @property array $waitDurationUntilCanceled
+ * @property array|null $splitByWaitTime
+ * @property array|null $waitDurationUntilAccepted
+ * @property array|null $waitDurationUntilCanceled
* @property int $tasksCanceled
* @property int $tasksCompleted
* @property int $tasksEntered
* @property int $tasksDeleted
* @property int $tasksMoved
* @property int $tasksTimedOutInWorkflow
- * @property string $workflowSid
- * @property string $workspaceSid
- * @property string $url
+ * @property string|null $workflowSid
+ * @property string|null $workspaceSid
+ * @property string|null $url
*/
class WorkflowCumulativeStatisticsInstance extends InstanceResource
{
/**
* Initialize the WorkflowCumulativeStatisticsInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $workspaceSid The SID of the Workspace that contains the
- * Workflow.
- * @param string $workflowSid Returns the list of Tasks that are being
- * controlled by the Workflow with the specified Sid
- * value
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowCumulativeStatisticsInstance
+ * @param string $workspaceSid The SID of the Workspace with the resource to fetch.
+ * @param string $workflowSid Returns the list of Tasks that are being controlled by the Workflow with the specified Sid value.
*/
- public function __construct(Version $version, array $payload, $workspaceSid, $workflowSid)
+ public function __construct(Version $version, array $payload, string $workspaceSid, string $workflowSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'avgTaskAcceptanceTime' => Values::array_get($payload, 'avg_task_acceptance_time'),
'startTime' => Deserialize::dateTime(Values::array_get($payload, 'start_time')),
@@ -82,19 +87,18 @@ public function __construct(Version $version, array $payload, $workspaceSid, $wo
'workflowSid' => Values::array_get($payload, 'workflow_sid'),
'workspaceSid' => Values::array_get($payload, 'workspace_sid'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('workspaceSid' => $workspaceSid, 'workflowSid' => $workflowSid,);
+ $this->solution = ['workspaceSid' => $workspaceSid, 'workflowSid' => $workflowSid, ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowCumulativeStatisticsContext Context for this
- * WorkflowCumulativeStatisticsInstance
+ * @return WorkflowCumulativeStatisticsContext Context for this WorkflowCumulativeStatisticsInstance
*/
- protected function proxy()
+ protected function proxy(): WorkflowCumulativeStatisticsContext
{
if (!$this->context) {
$this->context = new WorkflowCumulativeStatisticsContext(
@@ -108,15 +112,15 @@ protected function proxy()
}
/**
- * Fetch a WorkflowCumulativeStatisticsInstance
+ * Fetch the WorkflowCumulativeStatisticsInstance
*
* @param array|Options $options Optional Arguments
- * @return WorkflowCumulativeStatisticsInstance Fetched
- * WorkflowCumulativeStatisticsInstance
+ * @return WorkflowCumulativeStatisticsInstance Fetched WorkflowCumulativeStatisticsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch($options = array())
+ public function fetch(array $options = []): WorkflowCumulativeStatisticsInstance
{
+
return $this->proxy()->fetch($options);
}
@@ -127,7 +131,7 @@ public function fetch($options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -146,12 +150,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.WorkflowCumulativeStatisticsInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowCumulativeStatisticsList.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowCumulativeStatisticsList.php
index d3192f7..d247d81 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowCumulativeStatisticsList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowCumulativeStatisticsList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Taskrouter\V1\Workspace\Workflow;
@@ -12,33 +19,40 @@
use Twilio\ListResource;
use Twilio\Version;
+
class WorkflowCumulativeStatisticsList extends ListResource
-{
+ {
/**
* Construct the WorkflowCumulativeStatisticsList
*
* @param Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace that contains the
- * Workflow.
- * @param string $workflowSid Returns the list of Tasks that are being
- * controlled by the Workflow with the specified Sid
- * value
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowCumulativeStatisticsList
+ * @param string $workspaceSid The SID of the Workspace with the resource to fetch.
+ * @param string $workflowSid Returns the list of Tasks that are being controlled by the Workflow with the specified Sid value.
*/
- public function __construct(Version $version, $workspaceSid, $workflowSid)
- {
+ public function __construct(
+ Version $version,
+ string $workspaceSid,
+ string $workflowSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid, 'workflowSid' => $workflowSid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+
+ 'workflowSid' =>
+ $workflowSid,
+
+ ];
}
/**
* Constructs a WorkflowCumulativeStatisticsContext
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowCumulativeStatisticsContext
*/
- public function getContext()
+ public function getContext(
+
+ ): WorkflowCumulativeStatisticsContext
{
return new WorkflowCumulativeStatisticsContext(
$this->version,
@@ -52,8 +66,8 @@ public function getContext()
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.WorkflowCumulativeStatisticsList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowCumulativeStatisticsOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowCumulativeStatisticsOptions.php
index 0378de1..751808b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowCumulativeStatisticsOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowCumulativeStatisticsOptions.php
@@ -1,10 +1,16 @@
options['endDate'] = $endDate;
$this->options['minutes'] = $minutes;
$this->options['startDate'] = $startDate;
@@ -61,11 +77,10 @@ public function __construct($endDate = Values::NONE, $minutes = Values::NONE, $s
/**
* Only include usage that occurred on or before this date, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
*
- * @param \DateTime $endDate Only include usage that occurred on or before this
- * date
+ * @param \DateTime $endDate Only include usage that occurred on or before this date, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
* @return $this Fluent Builder
*/
- public function setEndDate($endDate)
+ public function setEndDate(\DateTime $endDate): self
{
$this->options['endDate'] = $endDate;
return $this;
@@ -74,11 +89,10 @@ public function setEndDate($endDate)
/**
* Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends.
*
- * @param int $minutes Only calculate statistics since this many minutes in the
- * past
+ * @param int $minutes Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends.
* @return $this Fluent Builder
*/
- public function setMinutes($minutes)
+ public function setMinutes(int $minutes): self
{
$this->options['minutes'] = $minutes;
return $this;
@@ -87,11 +101,10 @@ public function setMinutes($minutes)
/**
* Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
*
- * @param \DateTime $startDate Only calculate statistics from on or after this
- * date
+ * @param \DateTime $startDate Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
* @return $this Fluent Builder
*/
- public function setStartDate($startDate)
+ public function setStartDate(\DateTime $startDate): self
{
$this->options['startDate'] = $startDate;
return $this;
@@ -100,25 +113,22 @@ public function setStartDate($startDate)
/**
* Only calculate cumulative statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.
*
- * @param string $taskChannel Only calculate cumulative statistics on this
- * TaskChannel
+ * @param string $taskChannel Only calculate cumulative statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.
* @return $this Fluent Builder
*/
- public function setTaskChannel($taskChannel)
+ public function setTaskChannel(string $taskChannel): self
{
$this->options['taskChannel'] = $taskChannel;
return $this;
}
/**
- * A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. For example, `5,30` would show splits of Tasks that were canceled or accepted before and after 5 seconds and before and after 30 seconds. This can be used to show short abandoned Tasks or Tasks that failed to meet an SLA.
+ * A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. For example, `5,30` would show splits of Tasks that were canceled or accepted before and after 5 seconds and before and after 30 seconds. This can be used to show short abandoned Tasks or Tasks that failed to meet an SLA. TaskRouter will calculate statistics on up to 10,000 Tasks for any given threshold.
*
- * @param string $splitByWaitTime A comma separated list of values that
- * describes the thresholds to calculate
- * statistics on
+ * @param string $splitByWaitTime A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. For example, `5,30` would show splits of Tasks that were canceled or accepted before and after 5 seconds and before and after 30 seconds. This can be used to show short abandoned Tasks or Tasks that failed to meet an SLA. TaskRouter will calculate statistics on up to 10,000 Tasks for any given threshold.
* @return $this Fluent Builder
*/
- public function setSplitByWaitTime($splitByWaitTime)
+ public function setSplitByWaitTime(string $splitByWaitTime): self
{
$this->options['splitByWaitTime'] = $splitByWaitTime;
return $this;
@@ -129,14 +139,10 @@ public function setSplitByWaitTime($splitByWaitTime)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Taskrouter.V1.FetchWorkflowCumulativeStatisticsOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.FetchWorkflowCumulativeStatisticsOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowCumulativeStatisticsPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowCumulativeStatisticsPage.php
index 251524f..039228b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowCumulativeStatisticsPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowCumulativeStatisticsPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return WorkflowCumulativeStatisticsInstance \Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowCumulativeStatisticsInstance
+ */
+ public function buildInstance(array $payload): WorkflowCumulativeStatisticsInstance
{
- return new WorkflowCumulativeStatisticsInstance(
- $this->version,
- $payload,
- $this->solution['workspaceSid'],
- $this->solution['workflowSid']
- );
+ return new WorkflowCumulativeStatisticsInstance($this->version, $payload, $this->solution['workspaceSid'], $this->solution['workflowSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.WorkflowCumulativeStatisticsPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowRealTimeStatisticsContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowRealTimeStatisticsContext.php
index 8fd2ef9..c9185db 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowRealTimeStatisticsContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowRealTimeStatisticsContext.php
@@ -2,61 +2,76 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace\Workflow;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class WorkflowRealTimeStatisticsContext extends InstanceContext
-{
+ {
/**
* Initialize the WorkflowRealTimeStatisticsContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace with the Workflow to
- * fetch
- * @param string $workflowSid Returns the list of Tasks that are being
- * controlled by the Workflow with the specified SID
- * value
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowRealTimeStatisticsContext
+ * @param Version $version Version that contains the resource
+ * @param string $workspaceSid The SID of the Workspace with the Workflow to fetch.
+ * @param string $workflowSid Returns the list of Tasks that are being controlled by the Workflow with the specified SID value.
*/
- public function __construct(Version $version, $workspaceSid, $workflowSid)
- {
+ public function __construct(
+ Version $version,
+ $workspaceSid,
+ $workflowSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid, 'workflowSid' => $workflowSid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+ 'workflowSid' =>
+ $workflowSid,
+ ];
- $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Workflows/' . \rawurlencode($workflowSid) . '/RealTimeStatistics';
+ $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid)
+ .'/Workflows/' . \rawurlencode($workflowSid)
+ .'/RealTimeStatistics';
}
/**
- * Fetch a WorkflowRealTimeStatisticsInstance
+ * Fetch the WorkflowRealTimeStatisticsInstance
*
* @param array|Options $options Optional Arguments
- * @return WorkflowRealTimeStatisticsInstance Fetched
- * WorkflowRealTimeStatisticsInstance
+ * @return WorkflowRealTimeStatisticsInstance Fetched WorkflowRealTimeStatisticsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch($options = array())
+ public function fetch(array $options = []): WorkflowRealTimeStatisticsInstance
{
+
$options = new Values($options);
- $params = Values::of(array('TaskChannel' => $options['taskChannel'],));
+ $params = Values::of([
+ 'TaskChannel' =>
+ $options['taskChannel'],
+ ]);
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, $params, [], $headers);
return new WorkflowRealTimeStatisticsInstance(
$this->version,
@@ -66,17 +81,18 @@ public function fetch($options = array())
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.WorkflowRealTimeStatisticsContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowRealTimeStatisticsInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowRealTimeStatisticsInstance.php
index 4c0d339..69dd1f0 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowRealTimeStatisticsInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowRealTimeStatisticsInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace\Workflow;
use Twilio\Exceptions\TwilioException;
@@ -15,37 +23,34 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * @property string $accountSid
+ * @property string|null $accountSid
* @property int $longestTaskWaitingAge
- * @property string $longestTaskWaitingSid
- * @property array $tasksByPriority
- * @property array $tasksByStatus
+ * @property string|null $longestTaskWaitingSid
+ * @property array|null $tasksByPriority
+ * @property array|null $tasksByStatus
* @property int $totalTasks
- * @property string $workflowSid
- * @property string $workspaceSid
- * @property string $url
+ * @property string|null $workflowSid
+ * @property string|null $workspaceSid
+ * @property string|null $url
*/
class WorkflowRealTimeStatisticsInstance extends InstanceResource
{
/**
* Initialize the WorkflowRealTimeStatisticsInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $workspaceSid The SID of the Workspace that contains the
- * Workflow.
- * @param string $workflowSid Returns the list of Tasks that are being
- * controlled by the Workflow with the specified SID
- * value
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowRealTimeStatisticsInstance
+ * @param string $workspaceSid The SID of the Workspace with the Workflow to fetch.
+ * @param string $workflowSid Returns the list of Tasks that are being controlled by the Workflow with the specified SID value.
*/
- public function __construct(Version $version, array $payload, $workspaceSid, $workflowSid)
+ public function __construct(Version $version, array $payload, string $workspaceSid, string $workflowSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'longestTaskWaitingAge' => Values::array_get($payload, 'longest_task_waiting_age'),
'longestTaskWaitingSid' => Values::array_get($payload, 'longest_task_waiting_sid'),
@@ -55,19 +60,18 @@ public function __construct(Version $version, array $payload, $workspaceSid, $wo
'workflowSid' => Values::array_get($payload, 'workflow_sid'),
'workspaceSid' => Values::array_get($payload, 'workspace_sid'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('workspaceSid' => $workspaceSid, 'workflowSid' => $workflowSid,);
+ $this->solution = ['workspaceSid' => $workspaceSid, 'workflowSid' => $workflowSid, ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowRealTimeStatisticsContext Context for this
- * WorkflowRealTimeStatisticsInstance
+ * @return WorkflowRealTimeStatisticsContext Context for this WorkflowRealTimeStatisticsInstance
*/
- protected function proxy()
+ protected function proxy(): WorkflowRealTimeStatisticsContext
{
if (!$this->context) {
$this->context = new WorkflowRealTimeStatisticsContext(
@@ -81,15 +85,15 @@ protected function proxy()
}
/**
- * Fetch a WorkflowRealTimeStatisticsInstance
+ * Fetch the WorkflowRealTimeStatisticsInstance
*
* @param array|Options $options Optional Arguments
- * @return WorkflowRealTimeStatisticsInstance Fetched
- * WorkflowRealTimeStatisticsInstance
+ * @return WorkflowRealTimeStatisticsInstance Fetched WorkflowRealTimeStatisticsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch($options = array())
+ public function fetch(array $options = []): WorkflowRealTimeStatisticsInstance
{
+
return $this->proxy()->fetch($options);
}
@@ -100,7 +104,7 @@ public function fetch($options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -119,12 +123,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.WorkflowRealTimeStatisticsInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowRealTimeStatisticsList.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowRealTimeStatisticsList.php
index e1081db..fc264b9 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowRealTimeStatisticsList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowRealTimeStatisticsList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Taskrouter\V1\Workspace\Workflow;
@@ -12,33 +19,40 @@
use Twilio\ListResource;
use Twilio\Version;
+
class WorkflowRealTimeStatisticsList extends ListResource
-{
+ {
/**
* Construct the WorkflowRealTimeStatisticsList
*
* @param Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace that contains the
- * Workflow.
- * @param string $workflowSid Returns the list of Tasks that are being
- * controlled by the Workflow with the specified SID
- * value
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowRealTimeStatisticsList
+ * @param string $workspaceSid The SID of the Workspace with the Workflow to fetch.
+ * @param string $workflowSid Returns the list of Tasks that are being controlled by the Workflow with the specified SID value.
*/
- public function __construct(Version $version, $workspaceSid, $workflowSid)
- {
+ public function __construct(
+ Version $version,
+ string $workspaceSid,
+ string $workflowSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid, 'workflowSid' => $workflowSid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+
+ 'workflowSid' =>
+ $workflowSid,
+
+ ];
}
/**
* Constructs a WorkflowRealTimeStatisticsContext
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowRealTimeStatisticsContext
*/
- public function getContext()
+ public function getContext(
+
+ ): WorkflowRealTimeStatisticsContext
{
return new WorkflowRealTimeStatisticsContext(
$this->version,
@@ -52,8 +66,8 @@ public function getContext()
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.WorkflowRealTimeStatisticsList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowRealTimeStatisticsOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowRealTimeStatisticsOptions.php
index 1b33920..ed177b7 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowRealTimeStatisticsOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowRealTimeStatisticsOptions.php
@@ -1,10 +1,16 @@
options['taskChannel'] = $taskChannel;
}
/**
* Only calculate real-time statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.
*
- * @param string $taskChannel Only calculate real-time statistics on this
- * TaskChannel
+ * @param string $taskChannel Only calculate real-time statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.
* @return $this Fluent Builder
*/
- public function setTaskChannel($taskChannel)
+ public function setTaskChannel(string $taskChannel): self
{
$this->options['taskChannel'] = $taskChannel;
return $this;
@@ -54,14 +67,10 @@ public function setTaskChannel($taskChannel)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Taskrouter.V1.FetchWorkflowRealTimeStatisticsOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.FetchWorkflowRealTimeStatisticsOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowRealTimeStatisticsPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowRealTimeStatisticsPage.php
index 58c2a93..04bb01f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowRealTimeStatisticsPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowRealTimeStatisticsPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return WorkflowRealTimeStatisticsInstance \Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowRealTimeStatisticsInstance
+ */
+ public function buildInstance(array $payload): WorkflowRealTimeStatisticsInstance
{
- return new WorkflowRealTimeStatisticsInstance(
- $this->version,
- $payload,
- $this->solution['workspaceSid'],
- $this->solution['workflowSid']
- );
+ return new WorkflowRealTimeStatisticsInstance($this->version, $payload, $this->solution['workspaceSid'], $this->solution['workflowSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.WorkflowRealTimeStatisticsPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowStatisticsContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowStatisticsContext.php
index 6cc464f..c3ae4c8 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowStatisticsContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowStatisticsContext.php
@@ -2,67 +2,85 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace\Workflow;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
class WorkflowStatisticsContext extends InstanceContext
-{
+ {
/**
* Initialize the WorkflowStatisticsContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace with the Workflow to
- * fetch
- * @param string $workflowSid Returns the list of Tasks that are being
- * controlled by the Workflow with the specified SID
- * value
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowStatisticsContext
+ * @param Version $version Version that contains the resource
+ * @param string $workspaceSid The SID of the Workspace with the Workflow to fetch.
+ * @param string $workflowSid Returns the list of Tasks that are being controlled by the Workflow with the specified SID value.
*/
- public function __construct(Version $version, $workspaceSid, $workflowSid)
- {
+ public function __construct(
+ Version $version,
+ $workspaceSid,
+ $workflowSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid, 'workflowSid' => $workflowSid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+ 'workflowSid' =>
+ $workflowSid,
+ ];
- $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Workflows/' . \rawurlencode($workflowSid) . '/Statistics';
+ $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid)
+ .'/Workflows/' . \rawurlencode($workflowSid)
+ .'/Statistics';
}
/**
- * Fetch a WorkflowStatisticsInstance
+ * Fetch the WorkflowStatisticsInstance
*
* @param array|Options $options Optional Arguments
* @return WorkflowStatisticsInstance Fetched WorkflowStatisticsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch($options = array())
+ public function fetch(array $options = []): WorkflowStatisticsInstance
{
+
$options = new Values($options);
- $params = Values::of(array(
- 'Minutes' => $options['minutes'],
- 'StartDate' => Serialize::iso8601DateTime($options['startDate']),
- 'EndDate' => Serialize::iso8601DateTime($options['endDate']),
- 'TaskChannel' => $options['taskChannel'],
- 'SplitByWaitTime' => $options['splitByWaitTime'],
- ));
+ $params = Values::of([
+ 'Minutes' =>
+ $options['minutes'],
+ 'StartDate' =>
+ Serialize::iso8601DateTime($options['startDate']),
+ 'EndDate' =>
+ Serialize::iso8601DateTime($options['endDate']),
+ 'TaskChannel' =>
+ $options['taskChannel'],
+ 'SplitByWaitTime' =>
+ $options['splitByWaitTime'],
+ ]);
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, $params, [], $headers);
return new WorkflowStatisticsInstance(
$this->version,
@@ -72,17 +90,18 @@ public function fetch($options = array())
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.WorkflowStatisticsContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowStatisticsInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowStatisticsInstance.php
index 9ece404..aee5159 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowStatisticsInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowStatisticsInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace\Workflow;
use Twilio\Exceptions\TwilioException;
@@ -15,53 +23,49 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * @property string $accountSid
- * @property array $cumulative
- * @property array $realtime
- * @property string $workflowSid
- * @property string $workspaceSid
- * @property string $url
+ * @property string|null $accountSid
+ * @property array|null $cumulative
+ * @property array|null $realtime
+ * @property string|null $workflowSid
+ * @property string|null $workspaceSid
+ * @property string|null $url
*/
class WorkflowStatisticsInstance extends InstanceResource
{
/**
* Initialize the WorkflowStatisticsInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $workspaceSid The SID of the Workspace that contains the
- * Workflow
- * @param string $workflowSid Returns the list of Tasks that are being
- * controlled by the Workflow with the specified SID
- * value
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowStatisticsInstance
+ * @param string $workspaceSid The SID of the Workspace with the Workflow to fetch.
+ * @param string $workflowSid Returns the list of Tasks that are being controlled by the Workflow with the specified SID value.
*/
- public function __construct(Version $version, array $payload, $workspaceSid, $workflowSid)
+ public function __construct(Version $version, array $payload, string $workspaceSid, string $workflowSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'cumulative' => Values::array_get($payload, 'cumulative'),
'realtime' => Values::array_get($payload, 'realtime'),
'workflowSid' => Values::array_get($payload, 'workflow_sid'),
'workspaceSid' => Values::array_get($payload, 'workspace_sid'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('workspaceSid' => $workspaceSid, 'workflowSid' => $workflowSid,);
+ $this->solution = ['workspaceSid' => $workspaceSid, 'workflowSid' => $workflowSid, ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowStatisticsContext Context for this
- * WorkflowStatisticsInstance
+ * @return WorkflowStatisticsContext Context for this WorkflowStatisticsInstance
*/
- protected function proxy()
+ protected function proxy(): WorkflowStatisticsContext
{
if (!$this->context) {
$this->context = new WorkflowStatisticsContext(
@@ -75,14 +79,15 @@ protected function proxy()
}
/**
- * Fetch a WorkflowStatisticsInstance
+ * Fetch the WorkflowStatisticsInstance
*
* @param array|Options $options Optional Arguments
* @return WorkflowStatisticsInstance Fetched WorkflowStatisticsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch($options = array())
+ public function fetch(array $options = []): WorkflowStatisticsInstance
{
+
return $this->proxy()->fetch($options);
}
@@ -93,7 +98,7 @@ public function fetch($options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -112,12 +117,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.WorkflowStatisticsInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowStatisticsList.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowStatisticsList.php
index a633019..0b16df9 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowStatisticsList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowStatisticsList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Taskrouter\V1\Workspace\Workflow;
@@ -12,33 +19,40 @@
use Twilio\ListResource;
use Twilio\Version;
+
class WorkflowStatisticsList extends ListResource
-{
+ {
/**
* Construct the WorkflowStatisticsList
*
* @param Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace that contains the
- * Workflow
- * @param string $workflowSid Returns the list of Tasks that are being
- * controlled by the Workflow with the specified SID
- * value
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowStatisticsList
+ * @param string $workspaceSid The SID of the Workspace with the Workflow to fetch.
+ * @param string $workflowSid Returns the list of Tasks that are being controlled by the Workflow with the specified SID value.
*/
- public function __construct(Version $version, $workspaceSid, $workflowSid)
- {
+ public function __construct(
+ Version $version,
+ string $workspaceSid,
+ string $workflowSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid, 'workflowSid' => $workflowSid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+
+ 'workflowSid' =>
+ $workflowSid,
+
+ ];
}
/**
* Constructs a WorkflowStatisticsContext
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowStatisticsContext
*/
- public function getContext()
+ public function getContext(
+
+ ): WorkflowStatisticsContext
{
return new WorkflowStatisticsContext(
$this->version,
@@ -52,8 +66,8 @@ public function getContext()
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.WorkflowStatisticsList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowStatisticsOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowStatisticsOptions.php
index 0df32d3..d009b59 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowStatisticsOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowStatisticsOptions.php
@@ -1,10 +1,16 @@
options['minutes'] = $minutes;
$this->options['startDate'] = $startDate;
$this->options['endDate'] = $endDate;
@@ -61,11 +77,10 @@ public function __construct($minutes = Values::NONE, $startDate = Values::NONE,
/**
* Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends.
*
- * @param int $minutes Only calculate statistics since this many minutes in the
- * past
+ * @param int $minutes Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends.
* @return $this Fluent Builder
*/
- public function setMinutes($minutes)
+ public function setMinutes(int $minutes): self
{
$this->options['minutes'] = $minutes;
return $this;
@@ -74,11 +89,10 @@ public function setMinutes($minutes)
/**
* Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
*
- * @param \DateTime $startDate Only calculate statistics from on or after this
- * date
+ * @param \DateTime $startDate Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
* @return $this Fluent Builder
*/
- public function setStartDate($startDate)
+ public function setStartDate(\DateTime $startDate): self
{
$this->options['startDate'] = $startDate;
return $this;
@@ -87,11 +101,10 @@ public function setStartDate($startDate)
/**
* Only calculate statistics from this date and time and earlier, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
*
- * @param \DateTime $endDate Only calculate statistics from this date and time
- * and earlier
+ * @param \DateTime $endDate Only calculate statistics from this date and time and earlier, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
* @return $this Fluent Builder
*/
- public function setEndDate($endDate)
+ public function setEndDate(\DateTime $endDate): self
{
$this->options['endDate'] = $endDate;
return $this;
@@ -100,11 +113,10 @@ public function setEndDate($endDate)
/**
* Only calculate real-time statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.
*
- * @param string $taskChannel Only calculate real-time statistics on this
- * TaskChannel.
+ * @param string $taskChannel Only calculate real-time statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.
* @return $this Fluent Builder
*/
- public function setTaskChannel($taskChannel)
+ public function setTaskChannel(string $taskChannel): self
{
$this->options['taskChannel'] = $taskChannel;
return $this;
@@ -113,12 +125,10 @@ public function setTaskChannel($taskChannel)
/**
* A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. For example, `5,30` would show splits of Tasks that were canceled or accepted before and after 5 seconds and before and after 30 seconds. This can be used to show short abandoned Tasks or Tasks that failed to meet an SLA.
*
- * @param string $splitByWaitTime A comma separated list of values that
- * describes the thresholds to calculate
- * statistics on
+ * @param string $splitByWaitTime A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. For example, `5,30` would show splits of Tasks that were canceled or accepted before and after 5 seconds and before and after 30 seconds. This can be used to show short abandoned Tasks or Tasks that failed to meet an SLA.
* @return $this Fluent Builder
*/
- public function setSplitByWaitTime($splitByWaitTime)
+ public function setSplitByWaitTime(string $splitByWaitTime): self
{
$this->options['splitByWaitTime'] = $splitByWaitTime;
return $this;
@@ -129,14 +139,10 @@ public function setSplitByWaitTime($splitByWaitTime)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Taskrouter.V1.FetchWorkflowStatisticsOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.FetchWorkflowStatisticsOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowStatisticsPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowStatisticsPage.php
index 6ca5753..9bd5669 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowStatisticsPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowStatisticsPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return WorkflowStatisticsInstance \Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowStatisticsInstance
+ */
+ public function buildInstance(array $payload): WorkflowStatisticsInstance
{
- return new WorkflowStatisticsInstance(
- $this->version,
- $payload,
- $this->solution['workspaceSid'],
- $this->solution['workflowSid']
- );
+ return new WorkflowStatisticsInstance($this->version, $payload, $this->solution['workspaceSid'], $this->solution['workflowSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.WorkflowStatisticsPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkflowContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkflowContext.php
index d56ec0c..ff6c8a6 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkflowContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkflowContext.php
@@ -2,70 +2,98 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowCumulativeStatisticsList;
-use Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowRealTimeStatisticsList;
-use Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowStatisticsList;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowStatisticsList;
+use Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowCumulativeStatisticsList;
+use Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowRealTimeStatisticsList;
+
/**
- * @property \Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowStatisticsList $statistics
- * @property \Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowRealTimeStatisticsList $realTimeStatistics
- * @property \Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowCumulativeStatisticsList $cumulativeStatistics
+ * @property WorkflowStatisticsList $statistics
+ * @property WorkflowCumulativeStatisticsList $cumulativeStatistics
+ * @property WorkflowRealTimeStatisticsList $realTimeStatistics
* @method \Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowStatisticsContext statistics()
- * @method \Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowRealTimeStatisticsContext realTimeStatistics()
* @method \Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowCumulativeStatisticsContext cumulativeStatistics()
+ * @method \Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowRealTimeStatisticsContext realTimeStatistics()
*/
class WorkflowContext extends InstanceContext
-{
- protected $_statistics = null;
- protected $_realTimeStatistics = null;
- protected $_cumulativeStatistics = null;
+ {
+ protected $_statistics;
+ protected $_cumulativeStatistics;
+ protected $_realTimeStatistics;
/**
* Initialize the WorkflowContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace with the Workflow to
- * fetch
- * @param string $sid The SID of the resource
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\WorkflowContext
+ * @param Version $version Version that contains the resource
+ * @param string $workspaceSid The SID of the Workspace that the new Workflow to create belongs to.
+ * @param string $sid The SID of the Workflow resource to delete.
*/
- public function __construct(Version $version, $workspaceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $workspaceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid, 'sid' => $sid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid)
+ .'/Workflows/' . \rawurlencode($sid)
+ .'';
+ }
- $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Workflows/' . \rawurlencode($sid) . '';
+ /**
+ * Delete the WorkflowInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a WorkflowInstance
+ * Fetch the WorkflowInstance
*
* @return WorkflowInstance Fetched WorkflowInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): WorkflowInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new WorkflowInstance(
$this->version,
@@ -75,6 +103,7 @@ public function fetch()
);
}
+
/**
* Update the WorkflowInstance
*
@@ -82,25 +111,28 @@ public function fetch()
* @return WorkflowInstance Updated WorkflowInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): WorkflowInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'AssignmentCallbackUrl' => $options['assignmentCallbackUrl'],
- 'FallbackAssignmentCallbackUrl' => $options['fallbackAssignmentCallbackUrl'],
- 'Configuration' => $options['configuration'],
- 'TaskReservationTimeout' => $options['taskReservationTimeout'],
- 'ReEvaluateTasks' => $options['reEvaluateTasks'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'AssignmentCallbackUrl' =>
+ $options['assignmentCallbackUrl'],
+ 'FallbackAssignmentCallbackUrl' =>
+ $options['fallbackAssignmentCallbackUrl'],
+ 'Configuration' =>
+ $options['configuration'],
+ 'TaskReservationTimeout' =>
+ $options['taskReservationTimeout'],
+ 'ReEvaluateTasks' =>
+ $options['reEvaluateTasks'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new WorkflowInstance(
$this->version,
@@ -110,23 +142,11 @@ public function update($options = array())
);
}
- /**
- * Deletes the WorkflowInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Access the statistics
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowStatisticsList
*/
- protected function getStatistics()
+ protected function getStatistics(): WorkflowStatisticsList
{
if (!$this->_statistics) {
$this->_statistics = new WorkflowStatisticsList(
@@ -140,49 +160,45 @@ protected function getStatistics()
}
/**
- * Access the realTimeStatistics
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowRealTimeStatisticsList
+ * Access the cumulativeStatistics
*/
- protected function getRealTimeStatistics()
+ protected function getCumulativeStatistics(): WorkflowCumulativeStatisticsList
{
- if (!$this->_realTimeStatistics) {
- $this->_realTimeStatistics = new WorkflowRealTimeStatisticsList(
+ if (!$this->_cumulativeStatistics) {
+ $this->_cumulativeStatistics = new WorkflowCumulativeStatisticsList(
$this->version,
$this->solution['workspaceSid'],
$this->solution['sid']
);
}
- return $this->_realTimeStatistics;
+ return $this->_cumulativeStatistics;
}
/**
- * Access the cumulativeStatistics
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowCumulativeStatisticsList
+ * Access the realTimeStatistics
*/
- protected function getCumulativeStatistics()
+ protected function getRealTimeStatistics(): WorkflowRealTimeStatisticsList
{
- if (!$this->_cumulativeStatistics) {
- $this->_cumulativeStatistics = new WorkflowCumulativeStatisticsList(
+ if (!$this->_realTimeStatistics) {
+ $this->_realTimeStatistics = new WorkflowRealTimeStatisticsList(
$this->version,
$this->solution['workspaceSid'],
$this->solution['sid']
);
}
- return $this->_cumulativeStatistics;
+ return $this->_realTimeStatistics;
}
/**
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -197,10 +213,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -215,12 +231,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.WorkflowContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkflowInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkflowInstance.php
index e36bcd7..f165e0f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkflowInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkflowInstance.php
@@ -2,57 +2,67 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowStatisticsList;
+use Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowCumulativeStatisticsList;
+use Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowRealTimeStatisticsList;
+
/**
- * @property string $accountSid
- * @property string $assignmentCallbackUrl
- * @property string $configuration
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $documentContentType
- * @property string $fallbackAssignmentCallbackUrl
- * @property string $friendlyName
- * @property string $sid
+ * @property string|null $accountSid
+ * @property string|null $assignmentCallbackUrl
+ * @property string|null $configuration
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $documentContentType
+ * @property string|null $fallbackAssignmentCallbackUrl
+ * @property string|null $friendlyName
+ * @property string|null $sid
* @property int $taskReservationTimeout
- * @property string $workspaceSid
- * @property string $url
- * @property array $links
+ * @property string|null $workspaceSid
+ * @property string|null $url
+ * @property array|null $links
*/
class WorkflowInstance extends InstanceResource
{
- protected $_statistics = null;
- protected $_realTimeStatistics = null;
- protected $_cumulativeStatistics = null;
+ protected $_statistics;
+ protected $_cumulativeStatistics;
+ protected $_realTimeStatistics;
/**
* Initialize the WorkflowInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $workspaceSid The SID of the Workspace that contains the
- * Workflow
- * @param string $sid The SID of the resource
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\WorkflowInstance
+ * @param string $workspaceSid The SID of the Workspace that the new Workflow to create belongs to.
+ * @param string $sid The SID of the Workflow resource to delete.
*/
- public function __construct(Version $version, array $payload, $workspaceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $workspaceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'assignmentCallbackUrl' => Values::array_get($payload, 'assignment_callback_url'),
'configuration' => Values::array_get($payload, 'configuration'),
@@ -66,20 +76,18 @@ public function __construct(Version $version, array $payload, $workspaceSid, $si
'workspaceSid' => Values::array_get($payload, 'workspace_sid'),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('workspaceSid' => $workspaceSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['workspaceSid' => $workspaceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\WorkflowContext Context for
- * this
- * WorkflowInstance
+ * @return WorkflowContext Context for this WorkflowInstance
*/
- protected function proxy()
+ protected function proxy(): WorkflowContext
{
if (!$this->context) {
$this->context = new WorkflowContext(
@@ -93,67 +101,64 @@ protected function proxy()
}
/**
- * Fetch a WorkflowInstance
+ * Delete the WorkflowInstance
*
- * @return WorkflowInstance Fetched WorkflowInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Update the WorkflowInstance
+ * Fetch the WorkflowInstance
*
- * @param array|Options $options Optional Arguments
- * @return WorkflowInstance Updated WorkflowInstance
+ * @return WorkflowInstance Fetched WorkflowInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): WorkflowInstance
{
- return $this->proxy()->update($options);
+
+ return $this->proxy()->fetch();
}
/**
- * Deletes the WorkflowInstance
+ * Update the WorkflowInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return WorkflowInstance Updated WorkflowInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): WorkflowInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->update($options);
}
/**
* Access the statistics
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowStatisticsList
*/
- protected function getStatistics()
+ protected function getStatistics(): WorkflowStatisticsList
{
return $this->proxy()->statistics;
}
/**
- * Access the realTimeStatistics
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowRealTimeStatisticsList
+ * Access the cumulativeStatistics
*/
- protected function getRealTimeStatistics()
+ protected function getCumulativeStatistics(): WorkflowCumulativeStatisticsList
{
- return $this->proxy()->realTimeStatistics;
+ return $this->proxy()->cumulativeStatistics;
}
/**
- * Access the cumulativeStatistics
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\Workflow\WorkflowCumulativeStatisticsList
+ * Access the realTimeStatistics
*/
- protected function getCumulativeStatistics()
+ protected function getRealTimeStatistics(): WorkflowRealTimeStatisticsList
{
- return $this->proxy()->cumulativeStatistics;
+ return $this->proxy()->realTimeStatistics;
}
/**
@@ -163,7 +168,7 @@ protected function getCumulativeStatistics()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -182,12 +187,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.WorkflowInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkflowList.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkflowList.php
index d2858d3..4564489 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkflowList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkflowList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Taskrouter\V1\Workspace;
@@ -12,57 +19,74 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class WorkflowList extends ListResource
-{
+ {
/**
* Construct the WorkflowList
*
* @param Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace that contains the
- * Workflow
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\WorkflowList
+ * @param string $workspaceSid The SID of the Workspace that the new Workflow to create belongs to.
*/
- public function __construct(Version $version, $workspaceSid)
- {
+ public function __construct(
+ Version $version,
+ string $workspaceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid,);
-
- $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Workflows';
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+
+ ];
+
+ $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid)
+ .'/Workflows';
}
/**
- * Streams WorkflowInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the WorkflowInstance
*
+ * @param string $friendlyName A descriptive string that you create to describe the Workflow resource. For example, `Inbound Call Workflow` or `2014 Outbound Campaign`.
+ * @param string $configuration A JSON string that contains the rules to apply to the Workflow. See [Configuring Workflows](https://www.twilio.com/docs/taskrouter/workflow-configuration) for more information.
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return WorkflowInstance Created WorkflowInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function create(string $friendlyName, string $configuration, array $options = []): WorkflowInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($options, $limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'FriendlyName' =>
+ $friendlyName,
+ 'Configuration' =>
+ $configuration,
+ 'AssignmentCallbackUrl' =>
+ $options['assignmentCallbackUrl'],
+ 'FallbackAssignmentCallbackUrl' =>
+ $options['fallbackAssignmentCallbackUrl'],
+ 'TaskReservationTimeout' =>
+ $options['taskReservationTimeout'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new WorkflowInstance(
+ $this->version,
+ $payload,
+ $this->solution['workspaceSid']
+ );
}
+
/**
* Reads WorkflowInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -79,36 +103,66 @@ public function stream($options = array(), $limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return WorkflowInstance[] Array of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
+ /**
+ * Streams WorkflowInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of WorkflowInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of WorkflowInstance
+ * @return WorkflowPage Page of WorkflowInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): WorkflowPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
+
+ $params = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new WorkflowPage($this->version, $response, $this->solution);
}
@@ -118,9 +172,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of WorkflowInstance
+ * @return WorkflowPage Page of WorkflowInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): WorkflowPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -130,48 +184,22 @@ public function getPage($targetUrl)
return new WorkflowPage($this->version, $response, $this->solution);
}
- /**
- * Create a new WorkflowInstance
- *
- * @param string $friendlyName descriptive string that you create to describe
- * the Workflow resource
- * @param string $configuration A JSON string that contains the rules to apply
- * to the Workflow
- * @param array|Options $options Optional Arguments
- * @return WorkflowInstance Newly created WorkflowInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($friendlyName, $configuration, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'FriendlyName' => $friendlyName,
- 'Configuration' => $configuration,
- 'AssignmentCallbackUrl' => $options['assignmentCallbackUrl'],
- 'FallbackAssignmentCallbackUrl' => $options['fallbackAssignmentCallbackUrl'],
- 'TaskReservationTimeout' => $options['taskReservationTimeout'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new WorkflowInstance($this->version, $payload, $this->solution['workspaceSid']);
- }
/**
* Constructs a WorkflowContext
*
- * @param string $sid The SID of the resource
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\WorkflowContext
+ * @param string $sid The SID of the Workflow resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): WorkflowContext
{
- return new WorkflowContext($this->version, $this->solution['workspaceSid'], $sid);
+ return new WorkflowContext(
+ $this->version,
+ $this->solution['workspaceSid'],
+ $sid
+ );
}
/**
@@ -179,8 +207,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.WorkflowList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkflowOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkflowOptions.php
index 646dd50..9efc40e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkflowOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkflowOptions.php
@@ -1,10 +1,16 @@
options['friendlyName'] = $friendlyName;
+ public function __construct(
+
+ string $assignmentCallbackUrl = Values::NONE,
+ string $fallbackAssignmentCallbackUrl = Values::NONE,
+ int $taskReservationTimeout = Values::INT_NONE
+
+ ) {
$this->options['assignmentCallbackUrl'] = $assignmentCallbackUrl;
$this->options['fallbackAssignmentCallbackUrl'] = $fallbackAssignmentCallbackUrl;
- $this->options['configuration'] = $configuration;
$this->options['taskReservationTimeout'] = $taskReservationTimeout;
- $this->options['reEvaluateTasks'] = $reEvaluateTasks;
- }
-
- /**
- * A descriptive string that you create to describe the Workflow resource. For example, `Inbound Call Workflow` or `2014 Outbound Campaign`.
- *
- * @param string $friendlyName descriptive string that you create to describe
- * the Workflow resource
- * @return $this Fluent Builder
- */
- public function setFriendlyName($friendlyName)
- {
- $this->options['friendlyName'] = $friendlyName;
- return $this;
}
/**
* The URL from your application that will process task assignment events. See [Handling Task Assignment Callback](https://www.twilio.com/docs/taskrouter/handle-assignment-callbacks) for more details.
*
- * @param string $assignmentCallbackUrl The URL from your application that will
- * process task assignment events
+ * @param string $assignmentCallbackUrl The URL from your application that will process task assignment events. See [Handling Task Assignment Callback](https://www.twilio.com/docs/taskrouter/handle-assignment-callbacks) for more details.
* @return $this Fluent Builder
*/
- public function setAssignmentCallbackUrl($assignmentCallbackUrl)
+ public function setAssignmentCallbackUrl(string $assignmentCallbackUrl): self
{
$this->options['assignmentCallbackUrl'] = $assignmentCallbackUrl;
return $this;
@@ -121,93 +124,61 @@ public function setAssignmentCallbackUrl($assignmentCallbackUrl)
/**
* The URL that we should call when a call to the `assignment_callback_url` fails.
*
- * @param string $fallbackAssignmentCallbackUrl The URL that we should call
- * when a call to the
- * `assignment_callback_url` fails
+ * @param string $fallbackAssignmentCallbackUrl The URL that we should call when a call to the `assignment_callback_url` fails.
* @return $this Fluent Builder
*/
- public function setFallbackAssignmentCallbackUrl($fallbackAssignmentCallbackUrl)
+ public function setFallbackAssignmentCallbackUrl(string $fallbackAssignmentCallbackUrl): self
{
$this->options['fallbackAssignmentCallbackUrl'] = $fallbackAssignmentCallbackUrl;
return $this;
}
- /**
- * A JSON string that contains the rules to apply to the Workflow. See [Configuring Workflows](https://www.twilio.com/docs/taskrouter/workflow-configuration) for more information.
- *
- * @param string $configuration A JSON string that contains the rules to apply
- * to the Workflow
- * @return $this Fluent Builder
- */
- public function setConfiguration($configuration)
- {
- $this->options['configuration'] = $configuration;
- return $this;
- }
-
/**
* How long TaskRouter will wait for a confirmation response from your application after it assigns a Task to a Worker. Can be up to `86,400` (24 hours) and the default is `120`.
*
- * @param int $taskReservationTimeout How long TaskRouter will wait for a
- * confirmation response from your
- * application after it assigns a Task to a
- * Worker
+ * @param int $taskReservationTimeout How long TaskRouter will wait for a confirmation response from your application after it assigns a Task to a Worker. Can be up to `86,400` (24 hours) and the default is `120`.
* @return $this Fluent Builder
*/
- public function setTaskReservationTimeout($taskReservationTimeout)
+ public function setTaskReservationTimeout(int $taskReservationTimeout): self
{
$this->options['taskReservationTimeout'] = $taskReservationTimeout;
return $this;
}
- /**
- * Whether or not to re-evaluate Tasks. The default is `false`, which means Tasks in the Workflow will not be processed through the assignment loop again.
- *
- * @param string $reEvaluateTasks Whether or not to re-evaluate Tasks
- * @return $this Fluent Builder
- */
- public function setReEvaluateTasks($reEvaluateTasks)
- {
- $this->options['reEvaluateTasks'] = $reEvaluateTasks;
- return $this;
- }
-
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Taskrouter.V1.UpdateWorkflowOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.CreateWorkflowOptions ' . $options . ']';
}
}
+
+
class ReadWorkflowOptions extends Options
-{
+ {
/**
- * @param string $friendlyName The friendly_name of the Workflow resources to
- * read
+ * @param string $friendlyName The `friendly_name` of the Workflow resources to read.
*/
- public function __construct($friendlyName = Values::NONE)
- {
+ public function __construct(
+
+ string $friendlyName = Values::NONE
+
+ ) {
$this->options['friendlyName'] = $friendlyName;
}
/**
* The `friendly_name` of the Workflow resources to read.
*
- * @param string $friendlyName The friendly_name of the Workflow resources to
- * read
+ * @param string $friendlyName The `friendly_name` of the Workflow resources to read.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -218,46 +189,60 @@ public function setFriendlyName($friendlyName)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Taskrouter.V1.ReadWorkflowOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.ReadWorkflowOptions ' . $options . ']';
}
}
-class CreateWorkflowOptions extends Options
-{
+class UpdateWorkflowOptions extends Options
+ {
/**
- * @param string $assignmentCallbackUrl The URL from your application that will
- * process task assignment events
- * @param string $fallbackAssignmentCallbackUrl The URL that we should call
- * when a call to the
- * `assignment_callback_url` fails
- * @param int $taskReservationTimeout How long TaskRouter will wait for a
- * confirmation response from your
- * application after it assigns a Task to a
- * Worker
+ * @param string $friendlyName A descriptive string that you create to describe the Workflow resource. For example, `Inbound Call Workflow` or `2014 Outbound Campaign`.
+ * @param string $assignmentCallbackUrl The URL from your application that will process task assignment events. See [Handling Task Assignment Callback](https://www.twilio.com/docs/taskrouter/handle-assignment-callbacks) for more details.
+ * @param string $fallbackAssignmentCallbackUrl The URL that we should call when a call to the `assignment_callback_url` fails.
+ * @param string $configuration A JSON string that contains the rules to apply to the Workflow. See [Configuring Workflows](https://www.twilio.com/docs/taskrouter/workflow-configuration) for more information.
+ * @param int $taskReservationTimeout How long TaskRouter will wait for a confirmation response from your application after it assigns a Task to a Worker. Can be up to `86,400` (24 hours) and the default is `120`.
+ * @param string $reEvaluateTasks Whether or not to re-evaluate Tasks. The default is `false`, which means Tasks in the Workflow will not be processed through the assignment loop again.
*/
- public function __construct($assignmentCallbackUrl = Values::NONE, $fallbackAssignmentCallbackUrl = Values::NONE, $taskReservationTimeout = Values::NONE)
- {
+ public function __construct(
+
+ string $friendlyName = Values::NONE,
+ string $assignmentCallbackUrl = Values::NONE,
+ string $fallbackAssignmentCallbackUrl = Values::NONE,
+ string $configuration = Values::NONE,
+ int $taskReservationTimeout = Values::INT_NONE,
+ string $reEvaluateTasks = Values::NONE
+
+ ) {
+ $this->options['friendlyName'] = $friendlyName;
$this->options['assignmentCallbackUrl'] = $assignmentCallbackUrl;
$this->options['fallbackAssignmentCallbackUrl'] = $fallbackAssignmentCallbackUrl;
+ $this->options['configuration'] = $configuration;
$this->options['taskReservationTimeout'] = $taskReservationTimeout;
+ $this->options['reEvaluateTasks'] = $reEvaluateTasks;
+ }
+
+ /**
+ * A descriptive string that you create to describe the Workflow resource. For example, `Inbound Call Workflow` or `2014 Outbound Campaign`.
+ *
+ * @param string $friendlyName A descriptive string that you create to describe the Workflow resource. For example, `Inbound Call Workflow` or `2014 Outbound Campaign`.
+ * @return $this Fluent Builder
+ */
+ public function setFriendlyName(string $friendlyName): self
+ {
+ $this->options['friendlyName'] = $friendlyName;
+ return $this;
}
/**
* The URL from your application that will process task assignment events. See [Handling Task Assignment Callback](https://www.twilio.com/docs/taskrouter/handle-assignment-callbacks) for more details.
*
- * @param string $assignmentCallbackUrl The URL from your application that will
- * process task assignment events
+ * @param string $assignmentCallbackUrl The URL from your application that will process task assignment events. See [Handling Task Assignment Callback](https://www.twilio.com/docs/taskrouter/handle-assignment-callbacks) for more details.
* @return $this Fluent Builder
*/
- public function setAssignmentCallbackUrl($assignmentCallbackUrl)
+ public function setAssignmentCallbackUrl(string $assignmentCallbackUrl): self
{
$this->options['assignmentCallbackUrl'] = $assignmentCallbackUrl;
return $this;
@@ -266,45 +251,60 @@ public function setAssignmentCallbackUrl($assignmentCallbackUrl)
/**
* The URL that we should call when a call to the `assignment_callback_url` fails.
*
- * @param string $fallbackAssignmentCallbackUrl The URL that we should call
- * when a call to the
- * `assignment_callback_url` fails
+ * @param string $fallbackAssignmentCallbackUrl The URL that we should call when a call to the `assignment_callback_url` fails.
* @return $this Fluent Builder
*/
- public function setFallbackAssignmentCallbackUrl($fallbackAssignmentCallbackUrl)
+ public function setFallbackAssignmentCallbackUrl(string $fallbackAssignmentCallbackUrl): self
{
$this->options['fallbackAssignmentCallbackUrl'] = $fallbackAssignmentCallbackUrl;
return $this;
}
+ /**
+ * A JSON string that contains the rules to apply to the Workflow. See [Configuring Workflows](https://www.twilio.com/docs/taskrouter/workflow-configuration) for more information.
+ *
+ * @param string $configuration A JSON string that contains the rules to apply to the Workflow. See [Configuring Workflows](https://www.twilio.com/docs/taskrouter/workflow-configuration) for more information.
+ * @return $this Fluent Builder
+ */
+ public function setConfiguration(string $configuration): self
+ {
+ $this->options['configuration'] = $configuration;
+ return $this;
+ }
+
/**
* How long TaskRouter will wait for a confirmation response from your application after it assigns a Task to a Worker. Can be up to `86,400` (24 hours) and the default is `120`.
*
- * @param int $taskReservationTimeout How long TaskRouter will wait for a
- * confirmation response from your
- * application after it assigns a Task to a
- * Worker
+ * @param int $taskReservationTimeout How long TaskRouter will wait for a confirmation response from your application after it assigns a Task to a Worker. Can be up to `86,400` (24 hours) and the default is `120`.
* @return $this Fluent Builder
*/
- public function setTaskReservationTimeout($taskReservationTimeout)
+ public function setTaskReservationTimeout(int $taskReservationTimeout): self
{
$this->options['taskReservationTimeout'] = $taskReservationTimeout;
return $this;
}
+ /**
+ * Whether or not to re-evaluate Tasks. The default is `false`, which means Tasks in the Workflow will not be processed through the assignment loop again.
+ *
+ * @param string $reEvaluateTasks Whether or not to re-evaluate Tasks. The default is `false`, which means Tasks in the Workflow will not be processed through the assignment loop again.
+ * @return $this Fluent Builder
+ */
+ public function setReEvaluateTasks(string $reEvaluateTasks): self
+ {
+ $this->options['reEvaluateTasks'] = $reEvaluateTasks;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Taskrouter.V1.CreateWorkflowOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.UpdateWorkflowOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkflowPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkflowPage.php
index 63471a1..29e3fc9 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkflowPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkflowPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return WorkflowInstance \Twilio\Rest\Taskrouter\V1\Workspace\WorkflowInstance
+ */
+ public function buildInstance(array $payload): WorkflowInstance
{
return new WorkflowInstance($this->version, $payload, $this->solution['workspaceSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.WorkflowPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceCumulativeStatisticsContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceCumulativeStatisticsContext.php
index 794246f..ae1351e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceCumulativeStatisticsContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceCumulativeStatisticsContext.php
@@ -2,64 +2,80 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
class WorkspaceCumulativeStatisticsContext extends InstanceContext
-{
+ {
/**
* Initialize the WorkspaceCumulativeStatisticsContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace to fetch
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\WorkspaceCumulativeStatisticsContext
+ * @param Version $version Version that contains the resource
+ * @param string $workspaceSid The SID of the Workspace to fetch.
*/
- public function __construct(Version $version, $workspaceSid)
- {
+ public function __construct(
+ Version $version,
+ $workspaceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+ ];
- $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/CumulativeStatistics';
+ $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid)
+ .'/CumulativeStatistics';
}
/**
- * Fetch a WorkspaceCumulativeStatisticsInstance
+ * Fetch the WorkspaceCumulativeStatisticsInstance
*
* @param array|Options $options Optional Arguments
- * @return WorkspaceCumulativeStatisticsInstance Fetched
- * WorkspaceCumulativeStatisticsInstance
+ * @return WorkspaceCumulativeStatisticsInstance Fetched WorkspaceCumulativeStatisticsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch($options = array())
+ public function fetch(array $options = []): WorkspaceCumulativeStatisticsInstance
{
+
$options = new Values($options);
- $params = Values::of(array(
- 'EndDate' => Serialize::iso8601DateTime($options['endDate']),
- 'Minutes' => $options['minutes'],
- 'StartDate' => Serialize::iso8601DateTime($options['startDate']),
- 'TaskChannel' => $options['taskChannel'],
- 'SplitByWaitTime' => $options['splitByWaitTime'],
- ));
+ $params = Values::of([
+ 'EndDate' =>
+ Serialize::iso8601DateTime($options['endDate']),
+ 'Minutes' =>
+ $options['minutes'],
+ 'StartDate' =>
+ Serialize::iso8601DateTime($options['startDate']),
+ 'TaskChannel' =>
+ $options['taskChannel'],
+ 'SplitByWaitTime' =>
+ $options['splitByWaitTime'],
+ ]);
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, $params, [], $headers);
return new WorkspaceCumulativeStatisticsInstance(
$this->version,
@@ -68,17 +84,18 @@ public function fetch($options = array())
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.WorkspaceCumulativeStatisticsContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceCumulativeStatisticsInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceCumulativeStatisticsInstance.php
index 2ab73b8..90827f3 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceCumulativeStatisticsInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceCumulativeStatisticsInstance.php
@@ -2,59 +2,67 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
+ * @property string|null $accountSid
* @property int $avgTaskAcceptanceTime
- * @property \DateTime $startTime
- * @property \DateTime $endTime
+ * @property \DateTime|null $startTime
+ * @property \DateTime|null $endTime
* @property int $reservationsCreated
* @property int $reservationsAccepted
* @property int $reservationsRejected
* @property int $reservationsTimedOut
* @property int $reservationsCanceled
* @property int $reservationsRescinded
- * @property array $splitByWaitTime
- * @property array $waitDurationUntilAccepted
- * @property array $waitDurationUntilCanceled
+ * @property array|null $splitByWaitTime
+ * @property array|null $waitDurationUntilAccepted
+ * @property array|null $waitDurationUntilCanceled
* @property int $tasksCanceled
* @property int $tasksCompleted
* @property int $tasksCreated
* @property int $tasksDeleted
* @property int $tasksMoved
* @property int $tasksTimedOutInWorkflow
- * @property string $workspaceSid
- * @property string $url
+ * @property string|null $workspaceSid
+ * @property string|null $url
*/
class WorkspaceCumulativeStatisticsInstance extends InstanceResource
{
/**
* Initialize the WorkspaceCumulativeStatisticsInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $workspaceSid The SID of the Workspace
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\WorkspaceCumulativeStatisticsInstance
+ * @param string $workspaceSid The SID of the Workspace to fetch.
*/
- public function __construct(Version $version, array $payload, $workspaceSid)
+ public function __construct(Version $version, array $payload, string $workspaceSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'avgTaskAcceptanceTime' => Values::array_get($payload, 'avg_task_acceptance_time'),
'startTime' => Deserialize::dateTime(Values::array_get($payload, 'start_time')),
@@ -76,19 +84,18 @@ public function __construct(Version $version, array $payload, $workspaceSid)
'tasksTimedOutInWorkflow' => Values::array_get($payload, 'tasks_timed_out_in_workflow'),
'workspaceSid' => Values::array_get($payload, 'workspace_sid'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('workspaceSid' => $workspaceSid,);
+ $this->solution = ['workspaceSid' => $workspaceSid, ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\WorkspaceCumulativeStatisticsContext Context for this
- * WorkspaceCumulativeStatisticsInstance
+ * @return WorkspaceCumulativeStatisticsContext Context for this WorkspaceCumulativeStatisticsInstance
*/
- protected function proxy()
+ protected function proxy(): WorkspaceCumulativeStatisticsContext
{
if (!$this->context) {
$this->context = new WorkspaceCumulativeStatisticsContext(
@@ -101,15 +108,15 @@ protected function proxy()
}
/**
- * Fetch a WorkspaceCumulativeStatisticsInstance
+ * Fetch the WorkspaceCumulativeStatisticsInstance
*
* @param array|Options $options Optional Arguments
- * @return WorkspaceCumulativeStatisticsInstance Fetched
- * WorkspaceCumulativeStatisticsInstance
+ * @return WorkspaceCumulativeStatisticsInstance Fetched WorkspaceCumulativeStatisticsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch($options = array())
+ public function fetch(array $options = []): WorkspaceCumulativeStatisticsInstance
{
+
return $this->proxy()->fetch($options);
}
@@ -120,7 +127,7 @@ public function fetch($options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -139,12 +146,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.WorkspaceCumulativeStatisticsInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceCumulativeStatisticsList.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceCumulativeStatisticsList.php
index 3a6839b..cf6d57f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceCumulativeStatisticsList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceCumulativeStatisticsList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Taskrouter\V1\Workspace;
@@ -12,31 +19,40 @@
use Twilio\ListResource;
use Twilio\Version;
+
class WorkspaceCumulativeStatisticsList extends ListResource
-{
+ {
/**
* Construct the WorkspaceCumulativeStatisticsList
*
* @param Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\WorkspaceCumulativeStatisticsList
+ * @param string $workspaceSid The SID of the Workspace to fetch.
*/
- public function __construct(Version $version, $workspaceSid)
- {
+ public function __construct(
+ Version $version,
+ string $workspaceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+
+ ];
}
/**
* Constructs a WorkspaceCumulativeStatisticsContext
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\WorkspaceCumulativeStatisticsContext
*/
- public function getContext()
+ public function getContext(
+
+ ): WorkspaceCumulativeStatisticsContext
{
- return new WorkspaceCumulativeStatisticsContext($this->version, $this->solution['workspaceSid']);
+ return new WorkspaceCumulativeStatisticsContext(
+ $this->version,
+ $this->solution['workspaceSid']
+ );
}
/**
@@ -44,8 +60,8 @@ public function getContext()
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.WorkspaceCumulativeStatisticsList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceCumulativeStatisticsOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceCumulativeStatisticsOptions.php
index 04cd3db..cc903b0 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceCumulativeStatisticsOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceCumulativeStatisticsOptions.php
@@ -1,10 +1,16 @@
options['endDate'] = $endDate;
$this->options['minutes'] = $minutes;
$this->options['startDate'] = $startDate;
@@ -61,11 +77,10 @@ public function __construct($endDate = Values::NONE, $minutes = Values::NONE, $s
/**
* Only include usage that occurred on or before this date, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
*
- * @param \DateTime $endDate Only include usage that occurred on or before this
- * date
+ * @param \DateTime $endDate Only include usage that occurred on or before this date, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
* @return $this Fluent Builder
*/
- public function setEndDate($endDate)
+ public function setEndDate(\DateTime $endDate): self
{
$this->options['endDate'] = $endDate;
return $this;
@@ -74,11 +89,10 @@ public function setEndDate($endDate)
/**
* Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends.
*
- * @param int $minutes Only calculate statistics since this many minutes in the
- * past
+ * @param int $minutes Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends.
* @return $this Fluent Builder
*/
- public function setMinutes($minutes)
+ public function setMinutes(int $minutes): self
{
$this->options['minutes'] = $minutes;
return $this;
@@ -87,11 +101,10 @@ public function setMinutes($minutes)
/**
* Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
*
- * @param \DateTime $startDate Only calculate statistics from on or after this
- * date
+ * @param \DateTime $startDate Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
* @return $this Fluent Builder
*/
- public function setStartDate($startDate)
+ public function setStartDate(\DateTime $startDate): self
{
$this->options['startDate'] = $startDate;
return $this;
@@ -100,25 +113,22 @@ public function setStartDate($startDate)
/**
* Only calculate cumulative statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.
*
- * @param string $taskChannel Only calculate cumulative statistics on this
- * TaskChannel
+ * @param string $taskChannel Only calculate cumulative statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.
* @return $this Fluent Builder
*/
- public function setTaskChannel($taskChannel)
+ public function setTaskChannel(string $taskChannel): self
{
$this->options['taskChannel'] = $taskChannel;
return $this;
}
/**
- * A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. For example, `5,30` would show splits of Tasks that were canceled or accepted before and after 5 seconds and before and after 30 seconds. This can be used to show short abandoned Tasks or Tasks that failed to meet an SLA.
+ * A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. For example, `5,30` would show splits of Tasks that were canceled or accepted before and after 5 seconds and before and after 30 seconds. This can be used to show short abandoned Tasks or Tasks that failed to meet an SLA. TaskRouter will calculate statistics on up to 10,000 Tasks for any given threshold.
*
- * @param string $splitByWaitTime A comma separated list of values that
- * describes the thresholds to calculate
- * statistics on
+ * @param string $splitByWaitTime A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. For example, `5,30` would show splits of Tasks that were canceled or accepted before and after 5 seconds and before and after 30 seconds. This can be used to show short abandoned Tasks or Tasks that failed to meet an SLA. TaskRouter will calculate statistics on up to 10,000 Tasks for any given threshold.
* @return $this Fluent Builder
*/
- public function setSplitByWaitTime($splitByWaitTime)
+ public function setSplitByWaitTime(string $splitByWaitTime): self
{
$this->options['splitByWaitTime'] = $splitByWaitTime;
return $this;
@@ -129,14 +139,10 @@ public function setSplitByWaitTime($splitByWaitTime)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Taskrouter.V1.FetchWorkspaceCumulativeStatisticsOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.FetchWorkspaceCumulativeStatisticsOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceCumulativeStatisticsPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceCumulativeStatisticsPage.php
index 348e650..4cadb43 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceCumulativeStatisticsPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceCumulativeStatisticsPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return WorkspaceCumulativeStatisticsInstance \Twilio\Rest\Taskrouter\V1\Workspace\WorkspaceCumulativeStatisticsInstance
+ */
+ public function buildInstance(array $payload): WorkspaceCumulativeStatisticsInstance
{
- return new WorkspaceCumulativeStatisticsInstance(
- $this->version,
- $payload,
- $this->solution['workspaceSid']
- );
+ return new WorkspaceCumulativeStatisticsInstance($this->version, $payload, $this->solution['workspaceSid']);
}
/**
@@ -35,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.WorkspaceCumulativeStatisticsPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceRealTimeStatisticsContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceRealTimeStatisticsContext.php
index d1c4e88..e7b6c11 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceRealTimeStatisticsContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceRealTimeStatisticsContext.php
@@ -2,57 +2,71 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class WorkspaceRealTimeStatisticsContext extends InstanceContext
-{
+ {
/**
* Initialize the WorkspaceRealTimeStatisticsContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace to fetch
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\WorkspaceRealTimeStatisticsContext
+ * @param Version $version Version that contains the resource
+ * @param string $workspaceSid The SID of the Workspace to fetch.
*/
- public function __construct(Version $version, $workspaceSid)
- {
+ public function __construct(
+ Version $version,
+ $workspaceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+ ];
- $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/RealTimeStatistics';
+ $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid)
+ .'/RealTimeStatistics';
}
/**
- * Fetch a WorkspaceRealTimeStatisticsInstance
+ * Fetch the WorkspaceRealTimeStatisticsInstance
*
* @param array|Options $options Optional Arguments
- * @return WorkspaceRealTimeStatisticsInstance Fetched
- * WorkspaceRealTimeStatisticsInstance
+ * @return WorkspaceRealTimeStatisticsInstance Fetched WorkspaceRealTimeStatisticsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch($options = array())
+ public function fetch(array $options = []): WorkspaceRealTimeStatisticsInstance
{
+
$options = new Values($options);
- $params = Values::of(array('TaskChannel' => $options['taskChannel'],));
+ $params = Values::of([
+ 'TaskChannel' =>
+ $options['taskChannel'],
+ ]);
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, $params, [], $headers);
return new WorkspaceRealTimeStatisticsInstance(
$this->version,
@@ -61,17 +75,18 @@ public function fetch($options = array())
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.WorkspaceRealTimeStatisticsContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceRealTimeStatisticsInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceRealTimeStatisticsInstance.php
index 4e8a7d6..e3a0fbc 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceRealTimeStatisticsInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceRealTimeStatisticsInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace;
use Twilio\Exceptions\TwilioException;
@@ -15,34 +23,34 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * @property string $accountSid
- * @property array $activityStatistics
+ * @property string|null $accountSid
+ * @property array[]|null $activityStatistics
* @property int $longestTaskWaitingAge
- * @property string $longestTaskWaitingSid
- * @property array $tasksByPriority
- * @property array $tasksByStatus
+ * @property string|null $longestTaskWaitingSid
+ * @property array|null $tasksByPriority
+ * @property array|null $tasksByStatus
* @property int $totalTasks
* @property int $totalWorkers
- * @property string $workspaceSid
- * @property string $url
+ * @property string|null $workspaceSid
+ * @property string|null $url
*/
class WorkspaceRealTimeStatisticsInstance extends InstanceResource
{
/**
* Initialize the WorkspaceRealTimeStatisticsInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $workspaceSid The SID of the Workspace
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\WorkspaceRealTimeStatisticsInstance
+ * @param string $workspaceSid The SID of the Workspace to fetch.
*/
- public function __construct(Version $version, array $payload, $workspaceSid)
+ public function __construct(Version $version, array $payload, string $workspaceSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'activityStatistics' => Values::array_get($payload, 'activity_statistics'),
'longestTaskWaitingAge' => Values::array_get($payload, 'longest_task_waiting_age'),
@@ -53,19 +61,18 @@ public function __construct(Version $version, array $payload, $workspaceSid)
'totalWorkers' => Values::array_get($payload, 'total_workers'),
'workspaceSid' => Values::array_get($payload, 'workspace_sid'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('workspaceSid' => $workspaceSid,);
+ $this->solution = ['workspaceSid' => $workspaceSid, ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\WorkspaceRealTimeStatisticsContext Context for this
- * WorkspaceRealTimeStatisticsInstance
+ * @return WorkspaceRealTimeStatisticsContext Context for this WorkspaceRealTimeStatisticsInstance
*/
- protected function proxy()
+ protected function proxy(): WorkspaceRealTimeStatisticsContext
{
if (!$this->context) {
$this->context = new WorkspaceRealTimeStatisticsContext(
@@ -78,15 +85,15 @@ protected function proxy()
}
/**
- * Fetch a WorkspaceRealTimeStatisticsInstance
+ * Fetch the WorkspaceRealTimeStatisticsInstance
*
* @param array|Options $options Optional Arguments
- * @return WorkspaceRealTimeStatisticsInstance Fetched
- * WorkspaceRealTimeStatisticsInstance
+ * @return WorkspaceRealTimeStatisticsInstance Fetched WorkspaceRealTimeStatisticsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch($options = array())
+ public function fetch(array $options = []): WorkspaceRealTimeStatisticsInstance
{
+
return $this->proxy()->fetch($options);
}
@@ -97,7 +104,7 @@ public function fetch($options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -116,12 +123,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.WorkspaceRealTimeStatisticsInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceRealTimeStatisticsList.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceRealTimeStatisticsList.php
index 6221094..5fb1dd6 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceRealTimeStatisticsList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceRealTimeStatisticsList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Taskrouter\V1\Workspace;
@@ -12,31 +19,40 @@
use Twilio\ListResource;
use Twilio\Version;
+
class WorkspaceRealTimeStatisticsList extends ListResource
-{
+ {
/**
* Construct the WorkspaceRealTimeStatisticsList
*
* @param Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\WorkspaceRealTimeStatisticsList
+ * @param string $workspaceSid The SID of the Workspace to fetch.
*/
- public function __construct(Version $version, $workspaceSid)
- {
+ public function __construct(
+ Version $version,
+ string $workspaceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+
+ ];
}
/**
* Constructs a WorkspaceRealTimeStatisticsContext
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\WorkspaceRealTimeStatisticsContext
*/
- public function getContext()
+ public function getContext(
+
+ ): WorkspaceRealTimeStatisticsContext
{
- return new WorkspaceRealTimeStatisticsContext($this->version, $this->solution['workspaceSid']);
+ return new WorkspaceRealTimeStatisticsContext(
+ $this->version,
+ $this->solution['workspaceSid']
+ );
}
/**
@@ -44,8 +60,8 @@ public function getContext()
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.WorkspaceRealTimeStatisticsList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceRealTimeStatisticsOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceRealTimeStatisticsOptions.php
index a1e9e1c..a36a0e3 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceRealTimeStatisticsOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceRealTimeStatisticsOptions.php
@@ -1,10 +1,16 @@
options['taskChannel'] = $taskChannel;
}
/**
* Only calculate real-time statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.
*
- * @param string $taskChannel Only calculate real-time statistics on this
- * TaskChannel
+ * @param string $taskChannel Only calculate real-time statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.
* @return $this Fluent Builder
*/
- public function setTaskChannel($taskChannel)
+ public function setTaskChannel(string $taskChannel): self
{
$this->options['taskChannel'] = $taskChannel;
return $this;
@@ -54,14 +67,10 @@ public function setTaskChannel($taskChannel)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Taskrouter.V1.FetchWorkspaceRealTimeStatisticsOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.FetchWorkspaceRealTimeStatisticsOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceRealTimeStatisticsPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceRealTimeStatisticsPage.php
index a3346a5..d79ec5e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceRealTimeStatisticsPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceRealTimeStatisticsPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return WorkspaceRealTimeStatisticsInstance \Twilio\Rest\Taskrouter\V1\Workspace\WorkspaceRealTimeStatisticsInstance
+ */
+ public function buildInstance(array $payload): WorkspaceRealTimeStatisticsInstance
{
- return new WorkspaceRealTimeStatisticsInstance(
- $this->version,
- $payload,
- $this->solution['workspaceSid']
- );
+ return new WorkspaceRealTimeStatisticsInstance($this->version, $payload, $this->solution['workspaceSid']);
}
/**
@@ -35,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.WorkspaceRealTimeStatisticsPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceStatisticsContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceStatisticsContext.php
index b14d624..50bdde0 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceStatisticsContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceStatisticsContext.php
@@ -2,78 +2,100 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
class WorkspaceStatisticsContext extends InstanceContext
-{
+ {
/**
* Initialize the WorkspaceStatisticsContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace to fetch
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\WorkspaceStatisticsContext
+ * @param Version $version Version that contains the resource
+ * @param string $workspaceSid The SID of the Workspace to fetch.
*/
- public function __construct(Version $version, $workspaceSid)
- {
+ public function __construct(
+ Version $version,
+ $workspaceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+ ];
- $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid) . '/Statistics';
+ $this->uri = '/Workspaces/' . \rawurlencode($workspaceSid)
+ .'/Statistics';
}
/**
- * Fetch a WorkspaceStatisticsInstance
+ * Fetch the WorkspaceStatisticsInstance
*
* @param array|Options $options Optional Arguments
* @return WorkspaceStatisticsInstance Fetched WorkspaceStatisticsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch($options = array())
+ public function fetch(array $options = []): WorkspaceStatisticsInstance
{
+
$options = new Values($options);
- $params = Values::of(array(
- 'Minutes' => $options['minutes'],
- 'StartDate' => Serialize::iso8601DateTime($options['startDate']),
- 'EndDate' => Serialize::iso8601DateTime($options['endDate']),
- 'TaskChannel' => $options['taskChannel'],
- 'SplitByWaitTime' => $options['splitByWaitTime'],
- ));
+ $params = Values::of([
+ 'Minutes' =>
+ $options['minutes'],
+ 'StartDate' =>
+ Serialize::iso8601DateTime($options['startDate']),
+ 'EndDate' =>
+ Serialize::iso8601DateTime($options['endDate']),
+ 'TaskChannel' =>
+ $options['taskChannel'],
+ 'SplitByWaitTime' =>
+ $options['splitByWaitTime'],
+ ]);
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, $params, [], $headers);
- return new WorkspaceStatisticsInstance($this->version, $payload, $this->solution['workspaceSid']);
+ return new WorkspaceStatisticsInstance(
+ $this->version,
+ $payload,
+ $this->solution['workspaceSid']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.WorkspaceStatisticsContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceStatisticsInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceStatisticsInstance.php
index 1a28726..48a013f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceStatisticsInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceStatisticsInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1\Workspace;
use Twilio\Exceptions\TwilioException;
@@ -15,63 +23,67 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * @property array $realtime
- * @property array $cumulative
- * @property string $accountSid
- * @property string $workspaceSid
- * @property string $url
+ * @property array|null $realtime
+ * @property array|null $cumulative
+ * @property string|null $accountSid
+ * @property string|null $workspaceSid
+ * @property string|null $url
*/
class WorkspaceStatisticsInstance extends InstanceResource
{
/**
* Initialize the WorkspaceStatisticsInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $workspaceSid The SID of the Workspace
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\WorkspaceStatisticsInstance
+ * @param string $workspaceSid The SID of the Workspace to fetch.
*/
- public function __construct(Version $version, array $payload, $workspaceSid)
+ public function __construct(Version $version, array $payload, string $workspaceSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'realtime' => Values::array_get($payload, 'realtime'),
'cumulative' => Values::array_get($payload, 'cumulative'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'workspaceSid' => Values::array_get($payload, 'workspace_sid'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('workspaceSid' => $workspaceSid,);
+ $this->solution = ['workspaceSid' => $workspaceSid, ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\WorkspaceStatisticsContext Context for this WorkspaceStatisticsInstance
+ * @return WorkspaceStatisticsContext Context for this WorkspaceStatisticsInstance
*/
- protected function proxy()
+ protected function proxy(): WorkspaceStatisticsContext
{
if (!$this->context) {
- $this->context = new WorkspaceStatisticsContext($this->version, $this->solution['workspaceSid']);
+ $this->context = new WorkspaceStatisticsContext(
+ $this->version,
+ $this->solution['workspaceSid']
+ );
}
return $this->context;
}
/**
- * Fetch a WorkspaceStatisticsInstance
+ * Fetch the WorkspaceStatisticsInstance
*
* @param array|Options $options Optional Arguments
* @return WorkspaceStatisticsInstance Fetched WorkspaceStatisticsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch($options = array())
+ public function fetch(array $options = []): WorkspaceStatisticsInstance
{
+
return $this->proxy()->fetch($options);
}
@@ -82,7 +94,7 @@ public function fetch($options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -101,12 +113,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.WorkspaceStatisticsInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceStatisticsList.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceStatisticsList.php
index 4316b6c..48da1e1 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceStatisticsList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceStatisticsList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Taskrouter\V1\Workspace;
@@ -12,31 +19,40 @@
use Twilio\ListResource;
use Twilio\Version;
+
class WorkspaceStatisticsList extends ListResource
-{
+ {
/**
* Construct the WorkspaceStatisticsList
*
* @param Version $version Version that contains the resource
- * @param string $workspaceSid The SID of the Workspace
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\WorkspaceStatisticsList
+ * @param string $workspaceSid The SID of the Workspace to fetch.
*/
- public function __construct(Version $version, $workspaceSid)
- {
+ public function __construct(
+ Version $version,
+ string $workspaceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('workspaceSid' => $workspaceSid,);
+ $this->solution = [
+ 'workspaceSid' =>
+ $workspaceSid,
+
+ ];
}
/**
* Constructs a WorkspaceStatisticsContext
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\WorkspaceStatisticsContext
*/
- public function getContext()
+ public function getContext(
+
+ ): WorkspaceStatisticsContext
{
- return new WorkspaceStatisticsContext($this->version, $this->solution['workspaceSid']);
+ return new WorkspaceStatisticsContext(
+ $this->version,
+ $this->solution['workspaceSid']
+ );
}
/**
@@ -44,8 +60,8 @@ public function getContext()
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.WorkspaceStatisticsList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceStatisticsOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceStatisticsOptions.php
index d0d10f7..1766309 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceStatisticsOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceStatisticsOptions.php
@@ -1,10 +1,16 @@
options['minutes'] = $minutes;
$this->options['startDate'] = $startDate;
$this->options['endDate'] = $endDate;
@@ -59,11 +77,10 @@ public function __construct($minutes = Values::NONE, $startDate = Values::NONE,
/**
* Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends.
*
- * @param int $minutes Only calculate statistics since this many minutes in the
- * past
+ * @param int $minutes Only calculate statistics since this many minutes in the past. The default 15 minutes. This is helpful for displaying statistics for the last 15 minutes, 240 minutes (4 hours), and 480 minutes (8 hours) to see trends.
* @return $this Fluent Builder
*/
- public function setMinutes($minutes)
+ public function setMinutes(int $minutes): self
{
$this->options['minutes'] = $minutes;
return $this;
@@ -72,11 +89,10 @@ public function setMinutes($minutes)
/**
* Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
*
- * @param \DateTime $startDate Only calculate statistics from on or after this
- * date
+ * @param \DateTime $startDate Only calculate statistics from this date and time and later, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
* @return $this Fluent Builder
*/
- public function setStartDate($startDate)
+ public function setStartDate(\DateTime $startDate): self
{
$this->options['startDate'] = $startDate;
return $this;
@@ -85,11 +101,10 @@ public function setStartDate($startDate)
/**
* Only calculate statistics from this date and time and earlier, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
*
- * @param \DateTime $endDate Only calculate statistics from this date and time
- * and earlier
+ * @param \DateTime $endDate Only calculate statistics from this date and time and earlier, specified in GMT as an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time.
* @return $this Fluent Builder
*/
- public function setEndDate($endDate)
+ public function setEndDate(\DateTime $endDate): self
{
$this->options['endDate'] = $endDate;
return $this;
@@ -98,10 +113,10 @@ public function setEndDate($endDate)
/**
* Only calculate statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.
*
- * @param string $taskChannel Only calculate statistics on this TaskChannel.
+ * @param string $taskChannel Only calculate statistics on this TaskChannel. Can be the TaskChannel's SID or its `unique_name`, such as `voice`, `sms`, or `default`.
* @return $this Fluent Builder
*/
- public function setTaskChannel($taskChannel)
+ public function setTaskChannel(string $taskChannel): self
{
$this->options['taskChannel'] = $taskChannel;
return $this;
@@ -110,12 +125,10 @@ public function setTaskChannel($taskChannel)
/**
* A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. For example, `5,30` would show splits of Tasks that were canceled or accepted before and after 5 seconds and before and after 30 seconds. This can be used to show short abandoned Tasks or Tasks that failed to meet an SLA.
*
- * @param string $splitByWaitTime A comma separated list of values that
- * describes the thresholds to calculate
- * statistics on
+ * @param string $splitByWaitTime A comma separated list of values that describes the thresholds, in seconds, to calculate statistics on. For each threshold specified, the number of Tasks canceled and reservations accepted above and below the specified thresholds in seconds are computed. For example, `5,30` would show splits of Tasks that were canceled or accepted before and after 5 seconds and before and after 30 seconds. This can be used to show short abandoned Tasks or Tasks that failed to meet an SLA.
* @return $this Fluent Builder
*/
- public function setSplitByWaitTime($splitByWaitTime)
+ public function setSplitByWaitTime(string $splitByWaitTime): self
{
$this->options['splitByWaitTime'] = $splitByWaitTime;
return $this;
@@ -126,14 +139,10 @@ public function setSplitByWaitTime($splitByWaitTime)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Taskrouter.V1.FetchWorkspaceStatisticsOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.FetchWorkspaceStatisticsOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceStatisticsPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceStatisticsPage.php
index 36ee1bc..f4bd897 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceStatisticsPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/WorkspaceStatisticsPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return WorkspaceStatisticsInstance \Twilio\Rest\Taskrouter\V1\Workspace\WorkspaceStatisticsInstance
+ */
+ public function buildInstance(array $payload): WorkspaceStatisticsInstance
{
return new WorkspaceStatisticsInstance($this->version, $payload, $this->solution['workspaceSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.WorkspaceStatisticsPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/WorkspaceContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/WorkspaceContext.php
index 9484054..afc993e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/WorkspaceContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/WorkspaceContext.php
@@ -2,208 +2,241 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Taskrouter\V1\Workspace\ActivityList;
+use Twilio\Values;
+use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+use Twilio\Rest\Taskrouter\V1\Workspace\TaskQueueList;
use Twilio\Rest\Taskrouter\V1\Workspace\EventList;
use Twilio\Rest\Taskrouter\V1\Workspace\TaskChannelList;
-use Twilio\Rest\Taskrouter\V1\Workspace\TaskList;
-use Twilio\Rest\Taskrouter\V1\Workspace\TaskQueueList;
+use Twilio\Rest\Taskrouter\V1\Workspace\ActivityList;
use Twilio\Rest\Taskrouter\V1\Workspace\WorkerList;
use Twilio\Rest\Taskrouter\V1\Workspace\WorkflowList;
+use Twilio\Rest\Taskrouter\V1\Workspace\TaskList;
use Twilio\Rest\Taskrouter\V1\Workspace\WorkspaceCumulativeStatisticsList;
use Twilio\Rest\Taskrouter\V1\Workspace\WorkspaceRealTimeStatisticsList;
use Twilio\Rest\Taskrouter\V1\Workspace\WorkspaceStatisticsList;
-use Twilio\Serialize;
-use Twilio\Values;
-use Twilio\Version;
+
/**
- * @property \Twilio\Rest\Taskrouter\V1\Workspace\ActivityList $activities
- * @property \Twilio\Rest\Taskrouter\V1\Workspace\EventList $events
- * @property \Twilio\Rest\Taskrouter\V1\Workspace\TaskList $tasks
- * @property \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueueList $taskQueues
- * @property \Twilio\Rest\Taskrouter\V1\Workspace\WorkerList $workers
- * @property \Twilio\Rest\Taskrouter\V1\Workspace\WorkflowList $workflows
- * @property \Twilio\Rest\Taskrouter\V1\Workspace\WorkspaceStatisticsList $statistics
- * @property \Twilio\Rest\Taskrouter\V1\Workspace\WorkspaceRealTimeStatisticsList $realTimeStatistics
- * @property \Twilio\Rest\Taskrouter\V1\Workspace\WorkspaceCumulativeStatisticsList $cumulativeStatistics
- * @property \Twilio\Rest\Taskrouter\V1\Workspace\TaskChannelList $taskChannels
+ * @property TaskQueueList $taskQueues
+ * @property EventList $events
+ * @property TaskChannelList $taskChannels
+ * @property ActivityList $activities
+ * @property WorkerList $workers
+ * @property WorkflowList $workflows
+ * @property TaskList $tasks
+ * @property WorkspaceCumulativeStatisticsList $cumulativeStatistics
+ * @property WorkspaceRealTimeStatisticsList $realTimeStatistics
+ * @property WorkspaceStatisticsList $statistics
+ * @method \Twilio\Rest\Taskrouter\V1\Workspace\WorkspaceCumulativeStatisticsContext cumulativeStatistics()
+ * @method \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueueContext taskQueues(string $sid)
* @method \Twilio\Rest\Taskrouter\V1\Workspace\ActivityContext activities(string $sid)
- * @method \Twilio\Rest\Taskrouter\V1\Workspace\EventContext events(string $sid)
+ * @method \Twilio\Rest\Taskrouter\V1\Workspace\WorkspaceRealTimeStatisticsContext realTimeStatistics()
* @method \Twilio\Rest\Taskrouter\V1\Workspace\TaskContext tasks(string $sid)
- * @method \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueueContext taskQueues(string $sid)
- * @method \Twilio\Rest\Taskrouter\V1\Workspace\WorkerContext workers(string $sid)
* @method \Twilio\Rest\Taskrouter\V1\Workspace\WorkflowContext workflows(string $sid)
+ * @method \Twilio\Rest\Taskrouter\V1\Workspace\EventContext events(string $sid)
+ * @method \Twilio\Rest\Taskrouter\V1\Workspace\WorkerContext workers(string $sid)
* @method \Twilio\Rest\Taskrouter\V1\Workspace\WorkspaceStatisticsContext statistics()
- * @method \Twilio\Rest\Taskrouter\V1\Workspace\WorkspaceRealTimeStatisticsContext realTimeStatistics()
- * @method \Twilio\Rest\Taskrouter\V1\Workspace\WorkspaceCumulativeStatisticsContext cumulativeStatistics()
* @method \Twilio\Rest\Taskrouter\V1\Workspace\TaskChannelContext taskChannels(string $sid)
*/
class WorkspaceContext extends InstanceContext
-{
- protected $_activities = null;
- protected $_events = null;
- protected $_tasks = null;
- protected $_taskQueues = null;
- protected $_workers = null;
- protected $_workflows = null;
- protected $_statistics = null;
- protected $_realTimeStatistics = null;
- protected $_cumulativeStatistics = null;
- protected $_taskChannels = null;
+ {
+ protected $_taskQueues;
+ protected $_events;
+ protected $_taskChannels;
+ protected $_activities;
+ protected $_workers;
+ protected $_workflows;
+ protected $_tasks;
+ protected $_cumulativeStatistics;
+ protected $_realTimeStatistics;
+ protected $_statistics;
/**
* Initialize the WorkspaceContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The SID of the resource to fetch
- * @return \Twilio\Rest\Taskrouter\V1\WorkspaceContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid The SID of the Workspace resource to delete.
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Workspaces/' . \rawurlencode($sid) . '';
+ $this->uri = '/Workspaces/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a WorkspaceInstance
+ * Delete the WorkspaceInstance
*
- * @return WorkspaceInstance Fetched WorkspaceInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
- return new WorkspaceInstance($this->version, $payload, $this->solution['sid']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Update the WorkspaceInstance
+ * Fetch the WorkspaceInstance
*
- * @param array|Options $options Optional Arguments
- * @return WorkspaceInstance Updated WorkspaceInstance
+ * @return WorkspaceInstance Fetched WorkspaceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): WorkspaceInstance
{
- $options = new Values($options);
- $data = Values::of(array(
- 'DefaultActivitySid' => $options['defaultActivitySid'],
- 'EventCallbackUrl' => $options['eventCallbackUrl'],
- 'EventsFilter' => $options['eventsFilter'],
- 'FriendlyName' => $options['friendlyName'],
- 'MultiTaskEnabled' => Serialize::booleanToString($options['multiTaskEnabled']),
- 'TimeoutActivitySid' => $options['timeoutActivitySid'],
- 'PrioritizeQueueOrder' => $options['prioritizeQueueOrder'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
- return new WorkspaceInstance($this->version, $payload, $this->solution['sid']);
+ return new WorkspaceInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
- * Deletes the WorkspaceInstance
+ * Update the WorkspaceInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return WorkspaceInstance Updated WorkspaceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): WorkspaceInstance
{
- return $this->version->delete('delete', $this->uri);
+
+ $options = new Values($options);
+
+ $data = Values::of([
+ 'DefaultActivitySid' =>
+ $options['defaultActivitySid'],
+ 'EventCallbackUrl' =>
+ $options['eventCallbackUrl'],
+ 'EventsFilter' =>
+ $options['eventsFilter'],
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'MultiTaskEnabled' =>
+ Serialize::booleanToString($options['multiTaskEnabled']),
+ 'TimeoutActivitySid' =>
+ $options['timeoutActivitySid'],
+ 'PrioritizeQueueOrder' =>
+ $options['prioritizeQueueOrder'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
+
+ return new WorkspaceInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
- * Access the activities
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\ActivityList
+ * Access the taskQueues
*/
- protected function getActivities()
+ protected function getTaskQueues(): TaskQueueList
{
- if (!$this->_activities) {
- $this->_activities = new ActivityList($this->version, $this->solution['sid']);
+ if (!$this->_taskQueues) {
+ $this->_taskQueues = new TaskQueueList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_activities;
+ return $this->_taskQueues;
}
/**
* Access the events
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\EventList
*/
- protected function getEvents()
+ protected function getEvents(): EventList
{
if (!$this->_events) {
- $this->_events = new EventList($this->version, $this->solution['sid']);
+ $this->_events = new EventList(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->_events;
}
/**
- * Access the tasks
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskList
+ * Access the taskChannels
*/
- protected function getTasks()
+ protected function getTaskChannels(): TaskChannelList
{
- if (!$this->_tasks) {
- $this->_tasks = new TaskList($this->version, $this->solution['sid']);
+ if (!$this->_taskChannels) {
+ $this->_taskChannels = new TaskChannelList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_tasks;
+ return $this->_taskChannels;
}
/**
- * Access the taskQueues
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueueList
+ * Access the activities
*/
- protected function getTaskQueues()
+ protected function getActivities(): ActivityList
{
- if (!$this->_taskQueues) {
- $this->_taskQueues = new TaskQueueList($this->version, $this->solution['sid']);
+ if (!$this->_activities) {
+ $this->_activities = new ActivityList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_taskQueues;
+ return $this->_activities;
}
/**
* Access the workers
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\WorkerList
*/
- protected function getWorkers()
+ protected function getWorkers(): WorkerList
{
if (!$this->_workers) {
- $this->_workers = new WorkerList($this->version, $this->solution['sid']);
+ $this->_workers = new WorkerList(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->_workers;
@@ -211,88 +244,87 @@ protected function getWorkers()
/**
* Access the workflows
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\WorkflowList
*/
- protected function getWorkflows()
+ protected function getWorkflows(): WorkflowList
{
if (!$this->_workflows) {
- $this->_workflows = new WorkflowList($this->version, $this->solution['sid']);
+ $this->_workflows = new WorkflowList(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->_workflows;
}
/**
- * Access the statistics
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\WorkspaceStatisticsList
+ * Access the tasks
*/
- protected function getStatistics()
+ protected function getTasks(): TaskList
{
- if (!$this->_statistics) {
- $this->_statistics = new WorkspaceStatisticsList($this->version, $this->solution['sid']);
+ if (!$this->_tasks) {
+ $this->_tasks = new TaskList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_statistics;
+ return $this->_tasks;
}
/**
- * Access the realTimeStatistics
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\WorkspaceRealTimeStatisticsList
+ * Access the cumulativeStatistics
*/
- protected function getRealTimeStatistics()
+ protected function getCumulativeStatistics(): WorkspaceCumulativeStatisticsList
{
- if (!$this->_realTimeStatistics) {
- $this->_realTimeStatistics = new WorkspaceRealTimeStatisticsList(
+ if (!$this->_cumulativeStatistics) {
+ $this->_cumulativeStatistics = new WorkspaceCumulativeStatisticsList(
$this->version,
$this->solution['sid']
);
}
- return $this->_realTimeStatistics;
+ return $this->_cumulativeStatistics;
}
/**
- * Access the cumulativeStatistics
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\WorkspaceCumulativeStatisticsList
+ * Access the realTimeStatistics
*/
- protected function getCumulativeStatistics()
+ protected function getRealTimeStatistics(): WorkspaceRealTimeStatisticsList
{
- if (!$this->_cumulativeStatistics) {
- $this->_cumulativeStatistics = new WorkspaceCumulativeStatisticsList(
+ if (!$this->_realTimeStatistics) {
+ $this->_realTimeStatistics = new WorkspaceRealTimeStatisticsList(
$this->version,
$this->solution['sid']
);
}
- return $this->_cumulativeStatistics;
+ return $this->_realTimeStatistics;
}
/**
- * Access the taskChannels
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskChannelList
+ * Access the statistics
*/
- protected function getTaskChannels()
+ protected function getStatistics(): WorkspaceStatisticsList
{
- if (!$this->_taskChannels) {
- $this->_taskChannels = new TaskChannelList($this->version, $this->solution['sid']);
+ if (!$this->_statistics) {
+ $this->_statistics = new WorkspaceStatisticsList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_taskChannels;
+ return $this->_statistics;
}
/**
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -307,10 +339,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -325,12 +357,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.WorkspaceContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/WorkspaceInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/WorkspaceInstance.php
index 183a726..0e83e87 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/WorkspaceInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/WorkspaceInstance.php
@@ -2,64 +2,82 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Taskrouter\V1;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Taskrouter\V1\Workspace\TaskQueueList;
+use Twilio\Rest\Taskrouter\V1\Workspace\EventList;
+use Twilio\Rest\Taskrouter\V1\Workspace\TaskChannelList;
+use Twilio\Rest\Taskrouter\V1\Workspace\ActivityList;
+use Twilio\Rest\Taskrouter\V1\Workspace\WorkerList;
+use Twilio\Rest\Taskrouter\V1\Workspace\WorkflowList;
+use Twilio\Rest\Taskrouter\V1\Workspace\TaskList;
+use Twilio\Rest\Taskrouter\V1\Workspace\WorkspaceCumulativeStatisticsList;
+use Twilio\Rest\Taskrouter\V1\Workspace\WorkspaceRealTimeStatisticsList;
+use Twilio\Rest\Taskrouter\V1\Workspace\WorkspaceStatisticsList;
+
/**
- * @property string $accountSid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $defaultActivityName
- * @property string $defaultActivitySid
- * @property string $eventCallbackUrl
- * @property string $eventsFilter
- * @property string $friendlyName
- * @property bool $multiTaskEnabled
- * @property string $sid
- * @property string $timeoutActivityName
- * @property string $timeoutActivitySid
+ * @property string|null $accountSid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $defaultActivityName
+ * @property string|null $defaultActivitySid
+ * @property string|null $eventCallbackUrl
+ * @property string|null $eventsFilter
+ * @property string|null $friendlyName
+ * @property bool|null $multiTaskEnabled
+ * @property string|null $sid
+ * @property string|null $timeoutActivityName
+ * @property string|null $timeoutActivitySid
* @property string $prioritizeQueueOrder
- * @property string $url
- * @property array $links
+ * @property string|null $url
+ * @property array|null $links
*/
class WorkspaceInstance extends InstanceResource
{
- protected $_activities = null;
- protected $_events = null;
- protected $_tasks = null;
- protected $_taskQueues = null;
- protected $_workers = null;
- protected $_workflows = null;
- protected $_statistics = null;
- protected $_realTimeStatistics = null;
- protected $_cumulativeStatistics = null;
- protected $_taskChannels = null;
+ protected $_taskQueues;
+ protected $_events;
+ protected $_taskChannels;
+ protected $_activities;
+ protected $_workers;
+ protected $_workflows;
+ protected $_tasks;
+ protected $_cumulativeStatistics;
+ protected $_realTimeStatistics;
+ protected $_statistics;
/**
* Initialize the WorkspaceInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The SID of the resource to fetch
- * @return \Twilio\Rest\Taskrouter\V1\WorkspaceInstance
+ * @param string $sid The SID of the Workspace resource to delete.
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
@@ -75,159 +93,144 @@ public function __construct(Version $version, array $payload, $sid = null)
'prioritizeQueueOrder' => Values::array_get($payload, 'prioritize_queue_order'),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Taskrouter\V1\WorkspaceContext Context for this
- * WorkspaceInstance
+ * @return WorkspaceContext Context for this WorkspaceInstance
*/
- protected function proxy()
+ protected function proxy(): WorkspaceContext
{
if (!$this->context) {
- $this->context = new WorkspaceContext($this->version, $this->solution['sid']);
+ $this->context = new WorkspaceContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a WorkspaceInstance
+ * Delete the WorkspaceInstance
*
- * @return WorkspaceInstance Fetched WorkspaceInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Update the WorkspaceInstance
+ * Fetch the WorkspaceInstance
*
- * @param array|Options $options Optional Arguments
- * @return WorkspaceInstance Updated WorkspaceInstance
+ * @return WorkspaceInstance Fetched WorkspaceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): WorkspaceInstance
{
- return $this->proxy()->update($options);
+
+ return $this->proxy()->fetch();
}
/**
- * Deletes the WorkspaceInstance
+ * Update the WorkspaceInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return WorkspaceInstance Updated WorkspaceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): WorkspaceInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->update($options);
}
/**
- * Access the activities
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\ActivityList
+ * Access the taskQueues
*/
- protected function getActivities()
+ protected function getTaskQueues(): TaskQueueList
{
- return $this->proxy()->activities;
+ return $this->proxy()->taskQueues;
}
/**
* Access the events
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\EventList
*/
- protected function getEvents()
+ protected function getEvents(): EventList
{
return $this->proxy()->events;
}
/**
- * Access the tasks
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskList
+ * Access the taskChannels
*/
- protected function getTasks()
+ protected function getTaskChannels(): TaskChannelList
{
- return $this->proxy()->tasks;
+ return $this->proxy()->taskChannels;
}
/**
- * Access the taskQueues
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskQueueList
+ * Access the activities
*/
- protected function getTaskQueues()
+ protected function getActivities(): ActivityList
{
- return $this->proxy()->taskQueues;
+ return $this->proxy()->activities;
}
/**
* Access the workers
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\WorkerList
*/
- protected function getWorkers()
+ protected function getWorkers(): WorkerList
{
return $this->proxy()->workers;
}
/**
* Access the workflows
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\WorkflowList
*/
- protected function getWorkflows()
+ protected function getWorkflows(): WorkflowList
{
return $this->proxy()->workflows;
}
/**
- * Access the statistics
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\WorkspaceStatisticsList
+ * Access the tasks
*/
- protected function getStatistics()
+ protected function getTasks(): TaskList
{
- return $this->proxy()->statistics;
+ return $this->proxy()->tasks;
}
/**
- * Access the realTimeStatistics
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\WorkspaceRealTimeStatisticsList
+ * Access the cumulativeStatistics
*/
- protected function getRealTimeStatistics()
+ protected function getCumulativeStatistics(): WorkspaceCumulativeStatisticsList
{
- return $this->proxy()->realTimeStatistics;
+ return $this->proxy()->cumulativeStatistics;
}
/**
- * Access the cumulativeStatistics
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\WorkspaceCumulativeStatisticsList
+ * Access the realTimeStatistics
*/
- protected function getCumulativeStatistics()
+ protected function getRealTimeStatistics(): WorkspaceRealTimeStatisticsList
{
- return $this->proxy()->cumulativeStatistics;
+ return $this->proxy()->realTimeStatistics;
}
/**
- * Access the taskChannels
- *
- * @return \Twilio\Rest\Taskrouter\V1\Workspace\TaskChannelList
+ * Access the statistics
*/
- protected function getTaskChannels()
+ protected function getStatistics(): WorkspaceStatisticsList
{
- return $this->proxy()->taskChannels;
+ return $this->proxy()->statistics;
}
/**
@@ -237,7 +240,7 @@ protected function getTaskChannels()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -256,12 +259,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Taskrouter.V1.WorkspaceInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/WorkspaceList.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/WorkspaceList.php
index 12ceb77..64af1f4 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/WorkspaceList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/WorkspaceList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Taskrouter
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Taskrouter\V1;
@@ -12,56 +19,69 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class WorkspaceList extends ListResource
-{
+ {
/**
* Construct the WorkspaceList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Taskrouter\V1\WorkspaceList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/Workspaces';
}
/**
- * Streams WorkspaceInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the WorkspaceInstance
*
+ * @param string $friendlyName A descriptive string that you create to describe the Workspace resource. It can be up to 64 characters long. For example: `Customer Support` or `2014 Election Campaign`.
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return WorkspaceInstance Created WorkspaceInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function create(string $friendlyName, array $options = []): WorkspaceInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($options, $limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'FriendlyName' =>
+ $friendlyName,
+ 'EventCallbackUrl' =>
+ $options['eventCallbackUrl'],
+ 'EventsFilter' =>
+ $options['eventsFilter'],
+ 'MultiTaskEnabled' =>
+ Serialize::booleanToString($options['multiTaskEnabled']),
+ 'Template' =>
+ $options['template'],
+ 'PrioritizeQueueOrder' =>
+ $options['prioritizeQueueOrder'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new WorkspaceInstance(
+ $this->version,
+ $payload
+ );
}
+
/**
* Reads WorkspaceInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -78,36 +98,66 @@ public function stream($options = array(), $limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return WorkspaceInstance[] Array of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
+ /**
+ * Streams WorkspaceInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of WorkspaceInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of WorkspaceInstance
+ * @return WorkspacePage Page of WorkspaceInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): WorkspacePage
{
$options = new Values($options);
- $params = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
+
+ $params = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new WorkspacePage($this->version, $response, $this->solution);
}
@@ -117,9 +167,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of WorkspaceInstance
+ * @return WorkspacePage Page of WorkspaceInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): WorkspacePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -129,46 +179,21 @@ public function getPage($targetUrl)
return new WorkspacePage($this->version, $response, $this->solution);
}
- /**
- * Create a new WorkspaceInstance
- *
- * @param string $friendlyName A string to describe the Workspace resource
- * @param array|Options $options Optional Arguments
- * @return WorkspaceInstance Newly created WorkspaceInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($friendlyName, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'FriendlyName' => $friendlyName,
- 'EventCallbackUrl' => $options['eventCallbackUrl'],
- 'EventsFilter' => $options['eventsFilter'],
- 'MultiTaskEnabled' => Serialize::booleanToString($options['multiTaskEnabled']),
- 'Template' => $options['template'],
- 'PrioritizeQueueOrder' => $options['prioritizeQueueOrder'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new WorkspaceInstance($this->version, $payload);
- }
/**
* Constructs a WorkspaceContext
*
- * @param string $sid The SID of the resource to fetch
- * @return \Twilio\Rest\Taskrouter\V1\WorkspaceContext
+ * @param string $sid The SID of the Workspace resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): WorkspaceContext
{
- return new WorkspaceContext($this->version, $sid);
+ return new WorkspaceContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -176,8 +201,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.WorkspaceList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/WorkspaceOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/WorkspaceOptions.php
index 8bcbd05..f498bee 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/WorkspaceOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/WorkspaceOptions.php
@@ -1,10 +1,16 @@
options['defaultActivitySid'] = $defaultActivitySid;
+ public function __construct(
+
+ string $eventCallbackUrl = Values::NONE,
+ string $eventsFilter = Values::NONE,
+ bool $multiTaskEnabled = Values::BOOL_NONE,
+ string $template = Values::NONE,
+ string $prioritizeQueueOrder = Values::NONE
+
+ ) {
$this->options['eventCallbackUrl'] = $eventCallbackUrl;
$this->options['eventsFilter'] = $eventsFilter;
- $this->options['friendlyName'] = $friendlyName;
$this->options['multiTaskEnabled'] = $multiTaskEnabled;
- $this->options['timeoutActivitySid'] = $timeoutActivitySid;
+ $this->options['template'] = $template;
$this->options['prioritizeQueueOrder'] = $prioritizeQueueOrder;
}
/**
- * The SID of the Activity that will be used when new Workers are created in the Workspace.
+ * The URL we should call when an event occurs. If provided, the Workspace will publish events to this URL, for example, to collect data for reporting. See [Workspace Events](https://www.twilio.com/docs/taskrouter/api/event) for more information. This parameter supports Twilio's [Webhooks (HTTP callbacks) Connection Overrides](https://www.twilio.com/docs/usage/webhooks/webhooks-connection-overrides).
*
- * @param string $defaultActivitySid The SID of the Activity that will be used
- * when new Workers are created in the
- * Workspace
+ * @param string $eventCallbackUrl The URL we should call when an event occurs. If provided, the Workspace will publish events to this URL, for example, to collect data for reporting. See [Workspace Events](https://www.twilio.com/docs/taskrouter/api/event) for more information. This parameter supports Twilio's [Webhooks (HTTP callbacks) Connection Overrides](https://www.twilio.com/docs/usage/webhooks/webhooks-connection-overrides).
* @return $this Fluent Builder
*/
- public function setDefaultActivitySid($defaultActivitySid)
- {
- $this->options['defaultActivitySid'] = $defaultActivitySid;
- return $this;
- }
-
- /**
- * The URL we should call when an event occurs. See [Workspace Events](https://www.twilio.com/docs/taskrouter/api/event) for more information.
- *
- * @param string $eventCallbackUrl The URL we should call when an event occurs
- * @return $this Fluent Builder
- */
- public function setEventCallbackUrl($eventCallbackUrl)
+ public function setEventCallbackUrl(string $eventCallbackUrl): self
{
$this->options['eventCallbackUrl'] = $eventCallbackUrl;
return $this;
}
/**
- * The list of Workspace events for which to call event_callback_url. For example if `EventsFilter=task.created,task.canceled,worker.activity.update`, then TaskRouter will call event_callback_url only when a task is created, canceled, or a Worker activity is updated.
+ * The list of Workspace events for which to call event_callback_url. For example, if `EventsFilter=task.created, task.canceled, worker.activity.update`, then TaskRouter will call event_callback_url only when a task is created, canceled, or a Worker activity is updated.
*
- * @param string $eventsFilter The list of Workspace events for which to call
- * event_callback_url
+ * @param string $eventsFilter The list of Workspace events for which to call event_callback_url. For example, if `EventsFilter=task.created, task.canceled, worker.activity.update`, then TaskRouter will call event_callback_url only when a task is created, canceled, or a Worker activity is updated.
* @return $this Fluent Builder
*/
- public function setEventsFilter($eventsFilter)
+ public function setEventsFilter(string $eventsFilter): self
{
$this->options['eventsFilter'] = $eventsFilter;
return $this;
}
/**
- * A descriptive string that you create to describe the Workspace resource. For example: `Sales Call Center` or `Customer Support Team`.
- *
- * @param string $friendlyName A string to describe the Workspace resource
- * @return $this Fluent Builder
- */
- public function setFriendlyName($friendlyName)
- {
- $this->options['friendlyName'] = $friendlyName;
- return $this;
- }
-
- /**
- * Whether to enable multi-tasking. Can be: `true` to enable multi-tasking, or `false` to disable it. The default is `false`. Multi-tasking allows Workers to handle multiple Tasks simultaneously. When enabled (`true`), each Worker can receive parallel reservations up to the per-channel maximums defined in the Workers section. Otherwise, each Worker will only receive a new reservation when the previous task is completed. Learn more at [Multitasking][https://www.twilio.com/docs/taskrouter/multitasking].
+ * Whether to enable multi-tasking. Can be: `true` to enable multi-tasking, or `false` to disable it. However, all workspaces should be created as multi-tasking. The default is `true`. Multi-tasking allows Workers to handle multiple Tasks simultaneously. When enabled (`true`), each Worker can receive parallel reservations up to the per-channel maximums defined in the Workers section. In single-tasking mode (legacy mode), each Worker will only receive a new reservation when the previous task is completed. Learn more at [Multitasking](https://www.twilio.com/docs/taskrouter/multitasking).
*
- * @param bool $multiTaskEnabled Whether multi-tasking is enabled
+ * @param bool $multiTaskEnabled Whether to enable multi-tasking. Can be: `true` to enable multi-tasking, or `false` to disable it. However, all workspaces should be created as multi-tasking. The default is `true`. Multi-tasking allows Workers to handle multiple Tasks simultaneously. When enabled (`true`), each Worker can receive parallel reservations up to the per-channel maximums defined in the Workers section. In single-tasking mode (legacy mode), each Worker will only receive a new reservation when the previous task is completed. Learn more at [Multitasking](https://www.twilio.com/docs/taskrouter/multitasking).
* @return $this Fluent Builder
*/
- public function setMultiTaskEnabled($multiTaskEnabled)
+ public function setMultiTaskEnabled(bool $multiTaskEnabled): self
{
$this->options['multiTaskEnabled'] = $multiTaskEnabled;
return $this;
}
/**
- * The SID of the Activity that will be assigned to a Worker when a Task reservation times out without a response.
+ * An available template name. Can be: `NONE` or `FIFO` and the default is `NONE`. Pre-configures the Workspace with the Workflow and Activities specified in the template. `NONE` will create a Workspace with only a set of default activities. `FIFO` will configure TaskRouter with a set of default activities and a single TaskQueue for first-in, first-out distribution, which can be useful when you are getting started with TaskRouter.
*
- * @param string $timeoutActivitySid The SID of the Activity that will be
- * assigned to a Worker when a Task
- * reservation times out without a response
+ * @param string $template An available template name. Can be: `NONE` or `FIFO` and the default is `NONE`. Pre-configures the Workspace with the Workflow and Activities specified in the template. `NONE` will create a Workspace with only a set of default activities. `FIFO` will configure TaskRouter with a set of default activities and a single TaskQueue for first-in, first-out distribution, which can be useful when you are getting started with TaskRouter.
* @return $this Fluent Builder
*/
- public function setTimeoutActivitySid($timeoutActivitySid)
+ public function setTemplate(string $template): self
{
- $this->options['timeoutActivitySid'] = $timeoutActivitySid;
+ $this->options['template'] = $template;
return $this;
}
/**
- * The type of TaskQueue to prioritize when Workers are receiving Tasks from both types of TaskQueues. Can be: `LIFO` or `FIFO` and the default is `FIFO`. For more information, see [Queue Ordering][https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo].
- *
- * @param string $prioritizeQueueOrder The type of TaskQueue to prioritize when
- * Workers are receiving Tasks from both
- * types of TaskQueues
+ * @param string $prioritizeQueueOrder
* @return $this Fluent Builder
*/
- public function setPrioritizeQueueOrder($prioritizeQueueOrder)
+ public function setPrioritizeQueueOrder(string $prioritizeQueueOrder): self
{
$this->options['prioritizeQueueOrder'] = $prioritizeQueueOrder;
return $this;
@@ -188,37 +187,35 @@ public function setPrioritizeQueueOrder($prioritizeQueueOrder)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Taskrouter.V1.UpdateWorkspaceOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.CreateWorkspaceOptions ' . $options . ']';
}
}
+
+
class ReadWorkspaceOptions extends Options
-{
+ {
/**
- * @param string $friendlyName The friendly_name of the Workspace resources to
- * read
+ * @param string $friendlyName The `friendly_name` of the Workspace resources to read. For example `Customer Support` or `2014 Election Campaign`.
*/
- public function __construct($friendlyName = Values::NONE)
- {
+ public function __construct(
+
+ string $friendlyName = Values::NONE
+
+ ) {
$this->options['friendlyName'] = $friendlyName;
}
/**
* The `friendly_name` of the Workspace resources to read. For example `Customer Support` or `2014 Election Campaign`.
*
- * @param string $friendlyName The friendly_name of the Workspace resources to
- * read
+ * @param string $friendlyName The `friendly_name` of the Workspace resources to read. For example `Customer Support` or `2014 Election Campaign`.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -229,46 +226,63 @@ public function setFriendlyName($friendlyName)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Taskrouter.V1.ReadWorkspaceOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.ReadWorkspaceOptions ' . $options . ']';
}
}
-class CreateWorkspaceOptions extends Options
-{
+class UpdateWorkspaceOptions extends Options
+ {
/**
- * @param string $eventCallbackUrl The URL we should call when an event occurs
- * @param string $eventsFilter The list of Workspace events for which to call
- * event_callback_url
- * @param bool $multiTaskEnabled Whether multi-tasking is enabled
- * @param string $template An available template name
- * @param string $prioritizeQueueOrder The type of TaskQueue to prioritize when
- * Workers are receiving Tasks from both
- * types of TaskQueues
+ * @param string $defaultActivitySid The SID of the Activity that will be used when new Workers are created in the Workspace.
+ * @param string $eventCallbackUrl The URL we should call when an event occurs. See [Workspace Events](https://www.twilio.com/docs/taskrouter/api/event) for more information. This parameter supports Twilio's [Webhooks (HTTP callbacks) Connection Overrides](https://www.twilio.com/docs/usage/webhooks/webhooks-connection-overrides).
+ * @param string $eventsFilter The list of Workspace events for which to call event_callback_url. For example if `EventsFilter=task.created,task.canceled,worker.activity.update`, then TaskRouter will call event_callback_url only when a task is created, canceled, or a Worker activity is updated.
+ * @param string $friendlyName A descriptive string that you create to describe the Workspace resource. For example: `Sales Call Center` or `Customer Support Team`.
+ * @param bool $multiTaskEnabled Whether to enable multi-tasking. Can be: `true` to enable multi-tasking, or `false` to disable it. However, all workspaces should be maintained as multi-tasking. There is no default when omitting this parameter. A multi-tasking Workspace can't be updated to single-tasking unless it is not a Flex Project and another (legacy) single-tasking Workspace exists. Multi-tasking allows Workers to handle multiple Tasks simultaneously. In multi-tasking mode, each Worker can receive parallel reservations up to the per-channel maximums defined in the Workers section. In single-tasking mode (legacy mode), each Worker will only receive a new reservation when the previous task is completed. Learn more at [Multitasking](https://www.twilio.com/docs/taskrouter/multitasking).
+ * @param string $timeoutActivitySid The SID of the Activity that will be assigned to a Worker when a Task reservation times out without a response.
+ * @param string $prioritizeQueueOrder
*/
- public function __construct($eventCallbackUrl = Values::NONE, $eventsFilter = Values::NONE, $multiTaskEnabled = Values::NONE, $template = Values::NONE, $prioritizeQueueOrder = Values::NONE)
- {
+ public function __construct(
+
+ string $defaultActivitySid = Values::NONE,
+ string $eventCallbackUrl = Values::NONE,
+ string $eventsFilter = Values::NONE,
+ string $friendlyName = Values::NONE,
+ bool $multiTaskEnabled = Values::BOOL_NONE,
+ string $timeoutActivitySid = Values::NONE,
+ string $prioritizeQueueOrder = Values::NONE
+
+ ) {
+ $this->options['defaultActivitySid'] = $defaultActivitySid;
$this->options['eventCallbackUrl'] = $eventCallbackUrl;
$this->options['eventsFilter'] = $eventsFilter;
+ $this->options['friendlyName'] = $friendlyName;
$this->options['multiTaskEnabled'] = $multiTaskEnabled;
- $this->options['template'] = $template;
+ $this->options['timeoutActivitySid'] = $timeoutActivitySid;
$this->options['prioritizeQueueOrder'] = $prioritizeQueueOrder;
}
/**
- * The URL we should call when an event occurs. If provided, the Workspace will publish events to this URL, for example, to collect data for reporting. See [Workspace Events](https://www.twilio.com/docs/taskrouter/api/event) for more information.
+ * The SID of the Activity that will be used when new Workers are created in the Workspace.
*
- * @param string $eventCallbackUrl The URL we should call when an event occurs
+ * @param string $defaultActivitySid The SID of the Activity that will be used when new Workers are created in the Workspace.
* @return $this Fluent Builder
*/
- public function setEventCallbackUrl($eventCallbackUrl)
+ public function setDefaultActivitySid(string $defaultActivitySid): self
+ {
+ $this->options['defaultActivitySid'] = $defaultActivitySid;
+ return $this;
+ }
+
+ /**
+ * The URL we should call when an event occurs. See [Workspace Events](https://www.twilio.com/docs/taskrouter/api/event) for more information. This parameter supports Twilio's [Webhooks (HTTP callbacks) Connection Overrides](https://www.twilio.com/docs/usage/webhooks/webhooks-connection-overrides).
+ *
+ * @param string $eventCallbackUrl The URL we should call when an event occurs. See [Workspace Events](https://www.twilio.com/docs/taskrouter/api/event) for more information. This parameter supports Twilio's [Webhooks (HTTP callbacks) Connection Overrides](https://www.twilio.com/docs/usage/webhooks/webhooks-connection-overrides).
+ * @return $this Fluent Builder
+ */
+ public function setEventCallbackUrl(string $eventCallbackUrl): self
{
$this->options['eventCallbackUrl'] = $eventCallbackUrl;
return $this;
@@ -277,49 +291,56 @@ public function setEventCallbackUrl($eventCallbackUrl)
/**
* The list of Workspace events for which to call event_callback_url. For example if `EventsFilter=task.created,task.canceled,worker.activity.update`, then TaskRouter will call event_callback_url only when a task is created, canceled, or a Worker activity is updated.
*
- * @param string $eventsFilter The list of Workspace events for which to call
- * event_callback_url
+ * @param string $eventsFilter The list of Workspace events for which to call event_callback_url. For example if `EventsFilter=task.created,task.canceled,worker.activity.update`, then TaskRouter will call event_callback_url only when a task is created, canceled, or a Worker activity is updated.
* @return $this Fluent Builder
*/
- public function setEventsFilter($eventsFilter)
+ public function setEventsFilter(string $eventsFilter): self
{
$this->options['eventsFilter'] = $eventsFilter;
return $this;
}
/**
- * Whether to enable multi-tasking. Can be: `true` to enable multi-tasking, or `false` to disable it. The default is `false`. Multi-tasking allows Workers to handle multiple Tasks simultaneously. When enabled (`true`), each Worker can receive parallel reservations up to the per-channel maximums defined in the Workers section. Otherwise, each Worker will only receive a new reservation when the previous task is completed. Learn more at [Multitasking][https://www.twilio.com/docs/taskrouter/multitasking].
+ * A descriptive string that you create to describe the Workspace resource. For example: `Sales Call Center` or `Customer Support Team`.
*
- * @param bool $multiTaskEnabled Whether multi-tasking is enabled
+ * @param string $friendlyName A descriptive string that you create to describe the Workspace resource. For example: `Sales Call Center` or `Customer Support Team`.
* @return $this Fluent Builder
*/
- public function setMultiTaskEnabled($multiTaskEnabled)
+ public function setFriendlyName(string $friendlyName): self
{
- $this->options['multiTaskEnabled'] = $multiTaskEnabled;
+ $this->options['friendlyName'] = $friendlyName;
return $this;
}
/**
- * An available template name. Can be: `NONE` or `FIFO` and the default is `NONE`. Pre-configures the Workspace with the Workflow and Activities specified in the template. `NONE` will create a Workspace with only a set of default activities. `FIFO` will configure TaskRouter with a set of default activities and a single TaskQueue for first-in, first-out distribution, which can be useful when you are getting started with TaskRouter.
+ * Whether to enable multi-tasking. Can be: `true` to enable multi-tasking, or `false` to disable it. However, all workspaces should be maintained as multi-tasking. There is no default when omitting this parameter. A multi-tasking Workspace can't be updated to single-tasking unless it is not a Flex Project and another (legacy) single-tasking Workspace exists. Multi-tasking allows Workers to handle multiple Tasks simultaneously. In multi-tasking mode, each Worker can receive parallel reservations up to the per-channel maximums defined in the Workers section. In single-tasking mode (legacy mode), each Worker will only receive a new reservation when the previous task is completed. Learn more at [Multitasking](https://www.twilio.com/docs/taskrouter/multitasking).
*
- * @param string $template An available template name
+ * @param bool $multiTaskEnabled Whether to enable multi-tasking. Can be: `true` to enable multi-tasking, or `false` to disable it. However, all workspaces should be maintained as multi-tasking. There is no default when omitting this parameter. A multi-tasking Workspace can't be updated to single-tasking unless it is not a Flex Project and another (legacy) single-tasking Workspace exists. Multi-tasking allows Workers to handle multiple Tasks simultaneously. In multi-tasking mode, each Worker can receive parallel reservations up to the per-channel maximums defined in the Workers section. In single-tasking mode (legacy mode), each Worker will only receive a new reservation when the previous task is completed. Learn more at [Multitasking](https://www.twilio.com/docs/taskrouter/multitasking).
* @return $this Fluent Builder
*/
- public function setTemplate($template)
+ public function setMultiTaskEnabled(bool $multiTaskEnabled): self
{
- $this->options['template'] = $template;
+ $this->options['multiTaskEnabled'] = $multiTaskEnabled;
return $this;
}
/**
- * The type of TaskQueue to prioritize when Workers are receiving Tasks from both types of TaskQueues. Can be: `LIFO` or `FIFO` and the default is `FIFO`. For more information, see [Queue Ordering][https://www.twilio.com/docs/taskrouter/queue-ordering-last-first-out-lifo].
+ * The SID of the Activity that will be assigned to a Worker when a Task reservation times out without a response.
*
- * @param string $prioritizeQueueOrder The type of TaskQueue to prioritize when
- * Workers are receiving Tasks from both
- * types of TaskQueues
+ * @param string $timeoutActivitySid The SID of the Activity that will be assigned to a Worker when a Task reservation times out without a response.
* @return $this Fluent Builder
*/
- public function setPrioritizeQueueOrder($prioritizeQueueOrder)
+ public function setTimeoutActivitySid(string $timeoutActivitySid): self
+ {
+ $this->options['timeoutActivitySid'] = $timeoutActivitySid;
+ return $this;
+ }
+
+ /**
+ * @param string $prioritizeQueueOrder
+ * @return $this Fluent Builder
+ */
+ public function setPrioritizeQueueOrder(string $prioritizeQueueOrder): self
{
$this->options['prioritizeQueueOrder'] = $prioritizeQueueOrder;
return $this;
@@ -330,14 +351,10 @@ public function setPrioritizeQueueOrder($prioritizeQueueOrder)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Taskrouter.V1.CreateWorkspaceOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Taskrouter.V1.UpdateWorkspaceOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/WorkspacePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/WorkspacePage.php
index fa3fa74..ed544a7 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/WorkspacePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/WorkspacePage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return WorkspaceInstance \Twilio\Rest\Taskrouter\V1\WorkspaceInstance
+ */
+ public function buildInstance(array $payload): WorkspaceInstance
{
return new WorkspaceInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Taskrouter.V1.WorkspacePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Trunking.php b/vendor/twilio/sdk/src/Twilio/Rest/Trunking.php
index cc9e89e..52231c5 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Trunking.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Trunking.php
@@ -1,111 +1,24 @@
baseUrl = 'https://trunking.twilio.com';
- }
+class Trunking extends TrunkingBase {
/**
- * @return \Twilio\Rest\Trunking\V1 Version v1 of trunking
+ * @deprecated Use v1->trunks instead.
*/
- protected function getV1()
- {
- if (!$this->_v1) {
- $this->_v1 = new V1($this);
- }
- return $this->_v1;
- }
-
- /**
- * Magic getter to lazy load version
- *
- * @param string $name Version to return
- * @return \Twilio\Version The requested version
- * @throws TwilioException For unknown versions
- */
- public function __get($name)
- {
- $method = 'get' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return $this->$method();
- }
-
- throw new TwilioException('Unknown version ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $method = 'context' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return \call_user_func_array(array($this, $method), $arguments);
- }
-
- throw new TwilioException('Unknown context ' . $name);
- }
-
- /**
- * @return \Twilio\Rest\Trunking\V1\TrunkList
- */
- protected function getTrunks()
- {
+ protected function getTrunks(): \Twilio\Rest\Trunking\V1\TrunkList {
+ echo "trunks is deprecated. Use v1->trunks instead.";
return $this->v1->trunks;
}
/**
+ * @deprecated Use v1->trunks(\$sid) instead.
* @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Trunking\V1\TrunkContext
*/
- protected function contextTrunks($sid)
- {
+ protected function contextTrunks(string $sid): \Twilio\Rest\Trunking\V1\TrunkContext {
+ echo "trunks(\$sid) is deprecated. Use v1->trunks(\$sid) instead.";
return $this->v1->trunks($sid);
}
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Trunking]';
- }
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1.php b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1.php
index 4f1a8cb..5ae6aa3 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1.php
@@ -1,32 +1,38 @@
version = 'v1';
}
- /**
- * @return \Twilio\Rest\Trunking\V1\TrunkList
- */
- protected function getTrunks()
+ protected function getTrunks(): TrunkList
{
if (!$this->_trunks) {
$this->_trunks = new TrunkList($this);
@@ -52,7 +55,7 @@ protected function getTrunks()
* @return \Twilio\ListResource The requested resource
* @throws TwilioException For unknown resource
*/
- public function __get($name)
+ public function __get(string $name)
{
$method = 'get' . \ucfirst($name);
if (\method_exists($this, $method)) {
@@ -67,10 +70,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -85,8 +88,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Trunking.V1]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/CredentialListContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/CredentialListContext.php
index cbf89cd..5bc8d90 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/CredentialListContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/CredentialListContext.php
@@ -2,54 +2,81 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Trunking
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Trunking\V1\Trunk;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class CredentialListContext extends InstanceContext
-{
+ {
/**
* Initialize the CredentialListContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $trunkSid The SID of the Trunk from which to fetch the
- * credential list
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Trunking\V1\Trunk\CredentialListContext
+ * @param Version $version Version that contains the resource
+ * @param string $trunkSid The SID of the Trunk to associate the credential list with.
+ * @param string $sid The unique string that we created to identify the CredentialList resource to delete.
*/
- public function __construct(Version $version, $trunkSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $trunkSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('trunkSid' => $trunkSid, 'sid' => $sid,);
+ $this->solution = [
+ 'trunkSid' =>
+ $trunkSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Trunks/' . \rawurlencode($trunkSid)
+ .'/CredentialLists/' . \rawurlencode($sid)
+ .'';
+ }
+
+ /**
+ * Delete the CredentialListInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Trunks/' . \rawurlencode($trunkSid) . '/CredentialLists/' . \rawurlencode($sid) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a CredentialListInstance
+ * Fetch the CredentialListInstance
*
* @return CredentialListInstance Fetched CredentialListInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): CredentialListInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new CredentialListInstance(
$this->version,
@@ -59,28 +86,18 @@ public function fetch()
);
}
- /**
- * Deletes the CredentialListInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Trunking.V1.CredentialListContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/CredentialListInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/CredentialListInstance.php
index 49397b8..779adb0 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/CredentialListInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/CredentialListInstance.php
@@ -2,46 +2,53 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Trunking
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Trunking\V1\Trunk;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property string $sid
- * @property string $trunkSid
- * @property string $friendlyName
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
+ * @property string|null $accountSid
+ * @property string|null $sid
+ * @property string|null $trunkSid
+ * @property string|null $friendlyName
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
*/
class CredentialListInstance extends InstanceResource
{
/**
* Initialize the CredentialListInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $trunkSid The SID of the Trunk the credential list in
- * associated with
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Trunking\V1\Trunk\CredentialListInstance
+ * @param string $trunkSid The SID of the Trunk to associate the credential list with.
+ * @param string $sid The unique string that we created to identify the CredentialList resource to delete.
*/
- public function __construct(Version $version, array $payload, $trunkSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $trunkSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'sid' => Values::array_get($payload, 'sid'),
'trunkSid' => Values::array_get($payload, 'trunk_sid'),
@@ -49,20 +56,18 @@ public function __construct(Version $version, array $payload, $trunkSid, $sid =
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('trunkSid' => $trunkSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['trunkSid' => $trunkSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Trunking\V1\Trunk\CredentialListContext Context for
- * this
- * CredentialListInstance
+ * @return CredentialListContext Context for this CredentialListInstance
*/
- protected function proxy()
+ protected function proxy(): CredentialListContext
{
if (!$this->context) {
$this->context = new CredentialListContext(
@@ -76,25 +81,27 @@ protected function proxy()
}
/**
- * Fetch a CredentialListInstance
+ * Delete the CredentialListInstance
*
- * @return CredentialListInstance Fetched CredentialListInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the CredentialListInstance
+ * Fetch the CredentialListInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return CredentialListInstance Fetched CredentialListInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): CredentialListInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -104,7 +111,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -123,12 +130,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Trunking.V1.CredentialListInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/CredentialListList.php b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/CredentialListList.php
index a7742af..1076c6b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/CredentialListList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/CredentialListList.php
@@ -2,58 +2,96 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Trunking
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Trunking\V1\Trunk;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class CredentialListList extends ListResource
-{
+ {
/**
* Construct the CredentialListList
*
* @param Version $version Version that contains the resource
- * @param string $trunkSid The SID of the Trunk the credential list in
- * associated with
- * @return \Twilio\Rest\Trunking\V1\Trunk\CredentialListList
+ * @param string $trunkSid The SID of the Trunk to associate the credential list with.
*/
- public function __construct(Version $version, $trunkSid)
- {
+ public function __construct(
+ Version $version,
+ string $trunkSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('trunkSid' => $trunkSid,);
-
- $this->uri = '/Trunks/' . \rawurlencode($trunkSid) . '/CredentialLists';
+ $this->solution = [
+ 'trunkSid' =>
+ $trunkSid,
+
+ ];
+
+ $this->uri = '/Trunks/' . \rawurlencode($trunkSid)
+ .'/CredentialLists';
}
/**
- * Create a new CredentialListInstance
+ * Create the CredentialListInstance
*
- * @param string $credentialListSid The SID of the Credential List that you
- * want to associate with the trunk
- * @return CredentialListInstance Newly created CredentialListInstance
+ * @param string $credentialListSid The SID of the [Credential List](https://www.twilio.com/docs/voice/sip/api/sip-credentiallist-resource) that you want to associate with the trunk. Once associated, we will authenticate access to the trunk against this list.
+ * @return CredentialListInstance Created CredentialListInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($credentialListSid)
+ public function create(string $credentialListSid): CredentialListInstance
{
- $data = Values::of(array('CredentialListSid' => $credentialListSid,));
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'CredentialListSid' =>
+ $credentialListSid,
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new CredentialListInstance(
+ $this->version,
+ $payload,
+ $this->solution['trunkSid']
);
+ }
- return new CredentialListInstance($this->version, $payload, $this->solution['trunkSid']);
+
+ /**
+ * Reads CredentialListInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return CredentialListInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -72,9 +110,9 @@ public function create($credentialListSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -83,26 +121,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads CredentialListInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return CredentialListInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of CredentialListInstance records from the API.
* Request is executed immediately
@@ -110,21 +128,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of CredentialListInstance
+ * @return CredentialListPage Page of CredentialListInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): CredentialListPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new CredentialListPage($this->version, $response, $this->solution);
}
@@ -134,9 +153,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of CredentialListInstance
+ * @return CredentialListPage Page of CredentialListInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): CredentialListPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -146,15 +165,22 @@ public function getPage($targetUrl)
return new CredentialListPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a CredentialListContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Trunking\V1\Trunk\CredentialListContext
+ * @param string $sid The unique string that we created to identify the CredentialList resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): CredentialListContext
{
- return new CredentialListContext($this->version, $this->solution['trunkSid'], $sid);
+ return new CredentialListContext(
+ $this->version,
+ $this->solution['trunkSid'],
+ $sid
+ );
}
/**
@@ -162,8 +188,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Trunking.V1.CredentialListList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/CredentialListPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/CredentialListPage.php
index 78dc615..a5e0c79 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/CredentialListPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/CredentialListPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return CredentialListInstance \Twilio\Rest\Trunking\V1\Trunk\CredentialListInstance
+ */
+ public function buildInstance(array $payload): CredentialListInstance
{
return new CredentialListInstance($this->version, $payload, $this->solution['trunkSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Trunking.V1.CredentialListPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/IpAccessControlListContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/IpAccessControlListContext.php
index 2edab17..6122b00 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/IpAccessControlListContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/IpAccessControlListContext.php
@@ -2,54 +2,81 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Trunking
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Trunking\V1\Trunk;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class IpAccessControlListContext extends InstanceContext
-{
+ {
/**
* Initialize the IpAccessControlListContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $trunkSid The SID of the Trunk from which to fetch the IP
- * Access Control List
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Trunking\V1\Trunk\IpAccessControlListContext
+ * @param Version $version Version that contains the resource
+ * @param string $trunkSid The SID of the Trunk to associate the IP Access Control List with.
+ * @param string $sid The unique string that we created to identify the IpAccessControlList resource to delete.
*/
- public function __construct(Version $version, $trunkSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $trunkSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('trunkSid' => $trunkSid, 'sid' => $sid,);
+ $this->solution = [
+ 'trunkSid' =>
+ $trunkSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Trunks/' . \rawurlencode($trunkSid)
+ .'/IpAccessControlLists/' . \rawurlencode($sid)
+ .'';
+ }
+
+ /**
+ * Delete the IpAccessControlListInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Trunks/' . \rawurlencode($trunkSid) . '/IpAccessControlLists/' . \rawurlencode($sid) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a IpAccessControlListInstance
+ * Fetch the IpAccessControlListInstance
*
* @return IpAccessControlListInstance Fetched IpAccessControlListInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): IpAccessControlListInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new IpAccessControlListInstance(
$this->version,
@@ -59,28 +86,18 @@ public function fetch()
);
}
- /**
- * Deletes the IpAccessControlListInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Trunking.V1.IpAccessControlListContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/IpAccessControlListInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/IpAccessControlListInstance.php
index f5f91c6..78f210f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/IpAccessControlListInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/IpAccessControlListInstance.php
@@ -2,45 +2,53 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Trunking
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Trunking\V1\Trunk;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property string $sid
- * @property string $trunkSid
- * @property string $friendlyName
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
+ * @property string|null $accountSid
+ * @property string|null $sid
+ * @property string|null $trunkSid
+ * @property string|null $friendlyName
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
*/
class IpAccessControlListInstance extends InstanceResource
{
/**
* Initialize the IpAccessControlListInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $trunkSid The SID of the Trunk the resource is associated with
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Trunking\V1\Trunk\IpAccessControlListInstance
+ * @param string $trunkSid The SID of the Trunk to associate the IP Access Control List with.
+ * @param string $sid The unique string that we created to identify the IpAccessControlList resource to delete.
*/
- public function __construct(Version $version, array $payload, $trunkSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $trunkSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'sid' => Values::array_get($payload, 'sid'),
'trunkSid' => Values::array_get($payload, 'trunk_sid'),
@@ -48,20 +56,18 @@ public function __construct(Version $version, array $payload, $trunkSid, $sid =
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('trunkSid' => $trunkSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['trunkSid' => $trunkSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Trunking\V1\Trunk\IpAccessControlListContext Context
- * for this
- * IpAccessControlListInstance
+ * @return IpAccessControlListContext Context for this IpAccessControlListInstance
*/
- protected function proxy()
+ protected function proxy(): IpAccessControlListContext
{
if (!$this->context) {
$this->context = new IpAccessControlListContext(
@@ -75,25 +81,27 @@ protected function proxy()
}
/**
- * Fetch a IpAccessControlListInstance
+ * Delete the IpAccessControlListInstance
*
- * @return IpAccessControlListInstance Fetched IpAccessControlListInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the IpAccessControlListInstance
+ * Fetch the IpAccessControlListInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return IpAccessControlListInstance Fetched IpAccessControlListInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): IpAccessControlListInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -103,7 +111,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -122,12 +130,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Trunking.V1.IpAccessControlListInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/IpAccessControlListList.php b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/IpAccessControlListList.php
index 6d7d320..35031d4 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/IpAccessControlListList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/IpAccessControlListList.php
@@ -2,63 +2,100 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Trunking
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Trunking\V1\Trunk;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class IpAccessControlListList extends ListResource
-{
+ {
/**
* Construct the IpAccessControlListList
*
* @param Version $version Version that contains the resource
- * @param string $trunkSid The SID of the Trunk the resource is associated with
- * @return \Twilio\Rest\Trunking\V1\Trunk\IpAccessControlListList
+ * @param string $trunkSid The SID of the Trunk to associate the IP Access Control List with.
*/
- public function __construct(Version $version, $trunkSid)
- {
+ public function __construct(
+ Version $version,
+ string $trunkSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('trunkSid' => $trunkSid,);
-
- $this->uri = '/Trunks/' . \rawurlencode($trunkSid) . '/IpAccessControlLists';
+ $this->solution = [
+ 'trunkSid' =>
+ $trunkSid,
+
+ ];
+
+ $this->uri = '/Trunks/' . \rawurlencode($trunkSid)
+ .'/IpAccessControlLists';
}
/**
- * Create a new IpAccessControlListInstance
+ * Create the IpAccessControlListInstance
*
- * @param string $ipAccessControlListSid The SID of the IP Access Control List
- * that you want to associate with the
- * trunk
- * @return IpAccessControlListInstance Newly created IpAccessControlListInstance
+ * @param string $ipAccessControlListSid The SID of the [IP Access Control List](https://www.twilio.com/docs/voice/sip/api/sip-ipaccesscontrollist-resource) that you want to associate with the trunk.
+ * @return IpAccessControlListInstance Created IpAccessControlListInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($ipAccessControlListSid)
+ public function create(string $ipAccessControlListSid): IpAccessControlListInstance
{
- $data = Values::of(array('IpAccessControlListSid' => $ipAccessControlListSid,));
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'IpAccessControlListSid' =>
+ $ipAccessControlListSid,
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new IpAccessControlListInstance(
+ $this->version,
+ $payload,
+ $this->solution['trunkSid']
);
+ }
- return new IpAccessControlListInstance($this->version, $payload, $this->solution['trunkSid']);
+
+ /**
+ * Reads IpAccessControlListInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return IpAccessControlListInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
- * Streams IpAccessControlListInstance records from the API as a generator
- * stream.
+ * Streams IpAccessControlListInstance records from the API as a generator stream.
* This operation lazily loads records as efficiently as possible until the
* limit
* is reached.
@@ -73,9 +110,9 @@ public function create($ipAccessControlListSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -84,26 +121,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads IpAccessControlListInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return IpAccessControlListInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of IpAccessControlListInstance records from the API.
* Request is executed immediately
@@ -111,21 +128,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of IpAccessControlListInstance
+ * @return IpAccessControlListPage Page of IpAccessControlListInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): IpAccessControlListPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new IpAccessControlListPage($this->version, $response, $this->solution);
}
@@ -135,9 +153,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of IpAccessControlListInstance
+ * @return IpAccessControlListPage Page of IpAccessControlListInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): IpAccessControlListPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -147,15 +165,22 @@ public function getPage($targetUrl)
return new IpAccessControlListPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a IpAccessControlListContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Trunking\V1\Trunk\IpAccessControlListContext
+ * @param string $sid The unique string that we created to identify the IpAccessControlList resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): IpAccessControlListContext
{
- return new IpAccessControlListContext($this->version, $this->solution['trunkSid'], $sid);
+ return new IpAccessControlListContext(
+ $this->version,
+ $this->solution['trunkSid'],
+ $sid
+ );
}
/**
@@ -163,8 +188,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Trunking.V1.IpAccessControlListList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/IpAccessControlListPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/IpAccessControlListPage.php
index 98a5432..7057078 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/IpAccessControlListPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/IpAccessControlListPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return IpAccessControlListInstance \Twilio\Rest\Trunking\V1\Trunk\IpAccessControlListInstance
+ */
+ public function buildInstance(array $payload): IpAccessControlListInstance
{
return new IpAccessControlListInstance($this->version, $payload, $this->solution['trunkSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Trunking.V1.IpAccessControlListPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/OriginationUrlContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/OriginationUrlContext.php
index 3f76a55..6396a9a 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/OriginationUrlContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/OriginationUrlContext.php
@@ -2,56 +2,83 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Trunking
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Trunking\V1\Trunk;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
class OriginationUrlContext extends InstanceContext
-{
+ {
/**
* Initialize the OriginationUrlContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $trunkSid The SID of the Trunk from which to fetch the
- * OriginationUrl
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Trunking\V1\Trunk\OriginationUrlContext
+ * @param Version $version Version that contains the resource
+ * @param string $trunkSid The SID of the Trunk to associate the resource with.
+ * @param string $sid The unique string that we created to identify the OriginationUrl resource to delete.
*/
- public function __construct(Version $version, $trunkSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $trunkSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('trunkSid' => $trunkSid, 'sid' => $sid,);
+ $this->solution = [
+ 'trunkSid' =>
+ $trunkSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Trunks/' . \rawurlencode($trunkSid)
+ .'/OriginationUrls/' . \rawurlencode($sid)
+ .'';
+ }
+
+ /**
+ * Delete the OriginationUrlInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Trunks/' . \rawurlencode($trunkSid) . '/OriginationUrls/' . \rawurlencode($sid) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a OriginationUrlInstance
+ * Fetch the OriginationUrlInstance
*
* @return OriginationUrlInstance Fetched OriginationUrlInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): OriginationUrlInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new OriginationUrlInstance(
$this->version,
@@ -61,16 +88,6 @@ public function fetch()
);
}
- /**
- * Deletes the OriginationUrlInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Update the OriginationUrlInstance
@@ -79,24 +96,26 @@ public function delete()
* @return OriginationUrlInstance Updated OriginationUrlInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): OriginationUrlInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'Weight' => $options['weight'],
- 'Priority' => $options['priority'],
- 'Enabled' => Serialize::booleanToString($options['enabled']),
- 'FriendlyName' => $options['friendlyName'],
- 'SipUrl' => $options['sipUrl'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'Weight' =>
+ $options['weight'],
+ 'Priority' =>
+ $options['priority'],
+ 'Enabled' =>
+ Serialize::booleanToString($options['enabled']),
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'SipUrl' =>
+ $options['sipUrl'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new OriginationUrlInstance(
$this->version,
@@ -106,17 +125,18 @@ public function update($options = array())
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Trunking.V1.OriginationUrlContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/OriginationUrlInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/OriginationUrlInstance.php
index e594f80..5c71703 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/OriginationUrlInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/OriginationUrlInstance.php
@@ -2,50 +2,58 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Trunking
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Trunking\V1\Trunk;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property string $sid
- * @property string $trunkSid
+ * @property string|null $accountSid
+ * @property string|null $sid
+ * @property string|null $trunkSid
* @property int $weight
- * @property bool $enabled
- * @property string $sipUrl
- * @property string $friendlyName
+ * @property bool|null $enabled
+ * @property string|null $sipUrl
+ * @property string|null $friendlyName
* @property int $priority
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
*/
class OriginationUrlInstance extends InstanceResource
{
/**
* Initialize the OriginationUrlInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $trunkSid The SID of the Trunk that owns the Origination URL
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Trunking\V1\Trunk\OriginationUrlInstance
+ * @param string $trunkSid The SID of the Trunk to associate the resource with.
+ * @param string $sid The unique string that we created to identify the OriginationUrl resource to delete.
*/
- public function __construct(Version $version, array $payload, $trunkSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $trunkSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'sid' => Values::array_get($payload, 'sid'),
'trunkSid' => Values::array_get($payload, 'trunk_sid'),
@@ -57,20 +65,18 @@ public function __construct(Version $version, array $payload, $trunkSid, $sid =
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('trunkSid' => $trunkSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['trunkSid' => $trunkSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Trunking\V1\Trunk\OriginationUrlContext Context for
- * this
- * OriginationUrlInstance
+ * @return OriginationUrlContext Context for this OriginationUrlInstance
*/
- protected function proxy()
+ protected function proxy(): OriginationUrlContext
{
if (!$this->context) {
$this->context = new OriginationUrlContext(
@@ -84,25 +90,27 @@ protected function proxy()
}
/**
- * Fetch a OriginationUrlInstance
+ * Delete the OriginationUrlInstance
*
- * @return OriginationUrlInstance Fetched OriginationUrlInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the OriginationUrlInstance
+ * Fetch the OriginationUrlInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return OriginationUrlInstance Fetched OriginationUrlInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): OriginationUrlInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -112,8 +120,9 @@ public function delete()
* @return OriginationUrlInstance Updated OriginationUrlInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): OriginationUrlInstance
{
+
return $this->proxy()->update($options);
}
@@ -124,7 +133,7 @@ public function update($options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -143,12 +152,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Trunking.V1.OriginationUrlInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/OriginationUrlList.php b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/OriginationUrlList.php
index f6a3baf..25f61dc 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/OriginationUrlList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/OriginationUrlList.php
@@ -2,69 +2,109 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Trunking
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Trunking\V1\Trunk;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class OriginationUrlList extends ListResource
-{
+ {
/**
* Construct the OriginationUrlList
*
* @param Version $version Version that contains the resource
- * @param string $trunkSid The SID of the Trunk that owns the Origination URL
- * @return \Twilio\Rest\Trunking\V1\Trunk\OriginationUrlList
+ * @param string $trunkSid The SID of the Trunk to associate the resource with.
*/
- public function __construct(Version $version, $trunkSid)
- {
+ public function __construct(
+ Version $version,
+ string $trunkSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('trunkSid' => $trunkSid,);
-
- $this->uri = '/Trunks/' . \rawurlencode($trunkSid) . '/OriginationUrls';
+ $this->solution = [
+ 'trunkSid' =>
+ $trunkSid,
+
+ ];
+
+ $this->uri = '/Trunks/' . \rawurlencode($trunkSid)
+ .'/OriginationUrls';
}
/**
- * Create a new OriginationUrlInstance
+ * Create the OriginationUrlInstance
*
- * @param int $weight The value that determines the relative load the URI
- * should receive compared to others with the same priority
- * @param int $priority The relative importance of the URI
- * @param bool $enabled Whether the URL is enabled
- * @param string $friendlyName A string to describe the resource
- * @param string $sipUrl The SIP address you want Twilio to route your
- * Origination calls to
- * @return OriginationUrlInstance Newly created OriginationUrlInstance
+ * @param int $weight The value that determines the relative share of the load the URI should receive compared to other URIs with the same priority. Can be an integer from 1 to 65535, inclusive, and the default is 10. URLs with higher values receive more load than those with lower ones with the same priority.
+ * @param int $priority The relative importance of the URI. Can be an integer from 0 to 65535, inclusive, and the default is 10. The lowest number represents the most important URI.
+ * @param bool $enabled Whether the URL is enabled. The default is `true`.
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
+ * @param string $sipUrl The SIP address you want Twilio to route your Origination calls to. This must be a `sip:` schema.
+ * @return OriginationUrlInstance Created OriginationUrlInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($weight, $priority, $enabled, $friendlyName, $sipUrl)
+ public function create(int $weight, int $priority, bool $enabled, string $friendlyName, string $sipUrl): OriginationUrlInstance
{
- $data = Values::of(array(
- 'Weight' => $weight,
- 'Priority' => $priority,
- 'Enabled' => Serialize::booleanToString($enabled),
- 'FriendlyName' => $friendlyName,
- 'SipUrl' => $sipUrl,
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+
+ $data = Values::of([
+ 'Weight' =>
+ $weight,
+ 'Priority' =>
+ $priority,
+ 'Enabled' =>
+ Serialize::booleanToString($enabled),
+ 'FriendlyName' =>
+ $friendlyName,
+ 'SipUrl' =>
+ $sipUrl,
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new OriginationUrlInstance(
+ $this->version,
+ $payload,
+ $this->solution['trunkSid']
);
+ }
+
- return new OriginationUrlInstance($this->version, $payload, $this->solution['trunkSid']);
+ /**
+ * Reads OriginationUrlInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return OriginationUrlInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -83,9 +123,9 @@ public function create($weight, $priority, $enabled, $friendlyName, $sipUrl)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -94,26 +134,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads OriginationUrlInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return OriginationUrlInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of OriginationUrlInstance records from the API.
* Request is executed immediately
@@ -121,21 +141,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of OriginationUrlInstance
+ * @return OriginationUrlPage Page of OriginationUrlInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): OriginationUrlPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new OriginationUrlPage($this->version, $response, $this->solution);
}
@@ -145,9 +166,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of OriginationUrlInstance
+ * @return OriginationUrlPage Page of OriginationUrlInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): OriginationUrlPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -157,15 +178,22 @@ public function getPage($targetUrl)
return new OriginationUrlPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a OriginationUrlContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Trunking\V1\Trunk\OriginationUrlContext
+ * @param string $sid The unique string that we created to identify the OriginationUrl resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): OriginationUrlContext
{
- return new OriginationUrlContext($this->version, $this->solution['trunkSid'], $sid);
+ return new OriginationUrlContext(
+ $this->version,
+ $this->solution['trunkSid'],
+ $sid
+ );
}
/**
@@ -173,8 +201,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Trunking.V1.OriginationUrlList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/OriginationUrlOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/OriginationUrlOptions.php
index ef51796..288dc71 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/OriginationUrlOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/OriginationUrlOptions.php
@@ -1,10 +1,16 @@
options['weight'] = $weight;
$this->options['priority'] = $priority;
$this->options['enabled'] = $enabled;
@@ -53,11 +85,10 @@ public function __construct($weight = Values::NONE, $priority = Values::NONE, $e
/**
* The value that determines the relative share of the load the URI should receive compared to other URIs with the same priority. Can be an integer from 1 to 65535, inclusive, and the default is 10. URLs with higher values receive more load than those with lower ones with the same priority.
*
- * @param int $weight The value that determines the relative load the URI
- * should receive compared to others with the same priority
+ * @param int $weight The value that determines the relative share of the load the URI should receive compared to other URIs with the same priority. Can be an integer from 1 to 65535, inclusive, and the default is 10. URLs with higher values receive more load than those with lower ones with the same priority.
* @return $this Fluent Builder
*/
- public function setWeight($weight)
+ public function setWeight(int $weight): self
{
$this->options['weight'] = $weight;
return $this;
@@ -66,10 +97,10 @@ public function setWeight($weight)
/**
* The relative importance of the URI. Can be an integer from 0 to 65535, inclusive, and the default is 10. The lowest number represents the most important URI.
*
- * @param int $priority The relative importance of the URI
+ * @param int $priority The relative importance of the URI. Can be an integer from 0 to 65535, inclusive, and the default is 10. The lowest number represents the most important URI.
* @return $this Fluent Builder
*/
- public function setPriority($priority)
+ public function setPriority(int $priority): self
{
$this->options['priority'] = $priority;
return $this;
@@ -78,10 +109,10 @@ public function setPriority($priority)
/**
* Whether the URL is enabled. The default is `true`.
*
- * @param bool $enabled Whether the URL is enabled
+ * @param bool $enabled Whether the URL is enabled. The default is `true`.
* @return $this Fluent Builder
*/
- public function setEnabled($enabled)
+ public function setEnabled(bool $enabled): self
{
$this->options['enabled'] = $enabled;
return $this;
@@ -90,10 +121,10 @@ public function setEnabled($enabled)
/**
* A descriptive string that you create to describe the resource. It can be up to 64 characters long.
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -102,11 +133,10 @@ public function setFriendlyName($friendlyName)
/**
* The SIP address you want Twilio to route your Origination calls to. This must be a `sip:` schema. `sips` is NOT supported.
*
- * @param string $sipUrl The SIP address you want Twilio to route your
- * Origination calls to
+ * @param string $sipUrl The SIP address you want Twilio to route your Origination calls to. This must be a `sip:` schema. `sips` is NOT supported.
* @return $this Fluent Builder
*/
- public function setSipUrl($sipUrl)
+ public function setSipUrl(string $sipUrl): self
{
$this->options['sipUrl'] = $sipUrl;
return $this;
@@ -117,14 +147,10 @@ public function setSipUrl($sipUrl)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Trunking.V1.UpdateOriginationUrlOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Trunking.V1.UpdateOriginationUrlOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/OriginationUrlPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/OriginationUrlPage.php
index 8714471..696ef6d 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/OriginationUrlPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/OriginationUrlPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return OriginationUrlInstance \Twilio\Rest\Trunking\V1\Trunk\OriginationUrlInstance
+ */
+ public function buildInstance(array $payload): OriginationUrlInstance
{
return new OriginationUrlInstance($this->version, $payload, $this->solution['trunkSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Trunking.V1.OriginationUrlPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/PhoneNumberContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/PhoneNumberContext.php
index 869a113..53ea9b5 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/PhoneNumberContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/PhoneNumberContext.php
@@ -2,54 +2,81 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Trunking
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Trunking\V1\Trunk;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class PhoneNumberContext extends InstanceContext
-{
+ {
/**
* Initialize the PhoneNumberContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $trunkSid The SID of the Trunk from which to fetch the
- * PhoneNumber resource
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Trunking\V1\Trunk\PhoneNumberContext
+ * @param Version $version Version that contains the resource
+ * @param string $trunkSid The SID of the Trunk to associate the phone number with.
+ * @param string $sid The unique string that we created to identify the PhoneNumber resource to delete.
*/
- public function __construct(Version $version, $trunkSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $trunkSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('trunkSid' => $trunkSid, 'sid' => $sid,);
+ $this->solution = [
+ 'trunkSid' =>
+ $trunkSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Trunks/' . \rawurlencode($trunkSid)
+ .'/PhoneNumbers/' . \rawurlencode($sid)
+ .'';
+ }
+
+ /**
+ * Delete the PhoneNumberInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Trunks/' . \rawurlencode($trunkSid) . '/PhoneNumbers/' . \rawurlencode($sid) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a PhoneNumberInstance
+ * Fetch the PhoneNumberInstance
*
* @return PhoneNumberInstance Fetched PhoneNumberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): PhoneNumberInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new PhoneNumberInstance(
$this->version,
@@ -59,28 +86,18 @@ public function fetch()
);
}
- /**
- * Deletes the PhoneNumberInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Trunking.V1.PhoneNumberContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/PhoneNumberInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/PhoneNumberInstance.php
index 0811155..075ef3c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/PhoneNumberInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/PhoneNumberInstance.php
@@ -2,65 +2,72 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Trunking
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Trunking\V1\Trunk;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
+ * @property string|null $accountSid
* @property string $addressRequirements
- * @property string $apiVersion
- * @property bool $beta
- * @property array $capabilities
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $friendlyName
- * @property array $links
- * @property string $phoneNumber
- * @property string $sid
- * @property string $smsApplicationSid
- * @property string $smsFallbackMethod
- * @property string $smsFallbackUrl
- * @property string $smsMethod
- * @property string $smsUrl
- * @property string $statusCallback
- * @property string $statusCallbackMethod
- * @property string $trunkSid
- * @property string $url
- * @property string $voiceApplicationSid
- * @property bool $voiceCallerIdLookup
- * @property string $voiceFallbackMethod
- * @property string $voiceFallbackUrl
- * @property string $voiceMethod
- * @property string $voiceUrl
+ * @property string|null $apiVersion
+ * @property bool|null $beta
+ * @property array|null $capabilities
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $friendlyName
+ * @property array|null $links
+ * @property string|null $phoneNumber
+ * @property string|null $sid
+ * @property string|null $smsApplicationSid
+ * @property string|null $smsFallbackMethod
+ * @property string|null $smsFallbackUrl
+ * @property string|null $smsMethod
+ * @property string|null $smsUrl
+ * @property string|null $statusCallback
+ * @property string|null $statusCallbackMethod
+ * @property string|null $trunkSid
+ * @property string|null $url
+ * @property string|null $voiceApplicationSid
+ * @property bool|null $voiceCallerIdLookup
+ * @property string|null $voiceFallbackMethod
+ * @property string|null $voiceFallbackUrl
+ * @property string|null $voiceMethod
+ * @property string|null $voiceUrl
*/
class PhoneNumberInstance extends InstanceResource
{
/**
* Initialize the PhoneNumberInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $trunkSid The SID of the Trunk that handles calls to the phone
- * number
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Trunking\V1\Trunk\PhoneNumberInstance
+ * @param string $trunkSid The SID of the Trunk to associate the phone number with.
+ * @param string $sid The unique string that we created to identify the PhoneNumber resource to delete.
*/
- public function __construct(Version $version, array $payload, $trunkSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $trunkSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'addressRequirements' => Values::array_get($payload, 'address_requirements'),
'apiVersion' => Values::array_get($payload, 'api_version'),
@@ -87,19 +94,18 @@ public function __construct(Version $version, array $payload, $trunkSid, $sid =
'voiceFallbackUrl' => Values::array_get($payload, 'voice_fallback_url'),
'voiceMethod' => Values::array_get($payload, 'voice_method'),
'voiceUrl' => Values::array_get($payload, 'voice_url'),
- );
+ ];
- $this->solution = array('trunkSid' => $trunkSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['trunkSid' => $trunkSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Trunking\V1\Trunk\PhoneNumberContext Context for this
- * PhoneNumberInstance
+ * @return PhoneNumberContext Context for this PhoneNumberInstance
*/
- protected function proxy()
+ protected function proxy(): PhoneNumberContext
{
if (!$this->context) {
$this->context = new PhoneNumberContext(
@@ -113,25 +119,27 @@ protected function proxy()
}
/**
- * Fetch a PhoneNumberInstance
+ * Delete the PhoneNumberInstance
*
- * @return PhoneNumberInstance Fetched PhoneNumberInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the PhoneNumberInstance
+ * Fetch the PhoneNumberInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return PhoneNumberInstance Fetched PhoneNumberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): PhoneNumberInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -141,7 +149,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -160,12 +168,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Trunking.V1.PhoneNumberInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/PhoneNumberList.php b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/PhoneNumberList.php
index 9d0a942..5b8b5b1 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/PhoneNumberList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/PhoneNumberList.php
@@ -2,58 +2,96 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Trunking
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Trunking\V1\Trunk;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class PhoneNumberList extends ListResource
-{
+ {
/**
* Construct the PhoneNumberList
*
* @param Version $version Version that contains the resource
- * @param string $trunkSid The SID of the Trunk that handles calls to the phone
- * number
- * @return \Twilio\Rest\Trunking\V1\Trunk\PhoneNumberList
+ * @param string $trunkSid The SID of the Trunk to associate the phone number with.
*/
- public function __construct(Version $version, $trunkSid)
- {
+ public function __construct(
+ Version $version,
+ string $trunkSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('trunkSid' => $trunkSid,);
-
- $this->uri = '/Trunks/' . \rawurlencode($trunkSid) . '/PhoneNumbers';
+ $this->solution = [
+ 'trunkSid' =>
+ $trunkSid,
+
+ ];
+
+ $this->uri = '/Trunks/' . \rawurlencode($trunkSid)
+ .'/PhoneNumbers';
}
/**
- * Create a new PhoneNumberInstance
+ * Create the PhoneNumberInstance
*
- * @param string $phoneNumberSid The SID of the Incoming Phone Number that you
- * want to associate with the trunk
- * @return PhoneNumberInstance Newly created PhoneNumberInstance
+ * @param string $phoneNumberSid The SID of the [Incoming Phone Number](https://www.twilio.com/docs/phone-numbers/api/incomingphonenumber-resource) that you want to associate with the trunk.
+ * @return PhoneNumberInstance Created PhoneNumberInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($phoneNumberSid)
+ public function create(string $phoneNumberSid): PhoneNumberInstance
{
- $data = Values::of(array('PhoneNumberSid' => $phoneNumberSid,));
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'PhoneNumberSid' =>
+ $phoneNumberSid,
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new PhoneNumberInstance(
+ $this->version,
+ $payload,
+ $this->solution['trunkSid']
);
+ }
- return new PhoneNumberInstance($this->version, $payload, $this->solution['trunkSid']);
+
+ /**
+ * Reads PhoneNumberInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return PhoneNumberInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -72,9 +110,9 @@ public function create($phoneNumberSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -83,26 +121,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads PhoneNumberInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return PhoneNumberInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of PhoneNumberInstance records from the API.
* Request is executed immediately
@@ -110,21 +128,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of PhoneNumberInstance
+ * @return PhoneNumberPage Page of PhoneNumberInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): PhoneNumberPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new PhoneNumberPage($this->version, $response, $this->solution);
}
@@ -134,9 +153,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of PhoneNumberInstance
+ * @return PhoneNumberPage Page of PhoneNumberInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): PhoneNumberPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -146,15 +165,22 @@ public function getPage($targetUrl)
return new PhoneNumberPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a PhoneNumberContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Trunking\V1\Trunk\PhoneNumberContext
+ * @param string $sid The unique string that we created to identify the PhoneNumber resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): PhoneNumberContext
{
- return new PhoneNumberContext($this->version, $this->solution['trunkSid'], $sid);
+ return new PhoneNumberContext(
+ $this->version,
+ $this->solution['trunkSid'],
+ $sid
+ );
}
/**
@@ -162,8 +188,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Trunking.V1.PhoneNumberList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/PhoneNumberPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/PhoneNumberPage.php
index d17c69e..4c80b7f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/PhoneNumberPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/PhoneNumberPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return PhoneNumberInstance \Twilio\Rest\Trunking\V1\Trunk\PhoneNumberInstance
+ */
+ public function buildInstance(array $payload): PhoneNumberInstance
{
return new PhoneNumberInstance($this->version, $payload, $this->solution['trunkSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Trunking.V1.PhoneNumberPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/TerminatingSipDomainContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/TerminatingSipDomainContext.php
deleted file mode 100644
index 65c6b97..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/TerminatingSipDomainContext.php
+++ /dev/null
@@ -1,85 +0,0 @@
-solution = array('trunkSid' => $trunkSid, 'sid' => $sid,);
-
- $this->uri = '/Trunks/' . \rawurlencode($trunkSid) . '/TerminatingSipDomains/' . \rawurlencode($sid) . '';
- }
-
- /**
- * Fetch a TerminatingSipDomainInstance
- *
- * @return TerminatingSipDomainInstance Fetched TerminatingSipDomainInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new TerminatingSipDomainInstance(
- $this->version,
- $payload,
- $this->solution['trunkSid'],
- $this->solution['sid']
- );
- }
-
- /**
- * Deletes the TerminatingSipDomainInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Trunking.V1.TerminatingSipDomainContext ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/TerminatingSipDomainInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/TerminatingSipDomainInstance.php
deleted file mode 100644
index 16c179e..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/TerminatingSipDomainInstance.php
+++ /dev/null
@@ -1,155 +0,0 @@
-properties = array(
- 'accountSid' => Values::array_get($payload, 'account_sid'),
- 'apiVersion' => Values::array_get($payload, 'api_version'),
- 'authType' => Values::array_get($payload, 'auth_type'),
- 'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
- 'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- 'domainName' => Values::array_get($payload, 'domain_name'),
- 'friendlyName' => Values::array_get($payload, 'friendly_name'),
- 'sid' => Values::array_get($payload, 'sid'),
- 'url' => Values::array_get($payload, 'url'),
- 'voiceFallbackMethod' => Values::array_get($payload, 'voice_fallback_method'),
- 'voiceFallbackUrl' => Values::array_get($payload, 'voice_fallback_url'),
- 'voiceMethod' => Values::array_get($payload, 'voice_method'),
- 'voiceStatusCallbackMethod' => Values::array_get($payload, 'voice_status_callback_method'),
- 'voiceStatusCallbackUrl' => Values::array_get($payload, 'voice_status_callback_url'),
- 'voiceUrl' => Values::array_get($payload, 'voice_url'),
- 'sipRegistration' => Values::array_get($payload, 'sip_registration'),
- 'trunkSid' => Values::array_get($payload, 'trunk_sid'),
- 'links' => Values::array_get($payload, 'links'),
- );
-
- $this->solution = array('trunkSid' => $trunkSid, 'sid' => $sid ?: $this->properties['sid'],);
- }
-
- /**
- * Generate an instance context for the instance, the context is capable of
- * performing various actions. All instance actions are proxied to the context
- *
- * @return \Twilio\Rest\Trunking\V1\Trunk\TerminatingSipDomainContext Context
- * for this
- * TerminatingSipDomainInstance
- */
- protected function proxy()
- {
- if (!$this->context) {
- $this->context = new TerminatingSipDomainContext(
- $this->version,
- $this->solution['trunkSid'],
- $this->solution['sid']
- );
- }
-
- return $this->context;
- }
-
- /**
- * Fetch a TerminatingSipDomainInstance
- *
- * @return TerminatingSipDomainInstance Fetched TerminatingSipDomainInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function fetch()
- {
- return $this->proxy()->fetch();
- }
-
- /**
- * Deletes the TerminatingSipDomainInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->proxy()->delete();
- }
-
- /**
- * Magic getter to access properties
- *
- * @param string $name Property to access
- * @return mixed The requested property
- * @throws TwilioException For unknown properties
- */
- public function __get($name)
- {
- if (\array_key_exists($name, $this->properties)) {
- return $this->properties[$name];
- }
-
- if (\property_exists($this, '_' . $name)) {
- $method = 'get' . \ucfirst($name);
- return $this->$method();
- }
-
- throw new TwilioException('Unknown property: ' . $name);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $context = array();
- foreach ($this->solution as $key => $value) {
- $context[] = "$key=$value";
- }
- return '[Twilio.Trunking.V1.TerminatingSipDomainInstance ' . \implode(' ', $context) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/TerminatingSipDomainList.php b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/TerminatingSipDomainList.php
deleted file mode 100644
index e0b2ab6..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/TerminatingSipDomainList.php
+++ /dev/null
@@ -1,171 +0,0 @@
-solution = array('trunkSid' => $trunkSid,);
-
- $this->uri = '/Trunks/' . \rawurlencode($trunkSid) . '/TerminatingSipDomains';
- }
-
- /**
- * Create a new TerminatingSipDomainInstance
- *
- * @param string $sipDomainSid The SID of the SIP Domain to associate with the
- * trunk
- * @return TerminatingSipDomainInstance Newly created
- * TerminatingSipDomainInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($sipDomainSid)
- {
- $data = Values::of(array('SipDomainSid' => $sipDomainSid,));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new TerminatingSipDomainInstance($this->version, $payload, $this->solution['trunkSid']);
- }
-
- /**
- * Streams TerminatingSipDomainInstance records from the API as a generator
- * stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
- *
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
- */
- public function stream($limit = null, $pageSize = null)
- {
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
- }
-
- /**
- * Reads TerminatingSipDomainInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return TerminatingSipDomainInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
- /**
- * Retrieve a single page of TerminatingSipDomainInstance records from the API.
- * Request is executed immediately
- *
- * @param mixed $pageSize Number of records to return, defaults to 50
- * @param string $pageToken PageToken provided by the API
- * @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of TerminatingSipDomainInstance
- */
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
- {
- $params = Values::of(array(
- 'PageToken' => $pageToken,
- 'Page' => $pageNumber,
- 'PageSize' => $pageSize,
- ));
-
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
-
- return new TerminatingSipDomainPage($this->version, $response, $this->solution);
- }
-
- /**
- * Retrieve a specific page of TerminatingSipDomainInstance records from the
- * API.
- * Request is executed immediately
- *
- * @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of TerminatingSipDomainInstance
- */
- public function getPage($targetUrl)
- {
- $response = $this->version->getDomain()->getClient()->request(
- 'GET',
- $targetUrl
- );
-
- return new TerminatingSipDomainPage($this->version, $response, $this->solution);
- }
-
- /**
- * Constructs a TerminatingSipDomainContext
- *
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Trunking\V1\Trunk\TerminatingSipDomainContext
- */
- public function getContext($sid)
- {
- return new TerminatingSipDomainContext($this->version, $this->solution['trunkSid'], $sid);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Trunking.V1.TerminatingSipDomainList]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/TerminatingSipDomainPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/TerminatingSipDomainPage.php
deleted file mode 100644
index 87ce8e5..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/TerminatingSipDomainPage.php
+++ /dev/null
@@ -1,38 +0,0 @@
-solution = $solution;
- }
-
- public function buildInstance(array $payload)
- {
- return new TerminatingSipDomainInstance($this->version, $payload, $this->solution['trunkSid']);
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Trunking.V1.TerminatingSipDomainPage]';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/TrunkContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/TrunkContext.php
index 7f3fdd2..6f80601 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/TrunkContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/TrunkContext.php
@@ -2,92 +2,111 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Trunking
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Trunking\V1;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Trunking\V1\Trunk\CredentialListList;
-use Twilio\Rest\Trunking\V1\Trunk\IpAccessControlListList;
-use Twilio\Rest\Trunking\V1\Trunk\OriginationUrlList;
-use Twilio\Rest\Trunking\V1\Trunk\PhoneNumberList;
-use Twilio\Rest\Trunking\V1\Trunk\TerminatingSipDomainList;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+use Twilio\Rest\Trunking\V1\Trunk\IpAccessControlListList;
+use Twilio\Rest\Trunking\V1\Trunk\PhoneNumberList;
+use Twilio\Rest\Trunking\V1\Trunk\CredentialListList;
+use Twilio\Rest\Trunking\V1\Trunk\OriginationUrlList;
+use Twilio\Rest\Trunking\V1\Trunk\RecordingList;
+
/**
- * @property \Twilio\Rest\Trunking\V1\Trunk\OriginationUrlList $originationUrls
- * @property \Twilio\Rest\Trunking\V1\Trunk\CredentialListList $credentialsLists
- * @property \Twilio\Rest\Trunking\V1\Trunk\IpAccessControlListList $ipAccessControlLists
- * @property \Twilio\Rest\Trunking\V1\Trunk\PhoneNumberList $phoneNumbers
- * @property \Twilio\Rest\Trunking\V1\Trunk\TerminatingSipDomainList $terminatingSipDomains
- * @method \Twilio\Rest\Trunking\V1\Trunk\OriginationUrlContext originationUrls(string $sid)
+ * @property IpAccessControlListList $ipAccessControlLists
+ * @property PhoneNumberList $phoneNumbers
+ * @property CredentialListList $credentialsLists
+ * @property OriginationUrlList $originationUrls
+ * @property RecordingList $recordings
+ * @method \Twilio\Rest\Trunking\V1\Trunk\RecordingContext recordings()
* @method \Twilio\Rest\Trunking\V1\Trunk\CredentialListContext credentialsLists(string $sid)
* @method \Twilio\Rest\Trunking\V1\Trunk\IpAccessControlListContext ipAccessControlLists(string $sid)
* @method \Twilio\Rest\Trunking\V1\Trunk\PhoneNumberContext phoneNumbers(string $sid)
- * @method \Twilio\Rest\Trunking\V1\Trunk\TerminatingSipDomainContext terminatingSipDomains(string $sid)
+ * @method \Twilio\Rest\Trunking\V1\Trunk\OriginationUrlContext originationUrls(string $sid)
*/
class TrunkContext extends InstanceContext
-{
- protected $_originationUrls = null;
- protected $_credentialsLists = null;
- protected $_ipAccessControlLists = null;
- protected $_phoneNumbers = null;
- protected $_terminatingSipDomains = null;
+ {
+ protected $_ipAccessControlLists;
+ protected $_phoneNumbers;
+ protected $_credentialsLists;
+ protected $_originationUrls;
+ protected $_recordings;
/**
* Initialize the TrunkContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Trunking\V1\TrunkContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid The unique string that we created to identify the Trunk resource to delete.
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Trunks/' . \rawurlencode($sid) . '';
+ $this->uri = '/Trunks/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a TrunkInstance
+ * Delete the TrunkInstance
*
- * @return TrunkInstance Fetched TrunkInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new TrunkInstance($this->version, $payload, $this->solution['sid']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Deletes the TrunkInstance
+ * Fetch the TrunkInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return TrunkInstance Fetched TrunkInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): TrunkInstance
{
- return $this->version->delete('delete', $this->uri);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
+
+ return new TrunkInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Update the TrunkInstance
*
@@ -95,111 +114,124 @@ public function delete()
* @return TrunkInstance Updated TrunkInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): TrunkInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'DomainName' => $options['domainName'],
- 'DisasterRecoveryUrl' => $options['disasterRecoveryUrl'],
- 'DisasterRecoveryMethod' => $options['disasterRecoveryMethod'],
- 'Recording' => $options['recording'],
- 'Secure' => Serialize::booleanToString($options['secure']),
- 'CnamLookupEnabled' => Serialize::booleanToString($options['cnamLookupEnabled']),
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'DomainName' =>
+ $options['domainName'],
+ 'DisasterRecoveryUrl' =>
+ $options['disasterRecoveryUrl'],
+ 'DisasterRecoveryMethod' =>
+ $options['disasterRecoveryMethod'],
+ 'TransferMode' =>
+ $options['transferMode'],
+ 'Secure' =>
+ Serialize::booleanToString($options['secure']),
+ 'CnamLookupEnabled' =>
+ Serialize::booleanToString($options['cnamLookupEnabled']),
+ 'TransferCallerId' =>
+ $options['transferCallerId'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
- return new TrunkInstance($this->version, $payload, $this->solution['sid']);
+ return new TrunkInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
- * Access the originationUrls
- *
- * @return \Twilio\Rest\Trunking\V1\Trunk\OriginationUrlList
+ * Access the ipAccessControlLists
*/
- protected function getOriginationUrls()
+ protected function getIpAccessControlLists(): IpAccessControlListList
{
- if (!$this->_originationUrls) {
- $this->_originationUrls = new OriginationUrlList($this->version, $this->solution['sid']);
+ if (!$this->_ipAccessControlLists) {
+ $this->_ipAccessControlLists = new IpAccessControlListList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_originationUrls;
+ return $this->_ipAccessControlLists;
}
/**
- * Access the credentialsLists
- *
- * @return \Twilio\Rest\Trunking\V1\Trunk\CredentialListList
+ * Access the phoneNumbers
*/
- protected function getCredentialsLists()
+ protected function getPhoneNumbers(): PhoneNumberList
{
- if (!$this->_credentialsLists) {
- $this->_credentialsLists = new CredentialListList($this->version, $this->solution['sid']);
+ if (!$this->_phoneNumbers) {
+ $this->_phoneNumbers = new PhoneNumberList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_credentialsLists;
+ return $this->_phoneNumbers;
}
/**
- * Access the ipAccessControlLists
- *
- * @return \Twilio\Rest\Trunking\V1\Trunk\IpAccessControlListList
+ * Access the credentialsLists
*/
- protected function getIpAccessControlLists()
+ protected function getCredentialsLists(): CredentialListList
{
- if (!$this->_ipAccessControlLists) {
- $this->_ipAccessControlLists = new IpAccessControlListList($this->version, $this->solution['sid']);
+ if (!$this->_credentialsLists) {
+ $this->_credentialsLists = new CredentialListList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_ipAccessControlLists;
+ return $this->_credentialsLists;
}
/**
- * Access the phoneNumbers
- *
- * @return \Twilio\Rest\Trunking\V1\Trunk\PhoneNumberList
+ * Access the originationUrls
*/
- protected function getPhoneNumbers()
+ protected function getOriginationUrls(): OriginationUrlList
{
- if (!$this->_phoneNumbers) {
- $this->_phoneNumbers = new PhoneNumberList($this->version, $this->solution['sid']);
+ if (!$this->_originationUrls) {
+ $this->_originationUrls = new OriginationUrlList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_phoneNumbers;
+ return $this->_originationUrls;
}
/**
- * Access the terminatingSipDomains
- *
- * @return \Twilio\Rest\Trunking\V1\Trunk\TerminatingSipDomainList
+ * Access the recordings
*/
- protected function getTerminatingSipDomains()
+ protected function getRecordings(): RecordingList
{
- if (!$this->_terminatingSipDomains) {
- $this->_terminatingSipDomains = new TerminatingSipDomainList(
+ if (!$this->_recordings) {
+ $this->_recordings = new RecordingList(
$this->version,
$this->solution['sid']
);
}
- return $this->_terminatingSipDomains;
+ return $this->_recordings;
}
/**
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -214,10 +246,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -232,12 +264,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Trunking.V1.TrunkContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/TrunkInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/TrunkInstance.php
index 862bd10..1788189 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/TrunkInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/TrunkInstance.php
@@ -2,59 +2,74 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Trunking
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Trunking\V1;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Trunking\V1\Trunk\IpAccessControlListList;
+use Twilio\Rest\Trunking\V1\Trunk\PhoneNumberList;
+use Twilio\Rest\Trunking\V1\Trunk\CredentialListList;
+use Twilio\Rest\Trunking\V1\Trunk\OriginationUrlList;
+use Twilio\Rest\Trunking\V1\Trunk\RecordingList;
+
/**
- * @property string $accountSid
- * @property string $domainName
- * @property string $disasterRecoveryMethod
- * @property string $disasterRecoveryUrl
- * @property string $friendlyName
- * @property bool $secure
- * @property array $recording
- * @property bool $cnamLookupEnabled
- * @property string $authType
- * @property string $authTypeSet
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $sid
- * @property string $url
- * @property array $links
+ * @property string|null $accountSid
+ * @property string|null $domainName
+ * @property string|null $disasterRecoveryMethod
+ * @property string|null $disasterRecoveryUrl
+ * @property string|null $friendlyName
+ * @property bool|null $secure
+ * @property array|null $recording
+ * @property string $transferMode
+ * @property string $transferCallerId
+ * @property bool|null $cnamLookupEnabled
+ * @property string|null $authType
+ * @property string[]|null $authTypeSet
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $sid
+ * @property string|null $url
+ * @property array|null $links
*/
class TrunkInstance extends InstanceResource
{
- protected $_originationUrls = null;
- protected $_credentialsLists = null;
- protected $_ipAccessControlLists = null;
- protected $_phoneNumbers = null;
- protected $_terminatingSipDomains = null;
+ protected $_ipAccessControlLists;
+ protected $_phoneNumbers;
+ protected $_credentialsLists;
+ protected $_originationUrls;
+ protected $_recordings;
/**
* Initialize the TrunkInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Trunking\V1\TrunkInstance
+ * @param string $sid The unique string that we created to identify the Trunk resource to delete.
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'domainName' => Values::array_get($payload, 'domain_name'),
'disasterRecoveryMethod' => Values::array_get($payload, 'disaster_recovery_method'),
@@ -62,6 +77,8 @@ public function __construct(Version $version, array $payload, $sid = null)
'friendlyName' => Values::array_get($payload, 'friendly_name'),
'secure' => Values::array_get($payload, 'secure'),
'recording' => Values::array_get($payload, 'recording'),
+ 'transferMode' => Values::array_get($payload, 'transfer_mode'),
+ 'transferCallerId' => Values::array_get($payload, 'transfer_caller_id'),
'cnamLookupEnabled' => Values::array_get($payload, 'cnam_lookup_enabled'),
'authType' => Values::array_get($payload, 'auth_type'),
'authTypeSet' => Values::array_get($payload, 'auth_type_set'),
@@ -70,46 +87,51 @@ public function __construct(Version $version, array $payload, $sid = null)
'sid' => Values::array_get($payload, 'sid'),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Trunking\V1\TrunkContext Context for this TrunkInstance
+ * @return TrunkContext Context for this TrunkInstance
*/
- protected function proxy()
+ protected function proxy(): TrunkContext
{
if (!$this->context) {
- $this->context = new TrunkContext($this->version, $this->solution['sid']);
+ $this->context = new TrunkContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a TrunkInstance
+ * Delete the TrunkInstance
*
- * @return TrunkInstance Fetched TrunkInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the TrunkInstance
+ * Fetch the TrunkInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return TrunkInstance Fetched TrunkInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): TrunkInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -119,59 +141,50 @@ public function delete()
* @return TrunkInstance Updated TrunkInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): TrunkInstance
{
+
return $this->proxy()->update($options);
}
/**
- * Access the originationUrls
- *
- * @return \Twilio\Rest\Trunking\V1\Trunk\OriginationUrlList
+ * Access the ipAccessControlLists
*/
- protected function getOriginationUrls()
+ protected function getIpAccessControlLists(): IpAccessControlListList
{
- return $this->proxy()->originationUrls;
+ return $this->proxy()->ipAccessControlLists;
}
/**
- * Access the credentialsLists
- *
- * @return \Twilio\Rest\Trunking\V1\Trunk\CredentialListList
+ * Access the phoneNumbers
*/
- protected function getCredentialsLists()
+ protected function getPhoneNumbers(): PhoneNumberList
{
- return $this->proxy()->credentialsLists;
+ return $this->proxy()->phoneNumbers;
}
/**
- * Access the ipAccessControlLists
- *
- * @return \Twilio\Rest\Trunking\V1\Trunk\IpAccessControlListList
+ * Access the credentialsLists
*/
- protected function getIpAccessControlLists()
+ protected function getCredentialsLists(): CredentialListList
{
- return $this->proxy()->ipAccessControlLists;
+ return $this->proxy()->credentialsLists;
}
/**
- * Access the phoneNumbers
- *
- * @return \Twilio\Rest\Trunking\V1\Trunk\PhoneNumberList
+ * Access the originationUrls
*/
- protected function getPhoneNumbers()
+ protected function getOriginationUrls(): OriginationUrlList
{
- return $this->proxy()->phoneNumbers;
+ return $this->proxy()->originationUrls;
}
/**
- * Access the terminatingSipDomains
- *
- * @return \Twilio\Rest\Trunking\V1\Trunk\TerminatingSipDomainList
+ * Access the recordings
*/
- protected function getTerminatingSipDomains()
+ protected function getRecordings(): RecordingList
{
- return $this->proxy()->terminatingSipDomains;
+ return $this->proxy()->recordings;
}
/**
@@ -181,7 +194,7 @@ protected function getTerminatingSipDomains()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -200,12 +213,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Trunking.V1.TrunkInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/TrunkList.php b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/TrunkList.php
index f6ea906..90c82d3 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/TrunkList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/TrunkList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Trunking
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Trunking\V1;
@@ -12,57 +19,90 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class TrunkList extends ListResource
-{
+ {
/**
* Construct the TrunkList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Trunking\V1\TrunkList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/Trunks';
}
/**
- * Create a new TrunkInstance
+ * Create the TrunkInstance
*
* @param array|Options $options Optional Arguments
- * @return TrunkInstance Newly created TrunkInstance
+ * @return TrunkInstance Created TrunkInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($options = array())
+ public function create(array $options = []): TrunkInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'DomainName' => $options['domainName'],
- 'DisasterRecoveryUrl' => $options['disasterRecoveryUrl'],
- 'DisasterRecoveryMethod' => $options['disasterRecoveryMethod'],
- 'Recording' => $options['recording'],
- 'Secure' => Serialize::booleanToString($options['secure']),
- 'CnamLookupEnabled' => Serialize::booleanToString($options['cnamLookupEnabled']),
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'DomainName' =>
+ $options['domainName'],
+ 'DisasterRecoveryUrl' =>
+ $options['disasterRecoveryUrl'],
+ 'DisasterRecoveryMethod' =>
+ $options['disasterRecoveryMethod'],
+ 'TransferMode' =>
+ $options['transferMode'],
+ 'Secure' =>
+ Serialize::booleanToString($options['secure']),
+ 'CnamLookupEnabled' =>
+ Serialize::booleanToString($options['cnamLookupEnabled']),
+ 'TransferCallerId' =>
+ $options['transferCallerId'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new TrunkInstance(
+ $this->version,
+ $payload
);
+ }
- return new TrunkInstance($this->version, $payload);
+
+ /**
+ * Reads TrunkInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return TrunkInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -81,9 +121,9 @@ public function create($options = array())
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -92,26 +132,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads TrunkInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return TrunkInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of TrunkInstance records from the API.
* Request is executed immediately
@@ -119,21 +139,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of TrunkInstance
+ * @return TrunkPage Page of TrunkInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): TrunkPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new TrunkPage($this->version, $response, $this->solution);
}
@@ -143,9 +164,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of TrunkInstance
+ * @return TrunkPage Page of TrunkInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): TrunkPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -155,15 +176,21 @@ public function getPage($targetUrl)
return new TrunkPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a TrunkContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Trunking\V1\TrunkContext
+ * @param string $sid The unique string that we created to identify the Trunk resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): TrunkContext
{
- return new TrunkContext($this->version, $sid);
+ return new TrunkContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -171,8 +198,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Trunking.V1.TrunkList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/TrunkOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/TrunkOptions.php
index 30b440e..89ed853 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/TrunkOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/TrunkOptions.php
@@ -1,10 +1,16 @@
options['friendlyName'] = $friendlyName;
$this->options['domainName'] = $domainName;
$this->options['disasterRecoveryUrl'] = $disasterRecoveryUrl;
$this->options['disasterRecoveryMethod'] = $disasterRecoveryMethod;
- $this->options['recording'] = $recording;
+ $this->options['transferMode'] = $transferMode;
$this->options['secure'] = $secure;
$this->options['cnamLookupEnabled'] = $cnamLookupEnabled;
+ $this->options['transferCallerId'] = $transferCallerId;
}
/**
* A descriptive string that you create to describe the resource. It can be up to 64 characters long.
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -97,11 +146,10 @@ public function setFriendlyName($friendlyName)
/**
* The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and `-` and must end with `pstn.twilio.com`. See [Termination Settings](https://www.twilio.com/docs/sip-trunking#termination) for more information.
*
- * @param string $domainName The unique address you reserve on Twilio to which
- * you route your SIP traffic
+ * @param string $domainName The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and `-` and must end with `pstn.twilio.com`. See [Termination Settings](https://www.twilio.com/docs/sip-trunking#termination) for more information.
* @return $this Fluent Builder
*/
- public function setDomainName($domainName)
+ public function setDomainName(string $domainName): self
{
$this->options['domainName'] = $domainName;
return $this;
@@ -110,12 +158,10 @@ public function setDomainName($domainName)
/**
* The URL we should call using the `disaster_recovery_method` if an error occurs while sending SIP traffic towards the configured Origination URL. We retrieve TwiML from the URL and execute the instructions like any other normal TwiML call. See [Disaster Recovery](https://www.twilio.com/docs/sip-trunking#disaster-recovery) for more information.
*
- * @param string $disasterRecoveryUrl The HTTP URL that we should call if an
- * error occurs while sending SIP traffic
- * towards your configured Origination URL
+ * @param string $disasterRecoveryUrl The URL we should call using the `disaster_recovery_method` if an error occurs while sending SIP traffic towards the configured Origination URL. We retrieve TwiML from the URL and execute the instructions like any other normal TwiML call. See [Disaster Recovery](https://www.twilio.com/docs/sip-trunking#disaster-recovery) for more information.
* @return $this Fluent Builder
*/
- public function setDisasterRecoveryUrl($disasterRecoveryUrl)
+ public function setDisasterRecoveryUrl(string $disasterRecoveryUrl): self
{
$this->options['disasterRecoveryUrl'] = $disasterRecoveryUrl;
return $this;
@@ -124,35 +170,32 @@ public function setDisasterRecoveryUrl($disasterRecoveryUrl)
/**
* The HTTP method we should use to call the `disaster_recovery_url`. Can be: `GET` or `POST`.
*
- * @param string $disasterRecoveryMethod The HTTP method we should use to call
- * the disaster_recovery_url
+ * @param string $disasterRecoveryMethod The HTTP method we should use to call the `disaster_recovery_url`. Can be: `GET` or `POST`.
* @return $this Fluent Builder
*/
- public function setDisasterRecoveryMethod($disasterRecoveryMethod)
+ public function setDisasterRecoveryMethod(string $disasterRecoveryMethod): self
{
$this->options['disasterRecoveryMethod'] = $disasterRecoveryMethod;
return $this;
}
/**
- * The recording settings for the trunk. Can be: `do-not-record`, `record-from-ringing`, `record-from-answer`. If set to `record-from-ringing` or `record-from-answer`, all calls going through the trunk will be recorded. The only way to change recording parameters is on a sub-resource of a Trunk after it has been created. e.g.`/Trunks/[Trunk_SID]/Recording -XPOST -d'Mode=record-from-answer'`. See [Recording](https://www.twilio.com/docs/sip-trunking#recording) for more information.
- *
- * @param string $recording The recording settings for the trunk
+ * @param string $transferMode
* @return $this Fluent Builder
*/
- public function setRecording($recording)
+ public function setTransferMode(string $transferMode): self
{
- $this->options['recording'] = $recording;
+ $this->options['transferMode'] = $transferMode;
return $this;
}
/**
* Whether Secure Trunking is enabled for the trunk. If enabled, all calls going through the trunk will be secure using SRTP for media and TLS for signaling. If disabled, then RTP will be used for media. See [Secure Trunking](https://www.twilio.com/docs/sip-trunking#securetrunking) for more information.
*
- * @param bool $secure Whether Secure Trunking is enabled for the trunk
+ * @param bool $secure Whether Secure Trunking is enabled for the trunk. If enabled, all calls going through the trunk will be secure using SRTP for media and TLS for signaling. If disabled, then RTP will be used for media. See [Secure Trunking](https://www.twilio.com/docs/sip-trunking#securetrunking) for more information.
* @return $this Fluent Builder
*/
- public function setSecure($secure)
+ public function setSecure(bool $secure): self
{
$this->options['secure'] = $secure;
return $this;
@@ -161,67 +204,81 @@ public function setSecure($secure)
/**
* Whether Caller ID Name (CNAM) lookup should be enabled for the trunk. If enabled, all inbound calls to the SIP Trunk from the United States and Canada automatically perform a CNAM Lookup and display Caller ID data on your phone. See [CNAM Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information.
*
- * @param bool $cnamLookupEnabled Whether Caller ID Name (CNAM) lookup should
- * be enabled for the trunk
+ * @param bool $cnamLookupEnabled Whether Caller ID Name (CNAM) lookup should be enabled for the trunk. If enabled, all inbound calls to the SIP Trunk from the United States and Canada automatically perform a CNAM Lookup and display Caller ID data on your phone. See [CNAM Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information.
* @return $this Fluent Builder
*/
- public function setCnamLookupEnabled($cnamLookupEnabled)
+ public function setCnamLookupEnabled(bool $cnamLookupEnabled): self
{
$this->options['cnamLookupEnabled'] = $cnamLookupEnabled;
return $this;
}
+ /**
+ * @param string $transferCallerId
+ * @return $this Fluent Builder
+ */
+ public function setTransferCallerId(string $transferCallerId): self
+ {
+ $this->options['transferCallerId'] = $transferCallerId;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Trunking.V1.CreateTrunkOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Trunking.V1.CreateTrunkOptions ' . $options . ']';
}
}
+
+
+
class UpdateTrunkOptions extends Options
-{
+ {
/**
- * @param string $friendlyName A string to describe the resource
- * @param string $domainName The unique address you reserve on Twilio to which
- * you route your SIP traffic
- * @param string $disasterRecoveryUrl The HTTP URL that we should call if an
- * error occurs while sending SIP traffic
- * towards your configured Origination URL
- * @param string $disasterRecoveryMethod The HTTP method we should use to call
- * the disaster_recovery_url
- * @param string $recording The recording settings for the trunk
- * @param bool $secure Whether Secure Trunking is enabled for the trunk
- * @param bool $cnamLookupEnabled Whether Caller ID Name (CNAM) lookup should
- * be enabled for the trunk
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
+ * @param string $domainName The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and `-` and must end with `pstn.twilio.com`. See [Termination Settings](https://www.twilio.com/docs/sip-trunking#termination) for more information.
+ * @param string $disasterRecoveryUrl The URL we should call using the `disaster_recovery_method` if an error occurs while sending SIP traffic towards the configured Origination URL. We retrieve TwiML from the URL and execute the instructions like any other normal TwiML call. See [Disaster Recovery](https://www.twilio.com/docs/sip-trunking#disaster-recovery) for more information.
+ * @param string $disasterRecoveryMethod The HTTP method we should use to call the `disaster_recovery_url`. Can be: `GET` or `POST`.
+ * @param string $transferMode
+ * @param bool $secure Whether Secure Trunking is enabled for the trunk. If enabled, all calls going through the trunk will be secure using SRTP for media and TLS for signaling. If disabled, then RTP will be used for media. See [Secure Trunking](https://www.twilio.com/docs/sip-trunking#securetrunking) for more information.
+ * @param bool $cnamLookupEnabled Whether Caller ID Name (CNAM) lookup should be enabled for the trunk. If enabled, all inbound calls to the SIP Trunk from the United States and Canada automatically perform a CNAM Lookup and display Caller ID data on your phone. See [CNAM Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information.
+ * @param string $transferCallerId
*/
- public function __construct($friendlyName = Values::NONE, $domainName = Values::NONE, $disasterRecoveryUrl = Values::NONE, $disasterRecoveryMethod = Values::NONE, $recording = Values::NONE, $secure = Values::NONE, $cnamLookupEnabled = Values::NONE)
- {
+ public function __construct(
+
+ string $friendlyName = Values::NONE,
+ string $domainName = Values::NONE,
+ string $disasterRecoveryUrl = Values::NONE,
+ string $disasterRecoveryMethod = Values::NONE,
+ string $transferMode = Values::NONE,
+ bool $secure = Values::BOOL_NONE,
+ bool $cnamLookupEnabled = Values::BOOL_NONE,
+ string $transferCallerId = Values::NONE
+
+ ) {
$this->options['friendlyName'] = $friendlyName;
$this->options['domainName'] = $domainName;
$this->options['disasterRecoveryUrl'] = $disasterRecoveryUrl;
$this->options['disasterRecoveryMethod'] = $disasterRecoveryMethod;
- $this->options['recording'] = $recording;
+ $this->options['transferMode'] = $transferMode;
$this->options['secure'] = $secure;
$this->options['cnamLookupEnabled'] = $cnamLookupEnabled;
+ $this->options['transferCallerId'] = $transferCallerId;
}
/**
* A descriptive string that you create to describe the resource. It can be up to 64 characters long.
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 64 characters long.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -230,11 +287,10 @@ public function setFriendlyName($friendlyName)
/**
* The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and `-` and must end with `pstn.twilio.com`. See [Termination Settings](https://www.twilio.com/docs/sip-trunking#termination) for more information.
*
- * @param string $domainName The unique address you reserve on Twilio to which
- * you route your SIP traffic
+ * @param string $domainName The unique address you reserve on Twilio to which you route your SIP traffic. Domain names can contain letters, digits, and `-` and must end with `pstn.twilio.com`. See [Termination Settings](https://www.twilio.com/docs/sip-trunking#termination) for more information.
* @return $this Fluent Builder
*/
- public function setDomainName($domainName)
+ public function setDomainName(string $domainName): self
{
$this->options['domainName'] = $domainName;
return $this;
@@ -243,12 +299,10 @@ public function setDomainName($domainName)
/**
* The URL we should call using the `disaster_recovery_method` if an error occurs while sending SIP traffic towards the configured Origination URL. We retrieve TwiML from the URL and execute the instructions like any other normal TwiML call. See [Disaster Recovery](https://www.twilio.com/docs/sip-trunking#disaster-recovery) for more information.
*
- * @param string $disasterRecoveryUrl The HTTP URL that we should call if an
- * error occurs while sending SIP traffic
- * towards your configured Origination URL
+ * @param string $disasterRecoveryUrl The URL we should call using the `disaster_recovery_method` if an error occurs while sending SIP traffic towards the configured Origination URL. We retrieve TwiML from the URL and execute the instructions like any other normal TwiML call. See [Disaster Recovery](https://www.twilio.com/docs/sip-trunking#disaster-recovery) for more information.
* @return $this Fluent Builder
*/
- public function setDisasterRecoveryUrl($disasterRecoveryUrl)
+ public function setDisasterRecoveryUrl(string $disasterRecoveryUrl): self
{
$this->options['disasterRecoveryUrl'] = $disasterRecoveryUrl;
return $this;
@@ -257,35 +311,32 @@ public function setDisasterRecoveryUrl($disasterRecoveryUrl)
/**
* The HTTP method we should use to call the `disaster_recovery_url`. Can be: `GET` or `POST`.
*
- * @param string $disasterRecoveryMethod The HTTP method we should use to call
- * the disaster_recovery_url
+ * @param string $disasterRecoveryMethod The HTTP method we should use to call the `disaster_recovery_url`. Can be: `GET` or `POST`.
* @return $this Fluent Builder
*/
- public function setDisasterRecoveryMethod($disasterRecoveryMethod)
+ public function setDisasterRecoveryMethod(string $disasterRecoveryMethod): self
{
$this->options['disasterRecoveryMethod'] = $disasterRecoveryMethod;
return $this;
}
/**
- * The recording settings for the trunk. Can be: `do-not-record`, `record-from-ringing`, `record-from-answer`. If set to `record-from-ringing` or `record-from-answer`, all calls going through the trunk will be recorded. See [Recording](https://www.twilio.com/docs/sip-trunking#recording) for more information.
- *
- * @param string $recording The recording settings for the trunk
+ * @param string $transferMode
* @return $this Fluent Builder
*/
- public function setRecording($recording)
+ public function setTransferMode(string $transferMode): self
{
- $this->options['recording'] = $recording;
+ $this->options['transferMode'] = $transferMode;
return $this;
}
/**
* Whether Secure Trunking is enabled for the trunk. If enabled, all calls going through the trunk will be secure using SRTP for media and TLS for signaling. If disabled, then RTP will be used for media. See [Secure Trunking](https://www.twilio.com/docs/sip-trunking#securetrunking) for more information.
*
- * @param bool $secure Whether Secure Trunking is enabled for the trunk
+ * @param bool $secure Whether Secure Trunking is enabled for the trunk. If enabled, all calls going through the trunk will be secure using SRTP for media and TLS for signaling. If disabled, then RTP will be used for media. See [Secure Trunking](https://www.twilio.com/docs/sip-trunking#securetrunking) for more information.
* @return $this Fluent Builder
*/
- public function setSecure($secure)
+ public function setSecure(bool $secure): self
{
$this->options['secure'] = $secure;
return $this;
@@ -294,29 +345,34 @@ public function setSecure($secure)
/**
* Whether Caller ID Name (CNAM) lookup should be enabled for the trunk. If enabled, all inbound calls to the SIP Trunk from the United States and Canada automatically perform a CNAM Lookup and display Caller ID data on your phone. See [CNAM Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information.
*
- * @param bool $cnamLookupEnabled Whether Caller ID Name (CNAM) lookup should
- * be enabled for the trunk
+ * @param bool $cnamLookupEnabled Whether Caller ID Name (CNAM) lookup should be enabled for the trunk. If enabled, all inbound calls to the SIP Trunk from the United States and Canada automatically perform a CNAM Lookup and display Caller ID data on your phone. See [CNAM Lookups](https://www.twilio.com/docs/sip-trunking#CNAM) for more information.
* @return $this Fluent Builder
*/
- public function setCnamLookupEnabled($cnamLookupEnabled)
+ public function setCnamLookupEnabled(bool $cnamLookupEnabled): self
{
$this->options['cnamLookupEnabled'] = $cnamLookupEnabled;
return $this;
}
+ /**
+ * @param string $transferCallerId
+ * @return $this Fluent Builder
+ */
+ public function setTransferCallerId(string $transferCallerId): self
+ {
+ $this->options['transferCallerId'] = $transferCallerId;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Trunking.V1.UpdateTrunkOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Trunking.V1.UpdateTrunkOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/TrunkPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/TrunkPage.php
index ed37bed..d136af3 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/TrunkPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/TrunkPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return TrunkInstance \Twilio\Rest\Trunking\V1\TrunkInstance
+ */
+ public function buildInstance(array $payload): TrunkInstance
{
return new TrunkInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Trunking.V1.TrunkPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Verify.php b/vendor/twilio/sdk/src/Twilio/Rest/Verify.php
index d478fe5..3d5de3f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Verify.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Verify.php
@@ -1,111 +1,99 @@
forms instead.
+ */
+ protected function getForms(): \Twilio\Rest\Verify\V2\FormList {
+ echo "forms is deprecated. Use v2->forms instead.";
+ return $this->v2->forms;
+ }
/**
- * Construct the Verify Domain
- *
- * @param \Twilio\Rest\Client $client Twilio\Rest\Client to communicate with
- * Twilio
- * @return \Twilio\Rest\Verify Domain for Verify
+ * @deprecated Use v2->forms(\$formType) instead.
+ * @param string $formType The Type of this Form
*/
- public function __construct(Client $client)
- {
- parent::__construct($client);
+ protected function contextForms(string $formType): \Twilio\Rest\Verify\V2\FormContext {
+ echo "forms(\$formType) is deprecated. Use v2->forms(\$formType) instead.";
+ return $this->v2->forms($formType);
+ }
- $this->baseUrl = 'https://verify.twilio.com';
+ /**
+ * @deprecated Use v2->safelist instead.
+ */
+ protected function getSafelist(): \Twilio\Rest\Verify\V2\SafelistList {
+ echo "safelist is deprecated. Use v2->safelist instead.";
+ return $this->v2->safelist;
}
/**
- * @return \Twilio\Rest\Verify\V2 Version v2 of verify
+ * @deprecated Use v2->safelist(\$phoneNumber) instead.
+ * @param string $phoneNumber The phone number to be fetched from SafeList.
*/
- protected function getV2()
- {
- if (!$this->_v2) {
- $this->_v2 = new V2($this);
- }
- return $this->_v2;
+ protected function contextSafelist(string $phoneNumber): \Twilio\Rest\Verify\V2\SafelistContext {
+ echo "safelist(\$phoneNumber) is deprecated. Use v2->safelist(\$phoneNumber) instead.";
+ return $this->v2->safelist($phoneNumber);
}
/**
- * Magic getter to lazy load version
- *
- * @param string $name Version to return
- * @return \Twilio\Version The requested version
- * @throws TwilioException For unknown versions
+ * @deprecated Use v2->services instead.
*/
- public function __get($name)
- {
- $method = 'get' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return $this->$method();
- }
+ protected function getServices(): \Twilio\Rest\Verify\V2\ServiceList {
+ echo "services is deprecated. Use v2->services instead.";
+ return $this->v2->services;
+ }
- throw new TwilioException('Unknown version ' . $name);
+ /**
+ * @deprecated Use v2->services(\$sid) instead.
+ * @param string $sid The unique string that identifies the resource
+ */
+ protected function contextServices(string $sid): \Twilio\Rest\Verify\V2\ServiceContext {
+ echo "services(\$sid) is deprecated. Use v2->services(\$sid) instead.";
+ return $this->v2->services($sid);
}
/**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
+ * @deprecated Use v2->verificationAttempts instead.
*/
- public function __call($name, $arguments)
- {
- $method = 'context' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return \call_user_func_array(array($this, $method), $arguments);
- }
+ protected function getVerificationAttempts(): \Twilio\Rest\Verify\V2\VerificationAttemptList {
+ echo "verificationAttempts is deprecated. Use v2->verificationAttempts instead.";
+ return $this->v2->verificationAttempts;
+ }
- throw new TwilioException('Unknown context ' . $name);
+ /**
+ * @deprecated Use v2->verificationAttempts(\$sid) instead.
+ * @param string $sid Verification Attempt Sid.
+ */
+ protected function contextVerificationAttempts(string $sid): \Twilio\Rest\Verify\V2\VerificationAttemptContext {
+ echo "verificationAttempts(\$sid) is deprecated. Use v2->verificationAttempts(\$sid) instead.";
+ return $this->v2->verificationAttempts($sid);
}
/**
- * @return \Twilio\Rest\Verify\V2\ServiceList
+ * @deprecated Use v2->verificationAttemptsSummary instead.
*/
- protected function getServices()
- {
- return $this->v2->services;
+ protected function getVerificationAttemptsSummary(): \Twilio\Rest\Verify\V2\VerificationAttemptsSummaryList {
+ echo "verificationAttemptsSummary is deprecated. Use v2->verificationAttemptsSummary instead.";
+ return $this->v2->verificationAttemptsSummary;
}
/**
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Verify\V2\ServiceContext
+ * @deprecated Use v2->verificationAttemptsSummary() instead.
*/
- protected function contextServices($sid)
- {
- return $this->v2->services($sid);
+ protected function contextVerificationAttemptsSummary(): \Twilio\Rest\Verify\V2\VerificationAttemptsSummaryContext {
+ echo "verificationAttemptsSummary() is deprecated. Use v2->verificationAttemptsSummary() instead.";
+ return $this->v2->verificationAttemptsSummary();
}
/**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
+ * @deprecated Use v2->templates instead.
*/
- public function __toString()
- {
- return '[Twilio.Verify]';
+ protected function getTemplates(): \Twilio\Rest\Verify\V2\TemplateList {
+ echo "templates is deprecated. Use v2->templates instead.";
+ return $this->v2->templates;
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2.php b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2.php
index 6a78a98..df5e34f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2.php
@@ -1,32 +1,56 @@
version = 'v2';
}
- /**
- * @return \Twilio\Rest\Verify\V2\ServiceList
- */
- protected function getServices()
+ protected function getForms(): FormList
+ {
+ if (!$this->_forms) {
+ $this->_forms = new FormList($this);
+ }
+ return $this->_forms;
+ }
+
+ protected function getSafelist(): SafelistList
+ {
+ if (!$this->_safelist) {
+ $this->_safelist = new SafelistList($this);
+ }
+ return $this->_safelist;
+ }
+
+ protected function getServices(): ServiceList
{
if (!$this->_services) {
$this->_services = new ServiceList($this);
@@ -45,6 +82,30 @@ protected function getServices()
return $this->_services;
}
+ protected function getTemplates(): TemplateList
+ {
+ if (!$this->_templates) {
+ $this->_templates = new TemplateList($this);
+ }
+ return $this->_templates;
+ }
+
+ protected function getVerificationAttempts(): VerificationAttemptList
+ {
+ if (!$this->_verificationAttempts) {
+ $this->_verificationAttempts = new VerificationAttemptList($this);
+ }
+ return $this->_verificationAttempts;
+ }
+
+ protected function getVerificationAttemptsSummary(): VerificationAttemptsSummaryList
+ {
+ if (!$this->_verificationAttemptsSummary) {
+ $this->_verificationAttemptsSummary = new VerificationAttemptsSummaryList($this);
+ }
+ return $this->_verificationAttemptsSummary;
+ }
+
/**
* Magic getter to lazy load root resources
*
@@ -52,7 +113,7 @@ protected function getServices()
* @return \Twilio\ListResource The requested resource
* @throws TwilioException For unknown resource
*/
- public function __get($name)
+ public function __get(string $name)
{
$method = 'get' . \ucfirst($name);
if (\method_exists($this, $method)) {
@@ -67,10 +128,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -85,8 +146,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Verify.V2]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/MessagingConfigurationContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/MessagingConfigurationContext.php
index 6bb9bd8..ffa20d1 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/MessagingConfigurationContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/MessagingConfigurationContext.php
@@ -2,81 +2,81 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Verify
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Verify\V2\Service;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class MessagingConfigurationContext extends InstanceContext
-{
+ {
/**
* Initialize the MessagingConfigurationContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $country The ISO-3166-1 country code of the country or `all`.
- * @return \Twilio\Rest\Verify\V2\Service\MessagingConfigurationContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) that the resource is associated with.
+ * @param string $country The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`.
*/
- public function __construct(Version $version, $serviceSid, $country)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $country
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'country' => $country,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'country' =>
+ $country,
+ ];
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/MessagingConfigurations/' . \rawurlencode($country) . '';
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/MessagingConfigurations/' . \rawurlencode($country)
+ .'';
}
/**
- * Update the MessagingConfigurationInstance
+ * Delete the MessagingConfigurationInstance
*
- * @param string $messagingServiceSid The SID of the Messaging Service used for
- * this configuration.
- * @return MessagingConfigurationInstance Updated MessagingConfigurationInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($messagingServiceSid)
+ public function delete(): bool
{
- $data = Values::of(array('MessagingServiceSid' => $messagingServiceSid,));
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new MessagingConfigurationInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['country']
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a MessagingConfigurationInstance
+ * Fetch the MessagingConfigurationInstance
*
* @return MessagingConfigurationInstance Fetched MessagingConfigurationInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): MessagingConfigurationInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new MessagingConfigurationInstance(
$this->version,
@@ -86,28 +86,45 @@ public function fetch()
);
}
+
/**
- * Deletes the MessagingConfigurationInstance
+ * Update the MessagingConfigurationInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param string $messagingServiceSid The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to be used to send SMS to the country of this configuration.
+ * @return MessagingConfigurationInstance Updated MessagingConfigurationInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(string $messagingServiceSid): MessagingConfigurationInstance
{
- return $this->version->delete('delete', $this->uri);
+
+ $data = Values::of([
+ 'MessagingServiceSid' =>
+ $messagingServiceSid,
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
+
+ return new MessagingConfigurationInstance(
+ $this->version,
+ $payload,
+ $this->solution['serviceSid'],
+ $this->solution['country']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Verify.V2.MessagingConfigurationContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/MessagingConfigurationInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/MessagingConfigurationInstance.php
index 074d892..7d65ca6 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/MessagingConfigurationInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/MessagingConfigurationInstance.php
@@ -2,46 +2,53 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Verify
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Verify\V2\Service;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
- * @property string $serviceSid
- * @property string $country
- * @property string $messagingServiceSid
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
+ * @property string|null $accountSid
+ * @property string|null $serviceSid
+ * @property string|null $country
+ * @property string|null $messagingServiceSid
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
*/
class MessagingConfigurationInstance extends InstanceResource
{
/**
* Initialize the MessagingConfigurationInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $country The ISO-3166-1 country code of the country or `all`.
- * @return \Twilio\Rest\Verify\V2\Service\MessagingConfigurationInstance
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) that the resource is associated with.
+ * @param string $country The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $country = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $country = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
'country' => Values::array_get($payload, 'country'),
@@ -49,24 +56,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $coun
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'country' => $country ?: $this->properties['country'],
- );
+ $this->solution = ['serviceSid' => $serviceSid, 'country' => $country ?: $this->properties['country'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Verify\V2\Service\MessagingConfigurationContext Context
- * for
- * this
- * MessagingConfigurationInstance
+ * @return MessagingConfigurationContext Context for this MessagingConfigurationInstance
*/
- protected function proxy()
+ protected function proxy(): MessagingConfigurationContext
{
if (!$this->context) {
$this->context = new MessagingConfigurationContext(
@@ -80,38 +81,40 @@ protected function proxy()
}
/**
- * Update the MessagingConfigurationInstance
+ * Delete the MessagingConfigurationInstance
*
- * @param string $messagingServiceSid The SID of the Messaging Service used for
- * this configuration.
- * @return MessagingConfigurationInstance Updated MessagingConfigurationInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($messagingServiceSid)
+ public function delete(): bool
{
- return $this->proxy()->update($messagingServiceSid);
+
+ return $this->proxy()->delete();
}
/**
- * Fetch a MessagingConfigurationInstance
+ * Fetch the MessagingConfigurationInstance
*
* @return MessagingConfigurationInstance Fetched MessagingConfigurationInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): MessagingConfigurationInstance
{
+
return $this->proxy()->fetch();
}
/**
- * Deletes the MessagingConfigurationInstance
+ * Update the MessagingConfigurationInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param string $messagingServiceSid The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to be used to send SMS to the country of this configuration.
+ * @return MessagingConfigurationInstance Updated MessagingConfigurationInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(string $messagingServiceSid): MessagingConfigurationInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->update($messagingServiceSid);
}
/**
@@ -121,7 +124,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -140,12 +143,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Verify.V2.MessagingConfigurationInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/MessagingConfigurationList.php b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/MessagingConfigurationList.php
index a3fe8e2..08631a2 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/MessagingConfigurationList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/MessagingConfigurationList.php
@@ -2,65 +2,103 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Verify
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Verify\V2\Service;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class MessagingConfigurationList extends ListResource
-{
+ {
/**
* Construct the MessagingConfigurationList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @return \Twilio\Rest\Verify\V2\Service\MessagingConfigurationList
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) that the resource is associated with.
*/
- public function __construct(Version $version, $serviceSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/MessagingConfigurations';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/MessagingConfigurations';
}
/**
- * Create a new MessagingConfigurationInstance
+ * Create the MessagingConfigurationInstance
*
- * @param string $country The ISO-3166-1 country code of the country or `all`.
- * @param string $messagingServiceSid The SID of the Messaging Service used for
- * this configuration.
- * @return MessagingConfigurationInstance Newly created
- * MessagingConfigurationInstance
+ * @param string $country The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`.
+ * @param string $messagingServiceSid The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) to be used to send SMS to the country of this configuration.
+ * @return MessagingConfigurationInstance Created MessagingConfigurationInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($country, $messagingServiceSid)
+ public function create(string $country, string $messagingServiceSid): MessagingConfigurationInstance
{
- $data = Values::of(array('Country' => $country, 'MessagingServiceSid' => $messagingServiceSid,));
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'Country' =>
+ $country,
+ 'MessagingServiceSid' =>
+ $messagingServiceSid,
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new MessagingConfigurationInstance(
+ $this->version,
+ $payload,
+ $this->solution['serviceSid']
);
+ }
- return new MessagingConfigurationInstance($this->version, $payload, $this->solution['serviceSid']);
+
+ /**
+ * Reads MessagingConfigurationInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return MessagingConfigurationInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
- * Streams MessagingConfigurationInstance records from the API as a generator
- * stream.
+ * Streams MessagingConfigurationInstance records from the API as a generator stream.
* This operation lazily loads records as efficiently as possible until the
* limit
* is reached.
@@ -75,9 +113,9 @@ public function create($country, $messagingServiceSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -87,61 +125,40 @@ public function stream($limit = null, $pageSize = null)
}
/**
- * Reads MessagingConfigurationInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return MessagingConfigurationInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
- /**
- * Retrieve a single page of MessagingConfigurationInstance records from the
- * API.
+ * Retrieve a single page of MessagingConfigurationInstance records from the API.
* Request is executed immediately
*
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of MessagingConfigurationInstance
+ * @return MessagingConfigurationPage Page of MessagingConfigurationInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): MessagingConfigurationPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new MessagingConfigurationPage($this->version, $response, $this->solution);
}
/**
- * Retrieve a specific page of MessagingConfigurationInstance records from the
- * API.
+ * Retrieve a specific page of MessagingConfigurationInstance records from the API.
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of MessagingConfigurationInstance
+ * @return MessagingConfigurationPage Page of MessagingConfigurationInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): MessagingConfigurationPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -151,15 +168,22 @@ public function getPage($targetUrl)
return new MessagingConfigurationPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a MessagingConfigurationContext
*
- * @param string $country The ISO-3166-1 country code of the country or `all`.
- * @return \Twilio\Rest\Verify\V2\Service\MessagingConfigurationContext
+ * @param string $country The [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value `all`.
*/
- public function getContext($country)
+ public function getContext(
+ string $country
+
+ ): MessagingConfigurationContext
{
- return new MessagingConfigurationContext($this->version, $this->solution['serviceSid'], $country);
+ return new MessagingConfigurationContext(
+ $this->version,
+ $this->solution['serviceSid'],
+ $country
+ );
}
/**
@@ -167,8 +191,8 @@ public function getContext($country)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Verify.V2.MessagingConfigurationList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/MessagingConfigurationPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/MessagingConfigurationPage.php
index b477a7e..9e3016e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/MessagingConfigurationPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/MessagingConfigurationPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return MessagingConfigurationInstance \Twilio\Rest\Verify\V2\Service\MessagingConfigurationInstance
+ */
+ public function buildInstance(array $payload): MessagingConfigurationInstance
{
return new MessagingConfigurationInstance($this->version, $payload, $this->solution['serviceSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Verify.V2.MessagingConfigurationPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/RateLimit/BucketContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/RateLimit/BucketContext.php
index 5282192..20d5793 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/RateLimit/BucketContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/RateLimit/BucketContext.php
@@ -2,64 +2,87 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Verify
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Verify\V2\Service\RateLimit;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class BucketContext extends InstanceContext
-{
+ {
/**
* Initialize the BucketContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $rateLimitSid Rate Limit Sid.
- * @param string $sid A string that uniquely identifies this Bucket.
- * @return \Twilio\Rest\Verify\V2\Service\RateLimit\BucketContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with.
+ * @param string $rateLimitSid The Twilio-provided string that uniquely identifies the Rate Limit resource.
+ * @param string $sid A 34 character string that uniquely identifies this Bucket.
*/
- public function __construct(Version $version, $serviceSid, $rateLimitSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $rateLimitSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'rateLimitSid' => $rateLimitSid,
- 'sid' => $sid,
- );
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'rateLimitSid' =>
+ $rateLimitSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/RateLimits/' . \rawurlencode($rateLimitSid) . '/Buckets/' . \rawurlencode($sid) . '';
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/RateLimits/' . \rawurlencode($rateLimitSid)
+ .'/Buckets/' . \rawurlencode($sid)
+ .'';
}
/**
- * Update the BucketInstance
+ * Delete the BucketInstance
*
- * @param array|Options $options Optional Arguments
- * @return BucketInstance Updated BucketInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function delete(): bool
{
- $options = new Values($options);
- $data = Values::of(array('Max' => $options['max'], 'Interval' => $options['interval'],));
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
+ }
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+
+ /**
+ * Fetch the BucketInstance
+ *
+ * @return BucketInstance Fetched BucketInstance
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function fetch(): BucketInstance
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new BucketInstance(
$this->version,
@@ -70,21 +93,28 @@ public function update($options = array())
);
}
+
/**
- * Fetch a BucketInstance
+ * Update the BucketInstance
*
- * @return BucketInstance Fetched BucketInstance
+ * @param array|Options $options Optional Arguments
+ * @return BucketInstance Updated BucketInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function update(array $options = []): BucketInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $options = new Values($options);
+
+ $data = Values::of([
+ 'Max' =>
+ $options['max'],
+ 'Interval' =>
+ $options['interval'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new BucketInstance(
$this->version,
@@ -95,28 +125,18 @@ public function fetch()
);
}
- /**
- * Deletes the BucketInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Verify.V2.BucketContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/RateLimit/BucketInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/RateLimit/BucketInstance.php
index 9496a95..e58701a 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/RateLimit/BucketInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/RateLimit/BucketInstance.php
@@ -2,50 +2,57 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Verify
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Verify\V2\Service\RateLimit;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $rateLimitSid
- * @property string $serviceSid
- * @property string $accountSid
+ * @property string|null $sid
+ * @property string|null $rateLimitSid
+ * @property string|null $serviceSid
+ * @property string|null $accountSid
* @property int $max
* @property int $interval
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
*/
class BucketInstance extends InstanceResource
{
/**
* Initialize the BucketInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $rateLimitSid Rate Limit Sid.
- * @param string $sid A string that uniquely identifies this Bucket.
- * @return \Twilio\Rest\Verify\V2\Service\RateLimit\BucketInstance
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with.
+ * @param string $rateLimitSid The Twilio-provided string that uniquely identifies the Rate Limit resource.
+ * @param string $sid A 34 character string that uniquely identifies this Bucket.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $rateLimitSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $rateLimitSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'rateLimitSid' => Values::array_get($payload, 'rate_limit_sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
@@ -55,24 +62,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $rate
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array(
- 'serviceSid' => $serviceSid,
- 'rateLimitSid' => $rateLimitSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['serviceSid' => $serviceSid, 'rateLimitSid' => $rateLimitSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Verify\V2\Service\RateLimit\BucketContext Context for
- * this
- * BucketInstance
+ * @return BucketContext Context for this BucketInstance
*/
- protected function proxy()
+ protected function proxy(): BucketContext
{
if (!$this->context) {
$this->context = new BucketContext(
@@ -87,37 +88,40 @@ protected function proxy()
}
/**
- * Update the BucketInstance
+ * Delete the BucketInstance
*
- * @param array|Options $options Optional Arguments
- * @return BucketInstance Updated BucketInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function delete(): bool
{
- return $this->proxy()->update($options);
+
+ return $this->proxy()->delete();
}
/**
- * Fetch a BucketInstance
+ * Fetch the BucketInstance
*
* @return BucketInstance Fetched BucketInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): BucketInstance
{
+
return $this->proxy()->fetch();
}
/**
- * Deletes the BucketInstance
+ * Update the BucketInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return BucketInstance Updated BucketInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): BucketInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->update($options);
}
/**
@@ -127,7 +131,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -146,12 +150,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Verify.V2.BucketInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/RateLimit/BucketList.php b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/RateLimit/BucketList.php
index c3f5941..d3ad5c7 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/RateLimit/BucketList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/RateLimit/BucketList.php
@@ -2,58 +2,78 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Verify
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Verify\V2\Service\RateLimit;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class BucketList extends ListResource
-{
+ {
/**
* Construct the BucketList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $rateLimitSid Rate Limit Sid.
- * @return \Twilio\Rest\Verify\V2\Service\RateLimit\BucketList
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with.
+ * @param string $rateLimitSid The Twilio-provided string that uniquely identifies the Rate Limit resource.
*/
- public function __construct(Version $version, $serviceSid, $rateLimitSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid,
+ string $rateLimitSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'rateLimitSid' => $rateLimitSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/RateLimits/' . \rawurlencode($rateLimitSid) . '/Buckets';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ 'rateLimitSid' =>
+ $rateLimitSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/RateLimits/' . \rawurlencode($rateLimitSid)
+ .'/Buckets';
}
/**
- * Create a new BucketInstance
+ * Create the BucketInstance
*
- * @param int $max Max number of requests.
- * @param int $interval Number of seconds that the rate limit will be enforced
- * over.
- * @return BucketInstance Newly created BucketInstance
+ * @param int $max Maximum number of requests permitted in during the interval.
+ * @param int $interval Number of seconds that the rate limit will be enforced over.
+ * @return BucketInstance Created BucketInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($max, $interval)
+ public function create(int $max, int $interval): BucketInstance
{
- $data = Values::of(array('Max' => $max, 'Interval' => $interval,));
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'Max' =>
+ $max,
+ 'Interval' =>
+ $interval,
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
return new BucketInstance(
$this->version,
@@ -63,6 +83,27 @@ public function create($max, $interval)
);
}
+
+ /**
+ * Reads BucketInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return BucketInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
+ }
+
/**
* Streams BucketInstance records from the API as a generator stream.
* This operation lazily loads records as efficiently as possible until the
@@ -79,9 +120,9 @@ public function create($max, $interval)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -90,26 +131,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads BucketInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return BucketInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of BucketInstance records from the API.
* Request is executed immediately
@@ -117,21 +138,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of BucketInstance
+ * @return BucketPage Page of BucketInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): BucketPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new BucketPage($this->version, $response, $this->solution);
}
@@ -141,9 +163,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of BucketInstance
+ * @return BucketPage Page of BucketInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): BucketPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -153,13 +175,16 @@ public function getPage($targetUrl)
return new BucketPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a BucketContext
*
- * @param string $sid A string that uniquely identifies this Bucket.
- * @return \Twilio\Rest\Verify\V2\Service\RateLimit\BucketContext
+ * @param string $sid A 34 character string that uniquely identifies this Bucket.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): BucketContext
{
return new BucketContext(
$this->version,
@@ -174,8 +199,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Verify.V2.BucketList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/RateLimit/BucketOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/RateLimit/BucketOptions.php
index e2748ec..a49698e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/RateLimit/BucketOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/RateLimit/BucketOptions.php
@@ -1,10 +1,16 @@
options['max'] = $max;
$this->options['interval'] = $interval;
}
@@ -42,10 +67,10 @@ public function __construct($max = Values::NONE, $interval = Values::NONE)
/**
* Maximum number of requests permitted in during the interval.
*
- * @param int $max Max number of requests.
+ * @param int $max Maximum number of requests permitted in during the interval.
* @return $this Fluent Builder
*/
- public function setMax($max)
+ public function setMax(int $max): self
{
$this->options['max'] = $max;
return $this;
@@ -54,11 +79,10 @@ public function setMax($max)
/**
* Number of seconds that the rate limit will be enforced over.
*
- * @param int $interval Number of seconds that the rate limit will be enforced
- * over.
+ * @param int $interval Number of seconds that the rate limit will be enforced over.
* @return $this Fluent Builder
*/
- public function setInterval($interval)
+ public function setInterval(int $interval): self
{
$this->options['interval'] = $interval;
return $this;
@@ -69,14 +93,10 @@ public function setInterval($interval)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Verify.V2.UpdateBucketOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Verify.V2.UpdateBucketOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/RateLimit/BucketPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/RateLimit/BucketPage.php
index aea3743..3409e37 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/RateLimit/BucketPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/RateLimit/BucketPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return BucketInstance \Twilio\Rest\Verify\V2\Service\RateLimit\BucketInstance
+ */
+ public function buildInstance(array $payload): BucketInstance
{
- return new BucketInstance(
- $this->version,
- $payload,
- $this->solution['serviceSid'],
- $this->solution['rateLimitSid']
- );
+ return new BucketInstance($this->version, $payload, $this->solution['serviceSid'], $this->solution['rateLimitSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Verify.V2.BucketPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/RateLimitContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/RateLimitContext.php
index d968744..42d7ff7 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/RateLimitContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/RateLimitContext.php
@@ -2,66 +2,90 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Verify
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Verify\V2\Service;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Verify\V2\Service\RateLimit\BucketList;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Verify\V2\Service\RateLimit\BucketList;
+
/**
- * @property \Twilio\Rest\Verify\V2\Service\RateLimit\BucketList $buckets
+ * @property BucketList $buckets
* @method \Twilio\Rest\Verify\V2\Service\RateLimit\BucketContext buckets(string $sid)
*/
class RateLimitContext extends InstanceContext
-{
- protected $_buckets = null;
+ {
+ protected $_buckets;
/**
* Initialize the RateLimitContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Verify\V2\Service\RateLimitContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Rate Limit resource to fetch.
*/
- public function __construct(Version $version, $serviceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/RateLimits/' . \rawurlencode($sid) . '';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/RateLimits/' . \rawurlencode($sid)
+ .'';
}
/**
- * Update the RateLimitInstance
+ * Delete the RateLimitInstance
*
- * @param array|Options $options Optional Arguments
- * @return RateLimitInstance Updated RateLimitInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function delete(): bool
{
- $options = new Values($options);
- $data = Values::of(array('Description' => $options['description'],));
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
+ }
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+
+ /**
+ * Fetch the RateLimitInstance
+ *
+ * @return RateLimitInstance Fetched RateLimitInstance
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function fetch(): RateLimitInstance
+ {
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new RateLimitInstance(
$this->version,
@@ -71,21 +95,26 @@ public function update($options = array())
);
}
+
/**
- * Fetch a RateLimitInstance
+ * Update the RateLimitInstance
*
- * @return RateLimitInstance Fetched RateLimitInstance
+ * @param array|Options $options Optional Arguments
+ * @return RateLimitInstance Updated RateLimitInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function update(array $options = []): RateLimitInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $options = new Values($options);
+
+ $data = Values::of([
+ 'Description' =>
+ $options['description'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new RateLimitInstance(
$this->version,
@@ -95,23 +124,11 @@ public function fetch()
);
}
- /**
- * Deletes the RateLimitInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Access the buckets
- *
- * @return \Twilio\Rest\Verify\V2\Service\RateLimit\BucketList
*/
- protected function getBuckets()
+ protected function getBuckets(): BucketList
{
if (!$this->_buckets) {
$this->_buckets = new BucketList(
@@ -128,10 +145,10 @@ protected function getBuckets()
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -146,10 +163,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -164,12 +181,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Verify.V2.RateLimitContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/RateLimitInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/RateLimitInstance.php
index 6115643..890f4de 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/RateLimitInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/RateLimitInstance.php
@@ -2,51 +2,59 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Verify
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Verify\V2\Service;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Verify\V2\Service\RateLimit\BucketList;
+
/**
- * @property string $sid
- * @property string $serviceSid
- * @property string $accountSid
- * @property string $uniqueName
- * @property string $description
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
- * @property array $links
+ * @property string|null $sid
+ * @property string|null $serviceSid
+ * @property string|null $accountSid
+ * @property string|null $uniqueName
+ * @property string|null $description
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
+ * @property array|null $links
*/
class RateLimitInstance extends InstanceResource
{
- protected $_buckets = null;
+ protected $_buckets;
/**
* Initialize the RateLimitInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Verify\V2\Service\RateLimitInstance
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Rate Limit resource to fetch.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
@@ -56,19 +64,18 @@ public function __construct(Version $version, array $payload, $serviceSid, $sid
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Verify\V2\Service\RateLimitContext Context for this
- * RateLimitInstance
+ * @return RateLimitContext Context for this RateLimitInstance
*/
- protected function proxy()
+ protected function proxy(): RateLimitContext
{
if (!$this->context) {
$this->context = new RateLimitContext(
@@ -82,45 +89,46 @@ protected function proxy()
}
/**
- * Update the RateLimitInstance
+ * Delete the RateLimitInstance
*
- * @param array|Options $options Optional Arguments
- * @return RateLimitInstance Updated RateLimitInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function delete(): bool
{
- return $this->proxy()->update($options);
+
+ return $this->proxy()->delete();
}
/**
- * Fetch a RateLimitInstance
+ * Fetch the RateLimitInstance
*
* @return RateLimitInstance Fetched RateLimitInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): RateLimitInstance
{
+
return $this->proxy()->fetch();
}
/**
- * Deletes the RateLimitInstance
+ * Update the RateLimitInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return RateLimitInstance Updated RateLimitInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): RateLimitInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->update($options);
}
/**
* Access the buckets
- *
- * @return \Twilio\Rest\Verify\V2\Service\RateLimit\BucketList
*/
- protected function getBuckets()
+ protected function getBuckets(): BucketList
{
return $this->proxy()->buckets;
}
@@ -132,7 +140,7 @@ protected function getBuckets()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -151,12 +159,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Verify.V2.RateLimitInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/RateLimitList.php b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/RateLimitList.php
index 9aad890..6c52c16 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/RateLimitList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/RateLimitList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Verify
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Verify\V2\Service;
@@ -12,52 +19,85 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class RateLimitList extends ListResource
-{
+ {
/**
* Construct the RateLimitList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @return \Twilio\Rest\Verify\V2\Service\RateLimitList
+ * @param string $serviceSid The SID of the [Service](https://www.twilio.com/docs/verify/api/service) the resource is associated with.
*/
- public function __construct(Version $version, $serviceSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid,);
-
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/RateLimits';
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ ];
+
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/RateLimits';
}
/**
- * Create a new RateLimitInstance
+ * Create the RateLimitInstance
*
- * @param string $uniqueName A unique, developer assigned name of this Rate
- * Limit.
+ * @param string $uniqueName Provides a unique and addressable name to be assigned to this Rate Limit, assigned by the developer, to be optionally used in addition to SID. **This value should not contain PII.**
* @param array|Options $options Optional Arguments
- * @return RateLimitInstance Newly created RateLimitInstance
+ * @return RateLimitInstance Created RateLimitInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($uniqueName, $options = array())
+ public function create(string $uniqueName, array $options = []): RateLimitInstance
{
+
$options = new Values($options);
- $data = Values::of(array('UniqueName' => $uniqueName, 'Description' => $options['description'],));
+ $data = Values::of([
+ 'UniqueName' =>
+ $uniqueName,
+ 'Description' =>
+ $options['description'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ return new RateLimitInstance(
+ $this->version,
+ $payload,
+ $this->solution['serviceSid']
);
+ }
- return new RateLimitInstance($this->version, $payload, $this->solution['serviceSid']);
+
+ /**
+ * Reads RateLimitInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return RateLimitInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -76,9 +116,9 @@ public function create($uniqueName, $options = array())
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -87,26 +127,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads RateLimitInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return RateLimitInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of RateLimitInstance records from the API.
* Request is executed immediately
@@ -114,21 +134,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of RateLimitInstance
+ * @return RateLimitPage Page of RateLimitInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): RateLimitPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new RateLimitPage($this->version, $response, $this->solution);
}
@@ -138,9 +159,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of RateLimitInstance
+ * @return RateLimitPage Page of RateLimitInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): RateLimitPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -150,15 +171,22 @@ public function getPage($targetUrl)
return new RateLimitPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a RateLimitContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Verify\V2\Service\RateLimitContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the Rate Limit resource to fetch.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): RateLimitContext
{
- return new RateLimitContext($this->version, $this->solution['serviceSid'], $sid);
+ return new RateLimitContext(
+ $this->version,
+ $this->solution['serviceSid'],
+ $sid
+ );
}
/**
@@ -166,8 +194,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Verify.V2.RateLimitList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/RateLimitOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/RateLimitOptions.php
index eb4d885..be0f4f8 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/RateLimitOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/RateLimitOptions.php
@@ -1,10 +1,16 @@
options['description'] = $description;
}
@@ -49,7 +74,7 @@ public function __construct($description = Values::NONE)
* @param string $description Description of this Rate Limit
* @return $this Fluent Builder
*/
- public function setDescription($description)
+ public function setDescription(string $description): self
{
$this->options['description'] = $description;
return $this;
@@ -60,25 +85,26 @@ public function setDescription($description)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Verify.V2.CreateRateLimitOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Verify.V2.CreateRateLimitOptions ' . $options . ']';
}
}
+
+
+
class UpdateRateLimitOptions extends Options
-{
+ {
/**
* @param string $description Description of this Rate Limit
*/
- public function __construct($description = Values::NONE)
- {
+ public function __construct(
+
+ string $description = Values::NONE
+
+ ) {
$this->options['description'] = $description;
}
@@ -88,7 +114,7 @@ public function __construct($description = Values::NONE)
* @param string $description Description of this Rate Limit
* @return $this Fluent Builder
*/
- public function setDescription($description)
+ public function setDescription(string $description): self
{
$this->options['description'] = $description;
return $this;
@@ -99,14 +125,10 @@ public function setDescription($description)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Verify.V2.UpdateRateLimitOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Verify.V2.UpdateRateLimitOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/RateLimitPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/RateLimitPage.php
index e0b0de3..c0095f6 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/RateLimitPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/RateLimitPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return RateLimitInstance \Twilio\Rest\Verify\V2\Service\RateLimitInstance
+ */
+ public function buildInstance(array $payload): RateLimitInstance
{
return new RateLimitInstance($this->version, $payload, $this->solution['serviceSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Verify.V2.RateLimitPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/VerificationCheckInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/VerificationCheckInstance.php
index 29862c2..b562531 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/VerificationCheckInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/VerificationCheckInstance.php
@@ -2,49 +2,57 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Verify
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Verify\V2\Service;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $serviceSid
- * @property string $accountSid
- * @property string $to
+ * @property string|null $sid
+ * @property string|null $serviceSid
+ * @property string|null $accountSid
+ * @property string|null $to
* @property string $channel
- * @property string $status
- * @property bool $valid
- * @property string $amount
- * @property string $payee
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
+ * @property string|null $status
+ * @property bool|null $valid
+ * @property string|null $amount
+ * @property string|null $payee
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property array[]|null $snaAttemptsErrorCodes
*/
class VerificationCheckInstance extends InstanceResource
{
/**
* Initialize the VerificationCheckInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @return \Twilio\Rest\Verify\V2\Service\VerificationCheckInstance
+ * @param string $serviceSid The SID of the verification [Service](https://www.twilio.com/docs/verify/api/service) to create the resource under.
*/
- public function __construct(Version $version, array $payload, $serviceSid)
+ public function __construct(Version $version, array $payload, string $serviceSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
@@ -56,9 +64,10 @@ public function __construct(Version $version, array $payload, $serviceSid)
'payee' => Values::array_get($payload, 'payee'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- );
+ 'snaAttemptsErrorCodes' => Values::array_get($payload, 'sna_attempts_error_codes'),
+ ];
- $this->solution = array('serviceSid' => $serviceSid,);
+ $this->solution = ['serviceSid' => $serviceSid, ];
}
/**
@@ -68,7 +77,7 @@ public function __construct(Version $version, array $payload, $serviceSid)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -87,8 +96,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Verify.V2.VerificationCheckInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/VerificationCheckList.php b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/VerificationCheckList.php
index 900ac40..1aeabf5 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/VerificationCheckList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/VerificationCheckList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Verify
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Verify\V2\Service;
@@ -15,63 +22,77 @@
use Twilio\Values;
use Twilio\Version;
+
class VerificationCheckList extends ListResource
-{
+ {
/**
* Construct the VerificationCheckList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @return \Twilio\Rest\Verify\V2\Service\VerificationCheckList
+ * @param string $serviceSid The SID of the verification [Service](https://www.twilio.com/docs/verify/api/service) to create the resource under.
*/
- public function __construct(Version $version, $serviceSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ ];
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/VerificationCheck';
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/VerificationCheck';
}
/**
- * Create a new VerificationCheckInstance
+ * Create the VerificationCheckInstance
*
- * @param string $code The verification string
* @param array|Options $options Optional Arguments
- * @return VerificationCheckInstance Newly created VerificationCheckInstance
+ * @return VerificationCheckInstance Created VerificationCheckInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($code, $options = array())
+ public function create(array $options = []): VerificationCheckInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'Code' => $code,
- 'To' => $options['to'],
- 'VerificationSid' => $options['verificationSid'],
- 'Amount' => $options['amount'],
- 'Payee' => $options['payee'],
- ));
+ $data = Values::of([
+ 'Code' =>
+ $options['code'],
+ 'To' =>
+ $options['to'],
+ 'VerificationSid' =>
+ $options['verificationSid'],
+ 'Amount' =>
+ $options['amount'],
+ 'Payee' =>
+ $options['payee'],
+ 'SnaClientToken' =>
+ $options['snaClientToken'],
+ ]);
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
- return new VerificationCheckInstance($this->version, $payload, $this->solution['serviceSid']);
+ return new VerificationCheckInstance(
+ $this->version,
+ $payload,
+ $this->solution['serviceSid']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Verify.V2.VerificationCheckList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/VerificationCheckOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/VerificationCheckOptions.php
index 642bba2..711d377 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/VerificationCheckOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/VerificationCheckOptions.php
@@ -1,10 +1,16 @@
options['code'] = $code;
$this->options['to'] = $to;
$this->options['verificationSid'] = $verificationSid;
$this->options['amount'] = $amount;
$this->options['payee'] = $payee;
+ $this->options['snaClientToken'] = $snaClientToken;
+ }
+
+ /**
+ * The 4-10 character string being verified.
+ *
+ * @param string $code The 4-10 character string being verified.
+ * @return $this Fluent Builder
+ */
+ public function setCode(string $code): self
+ {
+ $this->options['code'] = $code;
+ return $this;
}
/**
* The phone number or [email](https://www.twilio.com/docs/verify/email) to verify. Either this parameter or the `verification_sid` must be specified. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
*
- * @param string $to The phone number or email to verify
+ * @param string $to The phone number or [email](https://www.twilio.com/docs/verify/email) to verify. Either this parameter or the `verification_sid` must be specified. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
* @return $this Fluent Builder
*/
- public function setTo($to)
+ public function setTo(string $to): self
{
$this->options['to'] = $to;
return $this;
@@ -62,11 +107,10 @@ public function setTo($to)
/**
* A SID that uniquely identifies the Verification Check. Either this parameter or the `to` phone number/[email](https://www.twilio.com/docs/verify/email) must be specified.
*
- * @param string $verificationSid A SID that uniquely identifies the
- * Verification Check
+ * @param string $verificationSid A SID that uniquely identifies the Verification Check. Either this parameter or the `to` phone number/[email](https://www.twilio.com/docs/verify/email) must be specified.
* @return $this Fluent Builder
*/
- public function setVerificationSid($verificationSid)
+ public function setVerificationSid(string $verificationSid): self
{
$this->options['verificationSid'] = $verificationSid;
return $this;
@@ -75,11 +119,10 @@ public function setVerificationSid($verificationSid)
/**
* The amount of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled.
*
- * @param string $amount The amount of the associated PSD2 compliant
- * transaction.
+ * @param string $amount The amount of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled.
* @return $this Fluent Builder
*/
- public function setAmount($amount)
+ public function setAmount(string $amount): self
{
$this->options['amount'] = $amount;
return $this;
@@ -88,28 +131,36 @@ public function setAmount($amount)
/**
* The payee of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled.
*
- * @param string $payee The payee of the associated PSD2 compliant transaction
+ * @param string $payee The payee of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled.
* @return $this Fluent Builder
*/
- public function setPayee($payee)
+ public function setPayee(string $payee): self
{
$this->options['payee'] = $payee;
return $this;
}
+ /**
+ * A sna client token received in sna url invocation response needs to be passed in Verification Check request and should match to get successful response.
+ *
+ * @param string $snaClientToken A sna client token received in sna url invocation response needs to be passed in Verification Check request and should match to get successful response.
+ * @return $this Fluent Builder
+ */
+ public function setSnaClientToken(string $snaClientToken): self
+ {
+ $this->options['snaClientToken'] = $snaClientToken;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Verify.V2.CreateVerificationCheckOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Verify.V2.CreateVerificationCheckOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/VerificationCheckPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/VerificationCheckPage.php
index 4607411..5060e3d 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/VerificationCheckPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/VerificationCheckPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return VerificationCheckInstance \Twilio\Rest\Verify\V2\Service\VerificationCheckInstance
+ */
+ public function buildInstance(array $payload): VerificationCheckInstance
{
return new VerificationCheckInstance($this->version, $payload, $this->solution['serviceSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Verify.V2.VerificationCheckPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/VerificationContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/VerificationContext.php
index 3084bbe..8c449a2 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/VerificationContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/VerificationContext.php
@@ -2,56 +2,67 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Verify
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Verify\V2\Service;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class VerificationContext extends InstanceContext
-{
+ {
/**
* Initialize the VerificationContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $serviceSid The SID of the verification Service to fetch the
- * resource from
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Verify\V2\Service\VerificationContext
+ * @param Version $version Version that contains the resource
+ * @param string $serviceSid The SID of the verification [Service](https://www.twilio.com/docs/verify/api/service) to create the resource under.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Verification resource to fetch.
*/
- public function __construct(Version $version, $serviceSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $serviceSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Verifications/' . \rawurlencode($sid) . '';
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Verifications/' . \rawurlencode($sid)
+ .'';
}
/**
- * Update the VerificationInstance
+ * Fetch the VerificationInstance
*
- * @param string $status The new status of the resource
- * @return VerificationInstance Updated VerificationInstance
+ * @return VerificationInstance Fetched VerificationInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($status)
+ public function fetch(): VerificationInstance
{
- $data = Values::of(array('Status' => $status,));
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new VerificationInstance(
$this->version,
@@ -61,21 +72,24 @@ public function update($status)
);
}
+
/**
- * Fetch a VerificationInstance
+ * Update the VerificationInstance
*
- * @return VerificationInstance Fetched VerificationInstance
+ * @param string $status
+ * @return VerificationInstance Updated VerificationInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function update(string $status): VerificationInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $data = Values::of([
+ 'Status' =>
+ $status,
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new VerificationInstance(
$this->version,
@@ -85,17 +99,18 @@ public function fetch()
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Verify.V2.VerificationContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/VerificationInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/VerificationInstance.php
index ee0cfbd..0fd1c9b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/VerificationInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/VerificationInstance.php
@@ -2,53 +2,61 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Verify
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Verify\V2\Service;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $serviceSid
- * @property string $accountSid
- * @property string $to
+ * @property string|null $sid
+ * @property string|null $serviceSid
+ * @property string|null $accountSid
+ * @property string|null $to
* @property string $channel
- * @property string $status
- * @property bool $valid
- * @property array $lookup
- * @property string $amount
- * @property string $payee
- * @property array $sendCodeAttempts
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
+ * @property string|null $status
+ * @property bool|null $valid
+ * @property array|null $lookup
+ * @property string|null $amount
+ * @property string|null $payee
+ * @property array[]|null $sendCodeAttempts
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property array|null $sna
+ * @property string|null $url
*/
class VerificationInstance extends InstanceResource
{
/**
* Initialize the VerificationInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Verify\V2\Service\VerificationInstance
+ * @param string $serviceSid The SID of the verification [Service](https://www.twilio.com/docs/verify/api/service) to create the resource under.
+ * @param string $sid The Twilio-provided string that uniquely identifies the Verification resource to fetch.
*/
- public function __construct(Version $version, array $payload, $serviceSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $serviceSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'serviceSid' => Values::array_get($payload, 'service_sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
@@ -62,20 +70,20 @@ public function __construct(Version $version, array $payload, $serviceSid, $sid
'sendCodeAttempts' => Values::array_get($payload, 'send_code_attempts'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
+ 'sna' => Values::array_get($payload, 'sna'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['serviceSid' => $serviceSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Verify\V2\Service\VerificationContext Context for this
- * VerificationInstance
+ * @return VerificationContext Context for this VerificationInstance
*/
- protected function proxy()
+ protected function proxy(): VerificationContext
{
if (!$this->context) {
$this->context = new VerificationContext(
@@ -89,26 +97,28 @@ protected function proxy()
}
/**
- * Update the VerificationInstance
+ * Fetch the VerificationInstance
*
- * @param string $status The new status of the resource
- * @return VerificationInstance Updated VerificationInstance
+ * @return VerificationInstance Fetched VerificationInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($status)
+ public function fetch(): VerificationInstance
{
- return $this->proxy()->update($status);
+
+ return $this->proxy()->fetch();
}
/**
- * Fetch a VerificationInstance
+ * Update the VerificationInstance
*
- * @return VerificationInstance Fetched VerificationInstance
+ * @param string $status
+ * @return VerificationInstance Updated VerificationInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function update(string $status): VerificationInstance
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->update($status);
}
/**
@@ -118,7 +128,7 @@ public function fetch()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -137,12 +147,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Verify.V2.VerificationInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/VerificationList.php b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/VerificationList.php
index 4b4e97e..0668294 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/VerificationList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/VerificationList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Verify
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Verify\V2\Service;
@@ -12,76 +19,115 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class VerificationList extends ListResource
-{
+ {
/**
* Construct the VerificationList
*
* @param Version $version Version that contains the resource
- * @param string $serviceSid The SID of the Service that the resource is
- * associated with
- * @return \Twilio\Rest\Verify\V2\Service\VerificationList
+ * @param string $serviceSid The SID of the verification [Service](https://www.twilio.com/docs/verify/api/service) to create the resource under.
*/
- public function __construct(Version $version, $serviceSid)
- {
+ public function __construct(
+ Version $version,
+ string $serviceSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('serviceSid' => $serviceSid,);
+ $this->solution = [
+ 'serviceSid' =>
+ $serviceSid,
+
+ ];
- $this->uri = '/Services/' . \rawurlencode($serviceSid) . '/Verifications';
+ $this->uri = '/Services/' . \rawurlencode($serviceSid)
+ .'/Verifications';
}
/**
- * Create a new VerificationInstance
+ * Create the VerificationInstance
*
- * @param string $to The phone number or email to verify
- * @param string $channel The verification method to use
+ * @param string $to The phone number or [email](https://www.twilio.com/docs/verify/email) to verify. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
+ * @param string $channel The verification method to use. One of: [`email`](https://www.twilio.com/docs/verify/email), `sms`, `whatsapp`, `call`, `sna` or `auto`.
* @param array|Options $options Optional Arguments
- * @return VerificationInstance Newly created VerificationInstance
+ * @return VerificationInstance Created VerificationInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($to, $channel, $options = array())
+ public function create(string $to, string $channel, array $options = []): VerificationInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'To' => $to,
- 'Channel' => $channel,
- 'CustomMessage' => $options['customMessage'],
- 'SendDigits' => $options['sendDigits'],
- 'Locale' => $options['locale'],
- 'CustomCode' => $options['customCode'],
- 'Amount' => $options['amount'],
- 'Payee' => $options['payee'],
- 'RateLimits' => Serialize::jsonObject($options['rateLimits']),
- 'ChannelConfiguration' => Serialize::jsonObject($options['channelConfiguration']),
- 'AppHash' => $options['appHash'],
- ));
+ $data = Values::of([
+ 'To' =>
+ $to,
+ 'Channel' =>
+ $channel,
+ 'CustomFriendlyName' =>
+ $options['customFriendlyName'],
+ 'CustomMessage' =>
+ $options['customMessage'],
+ 'SendDigits' =>
+ $options['sendDigits'],
+ 'Locale' =>
+ $options['locale'],
+ 'CustomCode' =>
+ $options['customCode'],
+ 'Amount' =>
+ $options['amount'],
+ 'Payee' =>
+ $options['payee'],
+ 'RateLimits' =>
+ Serialize::jsonObject($options['rateLimits']),
+ 'ChannelConfiguration' =>
+ Serialize::jsonObject($options['channelConfiguration']),
+ 'AppHash' =>
+ $options['appHash'],
+ 'TemplateSid' =>
+ $options['templateSid'],
+ 'TemplateCustomSubstitutions' =>
+ $options['templateCustomSubstitutions'],
+ 'DeviceIp' =>
+ $options['deviceIp'],
+ 'EnableSnaClientToken' =>
+ Serialize::booleanToString($options['enableSnaClientToken']),
+ 'RiskCheck' =>
+ $options['riskCheck'],
+ 'Tags' =>
+ $options['tags'],
+ ]);
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
- return new VerificationInstance($this->version, $payload, $this->solution['serviceSid']);
+ return new VerificationInstance(
+ $this->version,
+ $payload,
+ $this->solution['serviceSid']
+ );
}
+
/**
* Constructs a VerificationContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Verify\V2\Service\VerificationContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the Verification resource to fetch.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): VerificationContext
{
- return new VerificationContext($this->version, $this->solution['serviceSid'], $sid);
+ return new VerificationContext(
+ $this->version,
+ $this->solution['serviceSid'],
+ $sid
+ );
}
/**
@@ -89,8 +135,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Verify.V2.VerificationList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/VerificationOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/VerificationOptions.php
index 41e2f3b..fa85231 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/VerificationOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/VerificationOptions.php
@@ -1,10 +1,16 @@
Your AppName verification code is: 1234 He42w354ol9`.
+ * @param string $templateSid The message [template](https://www.twilio.com/docs/verify/api/templates). If provided, will override the default template for the Service. SMS and Voice channels only.
+ * @param string $templateCustomSubstitutions A stringified JSON object in which the keys are the template's special variables and the values are the variables substitutions.
+ * @param string $deviceIp Strongly encouraged if using the auto channel. The IP address of the client's device. If provided, it has to be a valid IPv4 or IPv6 address.
+ * @param bool $enableSnaClientToken An optional Boolean value to indicate the requirement of sna client token in the SNA URL invocation response for added security. This token must match in the Verification Check request to confirm phone number verification.
+ * @param string $riskCheck
+ * @param string $tags A string containing a JSON map of key value pairs of tags to be recorded as metadata for the message. The object may contain up to 10 tags. Keys and values can each be up to 128 characters in length.
* @return CreateVerificationOptions Options builder
*/
- public static function create($customMessage = Values::NONE, $sendDigits = Values::NONE, $locale = Values::NONE, $customCode = Values::NONE, $amount = Values::NONE, $payee = Values::NONE, $rateLimits = Values::NONE, $channelConfiguration = Values::NONE, $appHash = Values::NONE)
+ public static function create(
+
+ string $customFriendlyName = Values::NONE,
+ string $customMessage = Values::NONE,
+ string $sendDigits = Values::NONE,
+ string $locale = Values::NONE,
+ string $customCode = Values::NONE,
+ string $amount = Values::NONE,
+ string $payee = Values::NONE,
+ array $rateLimits = Values::ARRAY_NONE,
+ array $channelConfiguration = Values::ARRAY_NONE,
+ string $appHash = Values::NONE,
+ string $templateSid = Values::NONE,
+ string $templateCustomSubstitutions = Values::NONE,
+ string $deviceIp = Values::NONE,
+ bool $enableSnaClientToken = Values::BOOL_NONE,
+ string $riskCheck = Values::NONE,
+ string $tags = Values::NONE
+
+ ): CreateVerificationOptions
{
- return new CreateVerificationOptions($customMessage, $sendDigits, $locale, $customCode, $amount, $payee, $rateLimits, $channelConfiguration, $appHash);
+ return new CreateVerificationOptions(
+ $customFriendlyName,
+ $customMessage,
+ $sendDigits,
+ $locale,
+ $customCode,
+ $amount,
+ $payee,
+ $rateLimits,
+ $channelConfiguration,
+ $appHash,
+ $templateSid,
+ $templateCustomSubstitutions,
+ $deviceIp,
+ $enableSnaClientToken,
+ $riskCheck,
+ $tags
+ );
}
+
+
+
}
class CreateVerificationOptions extends Options
-{
- /**
- * @param string $customMessage The text of a custom message to use for the
- * verification
- * @param string $sendDigits The digits to send after a phone call is answered
- * @param string $locale The locale to use for the verification SMS or call
- * @param string $customCode A pre-generated code
- * @param string $amount The amount of the associated PSD2 compliant
- * transaction.
- * @param string $payee The payee of the associated PSD2 compliant transaction
- * @param array $rateLimits The custom key-value pairs of Programmable Rate
- * Limits.
- * @param array $channelConfiguration Channel specific configuration in json
- * format.
- * @param string $appHash App Hash to be included at the end of an SMS.
- */
- public function __construct($customMessage = Values::NONE, $sendDigits = Values::NONE, $locale = Values::NONE, $customCode = Values::NONE, $amount = Values::NONE, $payee = Values::NONE, $rateLimits = Values::NONE, $channelConfiguration = Values::NONE, $appHash = Values::NONE)
{
+ /**
+ * @param string $customFriendlyName A custom user defined friendly name that overwrites the existing one in the verification message
+ * @param string $customMessage The text of a custom message to use for the verification.
+ * @param string $sendDigits The digits to send after a phone call is answered, for example, to dial an extension. For more information, see the Programmable Voice documentation of [sendDigits](https://www.twilio.com/docs/voice/twiml/number#attributes-sendDigits).
+ * @param string $locale Locale will automatically resolve based on phone number country code for SMS, WhatsApp, and call channel verifications. It will fallback to English or the template’s default translation if the selected translation is not available. This parameter will override the automatic locale resolution. [See supported languages and more information here](https://www.twilio.com/docs/verify/supported-languages).
+ * @param string $customCode A pre-generated code to use for verification. The code can be between 4 and 10 characters, inclusive.
+ * @param string $amount The amount of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled.
+ * @param string $payee The payee of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled.
+ * @param array $rateLimits The custom key-value pairs of Programmable Rate Limits. Keys correspond to `unique_name` fields defined when [creating your Rate Limit](https://www.twilio.com/docs/verify/api/service-rate-limits). Associated value pairs represent values in the request that you are rate limiting on. You may include multiple Rate Limit values in each request.
+ * @param array $channelConfiguration [`email`](https://www.twilio.com/docs/verify/email) channel configuration in json format. The fields 'from' and 'from_name' are optional but if included the 'from' field must have a valid email address.
+ * @param string $appHash Your [App Hash](https://developers.google.com/identity/sms-retriever/verify#computing_your_apps_hash_string) to be appended at the end of your verification SMS body. Applies only to SMS. Example SMS body: `<#> Your AppName verification code is: 1234 He42w354ol9`.
+ * @param string $templateSid The message [template](https://www.twilio.com/docs/verify/api/templates). If provided, will override the default template for the Service. SMS and Voice channels only.
+ * @param string $templateCustomSubstitutions A stringified JSON object in which the keys are the template's special variables and the values are the variables substitutions.
+ * @param string $deviceIp Strongly encouraged if using the auto channel. The IP address of the client's device. If provided, it has to be a valid IPv4 or IPv6 address.
+ * @param bool $enableSnaClientToken An optional Boolean value to indicate the requirement of sna client token in the SNA URL invocation response for added security. This token must match in the Verification Check request to confirm phone number verification.
+ * @param string $riskCheck
+ * @param string $tags A string containing a JSON map of key value pairs of tags to be recorded as metadata for the message. The object may contain up to 10 tags. Keys and values can each be up to 128 characters in length.
+ */
+ public function __construct(
+
+ string $customFriendlyName = Values::NONE,
+ string $customMessage = Values::NONE,
+ string $sendDigits = Values::NONE,
+ string $locale = Values::NONE,
+ string $customCode = Values::NONE,
+ string $amount = Values::NONE,
+ string $payee = Values::NONE,
+ array $rateLimits = Values::ARRAY_NONE,
+ array $channelConfiguration = Values::ARRAY_NONE,
+ string $appHash = Values::NONE,
+ string $templateSid = Values::NONE,
+ string $templateCustomSubstitutions = Values::NONE,
+ string $deviceIp = Values::NONE,
+ bool $enableSnaClientToken = Values::BOOL_NONE,
+ string $riskCheck = Values::NONE,
+ string $tags = Values::NONE
+
+ ) {
+ $this->options['customFriendlyName'] = $customFriendlyName;
$this->options['customMessage'] = $customMessage;
$this->options['sendDigits'] = $sendDigits;
$this->options['locale'] = $locale;
@@ -64,16 +134,33 @@ public function __construct($customMessage = Values::NONE, $sendDigits = Values:
$this->options['rateLimits'] = $rateLimits;
$this->options['channelConfiguration'] = $channelConfiguration;
$this->options['appHash'] = $appHash;
+ $this->options['templateSid'] = $templateSid;
+ $this->options['templateCustomSubstitutions'] = $templateCustomSubstitutions;
+ $this->options['deviceIp'] = $deviceIp;
+ $this->options['enableSnaClientToken'] = $enableSnaClientToken;
+ $this->options['riskCheck'] = $riskCheck;
+ $this->options['tags'] = $tags;
+ }
+
+ /**
+ * A custom user defined friendly name that overwrites the existing one in the verification message
+ *
+ * @param string $customFriendlyName A custom user defined friendly name that overwrites the existing one in the verification message
+ * @return $this Fluent Builder
+ */
+ public function setCustomFriendlyName(string $customFriendlyName): self
+ {
+ $this->options['customFriendlyName'] = $customFriendlyName;
+ return $this;
}
/**
* The text of a custom message to use for the verification.
*
- * @param string $customMessage The text of a custom message to use for the
- * verification
+ * @param string $customMessage The text of a custom message to use for the verification.
* @return $this Fluent Builder
*/
- public function setCustomMessage($customMessage)
+ public function setCustomMessage(string $customMessage): self
{
$this->options['customMessage'] = $customMessage;
return $this;
@@ -82,22 +169,22 @@ public function setCustomMessage($customMessage)
/**
* The digits to send after a phone call is answered, for example, to dial an extension. For more information, see the Programmable Voice documentation of [sendDigits](https://www.twilio.com/docs/voice/twiml/number#attributes-sendDigits).
*
- * @param string $sendDigits The digits to send after a phone call is answered
+ * @param string $sendDigits The digits to send after a phone call is answered, for example, to dial an extension. For more information, see the Programmable Voice documentation of [sendDigits](https://www.twilio.com/docs/voice/twiml/number#attributes-sendDigits).
* @return $this Fluent Builder
*/
- public function setSendDigits($sendDigits)
+ public function setSendDigits(string $sendDigits): self
{
$this->options['sendDigits'] = $sendDigits;
return $this;
}
/**
- * The locale to use for the verification SMS or call. Can be: `af`, `ar`, `ca`, `cs`, `da`, `de`, `el`, `en`, `es`, `fi`, `fr`, `he`, `hi`, `hr`, `hu`, `id`, `it`, `ja`, `ko`, `ms`, `nb`, `nl`, `pl`, `pt`, `pr-BR`, `ro`, `ru`, `sv`, `th`, `tl`, `tr`, `vi`, `zh`, `zh-CN`, or `zh-HK.`
+ * Locale will automatically resolve based on phone number country code for SMS, WhatsApp, and call channel verifications. It will fallback to English or the template’s default translation if the selected translation is not available. This parameter will override the automatic locale resolution. [See supported languages and more information here](https://www.twilio.com/docs/verify/supported-languages).
*
- * @param string $locale The locale to use for the verification SMS or call
+ * @param string $locale Locale will automatically resolve based on phone number country code for SMS, WhatsApp, and call channel verifications. It will fallback to English or the template’s default translation if the selected translation is not available. This parameter will override the automatic locale resolution. [See supported languages and more information here](https://www.twilio.com/docs/verify/supported-languages).
* @return $this Fluent Builder
*/
- public function setLocale($locale)
+ public function setLocale(string $locale): self
{
$this->options['locale'] = $locale;
return $this;
@@ -106,10 +193,10 @@ public function setLocale($locale)
/**
* A pre-generated code to use for verification. The code can be between 4 and 10 characters, inclusive.
*
- * @param string $customCode A pre-generated code
+ * @param string $customCode A pre-generated code to use for verification. The code can be between 4 and 10 characters, inclusive.
* @return $this Fluent Builder
*/
- public function setCustomCode($customCode)
+ public function setCustomCode(string $customCode): self
{
$this->options['customCode'] = $customCode;
return $this;
@@ -118,11 +205,10 @@ public function setCustomCode($customCode)
/**
* The amount of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled.
*
- * @param string $amount The amount of the associated PSD2 compliant
- * transaction.
+ * @param string $amount The amount of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled.
* @return $this Fluent Builder
*/
- public function setAmount($amount)
+ public function setAmount(string $amount): self
{
$this->options['amount'] = $amount;
return $this;
@@ -131,66 +217,132 @@ public function setAmount($amount)
/**
* The payee of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled.
*
- * @param string $payee The payee of the associated PSD2 compliant transaction
+ * @param string $payee The payee of the associated PSD2 compliant transaction. Requires the PSD2 Service flag enabled.
* @return $this Fluent Builder
*/
- public function setPayee($payee)
+ public function setPayee(string $payee): self
{
$this->options['payee'] = $payee;
return $this;
}
/**
- * The custom key-value pairs of Programmable Rate Limits. Keys should be the unique_name configured while creating you Rate Limit along with the associated values for each particular request. You may include multiple Rate Limit values in each request.
+ * The custom key-value pairs of Programmable Rate Limits. Keys correspond to `unique_name` fields defined when [creating your Rate Limit](https://www.twilio.com/docs/verify/api/service-rate-limits). Associated value pairs represent values in the request that you are rate limiting on. You may include multiple Rate Limit values in each request.
*
- * @param array $rateLimits The custom key-value pairs of Programmable Rate
- * Limits.
+ * @param array $rateLimits The custom key-value pairs of Programmable Rate Limits. Keys correspond to `unique_name` fields defined when [creating your Rate Limit](https://www.twilio.com/docs/verify/api/service-rate-limits). Associated value pairs represent values in the request that you are rate limiting on. You may include multiple Rate Limit values in each request.
* @return $this Fluent Builder
*/
- public function setRateLimits($rateLimits)
+ public function setRateLimits(array $rateLimits): self
{
$this->options['rateLimits'] = $rateLimits;
return $this;
}
/**
- * [`email`](https://www.twilio.com/docs/verify/email) channel configuration in json format. Must include 'from' and 'from_name'.
+ * [`email`](https://www.twilio.com/docs/verify/email) channel configuration in json format. The fields 'from' and 'from_name' are optional but if included the 'from' field must have a valid email address.
*
- * @param array $channelConfiguration Channel specific configuration in json
- * format.
+ * @param array $channelConfiguration [`email`](https://www.twilio.com/docs/verify/email) channel configuration in json format. The fields 'from' and 'from_name' are optional but if included the 'from' field must have a valid email address.
* @return $this Fluent Builder
*/
- public function setChannelConfiguration($channelConfiguration)
+ public function setChannelConfiguration(array $channelConfiguration): self
{
$this->options['channelConfiguration'] = $channelConfiguration;
return $this;
}
/**
- * Your [App Hash](https://developers.google.com/identity/sms-retriever/verify#computing_your_apps_hash_string) to be included at the end of an SMS. **Only applies for SMS.**
+ * Your [App Hash](https://developers.google.com/identity/sms-retriever/verify#computing_your_apps_hash_string) to be appended at the end of your verification SMS body. Applies only to SMS. Example SMS body: `<#> Your AppName verification code is: 1234 He42w354ol9`.
*
- * @param string $appHash App Hash to be included at the end of an SMS.
+ * @param string $appHash Your [App Hash](https://developers.google.com/identity/sms-retriever/verify#computing_your_apps_hash_string) to be appended at the end of your verification SMS body. Applies only to SMS. Example SMS body: `<#> Your AppName verification code is: 1234 He42w354ol9`.
* @return $this Fluent Builder
*/
- public function setAppHash($appHash)
+ public function setAppHash(string $appHash): self
{
$this->options['appHash'] = $appHash;
return $this;
}
+ /**
+ * The message [template](https://www.twilio.com/docs/verify/api/templates). If provided, will override the default template for the Service. SMS and Voice channels only.
+ *
+ * @param string $templateSid The message [template](https://www.twilio.com/docs/verify/api/templates). If provided, will override the default template for the Service. SMS and Voice channels only.
+ * @return $this Fluent Builder
+ */
+ public function setTemplateSid(string $templateSid): self
+ {
+ $this->options['templateSid'] = $templateSid;
+ return $this;
+ }
+
+ /**
+ * A stringified JSON object in which the keys are the template's special variables and the values are the variables substitutions.
+ *
+ * @param string $templateCustomSubstitutions A stringified JSON object in which the keys are the template's special variables and the values are the variables substitutions.
+ * @return $this Fluent Builder
+ */
+ public function setTemplateCustomSubstitutions(string $templateCustomSubstitutions): self
+ {
+ $this->options['templateCustomSubstitutions'] = $templateCustomSubstitutions;
+ return $this;
+ }
+
+ /**
+ * Strongly encouraged if using the auto channel. The IP address of the client's device. If provided, it has to be a valid IPv4 or IPv6 address.
+ *
+ * @param string $deviceIp Strongly encouraged if using the auto channel. The IP address of the client's device. If provided, it has to be a valid IPv4 or IPv6 address.
+ * @return $this Fluent Builder
+ */
+ public function setDeviceIp(string $deviceIp): self
+ {
+ $this->options['deviceIp'] = $deviceIp;
+ return $this;
+ }
+
+ /**
+ * An optional Boolean value to indicate the requirement of sna client token in the SNA URL invocation response for added security. This token must match in the Verification Check request to confirm phone number verification.
+ *
+ * @param bool $enableSnaClientToken An optional Boolean value to indicate the requirement of sna client token in the SNA URL invocation response for added security. This token must match in the Verification Check request to confirm phone number verification.
+ * @return $this Fluent Builder
+ */
+ public function setEnableSnaClientToken(bool $enableSnaClientToken): self
+ {
+ $this->options['enableSnaClientToken'] = $enableSnaClientToken;
+ return $this;
+ }
+
+ /**
+ * @param string $riskCheck
+ * @return $this Fluent Builder
+ */
+ public function setRiskCheck(string $riskCheck): self
+ {
+ $this->options['riskCheck'] = $riskCheck;
+ return $this;
+ }
+
+ /**
+ * A string containing a JSON map of key value pairs of tags to be recorded as metadata for the message. The object may contain up to 10 tags. Keys and values can each be up to 128 characters in length.
+ *
+ * @param string $tags A string containing a JSON map of key value pairs of tags to be recorded as metadata for the message. The object may contain up to 10 tags. Keys and values can each be up to 128 characters in length.
+ * @return $this Fluent Builder
+ */
+ public function setTags(string $tags): self
+ {
+ $this->options['tags'] = $tags;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Verify.V2.CreateVerificationOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Verify.V2.CreateVerificationOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
+
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/VerificationPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/VerificationPage.php
index be15734..515e91f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/VerificationPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/Service/VerificationPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return VerificationInstance \Twilio\Rest\Verify\V2\Service\VerificationInstance
+ */
+ public function buildInstance(array $payload): VerificationInstance
{
return new VerificationInstance($this->version, $payload, $this->solution['serviceSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Verify.V2.VerificationPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/ServiceContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/ServiceContext.php
index 83ed10c..35dfb5f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/ServiceContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/ServiceContext.php
@@ -2,87 +2,118 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Verify
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Verify\V2;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Verify\V2\Service\MessagingConfigurationList;
-use Twilio\Rest\Verify\V2\Service\RateLimitList;
-use Twilio\Rest\Verify\V2\Service\VerificationCheckList;
-use Twilio\Rest\Verify\V2\Service\VerificationList;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+use Twilio\Rest\Verify\V2\Service\EntityList;
+use Twilio\Rest\Verify\V2\Service\VerificationCheckList;
+use Twilio\Rest\Verify\V2\Service\VerificationList;
+use Twilio\Rest\Verify\V2\Service\AccessTokenList;
+use Twilio\Rest\Verify\V2\Service\RateLimitList;
+use Twilio\Rest\Verify\V2\Service\WebhookList;
+use Twilio\Rest\Verify\V2\Service\MessagingConfigurationList;
+
/**
- * @property \Twilio\Rest\Verify\V2\Service\VerificationList $verifications
- * @property \Twilio\Rest\Verify\V2\Service\VerificationCheckList $verificationChecks
- * @property \Twilio\Rest\Verify\V2\Service\RateLimitList $rateLimits
- * @property \Twilio\Rest\Verify\V2\Service\MessagingConfigurationList $messagingConfigurations
+ * @property EntityList $entities
+ * @property VerificationCheckList $verificationChecks
+ * @property VerificationList $verifications
+ * @property AccessTokenList $accessTokens
+ * @property RateLimitList $rateLimits
+ * @property WebhookList $webhooks
+ * @property MessagingConfigurationList $messagingConfigurations
* @method \Twilio\Rest\Verify\V2\Service\VerificationContext verifications(string $sid)
- * @method \Twilio\Rest\Verify\V2\Service\RateLimitContext rateLimits(string $sid)
+ * @method \Twilio\Rest\Verify\V2\Service\AccessTokenContext accessTokens(string $sid)
+ * @method \Twilio\Rest\Verify\V2\Service\WebhookContext webhooks(string $sid)
* @method \Twilio\Rest\Verify\V2\Service\MessagingConfigurationContext messagingConfigurations(string $country)
+ * @method \Twilio\Rest\Verify\V2\Service\EntityContext entities(string $identity)
+ * @method \Twilio\Rest\Verify\V2\Service\RateLimitContext rateLimits(string $sid)
*/
class ServiceContext extends InstanceContext
-{
- protected $_verifications = null;
- protected $_verificationChecks = null;
- protected $_rateLimits = null;
- protected $_messagingConfigurations = null;
+ {
+ protected $_entities;
+ protected $_verificationChecks;
+ protected $_verifications;
+ protected $_accessTokens;
+ protected $_rateLimits;
+ protected $_webhooks;
+ protected $_messagingConfigurations;
/**
* Initialize the ServiceContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Verify\V2\ServiceContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid The Twilio-provided string that uniquely identifies the Verification Service resource to delete.
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Services/' . \rawurlencode($sid) . '';
+ $this->uri = '/Services/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a ServiceInstance
+ * Delete the ServiceInstance
*
- * @return ServiceInstance Fetched ServiceInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
- return new ServiceInstance($this->version, $payload, $this->solution['sid']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Deletes the ServiceInstance
+ * Fetch the ServiceInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return ServiceInstance Fetched ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): ServiceInstance
{
- return $this->version->delete('delete', $this->uri);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
+
+ return new ServiceInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Update the ServiceInstance
*
@@ -90,79 +121,159 @@ public function delete()
* @return ServiceInstance Updated ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ServiceInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $options['friendlyName'],
- 'CodeLength' => $options['codeLength'],
- 'LookupEnabled' => Serialize::booleanToString($options['lookupEnabled']),
- 'SkipSmsToLandlines' => Serialize::booleanToString($options['skipSmsToLandlines']),
- 'DtmfInputRequired' => Serialize::booleanToString($options['dtmfInputRequired']),
- 'TtsName' => $options['ttsName'],
- 'Psd2Enabled' => Serialize::booleanToString($options['psd2Enabled']),
- 'DoNotShareWarningEnabled' => Serialize::booleanToString($options['doNotShareWarningEnabled']),
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'CodeLength' =>
+ $options['codeLength'],
+ 'LookupEnabled' =>
+ Serialize::booleanToString($options['lookupEnabled']),
+ 'SkipSmsToLandlines' =>
+ Serialize::booleanToString($options['skipSmsToLandlines']),
+ 'DtmfInputRequired' =>
+ Serialize::booleanToString($options['dtmfInputRequired']),
+ 'TtsName' =>
+ $options['ttsName'],
+ 'Psd2Enabled' =>
+ Serialize::booleanToString($options['psd2Enabled']),
+ 'DoNotShareWarningEnabled' =>
+ Serialize::booleanToString($options['doNotShareWarningEnabled']),
+ 'CustomCodeEnabled' =>
+ Serialize::booleanToString($options['customCodeEnabled']),
+ 'Push.IncludeDate' =>
+ Serialize::booleanToString($options['pushIncludeDate']),
+ 'Push.ApnCredentialSid' =>
+ $options['pushApnCredentialSid'],
+ 'Push.FcmCredentialSid' =>
+ $options['pushFcmCredentialSid'],
+ 'Totp.Issuer' =>
+ $options['totpIssuer'],
+ 'Totp.TimeStep' =>
+ $options['totpTimeStep'],
+ 'Totp.CodeLength' =>
+ $options['totpCodeLength'],
+ 'Totp.Skew' =>
+ $options['totpSkew'],
+ 'DefaultTemplateSid' =>
+ $options['defaultTemplateSid'],
+ 'Whatsapp.MsgServiceSid' =>
+ $options['whatsappMsgServiceSid'],
+ 'Whatsapp.From' =>
+ $options['whatsappFrom'],
+ 'VerifyEventSubscriptionEnabled' =>
+ Serialize::booleanToString($options['verifyEventSubscriptionEnabled']),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
+
+ return new ServiceInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
);
+ }
+
+
+ /**
+ * Access the entities
+ */
+ protected function getEntities(): EntityList
+ {
+ if (!$this->_entities) {
+ $this->_entities = new EntityList(
+ $this->version,
+ $this->solution['sid']
+ );
+ }
- return new ServiceInstance($this->version, $payload, $this->solution['sid']);
+ return $this->_entities;
+ }
+
+ /**
+ * Access the verificationChecks
+ */
+ protected function getVerificationChecks(): VerificationCheckList
+ {
+ if (!$this->_verificationChecks) {
+ $this->_verificationChecks = new VerificationCheckList(
+ $this->version,
+ $this->solution['sid']
+ );
+ }
+
+ return $this->_verificationChecks;
}
/**
* Access the verifications
- *
- * @return \Twilio\Rest\Verify\V2\Service\VerificationList
*/
- protected function getVerifications()
+ protected function getVerifications(): VerificationList
{
if (!$this->_verifications) {
- $this->_verifications = new VerificationList($this->version, $this->solution['sid']);
+ $this->_verifications = new VerificationList(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->_verifications;
}
/**
- * Access the verificationChecks
- *
- * @return \Twilio\Rest\Verify\V2\Service\VerificationCheckList
+ * Access the accessTokens
*/
- protected function getVerificationChecks()
+ protected function getAccessTokens(): AccessTokenList
{
- if (!$this->_verificationChecks) {
- $this->_verificationChecks = new VerificationCheckList($this->version, $this->solution['sid']);
+ if (!$this->_accessTokens) {
+ $this->_accessTokens = new AccessTokenList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_verificationChecks;
+ return $this->_accessTokens;
}
/**
* Access the rateLimits
- *
- * @return \Twilio\Rest\Verify\V2\Service\RateLimitList
*/
- protected function getRateLimits()
+ protected function getRateLimits(): RateLimitList
{
if (!$this->_rateLimits) {
- $this->_rateLimits = new RateLimitList($this->version, $this->solution['sid']);
+ $this->_rateLimits = new RateLimitList(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->_rateLimits;
}
+ /**
+ * Access the webhooks
+ */
+ protected function getWebhooks(): WebhookList
+ {
+ if (!$this->_webhooks) {
+ $this->_webhooks = new WebhookList(
+ $this->version,
+ $this->solution['sid']
+ );
+ }
+
+ return $this->_webhooks;
+ }
+
/**
* Access the messagingConfigurations
- *
- * @return \Twilio\Rest\Verify\V2\Service\MessagingConfigurationList
*/
- protected function getMessagingConfigurations()
+ protected function getMessagingConfigurations(): MessagingConfigurationList
{
if (!$this->_messagingConfigurations) {
$this->_messagingConfigurations = new MessagingConfigurationList(
@@ -178,10 +289,10 @@ protected function getMessagingConfigurations()
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -196,10 +307,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -214,12 +325,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Verify.V2.ServiceContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/ServiceInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/ServiceInstance.php
index 6ee924d..2c2da24 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/ServiceInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/ServiceInstance.php
@@ -2,57 +2,81 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Verify
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Verify\V2;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Verify\V2\Service\EntityList;
+use Twilio\Rest\Verify\V2\Service\VerificationCheckList;
+use Twilio\Rest\Verify\V2\Service\VerificationList;
+use Twilio\Rest\Verify\V2\Service\AccessTokenList;
+use Twilio\Rest\Verify\V2\Service\RateLimitList;
+use Twilio\Rest\Verify\V2\Service\WebhookList;
+use Twilio\Rest\Verify\V2\Service\MessagingConfigurationList;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $friendlyName
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $friendlyName
* @property int $codeLength
- * @property bool $lookupEnabled
- * @property bool $psd2Enabled
- * @property bool $skipSmsToLandlines
- * @property bool $dtmfInputRequired
- * @property string $ttsName
- * @property bool $doNotShareWarningEnabled
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
- * @property array $links
+ * @property bool|null $lookupEnabled
+ * @property bool|null $psd2Enabled
+ * @property bool|null $skipSmsToLandlines
+ * @property bool|null $dtmfInputRequired
+ * @property string|null $ttsName
+ * @property bool|null $doNotShareWarningEnabled
+ * @property bool|null $customCodeEnabled
+ * @property array|null $push
+ * @property array|null $totp
+ * @property string|null $defaultTemplateSid
+ * @property array|null $whatsapp
+ * @property bool|null $verifyEventSubscriptionEnabled
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
+ * @property array|null $links
*/
class ServiceInstance extends InstanceResource
{
- protected $_verifications = null;
- protected $_verificationChecks = null;
- protected $_rateLimits = null;
- protected $_messagingConfigurations = null;
+ protected $_entities;
+ protected $_verificationChecks;
+ protected $_verifications;
+ protected $_accessTokens;
+ protected $_rateLimits;
+ protected $_webhooks;
+ protected $_messagingConfigurations;
/**
* Initialize the ServiceInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Verify\V2\ServiceInstance
+ * @param string $sid The Twilio-provided string that uniquely identifies the Verification Service resource to delete.
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
@@ -63,51 +87,61 @@ public function __construct(Version $version, array $payload, $sid = null)
'dtmfInputRequired' => Values::array_get($payload, 'dtmf_input_required'),
'ttsName' => Values::array_get($payload, 'tts_name'),
'doNotShareWarningEnabled' => Values::array_get($payload, 'do_not_share_warning_enabled'),
+ 'customCodeEnabled' => Values::array_get($payload, 'custom_code_enabled'),
+ 'push' => Values::array_get($payload, 'push'),
+ 'totp' => Values::array_get($payload, 'totp'),
+ 'defaultTemplateSid' => Values::array_get($payload, 'default_template_sid'),
+ 'whatsapp' => Values::array_get($payload, 'whatsapp'),
+ 'verifyEventSubscriptionEnabled' => Values::array_get($payload, 'verify_event_subscription_enabled'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Verify\V2\ServiceContext Context for this
- * ServiceInstance
+ * @return ServiceContext Context for this ServiceInstance
*/
- protected function proxy()
+ protected function proxy(): ServiceContext
{
if (!$this->context) {
- $this->context = new ServiceContext($this->version, $this->solution['sid']);
+ $this->context = new ServiceContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a ServiceInstance
+ * Delete the ServiceInstance
*
- * @return ServiceInstance Fetched ServiceInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the ServiceInstance
+ * Fetch the ServiceInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return ServiceInstance Fetched ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): ServiceInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -117,47 +151,64 @@ public function delete()
* @return ServiceInstance Updated ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ServiceInstance
{
+
return $this->proxy()->update($options);
}
/**
- * Access the verifications
- *
- * @return \Twilio\Rest\Verify\V2\Service\VerificationList
+ * Access the entities
*/
- protected function getVerifications()
+ protected function getEntities(): EntityList
{
- return $this->proxy()->verifications;
+ return $this->proxy()->entities;
}
/**
* Access the verificationChecks
- *
- * @return \Twilio\Rest\Verify\V2\Service\VerificationCheckList
*/
- protected function getVerificationChecks()
+ protected function getVerificationChecks(): VerificationCheckList
{
return $this->proxy()->verificationChecks;
}
+ /**
+ * Access the verifications
+ */
+ protected function getVerifications(): VerificationList
+ {
+ return $this->proxy()->verifications;
+ }
+
+ /**
+ * Access the accessTokens
+ */
+ protected function getAccessTokens(): AccessTokenList
+ {
+ return $this->proxy()->accessTokens;
+ }
+
/**
* Access the rateLimits
- *
- * @return \Twilio\Rest\Verify\V2\Service\RateLimitList
*/
- protected function getRateLimits()
+ protected function getRateLimits(): RateLimitList
{
return $this->proxy()->rateLimits;
}
+ /**
+ * Access the webhooks
+ */
+ protected function getWebhooks(): WebhookList
+ {
+ return $this->proxy()->webhooks;
+ }
+
/**
* Access the messagingConfigurations
- *
- * @return \Twilio\Rest\Verify\V2\Service\MessagingConfigurationList
*/
- protected function getMessagingConfigurations()
+ protected function getMessagingConfigurations(): MessagingConfigurationList
{
return $this->proxy()->messagingConfigurations;
}
@@ -169,7 +220,7 @@ protected function getMessagingConfigurations()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -188,12 +239,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Verify.V2.ServiceInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/ServiceList.php b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/ServiceList.php
index 608ab7e..293da33 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/ServiceList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/ServiceList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Verify
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Verify\V2;
@@ -12,59 +19,115 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class ServiceList extends ListResource
-{
+ {
/**
* Construct the ServiceList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Verify\V2\ServiceList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/Services';
}
/**
- * Create a new ServiceInstance
+ * Create the ServiceInstance
*
- * @param string $friendlyName A string to describe the verification service
+ * @param string $friendlyName A descriptive string that you create to describe the verification service. It can be up to 32 characters long. **This value should not contain PII.**
* @param array|Options $options Optional Arguments
- * @return ServiceInstance Newly created ServiceInstance
+ * @return ServiceInstance Created ServiceInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($friendlyName, $options = array())
+ public function create(string $friendlyName, array $options = []): ServiceInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $friendlyName,
- 'CodeLength' => $options['codeLength'],
- 'LookupEnabled' => Serialize::booleanToString($options['lookupEnabled']),
- 'SkipSmsToLandlines' => Serialize::booleanToString($options['skipSmsToLandlines']),
- 'DtmfInputRequired' => Serialize::booleanToString($options['dtmfInputRequired']),
- 'TtsName' => $options['ttsName'],
- 'Psd2Enabled' => Serialize::booleanToString($options['psd2Enabled']),
- 'DoNotShareWarningEnabled' => Serialize::booleanToString($options['doNotShareWarningEnabled']),
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'FriendlyName' =>
+ $friendlyName,
+ 'CodeLength' =>
+ $options['codeLength'],
+ 'LookupEnabled' =>
+ Serialize::booleanToString($options['lookupEnabled']),
+ 'SkipSmsToLandlines' =>
+ Serialize::booleanToString($options['skipSmsToLandlines']),
+ 'DtmfInputRequired' =>
+ Serialize::booleanToString($options['dtmfInputRequired']),
+ 'TtsName' =>
+ $options['ttsName'],
+ 'Psd2Enabled' =>
+ Serialize::booleanToString($options['psd2Enabled']),
+ 'DoNotShareWarningEnabled' =>
+ Serialize::booleanToString($options['doNotShareWarningEnabled']),
+ 'CustomCodeEnabled' =>
+ Serialize::booleanToString($options['customCodeEnabled']),
+ 'Push.IncludeDate' =>
+ Serialize::booleanToString($options['pushIncludeDate']),
+ 'Push.ApnCredentialSid' =>
+ $options['pushApnCredentialSid'],
+ 'Push.FcmCredentialSid' =>
+ $options['pushFcmCredentialSid'],
+ 'Totp.Issuer' =>
+ $options['totpIssuer'],
+ 'Totp.TimeStep' =>
+ $options['totpTimeStep'],
+ 'Totp.CodeLength' =>
+ $options['totpCodeLength'],
+ 'Totp.Skew' =>
+ $options['totpSkew'],
+ 'DefaultTemplateSid' =>
+ $options['defaultTemplateSid'],
+ 'Whatsapp.MsgServiceSid' =>
+ $options['whatsappMsgServiceSid'],
+ 'Whatsapp.From' =>
+ $options['whatsappFrom'],
+ 'VerifyEventSubscriptionEnabled' =>
+ Serialize::booleanToString($options['verifyEventSubscriptionEnabled']),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new ServiceInstance(
+ $this->version,
+ $payload
);
+ }
- return new ServiceInstance($this->version, $payload);
+
+ /**
+ * Reads ServiceInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return ServiceInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -83,9 +146,9 @@ public function create($friendlyName, $options = array())
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -94,26 +157,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads ServiceInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return ServiceInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of ServiceInstance records from the API.
* Request is executed immediately
@@ -121,21 +164,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of ServiceInstance
+ * @return ServicePage Page of ServiceInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): ServicePage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new ServicePage($this->version, $response, $this->solution);
}
@@ -145,9 +189,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of ServiceInstance
+ * @return ServicePage Page of ServiceInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): ServicePage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -157,15 +201,21 @@ public function getPage($targetUrl)
return new ServicePage($this->version, $response, $this->solution);
}
+
/**
* Constructs a ServiceContext
*
- * @param string $sid The unique string that identifies the resource
- * @return \Twilio\Rest\Verify\V2\ServiceContext
+ * @param string $sid The Twilio-provided string that uniquely identifies the Verification Service resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): ServiceContext
{
- return new ServiceContext($this->version, $sid);
+ return new ServiceContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -173,8 +223,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Verify.V2.ServiceList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/ServiceOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/ServiceOptions.php
index 831c3ea..77bb450 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/ServiceOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/ServiceOptions.php
@@ -1,10 +1,16 @@
options['codeLength'] = $codeLength;
$this->options['lookupEnabled'] = $lookupEnabled;
$this->options['skipSmsToLandlines'] = $skipSmsToLandlines;
@@ -84,15 +219,27 @@ public function __construct($codeLength = Values::NONE, $lookupEnabled = Values:
$this->options['ttsName'] = $ttsName;
$this->options['psd2Enabled'] = $psd2Enabled;
$this->options['doNotShareWarningEnabled'] = $doNotShareWarningEnabled;
+ $this->options['customCodeEnabled'] = $customCodeEnabled;
+ $this->options['pushIncludeDate'] = $pushIncludeDate;
+ $this->options['pushApnCredentialSid'] = $pushApnCredentialSid;
+ $this->options['pushFcmCredentialSid'] = $pushFcmCredentialSid;
+ $this->options['totpIssuer'] = $totpIssuer;
+ $this->options['totpTimeStep'] = $totpTimeStep;
+ $this->options['totpCodeLength'] = $totpCodeLength;
+ $this->options['totpSkew'] = $totpSkew;
+ $this->options['defaultTemplateSid'] = $defaultTemplateSid;
+ $this->options['whatsappMsgServiceSid'] = $whatsappMsgServiceSid;
+ $this->options['whatsappFrom'] = $whatsappFrom;
+ $this->options['verifyEventSubscriptionEnabled'] = $verifyEventSubscriptionEnabled;
}
/**
* The length of the verification code to generate. Must be an integer value between 4 and 10, inclusive.
*
- * @param int $codeLength The length of the verification code to generate
+ * @param int $codeLength The length of the verification code to generate. Must be an integer value between 4 and 10, inclusive.
* @return $this Fluent Builder
*/
- public function setCodeLength($codeLength)
+ public function setCodeLength(int $codeLength): self
{
$this->options['codeLength'] = $codeLength;
return $this;
@@ -101,10 +248,10 @@ public function setCodeLength($codeLength)
/**
* Whether to perform a lookup with each verification started and return info about the phone number.
*
- * @param bool $lookupEnabled Whether to perform a lookup with each verification
+ * @param bool $lookupEnabled Whether to perform a lookup with each verification started and return info about the phone number.
* @return $this Fluent Builder
*/
- public function setLookupEnabled($lookupEnabled)
+ public function setLookupEnabled(bool $lookupEnabled): self
{
$this->options['lookupEnabled'] = $lookupEnabled;
return $this;
@@ -113,11 +260,10 @@ public function setLookupEnabled($lookupEnabled)
/**
* Whether to skip sending SMS verifications to landlines. Requires `lookup_enabled`.
*
- * @param bool $skipSmsToLandlines Whether to skip sending SMS verifications to
- * landlines
+ * @param bool $skipSmsToLandlines Whether to skip sending SMS verifications to landlines. Requires `lookup_enabled`.
* @return $this Fluent Builder
*/
- public function setSkipSmsToLandlines($skipSmsToLandlines)
+ public function setSkipSmsToLandlines(bool $skipSmsToLandlines): self
{
$this->options['skipSmsToLandlines'] = $skipSmsToLandlines;
return $this;
@@ -126,12 +272,10 @@ public function setSkipSmsToLandlines($skipSmsToLandlines)
/**
* Whether to ask the user to press a number before delivering the verify code in a phone call.
*
- * @param bool $dtmfInputRequired Whether to ask the user to press a number
- * before delivering the verify code in a phone
- * call
+ * @param bool $dtmfInputRequired Whether to ask the user to press a number before delivering the verify code in a phone call.
* @return $this Fluent Builder
*/
- public function setDtmfInputRequired($dtmfInputRequired)
+ public function setDtmfInputRequired(bool $dtmfInputRequired): self
{
$this->options['dtmfInputRequired'] = $dtmfInputRequired;
return $this;
@@ -140,11 +284,10 @@ public function setDtmfInputRequired($dtmfInputRequired)
/**
* The name of an alternative text-to-speech service to use in phone calls. Applies only to TTS languages.
*
- * @param string $ttsName The name of an alternative text-to-speech service to
- * use in phone calls
+ * @param string $ttsName The name of an alternative text-to-speech service to use in phone calls. Applies only to TTS languages.
* @return $this Fluent Builder
*/
- public function setTtsName($ttsName)
+ public function setTtsName(string $ttsName): self
{
$this->options['ttsName'] = $ttsName;
return $this;
@@ -153,66 +296,234 @@ public function setTtsName($ttsName)
/**
* Whether to pass PSD2 transaction parameters when starting a verification.
*
- * @param bool $psd2Enabled Whether to pass PSD2 transaction parameters when
- * starting a verification
+ * @param bool $psd2Enabled Whether to pass PSD2 transaction parameters when starting a verification.
* @return $this Fluent Builder
*/
- public function setPsd2Enabled($psd2Enabled)
+ public function setPsd2Enabled(bool $psd2Enabled): self
{
$this->options['psd2Enabled'] = $psd2Enabled;
return $this;
}
/**
- * Whether to add a privacy warning at the end of an SMS. **Disabled by default and applies only for SMS.**
+ * Whether to add a security warning at the end of an SMS verification body. Disabled by default and applies only to SMS. Example SMS body: `Your AppName verification code is: 1234. Don’t share this code with anyone; our employees will never ask for the code`
*
- * @param bool $doNotShareWarningEnabled Whether to add a privacy warning at
- * the end of an SMS.
+ * @param bool $doNotShareWarningEnabled Whether to add a security warning at the end of an SMS verification body. Disabled by default and applies only to SMS. Example SMS body: `Your AppName verification code is: 1234. Don’t share this code with anyone; our employees will never ask for the code`
* @return $this Fluent Builder
*/
- public function setDoNotShareWarningEnabled($doNotShareWarningEnabled)
+ public function setDoNotShareWarningEnabled(bool $doNotShareWarningEnabled): self
{
$this->options['doNotShareWarningEnabled'] = $doNotShareWarningEnabled;
return $this;
}
+ /**
+ * Whether to allow sending verifications with a custom code instead of a randomly generated one.
+ *
+ * @param bool $customCodeEnabled Whether to allow sending verifications with a custom code instead of a randomly generated one.
+ * @return $this Fluent Builder
+ */
+ public function setCustomCodeEnabled(bool $customCodeEnabled): self
+ {
+ $this->options['customCodeEnabled'] = $customCodeEnabled;
+ return $this;
+ }
+
+ /**
+ * Optional configuration for the Push factors. If true, include the date in the Challenge's response. Otherwise, the date is omitted from the response. See [Challenge](https://www.twilio.com/docs/verify/api/challenge) resource’s details parameter for more info. Default: false. **Deprecated** do not use this parameter. This timestamp value is the same one as the one found in `date_created`, please use that one instead.
+ *
+ * @param bool $pushIncludeDate Optional configuration for the Push factors. If true, include the date in the Challenge's response. Otherwise, the date is omitted from the response. See [Challenge](https://www.twilio.com/docs/verify/api/challenge) resource’s details parameter for more info. Default: false. **Deprecated** do not use this parameter. This timestamp value is the same one as the one found in `date_created`, please use that one instead.
+ * @return $this Fluent Builder
+ */
+ public function setPushIncludeDate(bool $pushIncludeDate): self
+ {
+ $this->options['pushIncludeDate'] = $pushIncludeDate;
+ return $this;
+ }
+
+ /**
+ * Optional configuration for the Push factors. Set the APN Credential for this service. This will allow to send push notifications to iOS devices. See [Credential Resource](https://www.twilio.com/docs/notify/api/credential-resource)
+ *
+ * @param string $pushApnCredentialSid Optional configuration for the Push factors. Set the APN Credential for this service. This will allow to send push notifications to iOS devices. See [Credential Resource](https://www.twilio.com/docs/notify/api/credential-resource)
+ * @return $this Fluent Builder
+ */
+ public function setPushApnCredentialSid(string $pushApnCredentialSid): self
+ {
+ $this->options['pushApnCredentialSid'] = $pushApnCredentialSid;
+ return $this;
+ }
+
+ /**
+ * Optional configuration for the Push factors. Set the FCM Credential for this service. This will allow to send push notifications to Android devices. See [Credential Resource](https://www.twilio.com/docs/notify/api/credential-resource)
+ *
+ * @param string $pushFcmCredentialSid Optional configuration for the Push factors. Set the FCM Credential for this service. This will allow to send push notifications to Android devices. See [Credential Resource](https://www.twilio.com/docs/notify/api/credential-resource)
+ * @return $this Fluent Builder
+ */
+ public function setPushFcmCredentialSid(string $pushFcmCredentialSid): self
+ {
+ $this->options['pushFcmCredentialSid'] = $pushFcmCredentialSid;
+ return $this;
+ }
+
+ /**
+ * Optional configuration for the TOTP factors. Set TOTP Issuer for this service. This will allow to configure the issuer of the TOTP URI. Defaults to the service friendly name if not provided.
+ *
+ * @param string $totpIssuer Optional configuration for the TOTP factors. Set TOTP Issuer for this service. This will allow to configure the issuer of the TOTP URI. Defaults to the service friendly name if not provided.
+ * @return $this Fluent Builder
+ */
+ public function setTotpIssuer(string $totpIssuer): self
+ {
+ $this->options['totpIssuer'] = $totpIssuer;
+ return $this;
+ }
+
+ /**
+ * Optional configuration for the TOTP factors. Defines how often, in seconds, are TOTP codes generated. i.e, a new TOTP code is generated every time_step seconds. Must be between 20 and 60 seconds, inclusive. Defaults to 30 seconds
+ *
+ * @param int $totpTimeStep Optional configuration for the TOTP factors. Defines how often, in seconds, are TOTP codes generated. i.e, a new TOTP code is generated every time_step seconds. Must be between 20 and 60 seconds, inclusive. Defaults to 30 seconds
+ * @return $this Fluent Builder
+ */
+ public function setTotpTimeStep(int $totpTimeStep): self
+ {
+ $this->options['totpTimeStep'] = $totpTimeStep;
+ return $this;
+ }
+
+ /**
+ * Optional configuration for the TOTP factors. Number of digits for generated TOTP codes. Must be between 3 and 8, inclusive. Defaults to 6
+ *
+ * @param int $totpCodeLength Optional configuration for the TOTP factors. Number of digits for generated TOTP codes. Must be between 3 and 8, inclusive. Defaults to 6
+ * @return $this Fluent Builder
+ */
+ public function setTotpCodeLength(int $totpCodeLength): self
+ {
+ $this->options['totpCodeLength'] = $totpCodeLength;
+ return $this;
+ }
+
+ /**
+ * Optional configuration for the TOTP factors. The number of time-steps, past and future, that are valid for validation of TOTP codes. Must be between 0 and 2, inclusive. Defaults to 1
+ *
+ * @param int $totpSkew Optional configuration for the TOTP factors. The number of time-steps, past and future, that are valid for validation of TOTP codes. Must be between 0 and 2, inclusive. Defaults to 1
+ * @return $this Fluent Builder
+ */
+ public function setTotpSkew(int $totpSkew): self
+ {
+ $this->options['totpSkew'] = $totpSkew;
+ return $this;
+ }
+
+ /**
+ * The default message [template](https://www.twilio.com/docs/verify/api/templates). Will be used for all SMS verifications unless explicitly overriden. SMS channel only.
+ *
+ * @param string $defaultTemplateSid The default message [template](https://www.twilio.com/docs/verify/api/templates). Will be used for all SMS verifications unless explicitly overriden. SMS channel only.
+ * @return $this Fluent Builder
+ */
+ public function setDefaultTemplateSid(string $defaultTemplateSid): self
+ {
+ $this->options['defaultTemplateSid'] = $defaultTemplateSid;
+ return $this;
+ }
+
+ /**
+ * The SID of the Messaging Service containing WhatsApp Sender(s) that Verify will use to send WhatsApp messages to your users.
+ *
+ * @param string $whatsappMsgServiceSid The SID of the Messaging Service containing WhatsApp Sender(s) that Verify will use to send WhatsApp messages to your users.
+ * @return $this Fluent Builder
+ */
+ public function setWhatsappMsgServiceSid(string $whatsappMsgServiceSid): self
+ {
+ $this->options['whatsappMsgServiceSid'] = $whatsappMsgServiceSid;
+ return $this;
+ }
+
+ /**
+ * The number to use as the WhatsApp Sender that Verify will use to send WhatsApp messages to your users.This WhatsApp Sender must be associated with a Messaging Service SID.
+ *
+ * @param string $whatsappFrom The number to use as the WhatsApp Sender that Verify will use to send WhatsApp messages to your users.This WhatsApp Sender must be associated with a Messaging Service SID.
+ * @return $this Fluent Builder
+ */
+ public function setWhatsappFrom(string $whatsappFrom): self
+ {
+ $this->options['whatsappFrom'] = $whatsappFrom;
+ return $this;
+ }
+
+ /**
+ * Whether to allow verifications from the service to reach the stream-events sinks if configured
+ *
+ * @param bool $verifyEventSubscriptionEnabled Whether to allow verifications from the service to reach the stream-events sinks if configured
+ * @return $this Fluent Builder
+ */
+ public function setVerifyEventSubscriptionEnabled(bool $verifyEventSubscriptionEnabled): self
+ {
+ $this->options['verifyEventSubscriptionEnabled'] = $verifyEventSubscriptionEnabled;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Verify.V2.CreateServiceOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Verify.V2.CreateServiceOptions ' . $options . ']';
}
}
+
+
+
class UpdateServiceOptions extends Options
-{
- /**
- * @param string $friendlyName A string to describe the verification service
- * @param int $codeLength The length of the verification code to generate
- * @param bool $lookupEnabled Whether to perform a lookup with each verification
- * @param bool $skipSmsToLandlines Whether to skip sending SMS verifications to
- * landlines
- * @param bool $dtmfInputRequired Whether to ask the user to press a number
- * before delivering the verify code in a phone
- * call
- * @param string $ttsName The name of an alternative text-to-speech service to
- * use in phone calls
- * @param bool $psd2Enabled Whether to pass PSD2 transaction parameters when
- * starting a verification
- * @param bool $doNotShareWarningEnabled Whether to add a privacy warning at
- * the end of an SMS.
- */
- public function __construct($friendlyName = Values::NONE, $codeLength = Values::NONE, $lookupEnabled = Values::NONE, $skipSmsToLandlines = Values::NONE, $dtmfInputRequired = Values::NONE, $ttsName = Values::NONE, $psd2Enabled = Values::NONE, $doNotShareWarningEnabled = Values::NONE)
{
+ /**
+ * @param string $friendlyName A descriptive string that you create to describe the verification service. It can be up to 32 characters long. **This value should not contain PII.**
+ * @param int $codeLength The length of the verification code to generate. Must be an integer value between 4 and 10, inclusive.
+ * @param bool $lookupEnabled Whether to perform a lookup with each verification started and return info about the phone number.
+ * @param bool $skipSmsToLandlines Whether to skip sending SMS verifications to landlines. Requires `lookup_enabled`.
+ * @param bool $dtmfInputRequired Whether to ask the user to press a number before delivering the verify code in a phone call.
+ * @param string $ttsName The name of an alternative text-to-speech service to use in phone calls. Applies only to TTS languages.
+ * @param bool $psd2Enabled Whether to pass PSD2 transaction parameters when starting a verification.
+ * @param bool $doNotShareWarningEnabled Whether to add a privacy warning at the end of an SMS. **Disabled by default and applies only for SMS.**
+ * @param bool $customCodeEnabled Whether to allow sending verifications with a custom code instead of a randomly generated one.
+ * @param bool $pushIncludeDate Optional configuration for the Push factors. If true, include the date in the Challenge's response. Otherwise, the date is omitted from the response. See [Challenge](https://www.twilio.com/docs/verify/api/challenge) resource’s details parameter for more info. Default: false. **Deprecated** do not use this parameter.
+ * @param string $pushApnCredentialSid Optional configuration for the Push factors. Set the APN Credential for this service. This will allow to send push notifications to iOS devices. See [Credential Resource](https://www.twilio.com/docs/notify/api/credential-resource)
+ * @param string $pushFcmCredentialSid Optional configuration for the Push factors. Set the FCM Credential for this service. This will allow to send push notifications to Android devices. See [Credential Resource](https://www.twilio.com/docs/notify/api/credential-resource)
+ * @param string $totpIssuer Optional configuration for the TOTP factors. Set TOTP Issuer for this service. This will allow to configure the issuer of the TOTP URI.
+ * @param int $totpTimeStep Optional configuration for the TOTP factors. Defines how often, in seconds, are TOTP codes generated. i.e, a new TOTP code is generated every time_step seconds. Must be between 20 and 60 seconds, inclusive. Defaults to 30 seconds
+ * @param int $totpCodeLength Optional configuration for the TOTP factors. Number of digits for generated TOTP codes. Must be between 3 and 8, inclusive. Defaults to 6
+ * @param int $totpSkew Optional configuration for the TOTP factors. The number of time-steps, past and future, that are valid for validation of TOTP codes. Must be between 0 and 2, inclusive. Defaults to 1
+ * @param string $defaultTemplateSid The default message [template](https://www.twilio.com/docs/verify/api/templates). Will be used for all SMS verifications unless explicitly overriden. SMS channel only.
+ * @param string $whatsappMsgServiceSid The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services) to associate with the Verification Service.
+ * @param string $whatsappFrom The WhatsApp number to use as the sender of the verification messages. This number must be associated with the WhatsApp Message Service.
+ * @param bool $verifyEventSubscriptionEnabled Whether to allow verifications from the service to reach the stream-events sinks if configured
+ */
+ public function __construct(
+
+ string $friendlyName = Values::NONE,
+ int $codeLength = Values::INT_NONE,
+ bool $lookupEnabled = Values::BOOL_NONE,
+ bool $skipSmsToLandlines = Values::BOOL_NONE,
+ bool $dtmfInputRequired = Values::BOOL_NONE,
+ string $ttsName = Values::NONE,
+ bool $psd2Enabled = Values::BOOL_NONE,
+ bool $doNotShareWarningEnabled = Values::BOOL_NONE,
+ bool $customCodeEnabled = Values::BOOL_NONE,
+ bool $pushIncludeDate = Values::BOOL_NONE,
+ string $pushApnCredentialSid = Values::NONE,
+ string $pushFcmCredentialSid = Values::NONE,
+ string $totpIssuer = Values::NONE,
+ int $totpTimeStep = Values::INT_NONE,
+ int $totpCodeLength = Values::INT_NONE,
+ int $totpSkew = Values::INT_NONE,
+ string $defaultTemplateSid = Values::NONE,
+ string $whatsappMsgServiceSid = Values::NONE,
+ string $whatsappFrom = Values::NONE,
+ bool $verifyEventSubscriptionEnabled = Values::BOOL_NONE
+
+ ) {
$this->options['friendlyName'] = $friendlyName;
$this->options['codeLength'] = $codeLength;
$this->options['lookupEnabled'] = $lookupEnabled;
@@ -221,15 +532,27 @@ public function __construct($friendlyName = Values::NONE, $codeLength = Values::
$this->options['ttsName'] = $ttsName;
$this->options['psd2Enabled'] = $psd2Enabled;
$this->options['doNotShareWarningEnabled'] = $doNotShareWarningEnabled;
+ $this->options['customCodeEnabled'] = $customCodeEnabled;
+ $this->options['pushIncludeDate'] = $pushIncludeDate;
+ $this->options['pushApnCredentialSid'] = $pushApnCredentialSid;
+ $this->options['pushFcmCredentialSid'] = $pushFcmCredentialSid;
+ $this->options['totpIssuer'] = $totpIssuer;
+ $this->options['totpTimeStep'] = $totpTimeStep;
+ $this->options['totpCodeLength'] = $totpCodeLength;
+ $this->options['totpSkew'] = $totpSkew;
+ $this->options['defaultTemplateSid'] = $defaultTemplateSid;
+ $this->options['whatsappMsgServiceSid'] = $whatsappMsgServiceSid;
+ $this->options['whatsappFrom'] = $whatsappFrom;
+ $this->options['verifyEventSubscriptionEnabled'] = $verifyEventSubscriptionEnabled;
}
/**
- * A descriptive string that you create to describe the verification service. It can be up to 64 characters long. **This value should not contain PII.**
+ * A descriptive string that you create to describe the verification service. It can be up to 32 characters long. **This value should not contain PII.**
*
- * @param string $friendlyName A string to describe the verification service
+ * @param string $friendlyName A descriptive string that you create to describe the verification service. It can be up to 32 characters long. **This value should not contain PII.**
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -238,10 +561,10 @@ public function setFriendlyName($friendlyName)
/**
* The length of the verification code to generate. Must be an integer value between 4 and 10, inclusive.
*
- * @param int $codeLength The length of the verification code to generate
+ * @param int $codeLength The length of the verification code to generate. Must be an integer value between 4 and 10, inclusive.
* @return $this Fluent Builder
*/
- public function setCodeLength($codeLength)
+ public function setCodeLength(int $codeLength): self
{
$this->options['codeLength'] = $codeLength;
return $this;
@@ -250,10 +573,10 @@ public function setCodeLength($codeLength)
/**
* Whether to perform a lookup with each verification started and return info about the phone number.
*
- * @param bool $lookupEnabled Whether to perform a lookup with each verification
+ * @param bool $lookupEnabled Whether to perform a lookup with each verification started and return info about the phone number.
* @return $this Fluent Builder
*/
- public function setLookupEnabled($lookupEnabled)
+ public function setLookupEnabled(bool $lookupEnabled): self
{
$this->options['lookupEnabled'] = $lookupEnabled;
return $this;
@@ -262,11 +585,10 @@ public function setLookupEnabled($lookupEnabled)
/**
* Whether to skip sending SMS verifications to landlines. Requires `lookup_enabled`.
*
- * @param bool $skipSmsToLandlines Whether to skip sending SMS verifications to
- * landlines
+ * @param bool $skipSmsToLandlines Whether to skip sending SMS verifications to landlines. Requires `lookup_enabled`.
* @return $this Fluent Builder
*/
- public function setSkipSmsToLandlines($skipSmsToLandlines)
+ public function setSkipSmsToLandlines(bool $skipSmsToLandlines): self
{
$this->options['skipSmsToLandlines'] = $skipSmsToLandlines;
return $this;
@@ -275,12 +597,10 @@ public function setSkipSmsToLandlines($skipSmsToLandlines)
/**
* Whether to ask the user to press a number before delivering the verify code in a phone call.
*
- * @param bool $dtmfInputRequired Whether to ask the user to press a number
- * before delivering the verify code in a phone
- * call
+ * @param bool $dtmfInputRequired Whether to ask the user to press a number before delivering the verify code in a phone call.
* @return $this Fluent Builder
*/
- public function setDtmfInputRequired($dtmfInputRequired)
+ public function setDtmfInputRequired(bool $dtmfInputRequired): self
{
$this->options['dtmfInputRequired'] = $dtmfInputRequired;
return $this;
@@ -289,11 +609,10 @@ public function setDtmfInputRequired($dtmfInputRequired)
/**
* The name of an alternative text-to-speech service to use in phone calls. Applies only to TTS languages.
*
- * @param string $ttsName The name of an alternative text-to-speech service to
- * use in phone calls
+ * @param string $ttsName The name of an alternative text-to-speech service to use in phone calls. Applies only to TTS languages.
* @return $this Fluent Builder
*/
- public function setTtsName($ttsName)
+ public function setTtsName(string $ttsName): self
{
$this->options['ttsName'] = $ttsName;
return $this;
@@ -302,11 +621,10 @@ public function setTtsName($ttsName)
/**
* Whether to pass PSD2 transaction parameters when starting a verification.
*
- * @param bool $psd2Enabled Whether to pass PSD2 transaction parameters when
- * starting a verification
+ * @param bool $psd2Enabled Whether to pass PSD2 transaction parameters when starting a verification.
* @return $this Fluent Builder
*/
- public function setPsd2Enabled($psd2Enabled)
+ public function setPsd2Enabled(bool $psd2Enabled): self
{
$this->options['psd2Enabled'] = $psd2Enabled;
return $this;
@@ -315,29 +633,168 @@ public function setPsd2Enabled($psd2Enabled)
/**
* Whether to add a privacy warning at the end of an SMS. **Disabled by default and applies only for SMS.**
*
- * @param bool $doNotShareWarningEnabled Whether to add a privacy warning at
- * the end of an SMS.
+ * @param bool $doNotShareWarningEnabled Whether to add a privacy warning at the end of an SMS. **Disabled by default and applies only for SMS.**
* @return $this Fluent Builder
*/
- public function setDoNotShareWarningEnabled($doNotShareWarningEnabled)
+ public function setDoNotShareWarningEnabled(bool $doNotShareWarningEnabled): self
{
$this->options['doNotShareWarningEnabled'] = $doNotShareWarningEnabled;
return $this;
}
+ /**
+ * Whether to allow sending verifications with a custom code instead of a randomly generated one.
+ *
+ * @param bool $customCodeEnabled Whether to allow sending verifications with a custom code instead of a randomly generated one.
+ * @return $this Fluent Builder
+ */
+ public function setCustomCodeEnabled(bool $customCodeEnabled): self
+ {
+ $this->options['customCodeEnabled'] = $customCodeEnabled;
+ return $this;
+ }
+
+ /**
+ * Optional configuration for the Push factors. If true, include the date in the Challenge's response. Otherwise, the date is omitted from the response. See [Challenge](https://www.twilio.com/docs/verify/api/challenge) resource’s details parameter for more info. Default: false. **Deprecated** do not use this parameter.
+ *
+ * @param bool $pushIncludeDate Optional configuration for the Push factors. If true, include the date in the Challenge's response. Otherwise, the date is omitted from the response. See [Challenge](https://www.twilio.com/docs/verify/api/challenge) resource’s details parameter for more info. Default: false. **Deprecated** do not use this parameter.
+ * @return $this Fluent Builder
+ */
+ public function setPushIncludeDate(bool $pushIncludeDate): self
+ {
+ $this->options['pushIncludeDate'] = $pushIncludeDate;
+ return $this;
+ }
+
+ /**
+ * Optional configuration for the Push factors. Set the APN Credential for this service. This will allow to send push notifications to iOS devices. See [Credential Resource](https://www.twilio.com/docs/notify/api/credential-resource)
+ *
+ * @param string $pushApnCredentialSid Optional configuration for the Push factors. Set the APN Credential for this service. This will allow to send push notifications to iOS devices. See [Credential Resource](https://www.twilio.com/docs/notify/api/credential-resource)
+ * @return $this Fluent Builder
+ */
+ public function setPushApnCredentialSid(string $pushApnCredentialSid): self
+ {
+ $this->options['pushApnCredentialSid'] = $pushApnCredentialSid;
+ return $this;
+ }
+
+ /**
+ * Optional configuration for the Push factors. Set the FCM Credential for this service. This will allow to send push notifications to Android devices. See [Credential Resource](https://www.twilio.com/docs/notify/api/credential-resource)
+ *
+ * @param string $pushFcmCredentialSid Optional configuration for the Push factors. Set the FCM Credential for this service. This will allow to send push notifications to Android devices. See [Credential Resource](https://www.twilio.com/docs/notify/api/credential-resource)
+ * @return $this Fluent Builder
+ */
+ public function setPushFcmCredentialSid(string $pushFcmCredentialSid): self
+ {
+ $this->options['pushFcmCredentialSid'] = $pushFcmCredentialSid;
+ return $this;
+ }
+
+ /**
+ * Optional configuration for the TOTP factors. Set TOTP Issuer for this service. This will allow to configure the issuer of the TOTP URI.
+ *
+ * @param string $totpIssuer Optional configuration for the TOTP factors. Set TOTP Issuer for this service. This will allow to configure the issuer of the TOTP URI.
+ * @return $this Fluent Builder
+ */
+ public function setTotpIssuer(string $totpIssuer): self
+ {
+ $this->options['totpIssuer'] = $totpIssuer;
+ return $this;
+ }
+
+ /**
+ * Optional configuration for the TOTP factors. Defines how often, in seconds, are TOTP codes generated. i.e, a new TOTP code is generated every time_step seconds. Must be between 20 and 60 seconds, inclusive. Defaults to 30 seconds
+ *
+ * @param int $totpTimeStep Optional configuration for the TOTP factors. Defines how often, in seconds, are TOTP codes generated. i.e, a new TOTP code is generated every time_step seconds. Must be between 20 and 60 seconds, inclusive. Defaults to 30 seconds
+ * @return $this Fluent Builder
+ */
+ public function setTotpTimeStep(int $totpTimeStep): self
+ {
+ $this->options['totpTimeStep'] = $totpTimeStep;
+ return $this;
+ }
+
+ /**
+ * Optional configuration for the TOTP factors. Number of digits for generated TOTP codes. Must be between 3 and 8, inclusive. Defaults to 6
+ *
+ * @param int $totpCodeLength Optional configuration for the TOTP factors. Number of digits for generated TOTP codes. Must be between 3 and 8, inclusive. Defaults to 6
+ * @return $this Fluent Builder
+ */
+ public function setTotpCodeLength(int $totpCodeLength): self
+ {
+ $this->options['totpCodeLength'] = $totpCodeLength;
+ return $this;
+ }
+
+ /**
+ * Optional configuration for the TOTP factors. The number of time-steps, past and future, that are valid for validation of TOTP codes. Must be between 0 and 2, inclusive. Defaults to 1
+ *
+ * @param int $totpSkew Optional configuration for the TOTP factors. The number of time-steps, past and future, that are valid for validation of TOTP codes. Must be between 0 and 2, inclusive. Defaults to 1
+ * @return $this Fluent Builder
+ */
+ public function setTotpSkew(int $totpSkew): self
+ {
+ $this->options['totpSkew'] = $totpSkew;
+ return $this;
+ }
+
+ /**
+ * The default message [template](https://www.twilio.com/docs/verify/api/templates). Will be used for all SMS verifications unless explicitly overriden. SMS channel only.
+ *
+ * @param string $defaultTemplateSid The default message [template](https://www.twilio.com/docs/verify/api/templates). Will be used for all SMS verifications unless explicitly overriden. SMS channel only.
+ * @return $this Fluent Builder
+ */
+ public function setDefaultTemplateSid(string $defaultTemplateSid): self
+ {
+ $this->options['defaultTemplateSid'] = $defaultTemplateSid;
+ return $this;
+ }
+
+ /**
+ * The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services) to associate with the Verification Service.
+ *
+ * @param string $whatsappMsgServiceSid The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services) to associate with the Verification Service.
+ * @return $this Fluent Builder
+ */
+ public function setWhatsappMsgServiceSid(string $whatsappMsgServiceSid): self
+ {
+ $this->options['whatsappMsgServiceSid'] = $whatsappMsgServiceSid;
+ return $this;
+ }
+
+ /**
+ * The WhatsApp number to use as the sender of the verification messages. This number must be associated with the WhatsApp Message Service.
+ *
+ * @param string $whatsappFrom The WhatsApp number to use as the sender of the verification messages. This number must be associated with the WhatsApp Message Service.
+ * @return $this Fluent Builder
+ */
+ public function setWhatsappFrom(string $whatsappFrom): self
+ {
+ $this->options['whatsappFrom'] = $whatsappFrom;
+ return $this;
+ }
+
+ /**
+ * Whether to allow verifications from the service to reach the stream-events sinks if configured
+ *
+ * @param bool $verifyEventSubscriptionEnabled Whether to allow verifications from the service to reach the stream-events sinks if configured
+ * @return $this Fluent Builder
+ */
+ public function setVerifyEventSubscriptionEnabled(bool $verifyEventSubscriptionEnabled): self
+ {
+ $this->options['verifyEventSubscriptionEnabled'] = $verifyEventSubscriptionEnabled;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Verify.V2.UpdateServiceOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Verify.V2.UpdateServiceOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/ServicePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/ServicePage.php
index 2138447..c5754ef 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/ServicePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Verify/V2/ServicePage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return ServiceInstance \Twilio\Rest\Verify\V2\ServiceInstance
+ */
+ public function buildInstance(array $payload): ServiceInstance
{
return new ServiceInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Verify.V2.ServicePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video.php b/vendor/twilio/sdk/src/Twilio/Rest/Video.php
index 43af8dd..dea8beb 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video.php
@@ -1,204 +1,107 @@
baseUrl = 'https://video.twilio.com';
- }
-
+class Video extends VideoBase {
/**
- * @return \Twilio\Rest\Video\V1 Version v1 of video
+ * @deprecated Use v1->compositions instead.
*/
- protected function getV1()
- {
- if (!$this->_v1) {
- $this->_v1 = new V1($this);
- }
- return $this->_v1;
- }
-
- /**
- * Magic getter to lazy load version
- *
- * @param string $name Version to return
- * @return \Twilio\Version The requested version
- * @throws TwilioException For unknown versions
- */
- public function __get($name)
- {
- $method = 'get' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return $this->$method();
- }
-
- throw new TwilioException('Unknown version ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $method = 'context' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return \call_user_func_array(array($this, $method), $arguments);
- }
-
- throw new TwilioException('Unknown context ' . $name);
- }
-
- /**
- * @return \Twilio\Rest\Video\V1\CompositionList
- */
- protected function getCompositions()
- {
+ protected function getCompositions(): \Twilio\Rest\Video\V1\CompositionList {
+ echo "compositions is deprecated. Use v1->compositions instead.";
return $this->v1->compositions;
}
/**
+ * @deprecated Use v1->compositions(\$sid) instead.
* @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Video\V1\CompositionContext
*/
- protected function contextCompositions($sid)
- {
+ protected function contextCompositions(string $sid): \Twilio\Rest\Video\V1\CompositionContext {
+ echo "compositions(\$sid) is deprecated. Use v1->compositions(\$sid) instead.";
return $this->v1->compositions($sid);
}
/**
- * @return \Twilio\Rest\Video\V1\CompositionHookList
+ * @deprecated Use v1->compositionHooks instead.
*/
- protected function getCompositionHooks()
- {
+ protected function getCompositionHooks(): \Twilio\Rest\Video\V1\CompositionHookList {
+ echo "compositionHooks is deprecated. Use v1->compositionHooks instead.";
return $this->v1->compositionHooks;
}
/**
+ * @deprecated Use v1->compositionHooks(\$sid) instead.
* @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Video\V1\CompositionHookContext
*/
- protected function contextCompositionHooks($sid)
- {
+ protected function contextCompositionHooks(string $sid): \Twilio\Rest\Video\V1\CompositionHookContext {
+ echo "compositionHooks(\$sid) is deprecated. Use v1->compositionHooks(\$sid) instead.";
return $this->v1->compositionHooks($sid);
}
/**
- * @return \Twilio\Rest\Video\V1\CompositionSettingsList
+ * @deprecated Use v1->compositionSettings instead.
*/
- protected function getCompositionSettings()
- {
+ protected function getCompositionSettings(): \Twilio\Rest\Video\V1\CompositionSettingsList {
+ echo "compositionSettings is deprecated. Use v1->compositionSettings instead.";
return $this->v1->compositionSettings;
}
/**
- * @return \Twilio\Rest\Video\V1\CompositionSettingsContext
+ * @deprecated Use v1->compositionSettings() instead.
*/
- protected function contextCompositionSettings()
- {
+ protected function contextCompositionSettings(): \Twilio\Rest\Video\V1\CompositionSettingsContext {
+ echo "compositionSettings() is deprecated. Use v1->compositionSettings() instead.";
return $this->v1->compositionSettings();
}
/**
- * @return \Twilio\Rest\Video\V1\RecordingList
+ * @deprecated Use v1->recordings instead.
*/
- protected function getRecordings()
- {
+ protected function getRecordings(): \Twilio\Rest\Video\V1\RecordingList {
+ echo "recordings is deprecated. Use v1->recordings instead.";
return $this->v1->recordings;
}
/**
+ * @deprecated Use v1->recordings(\$sid) instead.
* @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Video\V1\RecordingContext
*/
- protected function contextRecordings($sid)
- {
+ protected function contextRecordings(string $sid): \Twilio\Rest\Video\V1\RecordingContext {
+ echo "recordings(\$sid) is deprecated. Use v1->recordings(\$sid) instead.";
return $this->v1->recordings($sid);
}
/**
- * @return \Twilio\Rest\Video\V1\RecordingSettingsList
+ * @deprecated Use v1->recordingSettings instead.
*/
- protected function getRecordingSettings()
- {
+ protected function getRecordingSettings(): \Twilio\Rest\Video\V1\RecordingSettingsList {
+ echo "recordingSettings is deprecated. Use v1->recordingSettings instead.";
return $this->v1->recordingSettings;
}
/**
- * @return \Twilio\Rest\Video\V1\RecordingSettingsContext
+ * @deprecated Use v1->recordingSettings() instead.
*/
- protected function contextRecordingSettings()
- {
+ protected function contextRecordingSettings(): \Twilio\Rest\Video\V1\RecordingSettingsContext {
+ echo "recordingSettings() is deprecated. Use v1->recordingSettings() instead.";
return $this->v1->recordingSettings();
}
/**
- * @return \Twilio\Rest\Video\V1\RoomList
+ * @deprecated Use v1->rooms instead.
*/
- protected function getRooms()
- {
+ protected function getRooms(): \Twilio\Rest\Video\V1\RoomList {
+ echo "rooms is deprecated. Use v1->rooms instead.";
return $this->v1->rooms;
}
/**
+ * @deprecated Use v1->rooms(\$sid) instead.
* @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Video\V1\RoomContext
*/
- protected function contextRooms($sid)
- {
+ protected function contextRooms(string $sid): \Twilio\Rest\Video\V1\RoomContext {
+ echo "rooms(\$sid) is deprecated. Use v1->rooms(\$sid) instead.";
return $this->v1->rooms($sid);
}
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Video]';
- }
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1.php
index 7630417..cfb7cde 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1.php
@@ -1,18 +1,25 @@
version = 'v1';
}
- /**
- * @return \Twilio\Rest\Video\V1\CompositionList
- */
- protected function getCompositions()
+ protected function getCompositions(): CompositionList
{
if (!$this->_compositions) {
$this->_compositions = new CompositionList($this);
@@ -63,10 +66,7 @@ protected function getCompositions()
return $this->_compositions;
}
- /**
- * @return \Twilio\Rest\Video\V1\CompositionHookList
- */
- protected function getCompositionHooks()
+ protected function getCompositionHooks(): CompositionHookList
{
if (!$this->_compositionHooks) {
$this->_compositionHooks = new CompositionHookList($this);
@@ -74,10 +74,7 @@ protected function getCompositionHooks()
return $this->_compositionHooks;
}
- /**
- * @return \Twilio\Rest\Video\V1\CompositionSettingsList
- */
- protected function getCompositionSettings()
+ protected function getCompositionSettings(): CompositionSettingsList
{
if (!$this->_compositionSettings) {
$this->_compositionSettings = new CompositionSettingsList($this);
@@ -85,10 +82,7 @@ protected function getCompositionSettings()
return $this->_compositionSettings;
}
- /**
- * @return \Twilio\Rest\Video\V1\RecordingList
- */
- protected function getRecordings()
+ protected function getRecordings(): RecordingList
{
if (!$this->_recordings) {
$this->_recordings = new RecordingList($this);
@@ -96,10 +90,7 @@ protected function getRecordings()
return $this->_recordings;
}
- /**
- * @return \Twilio\Rest\Video\V1\RecordingSettingsList
- */
- protected function getRecordingSettings()
+ protected function getRecordingSettings(): RecordingSettingsList
{
if (!$this->_recordingSettings) {
$this->_recordingSettings = new RecordingSettingsList($this);
@@ -107,10 +98,7 @@ protected function getRecordingSettings()
return $this->_recordingSettings;
}
- /**
- * @return \Twilio\Rest\Video\V1\RoomList
- */
- protected function getRooms()
+ protected function getRooms(): RoomList
{
if (!$this->_rooms) {
$this->_rooms = new RoomList($this);
@@ -125,7 +113,7 @@ protected function getRooms()
* @return \Twilio\ListResource The requested resource
* @throws TwilioException For unknown resource
*/
- public function __get($name)
+ public function __get(string $name)
{
$method = 'get' . \ucfirst($name);
if (\method_exists($this, $method)) {
@@ -140,10 +128,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -158,8 +146,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Video.V1]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionContext.php
index 3b6639a..af1e251 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionContext.php
@@ -2,81 +2,96 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Video
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Video\V1;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
class CompositionContext extends InstanceContext
-{
+ {
/**
* Initialize the CompositionContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Video\V1\CompositionContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid The SID of the Composition resource to delete.
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Compositions/' . \rawurlencode($sid) . '';
+ $this->uri = '/Compositions/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a CompositionInstance
+ * Delete the CompositionInstance
*
- * @return CompositionInstance Fetched CompositionInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new CompositionInstance($this->version, $payload, $this->solution['sid']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Deletes the CompositionInstance
+ * Fetch the CompositionInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return CompositionInstance Fetched CompositionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): CompositionInstance
{
- return $this->version->delete('delete', $this->uri);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
+
+ return new CompositionInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Video.V1.CompositionContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionHookContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionHookContext.php
index d6a6c93..8661679 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionHookContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionHookContext.php
@@ -2,122 +2,145 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Video
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Video\V1;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
class CompositionHookContext extends InstanceContext
-{
+ {
/**
* Initialize the CompositionHookContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Video\V1\CompositionHookContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid The SID of the CompositionHook resource to delete.
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/CompositionHooks/' . \rawurlencode($sid) . '';
+ $this->uri = '/CompositionHooks/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a CompositionHookInstance
+ * Delete the CompositionHookInstance
*
- * @return CompositionHookInstance Fetched CompositionHookInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- $params = Values::of(array());
-
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
- return new CompositionHookInstance($this->version, $payload, $this->solution['sid']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Deletes the CompositionHookInstance
+ * Fetch the CompositionHookInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return CompositionHookInstance Fetched CompositionHookInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): CompositionHookInstance
{
- return $this->version->delete('delete', $this->uri);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
+
+ return new CompositionHookInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Update the CompositionHookInstance
*
- * @param string $friendlyName A unique string to describe the resource
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 100 characters long and it must be unique within the account.
* @param array|Options $options Optional Arguments
* @return CompositionHookInstance Updated CompositionHookInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($friendlyName, $options = array())
+ public function update(string $friendlyName, array $options = []): CompositionHookInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $friendlyName,
- 'Enabled' => Serialize::booleanToString($options['enabled']),
- 'VideoLayout' => Serialize::jsonObject($options['videoLayout']),
- 'AudioSources' => Serialize::map($options['audioSources'], function ($e) {
- return $e;
- }),
- 'AudioSourcesExcluded' => Serialize::map($options['audioSourcesExcluded'], function ($e) {
- return $e;
- }),
- 'Trim' => Serialize::booleanToString($options['trim']),
- 'Format' => $options['format'],
- 'Resolution' => $options['resolution'],
- 'StatusCallback' => $options['statusCallback'],
- 'StatusCallbackMethod' => $options['statusCallbackMethod'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'FriendlyName' =>
+ $friendlyName,
+ 'Enabled' =>
+ Serialize::booleanToString($options['enabled']),
+ 'VideoLayout' =>
+ Serialize::jsonObject($options['videoLayout']),
+ 'AudioSources' =>
+ Serialize::map($options['audioSources'], function ($e) { return $e; }),
+ 'AudioSourcesExcluded' =>
+ Serialize::map($options['audioSourcesExcluded'], function ($e) { return $e; }),
+ 'Trim' =>
+ Serialize::booleanToString($options['trim']),
+ 'Format' =>
+ $options['format'],
+ 'Resolution' =>
+ $options['resolution'],
+ 'StatusCallback' =>
+ $options['statusCallback'],
+ 'StatusCallbackMethod' =>
+ $options['statusCallbackMethod'],
+ ]);
- return new CompositionHookInstance($this->version, $payload, $this->solution['sid']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
+
+ return new CompositionHookInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Video.V1.CompositionHookContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionHookInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionHookInstance.php
index cf3c41a..b6ab3b5 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionHookInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionHookInstance.php
@@ -2,55 +2,61 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Video
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Video\V1;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property string $accountSid
- * @property string $friendlyName
- * @property bool $enabled
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $sid
- * @property string $audioSources
- * @property string $audioSourcesExcluded
- * @property array $videoLayout
- * @property string $resolution
- * @property bool $trim
+ * @property string|null $accountSid
+ * @property string|null $friendlyName
+ * @property bool|null $enabled
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $sid
+ * @property string[]|null $audioSources
+ * @property string[]|null $audioSourcesExcluded
+ * @property array|null $videoLayout
+ * @property string|null $resolution
+ * @property bool|null $trim
* @property string $format
- * @property string $statusCallback
- * @property string $statusCallbackMethod
- * @property string $url
+ * @property string|null $statusCallback
+ * @property string|null $statusCallbackMethod
+ * @property string|null $url
*/
class CompositionHookInstance extends InstanceResource
{
/**
* Initialize the CompositionHookInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Video\V1\CompositionHookInstance
+ * @param string $sid The SID of the CompositionHook resource to delete.
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
'enabled' => Values::array_get($payload, 'enabled'),
@@ -66,59 +72,64 @@ public function __construct(Version $version, array $payload, $sid = null)
'statusCallback' => Values::array_get($payload, 'status_callback'),
'statusCallbackMethod' => Values::array_get($payload, 'status_callback_method'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Video\V1\CompositionHookContext Context for this
- * CompositionHookInstance
+ * @return CompositionHookContext Context for this CompositionHookInstance
*/
- protected function proxy()
+ protected function proxy(): CompositionHookContext
{
if (!$this->context) {
- $this->context = new CompositionHookContext($this->version, $this->solution['sid']);
+ $this->context = new CompositionHookContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a CompositionHookInstance
+ * Delete the CompositionHookInstance
*
- * @return CompositionHookInstance Fetched CompositionHookInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the CompositionHookInstance
+ * Fetch the CompositionHookInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return CompositionHookInstance Fetched CompositionHookInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): CompositionHookInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
* Update the CompositionHookInstance
*
- * @param string $friendlyName A unique string to describe the resource
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 100 characters long and it must be unique within the account.
* @param array|Options $options Optional Arguments
* @return CompositionHookInstance Updated CompositionHookInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($friendlyName, $options = array())
+ public function update(string $friendlyName, array $options = []): CompositionHookInstance
{
+
return $this->proxy()->update($friendlyName, $options);
}
@@ -129,7 +140,7 @@ public function update($friendlyName, $options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -148,12 +159,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Video.V1.CompositionHookInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionHookList.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionHookList.php
index 7d27303..4c9af83 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionHookList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionHookList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Video
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Video\V1;
@@ -12,59 +19,77 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
class CompositionHookList extends ListResource
-{
+ {
/**
* Construct the CompositionHookList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Video\V1\CompositionHookList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/CompositionHooks';
}
/**
- * Streams CompositionHookInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the CompositionHookInstance
*
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It can be up to 100 characters long and it must be unique within the account.
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return CompositionHookInstance Created CompositionHookInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function create(string $friendlyName, array $options = []): CompositionHookInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($options, $limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'FriendlyName' =>
+ $friendlyName,
+ 'Enabled' =>
+ Serialize::booleanToString($options['enabled']),
+ 'VideoLayout' =>
+ Serialize::jsonObject($options['videoLayout']),
+ 'AudioSources' =>
+ Serialize::map($options['audioSources'], function ($e) { return $e; }),
+ 'AudioSourcesExcluded' =>
+ Serialize::map($options['audioSourcesExcluded'], function ($e) { return $e; }),
+ 'Resolution' =>
+ $options['resolution'],
+ 'Format' =>
+ $options['format'],
+ 'StatusCallback' =>
+ $options['statusCallback'],
+ 'StatusCallbackMethod' =>
+ $options['statusCallbackMethod'],
+ 'Trim' =>
+ Serialize::booleanToString($options['trim']),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new CompositionHookInstance(
+ $this->version,
+ $payload
+ );
}
+
/**
* Reads CompositionHookInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -81,39 +106,72 @@ public function stream($options = array(), $limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return CompositionHookInstance[] Array of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
+ /**
+ * Streams CompositionHookInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of CompositionHookInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of CompositionHookInstance
+ * @return CompositionHookPage Page of CompositionHookInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): CompositionHookPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Enabled' => Serialize::booleanToString($options['enabled']),
- 'DateCreatedAfter' => Serialize::iso8601DateTime($options['dateCreatedAfter']),
- 'DateCreatedBefore' => Serialize::iso8601DateTime($options['dateCreatedBefore']),
- 'FriendlyName' => $options['friendlyName'],
+
+ $params = Values::of([
+ 'Enabled' =>
+ Serialize::booleanToString($options['enabled']),
+ 'DateCreatedAfter' =>
+ Serialize::iso8601DateTime($options['dateCreatedAfter']),
+ 'DateCreatedBefore' =>
+ Serialize::iso8601DateTime($options['dateCreatedBefore']),
+ 'FriendlyName' =>
+ $options['friendlyName'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new CompositionHookPage($this->version, $response, $this->solution);
}
@@ -123,9 +181,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of CompositionHookInstance
+ * @return CompositionHookPage Page of CompositionHookInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): CompositionHookPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -135,54 +193,21 @@ public function getPage($targetUrl)
return new CompositionHookPage($this->version, $response, $this->solution);
}
- /**
- * Create a new CompositionHookInstance
- *
- * @param string $friendlyName A unique string to describe the resource
- * @param array|Options $options Optional Arguments
- * @return CompositionHookInstance Newly created CompositionHookInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($friendlyName, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'FriendlyName' => $friendlyName,
- 'Enabled' => Serialize::booleanToString($options['enabled']),
- 'VideoLayout' => Serialize::jsonObject($options['videoLayout']),
- 'AudioSources' => Serialize::map($options['audioSources'], function ($e) {
- return $e;
- }),
- 'AudioSourcesExcluded' => Serialize::map($options['audioSourcesExcluded'], function ($e) {
- return $e;
- }),
- 'Resolution' => $options['resolution'],
- 'Format' => $options['format'],
- 'StatusCallback' => $options['statusCallback'],
- 'StatusCallbackMethod' => $options['statusCallbackMethod'],
- 'Trim' => Serialize::booleanToString($options['trim']),
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new CompositionHookInstance($this->version, $payload);
- }
/**
* Constructs a CompositionHookContext
*
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Video\V1\CompositionHookContext
+ * @param string $sid The SID of the CompositionHook resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): CompositionHookContext
{
- return new CompositionHookContext($this->version, $sid);
+ return new CompositionHookContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -190,8 +215,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Video.V1.CompositionHookList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionHookOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionHookOptions.php
index 72488d0..1950468 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionHookOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionHookOptions.php
@@ -1,10 +1,16 @@
options['enabled'] = $enabled;
- $this->options['dateCreatedAfter'] = $dateCreatedAfter;
- $this->options['dateCreatedBefore'] = $dateCreatedBefore;
- $this->options['friendlyName'] = $friendlyName;
+ $this->options['videoLayout'] = $videoLayout;
+ $this->options['audioSources'] = $audioSources;
+ $this->options['audioSourcesExcluded'] = $audioSourcesExcluded;
+ $this->options['resolution'] = $resolution;
+ $this->options['format'] = $format;
+ $this->options['statusCallback'] = $statusCallback;
+ $this->options['statusCallbackMethod'] = $statusCallbackMethod;
+ $this->options['trim'] = $trim;
}
/**
- * Read only CompositionHook resources with an `enabled` value that matches this parameter.
+ * Whether the composition hook is active. When `true`, the composition hook will be triggered for every completed Group Room in the account. When `false`, the composition hook will never be triggered.
*
- * @param bool $enabled Read only CompositionHook resources with an enabled
- * value that matches this parameter
+ * @param bool $enabled Whether the composition hook is active. When `true`, the composition hook will be triggered for every completed Group Room in the account. When `false`, the composition hook will never be triggered.
* @return $this Fluent Builder
*/
- public function setEnabled($enabled)
+ public function setEnabled(bool $enabled): self
{
$this->options['enabled'] = $enabled;
return $this;
}
/**
- * Read only CompositionHook resources created on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with time zone.
+ * An object that describes the video layout of the composition hook in terms of regions. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
*
- * @param \DateTime $dateCreatedAfter Read only CompositionHook resources
- * created on or after this ISO 8601
- * datetime with time zone
+ * @param array $videoLayout An object that describes the video layout of the composition hook in terms of regions. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
* @return $this Fluent Builder
*/
- public function setDateCreatedAfter($dateCreatedAfter)
+ public function setVideoLayout(array $videoLayout): self
{
- $this->options['dateCreatedAfter'] = $dateCreatedAfter;
+ $this->options['videoLayout'] = $videoLayout;
return $this;
}
/**
- * Read only CompositionHook resources created before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with time zone.
+ * An array of track names from the same group room to merge into the compositions created by the composition hook. Can include zero or more track names. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` includes tracks named `student` as well as `studentTeam`.
*
- * @param \DateTime $dateCreatedBefore Read only CompositionHook resources
- * created before this ISO 8601 datetime
- * with time zone
+ * @param string[] $audioSources An array of track names from the same group room to merge into the compositions created by the composition hook. Can include zero or more track names. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` includes tracks named `student` as well as `studentTeam`.
* @return $this Fluent Builder
*/
- public function setDateCreatedBefore($dateCreatedBefore)
+ public function setAudioSources(array $audioSources): self
{
- $this->options['dateCreatedBefore'] = $dateCreatedBefore;
+ $this->options['audioSources'] = $audioSources;
return $this;
}
/**
- * Read only CompositionHook resources with friendly names that match this string. The match is not case sensitive and can include asterisk `*` characters as wildcard match.
+ * An array of track names to exclude. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except for those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` excludes `student` as well as `studentTeam`. This parameter can also be empty.
*
- * @param string $friendlyName Read only CompositionHook resources with
- * friendly names that match this string
+ * @param string[] $audioSourcesExcluded An array of track names to exclude. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except for those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` excludes `student` as well as `studentTeam`. This parameter can also be empty.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setAudioSourcesExcluded(array $audioSourcesExcluded): self
{
- $this->options['friendlyName'] = $friendlyName;
+ $this->options['audioSourcesExcluded'] = $audioSourcesExcluded;
return $this;
}
/**
- * Provide a friendly representation
+ * A string that describes the columns (width) and rows (height) of the generated composed video in pixels. Defaults to `640x480`. The string's format is `{width}x{height}` where: * 16 <= `{width}` <= 1280 * 16 <= `{height}` <= 1280 * `{width}` * `{height}` <= 921,600 Typical values are: * HD = `1280x720` * PAL = `1024x576` * VGA = `640x480` * CIF = `320x240` Note that the `resolution` imposes an aspect ratio to the resulting composition. When the original video tracks are constrained by the aspect ratio, they are scaled to fit. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
*
- * @return string Machine friendly representation
+ * @param string $resolution A string that describes the columns (width) and rows (height) of the generated composed video in pixels. Defaults to `640x480`. The string's format is `{width}x{height}` where: * 16 <= `{width}` <= 1280 * 16 <= `{height}` <= 1280 * `{width}` * `{height}` <= 921,600 Typical values are: * HD = `1280x720` * PAL = `1024x576` * VGA = `640x480` * CIF = `320x240` Note that the `resolution` imposes an aspect ratio to the resulting composition. When the original video tracks are constrained by the aspect ratio, they are scaled to fit. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
+ * @return $this Fluent Builder
*/
- public function __toString()
+ public function setResolution(string $resolution): self
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Video.V1.ReadCompositionHookOptions ' . \implode(' ', $options) . ']';
+ $this->options['resolution'] = $resolution;
+ return $this;
}
-}
-class CreateCompositionHookOptions extends Options
-{
/**
- * @param bool $enabled Whether the composition hook is active
- * @param array $videoLayout An object that describes the video layout of the
- * composition hook
- * @param string $audioSources An array of track names from the same group room
- * to merge
- * @param string $audioSourcesExcluded An array of track names to exclude
- * @param string $resolution A string that describes the rows (width) and
- * columns (height) of the generated composed video
- * in pixels
- * @param string $format The container format of the media files used by the
- * compositions created by the composition hook
- * @param string $statusCallback The URL we should call to send status
- * information to your application
- * @param string $statusCallbackMethod The HTTP method we should use to call
- * status_callback
- * @param bool $trim Whether to clip the intervals where there is no active
- * media in the Compositions triggered by the composition hook
+ * @param string $format
+ * @return $this Fluent Builder
*/
- public function __construct($enabled = Values::NONE, $videoLayout = Values::NONE, $audioSources = Values::NONE, $audioSourcesExcluded = Values::NONE, $resolution = Values::NONE, $format = Values::NONE, $statusCallback = Values::NONE, $statusCallbackMethod = Values::NONE, $trim = Values::NONE)
+ public function setFormat(string $format): self
{
- $this->options['enabled'] = $enabled;
- $this->options['videoLayout'] = $videoLayout;
- $this->options['audioSources'] = $audioSources;
- $this->options['audioSourcesExcluded'] = $audioSourcesExcluded;
- $this->options['resolution'] = $resolution;
$this->options['format'] = $format;
- $this->options['statusCallback'] = $statusCallback;
- $this->options['statusCallbackMethod'] = $statusCallbackMethod;
- $this->options['trim'] = $trim;
+ return $this;
}
/**
- * Whether the composition hook is active. When `true`, the composition hook will be triggered for every completed Group Room in the account. When `false`, the composition hook will never be triggered.
+ * The URL we should call using the `status_callback_method` to send status information to your application on every composition event. If not provided, status callback events will not be dispatched.
*
- * @param bool $enabled Whether the composition hook is active
+ * @param string $statusCallback The URL we should call using the `status_callback_method` to send status information to your application on every composition event. If not provided, status callback events will not be dispatched.
* @return $this Fluent Builder
*/
- public function setEnabled($enabled)
+ public function setStatusCallback(string $statusCallback): self
{
- $this->options['enabled'] = $enabled;
+ $this->options['statusCallback'] = $statusCallback;
return $this;
}
/**
- * An object that describes the video layout of the composition hook in terms of regions. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
+ * The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`.
*
- * @param array $videoLayout An object that describes the video layout of the
- * composition hook
+ * @param string $statusCallbackMethod The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`.
* @return $this Fluent Builder
*/
- public function setVideoLayout($videoLayout)
+ public function setStatusCallbackMethod(string $statusCallbackMethod): self
{
- $this->options['videoLayout'] = $videoLayout;
+ $this->options['statusCallbackMethod'] = $statusCallbackMethod;
return $this;
}
/**
- * An array of track names from the same group room to merge into the compositions created by the composition hook. Can include zero or more track names. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` includes tracks named `student` as well as `studentTeam`.
+ * Whether to clip the intervals where there is no active media in the Compositions triggered by the composition hook. The default is `true`. Compositions with `trim` enabled are shorter when the Room is created and no Participant joins for a while as well as if all the Participants leave the room and join later, because those gaps will be removed. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
*
- * @param string $audioSources An array of track names from the same group room
- * to merge
+ * @param bool $trim Whether to clip the intervals where there is no active media in the Compositions triggered by the composition hook. The default is `true`. Compositions with `trim` enabled are shorter when the Room is created and no Participant joins for a while as well as if all the Participants leave the room and join later, because those gaps will be removed. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
* @return $this Fluent Builder
*/
- public function setAudioSources($audioSources)
+ public function setTrim(bool $trim): self
{
- $this->options['audioSources'] = $audioSources;
+ $this->options['trim'] = $trim;
return $this;
}
/**
- * An array of track names to exclude. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except for those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` excludes `student` as well as `studentTeam`. This parameter can also be empty.
+ * Provide a friendly representation
*
- * @param string $audioSourcesExcluded An array of track names to exclude
- * @return $this Fluent Builder
+ * @return string Machine friendly representation
*/
- public function setAudioSourcesExcluded($audioSourcesExcluded)
+ public function __toString(): string
{
- $this->options['audioSourcesExcluded'] = $audioSourcesExcluded;
- return $this;
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Video.V1.CreateCompositionHookOptions ' . $options . ']';
}
+}
+
+
+class ReadCompositionHookOptions extends Options
+ {
/**
- * A string that describes the columns (width) and rows (height) of the generated composed video in pixels. Defaults to `640x480`.
- * The string's format is `{width}x{height}` where:
- * 16 <= `{width}` <= 1280
- * 16 <= `{height}` <= 1280
- * `{width}` * `{height}` <= 921,600
- *
- * Typical values are:
- * HD = `1280x720`
- * PAL = `1024x576`
- * VGA = `640x480`
- * CIF = `320x240`
- *
- * Note that the `resolution` imposes an aspect ratio to the resulting composition. When the original video tracks are constrained by the aspect ratio, they are scaled to fit. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
- *
- * @param string $resolution A string that describes the rows (width) and
- * columns (height) of the generated composed video
- * in pixels
- * @return $this Fluent Builder
+ * @param bool $enabled Read only CompositionHook resources with an `enabled` value that matches this parameter.
+ * @param \DateTime $dateCreatedAfter Read only CompositionHook resources created on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with time zone.
+ * @param \DateTime $dateCreatedBefore Read only CompositionHook resources created before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with time zone.
+ * @param string $friendlyName Read only CompositionHook resources with friendly names that match this string. The match is not case sensitive and can include asterisk `*` characters as wildcard match.
*/
- public function setResolution($resolution)
- {
- $this->options['resolution'] = $resolution;
- return $this;
+ public function __construct(
+
+ bool $enabled = Values::BOOL_NONE,
+ \DateTime $dateCreatedAfter = null,
+ \DateTime $dateCreatedBefore = null,
+ string $friendlyName = Values::NONE
+
+ ) {
+ $this->options['enabled'] = $enabled;
+ $this->options['dateCreatedAfter'] = $dateCreatedAfter;
+ $this->options['dateCreatedBefore'] = $dateCreatedBefore;
+ $this->options['friendlyName'] = $friendlyName;
}
/**
- * The container format of the media files used by the compositions created by the composition hook. Can be: `mp4` or `webm` and the default is `webm`. If `mp4` or `webm`, `audio_sources` must have one or more tracks and/or a `video_layout` element must contain a valid `video_sources` list, otherwise an error occurs.
+ * Read only CompositionHook resources with an `enabled` value that matches this parameter.
*
- * @param string $format The container format of the media files used by the
- * compositions created by the composition hook
+ * @param bool $enabled Read only CompositionHook resources with an `enabled` value that matches this parameter.
* @return $this Fluent Builder
*/
- public function setFormat($format)
+ public function setEnabled(bool $enabled): self
{
- $this->options['format'] = $format;
+ $this->options['enabled'] = $enabled;
return $this;
}
/**
- * The URL we should call using the `status_callback_method` to send status information to your application on every composition event. If not provided, status callback events will not be dispatched.
+ * Read only CompositionHook resources created on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with time zone.
*
- * @param string $statusCallback The URL we should call to send status
- * information to your application
+ * @param \DateTime $dateCreatedAfter Read only CompositionHook resources created on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with time zone.
* @return $this Fluent Builder
*/
- public function setStatusCallback($statusCallback)
+ public function setDateCreatedAfter(\DateTime $dateCreatedAfter): self
{
- $this->options['statusCallback'] = $statusCallback;
+ $this->options['dateCreatedAfter'] = $dateCreatedAfter;
return $this;
}
/**
- * The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`.
+ * Read only CompositionHook resources created before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with time zone.
*
- * @param string $statusCallbackMethod The HTTP method we should use to call
- * status_callback
+ * @param \DateTime $dateCreatedBefore Read only CompositionHook resources created before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with time zone.
* @return $this Fluent Builder
*/
- public function setStatusCallbackMethod($statusCallbackMethod)
+ public function setDateCreatedBefore(\DateTime $dateCreatedBefore): self
{
- $this->options['statusCallbackMethod'] = $statusCallbackMethod;
+ $this->options['dateCreatedBefore'] = $dateCreatedBefore;
return $this;
}
/**
- * Whether to clip the intervals where there is no active media in the Compositions triggered by the composition hook. The default is `true`. Compositions with `trim` enabled are shorter when the Room is created and no Participant joins for a while as well as if all the Participants leave the room and join later, because those gaps will be removed. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
+ * Read only CompositionHook resources with friendly names that match this string. The match is not case sensitive and can include asterisk `*` characters as wildcard match.
*
- * @param bool $trim Whether to clip the intervals where there is no active
- * media in the Compositions triggered by the composition hook
+ * @param string $friendlyName Read only CompositionHook resources with friendly names that match this string. The match is not case sensitive and can include asterisk `*` characters as wildcard match.
* @return $this Fluent Builder
*/
- public function setTrim($trim)
+ public function setFriendlyName(string $friendlyName): self
{
- $this->options['trim'] = $trim;
+ $this->options['friendlyName'] = $friendlyName;
return $this;
}
@@ -346,41 +358,39 @@ public function setTrim($trim)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Video.V1.CreateCompositionHookOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Video.V1.ReadCompositionHookOptions ' . $options . ']';
}
}
class UpdateCompositionHookOptions extends Options
-{
+ {
/**
- * @param bool $enabled Whether the composition hook is active
- * @param array $videoLayout A JSON object that describes the video layout of
- * the composition hook
- * @param string $audioSources An array of track names from the same group room
- * to merge
- * @param string $audioSourcesExcluded An array of track names to exclude
- * @param bool $trim Whether to clip the intervals where there is no active
- * media in the Compositions triggered by the composition hook
- * @param string $format The container format of the media files used by the
- * compositions created by the composition hook
- * @param string $resolution A string that describes the columns (width) and
- * rows (height) of the generated composed video in
- * pixels
- * @param string $statusCallback The URL we should call to send status
- * information to your application
- * @param string $statusCallbackMethod The HTTP method we should use to call
- * status_callback
+ * @param bool $enabled Whether the composition hook is active. When `true`, the composition hook will be triggered for every completed Group Room in the account. When `false`, the composition hook never triggers.
+ * @param array $videoLayout A JSON object that describes the video layout of the composition hook in terms of regions. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
+ * @param string[] $audioSources An array of track names from the same group room to merge into the compositions created by the composition hook. Can include zero or more track names. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` includes tracks named `student` as well as `studentTeam`.
+ * @param string[] $audioSourcesExcluded An array of track names to exclude. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except for those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` excludes `student` as well as `studentTeam`. This parameter can also be empty.
+ * @param bool $trim Whether to clip the intervals where there is no active media in the compositions triggered by the composition hook. The default is `true`. Compositions with `trim` enabled are shorter when the Room is created and no Participant joins for a while as well as if all the Participants leave the room and join later, because those gaps will be removed. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
+ * @param string $format
+ * @param string $resolution A string that describes the columns (width) and rows (height) of the generated composed video in pixels. Defaults to `640x480`. The string's format is `{width}x{height}` where: * 16 <= `{width}` <= 1280 * 16 <= `{height}` <= 1280 * `{width}` * `{height}` <= 921,600 Typical values are: * HD = `1280x720` * PAL = `1024x576` * VGA = `640x480` * CIF = `320x240` Note that the `resolution` imposes an aspect ratio to the resulting composition. When the original video tracks are constrained by the aspect ratio, they are scaled to fit. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
+ * @param string $statusCallback The URL we should call using the `status_callback_method` to send status information to your application on every composition event. If not provided, status callback events will not be dispatched.
+ * @param string $statusCallbackMethod The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`.
*/
- public function __construct($enabled = Values::NONE, $videoLayout = Values::NONE, $audioSources = Values::NONE, $audioSourcesExcluded = Values::NONE, $trim = Values::NONE, $format = Values::NONE, $resolution = Values::NONE, $statusCallback = Values::NONE, $statusCallbackMethod = Values::NONE)
- {
+ public function __construct(
+
+ bool $enabled = Values::BOOL_NONE,
+ array $videoLayout = Values::ARRAY_NONE,
+ array $audioSources = Values::ARRAY_NONE,
+ array $audioSourcesExcluded = Values::ARRAY_NONE,
+ bool $trim = Values::BOOL_NONE,
+ string $format = Values::NONE,
+ string $resolution = Values::NONE,
+ string $statusCallback = Values::NONE,
+ string $statusCallbackMethod = Values::NONE
+
+ ) {
$this->options['enabled'] = $enabled;
$this->options['videoLayout'] = $videoLayout;
$this->options['audioSources'] = $audioSources;
@@ -395,10 +405,10 @@ public function __construct($enabled = Values::NONE, $videoLayout = Values::NONE
/**
* Whether the composition hook is active. When `true`, the composition hook will be triggered for every completed Group Room in the account. When `false`, the composition hook never triggers.
*
- * @param bool $enabled Whether the composition hook is active
+ * @param bool $enabled Whether the composition hook is active. When `true`, the composition hook will be triggered for every completed Group Room in the account. When `false`, the composition hook never triggers.
* @return $this Fluent Builder
*/
- public function setEnabled($enabled)
+ public function setEnabled(bool $enabled): self
{
$this->options['enabled'] = $enabled;
return $this;
@@ -407,11 +417,10 @@ public function setEnabled($enabled)
/**
* A JSON object that describes the video layout of the composition hook in terms of regions. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
*
- * @param array $videoLayout A JSON object that describes the video layout of
- * the composition hook
+ * @param array $videoLayout A JSON object that describes the video layout of the composition hook in terms of regions. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
* @return $this Fluent Builder
*/
- public function setVideoLayout($videoLayout)
+ public function setVideoLayout(array $videoLayout): self
{
$this->options['videoLayout'] = $videoLayout;
return $this;
@@ -420,11 +429,10 @@ public function setVideoLayout($videoLayout)
/**
* An array of track names from the same group room to merge into the compositions created by the composition hook. Can include zero or more track names. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` includes tracks named `student` as well as `studentTeam`.
*
- * @param string $audioSources An array of track names from the same group room
- * to merge
+ * @param string[] $audioSources An array of track names from the same group room to merge into the compositions created by the composition hook. Can include zero or more track names. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` includes tracks named `student` as well as `studentTeam`.
* @return $this Fluent Builder
*/
- public function setAudioSources($audioSources)
+ public function setAudioSources(array $audioSources): self
{
$this->options['audioSources'] = $audioSources;
return $this;
@@ -433,10 +441,10 @@ public function setAudioSources($audioSources)
/**
* An array of track names to exclude. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except for those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` excludes `student` as well as `studentTeam`. This parameter can also be empty.
*
- * @param string $audioSourcesExcluded An array of track names to exclude
+ * @param string[] $audioSourcesExcluded An array of track names to exclude. A composition triggered by the composition hook includes all audio sources specified in `audio_sources` except for those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which matches zero or more characters in a track name. For example, `student*` excludes `student` as well as `studentTeam`. This parameter can also be empty.
* @return $this Fluent Builder
*/
- public function setAudioSourcesExcluded($audioSourcesExcluded)
+ public function setAudioSourcesExcluded(array $audioSourcesExcluded): self
{
$this->options['audioSourcesExcluded'] = $audioSourcesExcluded;
return $this;
@@ -445,50 +453,32 @@ public function setAudioSourcesExcluded($audioSourcesExcluded)
/**
* Whether to clip the intervals where there is no active media in the compositions triggered by the composition hook. The default is `true`. Compositions with `trim` enabled are shorter when the Room is created and no Participant joins for a while as well as if all the Participants leave the room and join later, because those gaps will be removed. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
*
- * @param bool $trim Whether to clip the intervals where there is no active
- * media in the Compositions triggered by the composition hook
+ * @param bool $trim Whether to clip the intervals where there is no active media in the compositions triggered by the composition hook. The default is `true`. Compositions with `trim` enabled are shorter when the Room is created and no Participant joins for a while as well as if all the Participants leave the room and join later, because those gaps will be removed. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
* @return $this Fluent Builder
*/
- public function setTrim($trim)
+ public function setTrim(bool $trim): self
{
$this->options['trim'] = $trim;
return $this;
}
/**
- * The container format of the media files used by the compositions created by the composition hook. Can be: `mp4` or `webm` and the default is `webm`. If `mp4` or `webm`, `audio_sources` must have one or more tracks and/or a `video_layout` element must contain a valid `video_sources` list, otherwise an error occurs.
- *
- * @param string $format The container format of the media files used by the
- * compositions created by the composition hook
+ * @param string $format
* @return $this Fluent Builder
*/
- public function setFormat($format)
+ public function setFormat(string $format): self
{
$this->options['format'] = $format;
return $this;
}
/**
- * A string that describes the columns (width) and rows (height) of the generated composed video in pixels. Defaults to `640x480`.
- * The string's format is `{width}x{height}` where:
- * 16 <= `{width}` <= 1280
- * 16 <= `{height}` <= 1280
- * `{width}` * `{height}` <= 921,600
- *
- * Typical values are:
- * HD = `1280x720`
- * PAL = `1024x576`
- * VGA = `640x480`
- * CIF = `320x240`
+ * A string that describes the columns (width) and rows (height) of the generated composed video in pixels. Defaults to `640x480`. The string's format is `{width}x{height}` where: * 16 <= `{width}` <= 1280 * 16 <= `{height}` <= 1280 * `{width}` * `{height}` <= 921,600 Typical values are: * HD = `1280x720` * PAL = `1024x576` * VGA = `640x480` * CIF = `320x240` Note that the `resolution` imposes an aspect ratio to the resulting composition. When the original video tracks are constrained by the aspect ratio, they are scaled to fit. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
*
- * Note that the `resolution` imposes an aspect ratio to the resulting composition. When the original video tracks are constrained by the aspect ratio, they are scaled to fit. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
- *
- * @param string $resolution A string that describes the columns (width) and
- * rows (height) of the generated composed video in
- * pixels
+ * @param string $resolution A string that describes the columns (width) and rows (height) of the generated composed video in pixels. Defaults to `640x480`. The string's format is `{width}x{height}` where: * 16 <= `{width}` <= 1280 * 16 <= `{height}` <= 1280 * `{width}` * `{height}` <= 921,600 Typical values are: * HD = `1280x720` * PAL = `1024x576` * VGA = `640x480` * CIF = `320x240` Note that the `resolution` imposes an aspect ratio to the resulting composition. When the original video tracks are constrained by the aspect ratio, they are scaled to fit. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
* @return $this Fluent Builder
*/
- public function setResolution($resolution)
+ public function setResolution(string $resolution): self
{
$this->options['resolution'] = $resolution;
return $this;
@@ -497,11 +487,10 @@ public function setResolution($resolution)
/**
* The URL we should call using the `status_callback_method` to send status information to your application on every composition event. If not provided, status callback events will not be dispatched.
*
- * @param string $statusCallback The URL we should call to send status
- * information to your application
+ * @param string $statusCallback The URL we should call using the `status_callback_method` to send status information to your application on every composition event. If not provided, status callback events will not be dispatched.
* @return $this Fluent Builder
*/
- public function setStatusCallback($statusCallback)
+ public function setStatusCallback(string $statusCallback): self
{
$this->options['statusCallback'] = $statusCallback;
return $this;
@@ -510,11 +499,10 @@ public function setStatusCallback($statusCallback)
/**
* The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`.
*
- * @param string $statusCallbackMethod The HTTP method we should use to call
- * status_callback
+ * @param string $statusCallbackMethod The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`.
* @return $this Fluent Builder
*/
- public function setStatusCallbackMethod($statusCallbackMethod)
+ public function setStatusCallbackMethod(string $statusCallbackMethod): self
{
$this->options['statusCallbackMethod'] = $statusCallbackMethod;
return $this;
@@ -525,14 +513,10 @@ public function setStatusCallbackMethod($statusCallbackMethod)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Video.V1.UpdateCompositionHookOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Video.V1.UpdateCompositionHookOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionHookPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionHookPage.php
index 8b03deb..dc91bfe 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionHookPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionHookPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return CompositionHookInstance \Twilio\Rest\Video\V1\CompositionHookInstance
+ */
+ public function buildInstance(array $payload): CompositionHookInstance
{
return new CompositionHookInstance($this->version, $payload);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Video.V1.CompositionHookPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionInstance.php
index 0d185e0..515b412 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionInstance.php
@@ -2,57 +2,66 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Video
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Video\V1;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property string $accountSid
+ * @property string|null $accountSid
* @property string $status
- * @property \DateTime $dateCreated
- * @property \DateTime $dateCompleted
- * @property \DateTime $dateDeleted
- * @property string $sid
- * @property string $roomSid
- * @property string $audioSources
- * @property string $audioSourcesExcluded
- * @property array $videoLayout
- * @property string $resolution
- * @property bool $trim
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateCompleted
+ * @property \DateTime|null $dateDeleted
+ * @property string|null $sid
+ * @property string|null $roomSid
+ * @property string[]|null $audioSources
+ * @property string[]|null $audioSourcesExcluded
+ * @property array|null $videoLayout
+ * @property string|null $resolution
+ * @property bool|null $trim
* @property string $format
* @property int $bitrate
- * @property string $size
+ * @property int|null $size
* @property int $duration
- * @property string $url
- * @property array $links
+ * @property string|null $mediaExternalLocation
+ * @property string|null $statusCallback
+ * @property string|null $statusCallbackMethod
+ * @property string|null $url
+ * @property array|null $links
*/
class CompositionInstance extends InstanceResource
{
/**
* Initialize the CompositionInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Video\V1\CompositionInstance
+ * @param string $sid The SID of the Composition resource to delete.
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'status' => Values::array_get($payload, 'status'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
@@ -69,49 +78,56 @@ public function __construct(Version $version, array $payload, $sid = null)
'bitrate' => Values::array_get($payload, 'bitrate'),
'size' => Values::array_get($payload, 'size'),
'duration' => Values::array_get($payload, 'duration'),
+ 'mediaExternalLocation' => Values::array_get($payload, 'media_external_location'),
+ 'statusCallback' => Values::array_get($payload, 'status_callback'),
+ 'statusCallbackMethod' => Values::array_get($payload, 'status_callback_method'),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Video\V1\CompositionContext Context for this
- * CompositionInstance
+ * @return CompositionContext Context for this CompositionInstance
*/
- protected function proxy()
+ protected function proxy(): CompositionContext
{
if (!$this->context) {
- $this->context = new CompositionContext($this->version, $this->solution['sid']);
+ $this->context = new CompositionContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a CompositionInstance
+ * Delete the CompositionInstance
*
- * @return CompositionInstance Fetched CompositionInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the CompositionInstance
+ * Fetch the CompositionInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return CompositionInstance Fetched CompositionInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): CompositionInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -121,7 +137,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -140,12 +156,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Video.V1.CompositionInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionList.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionList.php
index c214687..fb20f1e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Video
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Video\V1;
@@ -12,59 +19,75 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
class CompositionList extends ListResource
-{
+ {
/**
* Construct the CompositionList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Video\V1\CompositionList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/Compositions';
}
/**
- * Streams CompositionInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the CompositionInstance
*
+ * @param string $roomSid The SID of the Group Room with the media tracks to be used as composition sources.
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return CompositionInstance Created CompositionInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function create(string $roomSid, array $options = []): CompositionInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($options, $limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'RoomSid' =>
+ $roomSid,
+ 'VideoLayout' =>
+ Serialize::jsonObject($options['videoLayout']),
+ 'AudioSources' =>
+ Serialize::map($options['audioSources'], function ($e) { return $e; }),
+ 'AudioSourcesExcluded' =>
+ Serialize::map($options['audioSourcesExcluded'], function ($e) { return $e; }),
+ 'Resolution' =>
+ $options['resolution'],
+ 'Format' =>
+ $options['format'],
+ 'StatusCallback' =>
+ $options['statusCallback'],
+ 'StatusCallbackMethod' =>
+ $options['statusCallbackMethod'],
+ 'Trim' =>
+ Serialize::booleanToString($options['trim']),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new CompositionInstance(
+ $this->version,
+ $payload
+ );
}
+
/**
* Reads CompositionInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -81,39 +104,72 @@ public function stream($options = array(), $limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return CompositionInstance[] Array of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
+ /**
+ * Streams CompositionInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of CompositionInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of CompositionInstance
+ * @return CompositionPage Page of CompositionInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): CompositionPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Status' => $options['status'],
- 'DateCreatedAfter' => Serialize::iso8601DateTime($options['dateCreatedAfter']),
- 'DateCreatedBefore' => Serialize::iso8601DateTime($options['dateCreatedBefore']),
- 'RoomSid' => $options['roomSid'],
+
+ $params = Values::of([
+ 'Status' =>
+ $options['status'],
+ 'DateCreatedAfter' =>
+ Serialize::iso8601DateTime($options['dateCreatedAfter']),
+ 'DateCreatedBefore' =>
+ Serialize::iso8601DateTime($options['dateCreatedBefore']),
+ 'RoomSid' =>
+ $options['roomSid'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new CompositionPage($this->version, $response, $this->solution);
}
@@ -123,9 +179,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of CompositionInstance
+ * @return CompositionPage Page of CompositionInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): CompositionPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -135,54 +191,21 @@ public function getPage($targetUrl)
return new CompositionPage($this->version, $response, $this->solution);
}
- /**
- * Create a new CompositionInstance
- *
- * @param string $roomSid The SID of the Group Room with the media tracks to be
- * used as composition sources
- * @param array|Options $options Optional Arguments
- * @return CompositionInstance Newly created CompositionInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($roomSid, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'RoomSid' => $roomSid,
- 'VideoLayout' => Serialize::jsonObject($options['videoLayout']),
- 'AudioSources' => Serialize::map($options['audioSources'], function ($e) {
- return $e;
- }),
- 'AudioSourcesExcluded' => Serialize::map($options['audioSourcesExcluded'], function ($e) {
- return $e;
- }),
- 'Resolution' => $options['resolution'],
- 'Format' => $options['format'],
- 'StatusCallback' => $options['statusCallback'],
- 'StatusCallbackMethod' => $options['statusCallbackMethod'],
- 'Trim' => Serialize::booleanToString($options['trim']),
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new CompositionInstance($this->version, $payload);
- }
/**
* Constructs a CompositionContext
*
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Video\V1\CompositionContext
+ * @param string $sid The SID of the Composition resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): CompositionContext
{
- return new CompositionContext($this->version, $sid);
+ return new CompositionContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -190,8 +213,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Video.V1.CompositionList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionOptions.php
index f848312..27a5f92 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionOptions.php
@@ -1,10 +1,16 @@
options['status'] = $status;
- $this->options['dateCreatedAfter'] = $dateCreatedAfter;
- $this->options['dateCreatedBefore'] = $dateCreatedBefore;
- $this->options['roomSid'] = $roomSid;
+ public function __construct(
+
+ array $videoLayout = Values::ARRAY_NONE,
+ array $audioSources = Values::ARRAY_NONE,
+ array $audioSourcesExcluded = Values::ARRAY_NONE,
+ string $resolution = Values::NONE,
+ string $format = Values::NONE,
+ string $statusCallback = Values::NONE,
+ string $statusCallbackMethod = Values::NONE,
+ bool $trim = Values::BOOL_NONE
+
+ ) {
+ $this->options['videoLayout'] = $videoLayout;
+ $this->options['audioSources'] = $audioSources;
+ $this->options['audioSourcesExcluded'] = $audioSourcesExcluded;
+ $this->options['resolution'] = $resolution;
+ $this->options['format'] = $format;
+ $this->options['statusCallback'] = $statusCallback;
+ $this->options['statusCallbackMethod'] = $statusCallbackMethod;
+ $this->options['trim'] = $trim;
}
/**
- * Read only Composition resources with this status. Can be: `enqueued`, `processing`, `completed`, `deleted`, or `failed`.
+ * An object that describes the video layout of the composition in terms of regions. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. Please, be aware that either video_layout or audio_sources have to be provided to get a valid creation request
*
- * @param string $status Read only Composition resources with this status
+ * @param array $videoLayout An object that describes the video layout of the composition in terms of regions. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. Please, be aware that either video_layout or audio_sources have to be provided to get a valid creation request
* @return $this Fluent Builder
*/
- public function setStatus($status)
+ public function setVideoLayout(array $videoLayout): self
{
- $this->options['status'] = $status;
+ $this->options['videoLayout'] = $videoLayout;
return $this;
}
/**
- * Read only Composition resources created on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time with time zone.
+ * An array of track names from the same group room to merge into the new composition. Can include zero or more track names. The new composition includes all audio sources specified in `audio_sources` except for those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which will match zero or more characters in a track name. For example, `student*` includes `student` as well as `studentTeam`. Please, be aware that either video_layout or audio_sources have to be provided to get a valid creation request
*
- * @param \DateTime $dateCreatedAfter Read only Composition resources created
- * on or after this [ISO
- * 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time with time zone
+ * @param string[] $audioSources An array of track names from the same group room to merge into the new composition. Can include zero or more track names. The new composition includes all audio sources specified in `audio_sources` except for those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which will match zero or more characters in a track name. For example, `student*` includes `student` as well as `studentTeam`. Please, be aware that either video_layout or audio_sources have to be provided to get a valid creation request
* @return $this Fluent Builder
*/
- public function setDateCreatedAfter($dateCreatedAfter)
+ public function setAudioSources(array $audioSources): self
{
- $this->options['dateCreatedAfter'] = $dateCreatedAfter;
+ $this->options['audioSources'] = $audioSources;
return $this;
}
/**
- * Read only Composition resources created before this ISO 8601 date-time with time zone.
+ * An array of track names to exclude. The new composition includes all audio sources specified in `audio_sources` except for those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which will match zero or more characters in a track name. For example, `student*` excludes `student` as well as `studentTeam`. This parameter can also be empty.
*
- * @param \DateTime $dateCreatedBefore Read only Composition resources created
- * before this ISO 8601 date-time with time
- * zone
+ * @param string[] $audioSourcesExcluded An array of track names to exclude. The new composition includes all audio sources specified in `audio_sources` except for those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which will match zero or more characters in a track name. For example, `student*` excludes `student` as well as `studentTeam`. This parameter can also be empty.
* @return $this Fluent Builder
*/
- public function setDateCreatedBefore($dateCreatedBefore)
+ public function setAudioSourcesExcluded(array $audioSourcesExcluded): self
{
- $this->options['dateCreatedBefore'] = $dateCreatedBefore;
+ $this->options['audioSourcesExcluded'] = $audioSourcesExcluded;
return $this;
}
/**
- * Read only Composition resources with this Room SID.
+ * A string that describes the columns (width) and rows (height) of the generated composed video in pixels. Defaults to `640x480`. The string's format is `{width}x{height}` where: * 16 <= `{width}` <= 1280 * 16 <= `{height}` <= 1280 * `{width}` * `{height}` <= 921,600 Typical values are: * HD = `1280x720` * PAL = `1024x576` * VGA = `640x480` * CIF = `320x240` Note that the `resolution` imposes an aspect ratio to the resulting composition. When the original video tracks are constrained by the aspect ratio, they are scaled to fit. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
*
- * @param string $roomSid Read only Composition resources with this Room SID
+ * @param string $resolution A string that describes the columns (width) and rows (height) of the generated composed video in pixels. Defaults to `640x480`. The string's format is `{width}x{height}` where: * 16 <= `{width}` <= 1280 * 16 <= `{height}` <= 1280 * `{width}` * `{height}` <= 921,600 Typical values are: * HD = `1280x720` * PAL = `1024x576` * VGA = `640x480` * CIF = `320x240` Note that the `resolution` imposes an aspect ratio to the resulting composition. When the original video tracks are constrained by the aspect ratio, they are scaled to fit. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
* @return $this Fluent Builder
*/
- public function setRoomSid($roomSid)
+ public function setResolution(string $resolution): self
{
- $this->options['roomSid'] = $roomSid;
+ $this->options['resolution'] = $resolution;
return $this;
}
/**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
+ * @param string $format
+ * @return $this Fluent Builder
*/
- public function __toString()
+ public function setFormat(string $format): self
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Video.V1.ReadCompositionOptions ' . \implode(' ', $options) . ']';
+ $this->options['format'] = $format;
+ return $this;
}
-}
-class CreateCompositionOptions extends Options
-{
/**
- * @param array $videoLayout An object that describes the video layout of the
- * composition
- * @param string $audioSources An array of track names from the same group room
- * to merge
- * @param string $audioSourcesExcluded An array of track names to exclude
- * @param string $resolution A string that describes the columns (width) and
- * rows (height) of the generated composed video in
- * pixels
- * @param string $format The container format of the composition's media files
- * @param string $statusCallback The URL we should call to send status
- * information to your application
- * @param string $statusCallbackMethod The HTTP method we should use to call
- * status_callback
- * @param bool $trim Whether to clip the intervals where there is no active
- * media in the composition
+ * The URL we should call using the `status_callback_method` to send status information to your application on every composition event. If not provided, status callback events will not be dispatched.
+ *
+ * @param string $statusCallback The URL we should call using the `status_callback_method` to send status information to your application on every composition event. If not provided, status callback events will not be dispatched.
+ * @return $this Fluent Builder
*/
- public function __construct($videoLayout = Values::NONE, $audioSources = Values::NONE, $audioSourcesExcluded = Values::NONE, $resolution = Values::NONE, $format = Values::NONE, $statusCallback = Values::NONE, $statusCallbackMethod = Values::NONE, $trim = Values::NONE)
+ public function setStatusCallback(string $statusCallback): self
{
- $this->options['videoLayout'] = $videoLayout;
- $this->options['audioSources'] = $audioSources;
- $this->options['audioSourcesExcluded'] = $audioSourcesExcluded;
- $this->options['resolution'] = $resolution;
- $this->options['format'] = $format;
$this->options['statusCallback'] = $statusCallback;
- $this->options['statusCallbackMethod'] = $statusCallbackMethod;
- $this->options['trim'] = $trim;
+ return $this;
}
/**
- * An object that describes the video layout of the composition in terms of regions. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info. Please, be aware that either video_layout or audio_sources have to be provided to get a valid creation request
+ * The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`.
*
- * @param array $videoLayout An object that describes the video layout of the
- * composition
+ * @param string $statusCallbackMethod The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`.
* @return $this Fluent Builder
*/
- public function setVideoLayout($videoLayout)
+ public function setStatusCallbackMethod(string $statusCallbackMethod): self
{
- $this->options['videoLayout'] = $videoLayout;
+ $this->options['statusCallbackMethod'] = $statusCallbackMethod;
return $this;
}
/**
- * An array of track names from the same group room to merge into the new composition. Can include zero or more track names. The new composition includes all audio sources specified in `audio_sources` except for those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which will match zero or more characters in a track name. For example, `student*` includes `student` as well as `studentTeam`. Please, be aware that either video_layout or audio_sources have to be provided to get a valid creation request
+ * Whether to clip the intervals where there is no active media in the composition. The default is `true`. Compositions with `trim` enabled are shorter when the Room is created and no Participant joins for a while as well as if all the Participants leave the room and join later, because those gaps will be removed. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
*
- * @param string $audioSources An array of track names from the same group room
- * to merge
+ * @param bool $trim Whether to clip the intervals where there is no active media in the composition. The default is `true`. Compositions with `trim` enabled are shorter when the Room is created and no Participant joins for a while as well as if all the Participants leave the room and join later, because those gaps will be removed. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
* @return $this Fluent Builder
*/
- public function setAudioSources($audioSources)
+ public function setTrim(bool $trim): self
{
- $this->options['audioSources'] = $audioSources;
+ $this->options['trim'] = $trim;
return $this;
}
/**
- * An array of track names to exclude. The new composition includes all audio sources specified in `audio_sources` except for those specified in `audio_sources_excluded`. The track names in this parameter can include an asterisk as a wild card character, which will match zero or more characters in a track name. For example, `student*` excludes `student` as well as `studentTeam`. This parameter can also be empty.
+ * Provide a friendly representation
*
- * @param string $audioSourcesExcluded An array of track names to exclude
- * @return $this Fluent Builder
+ * @return string Machine friendly representation
*/
- public function setAudioSourcesExcluded($audioSourcesExcluded)
+ public function __toString(): string
{
- $this->options['audioSourcesExcluded'] = $audioSourcesExcluded;
- return $this;
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Video.V1.CreateCompositionOptions ' . $options . ']';
}
+}
+
+
+class ReadCompositionOptions extends Options
+ {
/**
- * A string that describes the columns (width) and rows (height) of the generated composed video in pixels. Defaults to `640x480`.
- * The string's format is `{width}x{height}` where:
- * 16 <= `{width}` <= 1280
- * 16 <= `{height}` <= 1280
- * `{width}` * `{height}` <= 921,600
- *
- * Typical values are:
- * HD = `1280x720`
- * PAL = `1024x576`
- * VGA = `640x480`
- * CIF = `320x240`
- *
- * Note that the `resolution` imposes an aspect ratio to the resulting composition. When the original video tracks are constrained by the aspect ratio, they are scaled to fit. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
- *
- * @param string $resolution A string that describes the columns (width) and
- * rows (height) of the generated composed video in
- * pixels
- * @return $this Fluent Builder
+ * @param string $status Read only Composition resources with this status. Can be: `enqueued`, `processing`, `completed`, `deleted`, or `failed`.
+ * @param \DateTime $dateCreatedAfter Read only Composition resources created on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time with time zone.
+ * @param \DateTime $dateCreatedBefore Read only Composition resources created before this ISO 8601 date-time with time zone.
+ * @param string $roomSid Read only Composition resources with this Room SID.
*/
- public function setResolution($resolution)
- {
- $this->options['resolution'] = $resolution;
- return $this;
+ public function __construct(
+
+ string $status = Values::NONE,
+ \DateTime $dateCreatedAfter = null,
+ \DateTime $dateCreatedBefore = null,
+ string $roomSid = Values::NONE
+
+ ) {
+ $this->options['status'] = $status;
+ $this->options['dateCreatedAfter'] = $dateCreatedAfter;
+ $this->options['dateCreatedBefore'] = $dateCreatedBefore;
+ $this->options['roomSid'] = $roomSid;
}
/**
- * The container format of the composition's media files. Can be: `mp4` or `webm` and the default is `webm`. If you specify `mp4` or `webm`, you must also specify one or more `audio_sources` and/or a `video_layout` element that contains a valid `video_sources` list, otherwise an error occurs.
+ * Read only Composition resources with this status. Can be: `enqueued`, `processing`, `completed`, `deleted`, or `failed`.
*
- * @param string $format The container format of the composition's media files
+ * @param string $status Read only Composition resources with this status. Can be: `enqueued`, `processing`, `completed`, `deleted`, or `failed`.
* @return $this Fluent Builder
*/
- public function setFormat($format)
+ public function setStatus(string $status): self
{
- $this->options['format'] = $format;
+ $this->options['status'] = $status;
return $this;
}
/**
- * The URL we should call using the `status_callback_method` to send status information to your application on every composition event. If not provided, status callback events will not be dispatched.
+ * Read only Composition resources created on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time with time zone.
*
- * @param string $statusCallback The URL we should call to send status
- * information to your application
+ * @param \DateTime $dateCreatedAfter Read only Composition resources created on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time with time zone.
* @return $this Fluent Builder
*/
- public function setStatusCallback($statusCallback)
+ public function setDateCreatedAfter(\DateTime $dateCreatedAfter): self
{
- $this->options['statusCallback'] = $statusCallback;
+ $this->options['dateCreatedAfter'] = $dateCreatedAfter;
return $this;
}
/**
- * The HTTP method we should use to call `status_callback`. Can be: `POST` or `GET` and the default is `POST`.
+ * Read only Composition resources created before this ISO 8601 date-time with time zone.
*
- * @param string $statusCallbackMethod The HTTP method we should use to call
- * status_callback
+ * @param \DateTime $dateCreatedBefore Read only Composition resources created before this ISO 8601 date-time with time zone.
* @return $this Fluent Builder
*/
- public function setStatusCallbackMethod($statusCallbackMethod)
+ public function setDateCreatedBefore(\DateTime $dateCreatedBefore): self
{
- $this->options['statusCallbackMethod'] = $statusCallbackMethod;
+ $this->options['dateCreatedBefore'] = $dateCreatedBefore;
return $this;
}
/**
- * Whether to clip the intervals where there is no active media in the composition. The default is `true`. Compositions with `trim` enabled are shorter when the Room is created and no Participant joins for a while as well as if all the Participants leave the room and join later, because those gaps will be removed. See [Specifying Video Layouts](https://www.twilio.com/docs/video/api/compositions-resource#specifying-video-layouts) for more info.
+ * Read only Composition resources with this Room SID.
*
- * @param bool $trim Whether to clip the intervals where there is no active
- * media in the composition
+ * @param string $roomSid Read only Composition resources with this Room SID.
* @return $this Fluent Builder
*/
- public function setTrim($trim)
+ public function setRoomSid(string $roomSid): self
{
- $this->options['trim'] = $trim;
+ $this->options['roomSid'] = $roomSid;
return $this;
}
@@ -297,14 +301,10 @@ public function setTrim($trim)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Video.V1.CreateCompositionOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Video.V1.ReadCompositionOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionPage.php
index de39c72..017ca8e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return CompositionInstance \Twilio\Rest\Video\V1\CompositionInstance
+ */
+ public function buildInstance(array $payload): CompositionInstance
{
return new CompositionInstance($this->version, $payload);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Video.V1.CompositionPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionSettingsContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionSettingsContext.php
index 727ef8a..5f5a5e6 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionSettingsContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionSettingsContext.php
@@ -2,103 +2,116 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Video
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Video\V1;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
class CompositionSettingsContext extends InstanceContext
-{
+ {
/**
* Initialize the CompositionSettingsContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @return \Twilio\Rest\Video\V1\CompositionSettingsContext
+ * @param Version $version Version that contains the resource
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/CompositionSettings/Default';
}
/**
- * Fetch a CompositionSettingsInstance
+ * Create the CompositionSettingsInstance
*
- * @return CompositionSettingsInstance Fetched CompositionSettingsInstance
+ * @param string $friendlyName A descriptive string that you create to describe the resource and show to the user in the console
+ * @param array|Options $options Optional Arguments
+ * @return CompositionSettingsInstance Created CompositionSettingsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function create(string $friendlyName, array $options = []): CompositionSettingsInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $options = new Values($options);
+
+ $data = Values::of([
+ 'FriendlyName' =>
+ $friendlyName,
+ 'AwsCredentialsSid' =>
+ $options['awsCredentialsSid'],
+ 'EncryptionKeySid' =>
+ $options['encryptionKeySid'],
+ 'AwsS3Url' =>
+ $options['awsS3Url'],
+ 'AwsStorageEnabled' =>
+ Serialize::booleanToString($options['awsStorageEnabled']),
+ 'EncryptionEnabled' =>
+ Serialize::booleanToString($options['encryptionEnabled']),
+ ]);
- return new CompositionSettingsInstance($this->version, $payload);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new CompositionSettingsInstance(
+ $this->version,
+ $payload
+ );
}
+
/**
- * Create a new CompositionSettingsInstance
+ * Fetch the CompositionSettingsInstance
*
- * @param string $friendlyName A descriptive string that you create to describe
- * the resource
- * @param array|Options $options Optional Arguments
- * @return CompositionSettingsInstance Newly created CompositionSettingsInstance
+ * @return CompositionSettingsInstance Fetched CompositionSettingsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($friendlyName, $options = array())
+ public function fetch(): CompositionSettingsInstance
{
- $options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $friendlyName,
- 'AwsCredentialsSid' => $options['awsCredentialsSid'],
- 'EncryptionKeySid' => $options['encryptionKeySid'],
- 'AwsS3Url' => $options['awsS3Url'],
- 'AwsStorageEnabled' => Serialize::booleanToString($options['awsStorageEnabled']),
- 'EncryptionEnabled' => Serialize::booleanToString($options['encryptionEnabled']),
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
- return new CompositionSettingsInstance($this->version, $payload);
+ return new CompositionSettingsInstance(
+ $this->version,
+ $payload
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Video.V1.CompositionSettingsContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionSettingsInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionSettingsInstance.php
index 60fd682..fdd7a9c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionSettingsInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionSettingsInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Video
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Video\V1;
use Twilio\Exceptions\TwilioException;
@@ -15,33 +23,31 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property string $accountSid
- * @property string $friendlyName
- * @property string $awsCredentialsSid
- * @property string $awsS3Url
- * @property bool $awsStorageEnabled
- * @property string $encryptionKeySid
- * @property bool $encryptionEnabled
- * @property string $url
+ * @property string|null $accountSid
+ * @property string|null $friendlyName
+ * @property string|null $awsCredentialsSid
+ * @property string|null $awsS3Url
+ * @property bool|null $awsStorageEnabled
+ * @property string|null $encryptionKeySid
+ * @property bool|null $encryptionEnabled
+ * @property string|null $url
*/
class CompositionSettingsInstance extends InstanceResource
{
/**
* Initialize the CompositionSettingsInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @return \Twilio\Rest\Video\V1\CompositionSettingsInstance
*/
public function __construct(Version $version, array $payload)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
'awsCredentialsSid' => Values::array_get($payload, 'aws_credentials_sid'),
@@ -50,50 +56,52 @@ public function __construct(Version $version, array $payload)
'encryptionKeySid' => Values::array_get($payload, 'encryption_key_sid'),
'encryptionEnabled' => Values::array_get($payload, 'encryption_enabled'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array();
+ $this->solution = [];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Video\V1\CompositionSettingsContext Context for this
- * CompositionSettingsInstance
+ * @return CompositionSettingsContext Context for this CompositionSettingsInstance
*/
- protected function proxy()
+ protected function proxy(): CompositionSettingsContext
{
if (!$this->context) {
- $this->context = new CompositionSettingsContext($this->version);
+ $this->context = new CompositionSettingsContext(
+ $this->version
+ );
}
return $this->context;
}
/**
- * Fetch a CompositionSettingsInstance
+ * Create the CompositionSettingsInstance
*
- * @return CompositionSettingsInstance Fetched CompositionSettingsInstance
+ * @param string $friendlyName A descriptive string that you create to describe the resource and show to the user in the console
+ * @param array|Options $options Optional Arguments
+ * @return CompositionSettingsInstance Created CompositionSettingsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function create(string $friendlyName, array $options = []): CompositionSettingsInstance
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->create($friendlyName, $options);
}
/**
- * Create a new CompositionSettingsInstance
+ * Fetch the CompositionSettingsInstance
*
- * @param string $friendlyName A descriptive string that you create to describe
- * the resource
- * @param array|Options $options Optional Arguments
- * @return CompositionSettingsInstance Newly created CompositionSettingsInstance
+ * @return CompositionSettingsInstance Fetched CompositionSettingsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($friendlyName, $options = array())
+ public function fetch(): CompositionSettingsInstance
{
- return $this->proxy()->create($friendlyName, $options);
+
+ return $this->proxy()->fetch();
}
/**
@@ -103,7 +111,7 @@ public function create($friendlyName, $options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -122,12 +130,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Video.V1.CompositionSettingsInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionSettingsList.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionSettingsList.php
index e64e007..2798b4e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionSettingsList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionSettingsList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Video
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Video\V1;
@@ -12,33 +19,34 @@
use Twilio\ListResource;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
+
class CompositionSettingsList extends ListResource
-{
+ {
/**
* Construct the CompositionSettingsList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Video\V1\CompositionSettingsList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
}
/**
* Constructs a CompositionSettingsContext
- *
- * @return \Twilio\Rest\Video\V1\CompositionSettingsContext
*/
- public function getContext()
+ public function getContext(
+
+ ): CompositionSettingsContext
{
- return new CompositionSettingsContext($this->version);
+ return new CompositionSettingsContext(
+ $this->version
+ );
}
/**
@@ -46,8 +54,8 @@ public function getContext()
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Video.V1.CompositionSettingsList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionSettingsOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionSettingsOptions.php
index 66c3066..3fa7115 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionSettingsOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionSettingsOptions.php
@@ -1,10 +1,16 @@
options['awsCredentialsSid'] = $awsCredentialsSid;
$this->options['encryptionKeySid'] = $encryptionKeySid;
$this->options['awsS3Url'] = $awsS3Url;
@@ -60,10 +78,10 @@ public function __construct($awsCredentialsSid = Values::NONE, $encryptionKeySid
/**
* The SID of the stored Credential resource.
*
- * @param string $awsCredentialsSid The SID of the stored Credential resource
+ * @param string $awsCredentialsSid The SID of the stored Credential resource.
* @return $this Fluent Builder
*/
- public function setAwsCredentialsSid($awsCredentialsSid)
+ public function setAwsCredentialsSid(string $awsCredentialsSid): self
{
$this->options['awsCredentialsSid'] = $awsCredentialsSid;
return $this;
@@ -72,24 +90,22 @@ public function setAwsCredentialsSid($awsCredentialsSid)
/**
* The SID of the Public Key resource to use for encryption.
*
- * @param string $encryptionKeySid The SID of the Public Key resource to use
- * for encryption
+ * @param string $encryptionKeySid The SID of the Public Key resource to use for encryption.
* @return $this Fluent Builder
*/
- public function setEncryptionKeySid($encryptionKeySid)
+ public function setEncryptionKeySid(string $encryptionKeySid): self
{
$this->options['encryptionKeySid'] = $encryptionKeySid;
return $this;
}
/**
- * The URL of the AWS S3 bucket where the compositions should be stored. We only support DNS-compliant URLs like `http://.s3-.amazonaws.com/compositions`, where `compositions` is the path in which you want the compositions to be stored.
+ * The URL of the AWS S3 bucket where the compositions should be stored. We only support DNS-compliant URLs like `https://documentation-example-twilio-bucket/compositions`, where `compositions` is the path in which you want the compositions to be stored. This URL accepts only URI-valid characters, as described in the [RFC 3986](https://tools.ietf.org/html/rfc3986#section-2).
*
- * @param string $awsS3Url The URL of the AWS S3 bucket where the compositions
- * should be stored
+ * @param string $awsS3Url The URL of the AWS S3 bucket where the compositions should be stored. We only support DNS-compliant URLs like `https://documentation-example-twilio-bucket/compositions`, where `compositions` is the path in which you want the compositions to be stored. This URL accepts only URI-valid characters, as described in the [RFC 3986](https://tools.ietf.org/html/rfc3986#section-2).
* @return $this Fluent Builder
*/
- public function setAwsS3Url($awsS3Url)
+ public function setAwsS3Url(string $awsS3Url): self
{
$this->options['awsS3Url'] = $awsS3Url;
return $this;
@@ -98,11 +114,10 @@ public function setAwsS3Url($awsS3Url)
/**
* Whether all compositions should be written to the `aws_s3_url`. When `false`, all compositions are stored in our cloud.
*
- * @param bool $awsStorageEnabled Whether all compositions should be written to
- * the aws_s3_url
+ * @param bool $awsStorageEnabled Whether all compositions should be written to the `aws_s3_url`. When `false`, all compositions are stored in our cloud.
* @return $this Fluent Builder
*/
- public function setAwsStorageEnabled($awsStorageEnabled)
+ public function setAwsStorageEnabled(bool $awsStorageEnabled): self
{
$this->options['awsStorageEnabled'] = $awsStorageEnabled;
return $this;
@@ -111,11 +126,10 @@ public function setAwsStorageEnabled($awsStorageEnabled)
/**
* Whether all compositions should be stored in an encrypted form. The default is `false`.
*
- * @param bool $encryptionEnabled Whether all compositions should be stored in
- * an encrypted form
+ * @param bool $encryptionEnabled Whether all compositions should be stored in an encrypted form. The default is `false`.
* @return $this Fluent Builder
*/
- public function setEncryptionEnabled($encryptionEnabled)
+ public function setEncryptionEnabled(bool $encryptionEnabled): self
{
$this->options['encryptionEnabled'] = $encryptionEnabled;
return $this;
@@ -126,14 +140,11 @@ public function setEncryptionEnabled($encryptionEnabled)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Video.V1.CreateCompositionSettingsOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Video.V1.CreateCompositionSettingsOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionSettingsPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionSettingsPage.php
index 490103f..44b145e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionSettingsPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/CompositionSettingsPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return CompositionSettingsInstance \Twilio\Rest\Video\V1\CompositionSettingsInstance
+ */
+ public function buildInstance(array $payload): CompositionSettingsInstance
{
return new CompositionSettingsInstance($this->version, $payload);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Video.V1.CompositionSettingsPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RecordingContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RecordingContext.php
index 80d317c..7347318 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RecordingContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RecordingContext.php
@@ -2,78 +2,96 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Video
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Video\V1;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class RecordingContext extends InstanceContext
-{
+ {
/**
* Initialize the RecordingContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Video\V1\RecordingContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid The SID of the Recording resource to delete.
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Recordings/' . \rawurlencode($sid) . '';
+ $this->uri = '/Recordings/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a RecordingInstance
+ * Delete the RecordingInstance
*
- * @return RecordingInstance Fetched RecordingInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new RecordingInstance($this->version, $payload, $this->solution['sid']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Deletes the RecordingInstance
+ * Fetch the RecordingInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return RecordingInstance Fetched RecordingInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): RecordingInstance
{
- return $this->version->delete('delete', $this->uri);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
+
+ return new RecordingInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Video.V1.RecordingContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RecordingInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RecordingInstance.php
index a87dec6..a702add 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RecordingInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RecordingInstance.php
@@ -2,52 +2,63 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Video
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Video\V1;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
+ * @property string|null $accountSid
* @property string $status
- * @property \DateTime $dateCreated
- * @property string $sid
- * @property string $sourceSid
- * @property string $size
- * @property string $url
+ * @property \DateTime|null $dateCreated
+ * @property string|null $sid
+ * @property string|null $sourceSid
+ * @property int|null $size
+ * @property string|null $url
* @property string $type
- * @property int $duration
+ * @property int|null $duration
* @property string $containerFormat
* @property string $codec
- * @property array $groupingSids
- * @property string $trackName
- * @property string $offset
- * @property array $links
+ * @property array|null $groupingSids
+ * @property string|null $trackName
+ * @property int|null $offset
+ * @property string|null $mediaExternalLocation
+ * @property string|null $statusCallback
+ * @property string|null $statusCallbackMethod
+ * @property array|null $links
*/
class RecordingInstance extends InstanceResource
{
/**
* Initialize the RecordingInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Video\V1\RecordingInstance
+ * @param string $sid The SID of the Recording resource to delete.
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'status' => Values::array_get($payload, 'status'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
@@ -62,48 +73,55 @@ public function __construct(Version $version, array $payload, $sid = null)
'groupingSids' => Values::array_get($payload, 'grouping_sids'),
'trackName' => Values::array_get($payload, 'track_name'),
'offset' => Values::array_get($payload, 'offset'),
+ 'mediaExternalLocation' => Values::array_get($payload, 'media_external_location'),
+ 'statusCallback' => Values::array_get($payload, 'status_callback'),
+ 'statusCallbackMethod' => Values::array_get($payload, 'status_callback_method'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Video\V1\RecordingContext Context for this
- * RecordingInstance
+ * @return RecordingContext Context for this RecordingInstance
*/
- protected function proxy()
+ protected function proxy(): RecordingContext
{
if (!$this->context) {
- $this->context = new RecordingContext($this->version, $this->solution['sid']);
+ $this->context = new RecordingContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a RecordingInstance
+ * Delete the RecordingInstance
*
- * @return RecordingInstance Fetched RecordingInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the RecordingInstance
+ * Fetch the RecordingInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return RecordingInstance Fetched RecordingInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): RecordingInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -113,7 +131,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -132,12 +150,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Video.V1.RecordingInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RecordingList.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RecordingList.php
index 26b0fcc..c4741c0 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RecordingList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RecordingList.php
@@ -2,118 +2,133 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Video
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Video\V1;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class RecordingList extends ListResource
-{
+ {
/**
* Construct the RecordingList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Video\V1\RecordingList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/Recordings';
}
/**
- * Streams RecordingInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Reads RecordingInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
+ * @param int $limit Upper limit for the number of records to return. read()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
+ * page_size is defined but a limit is defined, read()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return RecordingInstance[] Array of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($options, $limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
- * Reads RecordingInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
+ * Streams RecordingInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
+ * @param int $limit Upper limit for the number of records to return. stream()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
+ * page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return RecordingInstance[] Array of results
+ * @return Stream stream of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
/**
* Retrieve a single page of RecordingInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of RecordingInstance
+ * @return RecordingPage Page of RecordingInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): RecordingPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Status' => $options['status'],
- 'SourceSid' => $options['sourceSid'],
- 'GroupingSid' => Serialize::map($options['groupingSid'], function ($e) {
- return $e;
- }),
- 'DateCreatedAfter' => Serialize::iso8601DateTime($options['dateCreatedAfter']),
- 'DateCreatedBefore' => Serialize::iso8601DateTime($options['dateCreatedBefore']),
- 'MediaType' => $options['mediaType'],
+
+ $params = Values::of([
+ 'Status' =>
+ $options['status'],
+ 'SourceSid' =>
+ $options['sourceSid'],
+ 'GroupingSid' =>
+ Serialize::map($options['groupingSid'], function ($e) { return $e; }),
+ 'DateCreatedAfter' =>
+ Serialize::iso8601DateTime($options['dateCreatedAfter']),
+ 'DateCreatedBefore' =>
+ Serialize::iso8601DateTime($options['dateCreatedBefore']),
+ 'MediaType' =>
+ $options['mediaType'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new RecordingPage($this->version, $response, $this->solution);
}
@@ -123,9 +138,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of RecordingInstance
+ * @return RecordingPage Page of RecordingInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): RecordingPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -135,15 +150,21 @@ public function getPage($targetUrl)
return new RecordingPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a RecordingContext
*
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Video\V1\RecordingContext
+ * @param string $sid The SID of the Recording resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): RecordingContext
{
- return new RecordingContext($this->version, $sid);
+ return new RecordingContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -151,8 +172,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Video.V1.RecordingList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RecordingOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RecordingOptions.php
index ff972fa..9615c48 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RecordingOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RecordingOptions.php
@@ -1,10 +1,16 @@
options['status'] = $status;
$this->options['sourceSid'] = $sourceSid;
$this->options['groupingSid'] = $groupingSid;
@@ -60,10 +87,10 @@ public function __construct($status = Values::NONE, $sourceSid = Values::NONE, $
/**
* Read only the recordings that have this status. Can be: `processing`, `completed`, or `deleted`.
*
- * @param string $status Read only the recordings that have this status
+ * @param string $status Read only the recordings that have this status. Can be: `processing`, `completed`, or `deleted`.
* @return $this Fluent Builder
*/
- public function setStatus($status)
+ public function setStatus(string $status): self
{
$this->options['status'] = $status;
return $this;
@@ -72,10 +99,10 @@ public function setStatus($status)
/**
* Read only the recordings that have this `source_sid`.
*
- * @param string $sourceSid Read only the recordings that have this source_sid
+ * @param string $sourceSid Read only the recordings that have this `source_sid`.
* @return $this Fluent Builder
*/
- public function setSourceSid($sourceSid)
+ public function setSourceSid(string $sourceSid): self
{
$this->options['sourceSid'] = $sourceSid;
return $this;
@@ -84,10 +111,10 @@ public function setSourceSid($sourceSid)
/**
* Read only recordings with this `grouping_sid`, which may include a `participant_sid` and/or a `room_sid`.
*
- * @param string $groupingSid Read only recordings that have this grouping_sid
+ * @param string[] $groupingSid Read only recordings with this `grouping_sid`, which may include a `participant_sid` and/or a `room_sid`.
* @return $this Fluent Builder
*/
- public function setGroupingSid($groupingSid)
+ public function setGroupingSid(array $groupingSid): self
{
$this->options['groupingSid'] = $groupingSid;
return $this;
@@ -96,12 +123,10 @@ public function setGroupingSid($groupingSid)
/**
* Read only recordings that started on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time with time zone.
*
- * @param \DateTime $dateCreatedAfter Read only recordings that started on or
- * after this [ISO
- * 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time with time zone
+ * @param \DateTime $dateCreatedAfter Read only recordings that started on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time with time zone.
* @return $this Fluent Builder
*/
- public function setDateCreatedAfter($dateCreatedAfter)
+ public function setDateCreatedAfter(\DateTime $dateCreatedAfter): self
{
$this->options['dateCreatedAfter'] = $dateCreatedAfter;
return $this;
@@ -110,12 +135,10 @@ public function setDateCreatedAfter($dateCreatedAfter)
/**
* Read only recordings that started before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time with time zone, given as `YYYY-MM-DDThh:mm:ss+|-hh:mm` or `YYYY-MM-DDThh:mm:ssZ`.
*
- * @param \DateTime $dateCreatedBefore Read only recordings that started before
- * this [ISO
- * 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time with time zone
+ * @param \DateTime $dateCreatedBefore Read only recordings that started before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date-time with time zone, given as `YYYY-MM-DDThh:mm:ss+|-hh:mm` or `YYYY-MM-DDThh:mm:ssZ`.
* @return $this Fluent Builder
*/
- public function setDateCreatedBefore($dateCreatedBefore)
+ public function setDateCreatedBefore(\DateTime $dateCreatedBefore): self
{
$this->options['dateCreatedBefore'] = $dateCreatedBefore;
return $this;
@@ -124,10 +147,10 @@ public function setDateCreatedBefore($dateCreatedBefore)
/**
* Read only recordings that have this media type. Can be either `audio` or `video`.
*
- * @param string $mediaType Read only recordings that have this media type
+ * @param string $mediaType Read only recordings that have this media type. Can be either `audio` or `video`.
* @return $this Fluent Builder
*/
- public function setMediaType($mediaType)
+ public function setMediaType(string $mediaType): self
{
$this->options['mediaType'] = $mediaType;
return $this;
@@ -138,14 +161,10 @@ public function setMediaType($mediaType)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Video.V1.ReadRecordingOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Video.V1.ReadRecordingOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RecordingPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RecordingPage.php
index 5128096..c79ff55 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RecordingPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RecordingPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return RecordingInstance \Twilio\Rest\Video\V1\RecordingInstance
+ */
+ public function buildInstance(array $payload): RecordingInstance
{
return new RecordingInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Video.V1.RecordingPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RecordingSettingsContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RecordingSettingsContext.php
index da62502..c20ab9c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RecordingSettingsContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RecordingSettingsContext.php
@@ -2,102 +2,116 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Video
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Video\V1;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
class RecordingSettingsContext extends InstanceContext
-{
+ {
/**
* Initialize the RecordingSettingsContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @return \Twilio\Rest\Video\V1\RecordingSettingsContext
+ * @param Version $version Version that contains the resource
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/RecordingSettings/Default';
}
/**
- * Fetch a RecordingSettingsInstance
+ * Create the RecordingSettingsInstance
*
- * @return RecordingSettingsInstance Fetched RecordingSettingsInstance
+ * @param string $friendlyName A descriptive string that you create to describe the resource and be shown to users in the console
+ * @param array|Options $options Optional Arguments
+ * @return RecordingSettingsInstance Created RecordingSettingsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function create(string $friendlyName, array $options = []): RecordingSettingsInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $options = new Values($options);
+
+ $data = Values::of([
+ 'FriendlyName' =>
+ $friendlyName,
+ 'AwsCredentialsSid' =>
+ $options['awsCredentialsSid'],
+ 'EncryptionKeySid' =>
+ $options['encryptionKeySid'],
+ 'AwsS3Url' =>
+ $options['awsS3Url'],
+ 'AwsStorageEnabled' =>
+ Serialize::booleanToString($options['awsStorageEnabled']),
+ 'EncryptionEnabled' =>
+ Serialize::booleanToString($options['encryptionEnabled']),
+ ]);
- return new RecordingSettingsInstance($this->version, $payload);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new RecordingSettingsInstance(
+ $this->version,
+ $payload
+ );
}
+
/**
- * Create a new RecordingSettingsInstance
+ * Fetch the RecordingSettingsInstance
*
- * @param string $friendlyName A string to describe the resource
- * @param array|Options $options Optional Arguments
- * @return RecordingSettingsInstance Newly created RecordingSettingsInstance
+ * @return RecordingSettingsInstance Fetched RecordingSettingsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($friendlyName, $options = array())
+ public function fetch(): RecordingSettingsInstance
{
- $options = new Values($options);
- $data = Values::of(array(
- 'FriendlyName' => $friendlyName,
- 'AwsCredentialsSid' => $options['awsCredentialsSid'],
- 'EncryptionKeySid' => $options['encryptionKeySid'],
- 'AwsS3Url' => $options['awsS3Url'],
- 'AwsStorageEnabled' => Serialize::booleanToString($options['awsStorageEnabled']),
- 'EncryptionEnabled' => Serialize::booleanToString($options['encryptionEnabled']),
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
- return new RecordingSettingsInstance($this->version, $payload);
+ return new RecordingSettingsInstance(
+ $this->version,
+ $payload
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Video.V1.RecordingSettingsContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RecordingSettingsInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RecordingSettingsInstance.php
index de5ba52..23ac56f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RecordingSettingsInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RecordingSettingsInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Video
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Video\V1;
use Twilio\Exceptions\TwilioException;
@@ -15,33 +23,31 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property string $accountSid
- * @property string $friendlyName
- * @property string $awsCredentialsSid
- * @property string $awsS3Url
- * @property bool $awsStorageEnabled
- * @property string $encryptionKeySid
- * @property bool $encryptionEnabled
- * @property string $url
+ * @property string|null $accountSid
+ * @property string|null $friendlyName
+ * @property string|null $awsCredentialsSid
+ * @property string|null $awsS3Url
+ * @property bool|null $awsStorageEnabled
+ * @property string|null $encryptionKeySid
+ * @property bool|null $encryptionEnabled
+ * @property string|null $url
*/
class RecordingSettingsInstance extends InstanceResource
{
/**
* Initialize the RecordingSettingsInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @return \Twilio\Rest\Video\V1\RecordingSettingsInstance
*/
public function __construct(Version $version, array $payload)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'friendlyName' => Values::array_get($payload, 'friendly_name'),
'awsCredentialsSid' => Values::array_get($payload, 'aws_credentials_sid'),
@@ -50,49 +56,52 @@ public function __construct(Version $version, array $payload)
'encryptionKeySid' => Values::array_get($payload, 'encryption_key_sid'),
'encryptionEnabled' => Values::array_get($payload, 'encryption_enabled'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array();
+ $this->solution = [];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Video\V1\RecordingSettingsContext Context for this
- * RecordingSettingsInstance
+ * @return RecordingSettingsContext Context for this RecordingSettingsInstance
*/
- protected function proxy()
+ protected function proxy(): RecordingSettingsContext
{
if (!$this->context) {
- $this->context = new RecordingSettingsContext($this->version);
+ $this->context = new RecordingSettingsContext(
+ $this->version
+ );
}
return $this->context;
}
/**
- * Fetch a RecordingSettingsInstance
+ * Create the RecordingSettingsInstance
*
- * @return RecordingSettingsInstance Fetched RecordingSettingsInstance
+ * @param string $friendlyName A descriptive string that you create to describe the resource and be shown to users in the console
+ * @param array|Options $options Optional Arguments
+ * @return RecordingSettingsInstance Created RecordingSettingsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function create(string $friendlyName, array $options = []): RecordingSettingsInstance
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->create($friendlyName, $options);
}
/**
- * Create a new RecordingSettingsInstance
+ * Fetch the RecordingSettingsInstance
*
- * @param string $friendlyName A string to describe the resource
- * @param array|Options $options Optional Arguments
- * @return RecordingSettingsInstance Newly created RecordingSettingsInstance
+ * @return RecordingSettingsInstance Fetched RecordingSettingsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($friendlyName, $options = array())
+ public function fetch(): RecordingSettingsInstance
{
- return $this->proxy()->create($friendlyName, $options);
+
+ return $this->proxy()->fetch();
}
/**
@@ -102,7 +111,7 @@ public function create($friendlyName, $options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -121,12 +130,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Video.V1.RecordingSettingsInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RecordingSettingsList.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RecordingSettingsList.php
index 3989641..72b7e0e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RecordingSettingsList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RecordingSettingsList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Video
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Video\V1;
@@ -12,33 +19,34 @@
use Twilio\ListResource;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
+
class RecordingSettingsList extends ListResource
-{
+ {
/**
* Construct the RecordingSettingsList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Video\V1\RecordingSettingsList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
}
/**
* Constructs a RecordingSettingsContext
- *
- * @return \Twilio\Rest\Video\V1\RecordingSettingsContext
*/
- public function getContext()
+ public function getContext(
+
+ ): RecordingSettingsContext
{
- return new RecordingSettingsContext($this->version);
+ return new RecordingSettingsContext(
+ $this->version
+ );
}
/**
@@ -46,8 +54,8 @@ public function getContext()
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Video.V1.RecordingSettingsList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RecordingSettingsOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RecordingSettingsOptions.php
index 2f89c16..7bab285 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RecordingSettingsOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RecordingSettingsOptions.php
@@ -1,10 +1,16 @@
options['awsCredentialsSid'] = $awsCredentialsSid;
$this->options['encryptionKeySid'] = $encryptionKeySid;
$this->options['awsS3Url'] = $awsS3Url;
@@ -60,10 +78,10 @@ public function __construct($awsCredentialsSid = Values::NONE, $encryptionKeySid
/**
* The SID of the stored Credential resource.
*
- * @param string $awsCredentialsSid The SID of the stored Credential resource
+ * @param string $awsCredentialsSid The SID of the stored Credential resource.
* @return $this Fluent Builder
*/
- public function setAwsCredentialsSid($awsCredentialsSid)
+ public function setAwsCredentialsSid(string $awsCredentialsSid): self
{
$this->options['awsCredentialsSid'] = $awsCredentialsSid;
return $this;
@@ -72,24 +90,22 @@ public function setAwsCredentialsSid($awsCredentialsSid)
/**
* The SID of the Public Key resource to use for encryption.
*
- * @param string $encryptionKeySid The SID of the Public Key resource to use
- * for encryption
+ * @param string $encryptionKeySid The SID of the Public Key resource to use for encryption.
* @return $this Fluent Builder
*/
- public function setEncryptionKeySid($encryptionKeySid)
+ public function setEncryptionKeySid(string $encryptionKeySid): self
{
$this->options['encryptionKeySid'] = $encryptionKeySid;
return $this;
}
/**
- * The URL of the AWS S3 bucket where the recordings should be stored. We only support DNS-compliant URLs like `http://.s3-.amazonaws.com/recordings`, where `recordings` is the path in which you want the recordings to be stored.
+ * The URL of the AWS S3 bucket where the recordings should be stored. We only support DNS-compliant URLs like `https://documentation-example-twilio-bucket/recordings`, where `recordings` is the path in which you want the recordings to be stored. This URL accepts only URI-valid characters, as described in the [RFC 3986](https://tools.ietf.org/html/rfc3986#section-2).
*
- * @param string $awsS3Url The URL of the AWS S3 bucket where the recordings
- * should be stored
+ * @param string $awsS3Url The URL of the AWS S3 bucket where the recordings should be stored. We only support DNS-compliant URLs like `https://documentation-example-twilio-bucket/recordings`, where `recordings` is the path in which you want the recordings to be stored. This URL accepts only URI-valid characters, as described in the [RFC 3986](https://tools.ietf.org/html/rfc3986#section-2).
* @return $this Fluent Builder
*/
- public function setAwsS3Url($awsS3Url)
+ public function setAwsS3Url(string $awsS3Url): self
{
$this->options['awsS3Url'] = $awsS3Url;
return $this;
@@ -98,11 +114,10 @@ public function setAwsS3Url($awsS3Url)
/**
* Whether all recordings should be written to the `aws_s3_url`. When `false`, all recordings are stored in our cloud.
*
- * @param bool $awsStorageEnabled Whether all recordings should be written to
- * the aws_s3_url
+ * @param bool $awsStorageEnabled Whether all recordings should be written to the `aws_s3_url`. When `false`, all recordings are stored in our cloud.
* @return $this Fluent Builder
*/
- public function setAwsStorageEnabled($awsStorageEnabled)
+ public function setAwsStorageEnabled(bool $awsStorageEnabled): self
{
$this->options['awsStorageEnabled'] = $awsStorageEnabled;
return $this;
@@ -111,11 +126,10 @@ public function setAwsStorageEnabled($awsStorageEnabled)
/**
* Whether all recordings should be stored in an encrypted form. The default is `false`.
*
- * @param bool $encryptionEnabled Whether all recordings should be stored in an
- * encrypted form
+ * @param bool $encryptionEnabled Whether all recordings should be stored in an encrypted form. The default is `false`.
* @return $this Fluent Builder
*/
- public function setEncryptionEnabled($encryptionEnabled)
+ public function setEncryptionEnabled(bool $encryptionEnabled): self
{
$this->options['encryptionEnabled'] = $encryptionEnabled;
return $this;
@@ -126,14 +140,11 @@ public function setEncryptionEnabled($encryptionEnabled)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Video.V1.CreateRecordingSettingsOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Video.V1.CreateRecordingSettingsOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RecordingSettingsPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RecordingSettingsPage.php
index 7c1b934..5812d5e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RecordingSettingsPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RecordingSettingsPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return RecordingSettingsInstance \Twilio\Rest\Video\V1\RecordingSettingsInstance
+ */
+ public function buildInstance(array $payload): RecordingSettingsInstance
{
return new RecordingSettingsInstance($this->version, $payload);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Video.V1.RecordingSettingsPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/PublishedTrackContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/PublishedTrackContext.php
index 5358772..547b8ee 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/PublishedTrackContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/PublishedTrackContext.php
@@ -2,56 +2,72 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Video
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Video\V1\Room\Participant;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class PublishedTrackContext extends InstanceContext
-{
+ {
/**
* Initialize the PublishedTrackContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $roomSid The SID of the Room resource where the Track resource
- * to fetch is published
- * @param string $participantSid The SID of the Participant resource with the
- * published track to fetch
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Video\V1\Room\Participant\PublishedTrackContext
+ * @param Version $version Version that contains the resource
+ * @param string $roomSid The SID of the Room resource where the Track resource to fetch is published.
+ * @param string $participantSid The SID of the Participant resource with the published track to fetch.
+ * @param string $sid The SID of the RoomParticipantPublishedTrack resource to fetch.
*/
- public function __construct(Version $version, $roomSid, $participantSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $roomSid,
+ $participantSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('roomSid' => $roomSid, 'participantSid' => $participantSid, 'sid' => $sid,);
+ $this->solution = [
+ 'roomSid' =>
+ $roomSid,
+ 'participantSid' =>
+ $participantSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Rooms/' . \rawurlencode($roomSid) . '/Participants/' . \rawurlencode($participantSid) . '/PublishedTracks/' . \rawurlencode($sid) . '';
+ $this->uri = '/Rooms/' . \rawurlencode($roomSid)
+ .'/Participants/' . \rawurlencode($participantSid)
+ .'/PublishedTracks/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a PublishedTrackInstance
+ * Fetch the PublishedTrackInstance
*
* @return PublishedTrackInstance Fetched PublishedTrackInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): PublishedTrackInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new PublishedTrackInstance(
$this->version,
@@ -62,17 +78,18 @@ public function fetch()
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Video.V1.PublishedTrackContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/PublishedTrackInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/PublishedTrackInstance.php
index 199ef3d..4a0b7b9 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/PublishedTrackInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/PublishedTrackInstance.php
@@ -2,50 +2,56 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Video
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Video\V1\Room\Participant;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $participantSid
- * @property string $roomSid
- * @property string $name
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property bool $enabled
+ * @property string|null $sid
+ * @property string|null $participantSid
+ * @property string|null $roomSid
+ * @property string|null $name
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property bool|null $enabled
* @property string $kind
- * @property string $url
+ * @property string|null $url
*/
class PublishedTrackInstance extends InstanceResource
{
/**
* Initialize the PublishedTrackInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $roomSid The SID of the Room resource where the track is
- * published
- * @param string $participantSid The SID of the Participant resource with the
- * published track
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Video\V1\Room\Participant\PublishedTrackInstance
+ * @param string $roomSid The SID of the Room resource where the Track resource to fetch is published.
+ * @param string $participantSid The SID of the Participant resource with the published track to fetch.
+ * @param string $sid The SID of the RoomParticipantPublishedTrack resource to fetch.
*/
- public function __construct(Version $version, array $payload, $roomSid, $participantSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $roomSid, string $participantSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'participantSid' => Values::array_get($payload, 'participant_sid'),
'roomSid' => Values::array_get($payload, 'room_sid'),
@@ -55,25 +61,18 @@ public function __construct(Version $version, array $payload, $roomSid, $partici
'enabled' => Values::array_get($payload, 'enabled'),
'kind' => Values::array_get($payload, 'kind'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array(
- 'roomSid' => $roomSid,
- 'participantSid' => $participantSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['roomSid' => $roomSid, 'participantSid' => $participantSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Video\V1\Room\Participant\PublishedTrackContext Context
- * for
- * this
- * PublishedTrackInstance
+ * @return PublishedTrackContext Context for this PublishedTrackInstance
*/
- protected function proxy()
+ protected function proxy(): PublishedTrackContext
{
if (!$this->context) {
$this->context = new PublishedTrackContext(
@@ -88,13 +87,14 @@ protected function proxy()
}
/**
- * Fetch a PublishedTrackInstance
+ * Fetch the PublishedTrackInstance
*
* @return PublishedTrackInstance Fetched PublishedTrackInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): PublishedTrackInstance
{
+
return $this->proxy()->fetch();
}
@@ -105,7 +105,7 @@ public function fetch()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -124,12 +124,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Video.V1.PublishedTrackInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/PublishedTrackList.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/PublishedTrackList.php
index 787519a..323c6c3 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/PublishedTrackList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/PublishedTrackList.php
@@ -2,37 +2,75 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Video
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Video\V1\Room\Participant;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class PublishedTrackList extends ListResource
-{
+ {
/**
* Construct the PublishedTrackList
*
* @param Version $version Version that contains the resource
- * @param string $roomSid The SID of the Room resource where the track is
- * published
- * @param string $participantSid The SID of the Participant resource with the
- * published track
- * @return \Twilio\Rest\Video\V1\Room\Participant\PublishedTrackList
+ * @param string $roomSid The SID of the Room resource where the Track resource to fetch is published.
+ * @param string $participantSid The SID of the Participant resource with the published track to fetch.
*/
- public function __construct(Version $version, $roomSid, $participantSid)
- {
+ public function __construct(
+ Version $version,
+ string $roomSid,
+ string $participantSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('roomSid' => $roomSid, 'participantSid' => $participantSid,);
+ $this->solution = [
+ 'roomSid' =>
+ $roomSid,
+
+ 'participantSid' =>
+ $participantSid,
+
+ ];
+
+ $this->uri = '/Rooms/' . \rawurlencode($roomSid)
+ .'/Participants/' . \rawurlencode($participantSid)
+ .'/PublishedTracks';
+ }
- $this->uri = '/Rooms/' . \rawurlencode($roomSid) . '/Participants/' . \rawurlencode($participantSid) . '/PublishedTracks';
+ /**
+ * Reads PublishedTrackInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return PublishedTrackInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -51,9 +89,9 @@ public function __construct(Version $version, $roomSid, $participantSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -62,26 +100,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads PublishedTrackInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return PublishedTrackInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of PublishedTrackInstance records from the API.
* Request is executed immediately
@@ -89,21 +107,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of PublishedTrackInstance
+ * @return PublishedTrackPage Page of PublishedTrackInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): PublishedTrackPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new PublishedTrackPage($this->version, $response, $this->solution);
}
@@ -113,9 +132,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of PublishedTrackInstance
+ * @return PublishedTrackPage Page of PublishedTrackInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): PublishedTrackPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -125,13 +144,16 @@ public function getPage($targetUrl)
return new PublishedTrackPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a PublishedTrackContext
*
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Video\V1\Room\Participant\PublishedTrackContext
+ * @param string $sid The SID of the RoomParticipantPublishedTrack resource to fetch.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): PublishedTrackContext
{
return new PublishedTrackContext(
$this->version,
@@ -146,8 +168,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Video.V1.PublishedTrackList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/PublishedTrackPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/PublishedTrackPage.php
index 9341412..ef92e8c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/PublishedTrackPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/PublishedTrackPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return PublishedTrackInstance \Twilio\Rest\Video\V1\Room\Participant\PublishedTrackInstance
+ */
+ public function buildInstance(array $payload): PublishedTrackInstance
{
- return new PublishedTrackInstance(
- $this->version,
- $payload,
- $this->solution['roomSid'],
- $this->solution['participantSid']
- );
+ return new PublishedTrackInstance($this->version, $payload, $this->solution['roomSid'], $this->solution['participantSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Video.V1.PublishedTrackPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/SubscribeRulesInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/SubscribeRulesInstance.php
index 254d4f2..fc62c44 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/SubscribeRulesInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/SubscribeRulesInstance.php
@@ -2,54 +2,59 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Video
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Video\V1\Room\Participant;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- *
- * @property string $participantSid
- * @property string $roomSid
- * @property string $rules
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
+ * @property string|null $participantSid
+ * @property string|null $roomSid
+ * @property string[]|null $rules
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
*/
class SubscribeRulesInstance extends InstanceResource
{
/**
* Initialize the SubscribeRulesInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $roomSid The SID of the Room resource for the Subscribe Rules
- * @param string $participantSid The SID of the Participant resource for the
- * Subscribe Rules
- * @return \Twilio\Rest\Video\V1\Room\Participant\SubscribeRulesInstance
+ * @param string $roomSid The SID of the Room resource where the subscribe rules to fetch apply.
+ * @param string $participantSid The SID of the Participant resource with the subscribe rules to fetch.
*/
- public function __construct(Version $version, array $payload, $roomSid, $participantSid)
+ public function __construct(Version $version, array $payload, string $roomSid, string $participantSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'participantSid' => Values::array_get($payload, 'participant_sid'),
'roomSid' => Values::array_get($payload, 'room_sid'),
'rules' => Values::array_get($payload, 'rules'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
- );
+ ];
- $this->solution = array('roomSid' => $roomSid, 'participantSid' => $participantSid,);
+ $this->solution = ['roomSid' => $roomSid, 'participantSid' => $participantSid, ];
}
/**
@@ -59,7 +64,7 @@ public function __construct(Version $version, array $payload, $roomSid, $partici
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -78,8 +83,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Video.V1.SubscribeRulesInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/SubscribeRulesList.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/SubscribeRulesList.php
index a3b7e31..1daa80f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/SubscribeRulesList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/SubscribeRulesList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Video
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Video\V1\Room\Participant;
@@ -12,49 +19,53 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- */
class SubscribeRulesList extends ListResource
-{
+ {
/**
* Construct the SubscribeRulesList
*
* @param Version $version Version that contains the resource
- * @param string $roomSid The SID of the Room resource for the Subscribe Rules
- * @param string $participantSid The SID of the Participant resource for the
- * Subscribe Rules
- * @return \Twilio\Rest\Video\V1\Room\Participant\SubscribeRulesList
+ * @param string $roomSid The SID of the Room resource where the subscribe rules to fetch apply.
+ * @param string $participantSid The SID of the Participant resource with the subscribe rules to fetch.
*/
- public function __construct(Version $version, $roomSid, $participantSid)
- {
+ public function __construct(
+ Version $version,
+ string $roomSid,
+ string $participantSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('roomSid' => $roomSid, 'participantSid' => $participantSid,);
+ $this->solution = [
+ 'roomSid' =>
+ $roomSid,
+
+ 'participantSid' =>
+ $participantSid,
+
+ ];
- $this->uri = '/Rooms/' . \rawurlencode($roomSid) . '/Participants/' . \rawurlencode($participantSid) . '/SubscribeRules';
+ $this->uri = '/Rooms/' . \rawurlencode($roomSid)
+ .'/Participants/' . \rawurlencode($participantSid)
+ .'/SubscribeRules';
}
/**
- * Fetch a SubscribeRulesInstance
+ * Fetch the SubscribeRulesInstance
*
* @return SubscribeRulesInstance Fetched SubscribeRulesInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): SubscribeRulesInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new SubscribeRulesInstance(
$this->version,
@@ -64,6 +75,7 @@ public function fetch()
);
}
+
/**
* Update the SubscribeRulesInstance
*
@@ -71,18 +83,18 @@ public function fetch()
* @return SubscribeRulesInstance Updated SubscribeRulesInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): SubscribeRulesInstance
{
+
$options = new Values($options);
- $data = Values::of(array('Rules' => Serialize::jsonObject($options['rules']),));
+ $data = Values::of([
+ 'Rules' =>
+ Serialize::jsonObject($options['rules']),
+ ]);
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new SubscribeRulesInstance(
$this->version,
@@ -92,13 +104,14 @@ public function update($options = array())
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Video.V1.SubscribeRulesList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/SubscribeRulesOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/SubscribeRulesOptions.php
index c5cc8fe..656889b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/SubscribeRulesOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/SubscribeRulesOptions.php
@@ -1,10 +1,16 @@
options['rules'] = $rules;
}
/**
* A JSON-encoded array of subscribe rules. See the [Specifying Subscribe Rules](https://www.twilio.com/docs/video/api/track-subscriptions#specifying-sr) section for further information.
*
- * @param array $rules A JSON-encoded array of subscribe rules
+ * @param array $rules A JSON-encoded array of subscribe rules. See the [Specifying Subscribe Rules](https://www.twilio.com/docs/video/api/track-subscriptions#specifying-sr) section for further information.
* @return $this Fluent Builder
*/
- public function setRules($rules)
+ public function setRules(array $rules): self
{
$this->options['rules'] = $rules;
return $this;
@@ -54,14 +69,10 @@ public function setRules($rules)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Video.V1.UpdateSubscribeRulesOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Video.V1.UpdateSubscribeRulesOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/SubscribeRulesPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/SubscribeRulesPage.php
index 9a5e21c..e768c7b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/SubscribeRulesPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/SubscribeRulesPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return SubscribeRulesInstance \Twilio\Rest\Video\V1\Room\Participant\SubscribeRulesInstance
+ */
+ public function buildInstance(array $payload): SubscribeRulesInstance
{
- return new SubscribeRulesInstance(
- $this->version,
- $payload,
- $this->solution['roomSid'],
- $this->solution['participantSid']
- );
+ return new SubscribeRulesInstance($this->version, $payload, $this->solution['roomSid'], $this->solution['participantSid']);
}
/**
@@ -39,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Video.V1.SubscribeRulesPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/SubscribedTrackContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/SubscribedTrackContext.php
index f432c48..74652c9 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/SubscribedTrackContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/SubscribedTrackContext.php
@@ -2,56 +2,72 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Video
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Video\V1\Room\Participant;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class SubscribedTrackContext extends InstanceContext
-{
+ {
/**
* Initialize the SubscribedTrackContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $roomSid The SID of the Room where the Track resource to fetch
- * is subscribed
- * @param string $participantSid The SID of the participant that subscribes to
- * the Track resource to fetch
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Video\V1\Room\Participant\SubscribedTrackContext
+ * @param Version $version Version that contains the resource
+ * @param string $roomSid The SID of the Room where the Track resource to fetch is subscribed.
+ * @param string $participantSid The SID of the participant that subscribes to the Track resource to fetch.
+ * @param string $sid The SID of the RoomParticipantSubscribedTrack resource to fetch.
*/
- public function __construct(Version $version, $roomSid, $participantSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $roomSid,
+ $participantSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('roomSid' => $roomSid, 'participantSid' => $participantSid, 'sid' => $sid,);
+ $this->solution = [
+ 'roomSid' =>
+ $roomSid,
+ 'participantSid' =>
+ $participantSid,
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Rooms/' . \rawurlencode($roomSid) . '/Participants/' . \rawurlencode($participantSid) . '/SubscribedTracks/' . \rawurlencode($sid) . '';
+ $this->uri = '/Rooms/' . \rawurlencode($roomSid)
+ .'/Participants/' . \rawurlencode($participantSid)
+ .'/SubscribedTracks/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a SubscribedTrackInstance
+ * Fetch the SubscribedTrackInstance
*
* @return SubscribedTrackInstance Fetched SubscribedTrackInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): SubscribedTrackInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new SubscribedTrackInstance(
$this->version,
@@ -62,17 +78,18 @@ public function fetch()
);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Video.V1.SubscribedTrackContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/SubscribedTrackInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/SubscribedTrackInstance.php
index b180a55..4efb767 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/SubscribedTrackInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/SubscribedTrackInstance.php
@@ -2,50 +2,57 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Video
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Video\V1\Room\Participant;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $participantSid
- * @property string $publisherSid
- * @property string $roomSid
- * @property string $name
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property bool $enabled
+ * @property string|null $sid
+ * @property string|null $participantSid
+ * @property string|null $publisherSid
+ * @property string|null $roomSid
+ * @property string|null $name
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property bool|null $enabled
* @property string $kind
- * @property string $url
+ * @property string|null $url
*/
class SubscribedTrackInstance extends InstanceResource
{
/**
* Initialize the SubscribedTrackInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $roomSid The SID of the room where the track is published
- * @param string $participantSid The SID of the participant that subscribes to
- * the track
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Video\V1\Room\Participant\SubscribedTrackInstance
+ * @param string $roomSid The SID of the Room where the Track resource to fetch is subscribed.
+ * @param string $participantSid The SID of the participant that subscribes to the Track resource to fetch.
+ * @param string $sid The SID of the RoomParticipantSubscribedTrack resource to fetch.
*/
- public function __construct(Version $version, array $payload, $roomSid, $participantSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $roomSid, string $participantSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'participantSid' => Values::array_get($payload, 'participant_sid'),
'publisherSid' => Values::array_get($payload, 'publisher_sid'),
@@ -56,22 +63,18 @@ public function __construct(Version $version, array $payload, $roomSid, $partici
'enabled' => Values::array_get($payload, 'enabled'),
'kind' => Values::array_get($payload, 'kind'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array(
- 'roomSid' => $roomSid,
- 'participantSid' => $participantSid,
- 'sid' => $sid ?: $this->properties['sid'],
- );
+ $this->solution = ['roomSid' => $roomSid, 'participantSid' => $participantSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Video\V1\Room\Participant\SubscribedTrackContext Context for this SubscribedTrackInstance
+ * @return SubscribedTrackContext Context for this SubscribedTrackInstance
*/
- protected function proxy()
+ protected function proxy(): SubscribedTrackContext
{
if (!$this->context) {
$this->context = new SubscribedTrackContext(
@@ -86,13 +89,14 @@ protected function proxy()
}
/**
- * Fetch a SubscribedTrackInstance
+ * Fetch the SubscribedTrackInstance
*
* @return SubscribedTrackInstance Fetched SubscribedTrackInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): SubscribedTrackInstance
{
+
return $this->proxy()->fetch();
}
@@ -103,7 +107,7 @@ public function fetch()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -122,12 +126,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Video.V1.SubscribedTrackInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/SubscribedTrackList.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/SubscribedTrackList.php
index 1c99c45..79d6b80 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/SubscribedTrackList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/SubscribedTrackList.php
@@ -2,36 +2,75 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Video
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Video\V1\Room\Participant;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class SubscribedTrackList extends ListResource
-{
+ {
/**
* Construct the SubscribedTrackList
*
* @param Version $version Version that contains the resource
- * @param string $roomSid The SID of the room where the track is published
- * @param string $participantSid The SID of the participant that subscribes to
- * the track
- * @return \Twilio\Rest\Video\V1\Room\Participant\SubscribedTrackList
+ * @param string $roomSid The SID of the Room where the Track resource to fetch is subscribed.
+ * @param string $participantSid The SID of the participant that subscribes to the Track resource to fetch.
*/
- public function __construct(Version $version, $roomSid, $participantSid)
- {
+ public function __construct(
+ Version $version,
+ string $roomSid,
+ string $participantSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('roomSid' => $roomSid, 'participantSid' => $participantSid,);
+ $this->solution = [
+ 'roomSid' =>
+ $roomSid,
+
+ 'participantSid' =>
+ $participantSid,
+
+ ];
+
+ $this->uri = '/Rooms/' . \rawurlencode($roomSid)
+ .'/Participants/' . \rawurlencode($participantSid)
+ .'/SubscribedTracks';
+ }
- $this->uri = '/Rooms/' . \rawurlencode($roomSid) . '/Participants/' . \rawurlencode($participantSid) . '/SubscribedTracks';
+ /**
+ * Reads SubscribedTrackInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return SubscribedTrackInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -50,9 +89,9 @@ public function __construct(Version $version, $roomSid, $participantSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -61,26 +100,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads SubscribedTrackInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return SubscribedTrackInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of SubscribedTrackInstance records from the API.
* Request is executed immediately
@@ -88,21 +107,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of SubscribedTrackInstance
+ * @return SubscribedTrackPage Page of SubscribedTrackInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): SubscribedTrackPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new SubscribedTrackPage($this->version, $response, $this->solution);
}
@@ -112,9 +132,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of SubscribedTrackInstance
+ * @return SubscribedTrackPage Page of SubscribedTrackInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): SubscribedTrackPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -124,13 +144,16 @@ public function getPage($targetUrl)
return new SubscribedTrackPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a SubscribedTrackContext
*
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Video\V1\Room\Participant\SubscribedTrackContext
+ * @param string $sid The SID of the RoomParticipantSubscribedTrack resource to fetch.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): SubscribedTrackContext
{
return new SubscribedTrackContext(
$this->version,
@@ -145,8 +168,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Video.V1.SubscribedTrackList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/SubscribedTrackPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/SubscribedTrackPage.php
index 7ee73a6..575fa82 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/SubscribedTrackPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/Participant/SubscribedTrackPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return SubscribedTrackInstance \Twilio\Rest\Video\V1\Room\Participant\SubscribedTrackInstance
+ */
+ public function buildInstance(array $payload): SubscribedTrackInstance
{
- return new SubscribedTrackInstance(
- $this->version,
- $payload,
- $this->solution['roomSid'],
- $this->solution['participantSid']
- );
+ return new SubscribedTrackInstance($this->version, $payload, $this->solution['roomSid'], $this->solution['participantSid']);
}
/**
@@ -36,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Video.V1.SubscribedTrackPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/ParticipantContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/ParticipantContext.php
index a7bb322..cc7f3c3 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/ParticipantContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/ParticipantContext.php
@@ -2,69 +2,87 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Video
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Video\V1\Room;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Video\V1\Room\Participant\PublishedTrackList;
-use Twilio\Rest\Video\V1\Room\Participant\SubscribeRulesList;
-use Twilio\Rest\Video\V1\Room\Participant\SubscribedTrackList;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Video\V1\Room\Participant\SubscribeRulesList;
+use Twilio\Rest\Video\V1\Room\Participant\SubscribedTrackList;
+use Twilio\Rest\Video\V1\Room\Participant\PublishedTrackList;
+use Twilio\Rest\Video\V1\Room\Participant\AnonymizeList;
+
/**
- * @property \Twilio\Rest\Video\V1\Room\Participant\PublishedTrackList $publishedTracks
- * @property \Twilio\Rest\Video\V1\Room\Participant\SubscribedTrackList $subscribedTracks
- * @property \Twilio\Rest\Video\V1\Room\Participant\SubscribeRulesList $subscribeRules
- * @method \Twilio\Rest\Video\V1\Room\Participant\PublishedTrackContext publishedTracks(string $sid)
+ * @property SubscribeRulesList $subscribeRules
+ * @property SubscribedTrackList $subscribedTracks
+ * @property PublishedTrackList $publishedTracks
+ * @property AnonymizeList $anonymize
* @method \Twilio\Rest\Video\V1\Room\Participant\SubscribedTrackContext subscribedTracks(string $sid)
+ * @method \Twilio\Rest\Video\V1\Room\Participant\AnonymizeContext anonymize()
+ * @method \Twilio\Rest\Video\V1\Room\Participant\PublishedTrackContext publishedTracks(string $sid)
*/
class ParticipantContext extends InstanceContext
-{
- protected $_publishedTracks = null;
- protected $_subscribedTracks = null;
- protected $_subscribeRules = null;
+ {
+ protected $_subscribeRules;
+ protected $_subscribedTracks;
+ protected $_publishedTracks;
+ protected $_anonymize;
/**
* Initialize the ParticipantContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $roomSid The SID of the room with the Participant resource to
- * fetch
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Video\V1\Room\ParticipantContext
+ * @param Version $version Version that contains the resource
+ * @param string $roomSid The SID of the room with the Participant resource to fetch.
+ * @param string $sid The SID of the RoomParticipant resource to fetch.
*/
- public function __construct(Version $version, $roomSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $roomSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('roomSid' => $roomSid, 'sid' => $sid,);
-
- $this->uri = '/Rooms/' . \rawurlencode($roomSid) . '/Participants/' . \rawurlencode($sid) . '';
+ $this->solution = [
+ 'roomSid' =>
+ $roomSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Rooms/' . \rawurlencode($roomSid)
+ .'/Participants/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a ParticipantInstance
+ * Fetch the ParticipantInstance
*
* @return ParticipantInstance Fetched ParticipantInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): ParticipantInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new ParticipantInstance(
$this->version,
@@ -74,6 +92,7 @@ public function fetch()
);
}
+
/**
* Update the ParticipantInstance
*
@@ -81,18 +100,18 @@ public function fetch()
* @return ParticipantInstance Updated ParticipantInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ParticipantInstance
{
+
$options = new Values($options);
- $data = Values::of(array('Status' => $options['status'],));
+ $data = Values::of([
+ 'Status' =>
+ $options['status'],
+ ]);
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
return new ParticipantInstance(
$this->version,
@@ -102,30 +121,27 @@ public function update($options = array())
);
}
+
/**
- * Access the publishedTracks
- *
- * @return \Twilio\Rest\Video\V1\Room\Participant\PublishedTrackList
+ * Access the subscribeRules
*/
- protected function getPublishedTracks()
+ protected function getSubscribeRules(): SubscribeRulesList
{
- if (!$this->_publishedTracks) {
- $this->_publishedTracks = new PublishedTrackList(
+ if (!$this->_subscribeRules) {
+ $this->_subscribeRules = new SubscribeRulesList(
$this->version,
$this->solution['roomSid'],
$this->solution['sid']
);
}
- return $this->_publishedTracks;
+ return $this->_subscribeRules;
}
/**
* Access the subscribedTracks
- *
- * @return \Twilio\Rest\Video\V1\Room\Participant\SubscribedTrackList
*/
- protected function getSubscribedTracks()
+ protected function getSubscribedTracks(): SubscribedTrackList
{
if (!$this->_subscribedTracks) {
$this->_subscribedTracks = new SubscribedTrackList(
@@ -139,31 +155,45 @@ protected function getSubscribedTracks()
}
/**
- * Access the subscribeRules
- *
- * @return \Twilio\Rest\Video\V1\Room\Participant\SubscribeRulesList
+ * Access the publishedTracks
*/
- protected function getSubscribeRules()
+ protected function getPublishedTracks(): PublishedTrackList
{
- if (!$this->_subscribeRules) {
- $this->_subscribeRules = new SubscribeRulesList(
+ if (!$this->_publishedTracks) {
+ $this->_publishedTracks = new PublishedTrackList(
$this->version,
$this->solution['roomSid'],
$this->solution['sid']
);
}
- return $this->_subscribeRules;
+ return $this->_publishedTracks;
+ }
+
+ /**
+ * Access the anonymize
+ */
+ protected function getAnonymize(): AnonymizeList
+ {
+ if (!$this->_anonymize) {
+ $this->_anonymize = new AnonymizeList(
+ $this->version,
+ $this->solution['roomSid'],
+ $this->solution['sid']
+ );
+ }
+
+ return $this->_anonymize;
}
/**
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -178,10 +208,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -196,12 +226,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Video.V1.ParticipantContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/ParticipantInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/ParticipantInstance.php
index 6e4df1c..62a1952 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/ParticipantInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/ParticipantInstance.php
@@ -2,55 +2,68 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Video
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Video\V1\Room;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Video\V1\Room\Participant\SubscribeRulesList;
+use Twilio\Rest\Video\V1\Room\Participant\SubscribedTrackList;
+use Twilio\Rest\Video\V1\Room\Participant\PublishedTrackList;
+use Twilio\Rest\Video\V1\Room\Participant\AnonymizeList;
+
/**
- * @property string $sid
- * @property string $roomSid
- * @property string $accountSid
+ * @property string|null $sid
+ * @property string|null $roomSid
+ * @property string|null $accountSid
* @property string $status
- * @property string $identity
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property \DateTime $startTime
- * @property \DateTime $endTime
- * @property int $duration
- * @property string $url
- * @property array $links
+ * @property string|null $identity
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property \DateTime|null $startTime
+ * @property \DateTime|null $endTime
+ * @property int|null $duration
+ * @property string|null $url
+ * @property array|null $links
*/
class ParticipantInstance extends InstanceResource
{
- protected $_publishedTracks = null;
- protected $_subscribedTracks = null;
- protected $_subscribeRules = null;
+ protected $_subscribeRules;
+ protected $_subscribedTracks;
+ protected $_publishedTracks;
+ protected $_anonymize;
/**
* Initialize the ParticipantInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $roomSid The SID of the participant's room
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Video\V1\Room\ParticipantInstance
+ * @param string $roomSid The SID of the room with the Participant resource to fetch.
+ * @param string $sid The SID of the RoomParticipant resource to fetch.
*/
- public function __construct(Version $version, array $payload, $roomSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $roomSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'roomSid' => Values::array_get($payload, 'room_sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
@@ -63,19 +76,18 @@ public function __construct(Version $version, array $payload, $roomSid, $sid = n
'duration' => Values::array_get($payload, 'duration'),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('roomSid' => $roomSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['roomSid' => $roomSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Video\V1\Room\ParticipantContext Context for this
- * ParticipantInstance
+ * @return ParticipantContext Context for this ParticipantInstance
*/
- protected function proxy()
+ protected function proxy(): ParticipantContext
{
if (!$this->context) {
$this->context = new ParticipantContext(
@@ -89,13 +101,14 @@ protected function proxy()
}
/**
- * Fetch a ParticipantInstance
+ * Fetch the ParticipantInstance
*
* @return ParticipantInstance Fetched ParticipantInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): ParticipantInstance
{
+
return $this->proxy()->fetch();
}
@@ -106,39 +119,42 @@ public function fetch()
* @return ParticipantInstance Updated ParticipantInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): ParticipantInstance
{
+
return $this->proxy()->update($options);
}
/**
- * Access the publishedTracks
- *
- * @return \Twilio\Rest\Video\V1\Room\Participant\PublishedTrackList
+ * Access the subscribeRules
*/
- protected function getPublishedTracks()
+ protected function getSubscribeRules(): SubscribeRulesList
{
- return $this->proxy()->publishedTracks;
+ return $this->proxy()->subscribeRules;
}
/**
* Access the subscribedTracks
- *
- * @return \Twilio\Rest\Video\V1\Room\Participant\SubscribedTrackList
*/
- protected function getSubscribedTracks()
+ protected function getSubscribedTracks(): SubscribedTrackList
{
return $this->proxy()->subscribedTracks;
}
/**
- * Access the subscribeRules
- *
- * @return \Twilio\Rest\Video\V1\Room\Participant\SubscribeRulesList
+ * Access the publishedTracks
*/
- protected function getSubscribeRules()
+ protected function getPublishedTracks(): PublishedTrackList
{
- return $this->proxy()->subscribeRules;
+ return $this->proxy()->publishedTracks;
+ }
+
+ /**
+ * Access the anonymize
+ */
+ protected function getAnonymize(): AnonymizeList
+ {
+ return $this->proxy()->anonymize;
}
/**
@@ -148,7 +164,7 @@ protected function getSubscribeRules()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -167,12 +183,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Video.V1.ParticipantInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/ParticipantList.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/ParticipantList.php
index 60ad632..f76e23e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/ParticipantList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/ParticipantList.php
@@ -2,36 +2,72 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Video
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Video\V1\Room;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class ParticipantList extends ListResource
-{
+ {
/**
* Construct the ParticipantList
*
* @param Version $version Version that contains the resource
- * @param string $roomSid The SID of the participant's room
- * @return \Twilio\Rest\Video\V1\Room\ParticipantList
+ * @param string $roomSid The SID of the room with the Participant resource to fetch.
*/
- public function __construct(Version $version, $roomSid)
- {
+ public function __construct(
+ Version $version,
+ string $roomSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('roomSid' => $roomSid,);
+ $this->solution = [
+ 'roomSid' =>
+ $roomSid,
+
+ ];
+
+ $this->uri = '/Rooms/' . \rawurlencode($roomSid)
+ .'/Participants';
+ }
- $this->uri = '/Rooms/' . \rawurlencode($roomSid) . '/Participants';
+ /**
+ * Reads ParticipantInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return ParticipantInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -51,9 +87,9 @@ public function __construct(Version $version, $roomSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -62,55 +98,39 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads ParticipantInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return ParticipantInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of ParticipantInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of ParticipantInstance
+ * @return ParticipantPage Page of ParticipantInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): ParticipantPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Status' => $options['status'],
- 'Identity' => $options['identity'],
- 'DateCreatedAfter' => Serialize::iso8601DateTime($options['dateCreatedAfter']),
- 'DateCreatedBefore' => Serialize::iso8601DateTime($options['dateCreatedBefore']),
+
+ $params = Values::of([
+ 'Status' =>
+ $options['status'],
+ 'Identity' =>
+ $options['identity'],
+ 'DateCreatedAfter' =>
+ Serialize::iso8601DateTime($options['dateCreatedAfter']),
+ 'DateCreatedBefore' =>
+ Serialize::iso8601DateTime($options['dateCreatedBefore']),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new ParticipantPage($this->version, $response, $this->solution);
}
@@ -120,9 +140,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of ParticipantInstance
+ * @return ParticipantPage Page of ParticipantInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): ParticipantPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -132,15 +152,22 @@ public function getPage($targetUrl)
return new ParticipantPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a ParticipantContext
*
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Video\V1\Room\ParticipantContext
+ * @param string $sid The SID of the RoomParticipant resource to fetch.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): ParticipantContext
{
- return new ParticipantContext($this->version, $this->solution['roomSid'], $sid);
+ return new ParticipantContext(
+ $this->version,
+ $this->solution['roomSid'],
+ $sid
+ );
}
/**
@@ -148,8 +175,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Video.V1.ParticipantList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/ParticipantOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/ParticipantOptions.php
index 7255642..9b7a71b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/ParticipantOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/ParticipantOptions.php
@@ -1,10 +1,16 @@
options['status'] = $status;
$this->options['identity'] = $identity;
$this->options['dateCreatedAfter'] = $dateCreatedAfter;
@@ -61,10 +88,10 @@ public function __construct($status = Values::NONE, $identity = Values::NONE, $d
/**
* Read only the participants with this status. Can be: `connected` or `disconnected`. For `in-progress` Rooms the default Status is `connected`, for `completed` Rooms only `disconnected` Participants are returned.
*
- * @param string $status Read only the participants with this status
+ * @param string $status Read only the participants with this status. Can be: `connected` or `disconnected`. For `in-progress` Rooms the default Status is `connected`, for `completed` Rooms only `disconnected` Participants are returned.
* @return $this Fluent Builder
*/
- public function setStatus($status)
+ public function setStatus(string $status): self
{
$this->options['status'] = $status;
return $this;
@@ -73,11 +100,10 @@ public function setStatus($status)
/**
* Read only the Participants with this [User](https://www.twilio.com/docs/chat/rest/user-resource) `identity` value.
*
- * @param string $identity Read only the Participants with this user identity
- * value
+ * @param string $identity Read only the Participants with this [User](https://www.twilio.com/docs/chat/rest/user-resource) `identity` value.
* @return $this Fluent Builder
*/
- public function setIdentity($identity)
+ public function setIdentity(string $identity): self
{
$this->options['identity'] = $identity;
return $this;
@@ -86,11 +112,10 @@ public function setIdentity($identity)
/**
* Read only Participants that started after this date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#UTC) format.
*
- * @param \DateTime $dateCreatedAfter Read only Participants that started after
- * this date in UTC ISO 8601 format
+ * @param \DateTime $dateCreatedAfter Read only Participants that started after this date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#UTC) format.
* @return $this Fluent Builder
*/
- public function setDateCreatedAfter($dateCreatedAfter)
+ public function setDateCreatedAfter(\DateTime $dateCreatedAfter): self
{
$this->options['dateCreatedAfter'] = $dateCreatedAfter;
return $this;
@@ -99,11 +124,10 @@ public function setDateCreatedAfter($dateCreatedAfter)
/**
* Read only Participants that started before this date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#UTC) format.
*
- * @param \DateTime $dateCreatedBefore Read only Participants that started
- * before this date in ISO 8601 format
+ * @param \DateTime $dateCreatedBefore Read only Participants that started before this date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#UTC) format.
* @return $this Fluent Builder
*/
- public function setDateCreatedBefore($dateCreatedBefore)
+ public function setDateCreatedBefore(\DateTime $dateCreatedBefore): self
{
$this->options['dateCreatedBefore'] = $dateCreatedBefore;
return $this;
@@ -114,35 +138,31 @@ public function setDateCreatedBefore($dateCreatedBefore)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Video.V1.ReadParticipantOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Video.V1.ReadParticipantOptions ' . $options . ']';
}
}
class UpdateParticipantOptions extends Options
-{
+ {
/**
- * @param string $status The new status of the resource
+ * @param string $status
*/
- public function __construct($status = Values::NONE)
- {
+ public function __construct(
+
+ string $status = Values::NONE
+
+ ) {
$this->options['status'] = $status;
}
/**
- * The new status of the resource. Can be: `connected` or `disconnected`. For `in-progress` Rooms the default Status is `connected`, for `completed` Rooms only `disconnected` Participants are returned.
- *
- * @param string $status The new status of the resource
+ * @param string $status
* @return $this Fluent Builder
*/
- public function setStatus($status)
+ public function setStatus(string $status): self
{
$this->options['status'] = $status;
return $this;
@@ -153,14 +173,10 @@ public function setStatus($status)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Video.V1.UpdateParticipantOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Video.V1.UpdateParticipantOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/ParticipantPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/ParticipantPage.php
index 176147f..63f45f8 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/ParticipantPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/ParticipantPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return ParticipantInstance \Twilio\Rest\Video\V1\Room\ParticipantInstance
+ */
+ public function buildInstance(array $payload): ParticipantInstance
{
return new ParticipantInstance($this->version, $payload, $this->solution['roomSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Video.V1.ParticipantPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/RoomRecordingContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/RoomRecordingContext.php
index 263cdd5..e77b551 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/RoomRecordingContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/RoomRecordingContext.php
@@ -2,54 +2,81 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Video
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Video\V1\Room;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class RoomRecordingContext extends InstanceContext
-{
+ {
/**
* Initialize the RoomRecordingContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $roomSid The SID of the Room resource with the recording to
- * fetch
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Video\V1\Room\RoomRecordingContext
+ * @param Version $version Version that contains the resource
+ * @param string $roomSid The SID of the room with the RoomRecording resource to delete.
+ * @param string $sid The SID of the RoomRecording resource to delete.
*/
- public function __construct(Version $version, $roomSid, $sid)
- {
+ public function __construct(
+ Version $version,
+ $roomSid,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('roomSid' => $roomSid, 'sid' => $sid,);
+ $this->solution = [
+ 'roomSid' =>
+ $roomSid,
+ 'sid' =>
+ $sid,
+ ];
+
+ $this->uri = '/Rooms/' . \rawurlencode($roomSid)
+ .'/Recordings/' . \rawurlencode($sid)
+ .'';
+ }
+
+ /**
+ * Delete the RoomRecordingInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
- $this->uri = '/Rooms/' . \rawurlencode($roomSid) . '/Recordings/' . \rawurlencode($sid) . '';
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Fetch a RoomRecordingInstance
+ * Fetch the RoomRecordingInstance
*
* @return RoomRecordingInstance Fetched RoomRecordingInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): RoomRecordingInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
return new RoomRecordingInstance(
$this->version,
@@ -59,28 +86,18 @@ public function fetch()
);
}
- /**
- * Deletes the RoomRecordingInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
- */
- public function delete()
- {
- return $this->version->delete('delete', $this->uri);
- }
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Video.V1.RoomRecordingContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/RoomRecordingInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/RoomRecordingInstance.php
index 512375c..748d05a 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/RoomRecordingInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/RoomRecordingInstance.php
@@ -2,55 +2,63 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Video
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Video\V1\Room;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $accountSid
+ * @property string|null $accountSid
* @property string $status
- * @property \DateTime $dateCreated
- * @property string $sid
- * @property string $sourceSid
- * @property string $size
- * @property string $url
+ * @property \DateTime|null $dateCreated
+ * @property string|null $sid
+ * @property string|null $sourceSid
+ * @property int|null $size
+ * @property string|null $url
* @property string $type
- * @property int $duration
+ * @property int|null $duration
* @property string $containerFormat
* @property string $codec
- * @property array $groupingSids
- * @property string $trackName
- * @property string $offset
- * @property string $roomSid
- * @property array $links
+ * @property array|null $groupingSids
+ * @property string|null $trackName
+ * @property int|null $offset
+ * @property string|null $mediaExternalLocation
+ * @property string|null $roomSid
+ * @property array|null $links
*/
class RoomRecordingInstance extends InstanceResource
{
/**
* Initialize the RoomRecordingInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $roomSid The SID of the Room resource the recording is
- * associated with
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Video\V1\Room\RoomRecordingInstance
+ * @param string $roomSid The SID of the room with the RoomRecording resource to delete.
+ * @param string $sid The SID of the RoomRecording resource to delete.
*/
- public function __construct(Version $version, array $payload, $roomSid, $sid = null)
+ public function __construct(Version $version, array $payload, string $roomSid, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'status' => Values::array_get($payload, 'status'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
@@ -65,21 +73,21 @@ public function __construct(Version $version, array $payload, $roomSid, $sid = n
'groupingSids' => Values::array_get($payload, 'grouping_sids'),
'trackName' => Values::array_get($payload, 'track_name'),
'offset' => Values::array_get($payload, 'offset'),
+ 'mediaExternalLocation' => Values::array_get($payload, 'media_external_location'),
'roomSid' => Values::array_get($payload, 'room_sid'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('roomSid' => $roomSid, 'sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['roomSid' => $roomSid, 'sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Video\V1\Room\RoomRecordingContext Context for this
- * RoomRecordingInstance
+ * @return RoomRecordingContext Context for this RoomRecordingInstance
*/
- protected function proxy()
+ protected function proxy(): RoomRecordingContext
{
if (!$this->context) {
$this->context = new RoomRecordingContext(
@@ -93,25 +101,27 @@ protected function proxy()
}
/**
- * Fetch a RoomRecordingInstance
+ * Delete the RoomRecordingInstance
*
- * @return RoomRecordingInstance Fetched RoomRecordingInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the RoomRecordingInstance
+ * Fetch the RoomRecordingInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return RoomRecordingInstance Fetched RoomRecordingInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): RoomRecordingInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -121,7 +131,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -140,12 +150,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Video.V1.RoomRecordingInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/RoomRecordingList.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/RoomRecordingList.php
index 89fba49..5f9d6ca 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/RoomRecordingList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/RoomRecordingList.php
@@ -2,37 +2,72 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Video
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Video\V1\Room;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class RoomRecordingList extends ListResource
-{
+ {
/**
* Construct the RoomRecordingList
*
* @param Version $version Version that contains the resource
- * @param string $roomSid The SID of the Room resource the recording is
- * associated with
- * @return \Twilio\Rest\Video\V1\Room\RoomRecordingList
+ * @param string $roomSid The SID of the room with the RoomRecording resource to delete.
*/
- public function __construct(Version $version, $roomSid)
- {
+ public function __construct(
+ Version $version,
+ string $roomSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('roomSid' => $roomSid,);
+ $this->solution = [
+ 'roomSid' =>
+ $roomSid,
+
+ ];
+
+ $this->uri = '/Rooms/' . \rawurlencode($roomSid)
+ .'/Recordings';
+ }
- $this->uri = '/Rooms/' . \rawurlencode($roomSid) . '/Recordings';
+ /**
+ * Reads RoomRecordingInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return RoomRecordingInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -52,9 +87,9 @@ public function __construct(Version $version, $roomSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -63,55 +98,39 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads RoomRecordingInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return RoomRecordingInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of RoomRecordingInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of RoomRecordingInstance
+ * @return RoomRecordingPage Page of RoomRecordingInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): RoomRecordingPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Status' => $options['status'],
- 'SourceSid' => $options['sourceSid'],
- 'DateCreatedAfter' => Serialize::iso8601DateTime($options['dateCreatedAfter']),
- 'DateCreatedBefore' => Serialize::iso8601DateTime($options['dateCreatedBefore']),
+
+ $params = Values::of([
+ 'Status' =>
+ $options['status'],
+ 'SourceSid' =>
+ $options['sourceSid'],
+ 'DateCreatedAfter' =>
+ Serialize::iso8601DateTime($options['dateCreatedAfter']),
+ 'DateCreatedBefore' =>
+ Serialize::iso8601DateTime($options['dateCreatedBefore']),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new RoomRecordingPage($this->version, $response, $this->solution);
}
@@ -121,9 +140,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of RoomRecordingInstance
+ * @return RoomRecordingPage Page of RoomRecordingInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): RoomRecordingPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -133,15 +152,22 @@ public function getPage($targetUrl)
return new RoomRecordingPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a RoomRecordingContext
*
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Video\V1\Room\RoomRecordingContext
+ * @param string $sid The SID of the RoomRecording resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): RoomRecordingContext
{
- return new RoomRecordingContext($this->version, $this->solution['roomSid'], $sid);
+ return new RoomRecordingContext(
+ $this->version,
+ $this->solution['roomSid'],
+ $sid
+ );
}
/**
@@ -149,8 +175,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Video.V1.RoomRecordingList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/RoomRecordingOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/RoomRecordingOptions.php
index e758074..35fde86 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/RoomRecordingOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/RoomRecordingOptions.php
@@ -1,10 +1,16 @@
options['status'] = $status;
$this->options['sourceSid'] = $sourceSid;
$this->options['dateCreatedAfter'] = $dateCreatedAfter;
@@ -52,10 +75,10 @@ public function __construct($status = Values::NONE, $sourceSid = Values::NONE, $
/**
* Read only the recordings with this status. Can be: `processing`, `completed`, or `deleted`.
*
- * @param string $status Read only the recordings with this status
+ * @param string $status Read only the recordings with this status. Can be: `processing`, `completed`, or `deleted`.
* @return $this Fluent Builder
*/
- public function setStatus($status)
+ public function setStatus(string $status): self
{
$this->options['status'] = $status;
return $this;
@@ -64,10 +87,10 @@ public function setStatus($status)
/**
* Read only the recordings that have this `source_sid`.
*
- * @param string $sourceSid Read only the recordings that have this source_sid
+ * @param string $sourceSid Read only the recordings that have this `source_sid`.
* @return $this Fluent Builder
*/
- public function setSourceSid($sourceSid)
+ public function setSourceSid(string $sourceSid): self
{
$this->options['sourceSid'] = $sourceSid;
return $this;
@@ -76,12 +99,10 @@ public function setSourceSid($sourceSid)
/**
* Read only recordings that started on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with time zone.
*
- * @param \DateTime $dateCreatedAfter Read only Recordings that started on or
- * after this ISO 8601 datetime with time
- * zone
+ * @param \DateTime $dateCreatedAfter Read only recordings that started on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with time zone.
* @return $this Fluent Builder
*/
- public function setDateCreatedAfter($dateCreatedAfter)
+ public function setDateCreatedAfter(\DateTime $dateCreatedAfter): self
{
$this->options['dateCreatedAfter'] = $dateCreatedAfter;
return $this;
@@ -90,11 +111,10 @@ public function setDateCreatedAfter($dateCreatedAfter)
/**
* Read only Recordings that started before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with time zone.
*
- * @param \DateTime $dateCreatedBefore Read only Recordings that started before
- * this ISO 8601 date-time with time zone
+ * @param \DateTime $dateCreatedBefore Read only Recordings that started before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime with time zone.
* @return $this Fluent Builder
*/
- public function setDateCreatedBefore($dateCreatedBefore)
+ public function setDateCreatedBefore(\DateTime $dateCreatedBefore): self
{
$this->options['dateCreatedBefore'] = $dateCreatedBefore;
return $this;
@@ -105,14 +125,10 @@ public function setDateCreatedBefore($dateCreatedBefore)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Video.V1.ReadRoomRecordingOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Video.V1.ReadRoomRecordingOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/RoomRecordingPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/RoomRecordingPage.php
index b4011e0..9fa95c2 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/RoomRecordingPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/Room/RoomRecordingPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return RoomRecordingInstance \Twilio\Rest\Video\V1\Room\RoomRecordingInstance
+ */
+ public function buildInstance(array $payload): RoomRecordingInstance
{
return new RoomRecordingInstance($this->version, $payload, $this->solution['roomSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Video.V1.RoomRecordingPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RoomContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RoomContext.php
index 44b85d8..df2773f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RoomContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RoomContext.php
@@ -2,124 +2,165 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Video
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Video\V1;
use Twilio\Exceptions\TwilioException;
+use Twilio\ListResource;
+use Twilio\Values;
+use Twilio\Version;
use Twilio\InstanceContext;
+use Twilio\Rest\Video\V1\Room\RecordingRulesList;
use Twilio\Rest\Video\V1\Room\ParticipantList;
use Twilio\Rest\Video\V1\Room\RoomRecordingList;
-use Twilio\Values;
-use Twilio\Version;
+
/**
- * @property \Twilio\Rest\Video\V1\Room\RoomRecordingList $recordings
- * @property \Twilio\Rest\Video\V1\Room\ParticipantList $participants
- * @method \Twilio\Rest\Video\V1\Room\RoomRecordingContext recordings(string $sid)
+ * @property RecordingRulesList $recordingRules
+ * @property ParticipantList $participants
+ * @property RoomRecordingList $recordings
* @method \Twilio\Rest\Video\V1\Room\ParticipantContext participants(string $sid)
+ * @method \Twilio\Rest\Video\V1\Room\RoomRecordingContext recordings(string $sid)
*/
class RoomContext extends InstanceContext
-{
- protected $_recordings = null;
- protected $_participants = null;
+ {
+ protected $_recordingRules;
+ protected $_participants;
+ protected $_recordings;
/**
* Initialize the RoomContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Video\V1\RoomContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid The SID of the Room resource to fetch.
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Rooms/' . \rawurlencode($sid) . '';
+ $this->uri = '/Rooms/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a RoomInstance
+ * Fetch the RoomInstance
*
* @return RoomInstance Fetched RoomInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): RoomInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
- return new RoomInstance($this->version, $payload, $this->solution['sid']);
+ return new RoomInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Update the RoomInstance
*
- * @param string $status The new status of the resource
+ * @param string $status
* @return RoomInstance Updated RoomInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($status)
+ public function update(string $status): RoomInstance
{
- $data = Values::of(array('Status' => $status,));
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'Status' =>
+ $status,
+ ]);
- return new RoomInstance($this->version, $payload, $this->solution['sid']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
+
+ return new RoomInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
- * Access the recordings
- *
- * @return \Twilio\Rest\Video\V1\Room\RoomRecordingList
+ * Access the recordingRules
*/
- protected function getRecordings()
+ protected function getRecordingRules(): RecordingRulesList
{
- if (!$this->_recordings) {
- $this->_recordings = new RoomRecordingList($this->version, $this->solution['sid']);
+ if (!$this->_recordingRules) {
+ $this->_recordingRules = new RecordingRulesList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_recordings;
+ return $this->_recordingRules;
}
/**
* Access the participants
- *
- * @return \Twilio\Rest\Video\V1\Room\ParticipantList
*/
- protected function getParticipants()
+ protected function getParticipants(): ParticipantList
{
if (!$this->_participants) {
- $this->_participants = new ParticipantList($this->version, $this->solution['sid']);
+ $this->_participants = new ParticipantList(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->_participants;
}
+ /**
+ * Access the recordings
+ */
+ protected function getRecordings(): RoomRecordingList
+ {
+ if (!$this->_recordings) {
+ $this->_recordings = new RoomRecordingList(
+ $this->version,
+ $this->solution['sid']
+ );
+ }
+
+ return $this->_recordings;
+ }
+
/**
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -134,10 +175,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -152,12 +193,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Video.V1.RoomContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RoomInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RoomInstance.php
index 8f8e053..cbccc2b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RoomInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RoomInstance.php
@@ -2,58 +2,76 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Video
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Video\V1;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Video\V1\Room\RecordingRulesList;
+use Twilio\Rest\Video\V1\Room\ParticipantList;
+use Twilio\Rest\Video\V1\Room\RoomRecordingList;
+
/**
- * @property string $sid
+ * @property string|null $sid
* @property string $status
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $accountSid
- * @property bool $enableTurn
- * @property string $uniqueName
- * @property string $statusCallback
- * @property string $statusCallbackMethod
- * @property \DateTime $endTime
- * @property int $duration
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $accountSid
+ * @property bool|null $enableTurn
+ * @property string|null $uniqueName
+ * @property string|null $statusCallback
+ * @property string|null $statusCallbackMethod
+ * @property \DateTime|null $endTime
+ * @property int|null $duration
* @property string $type
* @property int $maxParticipants
- * @property bool $recordParticipantsOnConnect
- * @property string $videoCodecs
- * @property string $mediaRegion
- * @property string $url
- * @property array $links
+ * @property int $maxParticipantDuration
+ * @property int|null $maxConcurrentPublishedTracks
+ * @property bool|null $recordParticipantsOnConnect
+ * @property string[]|null $videoCodecs
+ * @property string|null $mediaRegion
+ * @property bool|null $audioOnly
+ * @property int $emptyRoomTimeout
+ * @property int $unusedRoomTimeout
+ * @property bool|null $largeRoom
+ * @property string|null $url
+ * @property array|null $links
*/
class RoomInstance extends InstanceResource
{
- protected $_recordings = null;
- protected $_participants = null;
+ protected $_recordingRules;
+ protected $_participants;
+ protected $_recordings;
/**
* Initialize the RoomInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Video\V1\RoomInstance
+ * @param string $sid The SID of the Room resource to fetch.
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'status' => Values::array_get($payload, 'status'),
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
@@ -67,74 +85,89 @@ public function __construct(Version $version, array $payload, $sid = null)
'duration' => Values::array_get($payload, 'duration'),
'type' => Values::array_get($payload, 'type'),
'maxParticipants' => Values::array_get($payload, 'max_participants'),
+ 'maxParticipantDuration' => Values::array_get($payload, 'max_participant_duration'),
+ 'maxConcurrentPublishedTracks' => Values::array_get($payload, 'max_concurrent_published_tracks'),
'recordParticipantsOnConnect' => Values::array_get($payload, 'record_participants_on_connect'),
'videoCodecs' => Values::array_get($payload, 'video_codecs'),
'mediaRegion' => Values::array_get($payload, 'media_region'),
+ 'audioOnly' => Values::array_get($payload, 'audio_only'),
+ 'emptyRoomTimeout' => Values::array_get($payload, 'empty_room_timeout'),
+ 'unusedRoomTimeout' => Values::array_get($payload, 'unused_room_timeout'),
+ 'largeRoom' => Values::array_get($payload, 'large_room'),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Video\V1\RoomContext Context for this RoomInstance
+ * @return RoomContext Context for this RoomInstance
*/
- protected function proxy()
+ protected function proxy(): RoomContext
{
if (!$this->context) {
- $this->context = new RoomContext($this->version, $this->solution['sid']);
+ $this->context = new RoomContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a RoomInstance
+ * Fetch the RoomInstance
*
* @return RoomInstance Fetched RoomInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): RoomInstance
{
+
return $this->proxy()->fetch();
}
/**
* Update the RoomInstance
*
- * @param string $status The new status of the resource
+ * @param string $status
* @return RoomInstance Updated RoomInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($status)
+ public function update(string $status): RoomInstance
{
+
return $this->proxy()->update($status);
}
/**
- * Access the recordings
- *
- * @return \Twilio\Rest\Video\V1\Room\RoomRecordingList
+ * Access the recordingRules
*/
- protected function getRecordings()
+ protected function getRecordingRules(): RecordingRulesList
{
- return $this->proxy()->recordings;
+ return $this->proxy()->recordingRules;
}
/**
* Access the participants
- *
- * @return \Twilio\Rest\Video\V1\Room\ParticipantList
*/
- protected function getParticipants()
+ protected function getParticipants(): ParticipantList
{
return $this->proxy()->participants;
}
+ /**
+ * Access the recordings
+ */
+ protected function getRecordings(): RoomRecordingList
+ {
+ return $this->proxy()->recordings;
+ }
+
/**
* Magic getter to access properties
*
@@ -142,7 +175,7 @@ protected function getParticipants()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -161,12 +194,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Video.V1.RoomInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RoomList.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RoomList.php
index a670cb2..e3f2242 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RoomList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RoomList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Video
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Video\V1;
@@ -12,61 +19,105 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class RoomList extends ListResource
-{
+ {
/**
* Construct the RoomList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Video\V1\RoomList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/Rooms';
}
/**
- * Create a new RoomInstance
+ * Create the RoomInstance
*
* @param array|Options $options Optional Arguments
- * @return RoomInstance Newly created RoomInstance
+ * @return RoomInstance Created RoomInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($options = array())
+ public function create(array $options = []): RoomInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'EnableTurn' => Serialize::booleanToString($options['enableTurn']),
- 'Type' => $options['type'],
- 'UniqueName' => $options['uniqueName'],
- 'StatusCallback' => $options['statusCallback'],
- 'StatusCallbackMethod' => $options['statusCallbackMethod'],
- 'MaxParticipants' => $options['maxParticipants'],
- 'RecordParticipantsOnConnect' => Serialize::booleanToString($options['recordParticipantsOnConnect']),
- 'VideoCodecs' => Serialize::map($options['videoCodecs'], function ($e) {
- return $e;
- }),
- 'MediaRegion' => $options['mediaRegion'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
+ $data = Values::of([
+ 'EnableTurn' =>
+ Serialize::booleanToString($options['enableTurn']),
+ 'Type' =>
+ $options['type'],
+ 'UniqueName' =>
+ $options['uniqueName'],
+ 'StatusCallback' =>
+ $options['statusCallback'],
+ 'StatusCallbackMethod' =>
+ $options['statusCallbackMethod'],
+ 'MaxParticipants' =>
+ $options['maxParticipants'],
+ 'RecordParticipantsOnConnect' =>
+ Serialize::booleanToString($options['recordParticipantsOnConnect']),
+ 'VideoCodecs' =>
+ $options['videoCodecs'],
+ 'MediaRegion' =>
+ $options['mediaRegion'],
+ 'RecordingRules' =>
+ Serialize::jsonObject($options['recordingRules']),
+ 'AudioOnly' =>
+ Serialize::booleanToString($options['audioOnly']),
+ 'MaxParticipantDuration' =>
+ $options['maxParticipantDuration'],
+ 'EmptyRoomTimeout' =>
+ $options['emptyRoomTimeout'],
+ 'UnusedRoomTimeout' =>
+ $options['unusedRoomTimeout'],
+ 'LargeRoom' =>
+ Serialize::booleanToString($options['largeRoom']),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new RoomInstance(
+ $this->version,
+ $payload
);
+ }
- return new RoomInstance($this->version, $payload);
+
+ /**
+ * Reads RoomInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return RoomInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -86,9 +137,9 @@ public function create($options = array())
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -97,55 +148,39 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads RoomInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return RoomInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of RoomInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of RoomInstance
+ * @return RoomPage Page of RoomInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): RoomPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Status' => $options['status'],
- 'UniqueName' => $options['uniqueName'],
- 'DateCreatedAfter' => Serialize::iso8601DateTime($options['dateCreatedAfter']),
- 'DateCreatedBefore' => Serialize::iso8601DateTime($options['dateCreatedBefore']),
+
+ $params = Values::of([
+ 'Status' =>
+ $options['status'],
+ 'UniqueName' =>
+ $options['uniqueName'],
+ 'DateCreatedAfter' =>
+ Serialize::iso8601DateTime($options['dateCreatedAfter']),
+ 'DateCreatedBefore' =>
+ Serialize::iso8601DateTime($options['dateCreatedBefore']),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new RoomPage($this->version, $response, $this->solution);
}
@@ -155,9 +190,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of RoomInstance
+ * @return RoomPage Page of RoomInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): RoomPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -167,15 +202,21 @@ public function getPage($targetUrl)
return new RoomPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a RoomContext
*
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Video\V1\RoomContext
+ * @param string $sid The SID of the Room resource to fetch.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): RoomContext
{
- return new RoomContext($this->version, $sid);
+ return new RoomContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -183,8 +224,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Video.V1.RoomList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RoomOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RoomOptions.php
index ec250b3..b5d4880 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RoomOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RoomOptions.php
@@ -1,10 +1,16 @@
options['enableTurn'] = $enableTurn;
$this->options['type'] = $type;
$this->options['uniqueName'] = $uniqueName;
@@ -82,151 +152,221 @@ public function __construct($enableTurn = Values::NONE, $type = Values::NONE, $u
$this->options['recordParticipantsOnConnect'] = $recordParticipantsOnConnect;
$this->options['videoCodecs'] = $videoCodecs;
$this->options['mediaRegion'] = $mediaRegion;
+ $this->options['recordingRules'] = $recordingRules;
+ $this->options['audioOnly'] = $audioOnly;
+ $this->options['maxParticipantDuration'] = $maxParticipantDuration;
+ $this->options['emptyRoomTimeout'] = $emptyRoomTimeout;
+ $this->options['unusedRoomTimeout'] = $unusedRoomTimeout;
+ $this->options['largeRoom'] = $largeRoom;
}
/**
- * Deprecated. Whether to enable [Twilio's Network Traversal TURN service](https://www.twilio.com/stun-turn). TURN service is used when direct peer-to-peer media connections cannot be established due to firewall restrictions. This setting only applies to rooms with type `peer-to-peer`.
+ * Deprecated, now always considered to be true.
*
- * @param bool $enableTurn Enable Twilio's Network Traversal TURN service
+ * @param bool $enableTurn Deprecated, now always considered to be true.
* @return $this Fluent Builder
*/
- public function setEnableTurn($enableTurn)
+ public function setEnableTurn(bool $enableTurn): self
{
$this->options['enableTurn'] = $enableTurn;
return $this;
}
/**
- * The type of room. Can be: `peer-to-peer`, `group-small`, or `group`. The default value is `group`.
- *
- * @param string $type The type of room
+ * @param string $type
* @return $this Fluent Builder
*/
- public function setType($type)
+ public function setType(string $type): self
{
$this->options['type'] = $type;
return $this;
}
/**
- * An application-defined string that uniquely identifies the resource. It can be used as a `room_sid` in place of the resource's `sid` in the URL to address the resource. This value is unique for `in-progress` rooms. SDK clients can use this name to connect to the room. REST API clients can use this name in place of the Room SID to interact with the room as long as the room is `in-progress`.
+ * An application-defined string that uniquely identifies the resource. It can be used as a `room_sid` in place of the resource's `sid` in the URL to address the resource, assuming it does not contain any [reserved characters](https://tools.ietf.org/html/rfc3986#section-2.2) that would need to be URL encoded. This value is unique for `in-progress` rooms. SDK clients can use this name to connect to the room. REST API clients can use this name in place of the Room SID to interact with the room as long as the room is `in-progress`.
*
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the resource
+ * @param string $uniqueName An application-defined string that uniquely identifies the resource. It can be used as a `room_sid` in place of the resource's `sid` in the URL to address the resource, assuming it does not contain any [reserved characters](https://tools.ietf.org/html/rfc3986#section-2.2) that would need to be URL encoded. This value is unique for `in-progress` rooms. SDK clients can use this name to connect to the room. REST API clients can use this name in place of the Room SID to interact with the room as long as the room is `in-progress`.
* @return $this Fluent Builder
*/
- public function setUniqueName($uniqueName)
+ public function setUniqueName(string $uniqueName): self
{
$this->options['uniqueName'] = $uniqueName;
return $this;
}
/**
- * The URL we should call using the `status_callback_method` to send status information to your application on every room event. See [Status Callbacks](https://www.twilio.com/docs/video/api/status-callbacks) for more info.
+ * The URL Twilio should call using the `status_callback_method` to send status information to your application on every room event. See [Status Callbacks](https://www.twilio.com/docs/video/api/status-callbacks) for more info.
*
- * @param string $statusCallback The URL to send status information to your
- * application
+ * @param string $statusCallback The URL Twilio should call using the `status_callback_method` to send status information to your application on every room event. See [Status Callbacks](https://www.twilio.com/docs/video/api/status-callbacks) for more info.
* @return $this Fluent Builder
*/
- public function setStatusCallback($statusCallback)
+ public function setStatusCallback(string $statusCallback): self
{
$this->options['statusCallback'] = $statusCallback;
return $this;
}
/**
- * The HTTP method we should use to call `status_callback`. Can be `POST` or `GET`.
+ * The HTTP method Twilio should use to call `status_callback`. Can be `POST` or `GET`.
*
- * @param string $statusCallbackMethod The HTTP method we should use to call
- * status_callback
+ * @param string $statusCallbackMethod The HTTP method Twilio should use to call `status_callback`. Can be `POST` or `GET`.
* @return $this Fluent Builder
*/
- public function setStatusCallbackMethod($statusCallbackMethod)
+ public function setStatusCallbackMethod(string $statusCallbackMethod): self
{
$this->options['statusCallbackMethod'] = $statusCallbackMethod;
return $this;
}
/**
- * The maximum number of concurrent Participants allowed in the room. Peer-to-peer rooms can have up to 10 Participants. Small Group rooms can have up to 4 Participants. Group rooms can have up to 50 Participants.
+ * The maximum number of concurrent Participants allowed in the room. The maximum allowed value is 50.
*
- * @param int $maxParticipants The maximum number of concurrent Participants
- * allowed in the room
+ * @param int $maxParticipants The maximum number of concurrent Participants allowed in the room. The maximum allowed value is 50.
* @return $this Fluent Builder
*/
- public function setMaxParticipants($maxParticipants)
+ public function setMaxParticipants(int $maxParticipants): self
{
$this->options['maxParticipants'] = $maxParticipants;
return $this;
}
/**
- * Whether to start recording when Participants connect. ***This feature is not available in `peer-to-peer` rooms.***
+ * Whether to start recording when Participants connect.
*
- * @param bool $recordParticipantsOnConnect Whether to start recording when
- * Participants connect
+ * @param bool $recordParticipantsOnConnect Whether to start recording when Participants connect.
* @return $this Fluent Builder
*/
- public function setRecordParticipantsOnConnect($recordParticipantsOnConnect)
+ public function setRecordParticipantsOnConnect(bool $recordParticipantsOnConnect): self
{
$this->options['recordParticipantsOnConnect'] = $recordParticipantsOnConnect;
return $this;
}
/**
- * An array of the video codecs that are supported when publishing a track in the room. Can be: `VP8` and `H264`. ***This feature is not available in `peer-to-peer` rooms***
+ * An array of the video codecs that are supported when publishing a track in the room. Can be: `VP8` and `H264`.
*
- * @param string $videoCodecs An array of the video codecs that are supported
- * when publishing a track in the room
+ * @param string $videoCodecs An array of the video codecs that are supported when publishing a track in the room. Can be: `VP8` and `H264`.
* @return $this Fluent Builder
*/
- public function setVideoCodecs($videoCodecs)
+ public function setVideoCodecs(array $videoCodecs): self
{
$this->options['videoCodecs'] = $videoCodecs;
return $this;
}
/**
- * The region for the media server in Group Rooms. Can be: one of the [available Media Regions](https://www.twilio.com/docs/video/ip-address-whitelisting#group-rooms-media-servers). ***This feature is not available in `peer-to-peer` rooms.***
+ * The region for the Room's media server. Can be one of the [available Media Regions](https://www.twilio.com/docs/video/ip-addresses#group-rooms-media-servers).
*
- * @param string $mediaRegion The region for the media server in Group Rooms
+ * @param string $mediaRegion The region for the Room's media server. Can be one of the [available Media Regions](https://www.twilio.com/docs/video/ip-addresses#group-rooms-media-servers).
* @return $this Fluent Builder
*/
- public function setMediaRegion($mediaRegion)
+ public function setMediaRegion(string $mediaRegion): self
{
$this->options['mediaRegion'] = $mediaRegion;
return $this;
}
+ /**
+ * A collection of Recording Rules that describe how to include or exclude matching tracks for recording
+ *
+ * @param array $recordingRules A collection of Recording Rules that describe how to include or exclude matching tracks for recording
+ * @return $this Fluent Builder
+ */
+ public function setRecordingRules(array $recordingRules): self
+ {
+ $this->options['recordingRules'] = $recordingRules;
+ return $this;
+ }
+
+ /**
+ * When set to true, indicates that the participants in the room will only publish audio. No video tracks will be allowed.
+ *
+ * @param bool $audioOnly When set to true, indicates that the participants in the room will only publish audio. No video tracks will be allowed.
+ * @return $this Fluent Builder
+ */
+ public function setAudioOnly(bool $audioOnly): self
+ {
+ $this->options['audioOnly'] = $audioOnly;
+ return $this;
+ }
+
+ /**
+ * The maximum number of seconds a Participant can be connected to the room. The maximum possible value is 86400 seconds (24 hours). The default is 14400 seconds (4 hours).
+ *
+ * @param int $maxParticipantDuration The maximum number of seconds a Participant can be connected to the room. The maximum possible value is 86400 seconds (24 hours). The default is 14400 seconds (4 hours).
+ * @return $this Fluent Builder
+ */
+ public function setMaxParticipantDuration(int $maxParticipantDuration): self
+ {
+ $this->options['maxParticipantDuration'] = $maxParticipantDuration;
+ return $this;
+ }
+
+ /**
+ * Configures how long (in minutes) a room will remain active after last participant leaves. Valid values range from 1 to 60 minutes (no fractions).
+ *
+ * @param int $emptyRoomTimeout Configures how long (in minutes) a room will remain active after last participant leaves. Valid values range from 1 to 60 minutes (no fractions).
+ * @return $this Fluent Builder
+ */
+ public function setEmptyRoomTimeout(int $emptyRoomTimeout): self
+ {
+ $this->options['emptyRoomTimeout'] = $emptyRoomTimeout;
+ return $this;
+ }
+
+ /**
+ * Configures how long (in minutes) a room will remain active if no one joins. Valid values range from 1 to 60 minutes (no fractions).
+ *
+ * @param int $unusedRoomTimeout Configures how long (in minutes) a room will remain active if no one joins. Valid values range from 1 to 60 minutes (no fractions).
+ * @return $this Fluent Builder
+ */
+ public function setUnusedRoomTimeout(int $unusedRoomTimeout): self
+ {
+ $this->options['unusedRoomTimeout'] = $unusedRoomTimeout;
+ return $this;
+ }
+
+ /**
+ * When set to true, indicated that this is the large room.
+ *
+ * @param bool $largeRoom When set to true, indicated that this is the large room.
+ * @return $this Fluent Builder
+ */
+ public function setLargeRoom(bool $largeRoom): self
+ {
+ $this->options['largeRoom'] = $largeRoom;
+ return $this;
+ }
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Video.V1.CreateRoomOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Video.V1.CreateRoomOptions ' . $options . ']';
}
}
+
class ReadRoomOptions extends Options
-{
+ {
/**
- * @param string $status Read only the rooms with this status
- * @param string $uniqueName Read only rooms with this unique_name
- * @param \DateTime $dateCreatedAfter Read only rooms that started on or after
- * this date, given as YYYY-MM-DD
- * @param \DateTime $dateCreatedBefore Read only rooms that started before this
- * date, given as YYYY-MM-DD
+ * @param string $status Read only the rooms with this status. Can be: `in-progress` (default) or `completed`
+ * @param string $uniqueName Read only rooms with the this `unique_name`.
+ * @param \DateTime $dateCreatedAfter Read only rooms that started on or after this date, given as `YYYY-MM-DD`.
+ * @param \DateTime $dateCreatedBefore Read only rooms that started before this date, given as `YYYY-MM-DD`.
*/
- public function __construct($status = Values::NONE, $uniqueName = Values::NONE, $dateCreatedAfter = Values::NONE, $dateCreatedBefore = Values::NONE)
- {
+ public function __construct(
+
+ string $status = Values::NONE,
+ string $uniqueName = Values::NONE,
+ \DateTime $dateCreatedAfter = null,
+ \DateTime $dateCreatedBefore = null
+
+ ) {
$this->options['status'] = $status;
$this->options['uniqueName'] = $uniqueName;
$this->options['dateCreatedAfter'] = $dateCreatedAfter;
@@ -236,10 +376,10 @@ public function __construct($status = Values::NONE, $uniqueName = Values::NONE,
/**
* Read only the rooms with this status. Can be: `in-progress` (default) or `completed`
*
- * @param string $status Read only the rooms with this status
+ * @param string $status Read only the rooms with this status. Can be: `in-progress` (default) or `completed`
* @return $this Fluent Builder
*/
- public function setStatus($status)
+ public function setStatus(string $status): self
{
$this->options['status'] = $status;
return $this;
@@ -248,10 +388,10 @@ public function setStatus($status)
/**
* Read only rooms with the this `unique_name`.
*
- * @param string $uniqueName Read only rooms with this unique_name
+ * @param string $uniqueName Read only rooms with the this `unique_name`.
* @return $this Fluent Builder
*/
- public function setUniqueName($uniqueName)
+ public function setUniqueName(string $uniqueName): self
{
$this->options['uniqueName'] = $uniqueName;
return $this;
@@ -260,11 +400,10 @@ public function setUniqueName($uniqueName)
/**
* Read only rooms that started on or after this date, given as `YYYY-MM-DD`.
*
- * @param \DateTime $dateCreatedAfter Read only rooms that started on or after
- * this date, given as YYYY-MM-DD
+ * @param \DateTime $dateCreatedAfter Read only rooms that started on or after this date, given as `YYYY-MM-DD`.
* @return $this Fluent Builder
*/
- public function setDateCreatedAfter($dateCreatedAfter)
+ public function setDateCreatedAfter(\DateTime $dateCreatedAfter): self
{
$this->options['dateCreatedAfter'] = $dateCreatedAfter;
return $this;
@@ -273,11 +412,10 @@ public function setDateCreatedAfter($dateCreatedAfter)
/**
* Read only rooms that started before this date, given as `YYYY-MM-DD`.
*
- * @param \DateTime $dateCreatedBefore Read only rooms that started before this
- * date, given as YYYY-MM-DD
+ * @param \DateTime $dateCreatedBefore Read only rooms that started before this date, given as `YYYY-MM-DD`.
* @return $this Fluent Builder
*/
- public function setDateCreatedBefore($dateCreatedBefore)
+ public function setDateCreatedBefore(\DateTime $dateCreatedBefore): self
{
$this->options['dateCreatedBefore'] = $dateCreatedBefore;
return $this;
@@ -288,14 +426,11 @@ public function setDateCreatedBefore($dateCreatedBefore)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Video.V1.ReadRoomOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Video.V1.ReadRoomOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RoomPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RoomPage.php
index b937bd4..f23e6ad 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RoomPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RoomPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return RoomInstance \Twilio\Rest\Video\V1\RoomInstance
+ */
+ public function buildInstance(array $payload): RoomInstance
{
return new RoomInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Video.V1.RoomPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Voice.php b/vendor/twilio/sdk/src/Twilio/Rest/Voice.php
index 5c84325..41e24ad 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Voice.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Voice.php
@@ -1,101 +1,101 @@
archivedCalls instead.
+ */
+ protected function getArchivedCalls(): \Twilio\Rest\Voice\V1\ArchivedCallList {
+ echo "archivedCalls is deprecated. Use v1->archivedCalls instead.";
+ return $this->v1->archivedCalls;
+ }
/**
- * Construct the Voice Domain
- *
- * @param \Twilio\Rest\Client $client Twilio\Rest\Client to communicate with
- * Twilio
- * @return \Twilio\Rest\Voice Domain for Voice
+ * @deprecated Use v1->archivedCalls(\$date, \$sid) instead.
+ * @param \DateTime $date The date of the Call in UTC.
+ * @param string $sid The unique string that identifies this resource
*/
- public function __construct(Client $client)
- {
- parent::__construct($client);
+ protected function contextArchivedCalls(\DateTime $date, string $sid): \Twilio\Rest\Voice\V1\ArchivedCallContext {
+ echo "archivedCalls(\$date, \$sid) is deprecated. Use v1->archivedCalls(\$date, \$sid) instead.";
+ return $this->v1->archivedCalls($date, $sid);
+ }
- $this->baseUrl = 'https://voice.twilio.com';
+ /**
+ * @deprecated Use v1->byocTrunks instead.
+ */
+ protected function getByocTrunks(): \Twilio\Rest\Voice\V1\ByocTrunkList {
+ echo "byocTrunks is deprecated. Use v1->byocTrunks instead.";
+ return $this->v1->byocTrunks;
}
/**
- * @return \Twilio\Rest\Voice\V1 Version v1 of voice
+ * @deprecated Use v1->byocTrunks(\$sid) instead.
+ * @param string $sid The unique string that identifies the resource
*/
- protected function getV1()
- {
- if (!$this->_v1) {
- $this->_v1 = new V1($this);
- }
- return $this->_v1;
+ protected function contextByocTrunks(string $sid): \Twilio\Rest\Voice\V1\ByocTrunkContext {
+ echo "byocTrunks(\$sid) is deprecated. Use v1->byocTrunks(\$sid) instead.";
+ return $this->v1->byocTrunks($sid);
}
/**
- * Magic getter to lazy load version
- *
- * @param string $name Version to return
- * @return \Twilio\Version The requested version
- * @throws TwilioException For unknown versions
+ * @deprecated Use v1->connectionPolicies instead.
*/
- public function __get($name)
- {
- $method = 'get' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return $this->$method();
- }
+ protected function getConnectionPolicies(): \Twilio\Rest\Voice\V1\ConnectionPolicyList {
+ echo "connectionPolicies is deprecated. Use v1->connectionPolicies instead.";
+ return $this->v1->connectionPolicies;
+ }
- throw new TwilioException('Unknown version ' . $name);
+ /**
+ * @deprecated Use v1->connectionPolicies(\$sid) instead.
+ * @param string $sid The unique string that identifies the resource
+ */
+ protected function contextConnectionPolicies(string $sid): \Twilio\Rest\Voice\V1\ConnectionPolicyContext {
+ echo "connectionPolicies(\$sid) is deprecated. Use v1->connectionPolicies(\$sid) instead.";
+ return $this->v1->connectionPolicies($sid);
}
/**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
+ * @deprecated Use v1->dialingPermissions instead.
*/
- public function __call($name, $arguments)
- {
- $method = 'context' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return \call_user_func_array(array($this, $method), $arguments);
- }
+ protected function getDialingPermissions(): \Twilio\Rest\Voice\V1\DialingPermissionsList {
+ echo "dialingPermissions is deprecated. Use v1->dialingPermissions instead.";
+ return $this->v1->dialingPermissions;
+ }
- throw new TwilioException('Unknown context ' . $name);
+ /**
+ * @deprecated Use v1->ipRecords instead.
+ */
+ protected function getIpRecords(): \Twilio\Rest\Voice\V1\IpRecordList {
+ echo "ipRecords is deprecated. Use v1->ipRecords instead.";
+ return $this->v1->ipRecords;
}
/**
- * @return \Twilio\Rest\Voice\V1\DialingPermissionsList
+ * @deprecated Use v1->ipRecords(\$sid) instead.
+ * @param string $sid The unique string that identifies the resource
*/
- protected function getDialingPermissions()
- {
- return $this->v1->dialingPermissions;
+ protected function contextIpRecords(string $sid): \Twilio\Rest\Voice\V1\IpRecordContext {
+ echo "ipRecords(\$sid) is deprecated. Use v1->ipRecords(\$sid) instead.";
+ return $this->v1->ipRecords($sid);
+ }
+
+ /**
+ * @deprecated Use v1->sourceIpMappings instead.
+ */
+ protected function getSourceIpMappings(): \Twilio\Rest\Voice\V1\SourceIpMappingList {
+ echo "sourceIpMappings is deprecated. Use v1->sourceIpMappings instead.";
+ return $this->v1->sourceIpMappings;
}
/**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
+ * @deprecated Use v1->sourceIpMappings(\$sid) instead.
+ * @param string $sid The unique string that identifies the resource
*/
- public function __toString()
- {
- return '[Twilio.Voice]';
+ protected function contextSourceIpMappings(string $sid): \Twilio\Rest\Voice\V1\SourceIpMappingContext {
+ echo "sourceIpMappings(\$sid) is deprecated. Use v1->sourceIpMappings(\$sid) instead.";
+ return $this->v1->sourceIpMappings($sid);
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1.php b/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1.php
index 0ea953e..eb2e92b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1.php
@@ -1,31 +1,57 @@
version = 'v1';
}
- /**
- * @return \Twilio\Rest\Voice\V1\DialingPermissionsList
- */
- protected function getDialingPermissions()
+ protected function getArchivedCalls(): ArchivedCallList
+ {
+ if (!$this->_archivedCalls) {
+ $this->_archivedCalls = new ArchivedCallList($this);
+ }
+ return $this->_archivedCalls;
+ }
+
+ protected function getByocTrunks(): ByocTrunkList
+ {
+ if (!$this->_byocTrunks) {
+ $this->_byocTrunks = new ByocTrunkList($this);
+ }
+ return $this->_byocTrunks;
+ }
+
+ protected function getConnectionPolicies(): ConnectionPolicyList
+ {
+ if (!$this->_connectionPolicies) {
+ $this->_connectionPolicies = new ConnectionPolicyList($this);
+ }
+ return $this->_connectionPolicies;
+ }
+
+ protected function getDialingPermissions(): DialingPermissionsList
{
if (!$this->_dialingPermissions) {
$this->_dialingPermissions = new DialingPermissionsList($this);
@@ -44,6 +91,22 @@ protected function getDialingPermissions()
return $this->_dialingPermissions;
}
+ protected function getIpRecords(): IpRecordList
+ {
+ if (!$this->_ipRecords) {
+ $this->_ipRecords = new IpRecordList($this);
+ }
+ return $this->_ipRecords;
+ }
+
+ protected function getSourceIpMappings(): SourceIpMappingList
+ {
+ if (!$this->_sourceIpMappings) {
+ $this->_sourceIpMappings = new SourceIpMappingList($this);
+ }
+ return $this->_sourceIpMappings;
+ }
+
/**
* Magic getter to lazy load root resources
*
@@ -51,7 +114,7 @@ protected function getDialingPermissions()
* @return \Twilio\ListResource The requested resource
* @throws TwilioException For unknown resource
*/
- public function __get($name)
+ public function __get(string $name)
{
$method = 'get' . \ucfirst($name);
if (\method_exists($this, $method)) {
@@ -66,10 +129,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -84,8 +147,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Voice.V1]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/BulkCountryUpdateInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/BulkCountryUpdateInstance.php
index 3834973..e9fe02d 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/BulkCountryUpdateInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/BulkCountryUpdateInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Voice
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Voice\V1\DialingPermissions;
use Twilio\Exceptions\TwilioException;
@@ -14,32 +22,30 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
* @property int $updateCount
- * @property string $updateRequest
+ * @property string|null $updateRequest
*/
class BulkCountryUpdateInstance extends InstanceResource
{
/**
* Initialize the BulkCountryUpdateInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @return \Twilio\Rest\Voice\V1\DialingPermissions\BulkCountryUpdateInstance
*/
public function __construct(Version $version, array $payload)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'updateCount' => Values::array_get($payload, 'update_count'),
'updateRequest' => Values::array_get($payload, 'update_request'),
- );
+ ];
- $this->solution = array();
+ $this->solution = [];
}
/**
@@ -49,7 +55,7 @@ public function __construct(Version $version, array $payload)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -68,8 +74,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Voice.V1.BulkCountryUpdateInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/BulkCountryUpdateList.php b/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/BulkCountryUpdateList.php
index 5762c51..543d789 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/BulkCountryUpdateList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/BulkCountryUpdateList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Voice
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Voice\V1\DialingPermissions;
@@ -14,55 +21,58 @@
use Twilio\Values;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
+
class BulkCountryUpdateList extends ListResource
-{
+ {
/**
* Construct the BulkCountryUpdateList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Voice\V1\DialingPermissions\BulkCountryUpdateList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/DialingPermissions/BulkCountryUpdates';
}
/**
- * Create a new BulkCountryUpdateInstance
+ * Create the BulkCountryUpdateInstance
*
- * @param string $updateRequest URL encoded JSON array of update objects
- * @return BulkCountryUpdateInstance Newly created BulkCountryUpdateInstance
+ * @param string $updateRequest URL encoded JSON array of update objects. example : `[ { \\\"iso_code\\\": \\\"GB\\\", \\\"low_risk_numbers_enabled\\\": \\\"true\\\", \\\"high_risk_special_numbers_enabled\\\":\\\"true\\\", \\\"high_risk_tollfraud_numbers_enabled\\\": \\\"false\\\" } ]`
+ * @return BulkCountryUpdateInstance Created BulkCountryUpdateInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function create($updateRequest)
+ public function create(string $updateRequest): BulkCountryUpdateInstance
{
- $data = Values::of(array('UpdateRequest' => $updateRequest,));
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $data = Values::of([
+ 'UpdateRequest' =>
+ $updateRequest,
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
- return new BulkCountryUpdateInstance($this->version, $payload);
+ return new BulkCountryUpdateInstance(
+ $this->version,
+ $payload
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Voice.V1.BulkCountryUpdateList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/BulkCountryUpdatePage.php b/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/BulkCountryUpdatePage.php
index f1f22c8..2d871ac 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/BulkCountryUpdatePage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/BulkCountryUpdatePage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return BulkCountryUpdateInstance \Twilio\Rest\Voice\V1\DialingPermissions\BulkCountryUpdateInstance
+ */
+ public function buildInstance(array $payload): BulkCountryUpdateInstance
{
return new BulkCountryUpdateInstance($this->version, $payload);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Voice.V1.BulkCountryUpdatePage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/Country/HighriskSpecialPrefixInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/Country/HighriskSpecialPrefixInstance.php
index f58dcfe..e132f7b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/Country/HighriskSpecialPrefixInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/Country/HighriskSpecialPrefixInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Voice
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Voice\V1\DialingPermissions\Country;
use Twilio\Exceptions\TwilioException;
@@ -14,29 +22,29 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property string $prefix
+ * @property string|null $prefix
*/
class HighriskSpecialPrefixInstance extends InstanceResource
{
/**
* Initialize the HighriskSpecialPrefixInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $isoCode The ISO country code
- * @return \Twilio\Rest\Voice\V1\DialingPermissions\Country\HighriskSpecialPrefixInstance
+ * @param string $isoCode The [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) to identify the country permissions from which high-risk special service number prefixes are fetched
*/
- public function __construct(Version $version, array $payload, $isoCode)
+ public function __construct(Version $version, array $payload, string $isoCode)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array('prefix' => Values::array_get($payload, 'prefix'),);
+ $this->properties = [
+ 'prefix' => Values::array_get($payload, 'prefix'),
+ ];
- $this->solution = array('isoCode' => $isoCode,);
+ $this->solution = ['isoCode' => $isoCode, ];
}
/**
@@ -46,7 +54,7 @@ public function __construct(Version $version, array $payload, $isoCode)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -65,8 +73,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Voice.V1.HighriskSpecialPrefixInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/Country/HighriskSpecialPrefixList.php b/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/Country/HighriskSpecialPrefixList.php
index d1e6993..75ca97a 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/Country/HighriskSpecialPrefixList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/Country/HighriskSpecialPrefixList.php
@@ -2,42 +2,73 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Voice
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Voice\V1\DialingPermissions\Country;
use Twilio\ListResource;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
+
class HighriskSpecialPrefixList extends ListResource
-{
+ {
/**
* Construct the HighriskSpecialPrefixList
*
* @param Version $version Version that contains the resource
- * @param string $isoCode The ISO country code
- * @return \Twilio\Rest\Voice\V1\DialingPermissions\Country\HighriskSpecialPrefixList
+ * @param string $isoCode The [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) to identify the country permissions from which high-risk special service number prefixes are fetched
*/
- public function __construct(Version $version, $isoCode)
- {
+ public function __construct(
+ Version $version,
+ string $isoCode
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('isoCode' => $isoCode,);
+ $this->solution = [
+ 'isoCode' =>
+ $isoCode,
+
+ ];
+
+ $this->uri = '/DialingPermissions/Countries/' . \rawurlencode($isoCode)
+ .'/HighRiskSpecialPrefixes';
+ }
- $this->uri = '/DialingPermissions/Countries/' . \rawurlencode($isoCode) . '/HighRiskSpecialPrefixes';
+ /**
+ * Reads HighriskSpecialPrefixInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return HighriskSpecialPrefixInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
- * Streams HighriskSpecialPrefixInstance records from the API as a generator
- * stream.
+ * Streams HighriskSpecialPrefixInstance records from the API as a generator stream.
* This operation lazily loads records as efficiently as possible until the
* limit
* is reached.
@@ -52,9 +83,9 @@ public function __construct(Version $version, $isoCode)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -63,26 +94,6 @@ public function stream($limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads HighriskSpecialPrefixInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return HighriskSpecialPrefixInstance[] Array of results
- */
- public function read($limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of HighriskSpecialPrefixInstance records from the API.
* Request is executed immediately
@@ -90,34 +101,34 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of HighriskSpecialPrefixInstance
+ * @return HighriskSpecialPrefixPage Page of HighriskSpecialPrefixInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): HighriskSpecialPrefixPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new HighriskSpecialPrefixPage($this->version, $response, $this->solution);
}
/**
- * Retrieve a specific page of HighriskSpecialPrefixInstance records from the
- * API.
+ * Retrieve a specific page of HighriskSpecialPrefixInstance records from the API.
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of HighriskSpecialPrefixInstance
+ * @return HighriskSpecialPrefixPage Page of HighriskSpecialPrefixInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): HighriskSpecialPrefixPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -127,13 +138,14 @@ public function getPage($targetUrl)
return new HighriskSpecialPrefixPage($this->version, $response, $this->solution);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Voice.V1.HighriskSpecialPrefixList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/Country/HighriskSpecialPrefixPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/Country/HighriskSpecialPrefixPage.php
index 2b2f7fe..bf001ac 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/Country/HighriskSpecialPrefixPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/Country/HighriskSpecialPrefixPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return HighriskSpecialPrefixInstance \Twilio\Rest\Voice\V1\DialingPermissions\Country\HighriskSpecialPrefixInstance
+ */
+ public function buildInstance(array $payload): HighriskSpecialPrefixInstance
{
return new HighriskSpecialPrefixInstance($this->version, $payload, $this->solution['isoCode']);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Voice.V1.HighriskSpecialPrefixPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/CountryContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/CountryContext.php
index ff351f6..c087eb5 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/CountryContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/CountryContext.php
@@ -2,70 +2,82 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Voice
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Voice\V1\DialingPermissions;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
-use Twilio\Rest\Voice\V1\DialingPermissions\Country\HighriskSpecialPrefixList;
+use Twilio\ListResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Voice\V1\DialingPermissions\Country\HighriskSpecialPrefixList;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property \Twilio\Rest\Voice\V1\DialingPermissions\Country\HighriskSpecialPrefixList $highriskSpecialPrefixes
+ * @property HighriskSpecialPrefixList $highriskSpecialPrefixes
*/
class CountryContext extends InstanceContext
-{
- protected $_highriskSpecialPrefixes = null;
+ {
+ protected $_highriskSpecialPrefixes;
/**
* Initialize the CountryContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $isoCode The ISO country code
- * @return \Twilio\Rest\Voice\V1\DialingPermissions\CountryContext
+ * @param Version $version Version that contains the resource
+ * @param string $isoCode The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the DialingPermissions Country resource to fetch
*/
- public function __construct(Version $version, $isoCode)
- {
+ public function __construct(
+ Version $version,
+ $isoCode
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('isoCode' => $isoCode,);
+ $this->solution = [
+ 'isoCode' =>
+ $isoCode,
+ ];
- $this->uri = '/DialingPermissions/Countries/' . \rawurlencode($isoCode) . '';
+ $this->uri = '/DialingPermissions/Countries/' . \rawurlencode($isoCode)
+ .'';
}
/**
- * Fetch a CountryInstance
+ * Fetch the CountryInstance
*
* @return CountryInstance Fetched CountryInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): CountryInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
- return new CountryInstance($this->version, $payload, $this->solution['isoCode']);
+ return new CountryInstance(
+ $this->version,
+ $payload,
+ $this->solution['isoCode']
+ );
}
+
/**
* Access the highriskSpecialPrefixes
- *
- * @return \Twilio\Rest\Voice\V1\DialingPermissions\Country\HighriskSpecialPrefixList
*/
- protected function getHighriskSpecialPrefixes()
+ protected function getHighriskSpecialPrefixes(): HighriskSpecialPrefixList
{
if (!$this->_highriskSpecialPrefixes) {
$this->_highriskSpecialPrefixes = new HighriskSpecialPrefixList(
@@ -81,10 +93,10 @@ protected function getHighriskSpecialPrefixes()
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -99,10 +111,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -117,12 +129,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Voice.V1.CountryContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/CountryInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/CountryInstance.php
index 610b433..847226f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/CountryInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/CountryInstance.php
@@ -2,49 +2,56 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Voice
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Voice\V1\DialingPermissions;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Rest\Voice\V1\DialingPermissions\Country\HighriskSpecialPrefixList;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property string $isoCode
- * @property string $name
- * @property string $continent
- * @property string $countryCodes
- * @property bool $lowRiskNumbersEnabled
- * @property bool $highRiskSpecialNumbersEnabled
- * @property bool $highRiskTollfraudNumbersEnabled
- * @property string $url
- * @property array $links
+ * @property string|null $isoCode
+ * @property string|null $name
+ * @property string|null $continent
+ * @property string[]|null $countryCodes
+ * @property bool|null $lowRiskNumbersEnabled
+ * @property bool|null $highRiskSpecialNumbersEnabled
+ * @property bool|null $highRiskTollfraudNumbersEnabled
+ * @property string|null $url
+ * @property array|null $links
*/
class CountryInstance extends InstanceResource
{
- protected $_highriskSpecialPrefixes = null;
+ protected $_highriskSpecialPrefixes;
/**
* Initialize the CountryInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $isoCode The ISO country code
- * @return \Twilio\Rest\Voice\V1\DialingPermissions\CountryInstance
+ * @param string $isoCode The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the DialingPermissions Country resource to fetch
*/
- public function __construct(Version $version, array $payload, $isoCode = null)
+ public function __construct(Version $version, array $payload, string $isoCode = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'isoCode' => Values::array_get($payload, 'iso_code'),
'name' => Values::array_get($payload, 'name'),
'continent' => Values::array_get($payload, 'continent'),
@@ -54,45 +61,45 @@ public function __construct(Version $version, array $payload, $isoCode = null)
'highRiskTollfraudNumbersEnabled' => Values::array_get($payload, 'high_risk_tollfraud_numbers_enabled'),
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
- );
+ ];
- $this->solution = array('isoCode' => $isoCode ?: $this->properties['isoCode'],);
+ $this->solution = ['isoCode' => $isoCode ?: $this->properties['isoCode'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Voice\V1\DialingPermissions\CountryContext Context for
- * this
- * CountryInstance
+ * @return CountryContext Context for this CountryInstance
*/
- protected function proxy()
+ protected function proxy(): CountryContext
{
if (!$this->context) {
- $this->context = new CountryContext($this->version, $this->solution['isoCode']);
+ $this->context = new CountryContext(
+ $this->version,
+ $this->solution['isoCode']
+ );
}
return $this->context;
}
/**
- * Fetch a CountryInstance
+ * Fetch the CountryInstance
*
* @return CountryInstance Fetched CountryInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): CountryInstance
{
+
return $this->proxy()->fetch();
}
/**
* Access the highriskSpecialPrefixes
- *
- * @return \Twilio\Rest\Voice\V1\DialingPermissions\Country\HighriskSpecialPrefixList
*/
- protected function getHighriskSpecialPrefixes()
+ protected function getHighriskSpecialPrefixes(): HighriskSpecialPrefixList
{
return $this->proxy()->highriskSpecialPrefixes;
}
@@ -104,7 +111,7 @@ protected function getHighriskSpecialPrefixes()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -123,12 +130,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Voice.V1.CountryInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/CountryList.php b/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/CountryList.php
index 50833ee..0e36a04 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/CountryList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/CountryList.php
@@ -2,119 +2,133 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Voice
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Voice\V1\DialingPermissions;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
class CountryList extends ListResource
-{
+ {
/**
* Construct the CountryList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Voice\V1\DialingPermissions\CountryList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/DialingPermissions/Countries';
}
/**
- * Streams CountryInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Reads CountryInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
+ * @param int $limit Upper limit for the number of records to return. read()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
+ * page_size is defined but a limit is defined, read()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return CountryInstance[] Array of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($options, $limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
- * Reads CountryInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
+ * Streams CountryInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
+ * @param int $limit Upper limit for the number of records to return. stream()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
+ * page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return CountryInstance[] Array of results
+ * @return Stream stream of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
/**
* Retrieve a single page of CountryInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of CountryInstance
+ * @return CountryPage Page of CountryInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): CountryPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'IsoCode' => $options['isoCode'],
- 'Continent' => $options['continent'],
- 'CountryCode' => $options['countryCode'],
- 'LowRiskNumbersEnabled' => Serialize::booleanToString($options['lowRiskNumbersEnabled']),
- 'HighRiskSpecialNumbersEnabled' => Serialize::booleanToString($options['highRiskSpecialNumbersEnabled']),
- 'HighRiskTollfraudNumbersEnabled' => Serialize::booleanToString($options['highRiskTollfraudNumbersEnabled']),
+
+ $params = Values::of([
+ 'IsoCode' =>
+ $options['isoCode'],
+ 'Continent' =>
+ $options['continent'],
+ 'CountryCode' =>
+ $options['countryCode'],
+ 'LowRiskNumbersEnabled' =>
+ Serialize::booleanToString($options['lowRiskNumbersEnabled']),
+ 'HighRiskSpecialNumbersEnabled' =>
+ Serialize::booleanToString($options['highRiskSpecialNumbersEnabled']),
+ 'HighRiskTollfraudNumbersEnabled' =>
+ Serialize::booleanToString($options['highRiskTollfraudNumbersEnabled']),
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new CountryPage($this->version, $response, $this->solution);
}
@@ -124,9 +138,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of CountryInstance
+ * @return CountryPage Page of CountryInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): CountryPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -136,15 +150,21 @@ public function getPage($targetUrl)
return new CountryPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a CountryContext
*
- * @param string $isoCode The ISO country code
- * @return \Twilio\Rest\Voice\V1\DialingPermissions\CountryContext
+ * @param string $isoCode The [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the DialingPermissions Country resource to fetch
*/
- public function getContext($isoCode)
+ public function getContext(
+ string $isoCode
+
+ ): CountryContext
{
- return new CountryContext($this->version, $isoCode);
+ return new CountryContext(
+ $this->version,
+ $isoCode
+ );
}
/**
@@ -152,8 +172,8 @@ public function getContext($isoCode)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Voice.V1.CountryList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/CountryOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/CountryOptions.php
index 148ab98..5922464 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/CountryOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/CountryOptions.php
@@ -1,10 +1,16 @@
options['isoCode'] = $isoCode;
$this->options['continent'] = $continent;
$this->options['countryCode'] = $countryCode;
@@ -75,11 +85,10 @@ public function __construct($isoCode = Values::NONE, $continent = Values::NONE,
/**
* Filter to retrieve the country permissions by specifying the [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
*
- * @param string $isoCode Filter to retrieve the country permissions by
- * specifying the ISO country code
+ * @param string $isoCode Filter to retrieve the country permissions by specifying the [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
* @return $this Fluent Builder
*/
- public function setIsoCode($isoCode)
+ public function setIsoCode(string $isoCode): self
{
$this->options['isoCode'] = $isoCode;
return $this;
@@ -88,11 +97,10 @@ public function setIsoCode($isoCode)
/**
* Filter to retrieve the country permissions by specifying the continent
*
- * @param string $continent Filter to retrieve the country permissions by
- * specifying the continent
+ * @param string $continent Filter to retrieve the country permissions by specifying the continent
* @return $this Fluent Builder
*/
- public function setContinent($continent)
+ public function setContinent(string $continent): self
{
$this->options['continent'] = $continent;
return $this;
@@ -101,10 +109,10 @@ public function setContinent($continent)
/**
* Filter the results by specified [country codes](https://www.itu.int/itudoc/itu-t/ob-lists/icc/e164_763.html)
*
- * @param string $countryCode Country code filter
+ * @param string $countryCode Filter the results by specified [country codes](https://www.itu.int/itudoc/itu-t/ob-lists/icc/e164_763.html)
* @return $this Fluent Builder
*/
- public function setCountryCode($countryCode)
+ public function setCountryCode(string $countryCode): self
{
$this->options['countryCode'] = $countryCode;
return $this;
@@ -113,12 +121,10 @@ public function setCountryCode($countryCode)
/**
* Filter to retrieve the country permissions with dialing to low-risk numbers enabled. Can be: `true` or `false`.
*
- * @param bool $lowRiskNumbersEnabled Filter to retrieve the country
- * permissions with dialing to low-risk
- * numbers enabled
+ * @param bool $lowRiskNumbersEnabled Filter to retrieve the country permissions with dialing to low-risk numbers enabled. Can be: `true` or `false`.
* @return $this Fluent Builder
*/
- public function setLowRiskNumbersEnabled($lowRiskNumbersEnabled)
+ public function setLowRiskNumbersEnabled(bool $lowRiskNumbersEnabled): self
{
$this->options['lowRiskNumbersEnabled'] = $lowRiskNumbersEnabled;
return $this;
@@ -127,28 +133,22 @@ public function setLowRiskNumbersEnabled($lowRiskNumbersEnabled)
/**
* Filter to retrieve the country permissions with dialing to high-risk special service numbers enabled. Can be: `true` or `false`
*
- * @param bool $highRiskSpecialNumbersEnabled Filter to retrieve the country
- * permissions with dialing to
- * high-risk special service numbers
- * enabled
+ * @param bool $highRiskSpecialNumbersEnabled Filter to retrieve the country permissions with dialing to high-risk special service numbers enabled. Can be: `true` or `false`
* @return $this Fluent Builder
*/
- public function setHighRiskSpecialNumbersEnabled($highRiskSpecialNumbersEnabled)
+ public function setHighRiskSpecialNumbersEnabled(bool $highRiskSpecialNumbersEnabled): self
{
$this->options['highRiskSpecialNumbersEnabled'] = $highRiskSpecialNumbersEnabled;
return $this;
}
/**
- * Filter to retrieve the country permissions with dialing to high-risk [toll fraud](https://www.twilio.com/learn/voice-and-video/toll-fraud) numbers enabled. Can be: `true` or `false`.
+ * Filter to retrieve the country permissions with dialing to high-risk [toll fraud](https://www.twilio.com/blog/how-to-protect-your-account-from-toll-fraud-with-voice-dialing-geo-permissions-html) numbers enabled. Can be: `true` or `false`.
*
- * @param bool $highRiskTollfraudNumbersEnabled Filter to retrieve the country
- * permissions with dialing to
- * high-risk toll fraud numbers
- * enabled
+ * @param bool $highRiskTollfraudNumbersEnabled Filter to retrieve the country permissions with dialing to high-risk [toll fraud](https://www.twilio.com/blog/how-to-protect-your-account-from-toll-fraud-with-voice-dialing-geo-permissions-html) numbers enabled. Can be: `true` or `false`.
* @return $this Fluent Builder
*/
- public function setHighRiskTollfraudNumbersEnabled($highRiskTollfraudNumbersEnabled)
+ public function setHighRiskTollfraudNumbersEnabled(bool $highRiskTollfraudNumbersEnabled): self
{
$this->options['highRiskTollfraudNumbersEnabled'] = $highRiskTollfraudNumbersEnabled;
return $this;
@@ -159,14 +159,10 @@ public function setHighRiskTollfraudNumbersEnabled($highRiskTollfraudNumbersEnab
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Voice.V1.ReadCountryOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Voice.V1.ReadCountryOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/CountryPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/CountryPage.php
index 0cf945c..f587487 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/CountryPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/CountryPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return CountryInstance \Twilio\Rest\Voice\V1\DialingPermissions\CountryInstance
+ */
+ public function buildInstance(array $payload): CountryInstance
{
return new CountryInstance($this->version, $payload);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Voice.V1.CountryPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/SettingsContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/SettingsContext.php
index de86ed9..52ab2b2 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/SettingsContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/SettingsContext.php
@@ -2,60 +2,67 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Voice
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Voice\V1\DialingPermissions;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
-use Twilio\Serialize;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Serialize;
+
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
class SettingsContext extends InstanceContext
-{
+ {
/**
* Initialize the SettingsContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @return \Twilio\Rest\Voice\V1\DialingPermissions\SettingsContext
+ * @param Version $version Version that contains the resource
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/Settings';
}
/**
- * Fetch a SettingsInstance
+ * Fetch the SettingsInstance
*
* @return SettingsInstance Fetched SettingsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): SettingsInstance
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
- return new SettingsInstance($this->version, $payload);
+ return new SettingsInstance(
+ $this->version,
+ $payload
+ );
}
+
/**
* Update the SettingsInstance
*
@@ -63,35 +70,37 @@ public function fetch()
* @return SettingsInstance Updated SettingsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): SettingsInstance
{
+
$options = new Values($options);
- $data = Values::of(array(
- 'DialingPermissionsInheritance' => Serialize::booleanToString($options['dialingPermissionsInheritance']),
- ));
+ $data = Values::of([
+ 'DialingPermissionsInheritance' =>
+ Serialize::booleanToString($options['dialingPermissionsInheritance']),
+ ]);
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
- return new SettingsInstance($this->version, $payload);
+ return new SettingsInstance(
+ $this->version,
+ $payload
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Voice.V1.SettingsContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/SettingsInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/SettingsInstance.php
index 4593ec7..f466144 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/SettingsInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/SettingsInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Voice
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Voice\V1\DialingPermissions;
use Twilio\Exceptions\TwilioException;
@@ -15,59 +23,58 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property bool $dialingPermissionsInheritance
- * @property string $url
+ * @property bool|null $dialingPermissionsInheritance
+ * @property string|null $url
*/
class SettingsInstance extends InstanceResource
{
/**
* Initialize the SettingsInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @return \Twilio\Rest\Voice\V1\DialingPermissions\SettingsInstance
*/
public function __construct(Version $version, array $payload)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'dialingPermissionsInheritance' => Values::array_get($payload, 'dialing_permissions_inheritance'),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array();
+ $this->solution = [];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Voice\V1\DialingPermissions\SettingsContext Context for
- * this
- * SettingsInstance
+ * @return SettingsContext Context for this SettingsInstance
*/
- protected function proxy()
+ protected function proxy(): SettingsContext
{
if (!$this->context) {
- $this->context = new SettingsContext($this->version);
+ $this->context = new SettingsContext(
+ $this->version
+ );
}
return $this->context;
}
/**
- * Fetch a SettingsInstance
+ * Fetch the SettingsInstance
*
* @return SettingsInstance Fetched SettingsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): SettingsInstance
{
+
return $this->proxy()->fetch();
}
@@ -78,8 +85,9 @@ public function fetch()
* @return SettingsInstance Updated SettingsInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): SettingsInstance
{
+
return $this->proxy()->update($options);
}
@@ -90,7 +98,7 @@ public function update($options = array())
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -109,12 +117,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Voice.V1.SettingsInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/SettingsList.php b/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/SettingsList.php
index d755524..d5468f7 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/SettingsList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/SettingsList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Voice
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Voice\V1\DialingPermissions;
@@ -12,33 +19,34 @@
use Twilio\ListResource;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
+
class SettingsList extends ListResource
-{
+ {
/**
* Construct the SettingsList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Voice\V1\DialingPermissions\SettingsList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
}
/**
* Constructs a SettingsContext
- *
- * @return \Twilio\Rest\Voice\V1\DialingPermissions\SettingsContext
*/
- public function getContext()
+ public function getContext(
+
+ ): SettingsContext
{
- return new SettingsContext($this->version);
+ return new SettingsContext(
+ $this->version
+ );
}
/**
@@ -46,8 +54,8 @@ public function getContext()
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Voice.V1.SettingsList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/SettingsOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/SettingsOptions.php
index 519a6c8..4941eff 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/SettingsOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/SettingsOptions.php
@@ -1,10 +1,16 @@
options['dialingPermissionsInheritance'] = $dialingPermissionsInheritance;
}
/**
* `true` for the sub-account to inherit voice dialing permissions from the Master Project; otherwise `false`.
*
- * @param bool $dialingPermissionsInheritance `true` for the sub-account to
- * inherit voice dialing permissions
- * from the Master Project;
- * otherwise `false`
+ * @param bool $dialingPermissionsInheritance `true` for the sub-account to inherit voice dialing permissions from the Master Project; otherwise `false`.
* @return $this Fluent Builder
*/
- public function setDialingPermissionsInheritance($dialingPermissionsInheritance)
+ public function setDialingPermissionsInheritance(bool $dialingPermissionsInheritance): self
{
$this->options['dialingPermissionsInheritance'] = $dialingPermissionsInheritance;
return $this;
@@ -63,14 +69,10 @@ public function setDialingPermissionsInheritance($dialingPermissionsInheritance)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Voice.V1.UpdateSettingsOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Voice.V1.UpdateSettingsOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/SettingsPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/SettingsPage.php
index 772335c..1288c76 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/SettingsPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissions/SettingsPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return SettingsInstance \Twilio\Rest\Voice\V1\DialingPermissions\SettingsInstance
+ */
+ public function buildInstance(array $payload): SettingsInstance
{
return new SettingsInstance($this->version, $payload);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Voice.V1.SettingsPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissionsInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissionsInstance.php
index f504969..5611949 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissionsInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissionsInstance.php
@@ -2,35 +2,39 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Voice
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Voice\V1;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
-use Twilio\Values;
use Twilio\Version;
-/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- */
+
class DialingPermissionsInstance extends InstanceResource
{
/**
* Initialize the DialingPermissionsInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @return \Twilio\Rest\Voice\V1\DialingPermissionsInstance
*/
public function __construct(Version $version, array $payload)
{
parent::__construct($version);
- $this->solution = array();
+ $this->solution = [];
}
/**
@@ -40,7 +44,7 @@ public function __construct(Version $version, array $payload)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -59,8 +63,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Voice.V1.DialingPermissionsInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissionsList.php b/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissionsList.php
index 1ca70a1..216810d 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissionsList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissionsList.php
@@ -2,83 +2,94 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Voice
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Voice\V1;
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
+use Twilio\Version;
+use Twilio\InstanceContext;
use Twilio\Rest\Voice\V1\DialingPermissions\BulkCountryUpdateList;
use Twilio\Rest\Voice\V1\DialingPermissions\CountryList;
use Twilio\Rest\Voice\V1\DialingPermissions\SettingsList;
-use Twilio\Version;
+
/**
- * PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.
- *
- * @property \Twilio\Rest\Voice\V1\DialingPermissions\CountryList $countries
- * @property \Twilio\Rest\Voice\V1\DialingPermissions\SettingsList $settings
- * @property \Twilio\Rest\Voice\V1\DialingPermissions\BulkCountryUpdateList $bulkCountryUpdates
+ * @property BulkCountryUpdateList $bulkCountryUpdates
+ * @property CountryList $countries
+ * @property SettingsList $settings
* @method \Twilio\Rest\Voice\V1\DialingPermissions\CountryContext countries(string $isoCode)
* @method \Twilio\Rest\Voice\V1\DialingPermissions\SettingsContext settings()
*/
class DialingPermissionsList extends ListResource
-{
+ {
+ protected $_bulkCountryUpdates = null;
protected $_countries = null;
protected $_settings = null;
- protected $_bulkCountryUpdates = null;
/**
* Construct the DialingPermissionsList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Voice\V1\DialingPermissionsList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
}
/**
- * Access the countries
+ * Access the bulkCountryUpdates
*/
- protected function getCountries()
+ protected function getBulkCountryUpdates(): BulkCountryUpdateList
{
- if (!$this->_countries) {
- $this->_countries = new CountryList($this->version);
+ if (!$this->_bulkCountryUpdates) {
+ $this->_bulkCountryUpdates = new BulkCountryUpdateList(
+ $this->version
+ );
}
-
- return $this->_countries;
+ return $this->_bulkCountryUpdates;
}
/**
- * Access the settings
+ * Access the countries
*/
- protected function getSettings()
+ protected function getCountries(): CountryList
{
- if (!$this->_settings) {
- $this->_settings = new SettingsList($this->version);
+ if (!$this->_countries) {
+ $this->_countries = new CountryList(
+ $this->version
+ );
}
-
- return $this->_settings;
+ return $this->_countries;
}
/**
- * Access the bulkCountryUpdates
+ * Access the settings
*/
- protected function getBulkCountryUpdates()
+ protected function getSettings(): SettingsList
{
- if (!$this->_bulkCountryUpdates) {
- $this->_bulkCountryUpdates = new BulkCountryUpdateList($this->version);
+ if (!$this->_settings) {
+ $this->_settings = new SettingsList(
+ $this->version
+ );
}
-
- return $this->_bulkCountryUpdates;
+ return $this->_settings;
}
/**
@@ -88,7 +99,7 @@ protected function getBulkCountryUpdates()
* @return \Twilio\ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -103,10 +114,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -121,8 +132,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Voice.V1.DialingPermissionsList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissionsPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissionsPage.php
index 0e1e0bc..9e2f57c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissionsPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Voice/V1/DialingPermissionsPage.php
@@ -1,22 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return DialingPermissionsInstance \Twilio\Rest\Voice\V1\DialingPermissionsInstance
+ */
+ public function buildInstance(array $payload): DialingPermissionsInstance
{
return new DialingPermissionsInstance($this->version, $payload);
}
@@ -34,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Voice.V1.DialingPermissionsPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Wireless.php b/vendor/twilio/sdk/src/Twilio/Rest/Wireless.php
index 722f150..4fe589a 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Wireless.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Wireless.php
@@ -1,158 +1,67 @@
baseUrl = 'https://wireless.twilio.com';
- }
-
- /**
- * @return \Twilio\Rest\Wireless\V1 Version v1 of wireless
- */
- protected function getV1()
- {
- if (!$this->_v1) {
- $this->_v1 = new V1($this);
- }
- return $this->_v1;
- }
-
- /**
- * Magic getter to lazy load version
- *
- * @param string $name Version to return
- * @return \Twilio\Version The requested version
- * @throws TwilioException For unknown versions
- */
- public function __get($name)
- {
- $method = 'get' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return $this->$method();
- }
-
- throw new TwilioException('Unknown version ' . $name);
- }
-
- /**
- * Magic caller to get resource contexts
- *
- * @param string $name Resource to return
- * @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
- * @throws TwilioException For unknown resource
- */
- public function __call($name, $arguments)
- {
- $method = 'context' . \ucfirst($name);
- if (\method_exists($this, $method)) {
- return \call_user_func_array(array($this, $method), $arguments);
- }
-
- throw new TwilioException('Unknown context ' . $name);
- }
+class Wireless extends WirelessBase {
/**
- * @return \Twilio\Rest\Wireless\V1\UsageRecordList
+ * @deprecated Use v1->usageRecords instead.
*/
- protected function getUsageRecords()
- {
+ protected function getUsageRecords(): \Twilio\Rest\Wireless\V1\UsageRecordList {
+ echo "usageRecords is deprecated. Use v1->usageRecords instead.";
return $this->v1->usageRecords;
}
/**
- * @return \Twilio\Rest\Wireless\V1\CommandList
+ * @deprecated Use v1->commands instead.
*/
- protected function getCommands()
- {
+ protected function getCommands(): \Twilio\Rest\Wireless\V1\CommandList {
+ echo "commands is deprecated. Use v1->commands instead.";
return $this->v1->commands;
}
/**
+ * @deprecated Use v1->commands(\$sid) instead.
* @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Wireless\V1\CommandContext
*/
- protected function contextCommands($sid)
- {
+ protected function contextCommands(string $sid): \Twilio\Rest\Wireless\V1\CommandContext {
+ echo "commands(\$sid) is deprecated. Use v1->commands(\$sid) instead.";
return $this->v1->commands($sid);
}
/**
- * @return \Twilio\Rest\Wireless\V1\RatePlanList
+ * @deprecated Use v1->ratePlans instead.
*/
- protected function getRatePlans()
- {
+ protected function getRatePlans(): \Twilio\Rest\Wireless\V1\RatePlanList {
+ echo "ratePlans is deprecated. Use v1->ratePlans instead.";
return $this->v1->ratePlans;
}
/**
+ * @deprecated Use v1->ratePlans(\$sid) instead.
* @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Wireless\V1\RatePlanContext
*/
- protected function contextRatePlans($sid)
- {
+ protected function contextRatePlans(string $sid): \Twilio\Rest\Wireless\V1\RatePlanContext {
+ echo "ratePlans(\$sid) is deprecated. Use v1->ratePlans(\$sid) instead.";
return $this->v1->ratePlans($sid);
}
/**
- * @return \Twilio\Rest\Wireless\V1\SimList
+ * @deprecated Use v1->sims instead.
*/
- protected function getSims()
- {
+ protected function getSims(): \Twilio\Rest\Wireless\V1\SimList {
+ echo "sims is deprecated. Use v1->sims instead.";
return $this->v1->sims;
}
/**
+ * @deprecated Use v1->sims(\$sid) instead.
* @param string $sid The SID of the Sim resource to fetch
- * @return \Twilio\Rest\Wireless\V1\SimContext
*/
- protected function contextSims($sid)
- {
+ protected function contextSims(string $sid): \Twilio\Rest\Wireless\V1\SimContext {
+ echo "sims(\$sid) is deprecated. Use v1->sims(\$sid) instead.";
return $this->v1->sims($sid);
}
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- return '[Twilio.Wireless]';
- }
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1.php b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1.php
index 03a1a28..543d6e9 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1.php
@@ -1,16 +1,23 @@
version = 'v1';
}
- /**
- * @return \Twilio\Rest\Wireless\V1\UsageRecordList
- */
- protected function getUsageRecords()
- {
- if (!$this->_usageRecords) {
- $this->_usageRecords = new UsageRecordList($this);
- }
- return $this->_usageRecords;
- }
-
- /**
- * @return \Twilio\Rest\Wireless\V1\CommandList
- */
- protected function getCommands()
+ protected function getCommands(): CommandList
{
if (!$this->_commands) {
$this->_commands = new CommandList($this);
@@ -67,10 +59,7 @@ protected function getCommands()
return $this->_commands;
}
- /**
- * @return \Twilio\Rest\Wireless\V1\RatePlanList
- */
- protected function getRatePlans()
+ protected function getRatePlans(): RatePlanList
{
if (!$this->_ratePlans) {
$this->_ratePlans = new RatePlanList($this);
@@ -78,10 +67,7 @@ protected function getRatePlans()
return $this->_ratePlans;
}
- /**
- * @return \Twilio\Rest\Wireless\V1\SimList
- */
- protected function getSims()
+ protected function getSims(): SimList
{
if (!$this->_sims) {
$this->_sims = new SimList($this);
@@ -89,6 +75,14 @@ protected function getSims()
return $this->_sims;
}
+ protected function getUsageRecords(): UsageRecordList
+ {
+ if (!$this->_usageRecords) {
+ $this->_usageRecords = new UsageRecordList($this);
+ }
+ return $this->_usageRecords;
+ }
+
/**
* Magic getter to lazy load root resources
*
@@ -96,7 +90,7 @@ protected function getSims()
* @return \Twilio\ListResource The requested resource
* @throws TwilioException For unknown resource
*/
- public function __get($name)
+ public function __get(string $name)
{
$method = 'get' . \ucfirst($name);
if (\method_exists($this, $method)) {
@@ -111,10 +105,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -129,8 +123,8 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Wireless.V1]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/CommandContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/CommandContext.php
index ca545a3..ff38b93 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/CommandContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/CommandContext.php
@@ -2,78 +2,96 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Wireless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Wireless\V1;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class CommandContext extends InstanceContext
-{
+ {
/**
* Initialize the CommandContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Wireless\V1\CommandContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid The SID of the Command resource to delete.
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Commands/' . \rawurlencode($sid) . '';
+ $this->uri = '/Commands/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a CommandInstance
+ * Delete the CommandInstance
*
- * @return CommandInstance Fetched CommandInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new CommandInstance($this->version, $payload, $this->solution['sid']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Deletes the CommandInstance
+ * Fetch the CommandInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return CommandInstance Fetched CommandInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): CommandInstance
{
- return $this->version->delete('delete', $this->uri);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
+
+ return new CommandInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Wireless.V1.CommandContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/CommandInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/CommandInstance.php
index 99a8f99..be5ecb2 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/CommandInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/CommandInstance.php
@@ -2,49 +2,57 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Wireless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Wireless\V1;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $accountSid
- * @property string $simSid
- * @property string $command
+ * @property string|null $sid
+ * @property string|null $accountSid
+ * @property string|null $simSid
+ * @property string|null $command
* @property string $commandMode
* @property string $transport
- * @property bool $deliveryReceiptRequested
+ * @property bool|null $deliveryReceiptRequested
* @property string $status
* @property string $direction
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
*/
class CommandInstance extends InstanceResource
{
/**
* Initialize the CommandInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Wireless\V1\CommandInstance
+ * @param string $sid The SID of the Command resource to delete.
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'simSid' => Values::array_get($payload, 'sim_sid'),
@@ -57,47 +65,51 @@ public function __construct(Version $version, array $payload, $sid = null)
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Wireless\V1\CommandContext Context for this
- * CommandInstance
+ * @return CommandContext Context for this CommandInstance
*/
- protected function proxy()
+ protected function proxy(): CommandContext
{
if (!$this->context) {
- $this->context = new CommandContext($this->version, $this->solution['sid']);
+ $this->context = new CommandContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a CommandInstance
+ * Delete the CommandInstance
*
- * @return CommandInstance Fetched CommandInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Deletes the CommandInstance
+ * Fetch the CommandInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @return CommandInstance Fetched CommandInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function fetch(): CommandInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->fetch();
}
/**
@@ -107,7 +119,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -126,12 +138,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Wireless.V1.CommandInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/CommandList.php b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/CommandList.php
index ae42f63..0e1be9d 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/CommandList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/CommandList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Wireless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Wireless\V1;
@@ -12,56 +19,71 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class CommandList extends ListResource
-{
+ {
/**
* Construct the CommandList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Wireless\V1\CommandList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/Commands';
}
/**
- * Streams CommandInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the CommandInstance
*
+ * @param string $command The message body of the Command. Can be plain text in text mode or a Base64 encoded byte string in binary mode.
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return CommandInstance Created CommandInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function create(string $command, array $options = []): CommandInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($options, $limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'Command' =>
+ $command,
+ 'Sim' =>
+ $options['sim'],
+ 'CallbackMethod' =>
+ $options['callbackMethod'],
+ 'CallbackUrl' =>
+ $options['callbackUrl'],
+ 'CommandMode' =>
+ $options['commandMode'],
+ 'IncludeSid' =>
+ $options['includeSid'],
+ 'DeliveryReceiptRequested' =>
+ Serialize::booleanToString($options['deliveryReceiptRequested']),
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new CommandInstance(
+ $this->version,
+ $payload
+ );
}
+
/**
* Reads CommandInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -78,39 +100,72 @@ public function stream($options = array(), $limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return CommandInstance[] Array of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
+ /**
+ * Streams CommandInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of CommandInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of CommandInstance
+ * @return CommandPage Page of CommandInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): CommandPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Sim' => $options['sim'],
- 'Status' => $options['status'],
- 'Direction' => $options['direction'],
- 'Transport' => $options['transport'],
+
+ $params = Values::of([
+ 'Sim' =>
+ $options['sim'],
+ 'Status' =>
+ $options['status'],
+ 'Direction' =>
+ $options['direction'],
+ 'Transport' =>
+ $options['transport'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new CommandPage($this->version, $response, $this->solution);
}
@@ -120,9 +175,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of CommandInstance
+ * @return CommandPage Page of CommandInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): CommandPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -132,48 +187,21 @@ public function getPage($targetUrl)
return new CommandPage($this->version, $response, $this->solution);
}
- /**
- * Create a new CommandInstance
- *
- * @param string $command The message body of the Command or a Base64 encoded
- * byte string in binary mode
- * @param array|Options $options Optional Arguments
- * @return CommandInstance Newly created CommandInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($command, $options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'Command' => $command,
- 'Sim' => $options['sim'],
- 'CallbackMethod' => $options['callbackMethod'],
- 'CallbackUrl' => $options['callbackUrl'],
- 'CommandMode' => $options['commandMode'],
- 'IncludeSid' => $options['includeSid'],
- 'DeliveryReceiptRequested' => Serialize::booleanToString($options['deliveryReceiptRequested']),
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new CommandInstance($this->version, $payload);
- }
/**
* Constructs a CommandContext
*
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Wireless\V1\CommandContext
+ * @param string $sid The SID of the Command resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): CommandContext
{
- return new CommandContext($this->version, $sid);
+ return new CommandContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -181,8 +209,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Wireless.V1.CommandList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/CommandOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/CommandOptions.php
index a686630..ca24135 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/CommandOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/CommandOptions.php
@@ -1,10 +1,16 @@
options['sim'] = $sim;
- $this->options['status'] = $status;
- $this->options['direction'] = $direction;
- $this->options['transport'] = $transport;
+ $this->options['callbackMethod'] = $callbackMethod;
+ $this->options['callbackUrl'] = $callbackUrl;
+ $this->options['commandMode'] = $commandMode;
+ $this->options['includeSid'] = $includeSid;
+ $this->options['deliveryReceiptRequested'] = $deliveryReceiptRequested;
}
/**
- * The `sid` or `unique_name` of the [Sim resources](https://www.twilio.com/docs/wireless/api/sim-resource) to read.
+ * The `sid` or `unique_name` of the [SIM](https://www.twilio.com/docs/iot/wireless/api/sim-resource) to send the Command to.
*
- * @param string $sim The sid or unique_name of the Sim resources to read
+ * @param string $sim The `sid` or `unique_name` of the [SIM](https://www.twilio.com/docs/iot/wireless/api/sim-resource) to send the Command to.
* @return $this Fluent Builder
*/
- public function setSim($sim)
+ public function setSim(string $sim): self
{
$this->options['sim'] = $sim;
return $this;
}
/**
- * The status of the resources to read. Can be: `queued`, `sent`, `delivered`, `received`, or `failed`.
+ * The HTTP method we use to call `callback_url`. Can be: `POST` or `GET`, and the default is `POST`.
*
- * @param string $status The status of the resources to read
+ * @param string $callbackMethod The HTTP method we use to call `callback_url`. Can be: `POST` or `GET`, and the default is `POST`.
* @return $this Fluent Builder
*/
- public function setStatus($status)
+ public function setCallbackMethod(string $callbackMethod): self
{
- $this->options['status'] = $status;
+ $this->options['callbackMethod'] = $callbackMethod;
return $this;
}
/**
- * Only return Commands with this direction value.
+ * The URL we call using the `callback_url` when the Command has finished sending, whether the command was delivered or it failed.
*
- * @param string $direction Only return Commands with this direction value
+ * @param string $callbackUrl The URL we call using the `callback_url` when the Command has finished sending, whether the command was delivered or it failed.
* @return $this Fluent Builder
*/
- public function setDirection($direction)
+ public function setCallbackUrl(string $callbackUrl): self
{
- $this->options['direction'] = $direction;
+ $this->options['callbackUrl'] = $callbackUrl;
return $this;
}
/**
- * Only return Commands with this transport value. Can be: `sms` or `ip`.
- *
- * @param string $transport Only return Commands with this transport value
+ * @param string $commandMode
* @return $this Fluent Builder
*/
- public function setTransport($transport)
+ public function setCommandMode(string $commandMode): self
{
- $this->options['transport'] = $transport;
+ $this->options['commandMode'] = $commandMode;
return $this;
}
/**
- * Provide a friendly representation
+ * Whether to include the SID of the command in the message body. Can be: `none`, `start`, or `end`, and the default behavior is `none`. When sending a Command to a SIM in text mode, we can automatically include the SID of the Command in the message body, which could be used to ensure that the device does not process the same Command more than once. A value of `start` will prepend the message with the Command SID, and `end` will append it to the end, separating the Command SID from the message body with a space. The length of the Command SID is included in the 160 character limit so the SMS body must be 128 characters or less before the Command SID is included.
*
- * @return string Machine friendly representation
+ * @param string $includeSid Whether to include the SID of the command in the message body. Can be: `none`, `start`, or `end`, and the default behavior is `none`. When sending a Command to a SIM in text mode, we can automatically include the SID of the Command in the message body, which could be used to ensure that the device does not process the same Command more than once. A value of `start` will prepend the message with the Command SID, and `end` will append it to the end, separating the Command SID from the message body with a space. The length of the Command SID is included in the 160 character limit so the SMS body must be 128 characters or less before the Command SID is included.
+ * @return $this Fluent Builder
*/
- public function __toString()
+ public function setIncludeSid(string $includeSid): self
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Wireless.V1.ReadCommandOptions ' . \implode(' ', $options) . ']';
+ $this->options['includeSid'] = $includeSid;
+ return $this;
}
-}
-class CreateCommandOptions extends Options
-{
/**
- * @param string $sim The sid or unique_name of the SIM to send the Command to
- * @param string $callbackMethod The HTTP method we use to call callback_url
- * @param string $callbackUrl he URL we call when the Command has finished
- * sending
- * @param string $commandMode The mode to use when sending the SMS message
- * @param string $includeSid Whether to include the SID of the command in the
- * message body
- * @param bool $deliveryReceiptRequested Whether to request delivery receipt
- * from the recipient
+ * Whether to request delivery receipt from the recipient. For Commands that request delivery receipt, the Command state transitions to 'delivered' once the server has received a delivery receipt from the device. The default value is `true`.
+ *
+ * @param bool $deliveryReceiptRequested Whether to request delivery receipt from the recipient. For Commands that request delivery receipt, the Command state transitions to 'delivered' once the server has received a delivery receipt from the device. The default value is `true`.
+ * @return $this Fluent Builder
*/
- public function __construct($sim = Values::NONE, $callbackMethod = Values::NONE, $callbackUrl = Values::NONE, $commandMode = Values::NONE, $includeSid = Values::NONE, $deliveryReceiptRequested = Values::NONE)
+ public function setDeliveryReceiptRequested(bool $deliveryReceiptRequested): self
{
- $this->options['sim'] = $sim;
- $this->options['callbackMethod'] = $callbackMethod;
- $this->options['callbackUrl'] = $callbackUrl;
- $this->options['commandMode'] = $commandMode;
- $this->options['includeSid'] = $includeSid;
$this->options['deliveryReceiptRequested'] = $deliveryReceiptRequested;
+ return $this;
}
/**
- * The `sid` or `unique_name` of the [SIM](https://www.twilio.com/docs/wireless/api/sim-resource) to send the Command to.
+ * Provide a friendly representation
*
- * @param string $sim The sid or unique_name of the SIM to send the Command to
- * @return $this Fluent Builder
+ * @return string Machine friendly representation
*/
- public function setSim($sim)
+ public function __toString(): string
{
- $this->options['sim'] = $sim;
- return $this;
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Wireless.V1.CreateCommandOptions ' . $options . ']';
}
+}
+
+
+class ReadCommandOptions extends Options
+ {
/**
- * The HTTP method we use to call `callback_url`. Can be: `POST` or `GET`, and the default is `POST`.
- *
- * @param string $callbackMethod The HTTP method we use to call callback_url
- * @return $this Fluent Builder
+ * @param string $sim The `sid` or `unique_name` of the [Sim resources](https://www.twilio.com/docs/iot/wireless/api/sim-resource) to read.
+ * @param string $status The status of the resources to read. Can be: `queued`, `sent`, `delivered`, `received`, or `failed`.
+ * @param string $direction Only return Commands with this direction value.
+ * @param string $transport Only return Commands with this transport value. Can be: `sms` or `ip`.
*/
- public function setCallbackMethod($callbackMethod)
- {
- $this->options['callbackMethod'] = $callbackMethod;
- return $this;
+ public function __construct(
+
+ string $sim = Values::NONE,
+ string $status = Values::NONE,
+ string $direction = Values::NONE,
+ string $transport = Values::NONE
+
+ ) {
+ $this->options['sim'] = $sim;
+ $this->options['status'] = $status;
+ $this->options['direction'] = $direction;
+ $this->options['transport'] = $transport;
}
/**
- * The URL we call using the `callback_url` when the Command has finished sending, whether the command was delivered or it failed.
+ * The `sid` or `unique_name` of the [Sim resources](https://www.twilio.com/docs/iot/wireless/api/sim-resource) to read.
*
- * @param string $callbackUrl he URL we call when the Command has finished
- * sending
+ * @param string $sim The `sid` or `unique_name` of the [Sim resources](https://www.twilio.com/docs/iot/wireless/api/sim-resource) to read.
* @return $this Fluent Builder
*/
- public function setCallbackUrl($callbackUrl)
+ public function setSim(string $sim): self
{
- $this->options['callbackUrl'] = $callbackUrl;
+ $this->options['sim'] = $sim;
return $this;
}
/**
- * The mode to use when sending the SMS message. Can be: `text` or `binary`. The default SMS mode is `text`.
+ * The status of the resources to read. Can be: `queued`, `sent`, `delivered`, `received`, or `failed`.
*
- * @param string $commandMode The mode to use when sending the SMS message
+ * @param string $status The status of the resources to read. Can be: `queued`, `sent`, `delivered`, `received`, or `failed`.
* @return $this Fluent Builder
*/
- public function setCommandMode($commandMode)
+ public function setStatus(string $status): self
{
- $this->options['commandMode'] = $commandMode;
+ $this->options['status'] = $status;
return $this;
}
/**
- * Whether to include the SID of the command in the message body. Can be: `none`, `start`, or `end`, and the default behavior is `none`. When sending a Command to a SIM in text mode, we can automatically include the SID of the Command in the message body, which could be used to ensure that the device does not process the same Command more than once. A value of `start` will prepend the message with the Command SID, and `end` will append it to the end, separating the Command SID from the message body with a space. The length of the Command SID is included in the 160 character limit so the SMS body must be 128 characters or less before the Command SID is included.
+ * Only return Commands with this direction value.
*
- * @param string $includeSid Whether to include the SID of the command in the
- * message body
+ * @param string $direction Only return Commands with this direction value.
* @return $this Fluent Builder
*/
- public function setIncludeSid($includeSid)
+ public function setDirection(string $direction): self
{
- $this->options['includeSid'] = $includeSid;
+ $this->options['direction'] = $direction;
return $this;
}
/**
- * Whether to request delivery receipt from the recipient. For Commands that request delivery receipt, the Command state transitions to 'delivered' once the server has received a delivery receipt from the device. The default value is `true`.
+ * Only return Commands with this transport value. Can be: `sms` or `ip`.
*
- * @param bool $deliveryReceiptRequested Whether to request delivery receipt
- * from the recipient
+ * @param string $transport Only return Commands with this transport value. Can be: `sms` or `ip`.
* @return $this Fluent Builder
*/
- public function setDeliveryReceiptRequested($deliveryReceiptRequested)
+ public function setTransport(string $transport): self
{
- $this->options['deliveryReceiptRequested'] = $deliveryReceiptRequested;
+ $this->options['transport'] = $transport;
return $this;
}
@@ -228,14 +265,10 @@ public function setDeliveryReceiptRequested($deliveryReceiptRequested)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Wireless.V1.CreateCommandOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Wireless.V1.ReadCommandOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/CommandPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/CommandPage.php
index 43c9e1f..daf0a9e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/CommandPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/CommandPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return CommandInstance \Twilio\Rest\Wireless\V1\CommandInstance
+ */
+ public function buildInstance(array $payload): CommandInstance
{
return new CommandInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Wireless.V1.CommandPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/RatePlanContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/RatePlanContext.php
index e004fda..a96df41 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/RatePlanContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/RatePlanContext.php
@@ -2,105 +2,127 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Wireless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Wireless\V1;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+
class RatePlanContext extends InstanceContext
-{
+ {
/**
* Initialize the RatePlanContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Wireless\V1\RatePlanContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid The SID of the RatePlan resource to delete.
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/RatePlans/' . \rawurlencode($sid) . '';
+ $this->uri = '/RatePlans/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a RatePlanInstance
+ * Delete the RatePlanInstance
*
- * @return RatePlanInstance Fetched RatePlanInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new RatePlanInstance($this->version, $payload, $this->solution['sid']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Update the RatePlanInstance
+ * Fetch the RatePlanInstance
*
- * @param array|Options $options Optional Arguments
- * @return RatePlanInstance Updated RatePlanInstance
+ * @return RatePlanInstance Fetched RatePlanInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): RatePlanInstance
{
- $options = new Values($options);
- $data = Values::of(array(
- 'UniqueName' => $options['uniqueName'],
- 'FriendlyName' => $options['friendlyName'],
- ));
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
+ return new RatePlanInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
);
-
- return new RatePlanInstance($this->version, $payload, $this->solution['sid']);
}
+
/**
- * Deletes the RatePlanInstance
+ * Update the RatePlanInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return RatePlanInstance Updated RatePlanInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): RatePlanInstance
{
- return $this->version->delete('delete', $this->uri);
+
+ $options = new Values($options);
+
+ $data = Values::of([
+ 'UniqueName' =>
+ $options['uniqueName'],
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
+
+ return new RatePlanInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Wireless.V1.RatePlanContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/RatePlanInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/RatePlanInstance.php
index f7c9f37..e5633c8 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/RatePlanInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/RatePlanInstance.php
@@ -2,54 +2,62 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Wireless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Wireless\V1;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $uniqueName
- * @property string $accountSid
- * @property string $friendlyName
- * @property bool $dataEnabled
- * @property string $dataMetering
+ * @property string|null $sid
+ * @property string|null $uniqueName
+ * @property string|null $accountSid
+ * @property string|null $friendlyName
+ * @property bool|null $dataEnabled
+ * @property string|null $dataMetering
* @property int $dataLimit
- * @property bool $messagingEnabled
- * @property bool $voiceEnabled
- * @property bool $nationalRoamingEnabled
+ * @property bool|null $messagingEnabled
+ * @property bool|null $voiceEnabled
+ * @property bool|null $nationalRoamingEnabled
* @property int $nationalRoamingDataLimit
- * @property string $internationalRoaming
+ * @property string[]|null $internationalRoaming
* @property int $internationalRoamingDataLimit
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
*/
class RatePlanInstance extends InstanceResource
{
/**
* Initialize the RatePlanInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Wireless\V1\RatePlanInstance
+ * @param string $sid The SID of the RatePlan resource to delete.
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'uniqueName' => Values::array_get($payload, 'unique_name'),
'accountSid' => Values::array_get($payload, 'account_sid'),
@@ -66,59 +74,64 @@ public function __construct(Version $version, array $payload, $sid = null)
'dateCreated' => Deserialize::dateTime(Values::array_get($payload, 'date_created')),
'dateUpdated' => Deserialize::dateTime(Values::array_get($payload, 'date_updated')),
'url' => Values::array_get($payload, 'url'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Wireless\V1\RatePlanContext Context for this
- * RatePlanInstance
+ * @return RatePlanContext Context for this RatePlanInstance
*/
- protected function proxy()
+ protected function proxy(): RatePlanContext
{
if (!$this->context) {
- $this->context = new RatePlanContext($this->version, $this->solution['sid']);
+ $this->context = new RatePlanContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a RatePlanInstance
+ * Delete the RatePlanInstance
*
- * @return RatePlanInstance Fetched RatePlanInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- return $this->proxy()->fetch();
+
+ return $this->proxy()->delete();
}
/**
- * Update the RatePlanInstance
+ * Fetch the RatePlanInstance
*
- * @param array|Options $options Optional Arguments
- * @return RatePlanInstance Updated RatePlanInstance
+ * @return RatePlanInstance Fetched RatePlanInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): RatePlanInstance
{
- return $this->proxy()->update($options);
+
+ return $this->proxy()->fetch();
}
/**
- * Deletes the RatePlanInstance
+ * Update the RatePlanInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return RatePlanInstance Updated RatePlanInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): RatePlanInstance
{
- return $this->proxy()->delete();
+
+ return $this->proxy()->update($options);
}
/**
@@ -128,7 +141,7 @@ public function delete()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -147,12 +160,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Wireless.V1.RatePlanInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/RatePlanList.php b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/RatePlanList.php
index 7e58aa5..72f4ba7 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/RatePlanList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/RatePlanList.php
@@ -2,9 +2,16 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Wireless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Wireless\V1;
@@ -12,55 +19,78 @@
use Twilio\Exceptions\TwilioException;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class RatePlanList extends ListResource
-{
+ {
/**
* Construct the RatePlanList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Wireless\V1\RatePlanList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/RatePlans';
}
/**
- * Streams RatePlanInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Create the RatePlanInstance
*
- * @param int $limit Upper limit for the number of records to return. stream()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @param array|Options $options Optional Arguments
+ * @return RatePlanInstance Created RatePlanInstance
+ * @throws TwilioException When an HTTP error occurs.
*/
- public function stream($limit = null, $pageSize = null)
+ public function create(array $options = []): RatePlanInstance
{
- $limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($limits['pageSize']);
+ $options = new Values($options);
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ $data = Values::of([
+ 'UniqueName' =>
+ $options['uniqueName'],
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'DataEnabled' =>
+ Serialize::booleanToString($options['dataEnabled']),
+ 'DataLimit' =>
+ $options['dataLimit'],
+ 'DataMetering' =>
+ $options['dataMetering'],
+ 'MessagingEnabled' =>
+ Serialize::booleanToString($options['messagingEnabled']),
+ 'VoiceEnabled' =>
+ Serialize::booleanToString($options['voiceEnabled']),
+ 'NationalRoamingEnabled' =>
+ Serialize::booleanToString($options['nationalRoamingEnabled']),
+ 'InternationalRoaming' =>
+ Serialize::map($options['internationalRoaming'], function ($e) { return $e; }),
+ 'NationalRoamingDataLimit' =>
+ $options['nationalRoamingDataLimit'],
+ 'InternationalRoamingDataLimit' =>
+ $options['internationalRoamingDataLimit'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->create('POST', $this->uri, [], $data, $headers);
+
+ return new RatePlanInstance(
+ $this->version,
+ $payload
+ );
}
+
/**
* Reads RatePlanInstance records from the API as a list.
* Unlike stream(), this operation is eager and will load `limit` records into
@@ -76,11 +106,38 @@ public function stream($limit = null, $pageSize = null)
* efficient page size, i.e. min(limit, 1000)
* @return RatePlanInstance[] Array of results
*/
- public function read($limit = null, $pageSize = null)
+ public function read(int $limit = null, $pageSize = null): array
{
return \iterator_to_array($this->stream($limit, $pageSize), false);
}
+ /**
+ * Streams RatePlanInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
+ *
+ * @param int $limit Upper limit for the number of records to return. stream()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, stream()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return Stream stream of results
+ */
+ public function stream(int $limit = null, $pageSize = null): Stream
+ {
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ }
+
/**
* Retrieve a single page of RatePlanInstance records from the API.
* Request is executed immediately
@@ -88,21 +145,22 @@ public function read($limit = null, $pageSize = null)
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of RatePlanInstance
+ * @return RatePlanPage Page of RatePlanInstance
*/
- public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): RatePlanPage
{
- $params = Values::of(array(
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new RatePlanPage($this->version, $response, $this->solution);
}
@@ -112,9 +170,9 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of RatePlanInstance
+ * @return RatePlanPage Page of RatePlanInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): RatePlanPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -124,52 +182,21 @@ public function getPage($targetUrl)
return new RatePlanPage($this->version, $response, $this->solution);
}
- /**
- * Create a new RatePlanInstance
- *
- * @param array|Options $options Optional Arguments
- * @return RatePlanInstance Newly created RatePlanInstance
- * @throws TwilioException When an HTTP error occurs.
- */
- public function create($options = array())
- {
- $options = new Values($options);
-
- $data = Values::of(array(
- 'UniqueName' => $options['uniqueName'],
- 'FriendlyName' => $options['friendlyName'],
- 'DataEnabled' => Serialize::booleanToString($options['dataEnabled']),
- 'DataLimit' => $options['dataLimit'],
- 'DataMetering' => $options['dataMetering'],
- 'MessagingEnabled' => Serialize::booleanToString($options['messagingEnabled']),
- 'VoiceEnabled' => Serialize::booleanToString($options['voiceEnabled']),
- 'NationalRoamingEnabled' => Serialize::booleanToString($options['nationalRoamingEnabled']),
- 'InternationalRoaming' => Serialize::map($options['internationalRoaming'], function ($e) {
- return $e;
- }),
- 'NationalRoamingDataLimit' => $options['nationalRoamingDataLimit'],
- 'InternationalRoamingDataLimit' => $options['internationalRoamingDataLimit'],
- ));
-
- $payload = $this->version->create(
- 'POST',
- $this->uri,
- array(),
- $data
- );
-
- return new RatePlanInstance($this->version, $payload);
- }
/**
* Constructs a RatePlanContext
*
- * @param string $sid The SID that identifies the resource to fetch
- * @return \Twilio\Rest\Wireless\V1\RatePlanContext
+ * @param string $sid The SID of the RatePlan resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): RatePlanContext
{
- return new RatePlanContext($this->version, $sid);
+ return new RatePlanContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -177,8 +204,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Wireless.V1.RatePlanList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/RatePlanOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/RatePlanOptions.php
index fb41576..4eaa330 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/RatePlanOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/RatePlanOptions.php
@@ -1,10 +1,16 @@
options['uniqueName'] = $uniqueName;
$this->options['friendlyName'] = $friendlyName;
$this->options['dataEnabled'] = $dataEnabled;
@@ -106,11 +134,10 @@ public function __construct($uniqueName = Values::NONE, $friendlyName = Values::
/**
* An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource.
*
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the resource
+ * @param string $uniqueName An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource.
* @return $this Fluent Builder
*/
- public function setUniqueName($uniqueName)
+ public function setUniqueName(string $uniqueName): self
{
$this->options['uniqueName'] = $uniqueName;
return $this;
@@ -119,10 +146,10 @@ public function setUniqueName($uniqueName)
/**
* A descriptive string that you create to describe the resource. It does not have to be unique.
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It does not have to be unique.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -131,11 +158,10 @@ public function setFriendlyName($friendlyName)
/**
* Whether SIMs can use GPRS/3G/4G/LTE data connectivity.
*
- * @param bool $dataEnabled Whether SIMs can use GPRS/3G/4G/LTE data
- * connectivity
+ * @param bool $dataEnabled Whether SIMs can use GPRS/3G/4G/LTE data connectivity.
* @return $this Fluent Builder
*/
- public function setDataEnabled($dataEnabled)
+ public function setDataEnabled(bool $dataEnabled): self
{
$this->options['dataEnabled'] = $dataEnabled;
return $this;
@@ -144,90 +170,82 @@ public function setDataEnabled($dataEnabled)
/**
* The total data usage (download and upload combined) in Megabytes that the Network allows during one month on the home network (T-Mobile USA). The metering period begins the day of activation and ends on the same day in the following month. Can be up to 2TB and the default value is `1000`.
*
- * @param int $dataLimit The total data usage in Megabytes that the Network
- * allows during one month on the home network
+ * @param int $dataLimit The total data usage (download and upload combined) in Megabytes that the Network allows during one month on the home network (T-Mobile USA). The metering period begins the day of activation and ends on the same day in the following month. Can be up to 2TB and the default value is `1000`.
* @return $this Fluent Builder
*/
- public function setDataLimit($dataLimit)
+ public function setDataLimit(int $dataLimit): self
{
$this->options['dataLimit'] = $dataLimit;
return $this;
}
/**
- * The model used to meter data usage. Can be: `payg` and `quota-1`, `quota-10`, and `quota-50`. Learn more about the available [data metering models](https://www.twilio.com/docs/wireless/api/rateplan-resource#payg-vs-quota-data-plans).
+ * The model used to meter data usage. Can be: `payg` and `quota-1`, `quota-10`, and `quota-50`. Learn more about the available [data metering models](https://www.twilio.com/docs/iot/wireless/api/rateplan-resource#payg-vs-quota-data-plans).
*
- * @param string $dataMetering The model used to meter data usage
+ * @param string $dataMetering The model used to meter data usage. Can be: `payg` and `quota-1`, `quota-10`, and `quota-50`. Learn more about the available [data metering models](https://www.twilio.com/docs/iot/wireless/api/rateplan-resource#payg-vs-quota-data-plans).
* @return $this Fluent Builder
*/
- public function setDataMetering($dataMetering)
+ public function setDataMetering(string $dataMetering): self
{
$this->options['dataMetering'] = $dataMetering;
return $this;
}
/**
- * Whether SIMs can make, send, and receive SMS using [Commands](https://www.twilio.com/docs/wireless/api/command-resource).
+ * Whether SIMs can make, send, and receive SMS using [Commands](https://www.twilio.com/docs/iot/wireless/api/command-resource).
*
- * @param bool $messagingEnabled Whether SIMs can make, send, and receive SMS
- * using Commands
+ * @param bool $messagingEnabled Whether SIMs can make, send, and receive SMS using [Commands](https://www.twilio.com/docs/iot/wireless/api/command-resource).
* @return $this Fluent Builder
*/
- public function setMessagingEnabled($messagingEnabled)
+ public function setMessagingEnabled(bool $messagingEnabled): self
{
$this->options['messagingEnabled'] = $messagingEnabled;
return $this;
}
/**
- * Whether SIMs can make and receive voice calls.
+ * Deprecated.
*
- * @param bool $voiceEnabled Whether SIMs can make and receive voice calls
+ * @param bool $voiceEnabled Deprecated.
* @return $this Fluent Builder
*/
- public function setVoiceEnabled($voiceEnabled)
+ public function setVoiceEnabled(bool $voiceEnabled): self
{
$this->options['voiceEnabled'] = $voiceEnabled;
return $this;
}
/**
- * Whether SIMs can roam on networks other than the home network (T-Mobile USA) in the United States. See [national roaming](https://www.twilio.com/docs/wireless/api/rateplan-resource#national-roaming).
+ * Whether SIMs can roam on networks other than the home network (T-Mobile USA) in the United States. See [national roaming](https://www.twilio.com/docs/iot/wireless/api/rateplan-resource#national-roaming).
*
- * @param bool $nationalRoamingEnabled Whether SIMs can roam on networks other
- * than the home network in the United
- * States
+ * @param bool $nationalRoamingEnabled Whether SIMs can roam on networks other than the home network (T-Mobile USA) in the United States. See [national roaming](https://www.twilio.com/docs/iot/wireless/api/rateplan-resource#national-roaming).
* @return $this Fluent Builder
*/
- public function setNationalRoamingEnabled($nationalRoamingEnabled)
+ public function setNationalRoamingEnabled(bool $nationalRoamingEnabled): self
{
$this->options['nationalRoamingEnabled'] = $nationalRoamingEnabled;
return $this;
}
/**
- * The list of services that SIMs capable of using GPRS/3G/4G/LTE data connectivity can use outside of the United States. Can be: `data`, `voice`, and `messaging`.
+ * The list of services that SIMs capable of using GPRS/3G/4G/LTE data connectivity can use outside of the United States. Can contain: `data` and `messaging`.
*
- * @param string $internationalRoaming The services that SIMs capable of using
- * GPRS/3G/4G/LTE data connectivity can use
- * outside of the United States
+ * @param string[] $internationalRoaming The list of services that SIMs capable of using GPRS/3G/4G/LTE data connectivity can use outside of the United States. Can contain: `data` and `messaging`.
* @return $this Fluent Builder
*/
- public function setInternationalRoaming($internationalRoaming)
+ public function setInternationalRoaming(array $internationalRoaming): self
{
$this->options['internationalRoaming'] = $internationalRoaming;
return $this;
}
/**
- * The total data usage (download and upload combined) in Megabytes that the Network allows during one month on non-home networks in the United States. The metering period begins the day of activation and ends on the same day in the following month. Can be up to 2TB. See [national roaming](https://www.twilio.com/docs/wireless/api/rateplan-resource#national-roaming) for more info.
+ * The total data usage (download and upload combined) in Megabytes that the Network allows during one month on non-home networks in the United States. The metering period begins the day of activation and ends on the same day in the following month. Can be up to 2TB. See [national roaming](https://www.twilio.com/docs/iot/wireless/api/rateplan-resource#national-roaming) for more info.
*
- * @param int $nationalRoamingDataLimit The total data usage in Megabytes that
- * the Network allows during one month on
- * non-home networks in the United States
+ * @param int $nationalRoamingDataLimit The total data usage (download and upload combined) in Megabytes that the Network allows during one month on non-home networks in the United States. The metering period begins the day of activation and ends on the same day in the following month. Can be up to 2TB. See [national roaming](https://www.twilio.com/docs/iot/wireless/api/rateplan-resource#national-roaming) for more info.
* @return $this Fluent Builder
*/
- public function setNationalRoamingDataLimit($nationalRoamingDataLimit)
+ public function setNationalRoamingDataLimit(int $nationalRoamingDataLimit): self
{
$this->options['nationalRoamingDataLimit'] = $nationalRoamingDataLimit;
return $this;
@@ -236,14 +254,10 @@ public function setNationalRoamingDataLimit($nationalRoamingDataLimit)
/**
* The total data usage (download and upload combined) in Megabytes that the Network allows during one month when roaming outside the United States. Can be up to 2TB.
*
- * @param int $internationalRoamingDataLimit The total data usage (download and
- * upload combined) in Megabytes that
- * the Network allows during one
- * month when roaming outside the
- * United States
+ * @param int $internationalRoamingDataLimit The total data usage (download and upload combined) in Megabytes that the Network allows during one month when roaming outside the United States. Can be up to 2TB.
* @return $this Fluent Builder
*/
- public function setInternationalRoamingDataLimit($internationalRoamingDataLimit)
+ public function setInternationalRoamingDataLimit(int $internationalRoamingDataLimit): self
{
$this->options['internationalRoamingDataLimit'] = $internationalRoamingDataLimit;
return $this;
@@ -254,27 +268,28 @@ public function setInternationalRoamingDataLimit($internationalRoamingDataLimit)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Wireless.V1.CreateRatePlanOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Wireless.V1.CreateRatePlanOptions ' . $options . ']';
}
}
+
+
+
class UpdateRatePlanOptions extends Options
-{
+ {
/**
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the resource
- * @param string $friendlyName A string to describe the resource
+ * @param string $uniqueName An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource.
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It does not have to be unique.
*/
- public function __construct($uniqueName = Values::NONE, $friendlyName = Values::NONE)
- {
+ public function __construct(
+
+ string $uniqueName = Values::NONE,
+ string $friendlyName = Values::NONE
+
+ ) {
$this->options['uniqueName'] = $uniqueName;
$this->options['friendlyName'] = $friendlyName;
}
@@ -282,11 +297,10 @@ public function __construct($uniqueName = Values::NONE, $friendlyName = Values::
/**
* An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource.
*
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the resource
+ * @param string $uniqueName An application-defined string that uniquely identifies the resource. It can be used in place of the resource's `sid` in the URL to address the resource.
* @return $this Fluent Builder
*/
- public function setUniqueName($uniqueName)
+ public function setUniqueName(string $uniqueName): self
{
$this->options['uniqueName'] = $uniqueName;
return $this;
@@ -295,10 +309,10 @@ public function setUniqueName($uniqueName)
/**
* A descriptive string that you create to describe the resource. It does not have to be unique.
*
- * @param string $friendlyName A string to describe the resource
+ * @param string $friendlyName A descriptive string that you create to describe the resource. It does not have to be unique.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
@@ -309,14 +323,10 @@ public function setFriendlyName($friendlyName)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Wireless.V1.UpdateRatePlanOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Wireless.V1.UpdateRatePlanOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/RatePlanPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/RatePlanPage.php
index 3f609bf..82583bb 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/RatePlanPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/RatePlanPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return RatePlanInstance \Twilio\Rest\Wireless\V1\RatePlanInstance
+ */
+ public function buildInstance(array $payload): RatePlanInstance
{
return new RatePlanInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Wireless.V1.RatePlanPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/Sim/DataSessionInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/Sim/DataSessionInstance.php
index c94e1c5..5285360 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/Sim/DataSessionInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/Sim/DataSessionInstance.php
@@ -2,54 +2,61 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Wireless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Wireless\V1\Sim;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+
/**
- * @property string $sid
- * @property string $simSid
- * @property string $accountSid
- * @property string $radioLink
- * @property string $operatorMcc
- * @property string $operatorMnc
- * @property string $operatorCountry
- * @property string $operatorName
- * @property string $cellId
- * @property array $cellLocationEstimate
+ * @property string|null $sid
+ * @property string|null $simSid
+ * @property string|null $accountSid
+ * @property string|null $radioLink
+ * @property string|null $operatorMcc
+ * @property string|null $operatorMnc
+ * @property string|null $operatorCountry
+ * @property string|null $operatorName
+ * @property string|null $cellId
+ * @property array|null $cellLocationEstimate
* @property int $packetsUploaded
* @property int $packetsDownloaded
- * @property \DateTime $lastUpdated
- * @property \DateTime $start
- * @property \DateTime $end
- * @property string $imei
+ * @property \DateTime|null $lastUpdated
+ * @property \DateTime|null $start
+ * @property \DateTime|null $end
+ * @property string|null $imei
*/
class DataSessionInstance extends InstanceResource
{
/**
* Initialize the DataSessionInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $simSid The SID of the Sim resource that the Data Session is
- * for
- * @return \Twilio\Rest\Wireless\V1\Sim\DataSessionInstance
+ * @param string $simSid The SID of the [Sim resource](https://www.twilio.com/docs/iot/wireless/api/sim-resource) with the Data Sessions to read.
*/
- public function __construct(Version $version, array $payload, $simSid)
+ public function __construct(Version $version, array $payload, string $simSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'simSid' => Values::array_get($payload, 'sim_sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
@@ -66,9 +73,9 @@ public function __construct(Version $version, array $payload, $simSid)
'start' => Deserialize::dateTime(Values::array_get($payload, 'start')),
'end' => Deserialize::dateTime(Values::array_get($payload, 'end')),
'imei' => Values::array_get($payload, 'imei'),
- );
+ ];
- $this->solution = array('simSid' => $simSid,);
+ $this->solution = ['simSid' => $simSid, ];
}
/**
@@ -78,7 +85,7 @@ public function __construct(Version $version, array $payload, $simSid)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -97,8 +104,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Wireless.V1.DataSessionInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/Sim/DataSessionList.php b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/Sim/DataSessionList.php
index 02a1bdb..39292c8 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/Sim/DataSessionList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/Sim/DataSessionList.php
@@ -2,37 +2,69 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Wireless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Wireless\V1\Sim;
use Twilio\ListResource;
-use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class DataSessionList extends ListResource
-{
+ {
/**
* Construct the DataSessionList
*
* @param Version $version Version that contains the resource
- * @param string $simSid The SID of the Sim resource that the Data Session is
- * for
- * @return \Twilio\Rest\Wireless\V1\Sim\DataSessionList
+ * @param string $simSid The SID of the [Sim resource](https://www.twilio.com/docs/iot/wireless/api/sim-resource) with the Data Sessions to read.
*/
- public function __construct(Version $version, $simSid)
- {
+ public function __construct(
+ Version $version,
+ string $simSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('simSid' => $simSid,);
+ $this->solution = [
+ 'simSid' =>
+ $simSid,
+
+ ];
+
+ $this->uri = '/Sims/' . \rawurlencode($simSid)
+ .'/DataSessions';
+ }
- $this->uri = '/Sims/' . \rawurlencode($simSid) . '/DataSessions';
+ /**
+ * Reads DataSessionInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return DataSessionInstance[] Array of results
+ */
+ public function read(int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($limit, $pageSize), false);
}
/**
@@ -43,7 +75,6 @@ public function __construct(Version $version, $simSid)
* The results are returned as a generator, so this operation is memory
* efficient.
*
- * @param array|Options $options Optional Arguments
* @param int $limit Upper limit for the number of records to return. stream()
* guarantees to never return more than limit. Default is no
* limit
@@ -52,64 +83,40 @@ public function __construct(Version $version, $simSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
- $page = $this->page($options, $limits['pageSize']);
+ $page = $this->page($limits['pageSize']);
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads DataSessionInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return DataSessionInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of DataSessionInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of DataSessionInstance
+ * @return DataSessionPage Page of DataSessionInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): DataSessionPage
{
- $options = new Values($options);
- $params = Values::of(array(
- 'End' => Serialize::iso8601DateTime($options['end']),
- 'Start' => Serialize::iso8601DateTime($options['start']),
+
+ $params = Values::of([
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new DataSessionPage($this->version, $response, $this->solution);
}
@@ -119,9 +126,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of DataSessionInstance
+ * @return DataSessionPage Page of DataSessionInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): DataSessionPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -131,13 +138,14 @@ public function getPage($targetUrl)
return new DataSessionPage($this->version, $response, $this->solution);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Wireless.V1.DataSessionList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/Sim/DataSessionOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/Sim/DataSessionOptions.php
deleted file mode 100644
index 458fbec..0000000
--- a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/Sim/DataSessionOptions.php
+++ /dev/null
@@ -1,85 +0,0 @@
-options['end'] = $end;
- $this->options['start'] = $start;
- }
-
- /**
- * The date that the record ended, given as GMT in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
- *
- * @param \DateTime $end The date that the record ended, given as GMT in ISO
- * 8601 format
- * @return $this Fluent Builder
- */
- public function setEnd($end)
- {
- $this->options['end'] = $end;
- return $this;
- }
-
- /**
- * The date that the Data Session started, given as GMT in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
- *
- * @param \DateTime $start The date that the Data Session started, given as GMT
- * in ISO 8601 format
- * @return $this Fluent Builder
- */
- public function setStart($start)
- {
- $this->options['start'] = $start;
- return $this;
- }
-
- /**
- * Provide a friendly representation
- *
- * @return string Machine friendly representation
- */
- public function __toString()
- {
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Wireless.V1.ReadDataSessionOptions ' . \implode(' ', $options) . ']';
- }
-}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/Sim/DataSessionPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/Sim/DataSessionPage.php
index 843cf70..ac8cb5e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/Sim/DataSessionPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/Sim/DataSessionPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return DataSessionInstance \Twilio\Rest\Wireless\V1\Sim\DataSessionInstance
+ */
+ public function buildInstance(array $payload): DataSessionInstance
{
return new DataSessionInstance($this->version, $payload, $this->solution['simSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Wireless.V1.DataSessionPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/Sim/UsageRecordInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/Sim/UsageRecordInstance.php
index c82e3f6..2ca9eaf 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/Sim/UsageRecordInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/Sim/UsageRecordInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Wireless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Wireless\V1\Sim;
use Twilio\Exceptions\TwilioException;
@@ -14,38 +22,37 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * @property string $simSid
- * @property string $accountSid
- * @property array $period
- * @property array $commands
- * @property array $data
+ * @property string|null $simSid
+ * @property string|null $accountSid
+ * @property array|null $period
+ * @property array|null $commands
+ * @property array|null $data
*/
class UsageRecordInstance extends InstanceResource
{
/**
* Initialize the UsageRecordInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $simSid The SID of the Sim resource that this Usage Record is
- * for
- * @return \Twilio\Rest\Wireless\V1\Sim\UsageRecordInstance
+ * @param string $simSid The SID of the [Sim resource](https://www.twilio.com/docs/iot/wireless/api/sim-resource) to read the usage from.
*/
- public function __construct(Version $version, array $payload, $simSid)
+ public function __construct(Version $version, array $payload, string $simSid)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'simSid' => Values::array_get($payload, 'sim_sid'),
'accountSid' => Values::array_get($payload, 'account_sid'),
'period' => Values::array_get($payload, 'period'),
'commands' => Values::array_get($payload, 'commands'),
'data' => Values::array_get($payload, 'data'),
- );
+ ];
- $this->solution = array('simSid' => $simSid,);
+ $this->solution = ['simSid' => $simSid, ];
}
/**
@@ -55,7 +62,7 @@ public function __construct(Version $version, array $payload, $simSid)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -74,8 +81,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Wireless.V1.UsageRecordInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/Sim/UsageRecordList.php b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/Sim/UsageRecordList.php
index 35fbfee..a24ec3b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/Sim/UsageRecordList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/Sim/UsageRecordList.php
@@ -2,37 +2,72 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Wireless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Wireless\V1\Sim;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class UsageRecordList extends ListResource
-{
+ {
/**
* Construct the UsageRecordList
*
* @param Version $version Version that contains the resource
- * @param string $simSid The SID of the Sim resource that this Usage Record is
- * for
- * @return \Twilio\Rest\Wireless\V1\Sim\UsageRecordList
+ * @param string $simSid The SID of the [Sim resource](https://www.twilio.com/docs/iot/wireless/api/sim-resource) to read the usage from.
*/
- public function __construct(Version $version, $simSid)
- {
+ public function __construct(
+ Version $version,
+ string $simSid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('simSid' => $simSid,);
+ $this->solution = [
+ 'simSid' =>
+ $simSid,
+
+ ];
+
+ $this->uri = '/Sims/' . \rawurlencode($simSid)
+ .'/UsageRecords';
+ }
- $this->uri = '/Sims/' . \rawurlencode($simSid) . '/UsageRecords';
+ /**
+ * Reads UsageRecordInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
+ *
+ * @param array|Options $options Optional Arguments
+ * @param int $limit Upper limit for the number of records to return. read()
+ * guarantees to never return more than limit. Default is no
+ * limit
+ * @param mixed $pageSize Number of records to fetch per request, when not set
+ * will use the default value of 50 records. If no
+ * page_size is defined but a limit is defined, read()
+ * will attempt to read the limit with the most
+ * efficient page size, i.e. min(limit, 1000)
+ * @return UsageRecordInstance[] Array of results
+ */
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
+ {
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
@@ -52,9 +87,9 @@ public function __construct(Version $version, $simSid)
* page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return Stream stream of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
$limits = $this->version->readLimits($limit, $pageSize);
@@ -63,54 +98,37 @@ public function stream($options = array(), $limit = null, $pageSize = null)
return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
- /**
- * Reads UsageRecordInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
- *
- * @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
- * guarantees to never return more than limit. Default is no
- * limit
- * @param mixed $pageSize Number of records to fetch per request, when not set
- * will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
- * will attempt to read the limit with the most
- * efficient page size, i.e. min(limit, 1000)
- * @return UsageRecordInstance[] Array of results
- */
- public function read($options = array(), $limit = null, $pageSize = null)
- {
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
- }
-
/**
* Retrieve a single page of UsageRecordInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of UsageRecordInstance
+ * @return UsageRecordPage Page of UsageRecordInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): UsageRecordPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'End' => Serialize::iso8601DateTime($options['end']),
- 'Start' => Serialize::iso8601DateTime($options['start']),
- 'Granularity' => $options['granularity'],
+
+ $params = Values::of([
+ 'End' =>
+ Serialize::iso8601DateTime($options['end']),
+ 'Start' =>
+ Serialize::iso8601DateTime($options['start']),
+ 'Granularity' =>
+ $options['granularity'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new UsageRecordPage($this->version, $response, $this->solution);
}
@@ -120,9 +138,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of UsageRecordInstance
+ * @return UsageRecordPage Page of UsageRecordInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): UsageRecordPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -132,13 +150,14 @@ public function getPage($targetUrl)
return new UsageRecordPage($this->version, $response, $this->solution);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Wireless.V1.UsageRecordList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/Sim/UsageRecordOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/Sim/UsageRecordOptions.php
index 0b08b94..e52239c 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/Sim/UsageRecordOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/Sim/UsageRecordOptions.php
@@ -1,10 +1,16 @@
options['end'] = $end;
$this->options['start'] = $start;
$this->options['granularity'] = $granularity;
@@ -47,10 +65,10 @@ public function __construct($end = Values::NONE, $start = Values::NONE, $granula
/**
* Only include usage that occurred on or before this date, specified in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html). The default is the current time.
*
- * @param \DateTime $end Only include usage that occurred on or before this date
+ * @param \DateTime $end Only include usage that occurred on or before this date, specified in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html). The default is the current time.
* @return $this Fluent Builder
*/
- public function setEnd($end)
+ public function setEnd(\DateTime $end): self
{
$this->options['end'] = $end;
return $this;
@@ -59,11 +77,10 @@ public function setEnd($end)
/**
* Only include usage that has occurred on or after this date, specified in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html). The default is one month before the `end` parameter value.
*
- * @param \DateTime $start Only include usage that has occurred on or after
- * this date
+ * @param \DateTime $start Only include usage that has occurred on or after this date, specified in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html). The default is one month before the `end` parameter value.
* @return $this Fluent Builder
*/
- public function setStart($start)
+ public function setStart(\DateTime $start): self
{
$this->options['start'] = $start;
return $this;
@@ -72,11 +89,10 @@ public function setStart($start)
/**
* How to summarize the usage by time. Can be: `daily`, `hourly`, or `all`. The default is `all`. A value of `all` returns one Usage Record that describes the usage for the entire period.
*
- * @param string $granularity The time-based grouping that results are
- * aggregated by
+ * @param string $granularity How to summarize the usage by time. Can be: `daily`, `hourly`, or `all`. The default is `all`. A value of `all` returns one Usage Record that describes the usage for the entire period.
* @return $this Fluent Builder
*/
- public function setGranularity($granularity)
+ public function setGranularity(string $granularity): self
{
$this->options['granularity'] = $granularity;
return $this;
@@ -87,14 +103,10 @@ public function setGranularity($granularity)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Wireless.V1.ReadUsageRecordOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Wireless.V1.ReadUsageRecordOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/Sim/UsageRecordPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/Sim/UsageRecordPage.php
index 2df8183..5050318 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/Sim/UsageRecordPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/Sim/UsageRecordPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return UsageRecordInstance \Twilio\Rest\Wireless\V1\Sim\UsageRecordInstance
+ */
+ public function buildInstance(array $payload): UsageRecordInstance
{
return new UsageRecordInstance($this->version, $payload, $this->solution['simSid']);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Wireless.V1.UsageRecordPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/SimContext.php b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/SimContext.php
index 94a10eb..2d9f483 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/SimContext.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/SimContext.php
@@ -2,155 +2,196 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Wireless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Wireless\V1;
use Twilio\Exceptions\TwilioException;
-use Twilio\InstanceContext;
+use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Rest\Wireless\V1\Sim\DataSessionList;
-use Twilio\Rest\Wireless\V1\Sim\UsageRecordList;
use Twilio\Values;
use Twilio\Version;
+use Twilio\InstanceContext;
+use Twilio\Rest\Wireless\V1\Sim\DataSessionList;
+use Twilio\Rest\Wireless\V1\Sim\UsageRecordList;
+
/**
- * @property \Twilio\Rest\Wireless\V1\Sim\UsageRecordList $usageRecords
- * @property \Twilio\Rest\Wireless\V1\Sim\DataSessionList $dataSessions
+ * @property DataSessionList $dataSessions
+ * @property UsageRecordList $usageRecords
*/
class SimContext extends InstanceContext
-{
- protected $_usageRecords = null;
- protected $_dataSessions = null;
+ {
+ protected $_dataSessions;
+ protected $_usageRecords;
/**
* Initialize the SimContext
*
- * @param \Twilio\Version $version Version that contains the resource
- * @param string $sid The SID of the Sim resource to fetch
- * @return \Twilio\Rest\Wireless\V1\SimContext
+ * @param Version $version Version that contains the resource
+ * @param string $sid The SID or the `unique_name` of the Sim resource to delete.
*/
- public function __construct(Version $version, $sid)
- {
+ public function __construct(
+ Version $version,
+ $sid
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array('sid' => $sid,);
+ $this->solution = [
+ 'sid' =>
+ $sid,
+ ];
- $this->uri = '/Sims/' . \rawurlencode($sid) . '';
+ $this->uri = '/Sims/' . \rawurlencode($sid)
+ .'';
}
/**
- * Fetch a SimInstance
+ * Delete the SimInstance
*
- * @return SimInstance Fetched SimInstance
+ * @return bool True if delete succeeds, false otherwise
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function delete(): bool
{
- $params = Values::of(array());
- $payload = $this->version->fetch(
- 'GET',
- $this->uri,
- $params
- );
-
- return new SimInstance($this->version, $payload, $this->solution['sid']);
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ return $this->version->delete('DELETE', $this->uri, [], [], $headers);
}
+
/**
- * Update the SimInstance
+ * Fetch the SimInstance
*
- * @param array|Options $options Optional Arguments
- * @return SimInstance Updated SimInstance
+ * @return SimInstance Fetched SimInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function fetch(): SimInstance
{
- $options = new Values($options);
- $data = Values::of(array(
- 'UniqueName' => $options['uniqueName'],
- 'CallbackMethod' => $options['callbackMethod'],
- 'CallbackUrl' => $options['callbackUrl'],
- 'FriendlyName' => $options['friendlyName'],
- 'RatePlan' => $options['ratePlan'],
- 'Status' => $options['status'],
- 'CommandsCallbackMethod' => $options['commandsCallbackMethod'],
- 'CommandsCallbackUrl' => $options['commandsCallbackUrl'],
- 'SmsFallbackMethod' => $options['smsFallbackMethod'],
- 'SmsFallbackUrl' => $options['smsFallbackUrl'],
- 'SmsMethod' => $options['smsMethod'],
- 'SmsUrl' => $options['smsUrl'],
- 'VoiceFallbackMethod' => $options['voiceFallbackMethod'],
- 'VoiceFallbackUrl' => $options['voiceFallbackUrl'],
- 'VoiceMethod' => $options['voiceMethod'],
- 'VoiceUrl' => $options['voiceUrl'],
- 'ResetStatus' => $options['resetStatus'],
- 'AccountSid' => $options['accountSid'],
- ));
-
- $payload = $this->version->update(
- 'POST',
- $this->uri,
- array(),
- $data
- );
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->fetch('GET', $this->uri, [], [], $headers);
- return new SimInstance($this->version, $payload, $this->solution['sid']);
+ return new SimInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
- * Deletes the SimInstance
+ * Update the SimInstance
*
- * @return boolean True if delete succeeds, false otherwise
+ * @param array|Options $options Optional Arguments
+ * @return SimInstance Updated SimInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function delete()
+ public function update(array $options = []): SimInstance
{
- return $this->version->delete('delete', $this->uri);
+
+ $options = new Values($options);
+
+ $data = Values::of([
+ 'UniqueName' =>
+ $options['uniqueName'],
+ 'CallbackMethod' =>
+ $options['callbackMethod'],
+ 'CallbackUrl' =>
+ $options['callbackUrl'],
+ 'FriendlyName' =>
+ $options['friendlyName'],
+ 'RatePlan' =>
+ $options['ratePlan'],
+ 'Status' =>
+ $options['status'],
+ 'CommandsCallbackMethod' =>
+ $options['commandsCallbackMethod'],
+ 'CommandsCallbackUrl' =>
+ $options['commandsCallbackUrl'],
+ 'SmsFallbackMethod' =>
+ $options['smsFallbackMethod'],
+ 'SmsFallbackUrl' =>
+ $options['smsFallbackUrl'],
+ 'SmsMethod' =>
+ $options['smsMethod'],
+ 'SmsUrl' =>
+ $options['smsUrl'],
+ 'VoiceFallbackMethod' =>
+ $options['voiceFallbackMethod'],
+ 'VoiceFallbackUrl' =>
+ $options['voiceFallbackUrl'],
+ 'VoiceMethod' =>
+ $options['voiceMethod'],
+ 'VoiceUrl' =>
+ $options['voiceUrl'],
+ 'ResetStatus' =>
+ $options['resetStatus'],
+ 'AccountSid' =>
+ $options['accountSid'],
+ ]);
+
+ $headers = Values::of(['Content-Type' => 'application/x-www-form-urlencoded' ]);
+ $payload = $this->version->update('POST', $this->uri, [], $data, $headers);
+
+ return new SimInstance(
+ $this->version,
+ $payload,
+ $this->solution['sid']
+ );
}
+
/**
- * Access the usageRecords
- *
- * @return \Twilio\Rest\Wireless\V1\Sim\UsageRecordList
+ * Access the dataSessions
*/
- protected function getUsageRecords()
+ protected function getDataSessions(): DataSessionList
{
- if (!$this->_usageRecords) {
- $this->_usageRecords = new UsageRecordList($this->version, $this->solution['sid']);
+ if (!$this->_dataSessions) {
+ $this->_dataSessions = new DataSessionList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_usageRecords;
+ return $this->_dataSessions;
}
/**
- * Access the dataSessions
- *
- * @return \Twilio\Rest\Wireless\V1\Sim\DataSessionList
+ * Access the usageRecords
*/
- protected function getDataSessions()
+ protected function getUsageRecords(): UsageRecordList
{
- if (!$this->_dataSessions) {
- $this->_dataSessions = new DataSessionList($this->version, $this->solution['sid']);
+ if (!$this->_usageRecords) {
+ $this->_usageRecords = new UsageRecordList(
+ $this->version,
+ $this->solution['sid']
+ );
}
- return $this->_dataSessions;
+ return $this->_usageRecords;
}
/**
* Magic getter to lazy load subresources
*
* @param string $name Subresource to return
- * @return \Twilio\ListResource The requested subresource
+ * @return ListResource The requested subresource
* @throws TwilioException For unknown subresources
*/
- public function __get($name)
+ public function __get(string $name): ListResource
{
if (\property_exists($this, '_' . $name)) {
$method = 'get' . \ucfirst($name);
@@ -165,10 +206,10 @@ public function __get($name)
*
* @param string $name Resource to return
* @param array $arguments Context parameters
- * @return \Twilio\InstanceContext The requested resource context
+ * @return InstanceContext The requested resource context
* @throws TwilioException For unknown resource
*/
- public function __call($name, $arguments)
+ public function __call(string $name, array $arguments): InstanceContext
{
$property = $this->$name;
if (\method_exists($property, 'getContext')) {
@@ -183,12 +224,12 @@ public function __call($name, $arguments)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Wireless.V1.SimContext ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/SimInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/SimInstance.php
index 762ca69..ed4257f 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/SimInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/SimInstance.php
@@ -2,65 +2,75 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Wireless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Wireless\V1;
-use Twilio\Deserialize;
use Twilio\Exceptions\TwilioException;
use Twilio\InstanceResource;
use Twilio\Options;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Deserialize;
+use Twilio\Rest\Wireless\V1\Sim\DataSessionList;
+use Twilio\Rest\Wireless\V1\Sim\UsageRecordList;
+
/**
- * @property string $sid
- * @property string $uniqueName
- * @property string $accountSid
- * @property string $ratePlanSid
- * @property string $friendlyName
- * @property string $iccid
- * @property string $eId
+ * @property string|null $sid
+ * @property string|null $uniqueName
+ * @property string|null $accountSid
+ * @property string|null $ratePlanSid
+ * @property string|null $friendlyName
+ * @property string|null $iccid
+ * @property string|null $eId
* @property string $status
* @property string $resetStatus
- * @property string $commandsCallbackUrl
- * @property string $commandsCallbackMethod
- * @property string $smsFallbackMethod
- * @property string $smsFallbackUrl
- * @property string $smsMethod
- * @property string $smsUrl
- * @property string $voiceFallbackMethod
- * @property string $voiceFallbackUrl
- * @property string $voiceMethod
- * @property string $voiceUrl
- * @property \DateTime $dateCreated
- * @property \DateTime $dateUpdated
- * @property string $url
- * @property array $links
- * @property string $ipAddress
+ * @property string|null $commandsCallbackUrl
+ * @property string|null $commandsCallbackMethod
+ * @property string|null $smsFallbackMethod
+ * @property string|null $smsFallbackUrl
+ * @property string|null $smsMethod
+ * @property string|null $smsUrl
+ * @property string|null $voiceFallbackMethod
+ * @property string|null $voiceFallbackUrl
+ * @property string|null $voiceMethod
+ * @property string|null $voiceUrl
+ * @property \DateTime|null $dateCreated
+ * @property \DateTime|null $dateUpdated
+ * @property string|null $url
+ * @property array|null $links
+ * @property string|null $ipAddress
*/
class SimInstance extends InstanceResource
{
- protected $_usageRecords = null;
- protected $_dataSessions = null;
+ protected $_dataSessions;
+ protected $_usageRecords;
/**
* Initialize the SimInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @param string $sid The SID of the Sim resource to fetch
- * @return \Twilio\Rest\Wireless\V1\SimInstance
+ * @param string $sid The SID or the `unique_name` of the Sim resource to delete.
*/
- public function __construct(Version $version, array $payload, $sid = null)
+ public function __construct(Version $version, array $payload, string $sid = null)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'sid' => Values::array_get($payload, 'sid'),
'uniqueName' => Values::array_get($payload, 'unique_name'),
'accountSid' => Values::array_get($payload, 'account_sid'),
@@ -85,34 +95,50 @@ public function __construct(Version $version, array $payload, $sid = null)
'url' => Values::array_get($payload, 'url'),
'links' => Values::array_get($payload, 'links'),
'ipAddress' => Values::array_get($payload, 'ip_address'),
- );
+ ];
- $this->solution = array('sid' => $sid ?: $this->properties['sid'],);
+ $this->solution = ['sid' => $sid ?: $this->properties['sid'], ];
}
/**
* Generate an instance context for the instance, the context is capable of
* performing various actions. All instance actions are proxied to the context
*
- * @return \Twilio\Rest\Wireless\V1\SimContext Context for this SimInstance
+ * @return SimContext Context for this SimInstance
*/
- protected function proxy()
+ protected function proxy(): SimContext
{
if (!$this->context) {
- $this->context = new SimContext($this->version, $this->solution['sid']);
+ $this->context = new SimContext(
+ $this->version,
+ $this->solution['sid']
+ );
}
return $this->context;
}
/**
- * Fetch a SimInstance
+ * Delete the SimInstance
+ *
+ * @return bool True if delete succeeds, false otherwise
+ * @throws TwilioException When an HTTP error occurs.
+ */
+ public function delete(): bool
+ {
+
+ return $this->proxy()->delete();
+ }
+
+ /**
+ * Fetch the SimInstance
*
* @return SimInstance Fetched SimInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function fetch()
+ public function fetch(): SimInstance
{
+
return $this->proxy()->fetch();
}
@@ -123,42 +149,28 @@ public function fetch()
* @return SimInstance Updated SimInstance
* @throws TwilioException When an HTTP error occurs.
*/
- public function update($options = array())
+ public function update(array $options = []): SimInstance
{
+
return $this->proxy()->update($options);
}
/**
- * Deletes the SimInstance
- *
- * @return boolean True if delete succeeds, false otherwise
- * @throws TwilioException When an HTTP error occurs.
+ * Access the dataSessions
*/
- public function delete()
+ protected function getDataSessions(): DataSessionList
{
- return $this->proxy()->delete();
+ return $this->proxy()->dataSessions;
}
/**
* Access the usageRecords
- *
- * @return \Twilio\Rest\Wireless\V1\Sim\UsageRecordList
*/
- protected function getUsageRecords()
+ protected function getUsageRecords(): UsageRecordList
{
return $this->proxy()->usageRecords;
}
- /**
- * Access the dataSessions
- *
- * @return \Twilio\Rest\Wireless\V1\Sim\DataSessionList
- */
- protected function getDataSessions()
- {
- return $this->proxy()->dataSessions;
- }
-
/**
* Magic getter to access properties
*
@@ -166,7 +178,7 @@ protected function getDataSessions()
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -185,12 +197,13 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $context = array();
+ $context = [];
foreach ($this->solution as $key => $value) {
$context[] = "$key=$value";
}
return '[Twilio.Wireless.V1.SimInstance ' . \implode(' ', $context) . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/SimList.php b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/SimList.php
index 8bea7e0..b6be5ba 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/SimList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/SimList.php
@@ -2,114 +2,130 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Wireless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Wireless\V1;
use Twilio\ListResource;
use Twilio\Options;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+
class SimList extends ListResource
-{
+ {
/**
* Construct the SimList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Wireless\V1\SimList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/Sims';
}
/**
- * Streams SimInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Reads SimInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
+ * @param int $limit Upper limit for the number of records to return. read()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
+ * page_size is defined but a limit is defined, read()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return SimInstance[] Array of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($options, $limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
- * Reads SimInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
+ * Streams SimInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
+ * @param int $limit Upper limit for the number of records to return. stream()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
+ * page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return SimInstance[] Array of results
+ * @return Stream stream of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
/**
* Retrieve a single page of SimInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of SimInstance
+ * @return SimPage Page of SimInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): SimPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'Status' => $options['status'],
- 'Iccid' => $options['iccid'],
- 'RatePlan' => $options['ratePlan'],
- 'EId' => $options['eId'],
- 'SimRegistrationCode' => $options['simRegistrationCode'],
+
+ $params = Values::of([
+ 'Status' =>
+ $options['status'],
+ 'Iccid' =>
+ $options['iccid'],
+ 'RatePlan' =>
+ $options['ratePlan'],
+ 'EId' =>
+ $options['eId'],
+ 'SimRegistrationCode' =>
+ $options['simRegistrationCode'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new SimPage($this->version, $response, $this->solution);
}
@@ -119,9 +135,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of SimInstance
+ * @return SimPage Page of SimInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): SimPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -131,15 +147,21 @@ public function getPage($targetUrl)
return new SimPage($this->version, $response, $this->solution);
}
+
/**
* Constructs a SimContext
*
- * @param string $sid The SID of the Sim resource to fetch
- * @return \Twilio\Rest\Wireless\V1\SimContext
+ * @param string $sid The SID or the `unique_name` of the Sim resource to delete.
*/
- public function getContext($sid)
+ public function getContext(
+ string $sid
+
+ ): SimContext
{
- return new SimContext($this->version, $sid);
+ return new SimContext(
+ $this->version,
+ $sid
+ );
}
/**
@@ -147,8 +169,8 @@ public function getContext($sid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Wireless.V1.SimList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/SimOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/SimOptions.php
index ee5c2de..c00a596 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/SimOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/SimOptions.php
@@ -1,10 +1,16 @@
options['status'] = $status;
$this->options['iccid'] = $iccid;
$this->options['ratePlan'] = $ratePlan;
@@ -95,10 +147,10 @@ public function __construct($status = Values::NONE, $iccid = Values::NONE, $rate
/**
* Only return Sim resources with this status.
*
- * @param string $status Only return Sim resources with this status
+ * @param string $status Only return Sim resources with this status.
* @return $this Fluent Builder
*/
- public function setStatus($status)
+ public function setStatus(string $status): self
{
$this->options['status'] = $status;
return $this;
@@ -107,23 +159,22 @@ public function setStatus($status)
/**
* Only return Sim resources with this ICCID. This will return a list with a maximum size of 1.
*
- * @param string $iccid Only return Sim resources with this ICCID
+ * @param string $iccid Only return Sim resources with this ICCID. This will return a list with a maximum size of 1.
* @return $this Fluent Builder
*/
- public function setIccid($iccid)
+ public function setIccid(string $iccid): self
{
$this->options['iccid'] = $iccid;
return $this;
}
/**
- * The SID or unique name of a [RatePlan resource](https://www.twilio.com/docs/wireless/api/rateplan-resource). Only return Sim resources assigned to this RatePlan resource.
+ * The SID or unique name of a [RatePlan resource](https://www.twilio.com/docs/iot/wireless/api/rateplan-resource). Only return Sim resources assigned to this RatePlan resource.
*
- * @param string $ratePlan Only return Sim resources assigned to this RatePlan
- * resource
+ * @param string $ratePlan The SID or unique name of a [RatePlan resource](https://www.twilio.com/docs/iot/wireless/api/rateplan-resource). Only return Sim resources assigned to this RatePlan resource.
* @return $this Fluent Builder
*/
- public function setRatePlan($ratePlan)
+ public function setRatePlan(string $ratePlan): self
{
$this->options['ratePlan'] = $ratePlan;
return $this;
@@ -132,10 +183,10 @@ public function setRatePlan($ratePlan)
/**
* Deprecated.
*
- * @param string $eId Deprecated
+ * @param string $eId Deprecated.
* @return $this Fluent Builder
*/
- public function setEId($eId)
+ public function setEId(string $eId): self
{
$this->options['eId'] = $eId;
return $this;
@@ -144,11 +195,10 @@ public function setEId($eId)
/**
* Only return Sim resources with this registration code. This will return a list with a maximum size of 1.
*
- * @param string $simRegistrationCode Only return Sim resources with this
- * registration code
+ * @param string $simRegistrationCode Only return Sim resources with this registration code. This will return a list with a maximum size of 1.
* @return $this Fluent Builder
*/
- public function setSimRegistrationCode($simRegistrationCode)
+ public function setSimRegistrationCode(string $simRegistrationCode): self
{
$this->options['simRegistrationCode'] = $simRegistrationCode;
return $this;
@@ -159,58 +209,57 @@ public function setSimRegistrationCode($simRegistrationCode)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Wireless.V1.ReadSimOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Wireless.V1.ReadSimOptions ' . $options . ']';
}
}
class UpdateSimOptions extends Options
-{
+ {
/**
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the resource
- * @param string $callbackMethod The HTTP method we should use to call
- * callback_url
- * @param string $callbackUrl The URL we should call when the Sim resource has
- * finished updating
- * @param string $friendlyName A string to describe the Sim resource
- * @param string $ratePlan The SID or unique name of the RatePlan resource to
- * which the Sim resource should be assigned
- * @param string $status The new status of the Sim resource
- * @param string $commandsCallbackMethod The HTTP method we should use to call
- * commands_callback_url
- * @param string $commandsCallbackUrl The URL we should call when the SIM sends
- * a Command
- * @param string $smsFallbackMethod The HTTP method we should use to call
- * sms_fallback_url
- * @param string $smsFallbackUrl The URL we should call when an error occurs
- * while retrieving or executing the TwiML
- * requested from sms_url
- * @param string $smsMethod The HTTP method we should use to call sms_url
- * @param string $smsUrl The URL we should call when the SIM-connected device
- * sends an SMS message that is not a Command
- * @param string $voiceFallbackMethod The HTTP method we should use to call
- * voice_fallback_url
- * @param string $voiceFallbackUrl The URL we should call when an error occurs
- * while retrieving or executing the TwiML
- * requested from voice_url
- * @param string $voiceMethod The HTTP method we should use when we call
- * voice_url
- * @param string $voiceUrl The URL we should call when the SIM-connected device
- * makes a voice call
- * @param string $resetStatus Initiate a connectivity reset on a SIM
- * @param string $accountSid The SID of the Account to which the Sim resource
- * should belong
+ * @param string $uniqueName An application-defined string that uniquely identifies the resource. It can be used in place of the `sid` in the URL path to address the resource.
+ * @param string $callbackMethod The HTTP method we should use to call `callback_url`. Can be: `POST` or `GET`. The default is `POST`.
+ * @param string $callbackUrl The URL we should call using the `callback_url` when the SIM has finished updating. When the SIM transitions from `new` to `ready` or from any status to `deactivated`, we call this URL when the status changes to an intermediate status (`ready` or `deactivated`) and again when the status changes to its final status (`active` or `canceled`).
+ * @param string $friendlyName A descriptive string that you create to describe the Sim resource. It does not need to be unique.
+ * @param string $ratePlan The SID or unique name of the [RatePlan resource](https://www.twilio.com/docs/iot/wireless/api/rateplan-resource) to which the Sim resource should be assigned.
+ * @param string $status
+ * @param string $commandsCallbackMethod The HTTP method we should use to call `commands_callback_url`. Can be: `POST` or `GET`. The default is `POST`.
+ * @param string $commandsCallbackUrl The URL we should call using the `commands_callback_method` when the SIM sends a [Command](https://www.twilio.com/docs/iot/wireless/api/command-resource). Your server should respond with an HTTP status code in the 200 range; any response body is ignored.
+ * @param string $smsFallbackMethod The HTTP method we should use to call `sms_fallback_url`. Can be: `GET` or `POST`. Default is `POST`.
+ * @param string $smsFallbackUrl The URL we should call using the `sms_fallback_method` when an error occurs while retrieving or executing the TwiML requested from `sms_url`.
+ * @param string $smsMethod The HTTP method we should use to call `sms_url`. Can be: `GET` or `POST`. Default is `POST`.
+ * @param string $smsUrl The URL we should call using the `sms_method` when the SIM-connected device sends an SMS message that is not a [Command](https://www.twilio.com/docs/iot/wireless/api/command-resource).
+ * @param string $voiceFallbackMethod Deprecated.
+ * @param string $voiceFallbackUrl Deprecated.
+ * @param string $voiceMethod Deprecated.
+ * @param string $voiceUrl Deprecated.
+ * @param string $resetStatus
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) to which the Sim resource should belong. The Account SID can only be that of the requesting Account or that of a [Subaccount](https://www.twilio.com/docs/iam/api/subaccounts) of the requesting Account. Only valid when the Sim resource's status is `new`. For more information, see the [Move SIMs between Subaccounts documentation](https://www.twilio.com/docs/iot/wireless/api/sim-resource#move-sims-between-subaccounts).
*/
- public function __construct($uniqueName = Values::NONE, $callbackMethod = Values::NONE, $callbackUrl = Values::NONE, $friendlyName = Values::NONE, $ratePlan = Values::NONE, $status = Values::NONE, $commandsCallbackMethod = Values::NONE, $commandsCallbackUrl = Values::NONE, $smsFallbackMethod = Values::NONE, $smsFallbackUrl = Values::NONE, $smsMethod = Values::NONE, $smsUrl = Values::NONE, $voiceFallbackMethod = Values::NONE, $voiceFallbackUrl = Values::NONE, $voiceMethod = Values::NONE, $voiceUrl = Values::NONE, $resetStatus = Values::NONE, $accountSid = Values::NONE)
- {
+ public function __construct(
+
+ string $uniqueName = Values::NONE,
+ string $callbackMethod = Values::NONE,
+ string $callbackUrl = Values::NONE,
+ string $friendlyName = Values::NONE,
+ string $ratePlan = Values::NONE,
+ string $status = Values::NONE,
+ string $commandsCallbackMethod = Values::NONE,
+ string $commandsCallbackUrl = Values::NONE,
+ string $smsFallbackMethod = Values::NONE,
+ string $smsFallbackUrl = Values::NONE,
+ string $smsMethod = Values::NONE,
+ string $smsUrl = Values::NONE,
+ string $voiceFallbackMethod = Values::NONE,
+ string $voiceFallbackUrl = Values::NONE,
+ string $voiceMethod = Values::NONE,
+ string $voiceUrl = Values::NONE,
+ string $resetStatus = Values::NONE,
+ string $accountSid = Values::NONE
+
+ ) {
$this->options['uniqueName'] = $uniqueName;
$this->options['callbackMethod'] = $callbackMethod;
$this->options['callbackUrl'] = $callbackUrl;
@@ -234,11 +283,10 @@ public function __construct($uniqueName = Values::NONE, $callbackMethod = Values
/**
* An application-defined string that uniquely identifies the resource. It can be used in place of the `sid` in the URL path to address the resource.
*
- * @param string $uniqueName An application-defined string that uniquely
- * identifies the resource
+ * @param string $uniqueName An application-defined string that uniquely identifies the resource. It can be used in place of the `sid` in the URL path to address the resource.
* @return $this Fluent Builder
*/
- public function setUniqueName($uniqueName)
+ public function setUniqueName(string $uniqueName): self
{
$this->options['uniqueName'] = $uniqueName;
return $this;
@@ -247,11 +295,10 @@ public function setUniqueName($uniqueName)
/**
* The HTTP method we should use to call `callback_url`. Can be: `POST` or `GET`. The default is `POST`.
*
- * @param string $callbackMethod The HTTP method we should use to call
- * callback_url
+ * @param string $callbackMethod The HTTP method we should use to call `callback_url`. Can be: `POST` or `GET`. The default is `POST`.
* @return $this Fluent Builder
*/
- public function setCallbackMethod($callbackMethod)
+ public function setCallbackMethod(string $callbackMethod): self
{
$this->options['callbackMethod'] = $callbackMethod;
return $this;
@@ -260,11 +307,10 @@ public function setCallbackMethod($callbackMethod)
/**
* The URL we should call using the `callback_url` when the SIM has finished updating. When the SIM transitions from `new` to `ready` or from any status to `deactivated`, we call this URL when the status changes to an intermediate status (`ready` or `deactivated`) and again when the status changes to its final status (`active` or `canceled`).
*
- * @param string $callbackUrl The URL we should call when the Sim resource has
- * finished updating
+ * @param string $callbackUrl The URL we should call using the `callback_url` when the SIM has finished updating. When the SIM transitions from `new` to `ready` or from any status to `deactivated`, we call this URL when the status changes to an intermediate status (`ready` or `deactivated`) and again when the status changes to its final status (`active` or `canceled`).
* @return $this Fluent Builder
*/
- public function setCallbackUrl($callbackUrl)
+ public function setCallbackUrl(string $callbackUrl): self
{
$this->options['callbackUrl'] = $callbackUrl;
return $this;
@@ -273,35 +319,32 @@ public function setCallbackUrl($callbackUrl)
/**
* A descriptive string that you create to describe the Sim resource. It does not need to be unique.
*
- * @param string $friendlyName A string to describe the Sim resource
+ * @param string $friendlyName A descriptive string that you create to describe the Sim resource. It does not need to be unique.
* @return $this Fluent Builder
*/
- public function setFriendlyName($friendlyName)
+ public function setFriendlyName(string $friendlyName): self
{
$this->options['friendlyName'] = $friendlyName;
return $this;
}
/**
- * The SID or unique name of the [RatePlan resource](https://www.twilio.com/docs/wireless/api/rateplan-resource) to which the Sim resource should be assigned.
+ * The SID or unique name of the [RatePlan resource](https://www.twilio.com/docs/iot/wireless/api/rateplan-resource) to which the Sim resource should be assigned.
*
- * @param string $ratePlan The SID or unique name of the RatePlan resource to
- * which the Sim resource should be assigned
+ * @param string $ratePlan The SID or unique name of the [RatePlan resource](https://www.twilio.com/docs/iot/wireless/api/rateplan-resource) to which the Sim resource should be assigned.
* @return $this Fluent Builder
*/
- public function setRatePlan($ratePlan)
+ public function setRatePlan(string $ratePlan): self
{
$this->options['ratePlan'] = $ratePlan;
return $this;
}
/**
- * The new status of the Sim resource. Can be: `ready`, `active`, `suspended`, or `deactivated`.
- *
- * @param string $status The new status of the Sim resource
+ * @param string $status
* @return $this Fluent Builder
*/
- public function setStatus($status)
+ public function setStatus(string $status): self
{
$this->options['status'] = $status;
return $this;
@@ -310,24 +353,22 @@ public function setStatus($status)
/**
* The HTTP method we should use to call `commands_callback_url`. Can be: `POST` or `GET`. The default is `POST`.
*
- * @param string $commandsCallbackMethod The HTTP method we should use to call
- * commands_callback_url
+ * @param string $commandsCallbackMethod The HTTP method we should use to call `commands_callback_url`. Can be: `POST` or `GET`. The default is `POST`.
* @return $this Fluent Builder
*/
- public function setCommandsCallbackMethod($commandsCallbackMethod)
+ public function setCommandsCallbackMethod(string $commandsCallbackMethod): self
{
$this->options['commandsCallbackMethod'] = $commandsCallbackMethod;
return $this;
}
/**
- * The URL we should call using the `commands_callback_method` when the SIM sends a [Command](https://www.twilio.com/docs/wireless/api/command-resource). Your server should respond with an HTTP status code in the 200 range; any response body is ignored.
+ * The URL we should call using the `commands_callback_method` when the SIM sends a [Command](https://www.twilio.com/docs/iot/wireless/api/command-resource). Your server should respond with an HTTP status code in the 200 range; any response body is ignored.
*
- * @param string $commandsCallbackUrl The URL we should call when the SIM sends
- * a Command
+ * @param string $commandsCallbackUrl The URL we should call using the `commands_callback_method` when the SIM sends a [Command](https://www.twilio.com/docs/iot/wireless/api/command-resource). Your server should respond with an HTTP status code in the 200 range; any response body is ignored.
* @return $this Fluent Builder
*/
- public function setCommandsCallbackUrl($commandsCallbackUrl)
+ public function setCommandsCallbackUrl(string $commandsCallbackUrl): self
{
$this->options['commandsCallbackUrl'] = $commandsCallbackUrl;
return $this;
@@ -336,11 +377,10 @@ public function setCommandsCallbackUrl($commandsCallbackUrl)
/**
* The HTTP method we should use to call `sms_fallback_url`. Can be: `GET` or `POST`. Default is `POST`.
*
- * @param string $smsFallbackMethod The HTTP method we should use to call
- * sms_fallback_url
+ * @param string $smsFallbackMethod The HTTP method we should use to call `sms_fallback_url`. Can be: `GET` or `POST`. Default is `POST`.
* @return $this Fluent Builder
*/
- public function setSmsFallbackMethod($smsFallbackMethod)
+ public function setSmsFallbackMethod(string $smsFallbackMethod): self
{
$this->options['smsFallbackMethod'] = $smsFallbackMethod;
return $this;
@@ -349,12 +389,10 @@ public function setSmsFallbackMethod($smsFallbackMethod)
/**
* The URL we should call using the `sms_fallback_method` when an error occurs while retrieving or executing the TwiML requested from `sms_url`.
*
- * @param string $smsFallbackUrl The URL we should call when an error occurs
- * while retrieving or executing the TwiML
- * requested from sms_url
+ * @param string $smsFallbackUrl The URL we should call using the `sms_fallback_method` when an error occurs while retrieving or executing the TwiML requested from `sms_url`.
* @return $this Fluent Builder
*/
- public function setSmsFallbackUrl($smsFallbackUrl)
+ public function setSmsFallbackUrl(string $smsFallbackUrl): self
{
$this->options['smsFallbackUrl'] = $smsFallbackUrl;
return $this;
@@ -363,101 +401,92 @@ public function setSmsFallbackUrl($smsFallbackUrl)
/**
* The HTTP method we should use to call `sms_url`. Can be: `GET` or `POST`. Default is `POST`.
*
- * @param string $smsMethod The HTTP method we should use to call sms_url
+ * @param string $smsMethod The HTTP method we should use to call `sms_url`. Can be: `GET` or `POST`. Default is `POST`.
* @return $this Fluent Builder
*/
- public function setSmsMethod($smsMethod)
+ public function setSmsMethod(string $smsMethod): self
{
$this->options['smsMethod'] = $smsMethod;
return $this;
}
/**
- * The URL we should call using the `sms_method` when the SIM-connected device sends an SMS message that is not a [Command](https://www.twilio.com/docs/wireless/api/command-resource).
+ * The URL we should call using the `sms_method` when the SIM-connected device sends an SMS message that is not a [Command](https://www.twilio.com/docs/iot/wireless/api/command-resource).
*
- * @param string $smsUrl The URL we should call when the SIM-connected device
- * sends an SMS message that is not a Command
+ * @param string $smsUrl The URL we should call using the `sms_method` when the SIM-connected device sends an SMS message that is not a [Command](https://www.twilio.com/docs/iot/wireless/api/command-resource).
* @return $this Fluent Builder
*/
- public function setSmsUrl($smsUrl)
+ public function setSmsUrl(string $smsUrl): self
{
$this->options['smsUrl'] = $smsUrl;
return $this;
}
/**
- * The HTTP method we should use to call `voice_fallback_url`. Can be: `GET` or `POST`.
+ * Deprecated.
*
- * @param string $voiceFallbackMethod The HTTP method we should use to call
- * voice_fallback_url
+ * @param string $voiceFallbackMethod Deprecated.
* @return $this Fluent Builder
*/
- public function setVoiceFallbackMethod($voiceFallbackMethod)
+ public function setVoiceFallbackMethod(string $voiceFallbackMethod): self
{
$this->options['voiceFallbackMethod'] = $voiceFallbackMethod;
return $this;
}
/**
- * The URL we should call using the `voice_fallback_method` when an error occurs while retrieving or executing the TwiML requested from `voice_url`.
+ * Deprecated.
*
- * @param string $voiceFallbackUrl The URL we should call when an error occurs
- * while retrieving or executing the TwiML
- * requested from voice_url
+ * @param string $voiceFallbackUrl Deprecated.
* @return $this Fluent Builder
*/
- public function setVoiceFallbackUrl($voiceFallbackUrl)
+ public function setVoiceFallbackUrl(string $voiceFallbackUrl): self
{
$this->options['voiceFallbackUrl'] = $voiceFallbackUrl;
return $this;
}
/**
- * The HTTP method we should use when we call `voice_url`. Can be: `GET` or `POST`.
+ * Deprecated.
*
- * @param string $voiceMethod The HTTP method we should use when we call
- * voice_url
+ * @param string $voiceMethod Deprecated.
* @return $this Fluent Builder
*/
- public function setVoiceMethod($voiceMethod)
+ public function setVoiceMethod(string $voiceMethod): self
{
$this->options['voiceMethod'] = $voiceMethod;
return $this;
}
/**
- * The URL we should call using the `voice_method` when the SIM-connected device makes a voice call.
+ * Deprecated.
*
- * @param string $voiceUrl The URL we should call when the SIM-connected device
- * makes a voice call
+ * @param string $voiceUrl Deprecated.
* @return $this Fluent Builder
*/
- public function setVoiceUrl($voiceUrl)
+ public function setVoiceUrl(string $voiceUrl): self
{
$this->options['voiceUrl'] = $voiceUrl;
return $this;
}
/**
- * Initiate a connectivity reset on the SIM. Set to `resetting` to initiate a connectivity reset on the SIM. No other value is valid.
- *
- * @param string $resetStatus Initiate a connectivity reset on a SIM
+ * @param string $resetStatus
* @return $this Fluent Builder
*/
- public function setResetStatus($resetStatus)
+ public function setResetStatus(string $resetStatus): self
{
$this->options['resetStatus'] = $resetStatus;
return $this;
}
/**
- * The SID of the [Account](https://www.twilio.com/docs/iam/api/account) to which the Sim resource should belong. The Account SID can only be that of the requesting Account or that of a [Subaccount](https://www.twilio.com/docs/iam/api/subaccounts) of the requesting Account. Only valid when the Sim resource's status is `new`. For more information, see the [Move SIMs between Subaccounts documentation](https://www.twilio.com/docs/wireless/api/sim-resource#move-sims-between-subaccounts).
+ * The SID of the [Account](https://www.twilio.com/docs/iam/api/account) to which the Sim resource should belong. The Account SID can only be that of the requesting Account or that of a [Subaccount](https://www.twilio.com/docs/iam/api/subaccounts) of the requesting Account. Only valid when the Sim resource's status is `new`. For more information, see the [Move SIMs between Subaccounts documentation](https://www.twilio.com/docs/iot/wireless/api/sim-resource#move-sims-between-subaccounts).
*
- * @param string $accountSid The SID of the Account to which the Sim resource
- * should belong
+ * @param string $accountSid The SID of the [Account](https://www.twilio.com/docs/iam/api/account) to which the Sim resource should belong. The Account SID can only be that of the requesting Account or that of a [Subaccount](https://www.twilio.com/docs/iam/api/subaccounts) of the requesting Account. Only valid when the Sim resource's status is `new`. For more information, see the [Move SIMs between Subaccounts documentation](https://www.twilio.com/docs/iot/wireless/api/sim-resource#move-sims-between-subaccounts).
* @return $this Fluent Builder
*/
- public function setAccountSid($accountSid)
+ public function setAccountSid(string $accountSid): self
{
$this->options['accountSid'] = $accountSid;
return $this;
@@ -468,14 +497,10 @@ public function setAccountSid($accountSid)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Wireless.V1.UpdateSimOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Wireless.V1.UpdateSimOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/SimPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/SimPage.php
index 00b17f8..deca42b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/SimPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/SimPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return SimInstance \Twilio\Rest\Wireless\V1\SimInstance
+ */
+ public function buildInstance(array $payload): SimInstance
{
return new SimInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Wireless.V1.SimPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/UsageRecordInstance.php b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/UsageRecordInstance.php
index 6372c1d..4a7e73e 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/UsageRecordInstance.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/UsageRecordInstance.php
@@ -2,11 +2,19 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Wireless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
+
namespace Twilio\Rest\Wireless\V1;
use Twilio\Exceptions\TwilioException;
@@ -14,34 +22,34 @@
use Twilio\Values;
use Twilio\Version;
+
/**
- * @property string $accountSid
- * @property array $period
- * @property array $commands
- * @property array $data
+ * @property string|null $accountSid
+ * @property array|null $period
+ * @property array|null $commands
+ * @property array|null $data
*/
class UsageRecordInstance extends InstanceResource
{
/**
* Initialize the UsageRecordInstance
*
- * @param \Twilio\Version $version Version that contains the resource
+ * @param Version $version Version that contains the resource
* @param mixed[] $payload The response payload
- * @return \Twilio\Rest\Wireless\V1\UsageRecordInstance
*/
public function __construct(Version $version, array $payload)
{
parent::__construct($version);
// Marshaled Properties
- $this->properties = array(
+ $this->properties = [
'accountSid' => Values::array_get($payload, 'account_sid'),
'period' => Values::array_get($payload, 'period'),
'commands' => Values::array_get($payload, 'commands'),
'data' => Values::array_get($payload, 'data'),
- );
+ ];
- $this->solution = array();
+ $this->solution = [];
}
/**
@@ -51,7 +59,7 @@ public function __construct(Version $version, array $payload)
* @return mixed The requested property
* @throws TwilioException For unknown properties
*/
- public function __get($name)
+ public function __get(string $name)
{
if (\array_key_exists($name, $this->properties)) {
return $this->properties[$name];
@@ -70,8 +78,9 @@ public function __get($name)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Wireless.V1.UsageRecordInstance]';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/UsageRecordList.php b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/UsageRecordList.php
index f32b91d..fc41a71 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/UsageRecordList.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/UsageRecordList.php
@@ -2,113 +2,127 @@
/**
* This code was generated by
- * \ / _ _ _| _ _
- * | (_)\/(_)(_|\/| |(/_ v1.0.0
- * / /
+ * ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+ * | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+ * | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
+ *
+ * Twilio - Wireless
+ * This is the public Twilio REST API.
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator.
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
namespace Twilio\Rest\Wireless\V1;
use Twilio\ListResource;
use Twilio\Options;
-use Twilio\Serialize;
+use Twilio\Stream;
use Twilio\Values;
use Twilio\Version;
+use Twilio\Serialize;
+
class UsageRecordList extends ListResource
-{
+ {
/**
* Construct the UsageRecordList
*
* @param Version $version Version that contains the resource
- * @return \Twilio\Rest\Wireless\V1\UsageRecordList
*/
- public function __construct(Version $version)
- {
+ public function __construct(
+ Version $version
+ ) {
parent::__construct($version);
// Path Solution
- $this->solution = array();
+ $this->solution = [
+ ];
$this->uri = '/UsageRecords';
}
/**
- * Streams UsageRecordInstance records from the API as a generator stream.
- * This operation lazily loads records as efficiently as possible until the
- * limit
- * is reached.
- * The results are returned as a generator, so this operation is memory
- * efficient.
+ * Reads UsageRecordInstance records from the API as a list.
+ * Unlike stream(), this operation is eager and will load `limit` records into
+ * memory before returning.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. stream()
+ * @param int $limit Upper limit for the number of records to return. read()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, stream()
+ * page_size is defined but a limit is defined, read()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return \Twilio\Stream stream of results
+ * @return UsageRecordInstance[] Array of results
*/
- public function stream($options = array(), $limit = null, $pageSize = null)
+ public function read(array $options = [], int $limit = null, $pageSize = null): array
{
- $limits = $this->version->readLimits($limit, $pageSize);
-
- $page = $this->page($options, $limits['pageSize']);
-
- return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
+ return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
}
/**
- * Reads UsageRecordInstance records from the API as a list.
- * Unlike stream(), this operation is eager and will load `limit` records into
- * memory before returning.
+ * Streams UsageRecordInstance records from the API as a generator stream.
+ * This operation lazily loads records as efficiently as possible until the
+ * limit
+ * is reached.
+ * The results are returned as a generator, so this operation is memory
+ * efficient.
*
* @param array|Options $options Optional Arguments
- * @param int $limit Upper limit for the number of records to return. read()
+ * @param int $limit Upper limit for the number of records to return. stream()
* guarantees to never return more than limit. Default is no
* limit
* @param mixed $pageSize Number of records to fetch per request, when not set
* will use the default value of 50 records. If no
- * page_size is defined but a limit is defined, read()
+ * page_size is defined but a limit is defined, stream()
* will attempt to read the limit with the most
* efficient page size, i.e. min(limit, 1000)
- * @return UsageRecordInstance[] Array of results
+ * @return Stream stream of results
*/
- public function read($options = array(), $limit = null, $pageSize = null)
+ public function stream(array $options = [], int $limit = null, $pageSize = null): Stream
{
- return \iterator_to_array($this->stream($options, $limit, $pageSize), false);
+ $limits = $this->version->readLimits($limit, $pageSize);
+
+ $page = $this->page($options, $limits['pageSize']);
+
+ return $this->version->stream($page, $limits['limit'], $limits['pageLimit']);
}
/**
* Retrieve a single page of UsageRecordInstance records from the API.
* Request is executed immediately
*
- * @param array|Options $options Optional Arguments
* @param mixed $pageSize Number of records to return, defaults to 50
* @param string $pageToken PageToken provided by the API
* @param mixed $pageNumber Page Number, this value is simply for client state
- * @return \Twilio\Page Page of UsageRecordInstance
+ * @return UsageRecordPage Page of UsageRecordInstance
*/
- public function page($options = array(), $pageSize = Values::NONE, $pageToken = Values::NONE, $pageNumber = Values::NONE)
+ public function page(
+ array $options = [],
+ $pageSize = Values::NONE,
+ string $pageToken = Values::NONE,
+ $pageNumber = Values::NONE
+ ): UsageRecordPage
{
$options = new Values($options);
- $params = Values::of(array(
- 'End' => Serialize::iso8601DateTime($options['end']),
- 'Start' => Serialize::iso8601DateTime($options['start']),
- 'Granularity' => $options['granularity'],
+
+ $params = Values::of([
+ 'End' =>
+ Serialize::iso8601DateTime($options['end']),
+ 'Start' =>
+ Serialize::iso8601DateTime($options['start']),
+ 'Granularity' =>
+ $options['granularity'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
- ));
+ ]);
- $response = $this->version->page(
- 'GET',
- $this->uri,
- $params
- );
+ $response = $this->version->page('GET', $this->uri, $params);
return new UsageRecordPage($this->version, $response, $this->solution);
}
@@ -118,9 +132,9 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
- * @return \Twilio\Page Page of UsageRecordInstance
+ * @return UsageRecordPage Page of UsageRecordInstance
*/
- public function getPage($targetUrl)
+ public function getPage(string $targetUrl): UsageRecordPage
{
$response = $this->version->getDomain()->getClient()->request(
'GET',
@@ -130,13 +144,14 @@ public function getPage($targetUrl)
return new UsageRecordPage($this->version, $response, $this->solution);
}
+
/**
* Provide a friendly representation
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Wireless.V1.UsageRecordList]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/UsageRecordOptions.php b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/UsageRecordOptions.php
index e93e348..78cd011 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/UsageRecordOptions.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/UsageRecordOptions.php
@@ -1,10 +1,16 @@
options['end'] = $end;
$this->options['start'] = $start;
$this->options['granularity'] = $granularity;
@@ -49,11 +65,10 @@ public function __construct($end = Values::NONE, $start = Values::NONE, $granula
/**
* Only include usage that has occurred on or before this date. Format is [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).
*
- * @param \DateTime $end Only include usage that has occurred on or before this
- * date
+ * @param \DateTime $end Only include usage that has occurred on or before this date. Format is [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).
* @return $this Fluent Builder
*/
- public function setEnd($end)
+ public function setEnd(\DateTime $end): self
{
$this->options['end'] = $end;
return $this;
@@ -62,11 +77,10 @@ public function setEnd($end)
/**
* Only include usage that has occurred on or after this date. Format is [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).
*
- * @param \DateTime $start Only include usage that has occurred on or after
- * this date
+ * @param \DateTime $start Only include usage that has occurred on or after this date. Format is [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).
* @return $this Fluent Builder
*/
- public function setStart($start)
+ public function setStart(\DateTime $start): self
{
$this->options['start'] = $start;
return $this;
@@ -75,11 +89,10 @@ public function setStart($start)
/**
* How to summarize the usage by time. Can be: `daily`, `hourly`, or `all`. A value of `all` returns one Usage Record that describes the usage for the entire period.
*
- * @param string $granularity The time-based grouping that results are
- * aggregated by
+ * @param string $granularity How to summarize the usage by time. Can be: `daily`, `hourly`, or `all`. A value of `all` returns one Usage Record that describes the usage for the entire period.
* @return $this Fluent Builder
*/
- public function setGranularity($granularity)
+ public function setGranularity(string $granularity): self
{
$this->options['granularity'] = $granularity;
return $this;
@@ -90,14 +103,10 @@ public function setGranularity($granularity)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
- $options = array();
- foreach ($this->options as $key => $value) {
- if ($value != Values::NONE) {
- $options[] = "$key=$value";
- }
- }
- return '[Twilio.Wireless.V1.ReadUsageRecordOptions ' . \implode(' ', $options) . ']';
+ $options = \http_build_query(Values::of($this->options), '', ' ');
+ return '[Twilio.Wireless.V1.ReadUsageRecordOptions ' . $options . ']';
}
-}
\ No newline at end of file
+}
+
diff --git a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/UsageRecordPage.php b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/UsageRecordPage.php
index c570012..4be4d0b 100644
--- a/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/UsageRecordPage.php
+++ b/vendor/twilio/sdk/src/Twilio/Rest/Wireless/V1/UsageRecordPage.php
@@ -1,19 +1,32 @@
solution = $solution;
}
- public function buildInstance(array $payload)
+ /**
+ * @param array $payload Payload response from the API
+ * @return UsageRecordInstance \Twilio\Rest\Wireless\V1\UsageRecordInstance
+ */
+ public function buildInstance(array $payload): UsageRecordInstance
{
return new UsageRecordInstance($this->version, $payload);
}
@@ -31,8 +48,8 @@ public function buildInstance(array $payload)
*
* @return string Machine friendly representation
*/
- public function __toString()
+ public function __toString(): string
{
return '[Twilio.Wireless.V1.UsageRecordPage]';
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/Security/RequestValidator.php b/vendor/twilio/sdk/src/Twilio/Security/RequestValidator.php
index 9b892e2..91022a5 100644
--- a/vendor/twilio/sdk/src/Twilio/Security/RequestValidator.php
+++ b/vendor/twilio/sdk/src/Twilio/Security/RequestValidator.php
@@ -11,8 +11,7 @@
* $isFromTwilio = $validator->validate($_SERVER['HTTP_X_TWILIO_SIGNATURE'], 'https://your-example-url.com/api/route/', $_REQUEST);
* $isFromTwilio // <- if this is true, the request did come from Twilio, if not, it didn't
*/
-final class RequestValidator
-{
+class RequestValidator {
/**
* @access private
@@ -26,62 +25,60 @@ final class RequestValidator
* @param string $authToken the auth token of the Twilio user's account
* Sets the account auth token to be used by the rest of the class
*/
-
- public function __construct($authToken)
- {
+ public function __construct(string $authToken) {
$this->authToken = $authToken;
}
/**
* Creates the actual base64 encoded signature of the sha1 hash of the concatenated URL and your auth token
+ *
* @param string $url the full URL of the request URL you specify for your phone number or app, from the protocol (https...) through the end of the query string (everything after the ?)
* @param array $data the Twilio parameters the request was made with
* @return string
*/
-
- public function computeSignature($url, $data = array())
- {
-
+ public function computeSignature(string $url, array $data = []): string {
// sort the array by keys
\ksort($data);
- // append them to the data string in order
- // with no delimiters
foreach ($data as $key => $value) {
- $url .= $key . $value;
+ // convert a single value to an array or remove any duplicates
+ $valueArray = \is_array($value) ? \array_unique($value) : array($value);
+ // also sort all the values
+ \sort($valueArray);
+
+ // append them to the data string with no delimiters
+ foreach ($valueArray as $item) {
+ $url .= $key . $item;
+ }
}
// sha1 then base64 the url to the auth token and return the base64-ed string
return \base64_encode(\hash_hmac('sha1', $url, $this->authToken, true));
-
}
/**
* Converts the raw binary output to a hexadecimal return
+ *
* @param string $data
* @return string
*/
-
- public static function computeBodyHash($data = '')
- {
+ public static function computeBodyHash(string $data = ''): string {
return \bin2hex(\hash('sha256', $data, true));
}
/**
* The only method the client should be running...takes the Twilio signature, their URL, and the Twilio params and validates the signature
+ *
* @param string $expectedSignature
* @param string $url
- * @param array $data
+ * @param array|string $data
* @return bool
*/
-
- public function validate($expectedSignature, $url, $data = array())
- {
-
+ public function validate(string $expectedSignature, string $url, $data = []): bool {
$parsedUrl = \parse_url($url);
- $urlWithPort = RequestValidator::addPort($parsedUrl);
- $urlWithoutPort = RequestValidator::removePort($parsedUrl);
+ $urlWithPort = self::addPort($parsedUrl);
+ $urlWithoutPort = self::removePort($parsedUrl);
$validBodyHash = true; // May not receive body hash, so default succeed
if (!\is_array($data)) {
@@ -91,7 +88,7 @@ public function validate($expectedSignature, $url, $data = array())
\parse_str($queryString, $params);
$validBodyHash = self::compare(self::computeBodyHash($data), Values::array_get($params, 'bodySHA256'));
- $data = array();
+ $data = [];
}
/*
@@ -99,98 +96,77 @@ public function validate($expectedSignature, $url, $data = array())
* since sig generation on the back end is inconsistent.
*/
$validSignatureWithPort = self::compare(
- $this->computeSignature($urlWithPort, $data),
- $expectedSignature
+ $expectedSignature,
+ $this->computeSignature($urlWithPort, $data)
);
$validSignatureWithoutPort = self::compare(
- $this->computeSignature($urlWithoutPort, $data),
- $expectedSignature
+ $expectedSignature,
+ $this->computeSignature($urlWithoutPort, $data)
);
return $validBodyHash && ($validSignatureWithPort || $validSignatureWithoutPort);
-
}
/**
* Time insensitive compare, function's runtime is governed by the length
* of the first argument, not the difference between the arguments.
- * @param $a string First part of the comparison pair
- * @param $b string Second part of the comparison pair
+ *
+ * @param string $a First part of the comparison pair
+ * @param string $b Second part of the comparison pair
* @return bool True if $a === $b, false otherwise.
*/
- public static function compare($a, $b)
- {
-
- // if the strings are different lengths, obviously they're invalid
- if (\strlen($a) !== \strlen($b)) {
- return false;
- }
-
- if (!$a && !$b) {
- return true;
- }
-
- $limit = \strlen($a);
-
- // checking every character for an exact difference, if you find one, return false
- for ($i = 0; $i < $limit; ++$i) {
- if ($a[$i] !== $b[$i]) {
- return false;
- }
+ public static function compare(?string $a, ?string $b): bool {
+ if ($a && $b) {
+ return hash_equals($a, $b);
}
- // there have been no differences found
- return true;
-
+ return false;
}
- /*
+ /**
* Removes the port from the URL
- * @param $parsedURL array
- * @returns string Full URL without the port number
+ *
+ * @param array $parsedUrl
+ * @return string Full URL without the port number
*/
- private static function removePort($parsedUrl)
- {
+ private static function removePort(array $parsedUrl): string {
unset($parsedUrl['port']);
- return RequestValidator::buildUrl($parsedUrl);
+ return self::unparse_url($parsedUrl);
}
- /*
+ /**
* Adds the port to the URL
- * @param $parsedURL array
- * @returns string Full URL with the port number
+ *
+ * @param array $parsedUrl
+ * @return string Full URL with the port number
*/
- private static function addPort($parsedUrl)
- {
+ private static function addPort(array $parsedUrl): string {
if (!isset($parsedUrl['port'])) {
$port = ($parsedUrl['scheme'] === 'https') ? 443 : 80;
$parsedUrl['port'] = $port;
}
- return RequestValidator::buildUrl($parsedUrl);
+ return self::unparse_url($parsedUrl);
}
- /*
+ /**
* Builds the URL from its parsed component pieces
- * @param $parsedURL array
- * @returns string Full URL
+ *
+ * @param array $parsedUrl
+ * @return string Full URL
*/
- private static function buildUrl($parsedUrl)
- {
- $url = '';
- $parts = array();
+ static function unparse_url(array $parsedUrl): string {
+ $parts = [];
$parts['scheme'] = isset($parsedUrl['scheme']) ? $parsedUrl['scheme'] . '://' : '';
- $parts['user'] = isset($parsedUrl['user']) ? $parsedUrl['user'] : '';
+ $parts['user'] = $parsedUrl['user'] ?? '';
$parts['pass'] = isset($parsedUrl['pass']) ? ':' . $parsedUrl['pass'] : '';
$parts['pass'] = ($parts['user'] || $parts['pass']) ? $parts['pass'] . '@' : '';
- $parts['host'] = isset($parsedUrl['host']) ? $parsedUrl['host'] : '';
+ $parts['host'] = $parsedUrl['host'] ?? '';
$parts['port'] = isset($parsedUrl['port']) ? ':' . $parsedUrl['port'] : '';
- $parts['path'] = isset($parsedUrl['path']) ? $parsedUrl['path'] : '';
+ $parts['path'] = $parsedUrl['path'] ?? '';
$parts['query'] = isset($parsedUrl['query']) ? '?' . $parsedUrl['query'] : '';
$parts['fragment'] = isset($parsedUrl['fragment']) ? '#' . $parsedUrl['fragment'] : '';
return \implode('', $parts);
}
-
}
-
diff --git a/vendor/twilio/sdk/src/Twilio/Serialize.php b/vendor/twilio/sdk/src/Twilio/Serialize.php
index cd04831..e40fa2a 100644
--- a/vendor/twilio/sdk/src/Twilio/Serialize.php
+++ b/vendor/twilio/sdk/src/Twilio/Serialize.php
@@ -2,30 +2,27 @@
namespace Twilio;
-class Serialize
-{
+class Serialize {
- private static function flatten($map, $result = array(), $previous = array())
- {
+ private static function flatten(array $map, array $result = [], array $previous = []): array {
foreach ($map as $key => $value) {
if (\is_array($value)) {
- $result = self::flatten($value, $result, \array_merge($previous, array($key)));
+ $result = self::flatten($value, $result, \array_merge($previous, [$key]));
} else {
- $result[\implode('.', \array_merge($previous, array($key)))] = $value;
+ $result[\implode('.', \array_merge($previous, [$key]))] = $value;
}
}
return $result;
}
- public static function prefixedCollapsibleMap($map, $prefix)
- {
- if ($map === null || $map === \Twilio\Values::NONE) {
- return array();
+ public static function prefixedCollapsibleMap($map, string $prefix): array {
+ if ($map === null || $map === Values::NONE) {
+ return [];
}
$flattened = self::flatten($map);
- $result = array();
+ $result = [];
foreach ($flattened as $key => $value) {
$result[$prefix . '.' . $key] = $value;
}
@@ -33,10 +30,9 @@ public static function prefixedCollapsibleMap($map, $prefix)
return $result;
}
- public static function iso8601Date($dateTime)
- {
- if ($dateTime === null || $dateTime === \Twilio\Values::NONE) {
- return \Twilio\Values::NONE;
+ public static function iso8601Date($dateTime): string {
+ if ($dateTime === null || $dateTime === Values::NONE) {
+ return Values::NONE;
}
if (\is_string($dateTime)) {
@@ -44,14 +40,13 @@ public static function iso8601Date($dateTime)
}
$utcDate = clone $dateTime;
- $utcDate->setTimezone(new \DateTimeZone('UTC'));
+ $utcDate->setTimezone(new \DateTimeZone('+0000'));
return $utcDate->format('Y-m-d');
}
- public static function iso8601DateTime($dateTime)
- {
- if ($dateTime === null || $dateTime === \Twilio\Values::NONE) {
- return \Twilio\Values::NONE;
+ public static function iso8601DateTime($dateTime): string {
+ if ($dateTime === null || $dateTime === Values::NONE) {
+ return Values::NONE;
}
if (\is_string($dateTime)) {
@@ -59,29 +54,26 @@ public static function iso8601DateTime($dateTime)
}
$utcDate = clone $dateTime;
- $utcDate->setTimezone(new \DateTimeZone('UTC'));
+ $utcDate->setTimezone(new \DateTimeZone('+0000'));
return $utcDate->format('Y-m-d\TH:i:s\Z');
}
- public static function booleanToString($boolOrStr)
- {
+ public static function booleanToString($boolOrStr) {
if ($boolOrStr === null || \is_string($boolOrStr)) {
return $boolOrStr;
}
- return $boolOrStr ? 'True' : 'False';
+ return $boolOrStr ? 'true' : 'false';
}
- public static function jsonObject($object)
- {
+ public static function jsonObject($object) {
if (\is_array($object)) {
return \json_encode($object);
}
return $object;
}
- public static function map($values, $map_func)
- {
+ public static function map($values, $map_func) {
if (!\is_array($values)) {
return $values;
}
diff --git a/vendor/twilio/sdk/src/Twilio/Stream.php b/vendor/twilio/sdk/src/Twilio/Stream.php
index ce413cd..a9d1cdb 100644
--- a/vendor/twilio/sdk/src/Twilio/Stream.php
+++ b/vendor/twilio/sdk/src/Twilio/Stream.php
@@ -4,8 +4,7 @@
namespace Twilio;
-class Stream implements \Iterator
-{
+class Stream implements \Iterator {
public $page;
public $firstPage;
public $limit;
@@ -13,8 +12,7 @@ class Stream implements \Iterator
public $pageLimit;
public $currentPage;
- function __construct(Page $page, $limit, $pageLimit)
- {
+ public function __construct(Page $page, $limit, $pageLimit) {
$this->page = $page;
$this->firstPage = $page;
$this->limit = $limit;
@@ -29,8 +27,8 @@ function __construct(Page $page, $limit, $pageLimit)
* @link http://php.net/manual/en/iterator.current.php
* @return mixed Can return any type.
*/
- public function current()
- {
+ #[\ReturnTypeWillChange]
+ public function current() {
return $this->page->current();
}
@@ -40,8 +38,7 @@ public function current()
* @link http://php.net/manual/en/iterator.next.php
* @return void Any returned value is ignored.
*/
- public function next()
- {
+ public function next(): void {
$this->page->next();
$this->currentRecord++;
@@ -64,8 +61,8 @@ public function next()
* @link http://php.net/manual/en/iterator.key.php
* @return mixed scalar on success, or null on failure.
*/
- public function key()
- {
+ #[\ReturnTypeWillChange]
+ public function key() {
return $this->currentRecord;
}
@@ -73,11 +70,10 @@ public function key()
* (PHP 5 >= 5.0.0)
* Checks if current position is valid
* @link http://php.net/manual/en/iterator.valid.php
- * @return boolean The return value will be casted to boolean and then evaluated.
+ * @return bool The return value will be casted to boolean and then evaluated.
* Returns true on success or false on failure.
*/
- public function valid()
- {
+ public function valid(): bool {
return $this->page && $this->page->valid() && !$this->overLimit() && !$this->overPageLimit();
}
@@ -87,26 +83,23 @@ public function valid()
* @link http://php.net/manual/en/iterator.rewind.php
* @return void Any returned value is ignored.
*/
- public function rewind()
- {
+ public function rewind(): void {
$this->page = $this->firstPage;
$this->page->rewind();
$this->currentPage = 1;
$this->currentRecord = 1;
}
- protected function overLimit()
- {
+ protected function overLimit(): bool {
return ($this->limit !== null
&& $this->limit !== Values::NONE
&& $this->limit < $this->currentRecord);
}
- protected function overPageLimit()
- {
+ protected function overPageLimit(): bool {
return ($this->pageLimit !== null
&& $this->pageLimit !== Values::NONE
&& $this->pageLimit < $this->currentPage);
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/TaskRouter/WorkflowConfiguration.php b/vendor/twilio/sdk/src/Twilio/TaskRouter/WorkflowConfiguration.php
index 6f7c826..13a9d8e 100644
--- a/vendor/twilio/sdk/src/Twilio/TaskRouter/WorkflowConfiguration.php
+++ b/vendor/twilio/sdk/src/Twilio/TaskRouter/WorkflowConfiguration.php
@@ -8,48 +8,42 @@
* @author Justin Witz
* @license http://creativecommons.org/licenses/MIT/ MIT
*/
-class WorkflowConfiguration implements \JsonSerializable
-{
+class WorkflowConfiguration implements \JsonSerializable {
public $filters;
public $default_filter;
- public function __construct($filters, $default_filter = null)
- {
+ public function __construct(array $filters, $default_filter = null) {
$this->filters = $filters;
$this->default_filter = $default_filter;
}
- public function toJSON()
- {
+ public function toJSON() {
return \json_encode($this);
}
- public static function parse($json)
- {
+ public static function parse(string $json) {
return \json_decode($json);
}
- public static function fromJson($json)
- {
+ public static function fromJson(string $json): WorkflowConfiguration {
$configJSON = self::parse($json);
$default_filter = $configJSON->task_routing->default_filter;
- $filters = array();
+ $filters = [];
foreach ($configJSON->task_routing->filters as $filter) {
// friendly_name and filter_friendly_name should map to same variable
- $friendly_name = isset($filter->filter_friendly_name) ? $filter->filter_friendly_name : $filter->friendly_name;
+ $friendly_name = $filter->filter_friendly_name ?? $filter->friendly_name;
$filter = new WorkflowRule($filter->expression, $filter->targets, $friendly_name);
$filters[] = $filter;
}
return new WorkflowConfiguration($filters, $default_filter);
}
- public function jsonSerialize()
- {
- $json = array();
- $task_routing = array();
- $task_routing["filters"] = $this->filters;
- $task_routing["default_filter"] = $this->default_filter;
- $json["task_routing"] = $task_routing;
+ public function jsonSerialize(): array {
+ $json = [];
+ $task_routing = [];
+ $task_routing['filters'] = $this->filters;
+ $task_routing['default_filter'] = $this->default_filter;
+ $json['task_routing'] = $task_routing;
return $json;
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/TaskRouter/WorkflowRule.php b/vendor/twilio/sdk/src/Twilio/TaskRouter/WorkflowRule.php
index 609e30a..0183882 100644
--- a/vendor/twilio/sdk/src/Twilio/TaskRouter/WorkflowRule.php
+++ b/vendor/twilio/sdk/src/Twilio/TaskRouter/WorkflowRule.php
@@ -8,27 +8,24 @@
* @author Justin Witz
* @license http://creativecommons.org/licenses/MIT/ MIT
*/
-class WorkflowRule implements \JsonSerializable
-{
+class WorkflowRule implements \JsonSerializable {
public $expression;
public $friendly_name;
public $targets;
- public function __construct($expression, $targets, $friendly_name = null)
- {
+ public function __construct(string $expression, array $targets, string $friendly_name = null) {
$this->expression = $expression;
$this->targets = $targets;
$this->friendly_name = $friendly_name;
}
- public function jsonSerialize()
- {
- $json = array();
- $json["expression"] = $this->expression;
- $json["targets"] = $this->targets;
- if ($this->friendly_name != null) {
- $json["friendly_name"] = $this->friendly_name;
+ public function jsonSerialize(): array {
+ $json = [];
+ $json['expression'] = $this->expression;
+ $json['targets'] = $this->targets;
+ if ($this->friendly_name !== null) {
+ $json['friendly_name'] = $this->friendly_name;
}
return $json;
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/TaskRouter/WorkflowRuleTarget.php b/vendor/twilio/sdk/src/Twilio/TaskRouter/WorkflowRuleTarget.php
index 4d4ad50..c84fbbc 100644
--- a/vendor/twilio/sdk/src/Twilio/TaskRouter/WorkflowRuleTarget.php
+++ b/vendor/twilio/sdk/src/Twilio/TaskRouter/WorkflowRuleTarget.php
@@ -8,34 +8,31 @@
* @author Justin Witz
* @license http://creativecommons.org/licenses/MIT/ MIT
*/
-class WorkflowRuleTarget implements \JsonSerializable
-{
+class WorkflowRuleTarget implements \JsonSerializable {
public $queue;
public $expression;
public $priority;
public $timeout;
- public function __construct($queue, $priority = null, $timeout = null, $expression = null)
- {
+ public function __construct(string $queue, int $priority = null, int $timeout = null, string $expression = null) {
$this->queue = $queue;
$this->priority = $priority;
$this->timeout = $timeout;
$this->expression = $expression;
}
- public function jsonSerialize()
- {
- $json = array();
- $json["queue"] = $this->queue;
- if ($this->priority != null) {
- $json["priority"] = $this->priority;
+ public function jsonSerialize(): array {
+ $json = [];
+ $json['queue'] = $this->queue;
+ if ($this->priority !== null) {
+ $json['priority'] = $this->priority;
}
- if ($this->timeout != null) {
- $json["timeout"] = $this->timeout;
+ if ($this->timeout !== null) {
+ $json['timeout'] = $this->timeout;
}
- if ($this->expression != null) {
- $json["expression"] = $this->expression;
+ if ($this->expression !== null) {
+ $json['expression'] = $this->expression;
}
return $json;
}
-}
\ No newline at end of file
+}
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Fax/Receive.php b/vendor/twilio/sdk/src/Twilio/TwiML/Fax/Receive.php
index e22336a..0a98e6f 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Fax/Receive.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Fax/Receive.php
@@ -11,15 +11,13 @@
use Twilio\TwiML\TwiML;
-class Receive extends TwiML
-{
+class Receive extends TwiML {
/**
* Receive constructor.
*
* @param array $attributes Optional attributes
*/
- public function __construct($attributes = array())
- {
+ public function __construct($attributes = []) {
parent::__construct('Receive', null, $attributes);
}
@@ -27,10 +25,8 @@ public function __construct($attributes = array())
* Add Action attribute.
*
* @param string $action Receive action URL
- * @return static $this.
*/
- public function setAction($action)
- {
+ public function setAction($action): self {
return $this->setAttribute('action', $action);
}
@@ -38,10 +34,8 @@ public function setAction($action)
* Add Method attribute.
*
* @param string $method Receive action URL method
- * @return static $this.
*/
- public function setMethod($method)
- {
+ public function setMethod($method): self {
return $this->setAttribute('method', $method);
}
@@ -50,10 +44,8 @@ public function setMethod($method)
*
* @param string $mediaType The media type used to store media in the fax media
* store
- * @return static $this.
*/
- public function setMediaType($mediaType)
- {
+ public function setMediaType($mediaType): self {
return $this->setAttribute('mediaType', $mediaType);
}
@@ -61,10 +53,8 @@ public function setMediaType($mediaType)
* Add PageSize attribute.
*
* @param string $pageSize What size to interpret received pages as
- * @return static $this.
*/
- public function setPageSize($pageSize)
- {
+ public function setPageSize($pageSize): self {
return $this->setAttribute('pageSize', $pageSize);
}
@@ -73,10 +63,8 @@ public function setPageSize($pageSize)
*
* @param bool $storeMedia Whether or not to store received media in the fax
* media store
- * @return static $this.
*/
- public function setStoreMedia($storeMedia)
- {
+ public function setStoreMedia($storeMedia): self {
return $this->setAttribute('storeMedia', $storeMedia);
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/FaxResponse.php b/vendor/twilio/sdk/src/Twilio/TwiML/FaxResponse.php
index 388b7af..7d9ba75 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/FaxResponse.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/FaxResponse.php
@@ -9,13 +9,11 @@
namespace Twilio\TwiML;
-class FaxResponse extends TwiML
-{
+class FaxResponse extends TwiML {
/**
* FaxResponse constructor.
*/
- public function __construct()
- {
+ public function __construct() {
parent::__construct('Response', null);
}
@@ -25,8 +23,7 @@ public function __construct()
* @param array $attributes Optional attributes
* @return Fax\Receive Child element.
*/
- public function receive($attributes = array())
- {
+ public function receive($attributes = []): Fax\Receive {
return $this->nest(new Fax\Receive($attributes));
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/GenericNode.php b/vendor/twilio/sdk/src/Twilio/TwiML/GenericNode.php
index 52bcd73..6eead6c 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/GenericNode.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/GenericNode.php
@@ -2,8 +2,7 @@
namespace Twilio\TwiML;
-class GenericNode extends TwiML
-{
+class GenericNode extends TwiML {
/**
* GenericNode constructor.
@@ -12,8 +11,7 @@ class GenericNode extends TwiML
* @param string $value XML value
* @param array $attributes XML attributes
*/
- public function __construct($name, $value, $attributes)
- {
+ public function __construct(string $name, ?string $value, array $attributes) {
parent::__construct($name, $value, $attributes);
$this->name = $name;
$this->value = $value;
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Messaging/Body.php b/vendor/twilio/sdk/src/Twilio/TwiML/Messaging/Body.php
index d1e169c..a147e73 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Messaging/Body.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Messaging/Body.php
@@ -11,15 +11,13 @@
use Twilio\TwiML\TwiML;
-class Body extends TwiML
-{
+class Body extends TwiML {
/**
* Body constructor.
*
* @param string $message Message Body
*/
- public function __construct($message)
- {
+ public function __construct($message) {
parent::__construct('Body', $message);
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Messaging/Media.php b/vendor/twilio/sdk/src/Twilio/TwiML/Messaging/Media.php
index d5b4cbb..54f8827 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Messaging/Media.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Messaging/Media.php
@@ -11,15 +11,13 @@
use Twilio\TwiML\TwiML;
-class Media extends TwiML
-{
+class Media extends TwiML {
/**
* Media constructor.
*
* @param string $url Media URL
*/
- public function __construct($url)
- {
+ public function __construct($url) {
parent::__construct('Media', $url);
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Messaging/Message.php b/vendor/twilio/sdk/src/Twilio/TwiML/Messaging/Message.php
index 32813e1..301b66c 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Messaging/Message.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Messaging/Message.php
@@ -11,16 +11,14 @@
use Twilio\TwiML\TwiML;
-class Message extends TwiML
-{
+class Message extends TwiML {
/**
* Message constructor.
*
* @param string $body Message Body
* @param array $attributes Optional attributes
*/
- public function __construct($body, $attributes = array())
- {
+ public function __construct($body, $attributes = []) {
parent::__construct('Message', $body, $attributes);
}
@@ -30,8 +28,7 @@ public function __construct($body, $attributes = array())
* @param string $message Message Body
* @return Body Child element.
*/
- public function body($message)
- {
+ public function body($message): Body {
return $this->nest(new Body($message));
}
@@ -41,8 +38,7 @@ public function body($message)
* @param string $url Media URL
* @return Media Child element.
*/
- public function media($url)
- {
+ public function media($url): Media {
return $this->nest(new Media($url));
}
@@ -50,10 +46,8 @@ public function media($url)
* Add To attribute.
*
* @param string $to Phone Number to send Message to
- * @return static $this.
*/
- public function setTo($to)
- {
+ public function setTo($to): self {
return $this->setAttribute('to', $to);
}
@@ -61,21 +55,18 @@ public function setTo($to)
* Add From attribute.
*
* @param string $from Phone Number to send Message from
- * @return static $this.
*/
- public function setFrom($from)
- {
+ public function setFrom($from): self {
return $this->setAttribute('from', $from);
}
/**
* Add Action attribute.
*
- * @param string $action Action URL
- * @return static $this.
+ * @param string $action A URL specifying where Twilio should send status
+ * callbacks for the created outbound message.
*/
- public function setAction($action)
- {
+ public function setAction($action): self {
return $this->setAttribute('action', $action);
}
@@ -83,10 +74,8 @@ public function setAction($action)
* Add Method attribute.
*
* @param string $method Action URL Method
- * @return static $this.
*/
- public function setMethod($method)
- {
+ public function setMethod($method): self {
return $this->setAttribute('method', $method);
}
@@ -95,10 +84,8 @@ public function setMethod($method)
*
* @param string $statusCallback Status callback URL. Deprecated in favor of
* action.
- * @return static $this.
*/
- public function setStatusCallback($statusCallback)
- {
+ public function setStatusCallback($statusCallback): self {
return $this->setAttribute('statusCallback', $statusCallback);
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Messaging/Redirect.php b/vendor/twilio/sdk/src/Twilio/TwiML/Messaging/Redirect.php
index 553436c..9781a96 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Messaging/Redirect.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Messaging/Redirect.php
@@ -11,16 +11,14 @@
use Twilio\TwiML\TwiML;
-class Redirect extends TwiML
-{
+class Redirect extends TwiML {
/**
* Redirect constructor.
*
* @param string $url Redirect URL
* @param array $attributes Optional attributes
*/
- public function __construct($url, $attributes = array())
- {
+ public function __construct($url, $attributes = []) {
parent::__construct('Redirect', $url, $attributes);
}
@@ -28,10 +26,8 @@ public function __construct($url, $attributes = array())
* Add Method attribute.
*
* @param string $method Redirect URL method
- * @return static $this.
*/
- public function setMethod($method)
- {
+ public function setMethod($method): self {
return $this->setAttribute('method', $method);
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/MessagingResponse.php b/vendor/twilio/sdk/src/Twilio/TwiML/MessagingResponse.php
index b78c50c..ee9a113 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/MessagingResponse.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/MessagingResponse.php
@@ -9,13 +9,11 @@
namespace Twilio\TwiML;
-class MessagingResponse extends TwiML
-{
+class MessagingResponse extends TwiML {
/**
* MessagingResponse constructor.
*/
- public function __construct()
- {
+ public function __construct() {
parent::__construct('Response', null);
}
@@ -26,8 +24,7 @@ public function __construct()
* @param array $attributes Optional attributes
* @return Messaging\Message Child element.
*/
- public function message($body, $attributes = array())
- {
+ public function message($body, $attributes = []): Messaging\Message {
return $this->nest(new Messaging\Message($body, $attributes));
}
@@ -38,8 +35,7 @@ public function message($body, $attributes = array())
* @param array $attributes Optional attributes
* @return Messaging\Redirect Child element.
*/
- public function redirect($url, $attributes = array())
- {
+ public function redirect($url, $attributes = []): Messaging\Redirect {
return $this->nest(new Messaging\Redirect($url, $attributes));
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/TwiML.php b/vendor/twilio/sdk/src/Twilio/TwiML/TwiML.php
index 39dd9ed..6e8ceb4 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/TwiML.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/TwiML.php
@@ -11,8 +11,7 @@
* @property $value string XML body
* @property $children TwiML[] nested TwiML elements
*/
-abstract class TwiML
-{
+abstract class TwiML {
protected $name;
protected $attributes;
protected $children;
@@ -24,8 +23,7 @@ abstract class TwiML
* @param string $value XML value
* @param array $attributes XML attributes
*/
- public function __construct($name, $value = null, $attributes = [])
- {
+ public function __construct(string $name, string $value = null, array $attributes = []) {
$this->name = $name;
$this->attributes = $attributes;
$this->children = [];
@@ -41,8 +39,7 @@ public function __construct($name, $value = null, $attributes = [])
* @param TwiML|string $twiml TwiML element to add
* @return TwiML $this
*/
- public function append($twiml)
- {
+ public function append($twiml): TwiML {
$this->children[] = $twiml;
return $this;
}
@@ -53,8 +50,7 @@ public function append($twiml)
* @param TwiML $twiml TwiML element to add
* @return TwiML added TwiML element
*/
- public function nest($twiml)
- {
+ public function nest(TwiML $twiml): TwiML {
$this->children[] = $twiml;
return $twiml;
}
@@ -66,8 +62,7 @@ public function nest($twiml)
* @param string $value value of attribute
* @return static $this
*/
- public function setAttribute($key, $value)
- {
+ public function setAttribute(string $key, string $value): TwiML {
$this->attributes[$key] = $value;
return $this;
}
@@ -76,10 +71,9 @@ public function setAttribute($key, $value)
* @param string $name XML element name
* @param string $value XML value
* @param array $attributes XML attributes
- * @return GenericNode
+ * @return TwiML
*/
- public function addChild($name, $value = null, $attributes = [])
- {
+ public function addChild(string $name, string $value = null, array $attributes = []): TwiML {
return $this->nest(new GenericNode($name, $value, $attributes));
}
@@ -88,9 +82,8 @@ public function addChild($name, $value = null, $attributes = [])
*
* @return string TwiML XML representation
*/
- public function asXML()
- {
- return $this->__toString();
+ public function asXML(): string {
+ return (string)$this;
}
/**
@@ -98,8 +91,7 @@ public function asXML()
*
* @return string TwiML XML representation
*/
- public function __toString()
- {
+ public function __toString(): string {
return $this->xml()->saveXML();
}
@@ -110,8 +102,7 @@ public function __toString()
* @param DOMDocument $document XML document for the element
* @return DOMElement $element
*/
- private function buildElement($twiml, $document)
- {
+ private function buildElement(TwiML $twiml, DOMDocument $document): DOMElement {
$element = $document->createElement($twiml->name);
foreach ($twiml->attributes as $name => $value) {
@@ -137,11 +128,9 @@ private function buildElement($twiml, $document)
*
* @return DOMDocument Build TwiML element
*/
- private function xml()
- {
+ private function xml(): DOMDocument {
$document = new DOMDocument('1.0', 'UTF-8');
$document->appendChild($this->buildElement($this, $document));
return $document;
}
-
}
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Video/Room.php b/vendor/twilio/sdk/src/Twilio/TwiML/Video/Room.php
index 85ee9d6..2da2520 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Video/Room.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Video/Room.php
@@ -11,15 +11,13 @@
use Twilio\TwiML\TwiML;
-class Room extends TwiML
-{
+class Room extends TwiML {
/**
* Room constructor.
- *
+ *
* @param string $name Room name
*/
- public function __construct($name)
- {
+ public function __construct($name) {
parent::__construct('Room', $name);
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Autopilot.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Autopilot.php
index 4affb71..12e0bbf 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Autopilot.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Autopilot.php
@@ -11,15 +11,13 @@
use Twilio\TwiML\TwiML;
-class Autopilot extends TwiML
-{
+class Autopilot extends TwiML {
/**
* Autopilot constructor.
*
* @param string $name Autopilot assistant sid or unique name
*/
- public function __construct($name)
- {
+ public function __construct($name) {
parent::__construct('Autopilot', $name);
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Client.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Client.php
index bf98477..4ff8c0e 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Client.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Client.php
@@ -11,16 +11,14 @@
use Twilio\TwiML\TwiML;
-class Client extends TwiML
-{
+class Client extends TwiML {
/**
* Client constructor.
*
* @param string $identity Client identity
* @param array $attributes Optional attributes
*/
- public function __construct($identity = null, $attributes = array())
- {
+ public function __construct($identity = null, $attributes = []) {
parent::__construct('Client', $identity, $attributes);
}
@@ -30,8 +28,7 @@ public function __construct($identity = null, $attributes = array())
* @param string $clientIdentity Identity of the client to dial
* @return Identity Child element.
*/
- public function identity($clientIdentity)
- {
+ public function identity($clientIdentity): Identity {
return $this->nest(new Identity($clientIdentity));
}
@@ -41,8 +38,7 @@ public function identity($clientIdentity)
* @param array $attributes Optional attributes
* @return Parameter Child element.
*/
- public function parameter($attributes = array())
- {
+ public function parameter($attributes = []): Parameter {
return $this->nest(new Parameter($attributes));
}
@@ -50,10 +46,8 @@ public function parameter($attributes = array())
* Add Url attribute.
*
* @param string $url Client URL
- * @return static $this.
*/
- public function setUrl($url)
- {
+ public function setUrl($url): self {
return $this->setAttribute('url', $url);
}
@@ -61,21 +55,17 @@ public function setUrl($url)
* Add Method attribute.
*
* @param string $method Client URL Method
- * @return static $this.
*/
- public function setMethod($method)
- {
+ public function setMethod($method): self {
return $this->setAttribute('method', $method);
}
/**
* Add StatusCallbackEvent attribute.
*
- * @param string $statusCallbackEvent Events to trigger status callback
- * @return static $this.
+ * @param string[] $statusCallbackEvent Events to trigger status callback
*/
- public function setStatusCallbackEvent($statusCallbackEvent)
- {
+ public function setStatusCallbackEvent($statusCallbackEvent): self {
return $this->setAttribute('statusCallbackEvent', $statusCallbackEvent);
}
@@ -83,10 +73,8 @@ public function setStatusCallbackEvent($statusCallbackEvent)
* Add StatusCallback attribute.
*
* @param string $statusCallback Status Callback URL
- * @return static $this.
*/
- public function setStatusCallback($statusCallback)
- {
+ public function setStatusCallback($statusCallback): self {
return $this->setAttribute('statusCallback', $statusCallback);
}
@@ -94,10 +82,8 @@ public function setStatusCallback($statusCallback)
* Add StatusCallbackMethod attribute.
*
* @param string $statusCallbackMethod Status Callback URL Method
- * @return static $this.
*/
- public function setStatusCallbackMethod($statusCallbackMethod)
- {
+ public function setStatusCallbackMethod($statusCallbackMethod): self {
return $this->setAttribute('statusCallbackMethod', $statusCallbackMethod);
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Conference.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Conference.php
index 3a8da72..eb28e72 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Conference.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Conference.php
@@ -11,16 +11,14 @@
use Twilio\TwiML\TwiML;
-class Conference extends TwiML
-{
+class Conference extends TwiML {
/**
* Conference constructor.
*
* @param string $name Conference name
* @param array $attributes Optional attributes
*/
- public function __construct($name, $attributes = array())
- {
+ public function __construct($name, $attributes = []) {
parent::__construct('Conference', $name, $attributes);
}
@@ -28,10 +26,8 @@ public function __construct($name, $attributes = array())
* Add Muted attribute.
*
* @param bool $muted Join the conference muted
- * @return static $this.
*/
- public function setMuted($muted)
- {
+ public function setMuted($muted): self {
return $this->setAttribute('muted', $muted);
}
@@ -39,10 +35,8 @@ public function setMuted($muted)
* Add Beep attribute.
*
* @param string $beep Play beep when joining
- * @return static $this.
*/
- public function setBeep($beep)
- {
+ public function setBeep($beep): self {
return $this->setAttribute('beep', $beep);
}
@@ -50,10 +44,8 @@ public function setBeep($beep)
* Add StartConferenceOnEnter attribute.
*
* @param bool $startConferenceOnEnter Start the conference on enter
- * @return static $this.
*/
- public function setStartConferenceOnEnter($startConferenceOnEnter)
- {
+ public function setStartConferenceOnEnter($startConferenceOnEnter): self {
return $this->setAttribute('startConferenceOnEnter', $startConferenceOnEnter);
}
@@ -61,10 +53,8 @@ public function setStartConferenceOnEnter($startConferenceOnEnter)
* Add EndConferenceOnExit attribute.
*
* @param bool $endConferenceOnExit End the conferenceon exit
- * @return static $this.
*/
- public function setEndConferenceOnExit($endConferenceOnExit)
- {
+ public function setEndConferenceOnExit($endConferenceOnExit): self {
return $this->setAttribute('endConferenceOnExit', $endConferenceOnExit);
}
@@ -72,10 +62,8 @@ public function setEndConferenceOnExit($endConferenceOnExit)
* Add WaitUrl attribute.
*
* @param string $waitUrl Wait URL
- * @return static $this.
*/
- public function setWaitUrl($waitUrl)
- {
+ public function setWaitUrl($waitUrl): self {
return $this->setAttribute('waitUrl', $waitUrl);
}
@@ -83,10 +71,8 @@ public function setWaitUrl($waitUrl)
* Add WaitMethod attribute.
*
* @param string $waitMethod Wait URL method
- * @return static $this.
*/
- public function setWaitMethod($waitMethod)
- {
+ public function setWaitMethod($waitMethod): self {
return $this->setAttribute('waitMethod', $waitMethod);
}
@@ -94,10 +80,8 @@ public function setWaitMethod($waitMethod)
* Add MaxParticipants attribute.
*
* @param int $maxParticipants Maximum number of participants
- * @return static $this.
*/
- public function setMaxParticipants($maxParticipants)
- {
+ public function setMaxParticipants($maxParticipants): self {
return $this->setAttribute('maxParticipants', $maxParticipants);
}
@@ -105,10 +89,8 @@ public function setMaxParticipants($maxParticipants)
* Add Record attribute.
*
* @param string $record Record the conference
- * @return static $this.
*/
- public function setRecord($record)
- {
+ public function setRecord($record): self {
return $this->setAttribute('record', $record);
}
@@ -116,10 +98,8 @@ public function setRecord($record)
* Add Region attribute.
*
* @param string $region Conference region
- * @return static $this.
*/
- public function setRegion($region)
- {
+ public function setRegion($region): self {
return $this->setAttribute('region', $region);
}
@@ -127,10 +107,8 @@ public function setRegion($region)
* Add Coach attribute.
*
* @param string $coach Call coach
- * @return static $this.
*/
- public function setCoach($coach)
- {
+ public function setCoach($coach): self {
return $this->setAttribute('coach', $coach);
}
@@ -138,21 +116,17 @@ public function setCoach($coach)
* Add Trim attribute.
*
* @param string $trim Trim the conference recording
- * @return static $this.
*/
- public function setTrim($trim)
- {
+ public function setTrim($trim): self {
return $this->setAttribute('trim', $trim);
}
/**
* Add StatusCallbackEvent attribute.
*
- * @param string $statusCallbackEvent Events to call status callback URL
- * @return static $this.
+ * @param string[] $statusCallbackEvent Events to call status callback URL
*/
- public function setStatusCallbackEvent($statusCallbackEvent)
- {
+ public function setStatusCallbackEvent($statusCallbackEvent): self {
return $this->setAttribute('statusCallbackEvent', $statusCallbackEvent);
}
@@ -160,10 +134,8 @@ public function setStatusCallbackEvent($statusCallbackEvent)
* Add StatusCallback attribute.
*
* @param string $statusCallback Status callback URL
- * @return static $this.
*/
- public function setStatusCallback($statusCallback)
- {
+ public function setStatusCallback($statusCallback): self {
return $this->setAttribute('statusCallback', $statusCallback);
}
@@ -171,10 +143,8 @@ public function setStatusCallback($statusCallback)
* Add StatusCallbackMethod attribute.
*
* @param string $statusCallbackMethod Status callback URL method
- * @return static $this.
*/
- public function setStatusCallbackMethod($statusCallbackMethod)
- {
+ public function setStatusCallbackMethod($statusCallbackMethod): self {
return $this->setAttribute('statusCallbackMethod', $statusCallbackMethod);
}
@@ -182,10 +152,8 @@ public function setStatusCallbackMethod($statusCallbackMethod)
* Add RecordingStatusCallback attribute.
*
* @param string $recordingStatusCallback Recording status callback URL
- * @return static $this.
*/
- public function setRecordingStatusCallback($recordingStatusCallback)
- {
+ public function setRecordingStatusCallback($recordingStatusCallback): self {
return $this->setAttribute('recordingStatusCallback', $recordingStatusCallback);
}
@@ -194,21 +162,18 @@ public function setRecordingStatusCallback($recordingStatusCallback)
*
* @param string $recordingStatusCallbackMethod Recording status callback URL
* method
- * @return static $this.
*/
- public function setRecordingStatusCallbackMethod($recordingStatusCallbackMethod)
- {
+ public function setRecordingStatusCallbackMethod($recordingStatusCallbackMethod): self {
return $this->setAttribute('recordingStatusCallbackMethod', $recordingStatusCallbackMethod);
}
/**
* Add RecordingStatusCallbackEvent attribute.
*
- * @param string $recordingStatusCallbackEvent Recording status callback events
- * @return static $this.
+ * @param string[] $recordingStatusCallbackEvent Recording status callback
+ * events
*/
- public function setRecordingStatusCallbackEvent($recordingStatusCallbackEvent)
- {
+ public function setRecordingStatusCallbackEvent($recordingStatusCallbackEvent): self {
return $this->setAttribute('recordingStatusCallbackEvent', $recordingStatusCallbackEvent);
}
@@ -216,10 +181,26 @@ public function setRecordingStatusCallbackEvent($recordingStatusCallbackEvent)
* Add EventCallbackUrl attribute.
*
* @param string $eventCallbackUrl Event callback URL
- * @return static $this.
*/
- public function setEventCallbackUrl($eventCallbackUrl)
- {
+ public function setEventCallbackUrl($eventCallbackUrl): self {
return $this->setAttribute('eventCallbackUrl', $eventCallbackUrl);
}
+
+ /**
+ * Add JitterBufferSize attribute.
+ *
+ * @param string $jitterBufferSize Size of jitter buffer for participant
+ */
+ public function setJitterBufferSize($jitterBufferSize): self {
+ return $this->setAttribute('jitterBufferSize', $jitterBufferSize);
+ }
+
+ /**
+ * Add ParticipantLabel attribute.
+ *
+ * @param string $participantLabel A label for participant
+ */
+ public function setParticipantLabel($participantLabel): self {
+ return $this->setAttribute('participantLabel', $participantLabel);
+ }
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Connect.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Connect.php
index 8ad750a..9f97f54 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Connect.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Connect.php
@@ -11,15 +11,13 @@
use Twilio\TwiML\TwiML;
-class Connect extends TwiML
-{
+class Connect extends TwiML {
/**
* Connect constructor.
*
* @param array $attributes Optional attributes
*/
- public function __construct($attributes = array())
- {
+ public function __construct($attributes = []) {
parent::__construct('Connect', null, $attributes);
}
@@ -30,8 +28,7 @@ public function __construct($attributes = array())
* @param array $attributes Optional attributes
* @return Room Child element.
*/
- public function room($name, $attributes = array())
- {
+ public function room($name, $attributes = []): Room {
return $this->nest(new Room($name, $attributes));
}
@@ -41,8 +38,7 @@ public function room($name, $attributes = array())
* @param string $name Autopilot assistant sid or unique name
* @return Autopilot Child element.
*/
- public function autopilot($name)
- {
+ public function autopilot($name): Autopilot {
return $this->nest(new Autopilot($name));
}
@@ -52,19 +48,36 @@ public function autopilot($name)
* @param array $attributes Optional attributes
* @return Stream Child element.
*/
- public function stream($attributes = array())
- {
+ public function stream($attributes = []): Stream {
return $this->nest(new Stream($attributes));
}
+ /**
+ * Add VirtualAgent child.
+ *
+ * @param array $attributes Optional attributes
+ * @return VirtualAgent Child element.
+ */
+ public function virtualAgent($attributes = []): VirtualAgent {
+ return $this->nest(new VirtualAgent($attributes));
+ }
+
+ /**
+ * Add Conversation child.
+ *
+ * @param array $attributes Optional attributes
+ * @return Conversation Child element.
+ */
+ public function conversation($attributes = []): Conversation {
+ return $this->nest(new Conversation($attributes));
+ }
+
/**
* Add Action attribute.
*
* @param string $action Action URL
- * @return static $this.
*/
- public function setAction($action)
- {
+ public function setAction($action): self {
return $this->setAttribute('action', $action);
}
@@ -72,10 +85,8 @@ public function setAction($action)
* Add Method attribute.
*
* @param string $method Action URL method
- * @return static $this.
*/
- public function setMethod($method)
- {
+ public function setMethod($method): self {
return $this->setAttribute('method', $method);
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Dial.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Dial.php
index 959fb06..edbadf3 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Dial.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Dial.php
@@ -11,16 +11,14 @@
use Twilio\TwiML\TwiML;
-class Dial extends TwiML
-{
+class Dial extends TwiML {
/**
* Dial constructor.
*
* @param string $number Phone number to dial
* @param array $attributes Optional attributes
*/
- public function __construct($number = null, $attributes = array())
- {
+ public function __construct($number = null, $attributes = []) {
parent::__construct('Dial', $number, $attributes);
}
@@ -31,8 +29,7 @@ public function __construct($number = null, $attributes = array())
* @param array $attributes Optional attributes
* @return Client Child element.
*/
- public function client($identity = null, $attributes = array())
- {
+ public function client($identity = null, $attributes = []): Client {
return $this->nest(new Client($identity, $attributes));
}
@@ -43,8 +40,7 @@ public function client($identity = null, $attributes = array())
* @param array $attributes Optional attributes
* @return Conference Child element.
*/
- public function conference($name, $attributes = array())
- {
+ public function conference($name, $attributes = []): Conference {
return $this->nest(new Conference($name, $attributes));
}
@@ -55,8 +51,7 @@ public function conference($name, $attributes = array())
* @param array $attributes Optional attributes
* @return Number Child element.
*/
- public function number($phoneNumber, $attributes = array())
- {
+ public function number($phoneNumber, $attributes = []): Number {
return $this->nest(new Number($phoneNumber, $attributes));
}
@@ -67,8 +62,7 @@ public function number($phoneNumber, $attributes = array())
* @param array $attributes Optional attributes
* @return Queue Child element.
*/
- public function queue($name, $attributes = array())
- {
+ public function queue($name, $attributes = []): Queue {
return $this->nest(new Queue($name, $attributes));
}
@@ -78,8 +72,7 @@ public function queue($name, $attributes = array())
* @param string $simSid SIM SID
* @return Sim Child element.
*/
- public function sim($simSid)
- {
+ public function sim($simSid): Sim {
return $this->nest(new Sim($simSid));
}
@@ -90,19 +83,27 @@ public function sim($simSid)
* @param array $attributes Optional attributes
* @return Sip Child element.
*/
- public function sip($sipUrl, $attributes = array())
- {
+ public function sip($sipUrl, $attributes = []): Sip {
return $this->nest(new Sip($sipUrl, $attributes));
}
+ /**
+ * Add Application child.
+ *
+ * @param string $applicationSid Application sid
+ * @param array $attributes Optional attributes
+ * @return Application Child element.
+ */
+ public function application($applicationSid = null, $attributes = []): Application {
+ return $this->nest(new Application($applicationSid, $attributes));
+ }
+
/**
* Add Action attribute.
*
* @param string $action Action URL
- * @return static $this.
*/
- public function setAction($action)
- {
+ public function setAction($action): self {
return $this->setAttribute('action', $action);
}
@@ -110,10 +111,8 @@ public function setAction($action)
* Add Method attribute.
*
* @param string $method Action URL method
- * @return static $this.
*/
- public function setMethod($method)
- {
+ public function setMethod($method): self {
return $this->setAttribute('method', $method);
}
@@ -121,10 +120,8 @@ public function setMethod($method)
* Add Timeout attribute.
*
* @param int $timeout Time to wait for answer
- * @return static $this.
*/
- public function setTimeout($timeout)
- {
+ public function setTimeout($timeout): self {
return $this->setAttribute('timeout', $timeout);
}
@@ -132,10 +129,8 @@ public function setTimeout($timeout)
* Add HangupOnStar attribute.
*
* @param bool $hangupOnStar Hangup call on star press
- * @return static $this.
*/
- public function setHangupOnStar($hangupOnStar)
- {
+ public function setHangupOnStar($hangupOnStar): self {
return $this->setAttribute('hangupOnStar', $hangupOnStar);
}
@@ -143,10 +138,8 @@ public function setHangupOnStar($hangupOnStar)
* Add TimeLimit attribute.
*
* @param int $timeLimit Max time length
- * @return static $this.
*/
- public function setTimeLimit($timeLimit)
- {
+ public function setTimeLimit($timeLimit): self {
return $this->setAttribute('timeLimit', $timeLimit);
}
@@ -154,10 +147,8 @@ public function setTimeLimit($timeLimit)
* Add CallerId attribute.
*
* @param string $callerId Caller ID to display
- * @return static $this.
*/
- public function setCallerId($callerId)
- {
+ public function setCallerId($callerId): self {
return $this->setAttribute('callerId', $callerId);
}
@@ -165,10 +156,8 @@ public function setCallerId($callerId)
* Add Record attribute.
*
* @param string $record Record the call
- * @return static $this.
*/
- public function setRecord($record)
- {
+ public function setRecord($record): self {
return $this->setAttribute('record', $record);
}
@@ -176,10 +165,8 @@ public function setRecord($record)
* Add Trim attribute.
*
* @param string $trim Trim the recording
- * @return static $this.
*/
- public function setTrim($trim)
- {
+ public function setTrim($trim): self {
return $this->setAttribute('trim', $trim);
}
@@ -187,10 +174,8 @@ public function setTrim($trim)
* Add RecordingStatusCallback attribute.
*
* @param string $recordingStatusCallback Recording status callback URL
- * @return static $this.
*/
- public function setRecordingStatusCallback($recordingStatusCallback)
- {
+ public function setRecordingStatusCallback($recordingStatusCallback): self {
return $this->setAttribute('recordingStatusCallback', $recordingStatusCallback);
}
@@ -199,21 +184,18 @@ public function setRecordingStatusCallback($recordingStatusCallback)
*
* @param string $recordingStatusCallbackMethod Recording status callback URL
* method
- * @return static $this.
*/
- public function setRecordingStatusCallbackMethod($recordingStatusCallbackMethod)
- {
+ public function setRecordingStatusCallbackMethod($recordingStatusCallbackMethod): self {
return $this->setAttribute('recordingStatusCallbackMethod', $recordingStatusCallbackMethod);
}
/**
* Add RecordingStatusCallbackEvent attribute.
*
- * @param string $recordingStatusCallbackEvent Recording status callback events
- * @return static $this.
+ * @param string[] $recordingStatusCallbackEvent Recording status callback
+ * events
*/
- public function setRecordingStatusCallbackEvent($recordingStatusCallbackEvent)
- {
+ public function setRecordingStatusCallbackEvent($recordingStatusCallbackEvent): self {
return $this->setAttribute('recordingStatusCallbackEvent', $recordingStatusCallbackEvent);
}
@@ -222,10 +204,8 @@ public function setRecordingStatusCallbackEvent($recordingStatusCallbackEvent)
*
* @param bool $answerOnBridge Preserve the ringing behavior of the inbound
* call until the Dialed call picks up
- * @return static $this.
*/
- public function setAnswerOnBridge($answerOnBridge)
- {
+ public function setAnswerOnBridge($answerOnBridge): self {
return $this->setAttribute('answerOnBridge', $answerOnBridge);
}
@@ -235,10 +215,48 @@ public function setAnswerOnBridge($answerOnBridge)
* @param string $ringTone Ringtone allows you to override the ringback tone
* that Twilio will play back to the caller while
* executing the Dial
- * @return static $this.
*/
- public function setRingTone($ringTone)
- {
+ public function setRingTone($ringTone): self {
return $this->setAttribute('ringTone', $ringTone);
}
+
+ /**
+ * Add RecordingTrack attribute.
+ *
+ * @param string $recordingTrack To indicate which audio track should be
+ * recorded
+ */
+ public function setRecordingTrack($recordingTrack): self {
+ return $this->setAttribute('recordingTrack', $recordingTrack);
+ }
+
+ /**
+ * Add Sequential attribute.
+ *
+ * @param bool $sequential Used to determine if child TwiML nouns should be
+ * dialed in order, one after the other (sequential) or
+ * dial all at once (parallel). Default is false,
+ * parallel
+ */
+ public function setSequential($sequential): self {
+ return $this->setAttribute('sequential', $sequential);
+ }
+
+ /**
+ * Add ReferUrl attribute.
+ *
+ * @param string $referUrl Webhook that will receive future SIP REFER requests
+ */
+ public function setReferUrl($referUrl): self {
+ return $this->setAttribute('referUrl', $referUrl);
+ }
+
+ /**
+ * Add ReferMethod attribute.
+ *
+ * @param string $referMethod The HTTP method to use for the refer Webhook
+ */
+ public function setReferMethod($referMethod): self {
+ return $this->setAttribute('referMethod', $referMethod);
+ }
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Echo.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Echo.php
deleted file mode 100644
index 7f97110..0000000
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Echo.php
+++ /dev/null
@@ -1,23 +0,0 @@
-nest(new Task($body, $attributes));
}
@@ -40,21 +37,26 @@ public function task($body, $attributes = array())
* Add Action attribute.
*
* @param string $action Action URL
- * @return static $this.
*/
- public function setAction($action)
- {
+ public function setAction($action): self {
return $this->setAttribute('action', $action);
}
+ /**
+ * Add MaxQueueSize attribute.
+ *
+ * @param int $maxQueueSize Maximum size of queue
+ */
+ public function setMaxQueueSize($maxQueueSize): self {
+ return $this->setAttribute('maxQueueSize', $maxQueueSize);
+ }
+
/**
* Add Method attribute.
*
* @param string $method Action URL method
- * @return static $this.
*/
- public function setMethod($method)
- {
+ public function setMethod($method): self {
return $this->setAttribute('method', $method);
}
@@ -62,10 +64,8 @@ public function setMethod($method)
* Add WaitUrl attribute.
*
* @param string $waitUrl Wait URL
- * @return static $this.
*/
- public function setWaitUrl($waitUrl)
- {
+ public function setWaitUrl($waitUrl): self {
return $this->setAttribute('waitUrl', $waitUrl);
}
@@ -73,10 +73,8 @@ public function setWaitUrl($waitUrl)
* Add WaitUrlMethod attribute.
*
* @param string $waitUrlMethod Wait URL method
- * @return static $this.
*/
- public function setWaitUrlMethod($waitUrlMethod)
- {
+ public function setWaitUrlMethod($waitUrlMethod): self {
return $this->setAttribute('waitUrlMethod', $waitUrlMethod);
}
@@ -84,10 +82,8 @@ public function setWaitUrlMethod($waitUrlMethod)
* Add WorkflowSid attribute.
*
* @param string $workflowSid TaskRouter Workflow SID
- * @return static $this.
*/
- public function setWorkflowSid($workflowSid)
- {
+ public function setWorkflowSid($workflowSid): self {
return $this->setAttribute('workflowSid', $workflowSid);
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Gather.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Gather.php
index 1c6c783..65d96e5 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Gather.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Gather.php
@@ -11,15 +11,13 @@
use Twilio\TwiML\TwiML;
-class Gather extends TwiML
-{
+class Gather extends TwiML {
/**
* Gather constructor.
*
* @param array $attributes Optional attributes
*/
- public function __construct($attributes = array())
- {
+ public function __construct($attributes = []) {
parent::__construct('Gather', null, $attributes);
}
@@ -30,8 +28,7 @@ public function __construct($attributes = array())
* @param array $attributes Optional attributes
* @return Say Child element.
*/
- public function say($message, $attributes = array())
- {
+ public function say($message, $attributes = []): Say {
return $this->nest(new Say($message, $attributes));
}
@@ -41,8 +38,7 @@ public function say($message, $attributes = array())
* @param array $attributes Optional attributes
* @return Pause Child element.
*/
- public function pause($attributes = array())
- {
+ public function pause($attributes = []): Pause {
return $this->nest(new Pause($attributes));
}
@@ -53,19 +49,16 @@ public function pause($attributes = array())
* @param array $attributes Optional attributes
* @return Play Child element.
*/
- public function play($url = null, $attributes = array())
- {
+ public function play($url = null, $attributes = []): Play {
return $this->nest(new Play($url, $attributes));
}
/**
* Add Input attribute.
*
- * @param string $input Input type Twilio should accept
- * @return static $this.
+ * @param string[] $input Input type Twilio should accept
*/
- public function setInput($input)
- {
+ public function setInput($input): self {
return $this->setAttribute('input', $input);
}
@@ -73,10 +66,8 @@ public function setInput($input)
* Add Action attribute.
*
* @param string $action Action URL
- * @return static $this.
*/
- public function setAction($action)
- {
+ public function setAction($action): self {
return $this->setAttribute('action', $action);
}
@@ -84,10 +75,8 @@ public function setAction($action)
* Add Method attribute.
*
* @param string $method Action URL method
- * @return static $this.
*/
- public function setMethod($method)
- {
+ public function setMethod($method): self {
return $this->setAttribute('method', $method);
}
@@ -95,10 +84,8 @@ public function setMethod($method)
* Add Timeout attribute.
*
* @param int $timeout Time to wait to gather input
- * @return static $this.
*/
- public function setTimeout($timeout)
- {
+ public function setTimeout($timeout): self {
return $this->setAttribute('timeout', $timeout);
}
@@ -107,10 +94,8 @@ public function setTimeout($timeout)
*
* @param string $speechTimeout Time to wait to gather speech input and it
* should be either auto or a positive integer.
- * @return static $this.
*/
- public function setSpeechTimeout($speechTimeout)
- {
+ public function setSpeechTimeout($speechTimeout): self {
return $this->setAttribute('speechTimeout', $speechTimeout);
}
@@ -118,10 +103,8 @@ public function setSpeechTimeout($speechTimeout)
* Add MaxSpeechTime attribute.
*
* @param int $maxSpeechTime Max allowed time for speech input
- * @return static $this.
*/
- public function setMaxSpeechTime($maxSpeechTime)
- {
+ public function setMaxSpeechTime($maxSpeechTime): self {
return $this->setAttribute('maxSpeechTime', $maxSpeechTime);
}
@@ -129,10 +112,8 @@ public function setMaxSpeechTime($maxSpeechTime)
* Add ProfanityFilter attribute.
*
* @param bool $profanityFilter Profanity Filter on speech
- * @return static $this.
*/
- public function setProfanityFilter($profanityFilter)
- {
+ public function setProfanityFilter($profanityFilter): self {
return $this->setAttribute('profanityFilter', $profanityFilter);
}
@@ -140,10 +121,8 @@ public function setProfanityFilter($profanityFilter)
* Add FinishOnKey attribute.
*
* @param string $finishOnKey Finish gather on key
- * @return static $this.
*/
- public function setFinishOnKey($finishOnKey)
- {
+ public function setFinishOnKey($finishOnKey): self {
return $this->setAttribute('finishOnKey', $finishOnKey);
}
@@ -151,10 +130,8 @@ public function setFinishOnKey($finishOnKey)
* Add NumDigits attribute.
*
* @param int $numDigits Number of digits to collect
- * @return static $this.
*/
- public function setNumDigits($numDigits)
- {
+ public function setNumDigits($numDigits): self {
return $this->setAttribute('numDigits', $numDigits);
}
@@ -162,10 +139,8 @@ public function setNumDigits($numDigits)
* Add PartialResultCallback attribute.
*
* @param string $partialResultCallback Partial result callback URL
- * @return static $this.
*/
- public function setPartialResultCallback($partialResultCallback)
- {
+ public function setPartialResultCallback($partialResultCallback): self {
return $this->setAttribute('partialResultCallback', $partialResultCallback);
}
@@ -173,10 +148,8 @@ public function setPartialResultCallback($partialResultCallback)
* Add PartialResultCallbackMethod attribute.
*
* @param string $partialResultCallbackMethod Partial result callback URL method
- * @return static $this.
*/
- public function setPartialResultCallbackMethod($partialResultCallbackMethod)
- {
+ public function setPartialResultCallbackMethod($partialResultCallbackMethod): self {
return $this->setAttribute('partialResultCallbackMethod', $partialResultCallbackMethod);
}
@@ -184,10 +157,8 @@ public function setPartialResultCallbackMethod($partialResultCallbackMethod)
* Add Language attribute.
*
* @param string $language Language to use
- * @return static $this.
*/
- public function setLanguage($language)
- {
+ public function setLanguage($language): self {
return $this->setAttribute('language', $language);
}
@@ -195,10 +166,8 @@ public function setLanguage($language)
* Add Hints attribute.
*
* @param string $hints Speech recognition hints
- * @return static $this.
*/
- public function setHints($hints)
- {
+ public function setHints($hints): self {
return $this->setAttribute('hints', $hints);
}
@@ -206,10 +175,8 @@ public function setHints($hints)
* Add BargeIn attribute.
*
* @param bool $bargeIn Stop playing media upon speech
- * @return static $this.
*/
- public function setBargeIn($bargeIn)
- {
+ public function setBargeIn($bargeIn): self {
return $this->setAttribute('bargeIn', $bargeIn);
}
@@ -217,10 +184,8 @@ public function setBargeIn($bargeIn)
* Add Debug attribute.
*
* @param bool $debug Allow debug for gather
- * @return static $this.
*/
- public function setDebug($debug)
- {
+ public function setDebug($debug): self {
return $this->setAttribute('debug', $debug);
}
@@ -229,10 +194,8 @@ public function setDebug($debug)
*
* @param bool $actionOnEmptyResult Force webhook to the action URL event if
* there is no input
- * @return static $this.
*/
- public function setActionOnEmptyResult($actionOnEmptyResult)
- {
+ public function setActionOnEmptyResult($actionOnEmptyResult): self {
return $this->setAttribute('actionOnEmptyResult', $actionOnEmptyResult);
}
@@ -241,10 +204,17 @@ public function setActionOnEmptyResult($actionOnEmptyResult)
*
* @param string $speechModel Specify the model that is best suited for your
* use case
- * @return static $this.
*/
- public function setSpeechModel($speechModel)
- {
+ public function setSpeechModel($speechModel): self {
return $this->setAttribute('speechModel', $speechModel);
}
+
+ /**
+ * Add Enhanced attribute.
+ *
+ * @param bool $enhanced Use enhanced speech model
+ */
+ public function setEnhanced($enhanced): self {
+ return $this->setAttribute('enhanced', $enhanced);
+ }
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Hangup.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Hangup.php
index 3bd62fc..05271e2 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Hangup.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Hangup.php
@@ -11,13 +11,21 @@
use Twilio\TwiML\TwiML;
-class Hangup extends TwiML
-{
+class Hangup extends TwiML {
/**
* Hangup constructor.
*/
- public function __construct()
- {
+ public function __construct() {
parent::__construct('Hangup', null);
}
+
+ /**
+ * Add Parameter child.
+ *
+ * @param array $attributes Optional attributes
+ * @return Parameter Child element.
+ */
+ public function parameter($attributes = []): Parameter {
+ return $this->nest(new Parameter($attributes));
+ }
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Identity.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Identity.php
index 360a9f1..0bbd224 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Identity.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Identity.php
@@ -11,15 +11,13 @@
use Twilio\TwiML\TwiML;
-class Identity extends TwiML
-{
+class Identity extends TwiML {
/**
* Identity constructor.
*
* @param string $clientIdentity Identity of the client to dial
*/
- public function __construct($clientIdentity)
- {
+ public function __construct($clientIdentity) {
parent::__construct('Identity', $clientIdentity);
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Leave.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Leave.php
index a02f4ab..91f1ac5 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Leave.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Leave.php
@@ -11,13 +11,11 @@
use Twilio\TwiML\TwiML;
-class Leave extends TwiML
-{
+class Leave extends TwiML {
/**
* Leave constructor.
*/
- public function __construct()
- {
+ public function __construct() {
parent::__construct('Leave', null);
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Number.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Number.php
index d0f130f..3c4a778 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Number.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Number.php
@@ -11,16 +11,14 @@
use Twilio\TwiML\TwiML;
-class Number extends TwiML
-{
+class Number extends TwiML {
/**
* Number constructor.
*
* @param string $phoneNumber Phone Number to dial
* @param array $attributes Optional attributes
*/
- public function __construct($phoneNumber, $attributes = array())
- {
+ public function __construct($phoneNumber, $attributes = []) {
parent::__construct('Number', $phoneNumber, $attributes);
}
@@ -28,10 +26,8 @@ public function __construct($phoneNumber, $attributes = array())
* Add SendDigits attribute.
*
* @param string $sendDigits DTMF tones to play when the call is answered
- * @return static $this.
*/
- public function setSendDigits($sendDigits)
- {
+ public function setSendDigits($sendDigits): self {
return $this->setAttribute('sendDigits', $sendDigits);
}
@@ -39,10 +35,8 @@ public function setSendDigits($sendDigits)
* Add Url attribute.
*
* @param string $url TwiML URL
- * @return static $this.
*/
- public function setUrl($url)
- {
+ public function setUrl($url): self {
return $this->setAttribute('url', $url);
}
@@ -50,21 +44,17 @@ public function setUrl($url)
* Add Method attribute.
*
* @param string $method TwiML URL method
- * @return static $this.
*/
- public function setMethod($method)
- {
+ public function setMethod($method): self {
return $this->setAttribute('method', $method);
}
/**
* Add StatusCallbackEvent attribute.
*
- * @param string $statusCallbackEvent Events to call status callback
- * @return static $this.
+ * @param string[] $statusCallbackEvent Events to call status callback
*/
- public function setStatusCallbackEvent($statusCallbackEvent)
- {
+ public function setStatusCallbackEvent($statusCallbackEvent): self {
return $this->setAttribute('statusCallbackEvent', $statusCallbackEvent);
}
@@ -72,10 +62,8 @@ public function setStatusCallbackEvent($statusCallbackEvent)
* Add StatusCallback attribute.
*
* @param string $statusCallback Status callback URL
- * @return static $this.
*/
- public function setStatusCallback($statusCallback)
- {
+ public function setStatusCallback($statusCallback): self {
return $this->setAttribute('statusCallback', $statusCallback);
}
@@ -83,10 +71,8 @@ public function setStatusCallback($statusCallback)
* Add StatusCallbackMethod attribute.
*
* @param string $statusCallbackMethod Status callback URL method
- * @return static $this.
*/
- public function setStatusCallbackMethod($statusCallbackMethod)
- {
+ public function setStatusCallbackMethod($statusCallbackMethod): self {
return $this->setAttribute('statusCallbackMethod', $statusCallbackMethod);
}
@@ -94,10 +80,79 @@ public function setStatusCallbackMethod($statusCallbackMethod)
* Add Byoc attribute.
*
* @param string $byoc BYOC trunk SID (Beta)
- * @return static $this.
*/
- public function setByoc($byoc)
- {
+ public function setByoc($byoc): self {
return $this->setAttribute('byoc', $byoc);
}
+
+ /**
+ * Add MachineDetection attribute.
+ *
+ * @param string $machineDetection Enable machine detection or end of greeting
+ * detection
+ */
+ public function setMachineDetection($machineDetection): self {
+ return $this->setAttribute('machineDetection', $machineDetection);
+ }
+
+ /**
+ * Add AmdStatusCallbackMethod attribute.
+ *
+ * @param string $amdStatusCallbackMethod HTTP Method to use with
+ * amd_status_callback
+ */
+ public function setAmdStatusCallbackMethod($amdStatusCallbackMethod): self {
+ return $this->setAttribute('amdStatusCallbackMethod', $amdStatusCallbackMethod);
+ }
+
+ /**
+ * Add AmdStatusCallback attribute.
+ *
+ * @param string $amdStatusCallback The URL we should call to send amd status
+ * information to your application
+ */
+ public function setAmdStatusCallback($amdStatusCallback): self {
+ return $this->setAttribute('amdStatusCallback', $amdStatusCallback);
+ }
+
+ /**
+ * Add MachineDetectionTimeout attribute.
+ *
+ * @param int $machineDetectionTimeout Number of seconds to wait for machine
+ * detection
+ */
+ public function setMachineDetectionTimeout($machineDetectionTimeout): self {
+ return $this->setAttribute('machineDetectionTimeout', $machineDetectionTimeout);
+ }
+
+ /**
+ * Add MachineDetectionSpeechThreshold attribute.
+ *
+ * @param int $machineDetectionSpeechThreshold Number of milliseconds for
+ * measuring stick for the length
+ * of the speech activity
+ */
+ public function setMachineDetectionSpeechThreshold($machineDetectionSpeechThreshold): self {
+ return $this->setAttribute('machineDetectionSpeechThreshold', $machineDetectionSpeechThreshold);
+ }
+
+ /**
+ * Add MachineDetectionSpeechEndThreshold attribute.
+ *
+ * @param int $machineDetectionSpeechEndThreshold Number of milliseconds of
+ * silence after speech activity
+ */
+ public function setMachineDetectionSpeechEndThreshold($machineDetectionSpeechEndThreshold): self {
+ return $this->setAttribute('machineDetectionSpeechEndThreshold', $machineDetectionSpeechEndThreshold);
+ }
+
+ /**
+ * Add MachineDetectionSilenceTimeout attribute.
+ *
+ * @param int $machineDetectionSilenceTimeout Number of milliseconds of initial
+ * silence
+ */
+ public function setMachineDetectionSilenceTimeout($machineDetectionSilenceTimeout): self {
+ return $this->setAttribute('machineDetectionSilenceTimeout', $machineDetectionSilenceTimeout);
+ }
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Parameter.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Parameter.php
index 409c4a2..775e329 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Parameter.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Parameter.php
@@ -11,15 +11,13 @@
use Twilio\TwiML\TwiML;
-class Parameter extends TwiML
-{
+class Parameter extends TwiML {
/**
* Parameter constructor.
*
* @param array $attributes Optional attributes
*/
- public function __construct($attributes = array())
- {
+ public function __construct($attributes = []) {
parent::__construct('Parameter', null, $attributes);
}
@@ -27,10 +25,8 @@ public function __construct($attributes = array())
* Add Name attribute.
*
* @param string $name The name of the custom parameter
- * @return static $this.
*/
- public function setName($name)
- {
+ public function setName($name): self {
return $this->setAttribute('name', $name);
}
@@ -38,10 +34,8 @@ public function setName($name)
* Add Value attribute.
*
* @param string $value The value of the custom parameter
- * @return static $this.
*/
- public function setValue($value)
- {
+ public function setValue($value): self {
return $this->setAttribute('value', $value);
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Pause.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Pause.php
index 9ef0db9..a252b1f 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Pause.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Pause.php
@@ -11,15 +11,13 @@
use Twilio\TwiML\TwiML;
-class Pause extends TwiML
-{
+class Pause extends TwiML {
/**
* Pause constructor.
*
* @param array $attributes Optional attributes
*/
- public function __construct($attributes = array())
- {
+ public function __construct($attributes = []) {
parent::__construct('Pause', null, $attributes);
}
@@ -27,10 +25,8 @@ public function __construct($attributes = array())
* Add Length attribute.
*
* @param int $length Length in seconds to pause
- * @return static $this.
*/
- public function setLength($length)
- {
+ public function setLength($length): self {
return $this->setAttribute('length', $length);
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Pay.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Pay.php
index 4ff2e8a..89d413f 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Pay.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Pay.php
@@ -11,15 +11,13 @@
use Twilio\TwiML\TwiML;
-class Pay extends TwiML
-{
+class Pay extends TwiML {
/**
* Pay constructor.
*
* @param array $attributes Optional attributes
*/
- public function __construct($attributes = array())
- {
+ public function __construct($attributes = []) {
parent::__construct('Pay', null, $attributes);
}
@@ -29,8 +27,7 @@ public function __construct($attributes = array())
* @param array $attributes Optional attributes
* @return Prompt Child element.
*/
- public function prompt($attributes = array())
- {
+ public function prompt($attributes = []): Prompt {
return $this->nest(new Prompt($attributes));
}
@@ -40,8 +37,7 @@ public function prompt($attributes = array())
* @param array $attributes Optional attributes
* @return Parameter Child element.
*/
- public function parameter($attributes = array())
- {
+ public function parameter($attributes = []): Parameter {
return $this->nest(new Parameter($attributes));
}
@@ -49,10 +45,8 @@ public function parameter($attributes = array())
* Add Input attribute.
*
* @param string $input Input type Twilio should accept
- * @return static $this.
*/
- public function setInput($input)
- {
+ public function setInput($input): self {
return $this->setAttribute('input', $input);
}
@@ -60,10 +54,8 @@ public function setInput($input)
* Add Action attribute.
*
* @param string $action Action URL
- * @return static $this.
*/
- public function setAction($action)
- {
+ public function setAction($action): self {
return $this->setAttribute('action', $action);
}
@@ -74,10 +66,8 @@ public function setAction($action)
* set, payment method attribute must be
* provided and value should be set to
* ach-debit. defaults to consumer-checking
- * @return static $this.
*/
- public function setBankAccountType($bankAccountType)
- {
+ public function setBankAccountType($bankAccountType): self {
return $this->setAttribute('bankAccountType', $bankAccountType);
}
@@ -85,10 +75,8 @@ public function setBankAccountType($bankAccountType)
* Add StatusCallback attribute.
*
* @param string $statusCallback Status callback URL
- * @return static $this.
*/
- public function setStatusCallback($statusCallback)
- {
+ public function setStatusCallback($statusCallback): self {
return $this->setAttribute('statusCallback', $statusCallback);
}
@@ -96,10 +84,8 @@ public function setStatusCallback($statusCallback)
* Add StatusCallbackMethod attribute.
*
* @param string $statusCallbackMethod Status callback method
- * @return static $this.
*/
- public function setStatusCallbackMethod($statusCallbackMethod)
- {
+ public function setStatusCallbackMethod($statusCallbackMethod): self {
return $this->setAttribute('statusCallbackMethod', $statusCallbackMethod);
}
@@ -107,10 +93,8 @@ public function setStatusCallbackMethod($statusCallbackMethod)
* Add Timeout attribute.
*
* @param int $timeout Time to wait to gather input
- * @return static $this.
*/
- public function setTimeout($timeout)
- {
+ public function setTimeout($timeout): self {
return $this->setAttribute('timeout', $timeout);
}
@@ -119,10 +103,8 @@ public function setTimeout($timeout)
*
* @param int $maxAttempts Maximum number of allowed retries when gathering
* input
- * @return static $this.
*/
- public function setMaxAttempts($maxAttempts)
- {
+ public function setMaxAttempts($maxAttempts): self {
return $this->setAttribute('maxAttempts', $maxAttempts);
}
@@ -130,10 +112,8 @@ public function setMaxAttempts($maxAttempts)
* Add SecurityCode attribute.
*
* @param bool $securityCode Prompt for security code
- * @return static $this.
*/
- public function setSecurityCode($securityCode)
- {
+ public function setSecurityCode($securityCode): self {
return $this->setAttribute('securityCode', $securityCode);
}
@@ -142,10 +122,8 @@ public function setSecurityCode($securityCode)
*
* @param string $postalCode Prompt for postal code and it should be true/false
* or default postal code
- * @return static $this.
*/
- public function setPostalCode($postalCode)
- {
+ public function setPostalCode($postalCode): self {
return $this->setAttribute('postalCode', $postalCode);
}
@@ -153,10 +131,8 @@ public function setPostalCode($postalCode)
* Add MinPostalCodeLength attribute.
*
* @param int $minPostalCodeLength Prompt for minimum postal code length
- * @return static $this.
*/
- public function setMinPostalCodeLength($minPostalCodeLength)
- {
+ public function setMinPostalCodeLength($minPostalCodeLength): self {
return $this->setAttribute('minPostalCodeLength', $minPostalCodeLength);
}
@@ -164,10 +140,8 @@ public function setMinPostalCodeLength($minPostalCodeLength)
* Add PaymentConnector attribute.
*
* @param string $paymentConnector Unique name for payment connector
- * @return static $this.
*/
- public function setPaymentConnector($paymentConnector)
- {
+ public function setPaymentConnector($paymentConnector): self {
return $this->setAttribute('paymentConnector', $paymentConnector);
}
@@ -176,10 +150,8 @@ public function setPaymentConnector($paymentConnector)
*
* @param string $paymentMethod Payment method to be used. defaults to
* credit-card
- * @return static $this.
*/
- public function setPaymentMethod($paymentMethod)
- {
+ public function setPaymentMethod($paymentMethod): self {
return $this->setAttribute('paymentMethod', $paymentMethod);
}
@@ -187,10 +159,8 @@ public function setPaymentMethod($paymentMethod)
* Add TokenType attribute.
*
* @param string $tokenType Type of token
- * @return static $this.
*/
- public function setTokenType($tokenType)
- {
+ public function setTokenType($tokenType): self {
return $this->setAttribute('tokenType', $tokenType);
}
@@ -199,10 +169,8 @@ public function setTokenType($tokenType)
*
* @param string $chargeAmount Amount to process. If value is greater than 0
* then make the payment else create a payment token
- * @return static $this.
*/
- public function setChargeAmount($chargeAmount)
- {
+ public function setChargeAmount($chargeAmount): self {
return $this->setAttribute('chargeAmount', $chargeAmount);
}
@@ -210,10 +178,8 @@ public function setChargeAmount($chargeAmount)
* Add Currency attribute.
*
* @param string $currency Currency of the amount attribute
- * @return static $this.
*/
- public function setCurrency($currency)
- {
+ public function setCurrency($currency): self {
return $this->setAttribute('currency', $currency);
}
@@ -221,21 +187,17 @@ public function setCurrency($currency)
* Add Description attribute.
*
* @param string $description Details regarding the payment
- * @return static $this.
*/
- public function setDescription($description)
- {
+ public function setDescription($description): self {
return $this->setAttribute('description', $description);
}
/**
* Add ValidCardTypes attribute.
*
- * @param string $validCardTypes Comma separated accepted card types
- * @return static $this.
+ * @param string[] $validCardTypes Comma separated accepted card types
*/
- public function setValidCardTypes($validCardTypes)
- {
+ public function setValidCardTypes($validCardTypes): self {
return $this->setAttribute('validCardTypes', $validCardTypes);
}
@@ -243,10 +205,8 @@ public function setValidCardTypes($validCardTypes)
* Add Language attribute.
*
* @param string $language Language to use
- * @return static $this.
*/
- public function setLanguage($language)
- {
+ public function setLanguage($language): self {
return $this->setAttribute('language', $language);
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Play.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Play.php
index e0aa94c..aeb9917 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Play.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Play.php
@@ -11,16 +11,14 @@
use Twilio\TwiML\TwiML;
-class Play extends TwiML
-{
+class Play extends TwiML {
/**
* Play constructor.
*
* @param string $url Media URL
* @param array $attributes Optional attributes
*/
- public function __construct($url = null, $attributes = array())
- {
+ public function __construct($url = null, $attributes = []) {
parent::__construct('Play', $url, $attributes);
}
@@ -28,10 +26,8 @@ public function __construct($url = null, $attributes = array())
* Add Loop attribute.
*
* @param int $loop Times to loop media
- * @return static $this.
*/
- public function setLoop($loop)
- {
+ public function setLoop($loop): self {
return $this->setAttribute('loop', $loop);
}
@@ -39,10 +35,8 @@ public function setLoop($loop)
* Add Digits attribute.
*
* @param string $digits Play DTMF tones for digits
- * @return static $this.
*/
- public function setDigits($digits)
- {
+ public function setDigits($digits): self {
return $this->setAttribute('digits', $digits);
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Prompt.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Prompt.php
index 367f10c..a79edd3 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Prompt.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Prompt.php
@@ -11,15 +11,13 @@
use Twilio\TwiML\TwiML;
-class Prompt extends TwiML
-{
+class Prompt extends TwiML {
/**
* Prompt constructor.
*
* @param array $attributes Optional attributes
*/
- public function __construct($attributes = array())
- {
+ public function __construct($attributes = []) {
parent::__construct('Prompt', null, $attributes);
}
@@ -30,8 +28,7 @@ public function __construct($attributes = array())
* @param array $attributes Optional attributes
* @return Say Child element.
*/
- public function say($message, $attributes = array())
- {
+ public function say($message, $attributes = []): Say {
return $this->nest(new Say($message, $attributes));
}
@@ -42,8 +39,7 @@ public function say($message, $attributes = array())
* @param array $attributes Optional attributes
* @return Play Child element.
*/
- public function play($url = null, $attributes = array())
- {
+ public function play($url = null, $attributes = []): Play {
return $this->nest(new Play($url, $attributes));
}
@@ -53,8 +49,7 @@ public function play($url = null, $attributes = array())
* @param array $attributes Optional attributes
* @return Pause Child element.
*/
- public function pause($attributes = array())
- {
+ public function pause($attributes = []): Pause {
return $this->nest(new Pause($attributes));
}
@@ -62,43 +57,45 @@ public function pause($attributes = array())
* Add For_ attribute.
*
* @param string $for_ Name of the payment source data element
- * @return static $this.
*/
- public function setFor_($for_)
- {
+ public function setFor_($for_): self {
return $this->setAttribute('for_', $for_);
}
/**
* Add ErrorType attribute.
*
- * @param string $errorType Type of error
- * @return static $this.
+ * @param string[] $errorType Type of error
*/
- public function setErrorType($errorType)
- {
+ public function setErrorType($errorType): self {
return $this->setAttribute('errorType', $errorType);
}
/**
* Add CardType attribute.
*
- * @param string $cardType Type of the credit card
- * @return static $this.
+ * @param string[] $cardType Type of the credit card
*/
- public function setCardType($cardType)
- {
+ public function setCardType($cardType): self {
return $this->setAttribute('cardType', $cardType);
}
/**
* Add Attempt attribute.
*
- * @param int $attempt Current attempt count
- * @return static $this.
+ * @param int[] $attempt Current attempt count
*/
- public function setAttempt($attempt)
- {
+ public function setAttempt($attempt): self {
return $this->setAttribute('attempt', $attempt);
}
+
+ /**
+ * Add RequireMatchingInputs attribute.
+ *
+ * @param bool $requireMatchingInputs Require customer to input requested
+ * information twice and verify matching.
+ */
+ public function setRequireMatchingInputs($requireMatchingInputs): self {
+ return $this->setAttribute('requireMatchingInputs', $requireMatchingInputs);
+ }
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Queue.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Queue.php
index 88dc715..7697b0a 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Queue.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Queue.php
@@ -11,16 +11,14 @@
use Twilio\TwiML\TwiML;
-class Queue extends TwiML
-{
+class Queue extends TwiML {
/**
* Queue constructor.
*
* @param string $name Queue name
* @param array $attributes Optional attributes
*/
- public function __construct($name, $attributes = array())
- {
+ public function __construct($name, $attributes = []) {
parent::__construct('Queue', $name, $attributes);
}
@@ -28,10 +26,8 @@ public function __construct($name, $attributes = array())
* Add Url attribute.
*
* @param string $url Action URL
- * @return static $this.
*/
- public function setUrl($url)
- {
+ public function setUrl($url): self {
return $this->setAttribute('url', $url);
}
@@ -39,10 +35,8 @@ public function setUrl($url)
* Add Method attribute.
*
* @param string $method Action URL method
- * @return static $this.
*/
- public function setMethod($method)
- {
+ public function setMethod($method): self {
return $this->setAttribute('method', $method);
}
@@ -50,10 +44,8 @@ public function setMethod($method)
* Add ReservationSid attribute.
*
* @param string $reservationSid TaskRouter Reservation SID
- * @return static $this.
*/
- public function setReservationSid($reservationSid)
- {
+ public function setReservationSid($reservationSid): self {
return $this->setAttribute('reservationSid', $reservationSid);
}
@@ -61,10 +53,8 @@ public function setReservationSid($reservationSid)
* Add PostWorkActivitySid attribute.
*
* @param string $postWorkActivitySid TaskRouter Activity SID
- * @return static $this.
*/
- public function setPostWorkActivitySid($postWorkActivitySid)
- {
+ public function setPostWorkActivitySid($postWorkActivitySid): self {
return $this->setAttribute('postWorkActivitySid', $postWorkActivitySid);
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Record.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Record.php
index 5a083a4..45cbdac 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Record.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Record.php
@@ -11,15 +11,13 @@
use Twilio\TwiML\TwiML;
-class Record extends TwiML
-{
+class Record extends TwiML {
/**
* Record constructor.
*
* @param array $attributes Optional attributes
*/
- public function __construct($attributes = array())
- {
+ public function __construct($attributes = []) {
parent::__construct('Record', null, $attributes);
}
@@ -27,10 +25,8 @@ public function __construct($attributes = array())
* Add Action attribute.
*
* @param string $action Action URL
- * @return static $this.
*/
- public function setAction($action)
- {
+ public function setAction($action): self {
return $this->setAttribute('action', $action);
}
@@ -38,10 +34,8 @@ public function setAction($action)
* Add Method attribute.
*
* @param string $method Action URL method
- * @return static $this.
*/
- public function setMethod($method)
- {
+ public function setMethod($method): self {
return $this->setAttribute('method', $method);
}
@@ -49,10 +43,8 @@ public function setMethod($method)
* Add Timeout attribute.
*
* @param int $timeout Timeout to begin recording
- * @return static $this.
*/
- public function setTimeout($timeout)
- {
+ public function setTimeout($timeout): self {
return $this->setAttribute('timeout', $timeout);
}
@@ -60,10 +52,8 @@ public function setTimeout($timeout)
* Add FinishOnKey attribute.
*
* @param string $finishOnKey Finish recording on key
- * @return static $this.
*/
- public function setFinishOnKey($finishOnKey)
- {
+ public function setFinishOnKey($finishOnKey): self {
return $this->setAttribute('finishOnKey', $finishOnKey);
}
@@ -71,10 +61,8 @@ public function setFinishOnKey($finishOnKey)
* Add MaxLength attribute.
*
* @param int $maxLength Max time to record in seconds
- * @return static $this.
*/
- public function setMaxLength($maxLength)
- {
+ public function setMaxLength($maxLength): self {
return $this->setAttribute('maxLength', $maxLength);
}
@@ -82,10 +70,8 @@ public function setMaxLength($maxLength)
* Add PlayBeep attribute.
*
* @param bool $playBeep Play beep
- * @return static $this.
*/
- public function setPlayBeep($playBeep)
- {
+ public function setPlayBeep($playBeep): self {
return $this->setAttribute('playBeep', $playBeep);
}
@@ -93,10 +79,8 @@ public function setPlayBeep($playBeep)
* Add Trim attribute.
*
* @param string $trim Trim the recording
- * @return static $this.
*/
- public function setTrim($trim)
- {
+ public function setTrim($trim): self {
return $this->setAttribute('trim', $trim);
}
@@ -104,10 +88,8 @@ public function setTrim($trim)
* Add RecordingStatusCallback attribute.
*
* @param string $recordingStatusCallback Status callback URL
- * @return static $this.
*/
- public function setRecordingStatusCallback($recordingStatusCallback)
- {
+ public function setRecordingStatusCallback($recordingStatusCallback): self {
return $this->setAttribute('recordingStatusCallback', $recordingStatusCallback);
}
@@ -115,21 +97,18 @@ public function setRecordingStatusCallback($recordingStatusCallback)
* Add RecordingStatusCallbackMethod attribute.
*
* @param string $recordingStatusCallbackMethod Status callback URL method
- * @return static $this.
*/
- public function setRecordingStatusCallbackMethod($recordingStatusCallbackMethod)
- {
+ public function setRecordingStatusCallbackMethod($recordingStatusCallbackMethod): self {
return $this->setAttribute('recordingStatusCallbackMethod', $recordingStatusCallbackMethod);
}
/**
* Add RecordingStatusCallbackEvent attribute.
*
- * @param string $recordingStatusCallbackEvent Recording status callback events
- * @return static $this.
+ * @param string[] $recordingStatusCallbackEvent Recording status callback
+ * events
*/
- public function setRecordingStatusCallbackEvent($recordingStatusCallbackEvent)
- {
+ public function setRecordingStatusCallbackEvent($recordingStatusCallbackEvent): self {
return $this->setAttribute('recordingStatusCallbackEvent', $recordingStatusCallbackEvent);
}
@@ -137,10 +116,8 @@ public function setRecordingStatusCallbackEvent($recordingStatusCallbackEvent)
* Add Transcribe attribute.
*
* @param bool $transcribe Transcribe the recording
- * @return static $this.
*/
- public function setTranscribe($transcribe)
- {
+ public function setTranscribe($transcribe): self {
return $this->setAttribute('transcribe', $transcribe);
}
@@ -148,10 +125,8 @@ public function setTranscribe($transcribe)
* Add TranscribeCallback attribute.
*
* @param string $transcribeCallback Transcribe callback URL
- * @return static $this.
*/
- public function setTranscribeCallback($transcribeCallback)
- {
+ public function setTranscribeCallback($transcribeCallback): self {
return $this->setAttribute('transcribeCallback', $transcribeCallback);
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Redirect.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Redirect.php
index 8cf79a6..cfa3259 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Redirect.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Redirect.php
@@ -11,16 +11,14 @@
use Twilio\TwiML\TwiML;
-class Redirect extends TwiML
-{
+class Redirect extends TwiML {
/**
* Redirect constructor.
*
* @param string $url Redirect URL
* @param array $attributes Optional attributes
*/
- public function __construct($url, $attributes = array())
- {
+ public function __construct($url, $attributes = []) {
parent::__construct('Redirect', $url, $attributes);
}
@@ -28,10 +26,8 @@ public function __construct($url, $attributes = array())
* Add Method attribute.
*
* @param string $method Redirect URL method
- * @return static $this.
*/
- public function setMethod($method)
- {
+ public function setMethod($method): self {
return $this->setAttribute('method', $method);
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Refer.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Refer.php
index ff5fd63..b6f8861 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Refer.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Refer.php
@@ -11,15 +11,13 @@
use Twilio\TwiML\TwiML;
-class Refer extends TwiML
-{
+class Refer extends TwiML {
/**
* Refer constructor.
*
* @param array $attributes Optional attributes
*/
- public function __construct($attributes = array())
- {
+ public function __construct($attributes = []) {
parent::__construct('Refer', null, $attributes);
}
@@ -29,8 +27,7 @@ public function __construct($attributes = array())
* @param string $sipUrl SIP URL
* @return ReferSip Child element.
*/
- public function sip($sipUrl)
- {
+ public function sip($sipUrl): ReferSip {
return $this->nest(new ReferSip($sipUrl));
}
@@ -38,10 +35,8 @@ public function sip($sipUrl)
* Add Action attribute.
*
* @param string $action Action URL
- * @return static $this.
*/
- public function setAction($action)
- {
+ public function setAction($action): self {
return $this->setAttribute('action', $action);
}
@@ -49,10 +44,8 @@ public function setAction($action)
* Add Method attribute.
*
* @param string $method Action URL method
- * @return static $this.
*/
- public function setMethod($method)
- {
+ public function setMethod($method): self {
return $this->setAttribute('method', $method);
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/ReferSip.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/ReferSip.php
index 2ab6cb6..28ab432 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/ReferSip.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/ReferSip.php
@@ -11,15 +11,13 @@
use Twilio\TwiML\TwiML;
-class ReferSip extends TwiML
-{
+class ReferSip extends TwiML {
/**
* ReferSip constructor.
*
* @param string $sipUrl SIP URL
*/
- public function __construct($sipUrl)
- {
+ public function __construct($sipUrl) {
parent::__construct('Sip', $sipUrl);
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Reject.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Reject.php
index 4a554e9..d2bbcc0 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Reject.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Reject.php
@@ -11,26 +11,32 @@
use Twilio\TwiML\TwiML;
-class Reject extends TwiML
-{
+class Reject extends TwiML {
/**
* Reject constructor.
*
* @param array $attributes Optional attributes
*/
- public function __construct($attributes = array())
- {
+ public function __construct($attributes = []) {
parent::__construct('Reject', null, $attributes);
}
+ /**
+ * Add Parameter child.
+ *
+ * @param array $attributes Optional attributes
+ * @return Parameter Child element.
+ */
+ public function parameter($attributes = []): Parameter {
+ return $this->nest(new Parameter($attributes));
+ }
+
/**
* Add Reason attribute.
*
* @param string $reason Rejection reason
- * @return static $this.
*/
- public function setReason($reason)
- {
+ public function setReason($reason): self {
return $this->setAttribute('reason', $reason);
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Room.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Room.php
index cd0683b..b2de023 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Room.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Room.php
@@ -11,16 +11,14 @@
use Twilio\TwiML\TwiML;
-class Room extends TwiML
-{
+class Room extends TwiML {
/**
* Room constructor.
*
* @param string $name Room name
* @param array $attributes Optional attributes
*/
- public function __construct($name, $attributes = array())
- {
+ public function __construct($name, $attributes = []) {
parent::__construct('Room', $name, $attributes);
}
@@ -29,10 +27,8 @@ public function __construct($name, $attributes = array())
*
* @param string $participantIdentity Participant identity when connecting to
* the Room
- * @return static $this.
*/
- public function setParticipantIdentity($participantIdentity)
- {
+ public function setParticipantIdentity($participantIdentity): self {
return $this->setAttribute('participantIdentity', $participantIdentity);
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Say.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Say.php
index f5e81bf..7cb1f11 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Say.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Say.php
@@ -11,16 +11,14 @@
use Twilio\TwiML\TwiML;
-class Say extends TwiML
-{
+class Say extends TwiML {
/**
* Say constructor.
*
* @param string $message Message to say
* @param array $attributes Optional attributes
*/
- public function __construct($message, $attributes = array())
- {
+ public function __construct($message, $attributes = []) {
parent::__construct('Say', $message, $attributes);
}
@@ -30,8 +28,7 @@ public function __construct($message, $attributes = array())
* @param array $attributes Optional attributes
* @return SsmlBreak Child element.
*/
- public function break_($attributes = array())
- {
+ public function break_($attributes = []): SsmlBreak {
return $this->nest(new SsmlBreak($attributes));
}
@@ -42,8 +39,7 @@ public function break_($attributes = array())
* @param array $attributes Optional attributes
* @return SsmlEmphasis Child element.
*/
- public function emphasis($words, $attributes = array())
- {
+ public function emphasis($words, $attributes = []): SsmlEmphasis {
return $this->nest(new SsmlEmphasis($words, $attributes));
}
@@ -54,8 +50,7 @@ public function emphasis($words, $attributes = array())
* @param array $attributes Optional attributes
* @return SsmlLang Child element.
*/
- public function lang($words, $attributes = array())
- {
+ public function lang($words, $attributes = []): SsmlLang {
return $this->nest(new SsmlLang($words, $attributes));
}
@@ -65,8 +60,7 @@ public function lang($words, $attributes = array())
* @param string $words Words to speak
* @return SsmlP Child element.
*/
- public function p($words)
- {
+ public function p($words): SsmlP {
return $this->nest(new SsmlP($words));
}
@@ -77,8 +71,7 @@ public function p($words)
* @param array $attributes Optional attributes
* @return SsmlPhoneme Child element.
*/
- public function phoneme($words, $attributes = array())
- {
+ public function phoneme($words, $attributes = []): SsmlPhoneme {
return $this->nest(new SsmlPhoneme($words, $attributes));
}
@@ -89,8 +82,7 @@ public function phoneme($words, $attributes = array())
* @param array $attributes Optional attributes
* @return SsmlProsody Child element.
*/
- public function prosody($words, $attributes = array())
- {
+ public function prosody($words, $attributes = []): SsmlProsody {
return $this->nest(new SsmlProsody($words, $attributes));
}
@@ -100,8 +92,7 @@ public function prosody($words, $attributes = array())
* @param string $words Words to speak
* @return SsmlS Child element.
*/
- public function s($words)
- {
+ public function s($words): SsmlS {
return $this->nest(new SsmlS($words));
}
@@ -112,8 +103,7 @@ public function s($words)
* @param array $attributes Optional attributes
* @return SsmlSayAs Child element.
*/
- public function say_As($words, $attributes = array())
- {
+ public function say_As($words, $attributes = []): SsmlSayAs {
return $this->nest(new SsmlSayAs($words, $attributes));
}
@@ -124,8 +114,7 @@ public function say_As($words, $attributes = array())
* @param array $attributes Optional attributes
* @return SsmlSub Child element.
*/
- public function sub($words, $attributes = array())
- {
+ public function sub($words, $attributes = []): SsmlSub {
return $this->nest(new SsmlSub($words, $attributes));
}
@@ -136,8 +125,7 @@ public function sub($words, $attributes = array())
* @param array $attributes Optional attributes
* @return SsmlW Child element.
*/
- public function w($words, $attributes = array())
- {
+ public function w($words, $attributes = []): SsmlW {
return $this->nest(new SsmlW($words, $attributes));
}
@@ -145,10 +133,8 @@ public function w($words, $attributes = array())
* Add Voice attribute.
*
* @param string $voice Voice to use
- * @return static $this.
*/
- public function setVoice($voice)
- {
+ public function setVoice($voice): self {
return $this->setAttribute('voice', $voice);
}
@@ -156,21 +142,17 @@ public function setVoice($voice)
* Add Loop attribute.
*
* @param int $loop Times to loop message
- * @return static $this.
*/
- public function setLoop($loop)
- {
+ public function setLoop($loop): self {
return $this->setAttribute('loop', $loop);
}
/**
* Add Language attribute.
*
- * @param string $language Message langauge
- * @return static $this.
+ * @param string $language Message language
*/
- public function setLanguage($language)
- {
+ public function setLanguage($language): self {
return $this->setAttribute('language', $language);
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Sim.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Sim.php
index 4e8ac16..a4ae080 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Sim.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Sim.php
@@ -11,15 +11,13 @@
use Twilio\TwiML\TwiML;
-class Sim extends TwiML
-{
+class Sim extends TwiML {
/**
* Sim constructor.
*
* @param string $simSid SIM SID
*/
- public function __construct($simSid)
- {
+ public function __construct($simSid) {
parent::__construct('Sim', $simSid);
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Sip.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Sip.php
index e8ae5e5..faca1d0 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Sip.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Sip.php
@@ -11,16 +11,14 @@
use Twilio\TwiML\TwiML;
-class Sip extends TwiML
-{
+class Sip extends TwiML {
/**
* Sip constructor.
*
* @param string $sipUrl SIP URL
* @param array $attributes Optional attributes
*/
- public function __construct($sipUrl, $attributes = array())
- {
+ public function __construct($sipUrl, $attributes = []) {
parent::__construct('Sip', $sipUrl, $attributes);
}
@@ -28,10 +26,8 @@ public function __construct($sipUrl, $attributes = array())
* Add Username attribute.
*
* @param string $username SIP Username
- * @return static $this.
*/
- public function setUsername($username)
- {
+ public function setUsername($username): self {
return $this->setAttribute('username', $username);
}
@@ -39,10 +35,8 @@ public function setUsername($username)
* Add Password attribute.
*
* @param string $password SIP Password
- * @return static $this.
*/
- public function setPassword($password)
- {
+ public function setPassword($password): self {
return $this->setAttribute('password', $password);
}
@@ -50,10 +44,8 @@ public function setPassword($password)
* Add Url attribute.
*
* @param string $url Action URL
- * @return static $this.
*/
- public function setUrl($url)
- {
+ public function setUrl($url): self {
return $this->setAttribute('url', $url);
}
@@ -61,21 +53,17 @@ public function setUrl($url)
* Add Method attribute.
*
* @param string $method Action URL method
- * @return static $this.
*/
- public function setMethod($method)
- {
+ public function setMethod($method): self {
return $this->setAttribute('method', $method);
}
/**
* Add StatusCallbackEvent attribute.
*
- * @param string $statusCallbackEvent Status callback events
- * @return static $this.
+ * @param string[] $statusCallbackEvent Status callback events
*/
- public function setStatusCallbackEvent($statusCallbackEvent)
- {
+ public function setStatusCallbackEvent($statusCallbackEvent): self {
return $this->setAttribute('statusCallbackEvent', $statusCallbackEvent);
}
@@ -83,10 +71,8 @@ public function setStatusCallbackEvent($statusCallbackEvent)
* Add StatusCallback attribute.
*
* @param string $statusCallback Status callback URL
- * @return static $this.
*/
- public function setStatusCallback($statusCallback)
- {
+ public function setStatusCallback($statusCallback): self {
return $this->setAttribute('statusCallback', $statusCallback);
}
@@ -94,10 +80,79 @@ public function setStatusCallback($statusCallback)
* Add StatusCallbackMethod attribute.
*
* @param string $statusCallbackMethod Status callback URL method
- * @return static $this.
*/
- public function setStatusCallbackMethod($statusCallbackMethod)
- {
+ public function setStatusCallbackMethod($statusCallbackMethod): self {
return $this->setAttribute('statusCallbackMethod', $statusCallbackMethod);
}
+
+ /**
+ * Add MachineDetection attribute.
+ *
+ * @param string $machineDetection Enable machine detection or end of greeting
+ * detection
+ */
+ public function setMachineDetection($machineDetection): self {
+ return $this->setAttribute('machineDetection', $machineDetection);
+ }
+
+ /**
+ * Add AmdStatusCallbackMethod attribute.
+ *
+ * @param string $amdStatusCallbackMethod HTTP Method to use with
+ * amd_status_callback
+ */
+ public function setAmdStatusCallbackMethod($amdStatusCallbackMethod): self {
+ return $this->setAttribute('amdStatusCallbackMethod', $amdStatusCallbackMethod);
+ }
+
+ /**
+ * Add AmdStatusCallback attribute.
+ *
+ * @param string $amdStatusCallback The URL we should call to send amd status
+ * information to your application
+ */
+ public function setAmdStatusCallback($amdStatusCallback): self {
+ return $this->setAttribute('amdStatusCallback', $amdStatusCallback);
+ }
+
+ /**
+ * Add MachineDetectionTimeout attribute.
+ *
+ * @param int $machineDetectionTimeout Number of seconds to wait for machine
+ * detection
+ */
+ public function setMachineDetectionTimeout($machineDetectionTimeout): self {
+ return $this->setAttribute('machineDetectionTimeout', $machineDetectionTimeout);
+ }
+
+ /**
+ * Add MachineDetectionSpeechThreshold attribute.
+ *
+ * @param int $machineDetectionSpeechThreshold Number of milliseconds for
+ * measuring stick for the length
+ * of the speech activity
+ */
+ public function setMachineDetectionSpeechThreshold($machineDetectionSpeechThreshold): self {
+ return $this->setAttribute('machineDetectionSpeechThreshold', $machineDetectionSpeechThreshold);
+ }
+
+ /**
+ * Add MachineDetectionSpeechEndThreshold attribute.
+ *
+ * @param int $machineDetectionSpeechEndThreshold Number of milliseconds of
+ * silence after speech activity
+ */
+ public function setMachineDetectionSpeechEndThreshold($machineDetectionSpeechEndThreshold): self {
+ return $this->setAttribute('machineDetectionSpeechEndThreshold', $machineDetectionSpeechEndThreshold);
+ }
+
+ /**
+ * Add MachineDetectionSilenceTimeout attribute.
+ *
+ * @param int $machineDetectionSilenceTimeout Number of milliseconds of initial
+ * silence
+ */
+ public function setMachineDetectionSilenceTimeout($machineDetectionSilenceTimeout): self {
+ return $this->setAttribute('machineDetectionSilenceTimeout', $machineDetectionSilenceTimeout);
+ }
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Siprec.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Siprec.php
index 41d096b..ac8dcc7 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Siprec.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Siprec.php
@@ -11,15 +11,13 @@
use Twilio\TwiML\TwiML;
-class Siprec extends TwiML
-{
+class Siprec extends TwiML {
/**
* Siprec constructor.
*
* @param array $attributes Optional attributes
*/
- public function __construct($attributes = array())
- {
+ public function __construct($attributes = []) {
parent::__construct('Siprec', null, $attributes);
}
@@ -29,8 +27,7 @@ public function __construct($attributes = array())
* @param array $attributes Optional attributes
* @return Parameter Child element.
*/
- public function parameter($attributes = array())
- {
+ public function parameter($attributes = []): Parameter {
return $this->nest(new Parameter($attributes));
}
@@ -38,10 +35,8 @@ public function parameter($attributes = array())
* Add Name attribute.
*
* @param string $name Friendly name given to SIPREC
- * @return static $this.
*/
- public function setName($name)
- {
+ public function setName($name): self {
return $this->setAttribute('name', $name);
}
@@ -49,10 +44,8 @@ public function setName($name)
* Add ConnectorName attribute.
*
* @param string $connectorName Unique name for Connector
- * @return static $this.
*/
- public function setConnectorName($connectorName)
- {
+ public function setConnectorName($connectorName): self {
return $this->setAttribute('connectorName', $connectorName);
}
@@ -60,10 +53,26 @@ public function setConnectorName($connectorName)
* Add Track attribute.
*
* @param string $track Track to be streamed to remote service
- * @return static $this.
*/
- public function setTrack($track)
- {
+ public function setTrack($track): self {
return $this->setAttribute('track', $track);
}
+
+ /**
+ * Add StatusCallback attribute.
+ *
+ * @param string $statusCallback Status Callback URL
+ */
+ public function setStatusCallback($statusCallback): self {
+ return $this->setAttribute('statusCallback', $statusCallback);
+ }
+
+ /**
+ * Add StatusCallbackMethod attribute.
+ *
+ * @param string $statusCallbackMethod Status Callback URL method
+ */
+ public function setStatusCallbackMethod($statusCallbackMethod): self {
+ return $this->setAttribute('statusCallbackMethod', $statusCallbackMethod);
+ }
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Sms.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Sms.php
index a33e623..7209d4b 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Sms.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Sms.php
@@ -11,16 +11,14 @@
use Twilio\TwiML\TwiML;
-class Sms extends TwiML
-{
+class Sms extends TwiML {
/**
* Sms constructor.
*
* @param string $message Message body
* @param array $attributes Optional attributes
*/
- public function __construct($message, $attributes = array())
- {
+ public function __construct($message, $attributes = []) {
parent::__construct('Sms', $message, $attributes);
}
@@ -28,10 +26,8 @@ public function __construct($message, $attributes = array())
* Add To attribute.
*
* @param string $to Number to send message to
- * @return static $this.
*/
- public function setTo($to)
- {
+ public function setTo($to): self {
return $this->setAttribute('to', $to);
}
@@ -39,10 +35,8 @@ public function setTo($to)
* Add From attribute.
*
* @param string $from Number to send message from
- * @return static $this.
*/
- public function setFrom($from)
- {
+ public function setFrom($from): self {
return $this->setAttribute('from', $from);
}
@@ -50,10 +44,8 @@ public function setFrom($from)
* Add Action attribute.
*
* @param string $action Action URL
- * @return static $this.
*/
- public function setAction($action)
- {
+ public function setAction($action): self {
return $this->setAttribute('action', $action);
}
@@ -61,10 +53,8 @@ public function setAction($action)
* Add Method attribute.
*
* @param string $method Action URL method
- * @return static $this.
*/
- public function setMethod($method)
- {
+ public function setMethod($method): self {
return $this->setAttribute('method', $method);
}
@@ -72,10 +62,8 @@ public function setMethod($method)
* Add StatusCallback attribute.
*
* @param string $statusCallback Status callback URL
- * @return static $this.
*/
- public function setStatusCallback($statusCallback)
- {
+ public function setStatusCallback($statusCallback): self {
return $this->setAttribute('statusCallback', $statusCallback);
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/SsmlBreak.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/SsmlBreak.php
index da0962b..f999cee 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/SsmlBreak.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/SsmlBreak.php
@@ -11,15 +11,13 @@
use Twilio\TwiML\TwiML;
-class SsmlBreak extends TwiML
-{
+class SsmlBreak extends TwiML {
/**
* SsmlBreak constructor.
*
* @param array $attributes Optional attributes
*/
- public function __construct($attributes = array())
- {
+ public function __construct($attributes = []) {
parent::__construct('break', null, $attributes);
}
@@ -27,10 +25,8 @@ public function __construct($attributes = array())
* Add Strength attribute.
*
* @param string $strength Set a pause based on strength
- * @return static $this.
*/
- public function setStrength($strength)
- {
+ public function setStrength($strength): self {
return $this->setAttribute('strength', $strength);
}
@@ -39,10 +35,8 @@ public function setStrength($strength)
*
* @param string $time Set a pause to a specific length of time in seconds or
* milliseconds, available values: [number]s, [number]ms
- * @return static $this.
*/
- public function setTime($time)
- {
+ public function setTime($time): self {
return $this->setAttribute('time', $time);
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/SsmlEmphasis.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/SsmlEmphasis.php
index a222442..30916e6 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/SsmlEmphasis.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/SsmlEmphasis.php
@@ -11,27 +11,110 @@
use Twilio\TwiML\TwiML;
-class SsmlEmphasis extends TwiML
-{
+class SsmlEmphasis extends TwiML {
/**
* SsmlEmphasis constructor.
*
* @param string $words Words to emphasize
* @param array $attributes Optional attributes
*/
- public function __construct($words, $attributes = array())
- {
+ public function __construct($words, $attributes = []) {
parent::__construct('emphasis', $words, $attributes);
}
+ /**
+ * Add Break child.
+ *
+ * @param array $attributes Optional attributes
+ * @return SsmlBreak Child element.
+ */
+ public function break_($attributes = []): SsmlBreak {
+ return $this->nest(new SsmlBreak($attributes));
+ }
+
+ /**
+ * Add Emphasis child.
+ *
+ * @param string $words Words to emphasize
+ * @param array $attributes Optional attributes
+ * @return SsmlEmphasis Child element.
+ */
+ public function emphasis($words, $attributes = []): SsmlEmphasis {
+ return $this->nest(new SsmlEmphasis($words, $attributes));
+ }
+
+ /**
+ * Add Lang child.
+ *
+ * @param string $words Words to speak
+ * @param array $attributes Optional attributes
+ * @return SsmlLang Child element.
+ */
+ public function lang($words, $attributes = []): SsmlLang {
+ return $this->nest(new SsmlLang($words, $attributes));
+ }
+
+ /**
+ * Add Phoneme child.
+ *
+ * @param string $words Words to speak
+ * @param array $attributes Optional attributes
+ * @return SsmlPhoneme Child element.
+ */
+ public function phoneme($words, $attributes = []): SsmlPhoneme {
+ return $this->nest(new SsmlPhoneme($words, $attributes));
+ }
+
+ /**
+ * Add Prosody child.
+ *
+ * @param string $words Words to speak
+ * @param array $attributes Optional attributes
+ * @return SsmlProsody Child element.
+ */
+ public function prosody($words, $attributes = []): SsmlProsody {
+ return $this->nest(new SsmlProsody($words, $attributes));
+ }
+
+ /**
+ * Add Say-As child.
+ *
+ * @param string $words Words to be interpreted
+ * @param array $attributes Optional attributes
+ * @return SsmlSayAs Child element.
+ */
+ public function say_As($words, $attributes = []): SsmlSayAs {
+ return $this->nest(new SsmlSayAs($words, $attributes));
+ }
+
+ /**
+ * Add Sub child.
+ *
+ * @param string $words Words to be substituted
+ * @param array $attributes Optional attributes
+ * @return SsmlSub Child element.
+ */
+ public function sub($words, $attributes = []): SsmlSub {
+ return $this->nest(new SsmlSub($words, $attributes));
+ }
+
+ /**
+ * Add W child.
+ *
+ * @param string $words Words to speak
+ * @param array $attributes Optional attributes
+ * @return SsmlW Child element.
+ */
+ public function w($words, $attributes = []): SsmlW {
+ return $this->nest(new SsmlW($words, $attributes));
+ }
+
/**
* Add Level attribute.
*
* @param string $level Specify the degree of emphasis
- * @return static $this.
*/
- public function setLevel($level)
- {
+ public function setLevel($level): self {
return $this->setAttribute('level', $level);
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/SsmlLang.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/SsmlLang.php
index 965b8e4..91d4c0b 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/SsmlLang.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/SsmlLang.php
@@ -11,27 +11,130 @@
use Twilio\TwiML\TwiML;
-class SsmlLang extends TwiML
-{
+class SsmlLang extends TwiML {
/**
* SsmlLang constructor.
*
* @param string $words Words to speak
* @param array $attributes Optional attributes
*/
- public function __construct($words, $attributes = array())
- {
+ public function __construct($words, $attributes = []) {
parent::__construct('lang', $words, $attributes);
}
+ /**
+ * Add Break child.
+ *
+ * @param array $attributes Optional attributes
+ * @return SsmlBreak Child element.
+ */
+ public function break_($attributes = []): SsmlBreak {
+ return $this->nest(new SsmlBreak($attributes));
+ }
+
+ /**
+ * Add Emphasis child.
+ *
+ * @param string $words Words to emphasize
+ * @param array $attributes Optional attributes
+ * @return SsmlEmphasis Child element.
+ */
+ public function emphasis($words, $attributes = []): SsmlEmphasis {
+ return $this->nest(new SsmlEmphasis($words, $attributes));
+ }
+
+ /**
+ * Add Lang child.
+ *
+ * @param string $words Words to speak
+ * @param array $attributes Optional attributes
+ * @return SsmlLang Child element.
+ */
+ public function lang($words, $attributes = []): SsmlLang {
+ return $this->nest(new SsmlLang($words, $attributes));
+ }
+
+ /**
+ * Add P child.
+ *
+ * @param string $words Words to speak
+ * @return SsmlP Child element.
+ */
+ public function p($words): SsmlP {
+ return $this->nest(new SsmlP($words));
+ }
+
+ /**
+ * Add Phoneme child.
+ *
+ * @param string $words Words to speak
+ * @param array $attributes Optional attributes
+ * @return SsmlPhoneme Child element.
+ */
+ public function phoneme($words, $attributes = []): SsmlPhoneme {
+ return $this->nest(new SsmlPhoneme($words, $attributes));
+ }
+
+ /**
+ * Add Prosody child.
+ *
+ * @param string $words Words to speak
+ * @param array $attributes Optional attributes
+ * @return SsmlProsody Child element.
+ */
+ public function prosody($words, $attributes = []): SsmlProsody {
+ return $this->nest(new SsmlProsody($words, $attributes));
+ }
+
+ /**
+ * Add S child.
+ *
+ * @param string $words Words to speak
+ * @return SsmlS Child element.
+ */
+ public function s($words): SsmlS {
+ return $this->nest(new SsmlS($words));
+ }
+
+ /**
+ * Add Say-As child.
+ *
+ * @param string $words Words to be interpreted
+ * @param array $attributes Optional attributes
+ * @return SsmlSayAs Child element.
+ */
+ public function say_As($words, $attributes = []): SsmlSayAs {
+ return $this->nest(new SsmlSayAs($words, $attributes));
+ }
+
+ /**
+ * Add Sub child.
+ *
+ * @param string $words Words to be substituted
+ * @param array $attributes Optional attributes
+ * @return SsmlSub Child element.
+ */
+ public function sub($words, $attributes = []): SsmlSub {
+ return $this->nest(new SsmlSub($words, $attributes));
+ }
+
+ /**
+ * Add W child.
+ *
+ * @param string $words Words to speak
+ * @param array $attributes Optional attributes
+ * @return SsmlW Child element.
+ */
+ public function w($words, $attributes = []): SsmlW {
+ return $this->nest(new SsmlW($words, $attributes));
+ }
+
/**
* Add Xml:Lang attribute.
*
* @param string $xmlLang Specify the language
- * @return static $this.
*/
- public function setXmlLang($xmlLang)
- {
+ public function setXmlLang($xmlLang): self {
return $this->setAttribute('xml:Lang', $xmlLang);
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/SsmlP.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/SsmlP.php
index dc249f6..d7db4e4 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/SsmlP.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/SsmlP.php
@@ -11,15 +11,110 @@
use Twilio\TwiML\TwiML;
-class SsmlP extends TwiML
-{
+class SsmlP extends TwiML {
/**
* SsmlP constructor.
*
* @param string $words Words to speak
*/
- public function __construct($words)
- {
+ public function __construct($words) {
parent::__construct('p', $words);
}
+
+ /**
+ * Add Break child.
+ *
+ * @param array $attributes Optional attributes
+ * @return SsmlBreak Child element.
+ */
+ public function break_($attributes = []): SsmlBreak {
+ return $this->nest(new SsmlBreak($attributes));
+ }
+
+ /**
+ * Add Emphasis child.
+ *
+ * @param string $words Words to emphasize
+ * @param array $attributes Optional attributes
+ * @return SsmlEmphasis Child element.
+ */
+ public function emphasis($words, $attributes = []): SsmlEmphasis {
+ return $this->nest(new SsmlEmphasis($words, $attributes));
+ }
+
+ /**
+ * Add Lang child.
+ *
+ * @param string $words Words to speak
+ * @param array $attributes Optional attributes
+ * @return SsmlLang Child element.
+ */
+ public function lang($words, $attributes = []): SsmlLang {
+ return $this->nest(new SsmlLang($words, $attributes));
+ }
+
+ /**
+ * Add Phoneme child.
+ *
+ * @param string $words Words to speak
+ * @param array $attributes Optional attributes
+ * @return SsmlPhoneme Child element.
+ */
+ public function phoneme($words, $attributes = []): SsmlPhoneme {
+ return $this->nest(new SsmlPhoneme($words, $attributes));
+ }
+
+ /**
+ * Add Prosody child.
+ *
+ * @param string $words Words to speak
+ * @param array $attributes Optional attributes
+ * @return SsmlProsody Child element.
+ */
+ public function prosody($words, $attributes = []): SsmlProsody {
+ return $this->nest(new SsmlProsody($words, $attributes));
+ }
+
+ /**
+ * Add S child.
+ *
+ * @param string $words Words to speak
+ * @return SsmlS Child element.
+ */
+ public function s($words): SsmlS {
+ return $this->nest(new SsmlS($words));
+ }
+
+ /**
+ * Add Say-As child.
+ *
+ * @param string $words Words to be interpreted
+ * @param array $attributes Optional attributes
+ * @return SsmlSayAs Child element.
+ */
+ public function say_As($words, $attributes = []): SsmlSayAs {
+ return $this->nest(new SsmlSayAs($words, $attributes));
+ }
+
+ /**
+ * Add Sub child.
+ *
+ * @param string $words Words to be substituted
+ * @param array $attributes Optional attributes
+ * @return SsmlSub Child element.
+ */
+ public function sub($words, $attributes = []): SsmlSub {
+ return $this->nest(new SsmlSub($words, $attributes));
+ }
+
+ /**
+ * Add W child.
+ *
+ * @param string $words Words to speak
+ * @param array $attributes Optional attributes
+ * @return SsmlW Child element.
+ */
+ public function w($words, $attributes = []): SsmlW {
+ return $this->nest(new SsmlW($words, $attributes));
+ }
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/SsmlPhoneme.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/SsmlPhoneme.php
index 6b87166..b155496 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/SsmlPhoneme.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/SsmlPhoneme.php
@@ -11,16 +11,14 @@
use Twilio\TwiML\TwiML;
-class SsmlPhoneme extends TwiML
-{
+class SsmlPhoneme extends TwiML {
/**
* SsmlPhoneme constructor.
*
* @param string $words Words to speak
* @param array $attributes Optional attributes
*/
- public function __construct($words, $attributes = array())
- {
+ public function __construct($words, $attributes = []) {
parent::__construct('phoneme', $words, $attributes);
}
@@ -28,10 +26,8 @@ public function __construct($words, $attributes = array())
* Add Alphabet attribute.
*
* @param string $alphabet Specify the phonetic alphabet
- * @return static $this.
*/
- public function setAlphabet($alphabet)
- {
+ public function setAlphabet($alphabet): self {
return $this->setAttribute('alphabet', $alphabet);
}
@@ -39,10 +35,8 @@ public function setAlphabet($alphabet)
* Add Ph attribute.
*
* @param string $ph Specifiy the phonetic symbols for pronunciation
- * @return static $this.
*/
- public function setPh($ph)
- {
+ public function setPh($ph): self {
return $this->setAttribute('ph', $ph);
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/SsmlProsody.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/SsmlProsody.php
index 031f64e..958fa0a 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/SsmlProsody.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/SsmlProsody.php
@@ -11,28 +11,131 @@
use Twilio\TwiML\TwiML;
-class SsmlProsody extends TwiML
-{
+class SsmlProsody extends TwiML {
/**
* SsmlProsody constructor.
*
* @param string $words Words to speak
* @param array $attributes Optional attributes
*/
- public function __construct($words, $attributes = array())
- {
+ public function __construct($words, $attributes = []) {
parent::__construct('prosody', $words, $attributes);
}
+ /**
+ * Add Break child.
+ *
+ * @param array $attributes Optional attributes
+ * @return SsmlBreak Child element.
+ */
+ public function break_($attributes = []): SsmlBreak {
+ return $this->nest(new SsmlBreak($attributes));
+ }
+
+ /**
+ * Add Emphasis child.
+ *
+ * @param string $words Words to emphasize
+ * @param array $attributes Optional attributes
+ * @return SsmlEmphasis Child element.
+ */
+ public function emphasis($words, $attributes = []): SsmlEmphasis {
+ return $this->nest(new SsmlEmphasis($words, $attributes));
+ }
+
+ /**
+ * Add Lang child.
+ *
+ * @param string $words Words to speak
+ * @param array $attributes Optional attributes
+ * @return SsmlLang Child element.
+ */
+ public function lang($words, $attributes = []): SsmlLang {
+ return $this->nest(new SsmlLang($words, $attributes));
+ }
+
+ /**
+ * Add P child.
+ *
+ * @param string $words Words to speak
+ * @return SsmlP Child element.
+ */
+ public function p($words): SsmlP {
+ return $this->nest(new SsmlP($words));
+ }
+
+ /**
+ * Add Phoneme child.
+ *
+ * @param string $words Words to speak
+ * @param array $attributes Optional attributes
+ * @return SsmlPhoneme Child element.
+ */
+ public function phoneme($words, $attributes = []): SsmlPhoneme {
+ return $this->nest(new SsmlPhoneme($words, $attributes));
+ }
+
+ /**
+ * Add Prosody child.
+ *
+ * @param string $words Words to speak
+ * @param array $attributes Optional attributes
+ * @return SsmlProsody Child element.
+ */
+ public function prosody($words, $attributes = []): SsmlProsody {
+ return $this->nest(new SsmlProsody($words, $attributes));
+ }
+
+ /**
+ * Add S child.
+ *
+ * @param string $words Words to speak
+ * @return SsmlS Child element.
+ */
+ public function s($words): SsmlS {
+ return $this->nest(new SsmlS($words));
+ }
+
+ /**
+ * Add Say-As child.
+ *
+ * @param string $words Words to be interpreted
+ * @param array $attributes Optional attributes
+ * @return SsmlSayAs Child element.
+ */
+ public function say_As($words, $attributes = []): SsmlSayAs {
+ return $this->nest(new SsmlSayAs($words, $attributes));
+ }
+
+ /**
+ * Add Sub child.
+ *
+ * @param string $words Words to be substituted
+ * @param array $attributes Optional attributes
+ * @return SsmlSub Child element.
+ */
+ public function sub($words, $attributes = []): SsmlSub {
+ return $this->nest(new SsmlSub($words, $attributes));
+ }
+
+ /**
+ * Add W child.
+ *
+ * @param string $words Words to speak
+ * @param array $attributes Optional attributes
+ * @return SsmlW Child element.
+ */
+ public function w($words, $attributes = []): SsmlW {
+ return $this->nest(new SsmlW($words, $attributes));
+ }
+
/**
* Add Volume attribute.
*
* @param string $volume Specify the volume, available values: default, silent,
* x-soft, soft, medium, loud, x-loud, +ndB, -ndB
- * @return static $this.
*/
- public function setVolume($volume)
- {
+ public function setVolume($volume): self {
return $this->setAttribute('volume', $volume);
}
@@ -41,10 +144,8 @@ public function setVolume($volume)
*
* @param string $rate Specify the rate, available values: x-slow, slow,
* medium, fast, x-fast, n%
- * @return static $this.
*/
- public function setRate($rate)
- {
+ public function setRate($rate): self {
return $this->setAttribute('rate', $rate);
}
@@ -53,10 +154,8 @@ public function setRate($rate)
*
* @param string $pitch Specify the pitch, available values: default, x-low,
* low, medium, high, x-high, +n%, -n%
- * @return static $this.
*/
- public function setPitch($pitch)
- {
+ public function setPitch($pitch): self {
return $this->setAttribute('pitch', $pitch);
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/SsmlS.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/SsmlS.php
index 15a8d05..833e41d 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/SsmlS.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/SsmlS.php
@@ -11,15 +11,100 @@
use Twilio\TwiML\TwiML;
-class SsmlS extends TwiML
-{
+class SsmlS extends TwiML {
/**
* SsmlS constructor.
*
* @param string $words Words to speak
*/
- public function __construct($words)
- {
+ public function __construct($words) {
parent::__construct('s', $words);
}
+
+ /**
+ * Add Break child.
+ *
+ * @param array $attributes Optional attributes
+ * @return SsmlBreak Child element.
+ */
+ public function break_($attributes = []): SsmlBreak {
+ return $this->nest(new SsmlBreak($attributes));
+ }
+
+ /**
+ * Add Emphasis child.
+ *
+ * @param string $words Words to emphasize
+ * @param array $attributes Optional attributes
+ * @return SsmlEmphasis Child element.
+ */
+ public function emphasis($words, $attributes = []): SsmlEmphasis {
+ return $this->nest(new SsmlEmphasis($words, $attributes));
+ }
+
+ /**
+ * Add Lang child.
+ *
+ * @param string $words Words to speak
+ * @param array $attributes Optional attributes
+ * @return SsmlLang Child element.
+ */
+ public function lang($words, $attributes = []): SsmlLang {
+ return $this->nest(new SsmlLang($words, $attributes));
+ }
+
+ /**
+ * Add Phoneme child.
+ *
+ * @param string $words Words to speak
+ * @param array $attributes Optional attributes
+ * @return SsmlPhoneme Child element.
+ */
+ public function phoneme($words, $attributes = []): SsmlPhoneme {
+ return $this->nest(new SsmlPhoneme($words, $attributes));
+ }
+
+ /**
+ * Add Prosody child.
+ *
+ * @param string $words Words to speak
+ * @param array $attributes Optional attributes
+ * @return SsmlProsody Child element.
+ */
+ public function prosody($words, $attributes = []): SsmlProsody {
+ return $this->nest(new SsmlProsody($words, $attributes));
+ }
+
+ /**
+ * Add Say-As child.
+ *
+ * @param string $words Words to be interpreted
+ * @param array $attributes Optional attributes
+ * @return SsmlSayAs Child element.
+ */
+ public function say_As($words, $attributes = []): SsmlSayAs {
+ return $this->nest(new SsmlSayAs($words, $attributes));
+ }
+
+ /**
+ * Add Sub child.
+ *
+ * @param string $words Words to be substituted
+ * @param array $attributes Optional attributes
+ * @return SsmlSub Child element.
+ */
+ public function sub($words, $attributes = []): SsmlSub {
+ return $this->nest(new SsmlSub($words, $attributes));
+ }
+
+ /**
+ * Add W child.
+ *
+ * @param string $words Words to speak
+ * @param array $attributes Optional attributes
+ * @return SsmlW Child element.
+ */
+ public function w($words, $attributes = []): SsmlW {
+ return $this->nest(new SsmlW($words, $attributes));
+ }
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/SsmlSayAs.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/SsmlSayAs.php
index 230fcaa..9a4dad2 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/SsmlSayAs.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/SsmlSayAs.php
@@ -11,16 +11,14 @@
use Twilio\TwiML\TwiML;
-class SsmlSayAs extends TwiML
-{
+class SsmlSayAs extends TwiML {
/**
* SsmlSayAs constructor.
*
* @param string $words Words to be interpreted
* @param array $attributes Optional attributes
*/
- public function __construct($words, $attributes = array())
- {
+ public function __construct($words, $attributes = []) {
parent::__construct('say-as', $words, $attributes);
}
@@ -28,22 +26,18 @@ public function __construct($words, $attributes = array())
* Add Interpret-As attribute.
*
* @param string $interpretAs Specify the type of words are spoken
- * @return static $this.
*/
- public function setInterpretAs($interpretAs)
- {
+ public function setInterpretAs($interpretAs): self {
return $this->setAttribute('interpret-as', $interpretAs);
}
/**
- * Add Role attribute.
+ * Add Format attribute.
*
- * @param string $role Specify the format of the date when interpret-as is set
- * to date
- * @return static $this.
+ * @param string $format Specify the format of the date when interpret-as is
+ * set to date
*/
- public function setRole($role)
- {
- return $this->setAttribute('role', $role);
+ public function setFormat($format): self {
+ return $this->setAttribute('format', $format);
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/SsmlSub.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/SsmlSub.php
index afa0f56..eaf552f 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/SsmlSub.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/SsmlSub.php
@@ -11,16 +11,14 @@
use Twilio\TwiML\TwiML;
-class SsmlSub extends TwiML
-{
+class SsmlSub extends TwiML {
/**
* SsmlSub constructor.
*
* @param string $words Words to be substituted
* @param array $attributes Optional attributes
*/
- public function __construct($words, $attributes = array())
- {
+ public function __construct($words, $attributes = []) {
parent::__construct('sub', $words, $attributes);
}
@@ -29,10 +27,8 @@ public function __construct($words, $attributes = array())
*
* @param string $alias Substitute a different word (or pronunciation) for
* selected text such as an acronym or abbreviation
- * @return static $this.
*/
- public function setAlias($alias)
- {
+ public function setAlias($alias): self {
return $this->setAttribute('alias', $alias);
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/SsmlW.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/SsmlW.php
index e236440..126c6b4 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/SsmlW.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/SsmlW.php
@@ -11,28 +11,89 @@
use Twilio\TwiML\TwiML;
-class SsmlW extends TwiML
-{
+class SsmlW extends TwiML {
/**
* SsmlW constructor.
*
* @param string $words Words to speak
* @param array $attributes Optional attributes
*/
- public function __construct($words, $attributes = array())
- {
+ public function __construct($words, $attributes = []) {
parent::__construct('w', $words, $attributes);
}
+ /**
+ * Add Break child.
+ *
+ * @param array $attributes Optional attributes
+ * @return SsmlBreak Child element.
+ */
+ public function break_($attributes = []): SsmlBreak {
+ return $this->nest(new SsmlBreak($attributes));
+ }
+
+ /**
+ * Add Emphasis child.
+ *
+ * @param string $words Words to emphasize
+ * @param array $attributes Optional attributes
+ * @return SsmlEmphasis Child element.
+ */
+ public function emphasis($words, $attributes = []): SsmlEmphasis {
+ return $this->nest(new SsmlEmphasis($words, $attributes));
+ }
+
+ /**
+ * Add Phoneme child.
+ *
+ * @param string $words Words to speak
+ * @param array $attributes Optional attributes
+ * @return SsmlPhoneme Child element.
+ */
+ public function phoneme($words, $attributes = []): SsmlPhoneme {
+ return $this->nest(new SsmlPhoneme($words, $attributes));
+ }
+
+ /**
+ * Add Prosody child.
+ *
+ * @param string $words Words to speak
+ * @param array $attributes Optional attributes
+ * @return SsmlProsody Child element.
+ */
+ public function prosody($words, $attributes = []): SsmlProsody {
+ return $this->nest(new SsmlProsody($words, $attributes));
+ }
+
+ /**
+ * Add Say-As child.
+ *
+ * @param string $words Words to be interpreted
+ * @param array $attributes Optional attributes
+ * @return SsmlSayAs Child element.
+ */
+ public function say_As($words, $attributes = []): SsmlSayAs {
+ return $this->nest(new SsmlSayAs($words, $attributes));
+ }
+
+ /**
+ * Add Sub child.
+ *
+ * @param string $words Words to be substituted
+ * @param array $attributes Optional attributes
+ * @return SsmlSub Child element.
+ */
+ public function sub($words, $attributes = []): SsmlSub {
+ return $this->nest(new SsmlSub($words, $attributes));
+ }
+
/**
* Add Role attribute.
*
* @param string $role Customize the pronunciation of words by specifying the
* word’s part of speech or alternate meaning
- * @return static $this.
*/
- public function setRole($role)
- {
+ public function setRole($role): self {
return $this->setAttribute('role', $role);
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Start.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Start.php
index 67bac96..625d39f 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Start.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Start.php
@@ -11,15 +11,13 @@
use Twilio\TwiML\TwiML;
-class Start extends TwiML
-{
+class Start extends TwiML {
/**
* Start constructor.
*
* @param array $attributes Optional attributes
*/
- public function __construct($attributes = array())
- {
+ public function __construct($attributes = []) {
parent::__construct('Start', null, $attributes);
}
@@ -29,8 +27,7 @@ public function __construct($attributes = array())
* @param array $attributes Optional attributes
* @return Stream Child element.
*/
- public function stream($attributes = array())
- {
+ public function stream($attributes = []): Stream {
return $this->nest(new Stream($attributes));
}
@@ -40,19 +37,26 @@ public function stream($attributes = array())
* @param array $attributes Optional attributes
* @return Siprec Child element.
*/
- public function siprec($attributes = array())
- {
+ public function siprec($attributes = []): Siprec {
return $this->nest(new Siprec($attributes));
}
+ /**
+ * Add Transcription child.
+ *
+ * @param array $attributes Optional attributes
+ * @return Transcription Child element.
+ */
+ public function transcription($attributes = []): Transcription {
+ return $this->nest(new Transcription($attributes));
+ }
+
/**
* Add Action attribute.
*
* @param string $action Action URL
- * @return static $this.
*/
- public function setAction($action)
- {
+ public function setAction($action): self {
return $this->setAttribute('action', $action);
}
@@ -60,10 +64,8 @@ public function setAction($action)
* Add Method attribute.
*
* @param string $method Action URL method
- * @return static $this.
*/
- public function setMethod($method)
- {
+ public function setMethod($method): self {
return $this->setAttribute('method', $method);
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Stop.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Stop.php
index f85b20b..89f2721 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Stop.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Stop.php
@@ -11,13 +11,11 @@
use Twilio\TwiML\TwiML;
-class Stop extends TwiML
-{
+class Stop extends TwiML {
/**
* Stop constructor.
*/
- public function __construct()
- {
+ public function __construct() {
parent::__construct('Stop', null);
}
@@ -27,8 +25,7 @@ public function __construct()
* @param array $attributes Optional attributes
* @return Stream Child element.
*/
- public function stream($attributes = array())
- {
+ public function stream($attributes = []): Stream {
return $this->nest(new Stream($attributes));
}
@@ -38,8 +35,17 @@ public function stream($attributes = array())
* @param array $attributes Optional attributes
* @return Siprec Child element.
*/
- public function siprec($attributes = array())
- {
+ public function siprec($attributes = []): Siprec {
return $this->nest(new Siprec($attributes));
}
+
+ /**
+ * Add Transcription child.
+ *
+ * @param array $attributes Optional attributes
+ * @return Transcription Child element.
+ */
+ public function transcription($attributes = []): Transcription {
+ return $this->nest(new Transcription($attributes));
+ }
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Stream.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Stream.php
index 4c518fd..2dafdbb 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Stream.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Stream.php
@@ -11,15 +11,13 @@
use Twilio\TwiML\TwiML;
-class Stream extends TwiML
-{
+class Stream extends TwiML {
/**
* Stream constructor.
*
* @param array $attributes Optional attributes
*/
- public function __construct($attributes = array())
- {
+ public function __construct($attributes = []) {
parent::__construct('Stream', null, $attributes);
}
@@ -29,8 +27,7 @@ public function __construct($attributes = array())
* @param array $attributes Optional attributes
* @return Parameter Child element.
*/
- public function parameter($attributes = array())
- {
+ public function parameter($attributes = []): Parameter {
return $this->nest(new Parameter($attributes));
}
@@ -38,10 +35,8 @@ public function parameter($attributes = array())
* Add Name attribute.
*
* @param string $name Friendly name given to the Stream
- * @return static $this.
*/
- public function setName($name)
- {
+ public function setName($name): self {
return $this->setAttribute('name', $name);
}
@@ -49,10 +44,8 @@ public function setName($name)
* Add ConnectorName attribute.
*
* @param string $connectorName Unique name for Stream Connector
- * @return static $this.
*/
- public function setConnectorName($connectorName)
- {
+ public function setConnectorName($connectorName): self {
return $this->setAttribute('connectorName', $connectorName);
}
@@ -60,10 +53,8 @@ public function setConnectorName($connectorName)
* Add Url attribute.
*
* @param string $url URL of the remote service where the Stream is routed
- * @return static $this.
*/
- public function setUrl($url)
- {
+ public function setUrl($url): self {
return $this->setAttribute('url', $url);
}
@@ -71,10 +62,26 @@ public function setUrl($url)
* Add Track attribute.
*
* @param string $track Track to be streamed to remote service
- * @return static $this.
*/
- public function setTrack($track)
- {
+ public function setTrack($track): self {
return $this->setAttribute('track', $track);
}
+
+ /**
+ * Add StatusCallback attribute.
+ *
+ * @param string $statusCallback Status Callback URL
+ */
+ public function setStatusCallback($statusCallback): self {
+ return $this->setAttribute('statusCallback', $statusCallback);
+ }
+
+ /**
+ * Add StatusCallbackMethod attribute.
+ *
+ * @param string $statusCallbackMethod Status Callback URL method
+ */
+ public function setStatusCallbackMethod($statusCallbackMethod): self {
+ return $this->setAttribute('statusCallbackMethod', $statusCallbackMethod);
+ }
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Task.php b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Task.php
index f7e1d53..2d0fae4 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Task.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/Voice/Task.php
@@ -11,16 +11,14 @@
use Twilio\TwiML\TwiML;
-class Task extends TwiML
-{
+class Task extends TwiML {
/**
* Task constructor.
*
* @param string $body TaskRouter task attributes
* @param array $attributes Optional attributes
*/
- public function __construct($body, $attributes = array())
- {
+ public function __construct($body, $attributes = []) {
parent::__construct('Task', $body, $attributes);
}
@@ -28,10 +26,8 @@ public function __construct($body, $attributes = array())
* Add Priority attribute.
*
* @param int $priority Task priority
- * @return static $this.
*/
- public function setPriority($priority)
- {
+ public function setPriority($priority): self {
return $this->setAttribute('priority', $priority);
}
@@ -39,10 +35,8 @@ public function setPriority($priority)
* Add Timeout attribute.
*
* @param int $timeout Timeout associated with task
- * @return static $this.
*/
- public function setTimeout($timeout)
- {
+ public function setTimeout($timeout): self {
return $this->setAttribute('timeout', $timeout);
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/TwiML/VoiceResponse.php b/vendor/twilio/sdk/src/Twilio/TwiML/VoiceResponse.php
index 31b567c..6cb9a05 100644
--- a/vendor/twilio/sdk/src/Twilio/TwiML/VoiceResponse.php
+++ b/vendor/twilio/sdk/src/Twilio/TwiML/VoiceResponse.php
@@ -9,13 +9,11 @@
namespace Twilio\TwiML;
-class VoiceResponse extends TwiML
-{
+class VoiceResponse extends TwiML {
/**
* VoiceResponse constructor.
*/
- public function __construct()
- {
+ public function __construct() {
parent::__construct('Response', null);
}
@@ -25,8 +23,7 @@ public function __construct()
* @param array $attributes Optional attributes
* @return Voice\Connect Child element.
*/
- public function connect($attributes = array())
- {
+ public function connect($attributes = []): Voice\Connect {
return $this->nest(new Voice\Connect($attributes));
}
@@ -37,8 +34,7 @@ public function connect($attributes = array())
* @param array $attributes Optional attributes
* @return Voice\Dial Child element.
*/
- public function dial($number = null, $attributes = array())
- {
+ public function dial($number = null, $attributes = []): Voice\Dial {
return $this->nest(new Voice\Dial($number, $attributes));
}
@@ -47,8 +43,7 @@ public function dial($number = null, $attributes = array())
*
* @return Voice\Echo_ Child element.
*/
- public function echo_()
- {
+ public function echo_(): Voice\Echo_ {
return $this->nest(new Voice\Echo_());
}
@@ -59,8 +54,7 @@ public function echo_()
* @param array $attributes Optional attributes
* @return Voice\Enqueue Child element.
*/
- public function enqueue($name = null, $attributes = array())
- {
+ public function enqueue($name = null, $attributes = []): Voice\Enqueue {
return $this->nest(new Voice\Enqueue($name, $attributes));
}
@@ -70,8 +64,7 @@ public function enqueue($name = null, $attributes = array())
* @param array $attributes Optional attributes
* @return Voice\Gather Child element.
*/
- public function gather($attributes = array())
- {
+ public function gather($attributes = []): Voice\Gather {
return $this->nest(new Voice\Gather($attributes));
}
@@ -80,8 +73,7 @@ public function gather($attributes = array())
*
* @return Voice\Hangup Child element.
*/
- public function hangup()
- {
+ public function hangup(): Voice\Hangup {
return $this->nest(new Voice\Hangup());
}
@@ -90,8 +82,7 @@ public function hangup()
*
* @return Voice\Leave Child element.
*/
- public function leave()
- {
+ public function leave(): Voice\Leave {
return $this->nest(new Voice\Leave());
}
@@ -101,8 +92,7 @@ public function leave()
* @param array $attributes Optional attributes
* @return Voice\Pause Child element.
*/
- public function pause($attributes = array())
- {
+ public function pause($attributes = []): Voice\Pause {
return $this->nest(new Voice\Pause($attributes));
}
@@ -113,8 +103,7 @@ public function pause($attributes = array())
* @param array $attributes Optional attributes
* @return Voice\Play Child element.
*/
- public function play($url = null, $attributes = array())
- {
+ public function play($url = null, $attributes = []): Voice\Play {
return $this->nest(new Voice\Play($url, $attributes));
}
@@ -125,8 +114,7 @@ public function play($url = null, $attributes = array())
* @param array $attributes Optional attributes
* @return Voice\Queue Child element.
*/
- public function queue($name, $attributes = array())
- {
+ public function queue($name, $attributes = []): Voice\Queue {
return $this->nest(new Voice\Queue($name, $attributes));
}
@@ -136,8 +124,7 @@ public function queue($name, $attributes = array())
* @param array $attributes Optional attributes
* @return Voice\Record Child element.
*/
- public function record($attributes = array())
- {
+ public function record($attributes = []): Voice\Record {
return $this->nest(new Voice\Record($attributes));
}
@@ -148,8 +135,7 @@ public function record($attributes = array())
* @param array $attributes Optional attributes
* @return Voice\Redirect Child element.
*/
- public function redirect($url, $attributes = array())
- {
+ public function redirect($url, $attributes = []): Voice\Redirect {
return $this->nest(new Voice\Redirect($url, $attributes));
}
@@ -159,8 +145,7 @@ public function redirect($url, $attributes = array())
* @param array $attributes Optional attributes
* @return Voice\Reject Child element.
*/
- public function reject($attributes = array())
- {
+ public function reject($attributes = []): Voice\Reject {
return $this->nest(new Voice\Reject($attributes));
}
@@ -171,8 +156,7 @@ public function reject($attributes = array())
* @param array $attributes Optional attributes
* @return Voice\Say Child element.
*/
- public function say($message, $attributes = array())
- {
+ public function say($message, $attributes = []): Voice\Say {
return $this->nest(new Voice\Say($message, $attributes));
}
@@ -183,8 +167,7 @@ public function say($message, $attributes = array())
* @param array $attributes Optional attributes
* @return Voice\Sms Child element.
*/
- public function sms($message, $attributes = array())
- {
+ public function sms($message, $attributes = []): Voice\Sms {
return $this->nest(new Voice\Sms($message, $attributes));
}
@@ -194,8 +177,7 @@ public function sms($message, $attributes = array())
* @param array $attributes Optional attributes
* @return Voice\Pay Child element.
*/
- public function pay($attributes = array())
- {
+ public function pay($attributes = []): Voice\Pay {
return $this->nest(new Voice\Pay($attributes));
}
@@ -205,8 +187,7 @@ public function pay($attributes = array())
* @param array $attributes Optional attributes
* @return Voice\Prompt Child element.
*/
- public function prompt($attributes = array())
- {
+ public function prompt($attributes = []): Voice\Prompt {
return $this->nest(new Voice\Prompt($attributes));
}
@@ -216,8 +197,7 @@ public function prompt($attributes = array())
* @param array $attributes Optional attributes
* @return Voice\Start Child element.
*/
- public function start($attributes = array())
- {
+ public function start($attributes = []): Voice\Start {
return $this->nest(new Voice\Start($attributes));
}
@@ -226,8 +206,7 @@ public function start($attributes = array())
*
* @return Voice\Stop Child element.
*/
- public function stop()
- {
+ public function stop(): Voice\Stop {
return $this->nest(new Voice\Stop());
}
@@ -237,8 +216,7 @@ public function stop()
* @param array $attributes Optional attributes
* @return Voice\Refer Child element.
*/
- public function refer($attributes = array())
- {
+ public function refer($attributes = []): Voice\Refer {
return $this->nest(new Voice\Refer($attributes));
}
}
\ No newline at end of file
diff --git a/vendor/twilio/sdk/src/Twilio/Values.php b/vendor/twilio/sdk/src/Twilio/Values.php
index 30043ec..7d6ba96 100644
--- a/vendor/twilio/sdk/src/Twilio/Values.php
+++ b/vendor/twilio/sdk/src/Twilio/Values.php
@@ -4,35 +4,33 @@
namespace Twilio;
-class Values implements \ArrayAccess
-{
- const NONE = 'Twilio\\Values\\NONE';
-
+class Values implements \ArrayAccess {
+ public const NONE = 'Twilio\\Values\\NONE';
+ public const ARRAY_NONE = [self::NONE];
+ public const INT_NONE = 0;
+ public const BOOL_NONE = false;
protected $options;
+ private static $noneConstants = array(self::NONE, self::ARRAY_NONE, self::INT_NONE, self::BOOL_NONE);
- public static function array_get($array, $key, $default = null)
- {
+ public static function array_get(array $array, string $key, string $default = null) {
if (\array_key_exists($key, $array)) {
return $array[$key];
}
return $default;
}
- public static function of($array)
- {
- $result = array();
+ public static function of(array $array): array {
+ $result = [];
foreach ($array as $key => $value) {
- if ($value === self::NONE) {
- continue;
+ if (!in_array($value, self::$noneConstants, true)) {
+ $result[$key] = $value;
}
- $result[$key] = $value;
}
return $result;
}
- public function __construct($options)
- {
- $this->options = array();
+ public function __construct(array $options) {
+ $this->options = [];
foreach ($options as $key => $value) {
$this->options[\strtolower($key)] = $value;
}
@@ -45,13 +43,12 @@ public function __construct($options)
* @param mixed $offset
* An offset to check for.
*
- * @return boolean true on success or false on failure.
+ * @return bool true on success or false on failure.
*
*
* The return value will be casted to boolean if non-boolean was returned.
*/
- public function offsetExists($offset)
- {
+ public function offsetExists($offset): bool {
return true;
}
@@ -64,8 +61,8 @@ public function offsetExists($offset)
*
* @return mixed Can return all value types.
*/
- public function offsetGet($offset)
- {
+ #[\ReturnTypeWillChange]
+ public function offsetGet($offset) {
$offset = \strtolower($offset);
return \array_key_exists($offset, $this->options) ? $this->options[$offset] : self::NONE;
}
@@ -82,8 +79,7 @@ public function offsetGet($offset)
*
* @return void
*/
- public function offsetSet($offset, $value)
- {
+ public function offsetSet($offset, $value): void {
$this->options[\strtolower($offset)] = $value;
}
@@ -96,10 +92,7 @@ public function offsetSet($offset, $value)
*
* @return void
*/
- public function offsetUnset($offset)
- {
+ public function offsetUnset($offset): void {
unset($this->options[$offset]);
}
-
-
}
diff --git a/vendor/twilio/sdk/src/Twilio/Version.php b/vendor/twilio/sdk/src/Twilio/Version.php
index 8ca7866..d0ede2f 100644
--- a/vendor/twilio/sdk/src/Twilio/Version.php
+++ b/vendor/twilio/sdk/src/Twilio/Version.php
@@ -6,15 +6,14 @@
use Twilio\Exceptions\TwilioException;
use Twilio\Http\Response;
-abstract class Version
-{
+abstract class Version {
/**
* @const int MAX_PAGE_SIZE largest page the Twilio API will return
*/
- const MAX_PAGE_SIZE = 1000;
+ public const MAX_PAGE_SIZE = 1000;
/**
- * @var \Twilio\Domain $domain
+ * @var Domain $domain
*/
protected $domain;
@@ -24,10 +23,9 @@ abstract class Version
protected $version;
/**
- * @param \Twilio\Domain $domain
+ * @param Domain $domain
*/
- public function __construct(Domain $domain)
- {
+ public function __construct(Domain $domain) {
$this->domain = $domain;
$this->version = null;
}
@@ -37,8 +35,7 @@ public function __construct(Domain $domain)
* @param string $uri Version relative uri
* @return string Absolute URL
*/
- public function absoluteUrl($uri)
- {
+ public function absoluteUrl(string $uri): string {
return $this->getDomain()->absoluteUrl($this->relativeUri($uri));
}
@@ -47,15 +44,14 @@ public function absoluteUrl($uri)
* @param string $uri Version relative uri
* @return string Domain relative uri
*/
- public function relativeUri($uri)
- {
- return \trim($this->version, '/') . '/' . \trim($uri, '/');
+ public function relativeUri(string $uri): string {
+ return \trim($this->version ?? '', '/') . '/' . \trim($uri, '/');
}
- public function request($method, $uri, $params = array(), $data = array(),
- $headers = array(), $username = null,
- $password = null, $timeout = null)
- {
+ public function request(string $method, string $uri,
+ array $params = [], array $data = [], array $headers = [],
+ string $username = null, string $password = null,
+ int $timeout = null): Response {
$uri = $this->relativeUri($uri);
return $this->getDomain()->request(
$method,
@@ -80,27 +76,28 @@ public function request($method, $uri, $params = array(), $data = array(),
* @param string $header Header for exception message
* @return TwilioException
*/
- protected function exception($response, $header)
- {
+ protected function exception(Response $response, string $header): TwilioException {
$message = '[HTTP ' . $response->getStatusCode() . '] ' . $header;
$content = $response->getContent();
if (\is_array($content)) {
$message .= isset($content['message']) ? ': ' . $content['message'] : '';
$code = isset($content['code']) ? $content['code'] : $response->getStatusCode();
- return new RestException($message, $code, $response->getStatusCode());
- } else {
- return new RestException($message, $response->getStatusCode(), $response->getStatusCode());
+ $moreInfo = $content['more_info'] ?? '';
+ $details = $content['details'] ?? [];
+ return new RestException($message, $code, $response->getStatusCode(), $moreInfo, $details);
}
+
+ return new RestException($message, $response->getStatusCode(), $response->getStatusCode());
}
/**
* @throws TwilioException
*/
- public function fetch($method, $uri, $params = array(), $data = array(),
- $headers = array(), $username = null,
- $password = null, $timeout = null)
- {
+ public function fetch(string $method, string $uri,
+ array $params = [], array $data = [], array $headers = [],
+ string $username = null, string $password = null,
+ int $timeout = null) {
$response = $this->request(
$method,
$uri,
@@ -112,7 +109,8 @@ public function fetch($method, $uri, $params = array(), $data = array(),
$timeout
);
- if ($response->getStatusCode() < 200 || $response->getStatusCode() >= 300) {
+ // 3XX response codes are allowed here to allow for 307 redirect from Deactivations API.
+ if ($response->getStatusCode() < 200 || $response->getStatusCode() >= 400) {
throw $this->exception($response, 'Unable to fetch record');
}
@@ -122,10 +120,10 @@ public function fetch($method, $uri, $params = array(), $data = array(),
/**
* @throws TwilioException
*/
- public function update($method, $uri, $params = array(), $data = array(),
- $headers = array(), $username = null,
- $password = null, $timeout = null)
- {
+ public function update(string $method, string $uri,
+ array $params = [], array $data = [], array $headers = [],
+ string $username = null, string $password = null,
+ int $timeout = null) {
$response = $this->request(
$method,
$uri,
@@ -147,10 +145,10 @@ public function update($method, $uri, $params = array(), $data = array(),
/**
* @throws TwilioException
*/
- public function delete($method, $uri, $params = array(), $data = array(),
- $headers = array(), $username = null,
- $password = null, $timeout = null)
- {
+ public function delete(string $method, string $uri,
+ array $params = [], array $data = [], array $headers = [],
+ string $username = null, string $password = null,
+ int $timeout = null): bool {
$response = $this->request(
$method,
$uri,
@@ -166,33 +164,27 @@ public function delete($method, $uri, $params = array(), $data = array(),
throw $this->exception($response, 'Unable to delete record');
}
- return $response->getStatusCode() == 204;
+ return $response->getStatusCode() === 204;
}
- public function readLimits($limit = null, $pageSize = null)
- {
- $pageLimit = Values::NONE;
-
- if ($limit) {
- if (\is_null($pageSize)) {
- $pageSize = \min($limit, self::MAX_PAGE_SIZE);
- }
- $pageLimit = (int)(\ceil($limit / (float)$pageSize));
+ public function readLimits(int $limit = null, int $pageSize = null): array {
+ if ($limit && $pageSize === null) {
+ $pageSize = $limit;
}
$pageSize = \min($pageSize, self::MAX_PAGE_SIZE);
- return array(
+ return [
'limit' => $limit ?: Values::NONE,
'pageSize' => $pageSize ?: Values::NONE,
- 'pageLimit' => $pageLimit,
- );
+ 'pageLimit' => Values::NONE,
+ ];
}
- public function page($method, $uri, $params = array(), $data = array(),
- $headers = array(), $username = null,
- $password = null, $timeout = null)
- {
+ public function page(string $method, string $uri,
+ array $params = [], array $data = [], array $headers = [],
+ string $username = null, string $password = null,
+ int $timeout = null): Response {
return $this->request(
$method,
$uri,
@@ -205,18 +197,17 @@ public function page($method, $uri, $params = array(), $data = array(),
);
}
- public function stream($page, $limit = null, $pageLimit = null)
- {
+ public function stream(Page $page, $limit = null, $pageLimit = null): Stream {
return new Stream($page, $limit, $pageLimit);
}
/**
* @throws TwilioException
*/
- public function create($method, $uri, $params = array(), $data = array(),
- $headers = array(), $username = null,
- $password = null, $timeout = null)
- {
+ public function create(string $method, string $uri,
+ array $params = [], array $data = [], array $headers = [],
+ string $username = null, string $password = null,
+ int $timeout = null) {
$response = $this->request(
$method,
$uri,
@@ -235,16 +226,11 @@ public function create($method, $uri, $params = array(), $data = array(),
return $response->getContent();
}
- /**
- * @return \Twilio\Domain $domain
- */
- public function getDomain()
- {
+ public function getDomain(): Domain {
return $this->domain;
}
- public function __toString()
- {
+ public function __toString(): string {
return '[Version]';
}
}
diff --git a/vendor/twilio/sdk/src/Twilio/VersionInfo.php b/vendor/twilio/sdk/src/Twilio/VersionInfo.php
index 20c8645..31d525f 100644
--- a/vendor/twilio/sdk/src/Twilio/VersionInfo.php
+++ b/vendor/twilio/sdk/src/Twilio/VersionInfo.php
@@ -4,14 +4,12 @@
namespace Twilio;
-class VersionInfo
-{
- const MAJOR = 5;
- const MINOR = 42;
- const PATCH = 2;
+class VersionInfo {
+ const MAJOR = "8";
+ const MINOR = "3";
+ const PATCH = "8";
- public static function string()
- {
+ public static function string() {
return implode('.', array(self::MAJOR, self::MINOR, self::PATCH));
}
}
diff --git a/vendor/twilio/sdk/src/Twilio/autoload.php b/vendor/twilio/sdk/src/Twilio/autoload.php
index cdb1173..015a615 100644
--- a/vendor/twilio/sdk/src/Twilio/autoload.php
+++ b/vendor/twilio/sdk/src/Twilio/autoload.php
@@ -35,8 +35,7 @@
* @author Kris Wallsmith
* @author Fabien Potencier
*/
-class SplClassLoader
-{
+class SplClassLoader {
private $_fileExtension = '.php';
private $_namespace;
private $_includePath;
@@ -49,8 +48,7 @@ class SplClassLoader
* @param string $ns The namespace to use.
* @param string $includePath The include path to search
*/
- public function __construct($ns = null, $includePath = null)
- {
+ public function __construct($ns = null, $includePath = null) {
$this->_namespace = $ns;
$this->_includePath = $includePath;
}
@@ -60,8 +58,7 @@ public function __construct($ns = null, $includePath = null)
*
* @param string $sep The separator to use.
*/
- public function setNamespaceSeparator($sep)
- {
+ public function setNamespaceSeparator($sep): void {
$this->_namespaceSeparator = $sep;
}
@@ -70,8 +67,7 @@ public function setNamespaceSeparator($sep)
*
* @return string The separator to use.
*/
- public function getNamespaceSeparator()
- {
+ public function getNamespaceSeparator(): string {
return $this->_namespaceSeparator;
}
@@ -80,8 +76,7 @@ public function getNamespaceSeparator()
*
* @param string $includePath
*/
- public function setIncludePath($includePath)
- {
+ public function setIncludePath($includePath): void {
$this->_includePath = $includePath;
}
@@ -90,8 +85,7 @@ public function setIncludePath($includePath)
*
* @return string $includePath
*/
- public function getIncludePath()
- {
+ public function getIncludePath(): string {
return $this->_includePath;
}
@@ -100,8 +94,7 @@ public function getIncludePath()
*
* @param string $fileExtension
*/
- public function setFileExtension($fileExtension)
- {
+ public function setFileExtension($fileExtension): void {
$this->_fileExtension = $fileExtension;
}
@@ -110,25 +103,22 @@ public function setFileExtension($fileExtension)
*
* @return string $fileExtension
*/
- public function getFileExtension()
- {
+ public function getFileExtension(): string {
return $this->_fileExtension;
}
/**
* Installs this class loader on the SPL autoload stack.
*/
- public function register()
- {
- \spl_autoload_register(array($this, 'loadClass'));
+ public function register(): void {
+ \spl_autoload_register([$this, 'loadClass']);
}
/**
* Uninstalls this class loader from the SPL autoloader stack.
*/
- public function unregister()
- {
- \spl_autoload_unregister(array($this, 'loadClass'));
+ public function unregister(): void {
+ \spl_autoload_unregister([$this, 'loadClass']);
}
/**
@@ -137,8 +127,7 @@ public function unregister()
* @param string $className The name of the class to load.
* @return void
*/
- public function loadClass($className)
- {
+ public function loadClass($className): void {
if (null === $this->_namespace || $this->_namespace . $this->_namespaceSeparator === \substr($className, 0, \strlen($this->_namespace . $this->_namespaceSeparator))) {
$fileName = '';
$namespace = '';