Example #1
0
 public function create($customerName, $street, $city, $region, $postalCode, $isoCountry, array $params = array())
 {
     $params["CustomerName"] = $customerName;
     $params["Street"] = $street;
     $params["City"] = $city;
     $params["Region"] = $region;
     $params["PostalCode"] = $postalCode;
     $params["IsoCountry"] = $isoCountry;
     return parent::_create($params);
 }
Example #2
0
 public function create($from, $to, $url, array $params = array())
 {
     $params["To"] = $to;
     $params["From"] = $from;
     if (self::isApplicationSid($url)) {
         $params["ApplicationSid"] = $url;
     } else {
         $params["Url"] = $url;
     }
     return parent::_create($params);
 }
Example #3
0
 public function create($name, array $params = array())
 {
     return parent::_create(array('FriendlyName' => $name) + $params);
 }
Example #4
0
 public function getObjectFromJson($params, $idParam = 'sid')
 {
     return parent::getObjectFromJson($params, 'call_sid');
 }
Example #5
0
 public function create(array $params = array())
 {
     return parent::_create($params);
 }
Example #6
0
 public function __construct($client, $uri)
 {
     $uri = preg_replace("#UsageRecords#", "Usage/Records", $uri);
     parent::__construct($client, $uri);
 }
Example #7
0
 function create($from, $to, $body, array $params = array())
 {
     return parent::_create(array('From' => $from, 'To' => $to, 'Body' => $body) + $params);
 }
 public function __construct($client, $uri)
 {
     // Rename all /Sip/ uris to /SIP/
     $uri = preg_replace("#/Sip#", "/SIP", $uri);
     parent::__construct($client, $uri);
 }
 public function create($phoneNumber, array $params = array())
 {
     return parent::_create(array('PhoneNumber' => $phoneNumber) + $params);
 }
Example #10
0
 public function __construct($client, $uri)
 {
     $uri = preg_replace("#ShortCodes#", "SMS/ShortCodes", $uri);
     parent::__construct($client, $uri);
 }
Example #11
0
 function create($from, $to, $body, array $params = array())
 {
     return parent::_create(array('src' => $from, 'dst' => $to, 'text' => $body) + $params);
 }
Example #12
0
 /**
  * Create a new UsageTrigger
  * @param string $category The category of usage to fire a trigger for. A full list of categories can be found in the `Usage Categories documentation <http://www.twilio.com/docs/api/rest/usage-records#usage-categories>`_.
  * @param string $value Fire the trigger when usage crosses this value.
  * @param string $url The URL to request when the trigger fires.
  * @param array $params Optional parameters for this trigger. A full list of parameters can be found in the `Usage Trigger documentation <http://www.twilio.com/docs/api/rest/usage-triggers#list-post-optional-parameters>`_.
  * @return Services_Twilio_Rest_UsageTrigger The created trigger
  */
 function create($category, $value, $url, array $params = array())
 {
     return parent::_create(array('UsageCategory' => $category, 'TriggerValue' => $value, 'CallbackUrl' => $url) + $params);
 }
Example #13
0
 public function getObjectFromJson($params, $idParam = "sid")
 {
     return parent::getObjectFromJson($params, "call_sid");
 }
Example #14
0
 public function __construct($client, $uri)
 {
     $this->instance_name = "Services_Twilio_Rest_MediaInstance";
     parent::__construct($client, $uri);
 }
 public function getSchema()
 {
     // You can't page through the list of available phone numbers.
     return array('list' => 'countries') + parent::getSchema();
 }
Example #16
0
 /**
  * Create a new address.
  *
  * :param string $customerName: Your name or business name, or that of your customer.
  * :param string $street: The number and street address where you or your customer is located.
  * :param string $city: The city in which you or your customer is located.
  * :param string $region: The state or region in which you or your customer is located.
  * :param string $postalCode: The postal code in which you or your customer is located.
  * :param string $isoCountry: The ISO country code of your or your customer's address.
  * :param array $params: An array of optional parameters describing the new
  *      address. The ``$params`` array can contain the following keys:
  *
  *      *FriendlyName*
  *          A human-readable description of the new address. Maximum 64 characters.
  *
  * :returns: The new address
  * :rtype: :php:class:`Services_Twilio_Rest_Address`
  *
  */
 public function create($customerName, $street, $city, $region, $postalCode, $isoCountry, $params = array())
 {
     return parent::_create(array('CustomerName' => $customerName, 'Street' => $street, 'City' => $city, 'Region' => $region, 'PostalCode' => $postalCode, 'IsoCountry' => $isoCountry) + $params);
 }