private function _finishResponse($response, string $method, array $params)
    {
        $valid = $this->_isValidResponse($response);

        if ($valid === true) {
            if (isset($response->value)) {
                return $response->value;
            } else {
                return $response;
            }
        } else {
            throw new InvalidResponseException($valid . ' (' . $this->_parseUrl($method, $params) . ')');
        }
    }