IpAddresses.php 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. class Services_Twilio_Rest_IpAddresses extends Services_Twilio_SIPListResource {
  3. public function __construct($client, $uri) {
  4. $this->instance_name = "Services_Twilio_Rest_IpAddress";
  5. parent::__construct($client, $uri);
  6. }
  7. /**
  8. * Creates a new IpAddress instance
  9. *
  10. * Example usage:
  11. *
  12. * .. code-block:: php
  13. *
  14. * $client->account->sip->ip_access_control_lists->get('ALXXX')->ip_addresses->create(
  15. * "FriendlyName", "127.0.0.1"
  16. * );
  17. *
  18. * :param string $friendly_name: the friendly name for the new IpAddress object
  19. * :param string $ip_address: the ip address for the new IpAddress object
  20. * :param array $params: a single array of parameters which is serialized and
  21. * sent directly to the Twilio API.
  22. */
  23. public function create($friendly_name, $ip_address, $params = array()) {
  24. return parent::_create(array(
  25. 'FriendlyName' => $friendly_name,
  26. 'IpAddress' => $ip_address,
  27. ) + $params);
  28. }
  29. }