mailtodanish

How to update signer

0 votes
Hi , I have to update existing signer of a package. Signer is already created now I have to add required documents for signer. how to update Signer. Required document is dynamic so if request for required documnet is two/three or four then I will update signer accordingly. Or let me know how is possible to achieve this.

Reply to: How to update signer

0 votes

Hi there, Like I replied in another thread, to simply update signer with attachments, refer to below code:

		EslClient 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);

Hope this could help! Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off