我想用 docusign_rest gem 发送签名请求。我已经配置了所有东西,但我不知道如何执行签名请求的后续步骤。如何获取收件人 ID、电子邮件、主题和所有内容。我已经尝试了很多,但对如何管理代码感到困惑。
请帮我....
我正在使用 docusign_rest gem 并希望将其 api 集成到我的代码中。我有所有的凭据。
这是我的控制器
class EmbedDocusignController < ApplicationController
def embedded_signing
end
def docusign_response
utility = DocusignRest::Utility.new
if params[:event] == "signing_complete"
flash[:notice] = "Thanks! Successfully signed"
render :text => utility.breakout_path(some_path), content_type: :html
else
flash[:notice] = "You chose not to sign the document."
render :text => utility.breakout_path(some_other_path), content_type: :html
end
end
def get_envelope
client = DocusignRest::Client.new
document_envelope_response = client.create_envelope_from_document(
email: {
subject: "test email subject",
body: "this is the email body and it's large!"
},
signers: [
{
embedded: false,
name: 'Test Guy',
email: 'my@yahoo.com',
role_name: 'Issuer',
sign_here_tabs: [
{
anchor_string: 'sign_here_1',
anchor_x_offset: '140',
anchor_y_offset: '8'
}
]
},
],
file: [ {path: '/assets/doc/test.pdf', name: 'test.pdf'} ],
status: 'sent'
)
end
end
提前致谢 :)