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) . ')');
        }
    }
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) . ')');
        }
    }
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 ) . ')' ) ; } }
Validate request and return the values.

@param mixed $response
@param string $method
@param array $params
@return bool|object
@throws InvalidResponseException
Validate request and return the values .