File manager - Edit - /home/opticamezl/www/newok/Twilio.zip
Back
PK zw�\�O��* * ListResource.phpnu &1i� <?php namespace Twilio; class ListResource { protected $version; protected $solution = array(); protected $uri; public function __construct(Version $version) { $this->version = $version; } public function __toString() { return '[ListResource]'; } }PK zw�\:�nt t Serialize.phpnu &1i� <?php namespace Twilio; class Serialize { private static function flatten($map, $result = array(), $previous = array()) { foreach ($map as $key => $value) { if (is_array($value)) { $result = self::flatten($value, $result, array_merge($previous, array($key))); } else { $result[join(".", array_merge($previous, array($key)))] = $value; } } return $result; } public static function prefixedCollapsibleMap($map, $prefix) { if (is_null($map) || $map == \Twilio\Values::NONE) { return array(); } $flattened = self::flatten($map); $result = array(); foreach ($flattened as $key => $value) { $result[$prefix . '.' . $key] = $value; } return $result; } public static function iso8601Date($dateTime) { if (is_null($dateTime) || $dateTime == \Twilio\Values::NONE) { return \Twilio\Values::NONE; } if (is_string($dateTime)) { return $dateTime; } $utcDate = clone $dateTime; $utcDate->setTimezone(new \DateTimeZone('UTC')); return $utcDate->format('Y-m-d'); } public static function iso8601DateTime($dateTime) { if (is_null($dateTime) || $dateTime == \Twilio\Values::NONE) { return \Twilio\Values::NONE; } if (is_string($dateTime)) { return $dateTime; } $utcDate = clone $dateTime; $utcDate->setTimezone(new \DateTimeZone('UTC')); return $utcDate->format('Y-m-d\TH:i:s\Z'); } public static function booleanToString($boolOrStr) { if (is_null($boolOrStr) || is_string($boolOrStr)) { return $boolOrStr; } return $boolOrStr ? 'True' : 'False'; } public static function json_object($object) { trigger_error("Serialize::json_object has been deprecated in favor of Serialize::jsonObject", E_USER_NOTICE); return Serialize::jsonObject($object); } public static function jsonObject($object) { if (is_array($object)) { return json_encode($object); } return $object; } public static function map($values, $map_func) { if (!is_array($values)) { return $values; } return array_map($map_func, $values); } } PK zw�\��e�� � Security/RequestValidator.phpnu &1i� <?php namespace Twilio\Security; class RequestValidator { protected $authToken; function __construct($authToken) { $this->authToken = $authToken; } public function computeSignature($url, $data = array()) { // 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"; // This function calculates the HMAC hash of the data with the key // passed in // Note: hash_hmac requires PHP 5 >= 5.1.2 or PECL hash:1.1-1.5 // Or http://pear.php.net/package/Crypt_HMAC/ return base64_encode(hash_hmac("sha1", $url, $this->authToken, true)); } public function validate($expectedSignature, $url, $data = array()) { return self::compare( $this->computeSignature($url, $data), $expectedSignature ); } /** * 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 * @return bool True if $a == $b, false otherwise. */ public static function compare($a, $b) { $result = true; if (strlen($a) != strlen($b)) { return false; } if (!$a && !$b) { return true; } $limit = strlen($a); for ($i = 0; $i < $limit; ++$i) { if ($a[$i] != $b[$i]) { $result = false; } } return $result; } } PK zw�\h���0 0 InstanceContext.phpnu &1i� <?php namespace Twilio; class InstanceContext { protected $version; protected $solution = array(); protected $uri; public function __construct(Version $version) { $this->version = $version; } public function __toString() { return '[InstanceContext]'; } }PK zw�\3�,t� � autoload.phpnu &1i� <?php /* * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This software consists of voluntary contributions made by many individuals * and is licensed under the MIT license. For more information, see * <http://www.doctrine-project.org>. */ /** * SplClassLoader implementation that implements the technical interoperability * standards for PHP 5.3 namespaces and class names. * * http://groups.google.com/group/php-standards/web/psr-0-final-proposal?pli=1 * * // Example which loads classes for the Doctrine Common package in the * // Doctrine\Common namespace. * $classLoader = new SplClassLoader('Doctrine\Common', '/path/to/doctrine'); * $classLoader->register(); * * @license http://www.opensource.org/licenses/mit-license.html MIT License * @author Jonathan H. Wage <jonwage@gmail.com> * @author Roman S. Borschel <roman@code-factory.org> * @author Matthew Weier O'Phinney <matthew@zend.com> * @author Kris Wallsmith <kris.wallsmith@gmail.com> * @author Fabien Potencier <fabien.potencier@symfony-project.org> */ class SplClassLoader { private $_fileExtension = '.php'; private $_namespace; private $_includePath; private $_namespaceSeparator = '\\'; /** * Creates a new <tt>SplClassLoader</tt> that loads classes of the * specified namespace. * * @param string $ns The namespace to use. * @param string $includePath The include path to search */ public function __construct($ns = null, $includePath = null) { $this->_namespace = $ns; $this->_includePath = $includePath; } /** * Sets the namespace separator used by classes in the namespace of this class loader. * * @param string $sep The separator to use. */ public function setNamespaceSeparator($sep) { $this->_namespaceSeparator = $sep; } /** * Gets the namespace separator used by classes in the namespace of this class loader. * * @return string The separator to use. */ public function getNamespaceSeparator() { return $this->_namespaceSeparator; } /** * Sets the base include path for all class files in the namespace of this class loader. * * @param string $includePath */ public function setIncludePath($includePath) { $this->_includePath = $includePath; } /** * Gets the base include path for all class files in the namespace of this class loader. * * @return string $includePath */ public function getIncludePath() { return $this->_includePath; } /** * Sets the file extension of class files in the namespace of this class loader. * * @param string $fileExtension */ public function setFileExtension($fileExtension) { $this->_fileExtension = $fileExtension; } /** * Gets the file extension of class files in the namespace of this class loader. * * @return string $fileExtension */ public function getFileExtension() { return $this->_fileExtension; } /** * Installs this class loader on the SPL autoload stack. */ public function register() { spl_autoload_register(array($this, 'loadClass')); } /** * Uninstalls this class loader from the SPL autoloader stack. */ public function unregister() { spl_autoload_unregister(array($this, 'loadClass')); } /** * Loads the given class or interface. * * @param string $className The name of the class to load. * @return void */ public function loadClass($className) { if (null === $this->_namespace || $this->_namespace . $this->_namespaceSeparator === substr($className, 0, strlen($this->_namespace . $this->_namespaceSeparator))) { $fileName = ''; $namespace = ''; if (false !== ($lastNsPos = strripos($className, $this->_namespaceSeparator))) { $namespace = substr($className, 0, $lastNsPos); $className = substr($className, $lastNsPos + 1); $fileName = str_replace($this->_namespaceSeparator, DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR; } $fileName .= str_replace('_', DIRECTORY_SEPARATOR, $className) . $this->_fileExtension; require ($this->_includePath !== null ? $this->_includePath . DIRECTORY_SEPARATOR : '') . $fileName; } } } $twilioClassLoader = new SplClassLoader('Twilio', realpath(__DIR__ . DIRECTORY_SEPARATOR . '..')); $twilioClassLoader->register();PK zw�\�6��4 4 TwiML/FaxResponse.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\TwiML; class FaxResponse extends TwiML { /** * FaxResponse constructor. */ public function __construct() { parent::__construct('Response'); } /** * Add Receive child. * * @param array $attributes Optional attributes * @return TwiML Child element. */ public function receive($attributes = array()) { return $this->nest(new Fax\Receive($attributes)); } }PK zw�\�G�� � TwiML/VoiceResponse.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\TwiML; class VoiceResponse extends TwiML { /** * VoiceResponse constructor. */ public function __construct() { parent::__construct('Response'); } /** * Add Dial child. * * @param string $number Phone number to dial * @param array $attributes Optional attributes * @return TwiML Child element. */ public function dial($number, $attributes = array()) { return $this->nest(new Voice\Dial($number, $attributes)); } /** * Add Echo child. * * @return TwiML Child element. */ public function echo_() { return $this->nest(new Voice\Echo_()); } /** * Add Enqueue child. * * @param string $name Friendly name * @param array $attributes Optional attributes * @return TwiML Child element. */ public function enqueue($name = null, $attributes = array()) { return $this->nest(new Voice\Enqueue($name, $attributes)); } /** * Add Gather child. * * @param array $attributes Optional attributes * @return TwiML Child element. */ public function gather($attributes = array()) { return $this->nest(new Voice\Gather($attributes)); } /** * Add Hangup child. * * @return TwiML Child element. */ public function hangup() { return $this->nest(new Voice\Hangup()); } /** * Add Leave child. * * @return TwiML Child element. */ public function leave() { return $this->nest(new Voice\Leave()); } /** * Add Pause child. * * @param array $attributes Optional attributes * @return TwiML Child element. */ public function pause($attributes = array()) { return $this->nest(new Voice\Pause($attributes)); } /** * Add Play child. * * @param url $url Media URL * @param array $attributes Optional attributes * @return TwiML Child element. */ public function play($url = null, $attributes = array()) { return $this->nest(new Voice\Play($url, $attributes)); } /** * Add Queue child. * * @param string $name Queue name * @param array $attributes Optional attributes * @return TwiML Child element. */ public function queue($name, $attributes = array()) { return $this->nest(new Voice\Queue($name, $attributes)); } /** * Add Record child. * * @param array $attributes Optional attributes * @return TwiML Child element. */ public function record($attributes = array()) { return $this->nest(new Voice\Record($attributes)); } /** * Add Redirect child. * * @param url $url Redirect URL * @param array $attributes Optional attributes * @return TwiML Child element. */ public function redirect($url, $attributes = array()) { return $this->nest(new Voice\Redirect($url, $attributes)); } /** * Add Reject child. * * @param array $attributes Optional attributes * @return TwiML Child element. */ public function reject($attributes = array()) { return $this->nest(new Voice\Reject($attributes)); } /** * Add Say child. * * @param string $message Message to say * @param array $attributes Optional attributes * @return TwiML Child element. */ public function say($message, $attributes = array()) { return $this->nest(new Voice\Say($message, $attributes)); } /** * Add Sms child. * * @param string $message Message body * @param array $attributes Optional attributes * @return TwiML Child element. */ public function sms($message, $attributes = array()) { return $this->nest(new Voice\Sms($message, $attributes)); } }PK zw�\5�D�� � TwiML/MessagingResponse.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\TwiML; class MessagingResponse extends TwiML { /** * MessagingResponse constructor. */ public function __construct() { parent::__construct('Response'); } /** * Add Message child. * * @param string $body Message Body * @param array $attributes Optional attributes * @return TwiML Child element. */ public function message($body, $attributes = array()) { return $this->nest(new Messaging\Message($body, $attributes)); } /** * Add Redirect child. * * @param url $url Redirect URL * @param array $attributes Optional attributes * @return TwiML Child element. */ public function redirect($url, $attributes = array()) { return $this->nest(new Messaging\Redirect($url, $attributes)); } }PK zw�\��)kW W TwiML/TwiML.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\TwiML; /** * @property $name string XML element name * @property $attributes array XML attributes * @property $value string XML body * @property $children TwiML[] nested TwiML elements */ abstract class TwiML { private $name; private $attributes; private $value; private $children; /** * TwiML constructor. * * @param string $name XML element name * @param string $value XML value * @param array $attributes XML attributes */ public function __construct($name, $value = null, $attributes = array()) { $this->name = $name; $this->value = $value; $this->attributes = $attributes; $this->children = array(); } /** * Add a TwiML element. * * @param TwiML $twiml TwiML element to add * @return TwiML $this */ public function append($twiml) { $this->children[] = $twiml; return $this; } /** * Add a TwiML element. * * @param TwiML $twiml TwiML element to add * @return TwiML added TwiML element */ public function nest($twiml) { $this->children[] = $twiml; return $twiml; } /** * Set TwiML attribute. * * @param string $key name of attribute * @param string $value value of attribute * @return TwiML $this */ public function setAttribute($key, $value) { return $this->attributes[$key] = $value; } /** * Convert TwiML to XML string. * * @return string TwiML XML representation */ public function asXML() { return $this->__toString(); } /** * Convert TwiML to XML string. * * @return string TwiML XML representation */ public function __toString() { return str_replace( '<?xml version="1.0"?>', '<?xml version="1.0" encoding="UTF-8"?>', $this->xml()->asXML() ); } /** * Build TwiML children. * * @param TwiML[] $children Children to build * @param \SimpleXMLElement $element Base XML element */ private function buildChildren($children, $element) { foreach ($children as $child) { $childElement = $element->addChild($child->name); self::buildElement($child, $childElement); self::buildChildren($child->children, $childElement); } } /** * Build TwiML element. * * @param TwiML $twiml TwiML element to build * @param \SimpleXMLElement $element Base XML element */ private function buildElement($twiml, $element) { if (is_string($twiml->value)) { $element[0] = $twiml->value; } foreach ($twiml->attributes as $name => $value) { if (is_bool($value)) { $value = ($value === true) ? 'true' : 'false'; } $element->addAttribute($name, $value); } } /** * Build XML element. * * @return \SimpleXMLElement Build TwiML element */ private function xml() { $element = new \SimpleXMLElement('<' . $this->name . '/>'); self::buildElement($this, $element); self::buildChildren($this->children, $element); return $element; } }PK zw�\�R�� � TwiML/Messaging/Message.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\TwiML\Messaging; use Twilio\TwiML\TwiML; class Message extends TwiML { /** * Message constructor. * * @param string $body Message Body * @param array $attributes Optional attributes */ public function __construct($body, $attributes = array()) { parent::__construct('Message', $body, $attributes); } /** * Add Body child. * * @param string $message Message Body * @return TwiML Child element. */ public function body($message) { return $this->nest(new Messaging\Body($message)); } /** * Add Media child. * * @param url $url Media URL * @return TwiML Child element. */ public function media($url) { return $this->nest(new Messaging\Media($url)); } /** * Add To attribute. * * @param phoneNumber $to Phone Number to send Message to * @return TwiML $this. */ public function setTo($to) { return $this->setAttribute('to', $to); } /** * Add From attribute. * * @param phoneNumber $from Phone Number to send Message from * @return TwiML $this. */ public function setFrom($from) { return $this->setAttribute('from', $from); } /** * Add Action attribute. * * @param url $action Action URL * @return TwiML $this. */ public function setAction($action) { return $this->setAttribute('action', $action); } /** * Add Method attribute. * * @param httpMethod $method Action URL Method * @return TwiML $this. */ public function setMethod($method) { return $this->setAttribute('method', $method); } /** * Add StatusCallback attribute. * * @param url $statusCallback Status callback URL. Deprecated in favor of * action. * @return TwiML $this. */ public function setStatusCallback($statusCallback) { return $this->setAttribute('statusCallback', $statusCallback); } }PK zw�\�f� � TwiML/Messaging/Redirect.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\TwiML\Messaging; use Twilio\TwiML\TwiML; class Redirect extends TwiML { /** * Redirect constructor. * * @param url $url Redirect URL * @param array $attributes Optional attributes */ public function __construct($url, $attributes = array()) { parent::__construct('Redirect', $url, $attributes); } /** * Add Method attribute. * * @param httpMethod $method Redirect URL method * @return TwiML $this. */ public function setMethod($method) { return $this->setAttribute('method', $method); } }PK zw�\���g� � TwiML/Messaging/Body.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\TwiML\Messaging; use Twilio\TwiML\TwiML; class Body extends TwiML { /** * Body constructor. * * @param string $message Message Body */ public function __construct($message) { parent::__construct('Body', $message); } }PK zw�\����{ { TwiML/Messaging/Media.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\TwiML\Messaging; use Twilio\TwiML\TwiML; class Media extends TwiML { /** * Media constructor. * * @param url $url Media URL */ public function __construct($url) { parent::__construct('Media', $url); } }PK zw�\�&� � TwiML/Voice/Queue.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\TwiML\Voice; use Twilio\TwiML\TwiML; class Queue extends TwiML { /** * Queue constructor. * * @param string $name Queue name * @param array $attributes Optional attributes */ public function __construct($name, $attributes = array()) { parent::__construct('Queue', $name, $attributes); } /** * Add Url attribute. * * @param url $url Action URL * @return TwiML $this. */ public function setUrl($url) { return $this->setAttribute('url', $url); } /** * Add Method attribute. * * @param httpMethod $method Action URL method * @return TwiML $this. */ public function setMethod($method) { return $this->setAttribute('method', $method); } /** * Add ReservationSid attribute. * * @param string $reservationSid TaskRouter Reservation SID * @return TwiML $this. */ public function setReservationSid($reservationSid) { return $this->setAttribute('reservationSid', $reservationSid); } /** * Add PostWorkActivitySid attribute. * * @param string $postWorkActivitySid TaskRouter Activity SID * @return TwiML $this. */ public function setPostWorkActivitySid($postWorkActivitySid) { return $this->setAttribute('postWorkActivitySid', $postWorkActivitySid); } }PK zw�\d���� � TwiML/Voice/Enqueue.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\TwiML\Voice; use Twilio\TwiML\TwiML; class Enqueue extends TwiML { /** * Enqueue constructor. * * @param string $name Friendly name * @param array $attributes Optional attributes */ public function __construct($name = null, $attributes = array()) { parent::__construct('Enqueue', $name, $attributes); } /** * Add Task child. * * @param string $body TaskRouter task attributes * @param array $attributes Optional attributes * @return TwiML Child element. */ public function task($body, $attributes = array()) { return $this->nest(new Voice\Task($body, $attributes)); } /** * Add Action attribute. * * @param url $action Action URL * @return TwiML $this. */ public function setAction($action) { return $this->setAttribute('action', $action); } /** * Add Method attribute. * * @param httpMethod $method Action URL method * @return TwiML $this. */ public function setMethod($method) { return $this->setAttribute('method', $method); } /** * Add WaitUrl attribute. * * @param url $waitUrl Wait URL * @return TwiML $this. */ public function setWaitUrl($waitUrl) { return $this->setAttribute('waitUrl', $waitUrl); } /** * Add WaitUrlMethod attribute. * * @param httpMethod $waitUrlMethod Wait URL method * @return TwiML $this. */ public function setWaitUrlMethod($waitUrlMethod) { return $this->setAttribute('waitUrlMethod', $waitUrlMethod); } /** * Add WorkflowSid attribute. * * @param string $workflowSid TaskRouter Workflow SID * @return TwiML $this. */ public function setWorkflowSid($workflowSid) { return $this->setAttribute('workflowSid', $workflowSid); } }PK zw�\�'�v v TwiML/Voice/Number.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\TwiML\Voice; use Twilio\TwiML\TwiML; class Number extends TwiML { /** * Number constructor. * * @param phoneNumber $phoneNumber Phone Number to dial * @param array $attributes Optional attributes */ public function __construct($phoneNumber, $attributes = array()) { parent::__construct('Number', $phoneNumber, $attributes); } /** * Add SendDigits attribute. * * @param string $sendDigits DTMF tones to play when the call is answered * @return TwiML $this. */ public function setSendDigits($sendDigits) { return $this->setAttribute('sendDigits', $sendDigits); } /** * Add Url attribute. * * @param url $url TwiML URL * @return TwiML $this. */ public function setUrl($url) { return $this->setAttribute('url', $url); } /** * Add Method attribute. * * @param httpMethod $method TwiML URL method * @return TwiML $this. */ public function setMethod($method) { return $this->setAttribute('method', $method); } /** * Add StatusCallbackEvent attribute. * * @param number:Enum:Event $statusCallbackEvent Events to call status callback * @return TwiML $this. */ public function setStatusCallbackEvent($statusCallbackEvent) { return $this->setAttribute('statusCallbackEvent', $statusCallbackEvent); } /** * Add StatusCallback attribute. * * @param url $statusCallback Status callback URL * @return TwiML $this. */ public function setStatusCallback($statusCallback) { return $this->setAttribute('statusCallback', $statusCallback); } /** * Add StatusCallbackMethod attribute. * * @param httpMethod $statusCallbackMethod Status callback URL method * @return TwiML $this. */ public function setStatusCallbackMethod($statusCallbackMethod) { return $this->setAttribute('statusCallbackMethod', $statusCallbackMethod); } }PK zw�\V�j� � TwiML/Voice/Play.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\TwiML\Voice; use Twilio\TwiML\TwiML; class Play extends TwiML { /** * Play constructor. * * @param url $url Media URL * @param array $attributes Optional attributes */ public function __construct($url = null, $attributes = array()) { parent::__construct('Play', $url, $attributes); } /** * Add Loop attribute. * * @param integer $loop Times to loop media * @return TwiML $this. */ public function setLoop($loop) { return $this->setAttribute('loop', $loop); } /** * Add Digits attribute. * * @param string $digits Play DTMF tones for digits * @return TwiML $this. */ public function setDigits($digits) { return $this->setAttribute('digits', $digits); } }PK zw�\K�T� TwiML/Voice/Sms.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\TwiML\Voice; use Twilio\TwiML\TwiML; class Sms extends TwiML { /** * Sms constructor. * * @param string $message Message body * @param array $attributes Optional attributes */ public function __construct($message, $attributes = array()) { parent::__construct('Sms', $message, $attributes); } /** * Add To attribute. * * @param phoneNumber $to Number to send message to * @return TwiML $this. */ public function setTo($to) { return $this->setAttribute('to', $to); } /** * Add From attribute. * * @param phoneNumber $from Number to send message from * @return TwiML $this. */ public function setFrom($from) { return $this->setAttribute('from', $from); } /** * Add Action attribute. * * @param url $action Action URL * @return TwiML $this. */ public function setAction($action) { return $this->setAttribute('action', $action); } /** * Add Method attribute. * * @param httpMethod $method Action URL method * @return TwiML $this. */ public function setMethod($method) { return $this->setAttribute('method', $method); } /** * Add StatusCallback attribute. * * @param url $statusCallback Status callback URL * @return TwiML $this. */ public function setStatusCallback($statusCallback) { return $this->setAttribute('statusCallback', $statusCallback); } }PK zw�\O!d�� � TwiML/Voice/Dial.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\TwiML\Voice; use Twilio\TwiML\TwiML; class Dial extends TwiML { /** * Dial constructor. * * @param string $number Phone number to dial * @param array $attributes Optional attributes */ public function __construct($number, $attributes = array()) { parent::__construct('Dial', $number, $attributes); } /** * Add Client child. * * @param string $name Client name * @param array $attributes Optional attributes * @return TwiML Child element. */ public function client($name, $attributes = array()) { return $this->nest(new Voice\Client($name, $attributes)); } /** * Add Conference child. * * @param string $name Conference name * @param array $attributes Optional attributes * @return TwiML Child element. */ public function conference($name, $attributes = array()) { return $this->nest(new Voice\Conference($name, $attributes)); } /** * Add Number child. * * @param phoneNumber $phoneNumber Phone Number to dial * @param array $attributes Optional attributes * @return TwiML Child element. */ public function number($phoneNumber, $attributes = array()) { return $this->nest(new Voice\Number($phoneNumber, $attributes)); } /** * Add Queue child. * * @param string $name Queue name * @param array $attributes Optional attributes * @return TwiML Child element. */ public function queue($name, $attributes = array()) { return $this->nest(new Voice\Queue($name, $attributes)); } /** * Add Sim child. * * @param sid $simSid SIM SID * @return TwiML Child element. */ public function sim($simSid) { return $this->nest(new Voice\Sim($simSid)); } /** * Add Sip child. * * @param url $sipUrl SIP URL * @param array $attributes Optional attributes * @return TwiML Child element. */ public function sip($sipUrl, $attributes = array()) { return $this->nest(new Voice\Sip($sipUrl, $attributes)); } /** * Add Action attribute. * * @param url $action Action URL * @return TwiML $this. */ public function setAction($action) { return $this->setAttribute('action', $action); } /** * Add Method attribute. * * @param httpMethod $method Action URL method * @return TwiML $this. */ public function setMethod($method) { return $this->setAttribute('method', $method); } /** * Add Timeout attribute. * * @param integer $timeout Time to wait for answer * @return TwiML $this. */ public function setTimeout($timeout) { return $this->setAttribute('timeout', $timeout); } /** * Add HangupOnStar attribute. * * @param boolean $hangupOnStar Hangup call on star press * @return TwiML $this. */ public function setHangupOnStar($hangupOnStar) { return $this->setAttribute('hangupOnStar', $hangupOnStar); } /** * Add TimeLimit attribute. * * @param integer $timeLimit Max time length * @return TwiML $this. */ public function setTimeLimit($timeLimit) { return $this->setAttribute('timeLimit', $timeLimit); } /** * Add CallerId attribute. * * @param string $callerId Caller ID to display * @return TwiML $this. */ public function setCallerId($callerId) { return $this->setAttribute('callerId', $callerId); } /** * Add Record attribute. * * @param dial:Enum:Record $record Record the call * @return TwiML $this. */ public function setRecord($record) { return $this->setAttribute('record', $record); } /** * Add Trim attribute. * * @param dial:Enum:Trim $trim Trim the recording * @return TwiML $this. */ public function setTrim($trim) { return $this->setAttribute('trim', $trim); } /** * Add RecordingStatusCallback attribute. * * @param url $recordingStatusCallback Recording status callback URL * @return TwiML $this. */ public function setRecordingStatusCallback($recordingStatusCallback) { return $this->setAttribute('recordingStatusCallback', $recordingStatusCallback); } /** * Add RecordingStatusCallbackMethod attribute. * * @param httpMethod $recordingStatusCallbackMethod Recording status callback * URL method * @return TwiML $this. */ public function setRecordingStatusCallbackMethod($recordingStatusCallbackMethod) { return $this->setAttribute('recordingStatusCallbackMethod', $recordingStatusCallbackMethod); } /** * Add RecordingStatusCallbackEvent attribute. * * @param dial:Enum:RecordingEvent $recordingStatusCallbackEvent Recording * status * callback events * @return TwiML $this. */ public function setRecordingStatusCallbackEvent($recordingStatusCallbackEvent) { return $this->setAttribute('recordingStatusCallbackEvent', $recordingStatusCallbackEvent); } /** * Add AnswerOnBridge attribute. * * @param boolean $answerOnBridge Preserve the ringing behavior of the inbound * call until the Dialed call picks up * @return TwiML $this. */ public function setAnswerOnBridge($answerOnBridge) { return $this->setAttribute('answerOnBridge', $answerOnBridge); } /** * Add RingTone attribute. * * @param dial:Enum:RingTone $ringTone Ringtone allows you to override the * ringback tone that Twilio will play back * to the caller while executing the Dial * @return TwiML $this. */ public function setRingTone($ringTone) { return $this->setAttribute('ringTone', $ringTone); } }PK zw�\yA(j j TwiML/Voice/Gather.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\TwiML\Voice; use Twilio\TwiML\TwiML; class Gather extends TwiML { /** * Gather constructor. * * @param array $attributes Optional attributes */ public function __construct($attributes = array()) { parent::__construct('Gather', $attributes); } /** * Add Say child. * * @param string $message Message to say * @param array $attributes Optional attributes * @return TwiML Child element. */ public function say($message, $attributes = array()) { return $this->nest(new Voice\Say($message, $attributes)); } /** * Add Pause child. * * @param array $attributes Optional attributes * @return TwiML Child element. */ public function pause($attributes = array()) { return $this->nest(new Voice\Pause($attributes)); } /** * Add Play child. * * @param url $url Media URL * @param array $attributes Optional attributes * @return TwiML Child element. */ public function play($url = null, $attributes = array()) { return $this->nest(new Voice\Play($url, $attributes)); } /** * Add Input attribute. * * @param gather:Enum:Input $input Input type Twilio should accept * @return TwiML $this. */ public function setInput($input) { return $this->setAttribute('input', $input); } /** * Add Action attribute. * * @param url $action Action URL * @return TwiML $this. */ public function setAction($action) { return $this->setAttribute('action', $action); } /** * Add Method attribute. * * @param httpMethod $method Action URL method * @return TwiML $this. */ public function setMethod($method) { return $this->setAttribute('method', $method); } /** * Add Timeout attribute. * * @param integer $timeout Time to wait to gather input * @return TwiML $this. */ public function setTimeout($timeout) { return $this->setAttribute('timeout', $timeout); } /** * Add SpeechTimeout attribute. * * @param string $speechTimeout Time to wait to gather speech input and it * should be either auto or a positive integer. * @return TwiML $this. */ public function setSpeechTimeout($speechTimeout) { return $this->setAttribute('speechTimeout', $speechTimeout); } /** * Add MaxSpeechTime attribute. * * @param integer $maxSpeechTime Max allowed time for speech input * @return TwiML $this. */ public function setMaxSpeechTime($maxSpeechTime) { return $this->setAttribute('maxSpeechTime', $maxSpeechTime); } /** * Add ProfanityFilter attribute. * * @param boolean $profanityFilter Profanity Filter on speech * @return TwiML $this. */ public function setProfanityFilter($profanityFilter) { return $this->setAttribute('profanityFilter', $profanityFilter); } /** * Add FinishOnKey attribute. * * @param string $finishOnKey Finish gather on key * @return TwiML $this. */ public function setFinishOnKey($finishOnKey) { return $this->setAttribute('finishOnKey', $finishOnKey); } /** * Add NumDigits attribute. * * @param integer $numDigits Number of digits to collect * @return TwiML $this. */ public function setNumDigits($numDigits) { return $this->setAttribute('numDigits', $numDigits); } /** * Add PartialResultCallback attribute. * * @param url $partialResultCallback Partial result callback URL * @return TwiML $this. */ public function setPartialResultCallback($partialResultCallback) { return $this->setAttribute('partialResultCallback', $partialResultCallback); } /** * Add PartialResultCallbackMethod attribute. * * @param httpMethod $partialResultCallbackMethod Partial result callback URL * method * @return TwiML $this. */ public function setPartialResultCallbackMethod($partialResultCallbackMethod) { return $this->setAttribute('partialResultCallbackMethod', $partialResultCallbackMethod); } /** * Add Language attribute. * * @param gather:Enum:Language $language Language to use * @return TwiML $this. */ public function setLanguage($language) { return $this->setAttribute('language', $language); } /** * Add Hints attribute. * * @param string $hints Speech recognition hints * @return TwiML $this. */ public function setHints($hints) { return $this->setAttribute('hints', $hints); } /** * Add BargeIn attribute. * * @param boolean $bargeIn Stop playing media upon speech * @return TwiML $this. */ public function setBargeIn($bargeIn) { return $this->setAttribute('bargeIn', $bargeIn); } }PK zw�\� ��J J TwiML/Voice/Record.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\TwiML\Voice; use Twilio\TwiML\TwiML; class Record extends TwiML { /** * Record constructor. * * @param array $attributes Optional attributes */ public function __construct($attributes = array()) { parent::__construct('Record', $attributes); } /** * Add Action attribute. * * @param url $action Action URL * @return TwiML $this. */ public function setAction($action) { return $this->setAttribute('action', $action); } /** * Add Method attribute. * * @param httpMethod $method Action URL method * @return TwiML $this. */ public function setMethod($method) { return $this->setAttribute('method', $method); } /** * Add Timeout attribute. * * @param integer $timeout Timeout to begin recording * @return TwiML $this. */ public function setTimeout($timeout) { return $this->setAttribute('timeout', $timeout); } /** * Add FinishOnKey attribute. * * @param string $finishOnKey Finish recording on key * @return TwiML $this. */ public function setFinishOnKey($finishOnKey) { return $this->setAttribute('finishOnKey', $finishOnKey); } /** * Add MaxLength attribute. * * @param integer $maxLength Max time to record in seconds * @return TwiML $this. */ public function setMaxLength($maxLength) { return $this->setAttribute('maxLength', $maxLength); } /** * Add PlayBeep attribute. * * @param boolean $playBeep Play beep * @return TwiML $this. */ public function setPlayBeep($playBeep) { return $this->setAttribute('playBeep', $playBeep); } /** * Add Trim attribute. * * @param record:Enum:Trim $trim Trim the recording * @return TwiML $this. */ public function setTrim($trim) { return $this->setAttribute('trim', $trim); } /** * Add RecordingStatusCallback attribute. * * @param url $recordingStatusCallback Status callback URL * @return TwiML $this. */ public function setRecordingStatusCallback($recordingStatusCallback) { return $this->setAttribute('recordingStatusCallback', $recordingStatusCallback); } /** * Add RecordingStatusCallbackMethod attribute. * * @param httpMethod $recordingStatusCallbackMethod Status callback URL method * @return TwiML $this. */ public function setRecordingStatusCallbackMethod($recordingStatusCallbackMethod) { return $this->setAttribute('recordingStatusCallbackMethod', $recordingStatusCallbackMethod); } /** * Add Transcribe attribute. * * @param boolean $transcribe Transcribe the recording * @return TwiML $this. */ public function setTranscribe($transcribe) { return $this->setAttribute('transcribe', $transcribe); } /** * Add TranscribeCallback attribute. * * @param url $transcribeCallback Transcribe callback URL * @return TwiML $this. */ public function setTranscribeCallback($transcribeCallback) { return $this->setAttribute('transcribeCallback', $transcribeCallback); } }PK zw�\�4��� � TwiML/Voice/Reject.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\TwiML\Voice; use Twilio\TwiML\TwiML; class Reject extends TwiML { /** * Reject constructor. * * @param array $attributes Optional attributes */ public function __construct($attributes = array()) { parent::__construct('Reject', $attributes); } /** * Add Reason attribute. * * @param reject:Enum:Reason $reason Rejection reason * @return TwiML $this. */ public function setReason($reason) { return $this->setAttribute('reason', $reason); } }PK zw�\�H]'x x TwiML/Voice/Sim.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\TwiML\Voice; use Twilio\TwiML\TwiML; class Sim extends TwiML { /** * Sim constructor. * * @param sid $simSid SIM SID */ public function __construct($simSid) { parent::__construct('Sim', $simSid); } }PK zw�\��1�� � TwiML/Voice/Redirect.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\TwiML\Voice; use Twilio\TwiML\TwiML; class Redirect extends TwiML { /** * Redirect constructor. * * @param url $url Redirect URL * @param array $attributes Optional attributes */ public function __construct($url, $attributes = array()) { parent::__construct('Redirect', $url, $attributes); } /** * Add Method attribute. * * @param httpMethod $method Redirect URL method * @return TwiML $this. */ public function setMethod($method) { return $this->setAttribute('method', $method); } }PK zw�\�|� � TwiML/Voice/Conference.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\TwiML\Voice; use Twilio\TwiML\TwiML; class Conference extends TwiML { /** * Conference constructor. * * @param string $name Conference name * @param array $attributes Optional attributes */ public function __construct($name, $attributes = array()) { parent::__construct('Conference', $name, $attributes); } /** * Add Muted attribute. * * @param boolean $muted Join the conference muted * @return TwiML $this. */ public function setMuted($muted) { return $this->setAttribute('muted', $muted); } /** * Add Beep attribute. * * @param conference:Enum:Beep $beep Play beep when joining * @return TwiML $this. */ public function setBeep($beep) { return $this->setAttribute('beep', $beep); } /** * Add StartConferenceOnEnter attribute. * * @param boolean $startConferenceOnEnter Start the conference on enter * @return TwiML $this. */ public function setStartConferenceOnEnter($startConferenceOnEnter) { return $this->setAttribute('startConferenceOnEnter', $startConferenceOnEnter); } /** * Add EndConferenceOnExit attribute. * * @param boolean $endConferenceOnExit End the conferenceon exit * @return TwiML $this. */ public function setEndConferenceOnExit($endConferenceOnExit) { return $this->setAttribute('endConferenceOnExit', $endConferenceOnExit); } /** * Add WaitUrl attribute. * * @param url $waitUrl Wait URL * @return TwiML $this. */ public function setWaitUrl($waitUrl) { return $this->setAttribute('waitUrl', $waitUrl); } /** * Add WaitMethod attribute. * * @param httpMethod $waitMethod Wait URL method * @return TwiML $this. */ public function setWaitMethod($waitMethod) { return $this->setAttribute('waitMethod', $waitMethod); } /** * Add MaxParticipants attribute. * * @param integer $maxParticipants Maximum number of participants * @return TwiML $this. */ public function setMaxParticipants($maxParticipants) { return $this->setAttribute('maxParticipants', $maxParticipants); } /** * Add Record attribute. * * @param conference:Enum:Record $record Record the conference * @return TwiML $this. */ public function setRecord($record) { return $this->setAttribute('record', $record); } /** * Add Region attribute. * * @param conference:Enum:Region $region Conference region * @return TwiML $this. */ public function setRegion($region) { return $this->setAttribute('region', $region); } /** * Add Whisper attribute. * * @param sid $whisper Call whisper * @return TwiML $this. */ public function setWhisper($whisper) { return $this->setAttribute('whisper', $whisper); } /** * Add Trim attribute. * * @param conference:Enum:Trim $trim Trim the conference recording * @return TwiML $this. */ public function setTrim($trim) { return $this->setAttribute('trim', $trim); } /** * Add StatusCallbackEvent attribute. * * @param conference:Enum:Event $statusCallbackEvent Events to call status * callback URL * @return TwiML $this. */ public function setStatusCallbackEvent($statusCallbackEvent) { return $this->setAttribute('statusCallbackEvent', $statusCallbackEvent); } /** * Add StatusCallback attribute. * * @param url $statusCallback Status callback URL * @return TwiML $this. */ public function setStatusCallback($statusCallback) { return $this->setAttribute('statusCallback', $statusCallback); } /** * Add StatusCallbackMethod attribute. * * @param httpMethod $statusCallbackMethod Status callback URL method * @return TwiML $this. */ public function setStatusCallbackMethod($statusCallbackMethod) { return $this->setAttribute('statusCallbackMethod', $statusCallbackMethod); } /** * Add RecordingStatusCallback attribute. * * @param url $recordingStatusCallback Recording status callback URL * @return TwiML $this. */ public function setRecordingStatusCallback($recordingStatusCallback) { return $this->setAttribute('recordingStatusCallback', $recordingStatusCallback); } /** * Add RecordingStatusCallbackMethod attribute. * * @param httpMethod $recordingStatusCallbackMethod Recording status callback * URL method * @return TwiML $this. */ public function setRecordingStatusCallbackMethod($recordingStatusCallbackMethod) { return $this->setAttribute('recordingStatusCallbackMethod', $recordingStatusCallbackMethod); } /** * Add RecordingStatusCallbackEvent attribute. * * @param conference:Enum:RecordingEvent $recordingStatusCallbackEvent Recording status callback events * @return TwiML $this. */ public function setRecordingStatusCallbackEvent($recordingStatusCallbackEvent) { return $this->setAttribute('recordingStatusCallbackEvent', $recordingStatusCallbackEvent); } /** * Add EventCallbackUrl attribute. * * @param url $eventCallbackUrl Event callback URL * @return TwiML $this. */ public function setEventCallbackUrl($eventCallbackUrl) { return $this->setAttribute('eventCallbackUrl', $eventCallbackUrl); } }PK zw�\2#�s s TwiML/Voice/Client.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\TwiML\Voice; use Twilio\TwiML\TwiML; class Client extends TwiML { /** * Client constructor. * * @param string $name Client name * @param array $attributes Optional attributes */ public function __construct($name, $attributes = array()) { parent::__construct('Client', $name, $attributes); } /** * Add Url attribute. * * @param url $url Client URL * @return TwiML $this. */ public function setUrl($url) { return $this->setAttribute('url', $url); } /** * Add Method attribute. * * @param httpMethod $method Client URL Method * @return TwiML $this. */ public function setMethod($method) { return $this->setAttribute('method', $method); } /** * Add StatusCallbackEvent attribute. * * @param client:Enum:Event $statusCallbackEvent Events to trigger status * callback * @return TwiML $this. */ public function setStatusCallbackEvent($statusCallbackEvent) { return $this->setAttribute('statusCallbackEvent', $statusCallbackEvent); } /** * Add StatusCallback attribute. * * @param url $statusCallback Status Callback URL * @return TwiML $this. */ public function setStatusCallback($statusCallback) { return $this->setAttribute('statusCallback', $statusCallback); } /** * Add StatusCallbackMethod attribute. * * @param httpMethod $statusCallbackMethod Status Callback URL Method * @return TwiML $this. */ public function setStatusCallbackMethod($statusCallbackMethod) { return $this->setAttribute('statusCallbackMethod', $statusCallbackMethod); } }PK zw�\�QA( TwiML/Voice/Sip.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\TwiML\Voice; use Twilio\TwiML\TwiML; class Sip extends TwiML { /** * Sip constructor. * * @param url $sipUrl SIP URL * @param array $attributes Optional attributes */ public function __construct($sipUrl, $attributes = array()) { parent::__construct('Sip', $sipUrl, $attributes); } /** * Add Username attribute. * * @param string $username SIP Username * @return TwiML $this. */ public function setUsername($username) { return $this->setAttribute('username', $username); } /** * Add Password attribute. * * @param string $password SIP Password * @return TwiML $this. */ public function setPassword($password) { return $this->setAttribute('password', $password); } /** * Add Url attribute. * * @param url $url Action URL * @return TwiML $this. */ public function setUrl($url) { return $this->setAttribute('url', $url); } /** * Add Method attribute. * * @param httpMethod $method Action URL method * @return TwiML $this. */ public function setMethod($method) { return $this->setAttribute('method', $method); } /** * Add StatusCallbackEvent attribute. * * @param sip:Enum:Event $statusCallbackEvent Status callback events * @return TwiML $this. */ public function setStatusCallbackEvent($statusCallbackEvent) { return $this->setAttribute('statusCallbackEvent', $statusCallbackEvent); } /** * Add StatusCallback attribute. * * @param url $statusCallback Status callback URL * @return TwiML $this. */ public function setStatusCallback($statusCallback) { return $this->setAttribute('statusCallback', $statusCallback); } /** * Add StatusCallbackMethod attribute. * * @param httpMethod $statusCallbackMethod Status callback URL method * @return TwiML $this. */ public function setStatusCallbackMethod($statusCallbackMethod) { return $this->setAttribute('statusCallbackMethod', $statusCallbackMethod); } }PK zw�\D˖�G G TwiML/Voice/Hangup.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\TwiML\Voice; use Twilio\TwiML\TwiML; class Hangup extends TwiML { /** * Hangup constructor. */ public function __construct() { parent::__construct('Hangup'); } }PK zw�\�Q�@� � TwiML/Voice/Pause.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\TwiML\Voice; use Twilio\TwiML\TwiML; class Pause extends TwiML { /** * Pause constructor. * * @param array $attributes Optional attributes */ public function __construct($attributes = array()) { parent::__construct('Pause', $attributes); } /** * Add Length attribute. * * @param integer $length Length in seconds to pause * @return TwiML $this. */ public function setLength($length) { return $this->setAttribute('length', $length); } }PK zw�\�̞ � TwiML/Voice/Say.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\TwiML\Voice; use Twilio\TwiML\TwiML; class Say extends TwiML { /** * Say constructor. * * @param string $message Message to say * @param array $attributes Optional attributes */ public function __construct($message, $attributes = array()) { parent::__construct('Say', $message, $attributes); } /** * Add Voice attribute. * * @param say:Enum:Voice $voice Voice to use * @return TwiML $this. */ public function setVoice($voice) { return $this->setAttribute('voice', $voice); } /** * Add Loop attribute. * * @param integer $loop Times to loop message * @return TwiML $this. */ public function setLoop($loop) { return $this->setAttribute('loop', $loop); } /** * Add Language attribute. * * @param say:Enum:Language $language Message langauge * @return TwiML $this. */ public function setLanguage($language) { return $this->setAttribute('language', $language); } }PK zw�\��D D TwiML/Voice/Leave.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\TwiML\Voice; use Twilio\TwiML\TwiML; class Leave extends TwiML { /** * Leave constructor. */ public function __construct() { parent::__construct('Leave'); } }PK zw�\+(� � TwiML/Voice/Task.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\TwiML\Voice; use Twilio\TwiML\TwiML; class Task extends TwiML { /** * Task constructor. * * @param string $body TaskRouter task attributes * @param array $attributes Optional attributes */ public function __construct($body, $attributes = array()) { parent::__construct('Task', $body, $attributes); } /** * Add Priority attribute. * * @param integer $priority Task priority * @return TwiML $this. */ public function setPriority($priority) { return $this->setAttribute('priority', $priority); } /** * Add Timeout attribute. * * @param integer $timeout Timeout associated with task * @return TwiML $this. */ public function setTimeout($timeout) { return $this->setAttribute('timeout', $timeout); } }PK zw�\"��B B TwiML/Voice/Echo.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\TwiML\Voice; use Twilio\TwiML\TwiML; class Echo_ extends TwiML { /** * Echo constructor. */ public function __construct() { parent::__construct('Echo'); } }PK zw�\�ve�~ ~ TwiML/Fax/Receive.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\TwiML\Fax; use Twilio\TwiML\TwiML; class Receive extends TwiML { /** * Receive constructor. * * @param array $attributes Optional attributes */ public function __construct($attributes = array()) { parent::__construct('Receive', $attributes); } /** * Add Action attribute. * * @param url $action Receive action URL * @return TwiML $this. */ public function setAction($action) { return $this->setAttribute('action', $action); } /** * Add Method attribute. * * @param httpMethod $method Receive action URL method * @return TwiML $this. */ public function setMethod($method) { return $this->setAttribute('method', $method); } }PK zw�\l�j6 6 Rest/Messaging/V1.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Messaging; use Twilio\Domain; use Twilio\Exceptions\TwilioException; use Twilio\Rest\Messaging\V1\ServiceList; use Twilio\Version; /** * @property \Twilio\Rest\Messaging\V1\ServiceList services * @method \Twilio\Rest\Messaging\V1\ServiceContext services(string $sid) */ class V1 extends Version { protected $_services = null; /** * Construct the V1 version of Messaging * * @param \Twilio\Domain $domain Domain that contains the version * @return \Twilio\Rest\Messaging\V1 V1 version of Messaging */ public function __construct(Domain $domain) { parent::__construct($domain); $this->version = 'v1'; } /** * @return \Twilio\Rest\Messaging\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 \Twilio\Exceptions\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 \Twilio\Exceptions\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.Messaging.V1]'; } }PK zw�\ɳ��F F ! Rest/Messaging/V1/ServicePage.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Messaging\V1; use Twilio\Page; /** * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution. */ class ServicePage extends Page { public function __construct($version, $response, $solution) { parent::__construct($version, $response); // Path Solution $this->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.Messaging.V1.ServicePage]'; } }PK zw�\R�1A. . ! Rest/Messaging/V1/ServiceList.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Messaging\V1; use Twilio\ListResource; use Twilio\Options; use Twilio\Serialize; 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\Messaging\V1\ServiceList */ public function __construct(Version $version) { parent::__construct($version); // Path Solution $this->solution = array(); $this->uri = '/Services'; } /** * Create a new ServiceInstance * * @param string $friendlyName The friendly_name * @param array|Options $options Optional Arguments * @return ServiceInstance Newly created ServiceInstance */ public function create($friendlyName, $options = array()) { $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 ); 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 The sid * @return \Twilio\Rest\Messaging\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.Messaging.V1.ServiceList]'; } }PK zw�\��[�< < % Rest/Messaging/V1/ServiceInstance.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Messaging\V1; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Options; 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 friendlyName * @property \DateTime dateCreated * @property \DateTime dateUpdated * @property string inboundRequestUrl * @property string inboundMethod * @property string fallbackUrl * @property string fallbackMethod * @property string statusCallback * @property boolean stickySender * @property boolean mmsConverter * @property boolean smartEncoding * @property string scanMessageContent * @property boolean fallbackToLongCode * @property boolean areaCodeGeomatch * @property boolean synchronousValidation * @property integer validityPeriod * @property string url * @property array links */ class ServiceInstance extends InstanceResource { protected $_phoneNumbers = null; protected $_shortCodes = null; protected $_alphaSenders = null; /** * Initialize the ServiceInstance * * @param \Twilio\Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $sid The sid * @return \Twilio\Rest\Messaging\V1\ServiceInstance */ public function __construct(Version $version, array $payload, $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = array( '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')), 'inboundRequestUrl' => Values::array_get($payload, 'inbound_request_url'), 'inboundMethod' => Values::array_get($payload, 'inbound_method'), 'fallbackUrl' => Values::array_get($payload, 'fallback_url'), 'fallbackMethod' => Values::array_get($payload, 'fallback_method'), 'statusCallback' => Values::array_get($payload, 'status_callback'), 'stickySender' => Values::array_get($payload, 'sticky_sender'), 'mmsConverter' => Values::array_get($payload, 'mms_converter'), 'smartEncoding' => Values::array_get($payload, 'smart_encoding'), 'scanMessageContent' => Values::array_get($payload, 'scan_message_content'), 'fallbackToLongCode' => Values::array_get($payload, 'fallback_to_long_code'), 'areaCodeGeomatch' => Values::array_get($payload, 'area_code_geomatch'), 'synchronousValidation' => Values::array_get($payload, 'synchronous_validation'), 'validityPeriod' => Values::array_get($payload, 'validity_period'), '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\ServiceContext Context for this * ServiceInstance */ protected function proxy() { if (!$this->context) { $this->context = new ServiceContext($this->version, $this->solution['sid']); } return $this->context; } /** * Update the ServiceInstance * * @param array|Options $options Optional Arguments * @return ServiceInstance Updated ServiceInstance */ public function update($options = array()) { return $this->proxy()->update($options); } /** * Fetch a ServiceInstance * * @return ServiceInstance Fetched ServiceInstance */ public function fetch() { return $this->proxy()->fetch(); } /** * Deletes the ServiceInstance * * @return boolean True if delete succeeds, false otherwise */ public function delete() { return $this->proxy()->delete(); } /** * Access the phoneNumbers * * @return \Twilio\Rest\Messaging\V1\Service\PhoneNumberList */ protected function getPhoneNumbers() { return $this->proxy()->phoneNumbers; } /** * Access the shortCodes * * @return \Twilio\Rest\Messaging\V1\Service\ShortCodeList */ protected function getShortCodes() { return $this->proxy()->shortCodes; } /** * Access the alphaSenders * * @return \Twilio\Rest\Messaging\V1\Service\AlphaSenderList */ protected function getAlphaSenders() { return $this->proxy()->alphaSenders; } /** * 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.ServiceInstance ' . implode(' ', $context) . ']'; } }PK zw�\$����A �A $ Rest/Messaging/V1/ServiceOptions.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Messaging\V1; use Twilio\Options; use Twilio\Values; /** * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution. */ abstract class ServiceOptions { /** * @param string $inboundRequestUrl The inbound_request_url * @param string $inboundMethod The inbound_method * @param string $fallbackUrl The fallback_url * @param string $fallbackMethod The fallback_method * @param string $statusCallback The status_callback * @param boolean $stickySender The sticky_sender * @param boolean $mmsConverter The mms_converter * @param boolean $smartEncoding The smart_encoding * @param string $scanMessageContent The scan_message_content * @param boolean $fallbackToLongCode The fallback_to_long_code * @param boolean $areaCodeGeomatch The area_code_geomatch * @param integer $validityPeriod The validity_period * @param boolean $synchronousValidation The synchronous_validation * @return CreateServiceOptions Options builder */ public static function create($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) { return new CreateServiceOptions($inboundRequestUrl, $inboundMethod, $fallbackUrl, $fallbackMethod, $statusCallback, $stickySender, $mmsConverter, $smartEncoding, $scanMessageContent, $fallbackToLongCode, $areaCodeGeomatch, $validityPeriod, $synchronousValidation); } /** * @param string $friendlyName The friendly_name * @param string $inboundRequestUrl The inbound_request_url * @param string $inboundMethod The inbound_method * @param string $fallbackUrl The fallback_url * @param string $fallbackMethod The fallback_method * @param string $statusCallback The status_callback * @param boolean $stickySender The sticky_sender * @param boolean $mmsConverter The mms_converter * @param boolean $smartEncoding The smart_encoding * @param string $scanMessageContent The scan_message_content * @param boolean $fallbackToLongCode The fallback_to_long_code * @param boolean $areaCodeGeomatch The area_code_geomatch * @param integer $validityPeriod The validity_period * @param boolean $synchronousValidation The synchronous_validation * @return UpdateServiceOptions Options builder */ public static function update($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) { return new UpdateServiceOptions($friendlyName, $inboundRequestUrl, $inboundMethod, $fallbackUrl, $fallbackMethod, $statusCallback, $stickySender, $mmsConverter, $smartEncoding, $scanMessageContent, $fallbackToLongCode, $areaCodeGeomatch, $validityPeriod, $synchronousValidation); } } class CreateServiceOptions extends Options { /** * @param string $inboundRequestUrl The inbound_request_url * @param string $inboundMethod The inbound_method * @param string $fallbackUrl The fallback_url * @param string $fallbackMethod The fallback_method * @param string $statusCallback The status_callback * @param boolean $stickySender The sticky_sender * @param boolean $mmsConverter The mms_converter * @param boolean $smartEncoding The smart_encoding * @param string $scanMessageContent The scan_message_content * @param boolean $fallbackToLongCode The fallback_to_long_code * @param boolean $areaCodeGeomatch The area_code_geomatch * @param integer $validityPeriod The validity_period * @param boolean $synchronousValidation The synchronous_validation */ public function __construct($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) { $this->options['inboundRequestUrl'] = $inboundRequestUrl; $this->options['inboundMethod'] = $inboundMethod; $this->options['fallbackUrl'] = $fallbackUrl; $this->options['fallbackMethod'] = $fallbackMethod; $this->options['statusCallback'] = $statusCallback; $this->options['stickySender'] = $stickySender; $this->options['mmsConverter'] = $mmsConverter; $this->options['smartEncoding'] = $smartEncoding; $this->options['scanMessageContent'] = $scanMessageContent; $this->options['fallbackToLongCode'] = $fallbackToLongCode; $this->options['areaCodeGeomatch'] = $areaCodeGeomatch; $this->options['validityPeriod'] = $validityPeriod; $this->options['synchronousValidation'] = $synchronousValidation; } /** * The inbound_request_url * * @param string $inboundRequestUrl The inbound_request_url * @return $this Fluent Builder */ public function setInboundRequestUrl($inboundRequestUrl) { $this->options['inboundRequestUrl'] = $inboundRequestUrl; return $this; } /** * The inbound_method * * @param string $inboundMethod The inbound_method * @return $this Fluent Builder */ public function setInboundMethod($inboundMethod) { $this->options['inboundMethod'] = $inboundMethod; return $this; } /** * The fallback_url * * @param string $fallbackUrl The fallback_url * @return $this Fluent Builder */ public function setFallbackUrl($fallbackUrl) { $this->options['fallbackUrl'] = $fallbackUrl; return $this; } /** * The fallback_method * * @param string $fallbackMethod The fallback_method * @return $this Fluent Builder */ public function setFallbackMethod($fallbackMethod) { $this->options['fallbackMethod'] = $fallbackMethod; return $this; } /** * The status_callback * * @param string $statusCallback The status_callback * @return $this Fluent Builder */ public function setStatusCallback($statusCallback) { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The sticky_sender * * @param boolean $stickySender The sticky_sender * @return $this Fluent Builder */ public function setStickySender($stickySender) { $this->options['stickySender'] = $stickySender; return $this; } /** * The mms_converter * * @param boolean $mmsConverter The mms_converter * @return $this Fluent Builder */ public function setMmsConverter($mmsConverter) { $this->options['mmsConverter'] = $mmsConverter; return $this; } /** * The smart_encoding * * @param boolean $smartEncoding The smart_encoding * @return $this Fluent Builder */ public function setSmartEncoding($smartEncoding) { $this->options['smartEncoding'] = $smartEncoding; return $this; } /** * The scan_message_content * * @param string $scanMessageContent The scan_message_content * @return $this Fluent Builder */ public function setScanMessageContent($scanMessageContent) { $this->options['scanMessageContent'] = $scanMessageContent; return $this; } /** * The fallback_to_long_code * * @param boolean $fallbackToLongCode The fallback_to_long_code * @return $this Fluent Builder */ public function setFallbackToLongCode($fallbackToLongCode) { $this->options['fallbackToLongCode'] = $fallbackToLongCode; return $this; } /** * The area_code_geomatch * * @param boolean $areaCodeGeomatch The area_code_geomatch * @return $this Fluent Builder */ public function setAreaCodeGeomatch($areaCodeGeomatch) { $this->options['areaCodeGeomatch'] = $areaCodeGeomatch; return $this; } /** * The validity_period * * @param integer $validityPeriod The validity_period * @return $this Fluent Builder */ public function setValidityPeriod($validityPeriod) { $this->options['validityPeriod'] = $validityPeriod; return $this; } /** * The synchronous_validation * * @param boolean $synchronousValidation The synchronous_validation * @return $this Fluent Builder */ public function setSynchronousValidation($synchronousValidation) { $this->options['synchronousValidation'] = $synchronousValidation; 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.CreateServiceOptions ' . implode(' ', $options) . ']'; } } class UpdateServiceOptions extends Options { /** * @param string $friendlyName The friendly_name * @param string $inboundRequestUrl The inbound_request_url * @param string $inboundMethod The inbound_method * @param string $fallbackUrl The fallback_url * @param string $fallbackMethod The fallback_method * @param string $statusCallback The status_callback * @param boolean $stickySender The sticky_sender * @param boolean $mmsConverter The mms_converter * @param boolean $smartEncoding The smart_encoding * @param string $scanMessageContent The scan_message_content * @param boolean $fallbackToLongCode The fallback_to_long_code * @param boolean $areaCodeGeomatch The area_code_geomatch * @param integer $validityPeriod The validity_period * @param boolean $synchronousValidation The synchronous_validation */ 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) { $this->options['friendlyName'] = $friendlyName; $this->options['inboundRequestUrl'] = $inboundRequestUrl; $this->options['inboundMethod'] = $inboundMethod; $this->options['fallbackUrl'] = $fallbackUrl; $this->options['fallbackMethod'] = $fallbackMethod; $this->options['statusCallback'] = $statusCallback; $this->options['stickySender'] = $stickySender; $this->options['mmsConverter'] = $mmsConverter; $this->options['smartEncoding'] = $smartEncoding; $this->options['scanMessageContent'] = $scanMessageContent; $this->options['fallbackToLongCode'] = $fallbackToLongCode; $this->options['areaCodeGeomatch'] = $areaCodeGeomatch; $this->options['validityPeriod'] = $validityPeriod; $this->options['synchronousValidation'] = $synchronousValidation; } /** * The friendly_name * * @param string $friendlyName The friendly_name * @return $this Fluent Builder */ public function setFriendlyName($friendlyName) { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The inbound_request_url * * @param string $inboundRequestUrl The inbound_request_url * @return $this Fluent Builder */ public function setInboundRequestUrl($inboundRequestUrl) { $this->options['inboundRequestUrl'] = $inboundRequestUrl; return $this; } /** * The inbound_method * * @param string $inboundMethod The inbound_method * @return $this Fluent Builder */ public function setInboundMethod($inboundMethod) { $this->options['inboundMethod'] = $inboundMethod; return $this; } /** * The fallback_url * * @param string $fallbackUrl The fallback_url * @return $this Fluent Builder */ public function setFallbackUrl($fallbackUrl) { $this->options['fallbackUrl'] = $fallbackUrl; return $this; } /** * The fallback_method * * @param string $fallbackMethod The fallback_method * @return $this Fluent Builder */ public function setFallbackMethod($fallbackMethod) { $this->options['fallbackMethod'] = $fallbackMethod; return $this; } /** * The status_callback * * @param string $statusCallback The status_callback * @return $this Fluent Builder */ public function setStatusCallback($statusCallback) { $this->options['statusCallback'] = $statusCallback; return $this; } /** * The sticky_sender * * @param boolean $stickySender The sticky_sender * @return $this Fluent Builder */ public function setStickySender($stickySender) { $this->options['stickySender'] = $stickySender; return $this; } /** * The mms_converter * * @param boolean $mmsConverter The mms_converter * @return $this Fluent Builder */ public function setMmsConverter($mmsConverter) { $this->options['mmsConverter'] = $mmsConverter; return $this; } /** * The smart_encoding * * @param boolean $smartEncoding The smart_encoding * @return $this Fluent Builder */ public function setSmartEncoding($smartEncoding) { $this->options['smartEncoding'] = $smartEncoding; return $this; } /** * The scan_message_content * * @param string $scanMessageContent The scan_message_content * @return $this Fluent Builder */ public function setScanMessageContent($scanMessageContent) { $this->options['scanMessageContent'] = $scanMessageContent; return $this; } /** * The fallback_to_long_code * * @param boolean $fallbackToLongCode The fallback_to_long_code * @return $this Fluent Builder */ public function setFallbackToLongCode($fallbackToLongCode) { $this->options['fallbackToLongCode'] = $fallbackToLongCode; return $this; } /** * The area_code_geomatch * * @param boolean $areaCodeGeomatch The area_code_geomatch * @return $this Fluent Builder */ public function setAreaCodeGeomatch($areaCodeGeomatch) { $this->options['areaCodeGeomatch'] = $areaCodeGeomatch; return $this; } /** * The validity_period * * @param integer $validityPeriod The validity_period * @return $this Fluent Builder */ public function setValidityPeriod($validityPeriod) { $this->options['validityPeriod'] = $validityPeriod; return $this; } /** * The synchronous_validation * * @param boolean $synchronousValidation The synchronous_validation * @return $this Fluent Builder */ public function setSynchronousValidation($synchronousValidation) { $this->options['synchronousValidation'] = $synchronousValidation; 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.UpdateServiceOptions ' . implode(' ', $options) . ']'; } }PK zw�\(zv� $ Rest/Messaging/V1/ServiceContext.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Messaging\V1; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\Options; use Twilio\Rest\Messaging\V1\Service\AlphaSenderList; use Twilio\Rest\Messaging\V1\Service\PhoneNumberList; use Twilio\Rest\Messaging\V1\Service\ShortCodeList; use Twilio\Serialize; use Twilio\Values; use Twilio\Version; /** * 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) * @method \Twilio\Rest\Messaging\V1\Service\ShortCodeContext shortCodes(string $sid) * @method \Twilio\Rest\Messaging\V1\Service\AlphaSenderContext alphaSenders(string $sid) */ class ServiceContext extends InstanceContext { protected $_phoneNumbers = null; protected $_shortCodes = null; protected $_alphaSenders = null; /** * Initialize the ServiceContext * * @param \Twilio\Version $version Version that contains the resource * @param string $sid The sid * @return \Twilio\Rest\Messaging\V1\ServiceContext */ public function __construct(Version $version, $sid) { parent::__construct($version); // Path Solution $this->solution = array('sid' => $sid, ); $this->uri = '/Services/' . rawurlencode($sid) . ''; } /** * Update the ServiceInstance * * @param array|Options $options Optional Arguments * @return ServiceInstance Updated ServiceInstance */ public function update($options = array()) { $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']); } /** * Fetch a ServiceInstance * * @return ServiceInstance Fetched ServiceInstance */ public function fetch() { $params = Values::of(array()); $payload = $this->version->fetch( 'GET', $this->uri, $params ); return new ServiceInstance($this->version, $payload, $this->solution['sid']); } /** * Deletes the ServiceInstance * * @return boolean True if delete succeeds, false otherwise */ public function delete() { return $this->version->delete('delete', $this->uri); } /** * Access the phoneNumbers * * @return \Twilio\Rest\Messaging\V1\Service\PhoneNumberList */ protected function getPhoneNumbers() { if (!$this->_phoneNumbers) { $this->_phoneNumbers = new PhoneNumberList($this->version, $this->solution['sid']); } return $this->_phoneNumbers; } /** * Access the shortCodes * * @return \Twilio\Rest\Messaging\V1\Service\ShortCodeList */ protected function getShortCodes() { if (!$this->_shortCodes) { $this->_shortCodes = new ShortCodeList($this->version, $this->solution['sid']); } return $this->_shortCodes; } /** * Access the alphaSenders * * @return \Twilio\Rest\Messaging\V1\Service\AlphaSenderList */ protected function getAlphaSenders() { if (!$this->_alphaSenders) { $this->_alphaSenders = new AlphaSenderList($this->version, $this->solution['sid']); } return $this->_alphaSenders; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return \Twilio\ListResource The requested subresource * @throws \Twilio\Exceptions\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 \Twilio\Exceptions\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.ServiceContext ' . implode(' ', $context) . ']'; } }PK zw�\ z�� � - Rest/Messaging/V1/Service/PhoneNumberList.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Messaging\V1\Service; use Twilio\ListResource; 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 service_sid * @return \Twilio\Rest\Messaging\V1\Service\PhoneNumberList */ public function __construct(Version $version, $serviceSid) { parent::__construct($version); // Path Solution $this->solution = array('serviceSid' => $serviceSid, ); $this->uri = '/Services/' . rawurlencode($serviceSid) . '/PhoneNumbers'; } /** * Create a new PhoneNumberInstance * * @param string $phoneNumberSid The phone_number_sid * @return PhoneNumberInstance Newly created PhoneNumberInstance */ public function create($phoneNumberSid) { $data = Values::of(array('PhoneNumberSid' => $phoneNumberSid, )); $payload = $this->version->create( 'POST', $this->uri, array(), $data ); return new PhoneNumberInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Streams PhoneNumberInstance 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 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 * * @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 */ 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 PhoneNumberPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of PhoneNumberInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return \Twilio\Page Page of PhoneNumberInstance */ public function getPage($targetUrl) { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new PhoneNumberPage($this->version, $response, $this->solution); } /** * Constructs a PhoneNumberContext * * @param string $sid The sid * @return \Twilio\Rest\Messaging\V1\Service\PhoneNumberContext */ public function getContext($sid) { return new PhoneNumberContext($this->version, $this->solution['serviceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString() { return '[Twilio.Messaging.V1.PhoneNumberList]'; } }PK zw�\%H�s s + Rest/Messaging/V1/Service/ShortCodePage.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Messaging\V1\Service; use Twilio\Page; /** * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution. */ class ShortCodePage extends Page { public function __construct($version, $response, $solution) { parent::__construct($version, $response); // Path Solution $this->solution = $solution; } public function buildInstance(array $payload) { return new ShortCodeInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString() { return '[Twilio.Messaging.V1.ShortCodePage]'; } }PK zw�\`��H H 0 Rest/Messaging/V1/Service/AlphaSenderContext.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Messaging\V1\Service; use Twilio\InstanceContext; use Twilio\Values; use Twilio\Version; /** * 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 service_sid * @param string $sid The sid * @return \Twilio\Rest\Messaging\V1\Service\AlphaSenderContext */ public function __construct(Version $version, $serviceSid, $sid) { parent::__construct($version); // Path Solution $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid, ); $this->uri = '/Services/' . rawurlencode($serviceSid) . '/AlphaSenders/' . rawurlencode($sid) . ''; } /** * Fetch a AlphaSenderInstance * * @return AlphaSenderInstance Fetched AlphaSenderInstance */ public function fetch() { $params = Values::of(array()); $payload = $this->version->fetch( 'GET', $this->uri, $params ); return new AlphaSenderInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Deletes the AlphaSenderInstance * * @return boolean True if delete succeeds, false otherwise */ 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.AlphaSenderContext ' . implode(' ', $context) . ']'; } }PK zw�\P�Sw� � + Rest/Messaging/V1/Service/ShortCodeList.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Messaging\V1\Service; use Twilio\ListResource; 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 service_sid * @return \Twilio\Rest\Messaging\V1\Service\ShortCodeList */ public function __construct(Version $version, $serviceSid) { parent::__construct($version); // Path Solution $this->solution = array('serviceSid' => $serviceSid, ); $this->uri = '/Services/' . rawurlencode($serviceSid) . '/ShortCodes'; } /** * Create a new ShortCodeInstance * * @param string $shortCodeSid The short_code_sid * @return ShortCodeInstance Newly created ShortCodeInstance */ public function create($shortCodeSid) { $data = Values::of(array('ShortCodeSid' => $shortCodeSid, )); $payload = $this->version->create( 'POST', $this->uri, array(), $data ); return new ShortCodeInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Streams ShortCodeInstance 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 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 * * @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 */ 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 ShortCodePage($this->version, $response, $this->solution); } /** * Retrieve a specific page of ShortCodeInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return \Twilio\Page Page of ShortCodeInstance */ public function getPage($targetUrl) { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new ShortCodePage($this->version, $response, $this->solution); } /** * Constructs a ShortCodeContext * * @param string $sid The sid * @return \Twilio\Rest\Messaging\V1\Service\ShortCodeContext */ public function getContext($sid) { return new ShortCodeContext($this->version, $this->solution['serviceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString() { return '[Twilio.Messaging.V1.ShortCodeList]'; } }PK zw�\7W8� � / Rest/Messaging/V1/Service/ShortCodeInstance.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Messaging\V1\Service; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; 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 serviceSid * @property \DateTime dateCreated * @property \DateTime dateUpdated * @property string shortCode * @property string countryCode * @property array capabilities * @property string url */ class ShortCodeInstance extends InstanceResource { /** * Initialize the ShortCodeInstance * * @param \Twilio\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\Messaging\V1\Service\ShortCodeInstance */ public function __construct(Version $version, array $payload, $serviceSid, $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = array( 'sid' => Values::array_get($payload, 'sid'), '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')), 'shortCode' => Values::array_get($payload, 'short_code'), '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'], ); } /** * Generate an 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 */ protected function proxy() { if (!$this->context) { $this->context = new ShortCodeContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->context; } /** * Deletes the ShortCodeInstance * * @return boolean True if delete succeeds, false otherwise */ public function delete() { return $this->proxy()->delete(); } /** * Fetch a ShortCodeInstance * * @return ShortCodeInstance Fetched ShortCodeInstance */ 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.Messaging.V1.ShortCodeInstance ' . implode(' ', $context) . ']'; } }PK zw�\>|��y y - Rest/Messaging/V1/Service/PhoneNumberPage.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Messaging\V1\Service; use Twilio\Page; /** * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution. */ class PhoneNumberPage extends Page { public function __construct($version, $response, $solution) { parent::__construct($version, $response); // Path Solution $this->solution = $solution; } public function buildInstance(array $payload) { return new PhoneNumberInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString() { return '[Twilio.Messaging.V1.PhoneNumberPage]'; } }PK zw�\���T T 1 Rest/Messaging/V1/Service/PhoneNumberInstance.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Messaging\V1\Service; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; 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 serviceSid * @property \DateTime dateCreated * @property \DateTime dateUpdated * @property string phoneNumber * @property string countryCode * @property string capabilities * @property string url */ class PhoneNumberInstance extends InstanceResource { /** * Initialize the PhoneNumberInstance * * @param \Twilio\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\Messaging\V1\Service\PhoneNumberInstance */ public function __construct(Version $version, array $payload, $serviceSid, $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = array( 'sid' => Values::array_get($payload, 'sid'), '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')), 'phoneNumber' => Values::array_get($payload, 'phone_number'), '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'], ); } /** * Generate an 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 */ protected function proxy() { if (!$this->context) { $this->context = new PhoneNumberContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->context; } /** * Deletes the PhoneNumberInstance * * @return boolean True if delete succeeds, false otherwise */ public function delete() { return $this->proxy()->delete(); } /** * Fetch a PhoneNumberInstance * * @return PhoneNumberInstance Fetched PhoneNumberInstance */ 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.Messaging.V1.PhoneNumberInstance ' . implode(' ', $context) . ']'; } }PK zw�\"�e~� � 1 Rest/Messaging/V1/Service/AlphaSenderInstance.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Messaging\V1\Service; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; 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 serviceSid * @property \DateTime dateCreated * @property \DateTime dateUpdated * @property string alphaSender * @property array capabilities * @property string url */ class AlphaSenderInstance extends InstanceResource { /** * Initialize the AlphaSenderInstance * * @param \Twilio\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\Messaging\V1\Service\AlphaSenderInstance */ public function __construct(Version $version, array $payload, $serviceSid, $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = array( 'sid' => Values::array_get($payload, 'sid'), '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')), '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'], ); } /** * Generate an 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 */ protected function proxy() { if (!$this->context) { $this->context = new AlphaSenderContext( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->context; } /** * Fetch a AlphaSenderInstance * * @return AlphaSenderInstance Fetched AlphaSenderInstance */ public function fetch() { return $this->proxy()->fetch(); } /** * Deletes the AlphaSenderInstance * * @return boolean True if delete succeeds, false otherwise */ 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.AlphaSenderInstance ' . implode(' ', $context) . ']'; } }PK zw�\g֭�� � - Rest/Messaging/V1/Service/AlphaSenderList.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Messaging\V1\Service; use Twilio\ListResource; 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 service_sid * @return \Twilio\Rest\Messaging\V1\Service\AlphaSenderList */ public function __construct(Version $version, $serviceSid) { parent::__construct($version); // Path Solution $this->solution = array('serviceSid' => $serviceSid, ); $this->uri = '/Services/' . rawurlencode($serviceSid) . '/AlphaSenders'; } /** * Create a new AlphaSenderInstance * * @param string $alphaSender The alpha_sender * @return AlphaSenderInstance Newly created AlphaSenderInstance */ public function create($alphaSender) { $data = Values::of(array('AlphaSender' => $alphaSender, )); $payload = $this->version->create( 'POST', $this->uri, array(), $data ); return new AlphaSenderInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Streams AlphaSenderInstance 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 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 * * @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 */ 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 AlphaSenderPage($this->version, $response, $this->solution); } /** * Retrieve a specific page of AlphaSenderInstance records from the API. * Request is executed immediately * * @param string $targetUrl API-generated URL for the requested results page * @return \Twilio\Page Page of AlphaSenderInstance */ public function getPage($targetUrl) { $response = $this->version->getDomain()->getClient()->request( 'GET', $targetUrl ); return new AlphaSenderPage($this->version, $response, $this->solution); } /** * Constructs a AlphaSenderContext * * @param string $sid The sid * @return \Twilio\Rest\Messaging\V1\Service\AlphaSenderContext */ public function getContext($sid) { return new AlphaSenderContext($this->version, $this->solution['serviceSid'], $sid); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString() { return '[Twilio.Messaging.V1.AlphaSenderList]'; } }PK zw�\�y&14 4 . Rest/Messaging/V1/Service/ShortCodeContext.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Messaging\V1\Service; use Twilio\InstanceContext; use Twilio\Values; use Twilio\Version; /** * 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 service_sid * @param string $sid The sid * @return \Twilio\Rest\Messaging\V1\Service\ShortCodeContext */ public function __construct(Version $version, $serviceSid, $sid) { parent::__construct($version); // Path Solution $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid, ); $this->uri = '/Services/' . rawurlencode($serviceSid) . '/ShortCodes/' . rawurlencode($sid) . ''; } /** * Deletes the ShortCodeInstance * * @return boolean True if delete succeeds, false otherwise */ public function delete() { return $this->version->delete('delete', $this->uri); } /** * Fetch a ShortCodeInstance * * @return ShortCodeInstance Fetched ShortCodeInstance */ public function fetch() { $params = Values::of(array()); $payload = $this->version->fetch( 'GET', $this->uri, $params ); return new ShortCodeInstance( $this->version, $payload, $this->solution['serviceSid'], $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.Messaging.V1.ShortCodeContext ' . implode(' ', $context) . ']'; } }PK zw�\!,xjy y - Rest/Messaging/V1/Service/AlphaSenderPage.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Messaging\V1\Service; use Twilio\Page; /** * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution. */ class AlphaSenderPage extends Page { public function __construct($version, $response, $solution) { parent::__construct($version, $response); // Path Solution $this->solution = $solution; } public function buildInstance(array $payload) { return new AlphaSenderInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString() { return '[Twilio.Messaging.V1.AlphaSenderPage]'; } }PK zw�\~�H H 0 Rest/Messaging/V1/Service/PhoneNumberContext.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Messaging\V1\Service; use Twilio\InstanceContext; use Twilio\Values; use Twilio\Version; /** * 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 service_sid * @param string $sid The sid * @return \Twilio\Rest\Messaging\V1\Service\PhoneNumberContext */ public function __construct(Version $version, $serviceSid, $sid) { parent::__construct($version); // Path Solution $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid, ); $this->uri = '/Services/' . rawurlencode($serviceSid) . '/PhoneNumbers/' . rawurlencode($sid) . ''; } /** * Deletes the PhoneNumberInstance * * @return boolean True if delete succeeds, false otherwise */ public function delete() { return $this->version->delete('delete', $this->uri); } /** * Fetch a PhoneNumberInstance * * @return PhoneNumberInstance Fetched PhoneNumberInstance */ public function fetch() { $params = Values::of(array()); $payload = $this->version->fetch( 'GET', $this->uri, $params ); return new PhoneNumberInstance( $this->version, $payload, $this->solution['serviceSid'], $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.Messaging.V1.PhoneNumberContext ' . implode(' ', $context) . ']'; } }PK zw�\��O Rest/Sync/V1.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Sync; use Twilio\Domain; use Twilio\Exceptions\TwilioException; use Twilio\Rest\Sync\V1\ServiceList; use Twilio\Version; /** * @property \Twilio\Rest\Sync\V1\ServiceList services * @method \Twilio\Rest\Sync\V1\ServiceContext services(string $sid) */ class V1 extends Version { protected $_services = null; /** * Construct the V1 version of Sync * * @param \Twilio\Domain $domain Domain that contains the version * @return \Twilio\Rest\Sync\V1 V1 version of Sync */ public function __construct(Domain $domain) { parent::__construct($domain); $this->version = 'v1'; } /** * @return \Twilio\Rest\Sync\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 \Twilio\Exceptions\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 \Twilio\Exceptions\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.Sync.V1]'; } }PK zw�\I�K< < Rest/Sync/V1/ServicePage.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Sync\V1; use Twilio\Page; /** * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution. */ class ServicePage extends Page { public function __construct($version, $response, $solution) { parent::__construct($version, $response); // Path Solution $this->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.Sync.V1.ServicePage]'; } }PK zw�\LN�z z Rest/Sync/V1/ServiceInstance.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Sync\V1; use Twilio\Deserialize; use Twilio\Exceptions\TwilioException; use Twilio\InstanceResource; use Twilio\Options; 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 uniqueName * @property string accountSid * @property string friendlyName * @property \DateTime dateCreated * @property \DateTime dateUpdated * @property string url * @property string webhookUrl * @property boolean reachabilityWebhooksEnabled * @property boolean aclEnabled * @property array links */ class ServiceInstance extends InstanceResource { protected $_documents = null; protected $_syncLists = null; protected $_syncMaps = null; protected $_syncStreams = null; /** * Initialize the ServiceInstance * * @param \Twilio\Version $version Version that contains the resource * @param mixed[] $payload The response payload * @param string $sid The sid * @return \Twilio\Rest\Sync\V1\ServiceInstance */ public function __construct(Version $version, array $payload, $sid = null) { parent::__construct($version); // Marshaled Properties $this->properties = array( 'sid' => Values::array_get($payload, 'sid'), 'uniqueName' => Values::array_get($payload, 'unique_name'), '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'), 'webhookUrl' => Values::array_get($payload, 'webhook_url'), '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'], ); } /** * Generate an 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 */ protected function proxy() { if (!$this->context) { $this->context = new ServiceContext($this->version, $this->solution['sid']); } return $this->context; } /** * Fetch a ServiceInstance * * @return ServiceInstance Fetched ServiceInstance */ public function fetch() { return $this->proxy()->fetch(); } /** * Deletes the ServiceInstance * * @return boolean True if delete succeeds, false otherwise */ public function delete() { return $this->proxy()->delete(); } /** * Update the ServiceInstance * * @param array|Options $options Optional Arguments * @return ServiceInstance Updated ServiceInstance */ public function update($options = array()) { return $this->proxy()->update($options); } /** * Access the documents * * @return \Twilio\Rest\Sync\V1\Service\DocumentList */ protected function getDocuments() { return $this->proxy()->documents; } /** * Access the syncLists * * @return \Twilio\Rest\Sync\V1\Service\SyncListList */ protected function getSyncLists() { return $this->proxy()->syncLists; } /** * Access the syncMaps * * @return \Twilio\Rest\Sync\V1\Service\SyncMapList */ protected function getSyncMaps() { return $this->proxy()->syncMaps; } /** * Access the syncStreams * * @return \Twilio\Rest\Sync\V1\Service\SyncStreamList */ protected function getSyncStreams() { return $this->proxy()->syncStreams; } /** * 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.Sync.V1.ServiceInstance ' . implode(' ', $context) . ']'; } }PK zw�\�50� Rest/Sync/V1/ServiceList.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Sync\V1; use Twilio\ListResource; use Twilio\Options; use Twilio\Serialize; 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\Sync\V1\ServiceList */ public function __construct(Version $version) { parent::__construct($version); // Path Solution $this->solution = array(); $this->uri = '/Services'; } /** * Create a new ServiceInstance * * @param array|Options $options Optional Arguments * @return ServiceInstance Newly created ServiceInstance */ public function create($options = array()) { $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 ); 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 The sid * @return \Twilio\Rest\Sync\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.Sync.V1.ServiceList]'; } }PK zw�\&��8 8 Rest/Sync/V1/ServiceOptions.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Sync\V1; use Twilio\Options; use Twilio\Values; /** * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution. */ abstract class ServiceOptions { /** * @param string $friendlyName The friendly_name * @param string $webhookUrl The webhook_url * @param boolean $reachabilityWebhooksEnabled The reachability_webhooks_enabled * @param boolean $aclEnabled The acl_enabled * @return CreateServiceOptions Options builder */ public static function create($friendlyName = Values::NONE, $webhookUrl = Values::NONE, $reachabilityWebhooksEnabled = Values::NONE, $aclEnabled = Values::NONE) { return new CreateServiceOptions($friendlyName, $webhookUrl, $reachabilityWebhooksEnabled, $aclEnabled); } /** * @param string $webhookUrl The webhook_url * @param string $friendlyName The friendly_name * @param boolean $reachabilityWebhooksEnabled The reachability_webhooks_enabled * @param boolean $aclEnabled The acl_enabled * @return UpdateServiceOptions Options builder */ public static function update($webhookUrl = Values::NONE, $friendlyName = Values::NONE, $reachabilityWebhooksEnabled = Values::NONE, $aclEnabled = Values::NONE) { return new UpdateServiceOptions($webhookUrl, $friendlyName, $reachabilityWebhooksEnabled, $aclEnabled); } } class CreateServiceOptions extends Options { /** * @param string $friendlyName The friendly_name * @param string $webhookUrl The webhook_url * @param boolean $reachabilityWebhooksEnabled The reachability_webhooks_enabled * @param boolean $aclEnabled The acl_enabled */ public function __construct($friendlyName = Values::NONE, $webhookUrl = Values::NONE, $reachabilityWebhooksEnabled = Values::NONE, $aclEnabled = Values::NONE) { $this->options['friendlyName'] = $friendlyName; $this->options['webhookUrl'] = $webhookUrl; $this->options['reachabilityWebhooksEnabled'] = $reachabilityWebhooksEnabled; $this->options['aclEnabled'] = $aclEnabled; } /** * The friendly_name * * @param string $friendlyName The friendly_name * @return $this Fluent Builder */ public function setFriendlyName($friendlyName) { $this->options['friendlyName'] = $friendlyName; 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 reachability_webhooks_enabled * * @param boolean $reachabilityWebhooksEnabled The reachability_webhooks_enabled * @return $this Fluent Builder */ public function setReachabilityWebhooksEnabled($reachabilityWebhooksEnabled) { $this->options['reachabilityWebhooksEnabled'] = $reachabilityWebhooksEnabled; return $this; } /** * The acl_enabled * * @param boolean $aclEnabled The acl_enabled * @return $this Fluent Builder */ public function setAclEnabled($aclEnabled) { $this->options['aclEnabled'] = $aclEnabled; 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.Sync.V1.CreateServiceOptions ' . implode(' ', $options) . ']'; } } class UpdateServiceOptions extends Options { /** * @param string $webhookUrl The webhook_url * @param string $friendlyName The friendly_name * @param boolean $reachabilityWebhooksEnabled The reachability_webhooks_enabled * @param boolean $aclEnabled The acl_enabled */ public function __construct($webhookUrl = Values::NONE, $friendlyName = Values::NONE, $reachabilityWebhooksEnabled = Values::NONE, $aclEnabled = Values::NONE) { $this->options['webhookUrl'] = $webhookUrl; $this->options['friendlyName'] = $friendlyName; $this->options['reachabilityWebhooksEnabled'] = $reachabilityWebhooksEnabled; $this->options['aclEnabled'] = $aclEnabled; } /** * The webhook_url * * @param string $webhookUrl The webhook_url * @return $this Fluent Builder */ public function setWebhookUrl($webhookUrl) { $this->options['webhookUrl'] = $webhookUrl; return $this; } /** * The friendly_name * * @param string $friendlyName The friendly_name * @return $this Fluent Builder */ public function setFriendlyName($friendlyName) { $this->options['friendlyName'] = $friendlyName; return $this; } /** * The reachability_webhooks_enabled * * @param boolean $reachabilityWebhooksEnabled The reachability_webhooks_enabled * @return $this Fluent Builder */ public function setReachabilityWebhooksEnabled($reachabilityWebhooksEnabled) { $this->options['reachabilityWebhooksEnabled'] = $reachabilityWebhooksEnabled; return $this; } /** * The acl_enabled * * @param boolean $aclEnabled The acl_enabled * @return $this Fluent Builder */ public function setAclEnabled($aclEnabled) { $this->options['aclEnabled'] = $aclEnabled; 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.Sync.V1.UpdateServiceOptions ' . implode(' ', $options) . ']'; } }PK zw�\bA�� � Rest/Sync/V1/ServiceContext.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Sync\V1; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; 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; /** * 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) * @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) */ class ServiceContext extends InstanceContext { protected $_documents = null; protected $_syncLists = null; protected $_syncMaps = null; protected $_syncStreams = null; /** * Initialize the ServiceContext * * @param \Twilio\Version $version Version that contains the resource * @param string $sid The sid * @return \Twilio\Rest\Sync\V1\ServiceContext */ public function __construct(Version $version, $sid) { parent::__construct($version); // Path Solution $this->solution = array('sid' => $sid, ); $this->uri = '/Services/' . rawurlencode($sid) . ''; } /** * Fetch a ServiceInstance * * @return ServiceInstance Fetched ServiceInstance */ public function fetch() { $params = Values::of(array()); $payload = $this->version->fetch( 'GET', $this->uri, $params ); return new ServiceInstance($this->version, $payload, $this->solution['sid']); } /** * Deletes the ServiceInstance * * @return boolean True if delete succeeds, false otherwise */ public function delete() { return $this->version->delete('delete', $this->uri); } /** * Update the ServiceInstance * * @param array|Options $options Optional Arguments * @return ServiceInstance Updated ServiceInstance */ public function update($options = array()) { $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 ); return new ServiceInstance($this->version, $payload, $this->solution['sid']); } /** * Access the documents * * @return \Twilio\Rest\Sync\V1\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\Sync\V1\Service\SyncListList */ protected function getSyncLists() { if (!$this->_syncLists) { $this->_syncLists = new SyncListList($this->version, $this->solution['sid']); } return $this->_syncLists; } /** * Access the syncMaps * * @return \Twilio\Rest\Sync\V1\Service\SyncMapList */ protected function getSyncMaps() { if (!$this->_syncMaps) { $this->_syncMaps = new SyncMapList($this->version, $this->solution['sid']); } return $this->_syncMaps; } /** * Access the syncStreams * * @return \Twilio\Rest\Sync\V1\Service\SyncStreamList */ protected function getSyncStreams() { if (!$this->_syncStreams) { $this->_syncStreams = new SyncStreamList($this->version, $this->solution['sid']); } return $this->_syncStreams; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return \Twilio\ListResource The requested subresource * @throws \Twilio\Exceptions\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 \Twilio\Exceptions\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.Sync.V1.ServiceContext ' . implode(' ', $context) . ']'; } }PK zw�\<�"q� � ( Rest/Sync/V1/Service/DocumentOptions.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Sync\V1\Service; use Twilio\Options; use Twilio\Values; /** * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution. */ abstract class DocumentOptions { /** * @param string $uniqueName The unique_name * @param array $data The data * @param integer $ttl The ttl * @return CreateDocumentOptions Options builder */ public static function create($uniqueName = Values::NONE, $data = Values::NONE, $ttl = Values::NONE) { return new CreateDocumentOptions($uniqueName, $data, $ttl); } /** * @param array $data The data * @param integer $ttl The ttl * @return UpdateDocumentOptions Options builder */ public static function update($data = Values::NONE, $ttl = Values::NONE) { return new UpdateDocumentOptions($data, $ttl); } } class CreateDocumentOptions extends Options { /** * @param string $uniqueName The unique_name * @param array $data The data * @param integer $ttl The ttl */ public function __construct($uniqueName = Values::NONE, $data = Values::NONE, $ttl = Values::NONE) { $this->options['uniqueName'] = $uniqueName; $this->options['data'] = $data; $this->options['ttl'] = $ttl; } /** * The unique_name * * @param string $uniqueName The unique_name * @return $this Fluent Builder */ public function setUniqueName($uniqueName) { $this->options['uniqueName'] = $uniqueName; return $this; } /** * The data * * @param array $data The data * @return $this Fluent Builder */ public function setData($data) { $this->options['data'] = $data; return $this; } /** * The ttl * * @param integer $ttl The ttl * @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.Sync.V1.CreateDocumentOptions ' . implode(' ', $options) . ']'; } } class UpdateDocumentOptions extends Options { /** * @param array $data The data * @param integer $ttl The ttl */ public function __construct($data = Values::NONE, $ttl = Values::NONE) { $this->options['data'] = $data; $this->options['ttl'] = $ttl; } /** * The data * * @param array $data The data * @return $this Fluent Builder */ public function setData($data) { $this->options['data'] = $data; return $this; } /** * The ttl * * @param integer $ttl The ttl * @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.Sync.V1.UpdateDocumentOptions ' . implode(' ', $options) . ']'; } }PK zw�\�F�� * Rest/Sync/V1/Service/SyncStreamContext.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Sync\V1\Service; use Twilio\Exceptions\TwilioException; use Twilio\InstanceContext; use Twilio\Options; use Twilio\Rest\Sync\V1\Service\SyncStream\StreamMessageList; use Twilio\Values; use Twilio\Version; /** * 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 */ class SyncStreamContext extends InstanceContext { protected $_streamMessages = null; /** * Initialize the SyncStreamContext * * @param \Twilio\Version $version Version that contains the resource * @param string $serviceSid The service_sid * @param string $sid Stream SID or unique name. * @return \Twilio\Rest\Sync\V1\Service\SyncStreamContext */ public function __construct(Version $version, $serviceSid, $sid) { parent::__construct($version); // Path Solution $this->solution = array('serviceSid' => $serviceSid, 'sid' => $sid, ); $this->uri = '/Services/' . rawurlencode($serviceSid) . '/Streams/' . rawurlencode($sid) . ''; } /** * Fetch a SyncStreamInstance * * @return SyncStreamInstance Fetched SyncStreamInstance */ public function fetch() { $params = Values::of(array()); $payload = $this->version->fetch( 'GET', $this->uri, $params ); return new SyncStreamInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Deletes the SyncStreamInstance * * @return boolean True if delete succeeds, false otherwise */ public function delete() { return $this->version->delete('delete', $this->uri); } /** * Update the SyncStreamInstance * * @param array|Options $options Optional Arguments * @return SyncStreamInstance Updated SyncStreamInstance */ public function update($options = array()) { $options = new Values($options); $data = Values::of(array('Ttl' => $options['ttl'], )); $payload = $this->version->update( 'POST', $this->uri, array(), $data ); return new SyncStreamInstance( $this->version, $payload, $this->solution['serviceSid'], $this->solution['sid'] ); } /** * Access the streamMessages * * @return \Twilio\Rest\Sync\V1\Service\SyncStream\StreamMessageList */ protected function getStreamMessages() { if (!$this->_streamMessages) { $this->_streamMessages = new StreamMessageList( $this->version, $this->solution['serviceSid'], $this->solution['sid'] ); } return $this->_streamMessages; } /** * Magic getter to lazy load subresources * * @param string $name Subresource to return * @return \Twilio\ListResource The requested subresource * @throws \Twilio\Exceptions\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 \Twilio\Exceptions\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.Sync.V1.SyncStreamContext ' . implode(' ', $context) . ']'; } }PK zw�\���Ac c $ Rest/Sync/V1/Service/SyncMapPage.phpnu &1i� <?php /** * This code was generated by * \ / _ _ _| _ _ * | (_)\/(_)(_|\/| |(/_ v1.0.0 * / / */ namespace Twilio\Rest\Sync\V1\Service; use Twilio\Page; /** * PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution. */ class SyncMapPage extends Page { public function __construct($version, $response, $solution) { parent::__construct($version, $response); // Path Solution $this->solution = $solution; } public function buildInstance(array $payload) { return new SyncMapInstance($this->version, $payload, $this->solution['serviceSid']); } /** * Provide a friendly representation * * @return string Machine friendly representation */ public function __toString() { return '[Twilio.Sync.V1.SyncMapPage]'; } }PK zw�\em��2 2 '