Skip to content

Commit

Permalink
DEVDOCS-10171 adding codeDepot markers
Browse files Browse the repository at this point in the history
  • Loading branch information
raileendr committed Sep 28, 2023
1 parent 3073df8 commit a4b96b7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,28 @@ protected Object doWork(WorkArguments args, ModelMap model,

EnvelopeDefinition envelope = SetTabValuesService.makeEnvelope(signerEmail, signerName);

// Step 2. Construct your API headers
//ds-snippet-start:eSign16Step2
ApiClient apiClient = createApiClient(session.getBasePath(), user.getAccessToken());
EnvelopesApi envelopesApi = new EnvelopesApi(apiClient);
//ds-snippet-end:eSign16Step2

// Step 5. Call the eSignature REST API
// Call the eSignature REST API
//ds-snippet-start:eSign16Step4
EnvelopeSummary envelopeSummary = SetTabValuesService.createEnvelope(envelopesApi, accountId, envelope);
//ds-snippet-end:eSign16Step4

String envelopeId = envelopeSummary.getEnvelopeId();
session.setEnvelopeId(envelopeId);

// Step 6. Create the view request
// Create the view request
//ds-snippet-start:eSign16Step5
RecipientViewRequest viewRequest = SetTabValuesService.makeRecipientViewRequest(
signerEmail,
signerName,
config.getDsReturnUrl(),
config.getDsPingUrl());
ViewUrl viewUrl = SetTabValuesService.createRecipientView(envelopesApi, accountId, envelopeId, viewRequest);
//ds-snippet-end:eSign16Step5

// State can be stored/recovered using the framework's session or a
// query parameter on the returnUrl (see the makeRecipientViewRequest method)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ public static RecipientViewRequest setEmailAndSignerNameForRecipientViewRequest(
return viewRequest;
}

// Step 4. Construct your request body
// Construct your request body
//ds-snippet-start:eSign16Step3
public static EnvelopeDefinition makeEnvelope(String signerEmail, String signerName) throws IOException {
// Create a signer recipient to sign the document, identified by name and email
// We set the clientUserId to enable embedded signing for the recipient
Expand All @@ -111,7 +112,7 @@ public static EnvelopeDefinition makeEnvelope(String signerEmail, String signerN
signer.clientUserId(SIGNER_CLIENT_ID);
signer.recipientId("1");

// Step 3. Create tabs and CustomFields
// Create tabs and CustomFields
SignHere signHere = new SignHere();
signHere.setAnchorString("/sn1");
signHere.setAnchorUnits("pixels");
Expand Down Expand Up @@ -201,4 +202,5 @@ public static EnvelopeDefinition makeEnvelope(String signerEmail, String signerN

return envelopeDefinition;
}
//ds-snippet-end:eSign16Step3
}

0 comments on commit a4b96b7

Please sign in to comment.