protected function sendRequest($requiredParams, $params, $callback)
    {
        $response = $this->client->send($requiredParams, array_merge($params, [
            'module' => static::getModule(),
            'controller' => static::getController(),
            'version' => $this->version,
        ]), function ($response) use ($callback) {
            if (isset($response->error)) {
                return $response;
            }
            return call_user_func($callback, $response);
        });
        if (isset($response->error)) {
            $this->lastError = isset($response->error->message) ? $response->error->message : 'Unknown error!';
            if ($this->client->softExceptionEnabled) {
                if (isset($response->meta['statusCode']) ? $response->meta['statusCode'] : false) {
                    throw $response->error->exception;
                }
                throw new Exception('API error ' . (isset($response->error->code) ? $response->error->code : -1) . '!');
            }
        }

        return $response;
    }