Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.groupdocs.sdk.api.SignatureApi Maven / Gradle / Ivy
/**
* Copyright 2012 GroupDocs.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.groupdocs.sdk.api;
import com.groupdocs.sdk.common.ApiException;
import com.groupdocs.sdk.common.ApiInvoker;
import com.groupdocs.sdk.common.FileStream;
import com.groupdocs.sdk.model.SignatureTemplateRecipientsResponse;
import com.groupdocs.sdk.model.SignatureStatusResponse;
import com.groupdocs.sdk.model.SignatureSignEnvelopeSettingsInfo;
import com.groupdocs.sdk.model.SignatureContactResponse;
import com.groupdocs.sdk.model.SignatureFormSettingsInfo;
import com.groupdocs.sdk.model.SignatureFormFieldLocationSettingsInfo;
import com.groupdocs.sdk.model.SignatureRolesResponse;
import com.groupdocs.sdk.model.SignatureEnvelopeFieldsResponse;
import com.groupdocs.sdk.model.PublicSignatureSignDocumentSignerSettingsInfo;
import com.groupdocs.sdk.model.SignatureFormDocumentsResponse;
import com.groupdocs.sdk.model.WebhookInfo;
import com.groupdocs.sdk.model.SignatureEnvelopeRecipientResponse;
import com.groupdocs.sdk.model.SignatureSignatureSettingsInfo;
import com.groupdocs.sdk.model.SignatureFormResponse;
import com.groupdocs.sdk.model.SignatureTemplateFieldLocationSettingsInfo;
import com.groupdocs.sdk.model.SignatureFieldSettingsInfo;
import com.groupdocs.sdk.model.SignatureFormDocumentSettingsInfo;
import com.groupdocs.sdk.model.SignatureSignFormSettingsInfo;
import com.groupdocs.sdk.model.SignatureEnvelopeResourcesResponse;
import com.groupdocs.sdk.model.SignatureTemplatesResponse;
import com.groupdocs.sdk.model.SignatureEnvelopeDocumentsResponse;
import com.groupdocs.sdk.model.SignaturePredefinedListSettingsInfo;
import com.groupdocs.sdk.model.SignatureFieldsResponse;
import com.groupdocs.sdk.model.SignatureTemplateFieldsResponse;
import com.groupdocs.sdk.model.SignatureEnvelopeFieldSettingsInfo;
import com.groupdocs.sdk.model.SignatureEnvelopeFieldResponse;
import com.groupdocs.sdk.model.SignatureDocumentFieldsResponse;
import com.groupdocs.sdk.model.SignatureContactsResponse;
import com.groupdocs.sdk.model.SignatureFormsResponse;
import com.groupdocs.sdk.model.SignatureTemplateDocumentResponse;
import com.groupdocs.sdk.model.SignatureFormDocumentResponse;
import com.groupdocs.sdk.model.SignatureEnvelopeSettingsInfo;
import com.groupdocs.sdk.model.SignatureSignDocumentResponse;
import com.groupdocs.sdk.model.SignatureFormAuditLogsResponse;
import com.groupdocs.sdk.model.SignatureFormParticipantsResponse;
import com.groupdocs.sdk.model.SignatureFormResourcesResponse;
import com.groupdocs.sdk.model.SignatureContactsImportResponse;
import com.groupdocs.sdk.model.SignatureFormFieldResponse;
import com.groupdocs.sdk.model.SignatureFormParticipantResponse;
import com.groupdocs.sdk.model.SignatureFormFieldSettingsInfo;
import com.groupdocs.sdk.model.SignatureTemplateResourcesResponse;
import com.groupdocs.sdk.model.SignatureTemplateDocumentsResponse;
import com.groupdocs.sdk.model.SignatureEnvelopeRecipientsResponse;
import com.groupdocs.sdk.model.SignatureSignatureResponse;
import com.groupdocs.sdk.model.SignatureFieldResponse;
import com.groupdocs.sdk.model.SignatureTemplateFieldResponse;
import com.groupdocs.sdk.model.SignatureTemplateRecipientResponse;
import com.groupdocs.sdk.model.SignatureSignDocumentSettingsInfo;
import com.groupdocs.sdk.model.SignatureTemplateSettingsInfo;
import com.groupdocs.sdk.model.SignatureEnvelopeFieldLocationSettingsInfo;
import com.groupdocs.sdk.model.SignatureEnvelopesResponse;
import com.groupdocs.sdk.model.SignatureFormFieldsResponse;
import com.groupdocs.sdk.model.SignatureEnvelopeDocumentResponse;
import com.groupdocs.sdk.model.SignaturePredefinedListResponse;
import com.groupdocs.sdk.model.SignatureContactSettingsInfo;
import com.groupdocs.sdk.model.SignatureSignaturesResponse;
import com.groupdocs.sdk.model.SignatureTemplateAssignFieldSettingsInfo;
import com.groupdocs.sdk.model.SignatureTemplateFieldSettingsInfo;
import com.groupdocs.sdk.model.SignatureVerifyDocumentResponse;
import com.groupdocs.sdk.model.SignaturePredefinedListsResponse;
import com.groupdocs.sdk.model.SignatureEnvelopeAssignFieldSettingsInfo;
import com.groupdocs.sdk.model.SignatureEnvelopeAuditLogsResponse;
import com.groupdocs.sdk.model.SignatureContactIntegrationSettings;
import com.groupdocs.sdk.model.SignatureEnvelopeSendResponse;
import com.groupdocs.sdk.model.SignatureTemplateResponse;
import com.groupdocs.sdk.model.SignatureSignDocumentStatusResponse;
import com.groupdocs.sdk.model.SignatureEnvelopeResponse;
import java.util.*;
public class SignatureApi {
String basePath = "https://api.groupdocs.com/v2.0";
ApiInvoker apiInvoker = ApiInvoker.getInstance();
public ApiInvoker getInvoker() {
return apiInvoker;
}
public void setBasePath(String basePath) {
this.basePath = basePath;
}
public String getBasePath() {
return basePath;
}
public SignatureTemplatesResponse GetSignatureTemplates (String userId, Integer page, Integer records, String documentGuid, String recipientName, String name, String tag) throws ApiException {
// verify required params are set
if(userId == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/templates?records={records}&page={page}&documentGuid={documentGuid}&recipientName={recipientName}&name={name}&tag={tag}".replace("*", "");
int pos = resourcePath.indexOf("?");
if(pos > -1){
resourcePath = resourcePath.substring(0, pos);
}
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
if(!"null".equals(String.valueOf(page)))
queryParams.put("page", String.valueOf(page));
if(!"null".equals(String.valueOf(records)))
queryParams.put("records", String.valueOf(records));
if(!"null".equals(String.valueOf(documentGuid)))
queryParams.put("documentGuid", String.valueOf(documentGuid));
if(!"null".equals(String.valueOf(recipientName)))
queryParams.put("recipientName", String.valueOf(recipientName));
if(!"null".equals(String.valueOf(name)))
queryParams.put("name", String.valueOf(name));
if(!"null".equals(String.valueOf(tag)))
queryParams.put("tag", String.valueOf(tag));
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "GET", queryParams, null, headerParams, String.class);
if(response != null){
return (SignatureTemplatesResponse) ApiInvoker.deserialize(response, "", SignatureTemplatesResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureTemplateResponse GetSignatureTemplate (String userId, String templateGuid) throws ApiException {
// verify required params are set
if(userId == null || templateGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/templates/{templateGuid}".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "templateGuid" + "}", String.valueOf(templateGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "GET", queryParams, null, headerParams, String.class);
if(response != null){
return (SignatureTemplateResponse) ApiInvoker.deserialize(response, "", SignatureTemplateResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureTemplateResponse CreateSignatureTemplate (String userId, String name, String templateGuid, String envelopeGuid, SignatureTemplateSettingsInfo body) throws ApiException {
// verify required params are set
if(userId == null || name == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/template?name={name}&templateId={templateGuid}&envelopeId={envelopeGuid}".replace("*", "");
int pos = resourcePath.indexOf("?");
if(pos > -1){
resourcePath = resourcePath.substring(0, pos);
}
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
if(!"null".equals(String.valueOf(name)))
queryParams.put("name", String.valueOf(name));
if(!"null".equals(String.valueOf(templateGuid)))
queryParams.put("templateId", String.valueOf(templateGuid));
if(!"null".equals(String.valueOf(envelopeGuid)))
queryParams.put("envelopeId", String.valueOf(envelopeGuid));
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "POST", queryParams, body, headerParams, String.class);
if(response != null){
return (SignatureTemplateResponse) ApiInvoker.deserialize(response, "", SignatureTemplateResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureTemplateResponse ModifySignatureTemplate (String userId, String templateGuid, SignatureTemplateSettingsInfo body) throws ApiException {
// verify required params are set
if(userId == null || templateGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/templates/{templateGuid}".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "templateGuid" + "}", String.valueOf(templateGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "POST", queryParams, body, headerParams, String.class);
if(response != null){
return (SignatureTemplateResponse) ApiInvoker.deserialize(response, "", SignatureTemplateResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureTemplateResponse RenameSignatureTemplate (String userId, String templateGuid, String name) throws ApiException {
// verify required params are set
if(userId == null || templateGuid == null || name == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/templates/{templateGuid}?name={name}".replace("*", "");
int pos = resourcePath.indexOf("?");
if(pos > -1){
resourcePath = resourcePath.substring(0, pos);
}
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "templateGuid" + "}", String.valueOf(templateGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
if(!"null".equals(String.valueOf(name)))
queryParams.put("name", String.valueOf(name));
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "PUT", queryParams, null, headerParams, String.class);
if(response != null){
return (SignatureTemplateResponse) ApiInvoker.deserialize(response, "", SignatureTemplateResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureStatusResponse DeleteSignatureTemplate (String userId, String templateGuid) throws ApiException {
// verify required params are set
if(userId == null || templateGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/templates/{templateGuid}".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "templateGuid" + "}", String.valueOf(templateGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "DELETE", queryParams, null, headerParams, String.class);
if(response != null){
return (SignatureStatusResponse) ApiInvoker.deserialize(response, "", SignatureStatusResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureTemplateRecipientResponse AddSignatureTemplateRecipient (String userId, String templateGuid, String nickname, String roleGuid, Integer order) throws ApiException {
// verify required params are set
if(userId == null || templateGuid == null || nickname == null || roleGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/templates/{templateGuid}/recipient?nickname={nickname}&role={roleGuid}&order={order}".replace("*", "");
int pos = resourcePath.indexOf("?");
if(pos > -1){
resourcePath = resourcePath.substring(0, pos);
}
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "templateGuid" + "}", String.valueOf(templateGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
if(!"null".equals(String.valueOf(nickname)))
queryParams.put("nickname", String.valueOf(nickname));
if(!"null".equals(String.valueOf(roleGuid)))
queryParams.put("role", String.valueOf(roleGuid));
if(!"null".equals(String.valueOf(order)))
queryParams.put("order", String.valueOf(order));
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "POST", queryParams, null, headerParams, String.class);
if(response != null){
return (SignatureTemplateRecipientResponse) ApiInvoker.deserialize(response, "", SignatureTemplateRecipientResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureTemplateRecipientsResponse GetSignatureTemplateRecipients (String userId, String templateGuid) throws ApiException {
// verify required params are set
if(userId == null || templateGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/templates/{templateGuid}/recipients".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "templateGuid" + "}", String.valueOf(templateGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "GET", queryParams, null, headerParams, String.class);
if(response != null){
return (SignatureTemplateRecipientsResponse) ApiInvoker.deserialize(response, "", SignatureTemplateRecipientsResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureStatusResponse DeleteSignatureTemplateRecipient (String userId, String templateGuid, String recipientGuid) throws ApiException {
// verify required params are set
if(userId == null || templateGuid == null || recipientGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/templates/{templateGuid}/recipients/{recipientGuid}".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "templateGuid" + "}", String.valueOf(templateGuid)).replace("{" + "recipientGuid" + "}", String.valueOf(recipientGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "DELETE", queryParams, null, headerParams, String.class);
if(response != null){
return (SignatureStatusResponse) ApiInvoker.deserialize(response, "", SignatureStatusResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureTemplateRecipientResponse ModifySignatureTemplateRecipient (String userId, String templateGuid, String recipientGuid, String nickname, String roleGuid, String order) throws ApiException {
// verify required params are set
if(userId == null || templateGuid == null || recipientGuid == null || nickname == null || roleGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/templates/{templateGuid}/recipient/{recipientGuid}?nickname={nickname}&role={roleGuid}&order={order}".replace("*", "");
int pos = resourcePath.indexOf("?");
if(pos > -1){
resourcePath = resourcePath.substring(0, pos);
}
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "templateGuid" + "}", String.valueOf(templateGuid)).replace("{" + "recipientGuid" + "}", String.valueOf(recipientGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
if(!"null".equals(String.valueOf(nickname)))
queryParams.put("nickname", String.valueOf(nickname));
if(!"null".equals(String.valueOf(roleGuid)))
queryParams.put("role", String.valueOf(roleGuid));
if(!"null".equals(String.valueOf(order)))
queryParams.put("order", String.valueOf(order));
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "PUT", queryParams, null, headerParams, String.class);
if(response != null){
return (SignatureTemplateRecipientResponse) ApiInvoker.deserialize(response, "", SignatureTemplateRecipientResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureTemplateDocumentResponse AddSignatureTemplateDocument (String userId, String templateGuid, String documentGuid, Integer order, Boolean parseFields) throws ApiException {
// verify required params are set
if(userId == null || templateGuid == null || documentGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/templates/{templateGuid}/document/{documentGuid}?parseFields={parseFields}&order={order}".replace("*", "");
int pos = resourcePath.indexOf("?");
if(pos > -1){
resourcePath = resourcePath.substring(0, pos);
}
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "templateGuid" + "}", String.valueOf(templateGuid)).replace("{" + "documentGuid" + "}", String.valueOf(documentGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
if(!"null".equals(String.valueOf(order)))
queryParams.put("order", String.valueOf(order));
if(!"null".equals(String.valueOf(parseFields)))
queryParams.put("parseFields", String.valueOf(parseFields));
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "POST", queryParams, null, headerParams, String.class);
if(response != null){
return (SignatureTemplateDocumentResponse) ApiInvoker.deserialize(response, "", SignatureTemplateDocumentResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureTemplateDocumentsResponse GetSignatureTemplateDocuments (String userId, String templateGuid) throws ApiException {
// verify required params are set
if(userId == null || templateGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/templates/{templateGuid}/documents".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "templateGuid" + "}", String.valueOf(templateGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "GET", queryParams, null, headerParams, String.class);
if(response != null){
return (SignatureTemplateDocumentsResponse) ApiInvoker.deserialize(response, "", SignatureTemplateDocumentsResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureStatusResponse DeleteSignatureTemplateDocument (String userId, String templateGuid, String documentGuid) throws ApiException {
// verify required params are set
if(userId == null || templateGuid == null || documentGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/templates/{templateGuid}/documents/{documentGuid}".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "templateGuid" + "}", String.valueOf(templateGuid)).replace("{" + "documentGuid" + "}", String.valueOf(documentGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "DELETE", queryParams, null, headerParams, String.class);
if(response != null){
return (SignatureStatusResponse) ApiInvoker.deserialize(response, "", SignatureStatusResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureTemplateFieldResponse AddSignatureTemplateField (String userId, String templateGuid, String documentGuid, String recipientGuid, String fieldGuid, SignatureTemplateFieldSettingsInfo body) throws ApiException {
// verify required params are set
if(userId == null || templateGuid == null || documentGuid == null || recipientGuid == null || fieldGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/templates/{templateGuid}/documents/{documentGuid}/recipient/{recipientGuid}/field/{fieldGuid}".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "templateGuid" + "}", String.valueOf(templateGuid)).replace("{" + "documentGuid" + "}", String.valueOf(documentGuid)).replace("{" + "recipientGuid" + "}", String.valueOf(recipientGuid)).replace("{" + "fieldGuid" + "}", String.valueOf(fieldGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "POST", queryParams, body, headerParams, String.class);
if(response != null){
return (SignatureTemplateFieldResponse) ApiInvoker.deserialize(response, "", SignatureTemplateFieldResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureTemplateFieldResponse AssignSignatureTemplateField (String userId, String templateGuid, String documentGuid, String fieldGuid, SignatureTemplateAssignFieldSettingsInfo body) throws ApiException {
// verify required params are set
if(userId == null || templateGuid == null || documentGuid == null || fieldGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/templates/{templateGuid}/documents/{documentGuid}/field/{fieldGuid}".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "templateGuid" + "}", String.valueOf(templateGuid)).replace("{" + "documentGuid" + "}", String.valueOf(documentGuid)).replace("{" + "fieldGuid" + "}", String.valueOf(fieldGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "POST", queryParams, body, headerParams, String.class);
if(response != null){
return (SignatureTemplateFieldResponse) ApiInvoker.deserialize(response, "", SignatureTemplateFieldResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureTemplateFieldResponse ModifySignatureTemplateField (String userId, String templateGuid, String documentGuid, String recipientGuid, String fieldGuid, SignatureTemplateFieldSettingsInfo body) throws ApiException {
// verify required params are set
if(userId == null || templateGuid == null || documentGuid == null || recipientGuid == null || fieldGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/templates/{templateGuid}/documents/{documentGuid}/recipientGuid/{recipientGuid}/field/{fieldGuid}".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "templateGuid" + "}", String.valueOf(templateGuid)).replace("{" + "documentGuid" + "}", String.valueOf(documentGuid)).replace("{" + "recipientGuid" + "}", String.valueOf(recipientGuid)).replace("{" + "fieldGuid" + "}", String.valueOf(fieldGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "PUT", queryParams, body, headerParams, String.class);
if(response != null){
return (SignatureTemplateFieldResponse) ApiInvoker.deserialize(response, "", SignatureTemplateFieldResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureStatusResponse DeleteSignatureTemplateFieldLocation (String userId, String templateGuid, String fieldGuid, String locationGuid) throws ApiException {
// verify required params are set
if(userId == null || templateGuid == null || fieldGuid == null || locationGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/templates/{templateGuid}/fields/{fieldGuid}/locations/{locationGuid}".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "templateGuid" + "}", String.valueOf(templateGuid)).replace("{" + "fieldGuid" + "}", String.valueOf(fieldGuid)).replace("{" + "locationGuid" + "}", String.valueOf(locationGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "DELETE", queryParams, null, headerParams, String.class);
if(response != null){
return (SignatureStatusResponse) ApiInvoker.deserialize(response, "", SignatureStatusResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureTemplateFieldResponse ModifySignatureTemplateFieldLocation (String userId, String templateGuid, String documentGuid, String recipientGuid, String fieldGuid, String locationGuid, SignatureTemplateFieldLocationSettingsInfo body) throws ApiException {
// verify required params are set
if(userId == null || templateGuid == null || documentGuid == null || recipientGuid == null || fieldGuid == null || locationGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/templates/{templateGuid}/documents/{documentGuid}/recipient/{recipientGuid}/fields/{fieldGuid}/locations/{locationGuid}".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "templateGuid" + "}", String.valueOf(templateGuid)).replace("{" + "documentGuid" + "}", String.valueOf(documentGuid)).replace("{" + "recipientGuid" + "}", String.valueOf(recipientGuid)).replace("{" + "fieldGuid" + "}", String.valueOf(fieldGuid)).replace("{" + "locationGuid" + "}", String.valueOf(locationGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "PUT", queryParams, body, headerParams, String.class);
if(response != null){
return (SignatureTemplateFieldResponse) ApiInvoker.deserialize(response, "", SignatureTemplateFieldResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureTemplateFieldsResponse GetSignatureTemplateFields (String userId, String templateGuid, String documentGuid, String recipientGuid, String fieldGuid) throws ApiException {
// verify required params are set
if(userId == null || templateGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/templates/{templateGuid}/fields?document={documentGuid}&recipient={recipientGuid}&field={fieldGuid}".replace("*", "");
int pos = resourcePath.indexOf("?");
if(pos > -1){
resourcePath = resourcePath.substring(0, pos);
}
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "templateGuid" + "}", String.valueOf(templateGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
if(!"null".equals(String.valueOf(documentGuid)))
queryParams.put("document", String.valueOf(documentGuid));
if(!"null".equals(String.valueOf(recipientGuid)))
queryParams.put("recipient", String.valueOf(recipientGuid));
if(!"null".equals(String.valueOf(fieldGuid)))
queryParams.put("field", String.valueOf(fieldGuid));
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "GET", queryParams, null, headerParams, String.class);
if(response != null){
return (SignatureTemplateFieldsResponse) ApiInvoker.deserialize(response, "", SignatureTemplateFieldsResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureTemplateResponse DeleteSignatureTemplateField (String userId, String templateGuid, String fieldGuid) throws ApiException {
// verify required params are set
if(userId == null || templateGuid == null || fieldGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/templates/{templateGuid}/fields/{fieldGuid}".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "templateGuid" + "}", String.valueOf(templateGuid)).replace("{" + "fieldGuid" + "}", String.valueOf(fieldGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "DELETE", queryParams, null, headerParams, String.class);
if(response != null){
return (SignatureTemplateResponse) ApiInvoker.deserialize(response, "", SignatureTemplateResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureTemplateResourcesResponse GetSignatureTemplateResources (String userId) throws ApiException {
// verify required params are set
if(userId == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/templates/resources".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "GET", queryParams, null, headerParams, String.class);
if(response != null){
return (SignatureTemplateResourcesResponse) ApiInvoker.deserialize(response, "", SignatureTemplateResourcesResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureTemplateDocumentResponse RenameSignatureTemplateDocument (String userId, String templateGuid, String documentGuid, String newName) throws ApiException {
// verify required params are set
if(userId == null || templateGuid == null || documentGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/templates/{templateGuid}/document/{documentGuid}?newName={newName}".replace("*", "");
int pos = resourcePath.indexOf("?");
if(pos > -1){
resourcePath = resourcePath.substring(0, pos);
}
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "templateGuid" + "}", String.valueOf(templateGuid)).replace("{" + "documentGuid" + "}", String.valueOf(documentGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
if(!"null".equals(String.valueOf(newName)))
queryParams.put("newName", String.valueOf(newName));
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "PUT", queryParams, null, headerParams, String.class);
if(response != null){
return (SignatureTemplateDocumentResponse) ApiInvoker.deserialize(response, "", SignatureTemplateDocumentResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureContactsResponse GetContacts (String userId, Integer page, Integer records, String firstName, String lastName, String email, Boolean useAnd) throws ApiException {
// verify required params are set
if(userId == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/contacts?firstName={firstName}&lastName={lastName}&email={email}&records={records}&page={page}&useAnd={useAnd}".replace("*", "");
int pos = resourcePath.indexOf("?");
if(pos > -1){
resourcePath = resourcePath.substring(0, pos);
}
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
if(!"null".equals(String.valueOf(page)))
queryParams.put("page", String.valueOf(page));
if(!"null".equals(String.valueOf(records)))
queryParams.put("records", String.valueOf(records));
if(!"null".equals(String.valueOf(firstName)))
queryParams.put("firstName", String.valueOf(firstName));
if(!"null".equals(String.valueOf(lastName)))
queryParams.put("lastName", String.valueOf(lastName));
if(!"null".equals(String.valueOf(email)))
queryParams.put("email", String.valueOf(email));
if(!"null".equals(String.valueOf(useAnd)))
queryParams.put("useAnd", String.valueOf(useAnd));
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "GET", queryParams, null, headerParams, String.class);
if(response != null){
return (SignatureContactsResponse) ApiInvoker.deserialize(response, "", SignatureContactsResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureContactResponse AddContact (String userId, SignatureContactSettingsInfo body) throws ApiException {
// verify required params are set
if(userId == null || body == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/contact".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "POST", queryParams, body, headerParams, String.class);
if(response != null){
return (SignatureContactResponse) ApiInvoker.deserialize(response, "", SignatureContactResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureContactResponse ModifyContact (String userId, String contactGuid, SignatureContactSettingsInfo body) throws ApiException {
// verify required params are set
if(userId == null || contactGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/contacts/{contactGuid}".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "contactGuid" + "}", String.valueOf(contactGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "POST", queryParams, body, headerParams, String.class);
if(response != null){
return (SignatureContactResponse) ApiInvoker.deserialize(response, "", SignatureContactResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureContactResponse DeleteContact (String userId, String contactGuid) throws ApiException {
// verify required params are set
if(userId == null || contactGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/contacts/{contactGuid}".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "contactGuid" + "}", String.valueOf(contactGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "DELETE", queryParams, null, headerParams, String.class);
if(response != null){
return (SignatureContactResponse) ApiInvoker.deserialize(response, "", SignatureContactResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureContactsImportResponse ImportContacts (String userId, List body) throws ApiException {
// verify required params are set
if(userId == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/contacts".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "POST", queryParams, body, headerParams, String.class);
if(response != null){
return (SignatureContactsImportResponse) ApiInvoker.deserialize(response, "", SignatureContactsImportResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureStatusResponse AddContactIntegration (String userId, SignatureContactIntegrationSettings body) throws ApiException {
// verify required params are set
if(userId == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/integration".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "POST", queryParams, body, headerParams, String.class);
if(response != null){
return (SignatureStatusResponse) ApiInvoker.deserialize(response, "", SignatureStatusResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureSignDocumentResponse SignDocument (String userId, SignatureSignDocumentSettingsInfo body) throws ApiException {
// verify required params are set
if(userId == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/sign".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "POST", queryParams, body, headerParams, String.class);
if(response != null){
return (SignatureSignDocumentResponse) ApiInvoker.deserialize(response, "", SignatureSignDocumentResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureSignDocumentStatusResponse GetSignDocumentStatus (String userId, String jobGuid) throws ApiException {
// verify required params are set
if(userId == null || jobGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/documents/{jobGuid}/status".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "jobGuid" + "}", String.valueOf(jobGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "GET", queryParams, null, headerParams, String.class);
if(response != null){
return (SignatureSignDocumentStatusResponse) ApiInvoker.deserialize(response, "", SignatureSignDocumentStatusResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureStatusResponse ArchiveSignatureEnvelope (String userId, String envelopeGuid) throws ApiException {
// verify required params are set
if(userId == null || envelopeGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/envelopes/{envelopeGuid}/archive".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "envelopeGuid" + "}", String.valueOf(envelopeGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "PUT", queryParams, null, headerParams, String.class);
if(response != null){
return (SignatureStatusResponse) ApiInvoker.deserialize(response, "", SignatureStatusResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureEnvelopeAuditLogsResponse GetEnvelopeAuditLogs (String userId, String envelopeGuid) throws ApiException {
// verify required params are set
if(userId == null || envelopeGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/envelopes/{envelopeGuid}/logs".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "envelopeGuid" + "}", String.valueOf(envelopeGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "GET", queryParams, null, headerParams, String.class);
if(response != null){
return (SignatureEnvelopeAuditLogsResponse) ApiInvoker.deserialize(response, "", SignatureEnvelopeAuditLogsResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureEnvelopeResponse CreateSignatureEnvelope (String userId, String name, String templateGuid, String envelopeGuid, String documentGuid, Boolean parseFields, SignatureEnvelopeSettingsInfo body) throws ApiException {
// verify required params are set
if(userId == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/envelope?name={name}&templateId={templateGuid}&envelopeId={envelopeGuid}&documentId={documentGuid}&parseFields={parseFields}".replace("*", "");
int pos = resourcePath.indexOf("?");
if(pos > -1){
resourcePath = resourcePath.substring(0, pos);
}
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
if(!"null".equals(String.valueOf(name)))
queryParams.put("name", String.valueOf(name));
if(!"null".equals(String.valueOf(templateGuid)))
queryParams.put("templateId", String.valueOf(templateGuid));
if(!"null".equals(String.valueOf(envelopeGuid)))
queryParams.put("envelopeId", String.valueOf(envelopeGuid));
if(!"null".equals(String.valueOf(documentGuid)))
queryParams.put("documentId", String.valueOf(documentGuid));
if(!"null".equals(String.valueOf(parseFields)))
queryParams.put("parseFields", String.valueOf(parseFields));
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "POST", queryParams, body, headerParams, String.class);
if(response != null){
return (SignatureEnvelopeResponse) ApiInvoker.deserialize(response, "", SignatureEnvelopeResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureStatusResponse DeclineEnvelope (String userId, String envelopeGuid, String recipientGuid) throws ApiException {
// verify required params are set
if(userId == null || envelopeGuid == null || recipientGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/envelopes/{envelopeGuid}/recipient/{recipientGuid}/decline".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "envelopeGuid" + "}", String.valueOf(envelopeGuid)).replace("{" + "recipientGuid" + "}", String.valueOf(recipientGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "PUT", queryParams, null, headerParams, String.class);
if(response != null){
return (SignatureStatusResponse) ApiInvoker.deserialize(response, "", SignatureStatusResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureStatusResponse DelegateEnvelopeRecipient (String userId, String envelopeGuid, String recipientGuid, String recipientEmail, String recipientFirstName, String recipientLastName) throws ApiException {
// verify required params are set
if(userId == null || envelopeGuid == null || recipientGuid == null || recipientEmail == null || recipientFirstName == null || recipientLastName == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/envelopes/{envelopeGuid}/recipient/{recipientGuid}/delegate?email={recipientEmail}&firstname={recipientFirstName}&lastname={recipientLastName}".replace("*", "");
int pos = resourcePath.indexOf("?");
if(pos > -1){
resourcePath = resourcePath.substring(0, pos);
}
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "envelopeGuid" + "}", String.valueOf(envelopeGuid)).replace("{" + "recipientGuid" + "}", String.valueOf(recipientGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
if(!"null".equals(String.valueOf(recipientEmail)))
queryParams.put("email", String.valueOf(recipientEmail));
if(!"null".equals(String.valueOf(recipientFirstName)))
queryParams.put("firstname", String.valueOf(recipientFirstName));
if(!"null".equals(String.valueOf(recipientLastName)))
queryParams.put("lastname", String.valueOf(recipientLastName));
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "POST", queryParams, null, headerParams, String.class);
if(response != null){
return (SignatureStatusResponse) ApiInvoker.deserialize(response, "", SignatureStatusResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureStatusResponse DeleteSignatureEnvelope (String userId, String envelopeGuid) throws ApiException {
// verify required params are set
if(userId == null || envelopeGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/envelopes/{envelopeGuid}".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "envelopeGuid" + "}", String.valueOf(envelopeGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "DELETE", queryParams, null, headerParams, String.class);
if(response != null){
return (SignatureStatusResponse) ApiInvoker.deserialize(response, "", SignatureStatusResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureEnvelopeDocumentResponse AddSignatureEnvelopeDocument (String userId, String envelopeGuid, String documentGuid, Integer order, Boolean parseFields) throws ApiException {
// verify required params are set
if(userId == null || envelopeGuid == null || documentGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/envelopes/{envelopeGuid}/document/{documentGuid}?parseFields={parseFields}&order={order}".replace("*", "");
int pos = resourcePath.indexOf("?");
if(pos > -1){
resourcePath = resourcePath.substring(0, pos);
}
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "envelopeGuid" + "}", String.valueOf(envelopeGuid)).replace("{" + "documentGuid" + "}", String.valueOf(documentGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
if(!"null".equals(String.valueOf(order)))
queryParams.put("order", String.valueOf(order));
if(!"null".equals(String.valueOf(parseFields)))
queryParams.put("parseFields", String.valueOf(parseFields));
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "POST", queryParams, null, headerParams, String.class);
if(response != null){
return (SignatureEnvelopeDocumentResponse) ApiInvoker.deserialize(response, "", SignatureEnvelopeDocumentResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public FileStream GetSignedEnvelopeDocument (String userId, String envelopeGuid, String documentGuid) throws ApiException {
// verify required params are set
if(userId == null || envelopeGuid == null || documentGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/envelopes/{envelopeGuid}/document/{documentGuid}".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "envelopeGuid" + "}", String.valueOf(envelopeGuid)).replace("{" + "documentGuid" + "}", String.valueOf(documentGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
return apiInvoker.invokeAPI(basePath, resourcePath, "GET", queryParams, null, headerParams, FileStream.class);
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureStatusResponse DeleteSignatureEnvelopeDocument (String userId, String envelopeGuid, String documentGuid) throws ApiException {
// verify required params are set
if(userId == null || envelopeGuid == null || documentGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/envelopes/{envelopeGuid}/documents/{documentGuid}".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "envelopeGuid" + "}", String.valueOf(envelopeGuid)).replace("{" + "documentGuid" + "}", String.valueOf(documentGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "DELETE", queryParams, null, headerParams, String.class);
if(response != null){
return (SignatureStatusResponse) ApiInvoker.deserialize(response, "", SignatureStatusResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureEnvelopeDocumentsResponse GetSignatureEnvelopeDocuments (String userId, String envelopeGuid) throws ApiException {
// verify required params are set
if(userId == null || envelopeGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/envelopes/{envelopeGuid}/documents".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "envelopeGuid" + "}", String.valueOf(envelopeGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "GET", queryParams, null, headerParams, String.class);
if(response != null){
return (SignatureEnvelopeDocumentsResponse) ApiInvoker.deserialize(response, "", SignatureEnvelopeDocumentsResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public FileStream GetSignedEnvelopeDocuments (String userId, String envelopeGuid) throws ApiException {
// verify required params are set
if(userId == null || envelopeGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/envelopes/{envelopeGuid}/documents/get".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "envelopeGuid" + "}", String.valueOf(envelopeGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
return apiInvoker.invokeAPI(basePath, resourcePath, "GET", queryParams, null, headerParams, FileStream.class);
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureEnvelopeFieldsResponse AddSignatureEnvelopeField (String userId, String envelopeGuid, String documentGuid, String recipientGuid, String fieldGuid, SignatureEnvelopeFieldSettingsInfo body) throws ApiException {
// verify required params are set
if(userId == null || envelopeGuid == null || documentGuid == null || recipientGuid == null || fieldGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/envelopes/{envelopeGuid}/documents/{documentGuid}/recipient/{recipientGuid}/field/{fieldGuid}".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "envelopeGuid" + "}", String.valueOf(envelopeGuid)).replace("{" + "documentGuid" + "}", String.valueOf(documentGuid)).replace("{" + "recipientGuid" + "}", String.valueOf(recipientGuid)).replace("{" + "fieldGuid" + "}", String.valueOf(fieldGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "POST", queryParams, body, headerParams, String.class);
if(response != null){
return (SignatureEnvelopeFieldsResponse) ApiInvoker.deserialize(response, "", SignatureEnvelopeFieldsResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureEnvelopeFieldResponse AssignSignatureEnvelopeField (String userId, String envelopeGuid, String documentGuid, String fieldGuid, SignatureEnvelopeAssignFieldSettingsInfo body) throws ApiException {
// verify required params are set
if(userId == null || envelopeGuid == null || documentGuid == null || fieldGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/envelopes/{envelopeGuid}/documents/{documentGuid}/field/{fieldGuid}".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "envelopeGuid" + "}", String.valueOf(envelopeGuid)).replace("{" + "documentGuid" + "}", String.valueOf(documentGuid)).replace("{" + "fieldGuid" + "}", String.valueOf(fieldGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "POST", queryParams, body, headerParams, String.class);
if(response != null){
return (SignatureEnvelopeFieldResponse) ApiInvoker.deserialize(response, "", SignatureEnvelopeFieldResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureEnvelopeFieldResponse FillEnvelopeField (String userId, String envelopeGuid, String documentGuid, String recipientGuid, String fieldGuid, String signatureGuid, FileStream body) throws ApiException {
// verify required params are set
if(userId == null || envelopeGuid == null || documentGuid == null || recipientGuid == null || fieldGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/envelopes/{envelopeGuid}/documents/{documentGuid}/recipient/{recipientGuid}/field/{fieldGuid}?signatureId={signatureGuid}".replace("*", "");
int pos = resourcePath.indexOf("?");
if(pos > -1){
resourcePath = resourcePath.substring(0, pos);
}
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "envelopeGuid" + "}", String.valueOf(envelopeGuid)).replace("{" + "documentGuid" + "}", String.valueOf(documentGuid)).replace("{" + "recipientGuid" + "}", String.valueOf(recipientGuid)).replace("{" + "fieldGuid" + "}", String.valueOf(fieldGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
if(!"null".equals(String.valueOf(signatureGuid)))
queryParams.put("signatureId", String.valueOf(signatureGuid));
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "PUT", queryParams, body, headerParams, String.class);
if(response != null){
return (SignatureEnvelopeFieldResponse) ApiInvoker.deserialize(response, "", SignatureEnvelopeFieldResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureEnvelopeFieldResponse ModifySignatureEnvelopeFieldLocation (String userId, String envelopeGuid, String documentGuid, String recipientGuid, String fieldGuid, String locationGuid, SignatureEnvelopeFieldLocationSettingsInfo body) throws ApiException {
// verify required params are set
if(userId == null || envelopeGuid == null || documentGuid == null || recipientGuid == null || fieldGuid == null || locationGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/envelopes/{envelopeGuid}/documents/{documentGuid}/recipient/{recipientGuid}/fields/{fieldGuid}/locations/{locationGuid}".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "envelopeGuid" + "}", String.valueOf(envelopeGuid)).replace("{" + "documentGuid" + "}", String.valueOf(documentGuid)).replace("{" + "recipientGuid" + "}", String.valueOf(recipientGuid)).replace("{" + "fieldGuid" + "}", String.valueOf(fieldGuid)).replace("{" + "locationGuid" + "}", String.valueOf(locationGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "PUT", queryParams, body, headerParams, String.class);
if(response != null){
return (SignatureEnvelopeFieldResponse) ApiInvoker.deserialize(response, "", SignatureEnvelopeFieldResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureStatusResponse DeleteSignatureEnvelopeFieldLocation (String userId, String envelopeGuid, String fieldGuid, String locationGuid) throws ApiException {
// verify required params are set
if(userId == null || envelopeGuid == null || fieldGuid == null || locationGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/envelopes/{envelopeGuid}/fields/{fieldGuid}/locations/{locationGuid}".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "envelopeGuid" + "}", String.valueOf(envelopeGuid)).replace("{" + "fieldGuid" + "}", String.valueOf(fieldGuid)).replace("{" + "locationGuid" + "}", String.valueOf(locationGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "DELETE", queryParams, null, headerParams, String.class);
if(response != null){
return (SignatureStatusResponse) ApiInvoker.deserialize(response, "", SignatureStatusResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureEnvelopeFieldResponse ModifySignatureEnvelopeField (String userId, String envelopeGuid, String documentGuid, String recipientGuid, String fieldGuid, SignatureEnvelopeFieldSettingsInfo body) throws ApiException {
// verify required params are set
if(userId == null || envelopeGuid == null || documentGuid == null || recipientGuid == null || fieldGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/envelopes/{envelopeGuid}/documents/{documentGuid}/recipientGuid/{recipientGuid}/field/{fieldGuid}".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "envelopeGuid" + "}", String.valueOf(envelopeGuid)).replace("{" + "documentGuid" + "}", String.valueOf(documentGuid)).replace("{" + "recipientGuid" + "}", String.valueOf(recipientGuid)).replace("{" + "fieldGuid" + "}", String.valueOf(fieldGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "PUT", queryParams, body, headerParams, String.class);
if(response != null){
return (SignatureEnvelopeFieldResponse) ApiInvoker.deserialize(response, "", SignatureEnvelopeFieldResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureStatusResponse DeleteSignatureEnvelopeField (String userId, String envelopeGuid, String fieldGuid) throws ApiException {
// verify required params are set
if(userId == null || envelopeGuid == null || fieldGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/envelopes/{envelopeGuid}/fields/{fieldGuid}".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "envelopeGuid" + "}", String.valueOf(envelopeGuid)).replace("{" + "fieldGuid" + "}", String.valueOf(fieldGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "DELETE", queryParams, null, headerParams, String.class);
if(response != null){
return (SignatureStatusResponse) ApiInvoker.deserialize(response, "", SignatureStatusResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureEnvelopeFieldsResponse GetSignatureEnvelopeFields (String userId, String envelopeGuid, String documentGuid, String recipientGuid, String fieldGuid) throws ApiException {
// verify required params are set
if(userId == null || envelopeGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/envelopes/{envelopeGuid}/fields?document={documentGuid}&recipient={recipientGuid}&field={fieldGuid}".replace("*", "");
int pos = resourcePath.indexOf("?");
if(pos > -1){
resourcePath = resourcePath.substring(0, pos);
}
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "envelopeGuid" + "}", String.valueOf(envelopeGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
if(!"null".equals(String.valueOf(documentGuid)))
queryParams.put("document", String.valueOf(documentGuid));
if(!"null".equals(String.valueOf(recipientGuid)))
queryParams.put("recipient", String.valueOf(recipientGuid));
if(!"null".equals(String.valueOf(fieldGuid)))
queryParams.put("field", String.valueOf(fieldGuid));
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "GET", queryParams, null, headerParams, String.class);
if(response != null){
return (SignatureEnvelopeFieldsResponse) ApiInvoker.deserialize(response, "", SignatureEnvelopeFieldsResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureEnvelopeResponse GetSignatureEnvelope (String userId, String envelopeGuid) throws ApiException {
// verify required params are set
if(userId == null || envelopeGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/envelopes/{envelopeGuid}".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "envelopeGuid" + "}", String.valueOf(envelopeGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "GET", queryParams, null, headerParams, String.class);
if(response != null){
return (SignatureEnvelopeResponse) ApiInvoker.deserialize(response, "", SignatureEnvelopeResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureEnvelopeResponse ModifySignatureEnvelope (String userId, String envelopeGuid, SignatureEnvelopeSettingsInfo body) throws ApiException {
// verify required params are set
if(userId == null || envelopeGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/envelopes/{envelopeGuid}".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "envelopeGuid" + "}", String.valueOf(envelopeGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "POST", queryParams, body, headerParams, String.class);
if(response != null){
return (SignatureEnvelopeResponse) ApiInvoker.deserialize(response, "", SignatureEnvelopeResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureEnvelopeRecipientResponse AddSignatureEnvelopeRecipient (String userId, String envelopeGuid, String recipientEmail, String recipientFirstName, String recipientLastName, String roleGuid, Integer order) throws ApiException {
// verify required params are set
if(userId == null || envelopeGuid == null || recipientEmail == null || recipientFirstName == null || recipientLastName == null || roleGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/envelopes/{envelopeGuid}/recipient?email={recipientEmail}&firstname={recipientFirstName}&lastname={recipientLastName}&role={roleGuid}&order={order}".replace("*", "");
int pos = resourcePath.indexOf("?");
if(pos > -1){
resourcePath = resourcePath.substring(0, pos);
}
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "envelopeGuid" + "}", String.valueOf(envelopeGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
if(!"null".equals(String.valueOf(recipientEmail)))
queryParams.put("email", String.valueOf(recipientEmail));
if(!"null".equals(String.valueOf(recipientFirstName)))
queryParams.put("firstname", String.valueOf(recipientFirstName));
if(!"null".equals(String.valueOf(recipientLastName)))
queryParams.put("lastname", String.valueOf(recipientLastName));
if(!"null".equals(String.valueOf(roleGuid)))
queryParams.put("role", String.valueOf(roleGuid));
if(!"null".equals(String.valueOf(order)))
queryParams.put("order", String.valueOf(order));
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "POST", queryParams, null, headerParams, String.class);
if(response != null){
return (SignatureEnvelopeRecipientResponse) ApiInvoker.deserialize(response, "", SignatureEnvelopeRecipientResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureEnvelopeRecipientResponse ModifySignatureEnvelopeRecipient (String userId, String envelopeGuid, String recipientGuid, String recipientEmail, String recipientFirstName, String recipientLastName, String roleGuid, Integer order) throws ApiException {
// verify required params are set
if(userId == null || envelopeGuid == null || recipientGuid == null || recipientEmail == null || recipientFirstName == null || recipientLastName == null || roleGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/envelopes/{envelopeGuid}/recipient/{recipientGuid}?email={recipientEmail}&firstname={recipientFirstName}&lastname={recipientLastName}&role={roleGuid}&order={order}".replace("*", "");
int pos = resourcePath.indexOf("?");
if(pos > -1){
resourcePath = resourcePath.substring(0, pos);
}
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "envelopeGuid" + "}", String.valueOf(envelopeGuid)).replace("{" + "recipientGuid" + "}", String.valueOf(recipientGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
if(!"null".equals(String.valueOf(recipientEmail)))
queryParams.put("email", String.valueOf(recipientEmail));
if(!"null".equals(String.valueOf(recipientFirstName)))
queryParams.put("firstname", String.valueOf(recipientFirstName));
if(!"null".equals(String.valueOf(recipientLastName)))
queryParams.put("lastname", String.valueOf(recipientLastName));
if(!"null".equals(String.valueOf(roleGuid)))
queryParams.put("role", String.valueOf(roleGuid));
if(!"null".equals(String.valueOf(order)))
queryParams.put("order", String.valueOf(order));
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "PUT", queryParams, null, headerParams, String.class);
if(response != null){
return (SignatureEnvelopeRecipientResponse) ApiInvoker.deserialize(response, "", SignatureEnvelopeRecipientResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureStatusResponse DeleteSignatureEnvelopeRecipient (String userId, String envelopeGuid, String recipientGuid) throws ApiException {
// verify required params are set
if(userId == null || envelopeGuid == null || recipientGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/envelopes/{envelopeGuid}/recipients/{recipientGuid}".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "envelopeGuid" + "}", String.valueOf(envelopeGuid)).replace("{" + "recipientGuid" + "}", String.valueOf(recipientGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "DELETE", queryParams, null, headerParams, String.class);
if(response != null){
return (SignatureStatusResponse) ApiInvoker.deserialize(response, "", SignatureStatusResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureEnvelopeRecipientsResponse GetSignatureEnvelopeRecipients (String userId, String envelopeGuid) throws ApiException {
// verify required params are set
if(userId == null || envelopeGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/envelopes/{envelopeGuid}/recipients".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "envelopeGuid" + "}", String.valueOf(envelopeGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "GET", queryParams, null, headerParams, String.class);
if(response != null){
return (SignatureEnvelopeRecipientsResponse) ApiInvoker.deserialize(response, "", SignatureEnvelopeRecipientsResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureEnvelopeResponse RenameSignatureEnvelope (String userId, String envelopeGuid, String name) throws ApiException {
// verify required params are set
if(userId == null || envelopeGuid == null || name == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/envelopes/{envelopeGuid}?name={name}".replace("*", "");
int pos = resourcePath.indexOf("?");
if(pos > -1){
resourcePath = resourcePath.substring(0, pos);
}
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "envelopeGuid" + "}", String.valueOf(envelopeGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
if(!"null".equals(String.valueOf(name)))
queryParams.put("name", String.valueOf(name));
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "PUT", queryParams, null, headerParams, String.class);
if(response != null){
return (SignatureEnvelopeResponse) ApiInvoker.deserialize(response, "", SignatureEnvelopeResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureStatusResponse RestartExpiredSignatureEnvelope (String userId, String envelopeGuid) throws ApiException {
// verify required params are set
if(userId == null || envelopeGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/envelopes/{envelopeGuid}/restart".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "envelopeGuid" + "}", String.valueOf(envelopeGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "PUT", queryParams, null, headerParams, String.class);
if(response != null){
return (SignatureStatusResponse) ApiInvoker.deserialize(response, "", SignatureStatusResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureEnvelopeSendResponse SignatureEnvelopeSend (String userId, String envelopeGuid, WebhookInfo body) throws ApiException {
// verify required params are set
if(userId == null || envelopeGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/envelopes/{envelopeGuid}/send".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "envelopeGuid" + "}", String.valueOf(envelopeGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "PUT", queryParams, body, headerParams, String.class);
if(response != null){
return (SignatureEnvelopeSendResponse) ApiInvoker.deserialize(response, "", SignatureEnvelopeSendResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureStatusResponse SignEnvelope (String userId, String envelopeGuid, String recipientGuid, SignatureSignEnvelopeSettingsInfo body) throws ApiException {
// verify required params are set
if(userId == null || envelopeGuid == null || recipientGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/envelopes/{envelopeGuid}/recipient/{recipientGuid}/sign".replace("*", "");
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "envelopeGuid" + "}", String.valueOf(envelopeGuid)).replace("{" + "recipientGuid" + "}", String.valueOf(recipientGuid));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "PUT", queryParams, body, headerParams, String.class);
if(response != null){
return (SignatureStatusResponse) ApiInvoker.deserialize(response, "", SignatureStatusResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureEnvelopesResponse GetSignatureEnvelopes (String userId, Integer statusId, Integer page, Integer records, String originalDocumentMD5, String recipientEmail, String date, String name, String tag) throws ApiException {
// verify required params are set
if(userId == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/envelopes?statusId={statusId}&records={records}&page={page}&document={originalDocumentMD5}&recipient={recipientEmail}&date={date}&name={name}&tag={tag}".replace("*", "");
int pos = resourcePath.indexOf("?");
if(pos > -1){
resourcePath = resourcePath.substring(0, pos);
}
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
if(!"null".equals(String.valueOf(statusId)))
queryParams.put("statusId", String.valueOf(statusId));
if(!"null".equals(String.valueOf(page)))
queryParams.put("page", String.valueOf(page));
if(!"null".equals(String.valueOf(records)))
queryParams.put("records", String.valueOf(records));
if(!"null".equals(String.valueOf(originalDocumentMD5)))
queryParams.put("document", String.valueOf(originalDocumentMD5));
if(!"null".equals(String.valueOf(recipientEmail)))
queryParams.put("recipient", String.valueOf(recipientEmail));
if(!"null".equals(String.valueOf(date)))
queryParams.put("date", String.valueOf(date));
if(!"null".equals(String.valueOf(name)))
queryParams.put("name", String.valueOf(name));
if(!"null".equals(String.valueOf(tag)))
queryParams.put("tag", String.valueOf(tag));
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "GET", queryParams, null, headerParams, String.class);
if(response != null){
return (SignatureEnvelopesResponse) ApiInvoker.deserialize(response, "", SignatureEnvelopesResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureEnvelopeResourcesResponse GetSignatureEnvelopeResources (String userId, String statusIds) throws ApiException {
// verify required params are set
if(userId == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/envelopes/resources?statusIds={statusIds}".replace("*", "");
int pos = resourcePath.indexOf("?");
if(pos > -1){
resourcePath = resourcePath.substring(0, pos);
}
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
if(!"null".equals(String.valueOf(statusIds)))
queryParams.put("statusIds", String.valueOf(statusIds));
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "GET", queryParams, null, headerParams, String.class);
if(response != null){
return (SignatureEnvelopeResourcesResponse) ApiInvoker.deserialize(response, "", SignatureEnvelopeResourcesResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureEnvelopesResponse GetRecipientSignatureEnvelopes (String userId, String statusId, Integer page, Integer records) throws ApiException {
// verify required params are set
if(userId == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/envelopes/recipient?statusId={statusId}&records={records}&page={page}".replace("*", "");
int pos = resourcePath.indexOf("?");
if(pos > -1){
resourcePath = resourcePath.substring(0, pos);
}
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId));
// query params
Map queryParams = new HashMap();
Map headerParams = new HashMap();
if(!"null".equals(String.valueOf(statusId)))
queryParams.put("statusId", String.valueOf(statusId));
if(!"null".equals(String.valueOf(page)))
queryParams.put("page", String.valueOf(page));
if(!"null".equals(String.valueOf(records)))
queryParams.put("records", String.valueOf(records));
try {
String response = apiInvoker.invokeAPI(basePath, resourcePath, "GET", queryParams, null, headerParams, String.class);
if(response != null){
return (SignatureEnvelopesResponse) ApiInvoker.deserialize(response, "", SignatureEnvelopesResponse.class);
}
else {
return null;
}
} catch (ApiException ex) {
if(ex.getCode() == 404) {
return null;
}
else {
throw ex;
}
}
}
public SignatureEnvelopeDocumentResponse RenameSignatureEnvelopeDocument (String userId, String envelopeGuid, String documentGuid, String newName) throws ApiException {
// verify required params are set
if(userId == null || envelopeGuid == null || documentGuid == null ) {
throw new ApiException(400, "missing required params");
}
String resourcePath = "/signature/{userId}/envelopes/{envelopeGuid}/document/{documentGuid}?newName={newName}".replace("*", "");
int pos = resourcePath.indexOf("?");
if(pos > -1){
resourcePath = resourcePath.substring(0, pos);
}
// create path and map variables
resourcePath = resourcePath.replace("{format}","json").replace("{" + "userId" + "}", String.valueOf(userId)).replace("{" + "envelopeGuid" + "}", String.valueOf(envelopeGuid)).replace("{" + "documentGuid" + "}", String.valueOf(documentGuid));
// query params
Map queryParams = new HashMap