Mailjet\Response::__construct PHP Method

__construct() public method

Construct a Mailjet response
public __construct ( mailjet\Request $request, Psr\Http\Message\ResponseInterface $response )
$request mailjet\Request Mailjet actual request
$response Psr\Http\Message\ResponseInterface Guzzle response
    public function __construct($request, $response)
    {
        $this->request = $request;
        if ($response) {
            $this->rawResponse = $response;
            $this->status = $response->getStatusCode();
            $this->body = $this->decodeBody($response->getBody());
            $this->success = floor($this->status / 100) == 2 ? true : false;
        }
    }