如何将过期设置设置为信封定义



我正在尝试为我的信封定义设置过期设置,但我无法。

我使用以下内容作为参考来创建和发送我的信封:
https://github.com/docusign/docusign-csharp-client/blob/master/test/Recipes/CoreRecipes.cs

我已经尝试了以下方法:

envDef.ExpireAfter = "1";
envDef.ExpireEnabled = "true";
envDef.ExpireDateTime = DateTime.Now.AddDays(1).ToString("dd MMM yyyy hh:mm ff");

该文档确实与我设置的所有其他设置一起发送,但是,尽管有上述情况,但没有设置过期设置。

如 Inbar 所述,您需要创建一个过期对象并将其应用于信封定义。根据DocuSign的开发博客,您可以像这样这样做:

var expirations = new Expirations("1", "true", "0"); //ExpireAfter, Enabled, Warning days
var reminders = new Reminders("0", "true", "0");  //ReminderDelay, Enabled, Frequency
//results in no reminders and no expiration warning sent, envelope expires one day after sending

然后将其应用于envelopeDefinition.Notification参数

envelopeDefinition.Notification = new Notification(expirations, reminders, "false"); //Expirations, Reminders, UseDefaults

需要在客户端的 C# 模型中使用 Expiration 类。该对象将有 3 个字段 (https://github.com/docusign/docusign-csharp-client/blob/1d125f362ba8ae33edc2a72a713fc1e6e8b55314/sdk/src/DocuSign.eSign/Model/Expirations.cs(过期时间 - 字符串,表示信封将状态更改为"已发送"后过期的天数ExpireWarn - 信封过期前几天的字符串,您将(通过电子邮件(警告用户信封即将过期。
ExpireEnabled - "true" - 允许您自定义此信封(而不是使用帐户的默认值(

我相信如果过期后 == 过期警告,则不会发送电子邮件。我认为您可以将 ExpireAfter 设置为 1,将 ExpireWarn 设置为 0,这应该会立即收到一封电子邮件,我还没有测试过。否则 - 需要等待一天来测试这个....

最新更新