Skip to content
This repository has been archived by the owner on Dec 22, 2019. It is now read-only.

Commit

Permalink
Merge pull request #92 from jameskraus/master
Browse files Browse the repository at this point in the history
Adding the ability to check the id of a sent message from the response
  • Loading branch information
Bogardo committed Feb 3, 2017
2 parents a67f2b9 + 996bf50 commit 746c435
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Http/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,20 @@ class Response
*/
public $message;

/**
* The ID of the sent message, if it exists
* @var string
*/
public $id;

/**
* @param \stdClass $response
*/
public function __construct(stdClass $response)
{
$this->status = $response->http_response_code;
$this->message = $response->http_response_body->message;
$this->id = property_exists($response->http_response_body, 'id') ? $response->http_response_body->id : '';
$this->data = null;
}

Expand Down

0 comments on commit 746c435

Please sign in to comment.