private function request($method, $function, $extra = [])
    {
        $response = null;
        try {
            $response = $this->httpRequest->{$method}($function, $extra)->getBody();

            return json_decode($response, false);
        } catch (ClientException $e) {
            $this->handleError($e->getResponse());
        }
    }