Ejemplo n.º 1
0
        public async void GetEnvelopeInformation()
        {
            var auth = new AuthenticationClient(_username, _password, _integratorKey);
            await auth.LoginInformationAsync();

            var client   = new DocuSignClient(auth);
            var envelope = await client.SendSignatureRequestAsync(_templateId, _recipientName, _recipientEmail, _templateRole);

            var envelopeDetails = await client.GetEnvelopeInformationAsync(envelope.envelopeId);

            Assert.IsNotNull(envelopeDetails);
            Assert.IsNotNull(envelopeDetails.envelopeId);
            Assert.IsNotNull(envelopeDetails.status);
            Assert.IsNotNull(envelopeDetails.documentsUri);
            Assert.IsNotNull(envelopeDetails.recipientsUri);
            Assert.IsNotNull(envelopeDetails.envelopeUri);
            Assert.IsNotNull(envelopeDetails.emailSubject);
            Assert.IsNotNull(envelopeDetails.customFieldsUri);
            Assert.IsNotNull(envelopeDetails.notificationUri);
            Assert.IsNotNull(envelopeDetails.enableWetSign);
            Assert.IsNotNull(envelopeDetails.allowReassign);
            Assert.IsNotNull(envelopeDetails.createdDateTime);
            Assert.IsNotNull(envelopeDetails.lastModifiedDateTime);
            Assert.IsNotNull(envelopeDetails.sentDateTime);
            Assert.IsNotNull(envelopeDetails.statusChangedDateTime);
            Assert.IsNotNull(envelopeDetails.documentsCombinedUri);
            Assert.IsNotNull(envelopeDetails.certificateUri);
            Assert.IsNotNull(envelopeDetails.templatesUri);
            Assert.IsNotNull(envelopeDetails.purgeState);
        }
Ejemplo n.º 2
0
        public async void GetEnvelopeRecipientInformation()
        {
            var auth = new AuthenticationClient(_username, _password, _integratorKey);
            await auth.LoginInformationAsync();

            var client = new DocuSignClient(auth);

            var envelope = await client.SendSignatureRequestAsync(_templateId, _recipientName, _recipientEmail, _templateRole);

            var recipient = await client.GetEnvelopeRecipientInformationAsync(envelope.envelopeId);

            Assert.IsNotNull(recipient);
            Assert.IsNotNull(recipient.signers);
            Assert.IsNotNull(recipient.recipientCount);
            Assert.IsNotNull(recipient.currentRoutingOrder);
            Assert.IsNotNull(recipient.signers[0].name);
            Assert.IsNotNull(recipient.signers[0].email);
            Assert.IsNotNull(recipient.signers[0].recipientId);
            Assert.IsNotNull(recipient.signers[0].recipientIdGuid);
            Assert.IsNotNull(recipient.signers[0].requireIdLookup);
            Assert.IsNotNull(recipient.signers[0].userId);
            Assert.IsNotNull(recipient.signers[0].clientUserId);
            Assert.IsNotNull(recipient.signers[0].routingOrder);
            Assert.IsNotNull(recipient.signers[0].note);
            Assert.IsNotNull(recipient.signers[0].status);
            Assert.IsNotNull(recipient.signers[0].templateLocked);
            Assert.IsNotNull(recipient.signers[0].templateRequired);
        }
        // POST api/signature
        public async Task <Envelope> Post([FromBody] SignatureRequestTemplate signatureRequestTemplate)
        {
            await CheckAuthInfo();

            var client = new DocuSignClient(BaseUrl, DocuSignCredentials);

            var envelope = await client.SendSignatureRequestAsync(
                signatureRequestTemplate.TemplateId,
                signatureRequestTemplate.RecipientName,
                signatureRequestTemplate.RecipientEmail,
                signatureRequestTemplate.TemplateRole);

            return(envelope);
        }
Ejemplo n.º 4
0
        public async void SendSignatureRequestFromTemplate()
        {
            var auth = new AuthenticationClient(_username, _password, _integratorKey);
            await auth.LoginInformationAsync();

            var client   = new DocuSignClient(auth);
            var envelope = await client.SendSignatureRequestAsync(_templateId, _recipientName, _recipientEmail, _templateRole);

            Assert.IsNotNull(envelope);
            Assert.IsNotNull(envelope.envelopeId);
            Assert.IsNotNull(envelope.status);
            Assert.IsNotNull(envelope.statusDateTime);
            Assert.IsNotNull(envelope.uri);
        }
Ejemplo n.º 5
0
        public async void GetRecipientViewUrl()
        {
            var auth = new AuthenticationClient(_username, _password, _integratorKey);
            await auth.LoginInformationAsync();

            var client   = new DocuSignClient(auth);
            var envelope = await client.SendSignatureRequestAsync(_templateId, _recipientName, _recipientEmail, _templateRole);

            var uri           = envelope.uri;
            var recipientView = await client.RecipientViewAsync(_recipientName, _recipientEmail, uri);

            Assert.IsNotNull(recipientView);
            Assert.IsNotNull(recipientView.url);

            Uri  uriResult;
            bool isUri = Uri.TryCreate(recipientView.url, UriKind.Absolute, out uriResult);

            Assert.IsTrue(isUri);
        }