Skip to content

Commit

Permalink
Regenerate for 5.11.0-alpha1
Browse files Browse the repository at this point in the history
  • Loading branch information
Doug Black committed Jun 16, 2017
1 parent c68c0a9 commit 484c6a8
Show file tree
Hide file tree
Showing 218 changed files with 3,705 additions and 190 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ php:
- 5.5
- 5.6
- 7.0
- hhvm
script: "make test"
before_install: "composer install --dev"
matrix:
include:
- php: "5.3"
dist: precise
- php: hhvm
dist: trusty
13 changes: 12 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
twilio-php Changelog
====================

[2018-05-24] Version 5.10.0-alpha1
[2017-06-16] Version 5.11.0-alpha1
----------------------------------

- Add `locality` field to `AvailablePhoneNumbers`.
- Add `origin` field to `IncomingPhoneNumbers`.
- Add `in_locality` parameter to `AvailablePhoneNumbers`.
- Add `origin` parameter to `IncomingPhoneNumbers`.
- Add `announce_url` parameter to `Participants`.
- Add `announce_url_method` parameter to `Participants`.
- Add `getPage()` methods to lists to begin paging starting from a given url.

[2017-05-24] Version 5.10.0-alpha1
----------------------------------

- Add HostedNumbers preview support.
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ dist: clean
mv $$php.new $$php; \
done


install:
# Composer: http://getcomposer.org/download/
$(COMPOSER) install

vendor:
# Composer: http://getcomposer.org/download/
$(COMPOSER) install
Expand Down
4 changes: 4 additions & 0 deletions Twilio/Http/CurlClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ public function options($method, $url, $params = array(), $data = array(),
public function buildQuery($params) {
$parts = array();

if (is_string($params)) {
return $params;
}

$params = $params ?: array();

foreach ($params as $key => $value) {
Expand Down
2 changes: 1 addition & 1 deletion Twilio/Http/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ public function ok() {
}

public function __toString() {
return '[Response] HTTP ' . $this->getStatusCode() . ' ' . $this->getContent();
return '[Response] HTTP ' . $this->getStatusCode() . ' ' . $this->content;
}
}
16 changes: 16 additions & 0 deletions Twilio/Rest/Accounts/V1/Credential/PublicKeyList.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,22 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
return new PublicKeyPage($this->version, $response, $this->solution);
}

/**
* Retrieve a specific page of PublicKeyInstance records from the API.
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
* @return \Twilio\Page Page of PublicKeyInstance
*/
public function getPage($targetUrl) {
$response = $this->version->getDomain()->getClient()->request(
'GET',
$targetUrl
);

return new PublicKeyPage($this->version, $response, $this->solution);
}

/**
* Create a new PublicKeyInstance
*
Expand Down
17 changes: 17 additions & 0 deletions Twilio/Rest/Api/V2010/Account/Address/DependentPhoneNumberList.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,23 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
return new DependentPhoneNumberPage($this->version, $response, $this->solution);
}

/**
* Retrieve a specific page of DependentPhoneNumberInstance records from the
* API.
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
* @return \Twilio\Page Page of DependentPhoneNumberInstance
*/
public function getPage($targetUrl) {
$response = $this->version->getDomain()->getClient()->request(
'GET',
$targetUrl
);

return new DependentPhoneNumberPage($this->version, $response, $this->solution);
}

/**
* Provide a friendly representation
*
Expand Down
16 changes: 16 additions & 0 deletions Twilio/Rest/Api/V2010/Account/AddressList.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,22 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
return new AddressPage($this->version, $response, $this->solution);
}

/**
* Retrieve a specific page of AddressInstance records from the API.
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
* @return \Twilio\Page Page of AddressInstance
*/
public function getPage($targetUrl) {
$response = $this->version->getDomain()->getClient()->request(
'GET',
$targetUrl
);

return new AddressPage($this->version, $response, $this->solution);
}

/**
* Constructs a AddressContext
*
Expand Down
16 changes: 16 additions & 0 deletions Twilio/Rest/Api/V2010/Account/ApplicationList.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,22 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
return new ApplicationPage($this->version, $response, $this->solution);
}

/**
* Retrieve a specific page of ApplicationInstance records from the API.
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
* @return \Twilio\Page Page of ApplicationInstance
*/
public function getPage($targetUrl) {
$response = $this->version->getDomain()->getClient()->request(
'GET',
$targetUrl
);

return new ApplicationPage($this->version, $response, $this->solution);
}

/**
* Constructs a ApplicationContext
*
Expand Down
17 changes: 17 additions & 0 deletions Twilio/Rest/Api/V2010/Account/AuthorizedConnectAppList.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,23 @@ public function page($pageSize = Values::NONE, $pageToken = Values::NONE, $pageN
return new AuthorizedConnectAppPage($this->version, $response, $this->solution);
}

/**
* Retrieve a specific page of AuthorizedConnectAppInstance records from the
* API.
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
* @return \Twilio\Page Page of AuthorizedConnectAppInstance
*/
public function getPage($targetUrl) {
$response = $this->version->getDomain()->getClient()->request(
'GET',
$targetUrl
);

return new AuthorizedConnectAppPage($this->version, $response, $this->solution);
}

/**
* Constructs a AuthorizedConnectAppContext
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* @property string friendlyName
* @property string phoneNumber
* @property string lata
* @property string locality
* @property string rateCenter
* @property string latitude
* @property string longitude
Expand Down Expand Up @@ -47,6 +48,7 @@ public function __construct(Version $version, array $payload, $accountSid, $coun
'friendlyName' => Values::array_get($payload, 'friendly_name'),
'phoneNumber' => Values::array_get($payload, 'phone_number'),
'lata' => Values::array_get($payload, 'lata'),
'locality' => Values::array_get($payload, 'locality'),
'rateCenter' => Values::array_get($payload, 'rate_center'),
'latitude' => Values::array_get($payload, 'latitude'),
'longitude' => Values::array_get($payload, 'longitude'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
'InRegion' => $options['inRegion'],
'InRateCenter' => $options['inRateCenter'],
'InLata' => $options['inLata'],
'InLocality' => $options['inLocality'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
Expand All @@ -127,6 +128,22 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
return new LocalPage($this->version, $response, $this->solution);
}

/**
* Retrieve a specific page of LocalInstance records from the API.
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
* @return \Twilio\Page Page of LocalInstance
*/
public function getPage($targetUrl) {
$response = $this->version->getDomain()->getClient()->request(
'GET',
$targetUrl
);

return new LocalPage($this->version, $response, $this->solution);
}

/**
* Provide a friendly representation
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ abstract class LocalOptions {
* @param string $inRegion The in_region
* @param string $inRateCenter The in_rate_center
* @param string $inLata The in_lata
* @param string $inLocality The in_locality
* @return ReadLocalOptions Options builder
*/
public static function read($areaCode = Values::NONE, $contains = Values::NONE, $smsEnabled = Values::NONE, $mmsEnabled = Values::NONE, $voiceEnabled = Values::NONE, $excludeAllAddressRequired = Values::NONE, $excludeLocalAddressRequired = Values::NONE, $excludeForeignAddressRequired = Values::NONE, $beta = Values::NONE, $nearNumber = Values::NONE, $nearLatLong = Values::NONE, $distance = Values::NONE, $inPostalCode = Values::NONE, $inRegion = Values::NONE, $inRateCenter = Values::NONE, $inLata = Values::NONE) {
return new ReadLocalOptions($areaCode, $contains, $smsEnabled, $mmsEnabled, $voiceEnabled, $excludeAllAddressRequired, $excludeLocalAddressRequired, $excludeForeignAddressRequired, $beta, $nearNumber, $nearLatLong, $distance, $inPostalCode, $inRegion, $inRateCenter, $inLata);
public static function read($areaCode = Values::NONE, $contains = Values::NONE, $smsEnabled = Values::NONE, $mmsEnabled = Values::NONE, $voiceEnabled = Values::NONE, $excludeAllAddressRequired = Values::NONE, $excludeLocalAddressRequired = Values::NONE, $excludeForeignAddressRequired = Values::NONE, $beta = Values::NONE, $nearNumber = Values::NONE, $nearLatLong = Values::NONE, $distance = Values::NONE, $inPostalCode = Values::NONE, $inRegion = Values::NONE, $inRateCenter = Values::NONE, $inLata = Values::NONE, $inLocality = Values::NONE) {
return new ReadLocalOptions($areaCode, $contains, $smsEnabled, $mmsEnabled, $voiceEnabled, $excludeAllAddressRequired, $excludeLocalAddressRequired, $excludeForeignAddressRequired, $beta, $nearNumber, $nearLatLong, $distance, $inPostalCode, $inRegion, $inRateCenter, $inLata, $inLocality);
}
}

Expand All @@ -59,8 +60,9 @@ class ReadLocalOptions extends Options {
* @param string $inRegion The in_region
* @param string $inRateCenter The in_rate_center
* @param string $inLata The in_lata
* @param string $inLocality The in_locality
*/
public function __construct($areaCode = Values::NONE, $contains = Values::NONE, $smsEnabled = Values::NONE, $mmsEnabled = Values::NONE, $voiceEnabled = Values::NONE, $excludeAllAddressRequired = Values::NONE, $excludeLocalAddressRequired = Values::NONE, $excludeForeignAddressRequired = Values::NONE, $beta = Values::NONE, $nearNumber = Values::NONE, $nearLatLong = Values::NONE, $distance = Values::NONE, $inPostalCode = Values::NONE, $inRegion = Values::NONE, $inRateCenter = Values::NONE, $inLata = Values::NONE) {
public function __construct($areaCode = Values::NONE, $contains = Values::NONE, $smsEnabled = Values::NONE, $mmsEnabled = Values::NONE, $voiceEnabled = Values::NONE, $excludeAllAddressRequired = Values::NONE, $excludeLocalAddressRequired = Values::NONE, $excludeForeignAddressRequired = Values::NONE, $beta = Values::NONE, $nearNumber = Values::NONE, $nearLatLong = Values::NONE, $distance = Values::NONE, $inPostalCode = Values::NONE, $inRegion = Values::NONE, $inRateCenter = Values::NONE, $inLata = Values::NONE, $inLocality = Values::NONE) {
$this->options['areaCode'] = $areaCode;
$this->options['contains'] = $contains;
$this->options['smsEnabled'] = $smsEnabled;
Expand All @@ -77,6 +79,7 @@ public function __construct($areaCode = Values::NONE, $contains = Values::NONE,
$this->options['inRegion'] = $inRegion;
$this->options['inRateCenter'] = $inRateCenter;
$this->options['inLata'] = $inLata;
$this->options['inLocality'] = $inLocality;
}

/**
Expand Down Expand Up @@ -257,6 +260,17 @@ public function setInLata($inLata) {
return $this;
}

/**
* The in_locality
*
* @param string $inLocality The in_locality
* @return $this Fluent Builder
*/
public function setInLocality($inLocality) {
$this->options['inLocality'] = $inLocality;
return $this;
}

/**
* Provide a friendly representation
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* @property string friendlyName
* @property string phoneNumber
* @property string lata
* @property string locality
* @property string rateCenter
* @property string latitude
* @property string longitude
Expand Down Expand Up @@ -47,6 +48,7 @@ public function __construct(Version $version, array $payload, $accountSid, $coun
'friendlyName' => Values::array_get($payload, 'friendly_name'),
'phoneNumber' => Values::array_get($payload, 'phone_number'),
'lata' => Values::array_get($payload, 'lata'),
'locality' => Values::array_get($payload, 'locality'),
'rateCenter' => Values::array_get($payload, 'rate_center'),
'latitude' => Values::array_get($payload, 'latitude'),
'longitude' => Values::array_get($payload, 'longitude'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
'InRegion' => $options['inRegion'],
'InRateCenter' => $options['inRateCenter'],
'InLata' => $options['inLata'],
'InLocality' => $options['inLocality'],
'PageToken' => $pageToken,
'Page' => $pageNumber,
'PageSize' => $pageSize,
Expand All @@ -127,6 +128,22 @@ public function page($options = array(), $pageSize = Values::NONE, $pageToken =
return new MobilePage($this->version, $response, $this->solution);
}

/**
* Retrieve a specific page of MobileInstance records from the API.
* Request is executed immediately
*
* @param string $targetUrl API-generated URL for the requested results page
* @return \Twilio\Page Page of MobileInstance
*/
public function getPage($targetUrl) {
$response = $this->version->getDomain()->getClient()->request(
'GET',
$targetUrl
);

return new MobilePage($this->version, $response, $this->solution);
}

/**
* Provide a friendly representation
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ abstract class MobileOptions {
* @param string $inRegion The in_region
* @param string $inRateCenter The in_rate_center
* @param string $inLata The in_lata
* @param string $inLocality The in_locality
* @return ReadMobileOptions Options builder
*/
public static function read($areaCode = Values::NONE, $contains = Values::NONE, $smsEnabled = Values::NONE, $mmsEnabled = Values::NONE, $voiceEnabled = Values::NONE, $excludeAllAddressRequired = Values::NONE, $excludeLocalAddressRequired = Values::NONE, $excludeForeignAddressRequired = Values::NONE, $beta = Values::NONE, $nearNumber = Values::NONE, $nearLatLong = Values::NONE, $distance = Values::NONE, $inPostalCode = Values::NONE, $inRegion = Values::NONE, $inRateCenter = Values::NONE, $inLata = Values::NONE) {
return new ReadMobileOptions($areaCode, $contains, $smsEnabled, $mmsEnabled, $voiceEnabled, $excludeAllAddressRequired, $excludeLocalAddressRequired, $excludeForeignAddressRequired, $beta, $nearNumber, $nearLatLong, $distance, $inPostalCode, $inRegion, $inRateCenter, $inLata);
public static function read($areaCode = Values::NONE, $contains = Values::NONE, $smsEnabled = Values::NONE, $mmsEnabled = Values::NONE, $voiceEnabled = Values::NONE, $excludeAllAddressRequired = Values::NONE, $excludeLocalAddressRequired = Values::NONE, $excludeForeignAddressRequired = Values::NONE, $beta = Values::NONE, $nearNumber = Values::NONE, $nearLatLong = Values::NONE, $distance = Values::NONE, $inPostalCode = Values::NONE, $inRegion = Values::NONE, $inRateCenter = Values::NONE, $inLata = Values::NONE, $inLocality = Values::NONE) {
return new ReadMobileOptions($areaCode, $contains, $smsEnabled, $mmsEnabled, $voiceEnabled, $excludeAllAddressRequired, $excludeLocalAddressRequired, $excludeForeignAddressRequired, $beta, $nearNumber, $nearLatLong, $distance, $inPostalCode, $inRegion, $inRateCenter, $inLata, $inLocality);
}
}

Expand All @@ -59,8 +60,9 @@ class ReadMobileOptions extends Options {
* @param string $inRegion The in_region
* @param string $inRateCenter The in_rate_center
* @param string $inLata The in_lata
* @param string $inLocality The in_locality
*/
public function __construct($areaCode = Values::NONE, $contains = Values::NONE, $smsEnabled = Values::NONE, $mmsEnabled = Values::NONE, $voiceEnabled = Values::NONE, $excludeAllAddressRequired = Values::NONE, $excludeLocalAddressRequired = Values::NONE, $excludeForeignAddressRequired = Values::NONE, $beta = Values::NONE, $nearNumber = Values::NONE, $nearLatLong = Values::NONE, $distance = Values::NONE, $inPostalCode = Values::NONE, $inRegion = Values::NONE, $inRateCenter = Values::NONE, $inLata = Values::NONE) {
public function __construct($areaCode = Values::NONE, $contains = Values::NONE, $smsEnabled = Values::NONE, $mmsEnabled = Values::NONE, $voiceEnabled = Values::NONE, $excludeAllAddressRequired = Values::NONE, $excludeLocalAddressRequired = Values::NONE, $excludeForeignAddressRequired = Values::NONE, $beta = Values::NONE, $nearNumber = Values::NONE, $nearLatLong = Values::NONE, $distance = Values::NONE, $inPostalCode = Values::NONE, $inRegion = Values::NONE, $inRateCenter = Values::NONE, $inLata = Values::NONE, $inLocality = Values::NONE) {
$this->options['areaCode'] = $areaCode;
$this->options['contains'] = $contains;
$this->options['smsEnabled'] = $smsEnabled;
Expand All @@ -77,6 +79,7 @@ public function __construct($areaCode = Values::NONE, $contains = Values::NONE,
$this->options['inRegion'] = $inRegion;
$this->options['inRateCenter'] = $inRateCenter;
$this->options['inLata'] = $inLata;
$this->options['inLocality'] = $inLocality;
}

/**
Expand Down Expand Up @@ -257,6 +260,17 @@ public function setInLata($inLata) {
return $this;
}

/**
* The in_locality
*
* @param string $inLocality The in_locality
* @return $this Fluent Builder
*/
public function setInLocality($inLocality) {
$this->options['inLocality'] = $inLocality;
return $this;
}

/**
* Provide a friendly representation
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* @property string friendlyName
* @property string phoneNumber
* @property string lata
* @property string locality
* @property string rateCenter
* @property string latitude
* @property string longitude
Expand Down Expand Up @@ -47,6 +48,7 @@ public function __construct(Version $version, array $payload, $accountSid, $coun
'friendlyName' => Values::array_get($payload, 'friendly_name'),
'phoneNumber' => Values::array_get($payload, 'phone_number'),
'lata' => Values::array_get($payload, 'lata'),
'locality' => Values::array_get($payload, 'locality'),
'rateCenter' => Values::array_get($payload, 'rate_center'),
'latitude' => Values::array_get($payload, 'latitude'),
'longitude' => Values::array_get($payload, 'longitude'),
Expand Down
Loading

0 comments on commit 484c6a8

Please sign in to comment.