python - 如何从现有模板进行大量发送
问题描述
我已经完成了一个表格,所以我想用它进行批量发送,我已经创建了批量发送列表,但是在此处的示例代码中:https ://developers.docusign.com/esign-rest-api/ code-examples/bulk-sending-envelopes看起来它正在创建一个新文档 如何将现有文档添加到此批量发送?
解决方案
您需要修改批量发送代码示例的第 4 步中使用的 make_envelope() 方法,如下所示:
def make_envelope(cls, args):
"""
Creates envelope
args -- parameters for the envelope:
signer_email, signer_name, signer_client_id
returns an envelope definition
"""
# create the envelope definition
envelope_definition = EnvelopeDefinition(
status="sent", # requests that the envelope be created and sent.
template_id=args["template_id"]
)
# Create template role elements to connect the signer and cc recipients
# to the template
signer = TemplateRole(
email=args["signer_email"],
name=args["signer_name"],
role_name="signer"
)
# Create a cc template role.
cc = TemplateRole(
email=args["cc_email"],
name=args["cc_name"],
role_name="cc"
)
# Add the TemplateRole objects to the envelope object
envelope_definition.template_roles = [signer, cc]
return envelope_definition
请注意,我的模板有两个收件人(抄送和签名者)。您引用的模板可能会有所不同。这是使用模板创建信封 的完整来源
推荐阅读
- android - 如何使用 Kotlin 在片段内播放 YouTube 视频
- java - 构造函数中的对象创建链接 wrt 继承
- apache-kafka - 即使 Kafka 连接断开,应用程序也应该继续运行
- javascript - 我想验证用户的伪在他写作时是否良好
- sql - 日期范围之间的日期范围
- javascript - 使用 Gremlin Javascript 在 JanusGraph 中创建和查询 Geopoint
- terraform - Terraform 在初始化期间将资源列为提供者
- ios - 为 iOS 12 开发的应用程序可以安装在 iPadOS 上吗
- python - Pandas:如何从 google drive public 读取 CSV 文件?
- javascript - 推断嵌套的通用参数并从函数中返回它