@@ -21,7 +21,7 @@ public final class BulkSendEnvelopesService {
2121 private static final int ANCHOR_OFFSET_Y = -5 ;
2222 private static final int ANCHOR_OFFSET_X = 15 ;
2323
24- // Step 7 start
24+ //ds-snippet- start:eSign31Step7
2525 public static BulkSendBatchStatus getBulkSendBatchStatus (
2626 BulkEnvelopesApi bulkEnvelopesApi ,
2727 String accountId ,
@@ -32,7 +32,7 @@ public static BulkSendBatchStatus getBulkSendBatchStatus(
3232 // For 2000 recipients, it can take about an hour
3333 return bulkEnvelopesApi .getBulkSendBatchStatus (accountId , batchId );
3434 }
35- // Step 7 end
35+ //ds-snippet- end:eSign31Step7
3636
3737 public static String bulkSendEnvelopes (
3838 BulkEnvelopesApi bulkEnvelopesApi ,
@@ -47,7 +47,6 @@ public static String bulkSendEnvelopes(
4747 String ccEmail2 ,
4848 String accountId
4949 ) throws ApiException , IOException {
50- // Step 3. submit a bulk list
5150 BulkSendingList sendingList = BulkSendEnvelopesService .getSendingList (
5251 signerName ,
5352 signerEmail ,
@@ -60,29 +59,28 @@ public static String bulkSendEnvelopes(
6059 );
6160
6261 String bulkListId = bulkEnvelopesApi .createBulkSendList (accountId , sendingList ).getListId ();
63- // Step 3-1 end
6462
6563 // Create an envelope
66- // Step 4-1 start
64+ //ds-snippet- start:eSign31Step4
6765 EnvelopesApi envelopesApi = new EnvelopesApi (apiClient );
6866 String envelopeId = envelopesApi .createEnvelope (accountId , makeEnvelope ()).getEnvelopeId ();
69- // Step 4-1 end
67+ //ds-snippet- end:eSign31Step4
7068
7169 // Attach your bulk list ID to the envelope
72- // Step 5 start
70+ //ds-snippet- start:eSign31Step5
7371 CustomFields customFields = createCustomFields (bulkListId );
7472 envelopesApi .createCustomFields (accountId , envelopeId , customFields );
75- // Step 5 end
73+ //ds-snippet- end:eSign31Step5
7674
7775 // Initiate bulk send
78- // Step 6 start
76+ //ds-snippet- start:eSign31Step6
7977 BulkSendRequest request = new BulkSendRequest ();
8078 request .setEnvelopeOrTemplateId (envelopeId );
8179 return bulkEnvelopesApi .createBulkSendRequest (accountId , bulkListId , request ).getBatchId ();
82- // Step 6 end
80+ //ds-snippet- end:eSign31Step6
8381 }
8482
85- // Step 3-2 start
83+ //ds-snippet- start:eSign31Step3
8684 public static BulkSendingList getSendingList (
8785 String signerName ,
8886 String signerEmail ,
@@ -101,7 +99,6 @@ public static BulkSendingList getSendingList(
10199 .name ("sample.csv" )
102100 .bulkCopies (copies );
103101 }
104- // Step 3-2 end
105102
106103 public static BulkSendingCopy createBulkSending (
107104 String signerName ,
@@ -123,8 +120,8 @@ public static BulkSendingCopy createBulkSending(
123120 .recipients (List .of (recipient1 , recipient2 ))
124121 .customFields (Collections .emptyList ());
125122 }
123+ //ds-snippet-end:eSign31Step3
126124
127- // Step 4-2 start
128125 public static EnvelopeDefinition makeEnvelope () throws IOException {
129126 Document document = EnvelopeHelpers .createDocumentFromFile (DOCUMENT_FILE_NAME , DOCUMENT_NAME , "1" );
130127 return new EnvelopeDefinition ()
@@ -134,7 +131,6 @@ public static EnvelopeDefinition makeEnvelope() throws IOException {
134131 .status (EnvelopeHelpers .ENVELOPE_STATUS_CREATED )
135132 .recipients (createRecipients ());
136133 }
137- // Step 4-2 end
138134
139135 public static CustomFields createCustomFields (String bulkListId ) {
140136 TextCustomField textCustomField = new TextCustomField ()
0 commit comments