how to add multiple AttachmentRequirementBuilder dynamically
Tuesday, June 25, 2019 at 10:30pmHi,
I have to ask Required Document from signer but Number of Required documnet is dynamic.
It depends upon agent to ask any number of document to signer.
I have created signer using SDK and want to add required doc dynamically based on number of documentes requested to Java code.
Thanks
Reply to: how to add multiple AttachmentRequirementBuilder dynamically
Wednesday, June 26, 2019 at 05:45amEslClient eslClient = new EslClient(API_KEY, API_URL); PackageId packageId = new PackageId("kfVWhzcNLDIzAe0rfvJC91sd6VI="); DocumentPackage package1 = eslClient.getPackage(packageId); Signer signer = package1.getSigner("[email protected]"); AttachmentRequirement attachment1 = AttachmentRequirementBuilder.newAttachmentRequirementWithName("attachment1") .withDescription("attachment1 description") .isRequiredAttachment() .build(); AttachmentRequirement attachment2 = AttachmentRequirementBuilder.newAttachmentRequirementWithName("attachment2") .withDescription("attachment2 description") .isRequiredAttachment() .build(); AttachmentRequirement attachment3 = AttachmentRequirementBuilder.newAttachmentRequirementWithName("attachment3") .withDescription("attachment3 description") .isRequiredAttachment() .build(); signer.setAttachmentRequirements(Collections.EMPTY_LIST); eslClient.getPackageService().updateSigner(packageId, signer); signer.setAttachmentRequirements(Arrays.asList(attachment1,attachment2,attachment3)); eslClient.getPackageService().updateSigner(packageId, signer);If there's attachment(s) set for the signer, you'd update the signer twice, first to remove all existing ones, then upload dynamic number of attachments. Hope this could help! DuoReply to: how to add multiple AttachmentRequirementBuilder dynamically
Wednesday, June 26, 2019 at 05:42am