import body.signer.SignBatch;
import signers.SignerRequest;
import java.util.ArrayList;
String apiToken = "YOUR TOKEN";
String userToken = "USER TOKEN";
String signer_token1 = "SIGNER TOKEN 1";
String signer_token2 = "SIGNER TOKEN 2";
ArrayList<String> signers_token = new ArrayList<>();
signers_token.add(signer_token1);
signers_token.add(signer_token2);
SignBatch signBatch = SignBatch.builder()
.user_token(userToken)
.signer_tokens(signers_token)
.build();
Call the method signInBatch and receive as a response a string containing a success message or an error message:
try {
Signer signerResponse = new SignerRequest(apiToken).updateSigner(signerToken, signer);
String jsonDocResponse = new JsonConverter().signerToJson(signerResponse);
System.out.println(jsonDocResponse);
}
catch(Exception exceptionError) {
System.out.println(exceptionError.getMessage());
}
import body.signer.SignBatch;
import signers.SignerRequest;
import java.util.ArrayList;
public class SignInBatch {
public static void main(String[] args) throws Exception {
String apiToken = "YOUR TOKEN";
String userToken = "USER TOKEN";
String signer_token1 = "SIGNER TOKEN 1";
String signer_token2 = "SIGNER TOKEN 2";
ArrayList<String> signers_token = new ArrayList<>();
signers_token.add(signer_token1);
signers_token.add(signer_token2);
SignBatch signBatch = SignBatch.builder()
.user_token(userToken)
.signer_tokens(signers_token)
.build();
try {
String response = new SignerRequest(apiToken).signInBatch(signBatch);
System.out.println(response);
}
catch(Exception exceptionError) {
System.out.println(exceptionError.getMessage());
}
}
}