Skip to content

Commit

Permalink
add lastResponse attribute to the client var
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Burke committed Dec 26, 2012
1 parent 26e87d0 commit e69ab69
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Services/Twilio.php
Expand Up @@ -26,6 +26,7 @@ class Services_Twilio extends Services_Twilio_Resource

protected $http;
protected $retryAttempts;
protected $lastResponse;
protected $version;
protected $versions = array('2008-08-01', '2010-04-01');

Expand Down Expand Up @@ -208,6 +209,7 @@ private function _processResponse($response)
);
}
if (200 <= $status && $status < 300) {
$this->lastResponse = $decoded;
return $decoded;
}
throw new Services_Twilio_RestException(
Expand Down
2 changes: 1 addition & 1 deletion Services/Twilio/Resource.php
Expand Up @@ -116,7 +116,7 @@ public function __get($key) {
public function __toString() {
$out = array();
foreach ($this as $key => $value) {
if ($key !== "client") {
if ($key !== "client" && $key !== "subresources") {
$out[$key] = (string)$value;
}
}
Expand Down

0 comments on commit e69ab69

Please sign in to comment.