@@ -18,6 +18,7 @@ const docusign = require("docusign-esign");
1818 // args.accessToken
1919 // args.accountId
2020
21+ //ds-snippet-start:eSign38Step3
2122 let dsApiClient = new docusign . ApiClient ( ) ;
2223 dsApiClient . setBasePath ( args . basePath ) ;
2324 dsApiClient . addDefaultHeader ( "Authorization" , "Bearer " + args . accessToken ) ;
@@ -40,6 +41,7 @@ const docusign = require("docusign-esign");
4041 results = await envelopesApi . createRecipientView ( args . accountId , envelopeId , {
4142 recipientViewRequest : viewRequest ,
4243 } ) ;
44+ //ds-snippet-end:eSign38Step3
4345
4446 return { envelopeId : envelopeId , redirectUrl : results . url } ;
4547} ;
@@ -51,7 +53,9 @@ const docusign = require("docusign-esign");
5153 * @returns {Envelope } An envelope definition
5254 * @private
5355 */
56+ //ds-snippet-start:eSign38Step2
5457function makeEnvelope ( args ) {
58+ //ds-snippet-end:eSign38Step2
5559 // Data for this method
5660 // args.signerEmail
5761 // args.signerName
@@ -69,6 +73,7 @@ function makeEnvelope(args) {
6973
7074 // create a signer recipient to sign the document, identified by name and email
7175 // We're setting the parameters via the object constructor
76+ //ds-snippet-start:eSign38Step2
7277 let signer = docusign . Signer . constructFromObject ( {
7378 email : args . signerEmail ,
7479 name : args . signerName ,
@@ -187,5 +192,6 @@ function makeRecipientViewRequest(args) {
187192
188193 return viewRequest ;
189194}
195+ //ds-snippet-end:eSign38Step2
190196
191197module . exports = { sendEnvelope } ;
0 commit comments