文档签名集成
Docusign Integration
我在视图 (ListStatusChange) 中看不到收件人,只有信封列表。
当我写 (model.Recipients.Signers.First().Name) returns null
我只能看到 model.envelopeId、Status、StatusDateChange。我通过了模型 IEnumerable(信封)
我使用模板发送我的文件,这里是信封定义:
public void GenerateDocument(string name, string email)
{
var docuSignClient = new DocuSignClient();
var accountId = docuSignClient.LoginApi(username, password, integratorkey);
var templateRoles = templateRoleNames.Select(m => new TemplateRole
{
Email = email,
Name = name,
RoleName = m
}).ToList();
var envelope = new EnvelopeDefinition
{
EmailSubject = subject,
EmailBlurb = messageBody,
TemplateId = templateId,
TemplateRoles = templateRoles,
Status = "sent"
};
var envelopesApi = new EnvelopesApi();
var envelopesSummary = envelopesApi.CreateEnvelope(accountId, envelope);
您需要在 ListStatusChanges 请求的选项中包含收件人。
您没有显示此代码,但它可能看起来像这样:
var apiClient = new ApiClient(basePath);
apiClient.Configuration.DefaultHeader.Add("Authorization", "Bearer " + accessToken);
var envelopesApi = new EnvelopesApi(apiClient);
ListStatusChangesOptions options = new ListStatusChangesOptions { include = "recipients" };
options.fromDate = DateTime.Now.AddDays(-30).ToString("yyyy/MM/dd");
// Call the API method:
EnvelopesInformation results = envelopesApi.ListStatusChanges(accountId, options);
return results;
我在视图 (ListStatusChange) 中看不到收件人,只有信封列表。 当我写 (model.Recipients.Signers.First().Name) returns null 我只能看到 model.envelopeId、Status、StatusDateChange。我通过了模型 IEnumerable(信封) 我使用模板发送我的文件,这里是信封定义:
public void GenerateDocument(string name, string email)
{
var docuSignClient = new DocuSignClient();
var accountId = docuSignClient.LoginApi(username, password, integratorkey);
var templateRoles = templateRoleNames.Select(m => new TemplateRole
{
Email = email,
Name = name,
RoleName = m
}).ToList();
var envelope = new EnvelopeDefinition
{
EmailSubject = subject,
EmailBlurb = messageBody,
TemplateId = templateId,
TemplateRoles = templateRoles,
Status = "sent"
};
var envelopesApi = new EnvelopesApi();
var envelopesSummary = envelopesApi.CreateEnvelope(accountId, envelope);
您需要在 ListStatusChanges 请求的选项中包含收件人。
您没有显示此代码,但它可能看起来像这样:
var apiClient = new ApiClient(basePath);
apiClient.Configuration.DefaultHeader.Add("Authorization", "Bearer " + accessToken);
var envelopesApi = new EnvelopesApi(apiClient);
ListStatusChangesOptions options = new ListStatusChangesOptions { include = "recipients" };
options.fromDate = DateTime.Now.AddDays(-30).ToString("yyyy/MM/dd");
// Call the API method:
EnvelopesInformation results = envelopesApi.ListStatusChanges(accountId, options);
return results;