diff options
author | matt <matt@twilio.com> | 2016-07-26 13:23:57 -0700 |
---|---|---|
committer | matt <matt@twilio.com> | 2016-07-26 13:23:57 -0700 |
commit | 63fe343191a71ed2ac314e8e06ece1a25f04ccf6 (patch) | |
tree | 78feed6d33a4566f28f880d08b8b18e236ed33e3 | |
parent | c6822c8eab17cfb8c6409572c8ce5e3533603fde (diff) | |
parent | cfffb026efe4dd3ebec361a99342748d7b4fdb75 (diff) | |
download | twilio-php-63fe343191a71ed2ac314e8e06ece1a25f04ccf6.zip twilio-php-63fe343191a71ed2ac314e8e06ece1a25f04ccf6.tar.gz twilio-php-63fe343191a71ed2ac314e8e06ece1a25f04ccf6.tar.bz2 |
Merge remote-tracking branch 'public/next-gen' into next-gen-public
23 files changed, 159 insertions, 118 deletions
diff --git a/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressContext.php b/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressContext.php index ad43e0e..89626ab 100644 --- a/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressContext.php +++ b/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressContext.php @@ -62,14 +62,15 @@ class IpAddressContext extends InstanceContext { /** * Update the IpAddressInstance * - * @param string $ipAddress The ip_address - * @param string $friendlyName The friendly_name + * @param array $options Optional Arguments * @return IpAddressInstance Updated IpAddressInstance */ - public function update($ipAddress, $friendlyName) { + public function update(array $options = array()) { + $options = new Values($options); + $data = Values::of(array( - 'IpAddress' => $ipAddress, - 'FriendlyName' => $friendlyName, + 'IpAddress' => $options['ipAddress'], + 'FriendlyName' => $options['friendlyName'], )); $payload = $this->version->update( diff --git a/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressInstance.php b/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressInstance.php index 0f0052b..a203f19 100644 --- a/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressInstance.php +++ b/Twilio/Rest/Api/V2010/Account/Sip/IpAccessControlList/IpAddressInstance.php @@ -89,14 +89,12 @@ class IpAddressInstance extends InstanceResource { /** * Update the IpAddressInstance * - * @param string $ipAddress The ip_address - * @param string $friendlyName The friendly_name + * @param array $options Optional Arguments * @return IpAddressInstance Updated IpAddressInstance */ - public function update($ipAddress, $friendlyName) { + public function update(array $options = array()) { return $this->proxy()->update( - $ipAddress, - $friendlyName + $options ); } diff --git a/Twilio/Rest/IpMessaging/V1/CredentialContext.php b/Twilio/Rest/IpMessaging/V1/CredentialContext.php index a51d0a9..2cf7ff8 100644 --- a/Twilio/Rest/IpMessaging/V1/CredentialContext.php +++ b/Twilio/Rest/IpMessaging/V1/CredentialContext.php @@ -56,17 +56,14 @@ class CredentialContext extends InstanceContext { /** * Update the CredentialInstance * - * @param string $friendlyName The friendly_name - * @param string $type The type * @param array $options Optional Arguments * @return CredentialInstance Updated CredentialInstance */ - public function update($friendlyName, $type, array $options = array()) { + public function update(array $options = array()) { $options = new Values($options); $data = Values::of(array( - 'FriendlyName' => $friendlyName, - 'Type' => $type, + 'FriendlyName' => $options['friendlyName'], 'Certificate' => $options['certificate'], 'PrivateKey' => $options['privateKey'], 'Sandbox' => $options['sandbox'], diff --git a/Twilio/Rest/IpMessaging/V1/CredentialInstance.php b/Twilio/Rest/IpMessaging/V1/CredentialInstance.php index 1a0186c..6c4f309 100644 --- a/Twilio/Rest/IpMessaging/V1/CredentialInstance.php +++ b/Twilio/Rest/IpMessaging/V1/CredentialInstance.php @@ -83,15 +83,11 @@ class CredentialInstance extends InstanceResource { /** * Update the CredentialInstance * - * @param string $friendlyName The friendly_name - * @param string $type The type * @param array $options Optional Arguments * @return CredentialInstance Updated CredentialInstance */ - public function update($friendlyName, $type, array $options = array()) { + public function update(array $options = array()) { return $this->proxy()->update( - $friendlyName, - $type, $options ); } diff --git a/Twilio/Rest/IpMessaging/V1/CredentialList.php b/Twilio/Rest/IpMessaging/V1/CredentialList.php index f4fa1fa..bad3164 100644 --- a/Twilio/Rest/IpMessaging/V1/CredentialList.php +++ b/Twilio/Rest/IpMessaging/V1/CredentialList.php @@ -108,17 +108,16 @@ class CredentialList extends ListResource { /** * Create a new CredentialInstance * - * @param string $friendlyName The friendly_name * @param string $type The type * @param array $options Optional Arguments * @return CredentialInstance Newly created CredentialInstance */ - public function create($friendlyName, $type, array $options = array()) { + public function create($type, array $options = array()) { $options = new Values($options); $data = Values::of(array( - 'FriendlyName' => $friendlyName, 'Type' => $type, + 'FriendlyName' => $options['friendlyName'], 'Certificate' => $options['certificate'], 'PrivateKey' => $options['privateKey'], 'Sandbox' => $options['sandbox'], diff --git a/Twilio/Rest/IpMessaging/V1/Service/Channel/MessageContext.php b/Twilio/Rest/IpMessaging/V1/Service/Channel/MessageContext.php index 7652669..094f823 100644 --- a/Twilio/Rest/IpMessaging/V1/Service/Channel/MessageContext.php +++ b/Twilio/Rest/IpMessaging/V1/Service/Channel/MessageContext.php @@ -60,6 +60,46 @@ class MessageContext extends InstanceContext { } /** + * Deletes the MessageInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->version->delete('delete', $this->uri); + } + + /** + * Update the MessageInstance + * + * @param string $body The body + * @param array $options Optional Arguments + * @return MessageInstance Updated MessageInstance + */ + public function update($body, array $options = array()) { + $options = new Values($options); + + $data = Values::of(array( + 'Body' => $body, + 'Attributes' => $options['attributes'], + )); + + $payload = $this->version->update( + 'POST', + $this->uri, + array(), + $data + ); + + return new MessageInstance( + $this->version, + $payload, + $this->solution['serviceSid'], + $this->solution['channelSid'], + $this->solution['sid'] + ); + } + + /** * Provide a friendly representation * * @return string Machine friendly representation diff --git a/Twilio/Rest/IpMessaging/V1/Service/Channel/MessageInstance.php b/Twilio/Rest/IpMessaging/V1/Service/Channel/MessageInstance.php index e9ee563..419bf7b 100644 --- a/Twilio/Rest/IpMessaging/V1/Service/Channel/MessageInstance.php +++ b/Twilio/Rest/IpMessaging/V1/Service/Channel/MessageInstance.php @@ -92,6 +92,29 @@ class MessageInstance extends InstanceResource { } /** + * Deletes the MessageInstance + * + * @return boolean True if delete succeeds, false otherwise + */ + public function delete() { + return $this->proxy()->delete(); + } + + /** + * Update the MessageInstance + * + * @param string $body The body + * @param array $options Optional Arguments + * @return MessageInstance Updated MessageInstance + */ + public function update($body, array $options = array()) { + return $this->proxy()->update( + $body, + $options + ); + } + + /** * Magic getter to access properties * * @param string $name Property to access diff --git a/Twilio/Rest/IpMessaging/V1/Service/ChannelList.php b/Twilio/Rest/IpMessaging/V1/Service/ChannelList.php index e4cf074..e53c45e 100644 --- a/Twilio/Rest/IpMessaging/V1/Service/ChannelList.php +++ b/Twilio/Rest/IpMessaging/V1/Service/ChannelList.php @@ -35,17 +35,15 @@ class ChannelList extends ListResource { /** * Create a new ChannelInstance * - * @param string $friendlyName The friendly_name - * @param string $uniqueName The unique_name * @param array $options Optional Arguments * @return ChannelInstance Newly created ChannelInstance */ - public function create($friendlyName, $uniqueName, array $options = array()) { + public function create(array $options = array()) { $options = new Values($options); $data = Values::of(array( - 'FriendlyName' => $friendlyName, - 'UniqueName' => $uniqueName, + 'FriendlyName' => $options['friendlyName'], + 'UniqueName' => $options['uniqueName'], 'Attributes' => $options['attributes'], 'Type' => $options['type'], )); diff --git a/Twilio/Rest/IpMessaging/V1/Service/UserContext.php b/Twilio/Rest/IpMessaging/V1/Service/UserContext.php index 79646b9..adb67d8 100644 --- a/Twilio/Rest/IpMessaging/V1/Service/UserContext.php +++ b/Twilio/Rest/IpMessaging/V1/Service/UserContext.php @@ -68,12 +68,16 @@ class UserContext extends InstanceContext { /** * Update the UserInstance * - * @param string $roleSid The role_sid + * @param array $options Optional Arguments * @return UserInstance Updated UserInstance */ - public function update($roleSid) { + public function update(array $options = array()) { + $options = new Values($options); + $data = Values::of(array( - 'RoleSid' => $roleSid, + 'RoleSid' => $options['roleSid'], + 'Attributes' => $options['attributes'], + 'FriendlyName' => $options['friendlyName'], )); $payload = $this->version->update( diff --git a/Twilio/Rest/IpMessaging/V1/Service/UserInstance.php b/Twilio/Rest/IpMessaging/V1/Service/UserInstance.php index ae101a2..dbe4c32 100644 --- a/Twilio/Rest/IpMessaging/V1/Service/UserInstance.php +++ b/Twilio/Rest/IpMessaging/V1/Service/UserInstance.php @@ -95,12 +95,12 @@ class UserInstance extends InstanceResource { /** * Update the UserInstance * - * @param string $roleSid The role_sid + * @param array $options Optional Arguments * @return UserInstance Updated UserInstance */ - public function update($roleSid) { + public function update(array $options = array()) { return $this->proxy()->update( - $roleSid + $options ); } diff --git a/Twilio/Rest/Notifications/V1/CredentialContext.php b/Twilio/Rest/Notifications/V1/CredentialContext.php index f9fd518..94e7b0d 100644 --- a/Twilio/Rest/Notifications/V1/CredentialContext.php +++ b/Twilio/Rest/Notifications/V1/CredentialContext.php @@ -56,17 +56,14 @@ class CredentialContext extends InstanceContext { /** * Update the CredentialInstance * - * @param string $friendlyName The friendly_name - * @param string $type The type * @param array $options Optional Arguments * @return CredentialInstance Updated CredentialInstance */ - public function update($friendlyName, $type, array $options = array()) { + public function update(array $options = array()) { $options = new Values($options); $data = Values::of(array( - 'FriendlyName' => $friendlyName, - 'Type' => $type, + 'FriendlyName' => $options['friendlyName'], 'Certificate' => $options['certificate'], 'PrivateKey' => $options['privateKey'], 'Sandbox' => $options['sandbox'], diff --git a/Twilio/Rest/Notifications/V1/CredentialInstance.php b/Twilio/Rest/Notifications/V1/CredentialInstance.php index b12233e..9a77938 100644 --- a/Twilio/Rest/Notifications/V1/CredentialInstance.php +++ b/Twilio/Rest/Notifications/V1/CredentialInstance.php @@ -83,15 +83,11 @@ class CredentialInstance extends InstanceResource { /** * Update the CredentialInstance * - * @param string $friendlyName The friendly_name - * @param string $type The type * @param array $options Optional Arguments * @return CredentialInstance Updated CredentialInstance */ - public function update($friendlyName, $type, array $options = array()) { + public function update(array $options = array()) { return $this->proxy()->update( - $friendlyName, - $type, $options ); } diff --git a/Twilio/Rest/Notifications/V1/CredentialList.php b/Twilio/Rest/Notifications/V1/CredentialList.php index 9969aae..2d24008 100644 --- a/Twilio/Rest/Notifications/V1/CredentialList.php +++ b/Twilio/Rest/Notifications/V1/CredentialList.php @@ -108,17 +108,16 @@ class CredentialList extends ListResource { /** * Create a new CredentialInstance * - * @param string $friendlyName The friendly_name * @param string $type The type * @param array $options Optional Arguments * @return CredentialInstance Newly created CredentialInstance */ - public function create($friendlyName, $type, array $options = array()) { + public function create($type, array $options = array()) { $options = new Values($options); $data = Values::of(array( - 'FriendlyName' => $friendlyName, 'Type' => $type, + 'FriendlyName' => $options['friendlyName'], 'Certificate' => $options['certificate'], 'PrivateKey' => $options['privateKey'], 'Sandbox' => $options['sandbox'], diff --git a/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationContext.php b/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationContext.php index 1a6c517..00a10cf 100644 --- a/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationContext.php +++ b/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationContext.php @@ -62,15 +62,14 @@ class ReservationContext extends InstanceContext { /** * Update the ReservationInstance * - * @param string $reservationStatus The reservation_status * @param array $options Optional Arguments * @return ReservationInstance Updated ReservationInstance */ - public function update($reservationStatus, array $options = array()) { + public function update(array $options = array()) { $options = new Values($options); $data = Values::of(array( - 'ReservationStatus' => $reservationStatus, + 'ReservationStatus' => $options['reservationStatus'], 'WorkerActivitySid' => $options['workerActivitySid'], 'Instruction' => $options['instruction'], 'DequeuePostWorkActivitySid' => $options['dequeuePostWorkActivitySid'], diff --git a/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationInstance.php b/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationInstance.php index a9cb805..fd60efa 100644 --- a/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationInstance.php +++ b/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationInstance.php @@ -93,13 +93,11 @@ class ReservationInstance extends InstanceResource { /** * Update the ReservationInstance * - * @param string $reservationStatus The reservation_status * @param array $options Optional Arguments * @return ReservationInstance Updated ReservationInstance */ - public function update($reservationStatus, array $options = array()) { + public function update(array $options = array()) { return $this->proxy()->update( - $reservationStatus, $options ); } diff --git a/Twilio/Tests/Integration/Api/V2010/Account/Sip/IpAccessControlList/IpAddressTest.php b/Twilio/Tests/Integration/Api/V2010/Account/Sip/IpAccessControlList/IpAddressTest.php index 48c9a76..2b7b0e0 100644 --- a/Twilio/Tests/Integration/Api/V2010/Account/Sip/IpAccessControlList/IpAddressTest.php +++ b/Twilio/Tests/Integration/Api/V2010/Account/Sip/IpAccessControlList/IpAddressTest.php @@ -200,20 +200,13 @@ class IpAddressTest extends HolodeckTestCase { $this->twilio->api->v2010->accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") ->sip ->ipAccessControlLists("ALaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") - ->ipAddresses("IPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")->update("ipAddress", "friendlyName"); + ->ipAddresses("IPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")->update(); } catch (DeserializeException $e) {} catch (TwilioException $e) {} - $values = array( - 'IpAddress' => "ipAddress", - 'FriendlyName' => "friendlyName", - ); - $this->assertTrue($this->holodeck->hasRequest(new Request( 'post', - 'https://api.twilio.com/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP/IpAccessControlLists/ALaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAddresses/IPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json', - null, - $values + 'https://api.twilio.com/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP/IpAccessControlLists/ALaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAddresses/IPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json' ))); } @@ -237,7 +230,7 @@ class IpAddressTest extends HolodeckTestCase { $actual = $this->twilio->api->v2010->accounts("ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") ->sip ->ipAccessControlLists("ALaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") - ->ipAddresses("IPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")->update("ipAddress", "friendlyName"); + ->ipAddresses("IPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")->update(); $this->assertNotNull($actual); } diff --git a/Twilio/Tests/Integration/IpMessaging/V1/CredentialTest.php b/Twilio/Tests/Integration/IpMessaging/V1/CredentialTest.php index 93c9ca2..d57a03f 100644 --- a/Twilio/Tests/Integration/IpMessaging/V1/CredentialTest.php +++ b/Twilio/Tests/Integration/IpMessaging/V1/CredentialTest.php @@ -93,12 +93,11 @@ class CredentialTest extends HolodeckTestCase { $this->holodeck->mock(new Response(500, '')); try { - $this->twilio->ipMessaging->v1->credentials->create("friendlyName", "gcm"); + $this->twilio->ipMessaging->v1->credentials->create("gcm"); } catch (DeserializeException $e) {} catch (TwilioException $e) {} $values = array( - 'FriendlyName' => "friendlyName", 'Type' => "gcm", ); @@ -127,7 +126,7 @@ class CredentialTest extends HolodeckTestCase { ' )); - $actual = $this->twilio->ipMessaging->v1->credentials->create("friendlyName", "gcm"); + $actual = $this->twilio->ipMessaging->v1->credentials->create("gcm"); $this->assertNotNull($actual); } @@ -172,20 +171,13 @@ class CredentialTest extends HolodeckTestCase { $this->holodeck->mock(new Response(500, '')); try { - $this->twilio->ipMessaging->v1->credentials("CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")->update("friendlyName", "gcm"); + $this->twilio->ipMessaging->v1->credentials("CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")->update(); } catch (DeserializeException $e) {} catch (TwilioException $e) {} - $values = array( - 'FriendlyName' => "friendlyName", - 'Type' => "gcm", - ); - $this->assertTrue($this->holodeck->hasRequest(new Request( 'post', - 'https://ip-messaging.twilio.com/v1/Credentials/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - null, - $values + 'https://ip-messaging.twilio.com/v1/Credentials/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' ))); } @@ -206,7 +198,7 @@ class CredentialTest extends HolodeckTestCase { ' )); - $actual = $this->twilio->ipMessaging->v1->credentials("CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")->update("friendlyName", "gcm"); + $actual = $this->twilio->ipMessaging->v1->credentials("CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")->update(); $this->assertNotNull($actual); } diff --git a/Twilio/Tests/Integration/IpMessaging/V1/Service/Channel/MessageTest.php b/Twilio/Tests/Integration/IpMessaging/V1/Service/Channel/MessageTest.php index 1ddafe9..c78981f 100644 --- a/Twilio/Tests/Integration/IpMessaging/V1/Service/Channel/MessageTest.php +++ b/Twilio/Tests/Integration/IpMessaging/V1/Service/Channel/MessageTest.php @@ -69,4 +69,42 @@ class MessageTest extends HolodeckTestCase { 'https://ip-messaging.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages' ))); } + + public function testDeleteRequest() { + $this->holodeck->mock(new Response(500, '')); + + try { + $this->twilio->ipMessaging->v1->services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") + ->channels("CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") + ->messages("IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")->delete(); + } catch (DeserializeException $e) {} + catch (TwilioException $e) {} + + $this->assertTrue($this->holodeck->hasRequest(new Request( + 'delete', + 'https://ip-messaging.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' + ))); + } + + public function testUpdateRequest() { + $this->holodeck->mock(new Response(500, '')); + + try { + $this->twilio->ipMessaging->v1->services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") + ->channels("CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") + ->messages("IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")->update("body"); + } catch (DeserializeException $e) {} + catch (TwilioException $e) {} + + $values = array( + 'Body' => "body", + ); + + $this->assertTrue($this->holodeck->hasRequest(new Request( + 'post', + 'https://ip-messaging.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + null, + $values + ))); + } }
\ No newline at end of file diff --git a/Twilio/Tests/Integration/IpMessaging/V1/Service/ChannelTest.php b/Twilio/Tests/Integration/IpMessaging/V1/Service/ChannelTest.php index 86beeab..e372b8d 100644 --- a/Twilio/Tests/Integration/IpMessaging/V1/Service/ChannelTest.php +++ b/Twilio/Tests/Integration/IpMessaging/V1/Service/ChannelTest.php @@ -93,20 +93,13 @@ class ChannelTest extends HolodeckTestCase { try { $this->twilio->ipMessaging->v1->services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") - ->channels->create("friendlyName", "uniqueName"); + ->channels->create(); } catch (DeserializeException $e) {} catch (TwilioException $e) {} - $values = array( - 'FriendlyName' => "friendlyName", - 'UniqueName' => "uniqueName", - ); - $this->assertTrue($this->holodeck->hasRequest(new Request( 'post', - 'https://ip-messaging.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels', - null, - $values + 'https://ip-messaging.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels' ))); } @@ -135,7 +128,7 @@ class ChannelTest extends HolodeckTestCase { )); $actual = $this->twilio->ipMessaging->v1->services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") - ->channels->create("friendlyName", "uniqueName"); + ->channels->create(); $this->assertNotNull($actual); } diff --git a/Twilio/Tests/Integration/IpMessaging/V1/Service/UserTest.php b/Twilio/Tests/Integration/IpMessaging/V1/Service/UserTest.php index 88f5d73..2a4f5eb 100644 --- a/Twilio/Tests/Integration/IpMessaging/V1/Service/UserTest.php +++ b/Twilio/Tests/Integration/IpMessaging/V1/Service/UserTest.php @@ -213,19 +213,13 @@ class UserTest extends HolodeckTestCase { try { $this->twilio->ipMessaging->v1->services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") - ->users("USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")->update("RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"); + ->users("USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")->update(); } catch (DeserializeException $e) {} catch (TwilioException $e) {} - $values = array( - 'RoleSid' => "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - ); - $this->assertTrue($this->holodeck->hasRequest(new Request( 'post', - 'https://ip-messaging.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Users/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - null, - $values + 'https://ip-messaging.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Users/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' ))); } @@ -249,7 +243,7 @@ class UserTest extends HolodeckTestCase { )); $actual = $this->twilio->ipMessaging->v1->services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") - ->users("USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")->update("RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"); + ->users("USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")->update(); $this->assertNotNull($actual); } diff --git a/Twilio/Tests/Integration/Notifications/V1/CredentialTest.php b/Twilio/Tests/Integration/Notifications/V1/CredentialTest.php index e003f2e..4ec955d 100644 --- a/Twilio/Tests/Integration/Notifications/V1/CredentialTest.php +++ b/Twilio/Tests/Integration/Notifications/V1/CredentialTest.php @@ -93,12 +93,11 @@ class CredentialTest extends HolodeckTestCase { $this->holodeck->mock(new Response(500, '')); try { - $this->twilio->notifications->v1->credentials->create("friendlyName", "gcm"); + $this->twilio->notifications->v1->credentials->create("gcm"); } catch (DeserializeException $e) {} catch (TwilioException $e) {} $values = array( - 'FriendlyName' => "friendlyName", 'Type' => "gcm", ); @@ -127,7 +126,7 @@ class CredentialTest extends HolodeckTestCase { ' )); - $actual = $this->twilio->notifications->v1->credentials->create("friendlyName", "gcm"); + $actual = $this->twilio->notifications->v1->credentials->create("gcm"); $this->assertNotNull($actual); } @@ -172,20 +171,13 @@ class CredentialTest extends HolodeckTestCase { $this->holodeck->mock(new Response(500, '')); try { - $this->twilio->notifications->v1->credentials("CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")->update("friendlyName", "gcm"); + $this->twilio->notifications->v1->credentials("CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")->update(); } catch (DeserializeException $e) {} catch (TwilioException $e) {} - $values = array( - 'FriendlyName' => "friendlyName", - 'Type' => "gcm", - ); - $this->assertTrue($this->holodeck->hasRequest(new Request( 'post', - 'https://notifications.twilio.com/v1/Credentials/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - null, - $values + 'https://notifications.twilio.com/v1/Credentials/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' ))); } @@ -206,7 +198,7 @@ class CredentialTest extends HolodeckTestCase { ' )); - $actual = $this->twilio->notifications->v1->credentials("CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")->update("friendlyName", "gcm"); + $actual = $this->twilio->notifications->v1->credentials("CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")->update(); $this->assertNotNull($actual); } diff --git a/Twilio/Tests/Integration/Taskrouter/V1/Workspace/Task/ReservationTest.php b/Twilio/Tests/Integration/Taskrouter/V1/Workspace/Task/ReservationTest.php index 59cabc7..9a7baef 100644 --- a/Twilio/Tests/Integration/Taskrouter/V1/Workspace/Task/ReservationTest.php +++ b/Twilio/Tests/Integration/Taskrouter/V1/Workspace/Task/ReservationTest.php @@ -155,19 +155,13 @@ class ReservationTest extends HolodeckTestCase { try { $this->twilio->taskrouter->v1->workspaces("WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") ->tasks("WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") - ->reservations("WRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")->update("reservationStatus"); + ->reservations("WRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")->update(); } catch (DeserializeException $e) {} catch (TwilioException $e) {} - $values = array( - 'ReservationStatus' => "reservationStatus", - ); - $this->assertTrue($this->holodeck->hasRequest(new Request( 'post', - 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations/WRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', - null, - $values + 'https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Tasks/WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations/WRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' ))); } @@ -197,7 +191,7 @@ class ReservationTest extends HolodeckTestCase { $actual = $this->twilio->taskrouter->v1->workspaces("WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") ->tasks("WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") - ->reservations("WRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")->update("reservationStatus"); + ->reservations("WRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")->update(); $this->assertNotNull($actual); } diff --git a/Twilio/VersionInfo.php b/Twilio/VersionInfo.php index 2c8eded..160c41d 100644 --- a/Twilio/VersionInfo.php +++ b/Twilio/VersionInfo.php @@ -7,7 +7,7 @@ namespace Twilio; class VersionInfo { const MAJOR = 5; const MINOR = 0; - const PATCH = '0-RC8'; + const PATCH = '0-RC9'; public static function string() { return implode('.', array(self::MAJOR, self::MINOR, self::PATCH)); |