public function createEmbeddedSignatureRequest(EmbeddedSignatureRequest $request)
    {
        $params = $request->toParams();

        // choose url
        $url = $request->isUsingTemplate()
            ? static::SIGNATURE_REQUEST_EMBEDDED_TEMPLATE_PATH
            : static::SIGNATURE_REQUEST_EMBEDDED_PATH;

        $response = $this->rest->post($url, $params);

        $this->checkResponse($response);

        return new SignatureRequest($response);
    }