import body.doc.ExtraDoc;
import docs.DocRequests;
import response.ExtraDocResponse;
import services.JsonConverter;
String apiToken = "SEU TOKEN";
String docToken = "TOKEN DOCUMENTO ORIGINAL";
ExtraDoc extraDoc = ExtraDoc.extraDocBuilder()
.name("Extra doc")
.url_pdf("https://zapsign.s3.amazonaws.com/2022/1/pdf/63d19807-cbfa-4b51-8571-215ad0f4eb98/ca42e7be-c932-482c-b70b-92ad7aea04be.pdf")
.build();
try {
ExtraDocResponse extraDocResponse = new DocRequests(apiToken).addExtraDoc(docToken, extraDoc);
String jsonExtraDocs = new JsonConverter().extraDocToJson(extraDocResponse);
System.out.println(jsonExtraDocs);
}
catch(Exception exceptionError) {
System.out.println(exceptionError.getMessage());
}
import body.doc.ExtraDoc;
import docs.DocRequests;
import response.ExtraDocResponse;
import services.JsonConverter;
public class AddExtraDoc {
public static void main(String[] args) throws Exception {
String apiToken = "SEU TOKEN";
String docToken = "TOKEN DOCUMENTO ORIGINAL";
ExtraDoc extraDoc = ExtraDoc.extraDocBuilder()
.name("Extra doc")
.url_pdf("https://zapsign.s3.amazonaws.com/2022/1/pdf/63d19807-cbfa-4b51-8571-215ad0f4eb98/ca42e7be-c932-482c-b70b-92ad7aea04be.pdf")
.build();
try {
ExtraDocResponse extraDocResponse = new DocRequests(apiToken).addExtraDoc(docToken, extraDoc);
String jsonExtraDocs = new JsonConverter().extraDocToJson(extraDocResponse);
System.out.println(jsonExtraDocs);
}
catch(Exception exceptionError) {
System.out.println(exceptionError.getMessage());
}
}
}