public static function fromResponse(Response $httpResponse)
    {
        $content = json_decode($httpResponse->getBody()->getContents(), true);

        $status = isset($content['status']) ? $content['status'] : '';

        if($status == Status::OK) {
            $htmlAttributes = isset($content['html_attributes']) ? $content['html_attributes'] : [];

            $result = isset($content['result']) ? $content['result'] : [];
            $result = PlaceDetailsResult::fromArray($result);
            $errorMessage = null;
        }

        else {
            $errorMessage = isset($content['error_message']) ? $content['error_message'] : null;
            $htmlAttributes = [];
            $result = null;
        }

        return new static($httpResponse, $status, $result, $htmlAttributes, $errorMessage);
    }