@@ -25,21 +25,26 @@ public final class SendEnvelopeWithRecipientInfoService {
2525 private static final int ANCHOR_OFFSET_Y = 10 ;
2626
2727 private static final int ANCHOR_OFFSET_X = 20 ;
28-
28+
29+ //ds-snippet-start:Workspaces3Step2
2930 private static IamClient createIamClient (String accessToken ) {
3031 return IamClient .builder ().accessToken (accessToken ).build ();
3132 }
33+ //ds-snippet-end:Workspaces3Step2
3234
3335 public static CreateWorkspaceEnvelopeResponse createWorkspaceEnvelope (
3436 String accessToken ,
3537 String accountId ,
3638 String workspaceId ,
3739 String documentId ) throws Exception {
3840
41+ //ds-snippet-start:Workspaces3Step3
3942 var workspaceEnvelopeForCreate = new WorkspaceEnvelopeForCreate ();
4043 workspaceEnvelopeForCreate .withEnvelopeName (ENVELOPE_NAME );
4144 workspaceEnvelopeForCreate .withDocumentIds (Arrays .asList (documentId ));
42-
45+ //ds-snippet-end:Workspaces3Step3
46+
47+ //ds-snippet-start:Workspaces3Step4
4348 return createIamClient (accessToken )
4449 .workspaces ()
4550 .workspaces ()
@@ -48,25 +53,10 @@ public static CreateWorkspaceEnvelopeResponse createWorkspaceEnvelope(
4853 .workspaceId (workspaceId )
4954 .workspaceEnvelopeForCreate (workspaceEnvelopeForCreate )
5055 .call ();
56+ //ds-snippet-end:Workspaces3Step4
5157 }
5258
53- public static EnvelopeUpdateSummary sendEnvelope (
54- String accessToken ,
55- String basePath ,
56- String accountId ,
57- String envelopeId ,
58- String signerEmail ,
59- String signerName
60- ) throws ApiException {
61- var client = new ApiClient (basePath );
62- client .addDefaultHeader (HttpHeaders .AUTHORIZATION , "Bearer " + accessToken );
63- var envelopesApi = new EnvelopesApi (client );
64-
65- var envelope = makeEnvelope (signerEmail , signerName );
66-
67- return envelopesApi .update (accountId , envelopeId , envelope );
68- }
69-
59+ //ds-snippet-start:Workspaces3Step5
7060 private static Envelope makeEnvelope (
7161 String signerEmail ,
7262 String signerName
@@ -87,4 +77,24 @@ private static Envelope makeEnvelope(
8777
8878 return envelope ;
8979 }
80+ //ds-snippet-end:Workspaces3Step5
81+
82+ //ds-snippet-start:Workspaces3Step6
83+ public static EnvelopeUpdateSummary sendEnvelope (
84+ String accessToken ,
85+ String basePath ,
86+ String accountId ,
87+ String envelopeId ,
88+ String signerEmail ,
89+ String signerName
90+ ) throws ApiException {
91+ var client = new ApiClient (basePath );
92+ client .addDefaultHeader (HttpHeaders .AUTHORIZATION , "Bearer " + accessToken );
93+ var envelopesApi = new EnvelopesApi (client );
94+
95+ var envelope = makeEnvelope (signerEmail , signerName );
96+
97+ return envelopesApi .update (accountId , envelopeId , envelope );
98+ }
99+ //ds-snippet-end:Workspaces3Step6
90100}
0 commit comments