简体   繁体   English

文档集成

[英]Docusign Integration

I can't see Recipients in view(ListStatusChange), just the list of envelopes.我在视图(ListStatusChange)中看不到收件人,只有信封列表。 when I write (model.Recipients.Signers.First().Name) returns null Just I can see model.envelopeId, Status, StatusDateChange.当我写 (model.Recipients.Signers.First().Name) 返回 null 时,我可以看到 model.envelopeId、Status、StatusDateChange。 I passed the model IEnumerable (Envelope) I used templates for send my documents, here is the envelope definition:我通过了 model IEnumerable (Envelope) 我使用模板发送我的文件,这里是信封定义:

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);

You need to include recipients in the options for the ListStatusChanges request.您需要在ListStatusChanges请求的选项中包括收件人。

You didn't show this code, but here is what it may look like:您没有显示此代码,但它可能如下所示:

    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;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM