com.docusign.esign.api.TemplatesApi Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of docusign-esign-java Show documentation
Show all versions of docusign-esign-java Show documentation
The official Docusign eSignature JAVA client is based on version 2.1 of the Docusign REST API and provides libraries for JAVA application integration. It is recommended that you use this version of the library for new development.
package com.docusign.esign.api;
import javax.ws.rs.core.GenericType;
import com.docusign.esign.client.ApiException;
import com.docusign.esign.client.ApiClient;
import com.docusign.esign.client.Configuration;
import com.docusign.esign.model.*;
import com.docusign.esign.client.Pair;
public class TemplatesApi {
private ApiClient apiClient;
public TemplatesApi() {
this(Configuration.getDefaultApiClient());
}
public TemplatesApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Creates custom document fields in an existing template document.
* Creates custom document fields in an existing template document.
* @param accountId The external account number (int) or account ID Guid. (required)
* @param templateId The ID of the template being accessed. (required)
* @param templateCustomFields (optional)
* @return CustomFields
* @throws ApiException if fails to make API call
*/
public CustomFields createCustomFields(String accountId, String templateId, TemplateCustomFields templateCustomFields) throws ApiException {
Object localVarPostBody = templateCustomFields;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(400, "Missing the required parameter 'accountId' when calling createCustomFields");
}
// verify the required parameter 'templateId' is set
if (templateId == null) {
throw new ApiException(400, "Missing the required parameter 'templateId' when calling createCustomFields");
}
// create path and map variables
String localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "docusignAccessCode" };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Creates custom document fields in an existing template document.
* Creates custom document fields in an existing template document.
* @param accountId The external account number (int) or account ID Guid. (required)
* @param templateId The ID of the template being accessed. (required)
* @param documentId The ID of the document being accessed. (required)
* @param documentFieldsInformation (optional)
* @return DocumentFieldsInformation
* @throws ApiException if fails to make API call
*/
public DocumentFieldsInformation createDocumentFields(String accountId, String templateId, String documentId, DocumentFieldsInformation documentFieldsInformation) throws ApiException {
Object localVarPostBody = documentFieldsInformation;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(400, "Missing the required parameter 'accountId' when calling createDocumentFields");
}
// verify the required parameter 'templateId' is set
if (templateId == null) {
throw new ApiException(400, "Missing the required parameter 'templateId' when calling createDocumentFields");
}
// verify the required parameter 'documentId' is set
if (documentId == null) {
throw new ApiException(400, "Missing the required parameter 'documentId' when calling createDocumentFields");
}
// create path and map variables
String localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString()))
.replaceAll("\\{" + "documentId" + "\\}", apiClient.escapeString(documentId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "docusignAccessCode" };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Provides a URL to start an edit view of the Template UI
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param templateId The ID of the template being accessed. (required)
* @param returnUrlRequest (optional)
* @return ViewUrl
* @throws ApiException if fails to make API call
*/
public ViewUrl createEditView(String accountId, String templateId, ReturnUrlRequest returnUrlRequest) throws ApiException {
Object localVarPostBody = returnUrlRequest;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(400, "Missing the required parameter 'accountId' when calling createEditView");
}
// verify the required parameter 'templateId' is set
if (templateId == null) {
throw new ApiException(400, "Missing the required parameter 'templateId' when calling createEditView");
}
// create path and map variables
String localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/views/edit"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "docusignAccessCode" };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Lock a template.
* Locks the specified template, and sets the time until the lock expires, to prevent other users or recipients from accessing and changing the template. ###### Note: Users must have envelope locking capability enabled to use this function (the userSetting property `canLockEnvelopes` must be set to **true** for the user).
* @param accountId The external account number (int) or account ID Guid. (required)
* @param templateId The ID of the template being accessed. (required)
* @param lockRequest (optional)
* @return LockInformation
* @throws ApiException if fails to make API call
*/
public LockInformation createLock(String accountId, String templateId, LockRequest lockRequest) throws ApiException {
Object localVarPostBody = lockRequest;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(400, "Missing the required parameter 'accountId' when calling createLock");
}
// verify the required parameter 'templateId' is set
if (templateId == null) {
throw new ApiException(400, "Missing the required parameter 'templateId' when calling createLock");
}
// create path and map variables
String localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/lock"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "docusignAccessCode" };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
///
/// Adds tabs for a recipient. Adds one or more recipients to a template.
///
public class CreateRecipientsOptions
{
private String resendEnvelope = null;
/*
*
*/
public void setResendEnvelope(String resendEnvelope) {
this.resendEnvelope = resendEnvelope;
}
public String getResendEnvelope() {
return this.resendEnvelope;
}
}
/**
* Adds tabs for a recipient.
* Adds one or more recipients to a template.
* @param accountId The external account number (int) or account ID Guid. (required)
* @param templateId The ID of the template being accessed. (required)
* @param templateRecipients (optional)
* @return Recipients
*/
public Recipients createRecipients(String accountId, String templateId, TemplateRecipients templateRecipients) throws ApiException {
return createRecipients(accountId, templateId, templateRecipients, null);
}
/**
* Adds tabs for a recipient.
* Adds one or more recipients to a template.
* @param accountId The external account number (int) or account ID Guid. (required)
* @param templateId The ID of the template being accessed. (required)
* @param templateRecipients (optional)
* @param options for modifying the method behavior.
* @return Recipients
* @throws ApiException if fails to make API call
*/
public Recipients createRecipients(String accountId, String templateId, TemplateRecipients templateRecipients, TemplatesApi.CreateRecipientsOptions options) throws ApiException {
Object localVarPostBody = templateRecipients;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(400, "Missing the required parameter 'accountId' when calling createRecipients");
}
// verify the required parameter 'templateId' is set
if (templateId == null) {
throw new ApiException(400, "Missing the required parameter 'templateId' when calling createRecipients");
}
// create path and map variables
String localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/recipients"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
if (options != null) {
localVarQueryParams.addAll(apiClient.parameterToPair("resend_envelope", options.resendEnvelope));
}
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "docusignAccessCode" };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Adds tabs for a recipient.
* Adds one or more tabs for a recipient.
* @param accountId The external account number (int) or account ID Guid. (required)
* @param templateId The ID of the template being accessed. (required)
* @param recipientId The ID of the recipient being accessed. (required)
* @param templateTabs (optional)
* @return Tabs
* @throws ApiException if fails to make API call
*/
public Tabs createTabs(String accountId, String templateId, String recipientId, TemplateTabs templateTabs) throws ApiException {
Object localVarPostBody = templateTabs;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(400, "Missing the required parameter 'accountId' when calling createTabs");
}
// verify the required parameter 'templateId' is set
if (templateId == null) {
throw new ApiException(400, "Missing the required parameter 'templateId' when calling createTabs");
}
// verify the required parameter 'recipientId' is set
if (recipientId == null) {
throw new ApiException(400, "Missing the required parameter 'recipientId' when calling createTabs");
}
// create path and map variables
String localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString()))
.replaceAll("\\{" + "recipientId" + "\\}", apiClient.escapeString(recipientId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "docusignAccessCode" };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Creates an envelope from a template.
* Creates a template definition using a multipart request. ###Template Email Subject Merge Fields Call this endpoint to insert a recipient name and email address merge fields into the email subject line when creating or sending from a template. The merge fields, based on the recipient's role name, are added to the `emailSubject` property when the template is created or when the template is used to create an envelope. After a template sender adds the name and email information for the recipient and sends the envelope, the recipient information is automatically merged into the appropriate fields in the email subject line. Both the sender and the recipients will see the information in the email subject line for any emails associated with the template. This provides an easy way for senders to organize their envelope emails without having to open an envelope to check the recipient. ###### Note: If merging the recipient information into the subject line causes the subject line to exceed 100 characters, then any characters over the 100 character limit are not included in the subject line. For cases where the recipient name or email is expected to be long, you should consider placing the merge field at the start of the email subject. To add a recipient's name in the subject line add the following text in the `emailSubject` property when creating the template or when sending an envelope from a template: [[<roleName>_UserName]] Example: `\"emailSubject\":\"[[Signer 1_UserName]], Please sign this NDA\",` To add a recipient's email address in the subject line add the following text in the `emailSubject` property when creating the template or when sending an envelope from a template: [[<roleName>_Email]] Example: `\"emailSubject\":\"[[Signer 1_Email]], Please sign this NDA\",` In both cases the <roleName> is the recipient's contents of the `roleName` property in the template. For cases where another recipient (such as an Agent, Editor, or Intermediary recipient) is entering the name and email information for the recipient included in the email subject, then [[<roleName>_UserName]] or [[<roleName>_Email]] is shown in the email subject.
* @param accountId The external account number (int) or account ID Guid. (required)
* @param envelopeTemplate (optional)
* @return TemplateSummary
* @throws ApiException if fails to make API call
*/
public TemplateSummary createTemplate(String accountId, EnvelopeTemplate envelopeTemplate) throws ApiException {
Object localVarPostBody = envelopeTemplate;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(400, "Missing the required parameter 'accountId' when calling createTemplate");
}
// create path and map variables
String localVarPath = "/v2.1/accounts/{accountId}/templates"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "docusignAccessCode" };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Post Responsive HTML Preview for a document in a template.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param templateId The ID of the template being accessed. (required)
* @param documentId The ID of the document being accessed. (required)
* @param documentHtmlDefinition (optional)
* @return DocumentHtmlDefinitions
* @throws ApiException if fails to make API call
*/
public DocumentHtmlDefinitions createTemplateDocumentResponsiveHtmlPreview(String accountId, String templateId, String documentId, DocumentHtmlDefinition documentHtmlDefinition) throws ApiException {
Object localVarPostBody = documentHtmlDefinition;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(400, "Missing the required parameter 'accountId' when calling createTemplateDocumentResponsiveHtmlPreview");
}
// verify the required parameter 'templateId' is set
if (templateId == null) {
throw new ApiException(400, "Missing the required parameter 'templateId' when calling createTemplateDocumentResponsiveHtmlPreview");
}
// verify the required parameter 'documentId' is set
if (documentId == null) {
throw new ApiException(400, "Missing the required parameter 'documentId' when calling createTemplateDocumentResponsiveHtmlPreview");
}
// create path and map variables
String localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/responsive_html_preview"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString()))
.replaceAll("\\{" + "documentId" + "\\}", apiClient.escapeString(documentId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "docusignAccessCode" };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Adds the tabs to a tempate
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param templateId The ID of the template being accessed. (required)
* @param documentId The ID of the document being accessed. (required)
* @param templateTabs (optional)
* @return Tabs
* @throws ApiException if fails to make API call
*/
public Tabs createTemplateDocumentTabs(String accountId, String templateId, String documentId, TemplateTabs templateTabs) throws ApiException {
Object localVarPostBody = templateTabs;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(400, "Missing the required parameter 'accountId' when calling createTemplateDocumentTabs");
}
// verify the required parameter 'templateId' is set
if (templateId == null) {
throw new ApiException(400, "Missing the required parameter 'templateId' when calling createTemplateDocumentTabs");
}
// verify the required parameter 'documentId' is set
if (documentId == null) {
throw new ApiException(400, "Missing the required parameter 'documentId' when calling createTemplateDocumentTabs");
}
// create path and map variables
String localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString()))
.replaceAll("\\{" + "documentId" + "\\}", apiClient.escapeString(documentId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "docusignAccessCode" };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Provides a URL to start a recipient view of the Envelope UI
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param templateId The ID of the template being accessed. (required)
* @param recipientPreviewRequest (optional)
* @return ViewUrl
* @throws ApiException if fails to make API call
*/
public ViewUrl createTemplateRecipientPreview(String accountId, String templateId, RecipientPreviewRequest recipientPreviewRequest) throws ApiException {
Object localVarPostBody = recipientPreviewRequest;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(400, "Missing the required parameter 'accountId' when calling createTemplateRecipientPreview");
}
// verify the required parameter 'templateId' is set
if (templateId == null) {
throw new ApiException(400, "Missing the required parameter 'templateId' when calling createTemplateRecipientPreview");
}
// create path and map variables
String localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/views/recipient_preview"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "docusignAccessCode" };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Get Responsive HTML Preview for all documents in a template.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param templateId The ID of the template being accessed. (required)
* @param documentHtmlDefinition (optional)
* @return DocumentHtmlDefinitions
* @throws ApiException if fails to make API call
*/
public DocumentHtmlDefinitions createTemplateResponsiveHtmlPreview(String accountId, String templateId, DocumentHtmlDefinition documentHtmlDefinition) throws ApiException {
Object localVarPostBody = documentHtmlDefinition;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(400, "Missing the required parameter 'accountId' when calling createTemplateResponsiveHtmlPreview");
}
// verify the required parameter 'templateId' is set
if (templateId == null) {
throw new ApiException(400, "Missing the required parameter 'templateId' when calling createTemplateResponsiveHtmlPreview");
}
// create path and map variables
String localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/responsive_html_preview"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "docusignAccessCode" };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Deletes the bulk recipient list on a template.
* Deletes the bulk recipient list on a template.
* @param accountId The external account number (int) or account ID Guid. (required)
* @param templateId The ID of the template being accessed. (required)
* @param recipientId The ID of the recipient being accessed. (required)
* @return BulkRecipientsUpdateResponse
* @throws ApiException if fails to make API call
*/
public BulkRecipientsUpdateResponse deleteBulkRecipients(String accountId, String templateId, String recipientId) throws ApiException {
Object localVarPostBody = "{}";
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(400, "Missing the required parameter 'accountId' when calling deleteBulkRecipients");
}
// verify the required parameter 'templateId' is set
if (templateId == null) {
throw new ApiException(400, "Missing the required parameter 'templateId' when calling deleteBulkRecipients");
}
// verify the required parameter 'recipientId' is set
if (recipientId == null) {
throw new ApiException(400, "Missing the required parameter 'recipientId' when calling deleteBulkRecipients");
}
// create path and map variables
String localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/bulk_recipients"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString()))
.replaceAll("\\{" + "recipientId" + "\\}", apiClient.escapeString(recipientId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "docusignAccessCode" };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Deletes envelope custom fields in a template.
* Deletes envelope custom fields in a template.
* @param accountId The external account number (int) or account ID Guid. (required)
* @param templateId The ID of the template being accessed. (required)
* @param templateCustomFields (optional)
* @return CustomFields
* @throws ApiException if fails to make API call
*/
public CustomFields deleteCustomFields(String accountId, String templateId, TemplateCustomFields templateCustomFields) throws ApiException {
Object localVarPostBody = templateCustomFields;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(400, "Missing the required parameter 'accountId' when calling deleteCustomFields");
}
// verify the required parameter 'templateId' is set
if (templateId == null) {
throw new ApiException(400, "Missing the required parameter 'templateId' when calling deleteCustomFields");
}
// create path and map variables
String localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/custom_fields"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "docusignAccessCode" };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Deletes custom document fields from an existing template document.
* Deletes custom document fields from an existing template document.
* @param accountId The external account number (int) or account ID Guid. (required)
* @param templateId The ID of the template being accessed. (required)
* @param documentId The ID of the document being accessed. (required)
* @param documentFieldsInformation (optional)
* @return DocumentFieldsInformation
* @throws ApiException if fails to make API call
*/
public DocumentFieldsInformation deleteDocumentFields(String accountId, String templateId, String documentId, DocumentFieldsInformation documentFieldsInformation) throws ApiException {
Object localVarPostBody = documentFieldsInformation;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(400, "Missing the required parameter 'accountId' when calling deleteDocumentFields");
}
// verify the required parameter 'templateId' is set
if (templateId == null) {
throw new ApiException(400, "Missing the required parameter 'templateId' when calling deleteDocumentFields");
}
// verify the required parameter 'documentId' is set
if (documentId == null) {
throw new ApiException(400, "Missing the required parameter 'documentId' when calling deleteDocumentFields");
}
// create path and map variables
String localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/fields"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString()))
.replaceAll("\\{" + "documentId" + "\\}", apiClient.escapeString(documentId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "docusignAccessCode" };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Deletes a page from a document in an template.
* Deletes a page from a document in a template based on the page number.
* @param accountId The external account number (int) or account ID Guid. (required)
* @param templateId The ID of the template being accessed. (required)
* @param documentId The ID of the document being accessed. (required)
* @param pageNumber The page number being accessed. (required)
* @param pageRequest (optional)
* @throws ApiException if fails to make API call
*/
public void deleteDocumentPage(String accountId, String templateId, String documentId, String pageNumber, PageRequest pageRequest) throws ApiException {
Object localVarPostBody = pageRequest;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(400, "Missing the required parameter 'accountId' when calling deleteDocumentPage");
}
// verify the required parameter 'templateId' is set
if (templateId == null) {
throw new ApiException(400, "Missing the required parameter 'templateId' when calling deleteDocumentPage");
}
// verify the required parameter 'documentId' is set
if (documentId == null) {
throw new ApiException(400, "Missing the required parameter 'documentId' when calling deleteDocumentPage");
}
// verify the required parameter 'pageNumber' is set
if (pageNumber == null) {
throw new ApiException(400, "Missing the required parameter 'pageNumber' when calling deleteDocumentPage");
}
// create path and map variables
String localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString()))
.replaceAll("\\{" + "documentId" + "\\}", apiClient.escapeString(documentId.toString()))
.replaceAll("\\{" + "pageNumber" + "\\}", apiClient.escapeString(pageNumber.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "docusignAccessCode" };
apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
/**
* Deletes documents from a template.
* Deletes one or more documents from an existing template.
* @param accountId The external account number (int) or account ID Guid. (required)
* @param templateId The ID of the template being accessed. (required)
* @param envelopeDefinition (optional)
* @return TemplateDocumentsResult
* @throws ApiException if fails to make API call
*/
public TemplateDocumentsResult deleteDocuments(String accountId, String templateId, EnvelopeDefinition envelopeDefinition) throws ApiException {
Object localVarPostBody = envelopeDefinition;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(400, "Missing the required parameter 'accountId' when calling deleteDocuments");
}
// verify the required parameter 'templateId' is set
if (templateId == null) {
throw new ApiException(400, "Missing the required parameter 'templateId' when calling deleteDocuments");
}
// create path and map variables
String localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/documents"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "docusignAccessCode" };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Removes a member group's sharing permissions for a template.
* Removes a member group's sharing permissions for a specified template.
* @param accountId The external account number (int) or account ID Guid. (required)
* @param templateId The ID of the template being accessed. (required)
* @param templatePart Currently, the only defined part is **groups**. (required)
* @param groupInformation (optional)
* @return GroupInformation
* @throws ApiException if fails to make API call
*/
public GroupInformation deleteGroupShare(String accountId, String templateId, String templatePart, GroupInformation groupInformation) throws ApiException {
Object localVarPostBody = groupInformation;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(400, "Missing the required parameter 'accountId' when calling deleteGroupShare");
}
// verify the required parameter 'templateId' is set
if (templateId == null) {
throw new ApiException(400, "Missing the required parameter 'templateId' when calling deleteGroupShare");
}
// verify the required parameter 'templatePart' is set
if (templatePart == null) {
throw new ApiException(400, "Missing the required parameter 'templatePart' when calling deleteGroupShare");
}
// create path and map variables
String localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/{templatePart}"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString()))
.replaceAll("\\{" + "templatePart" + "\\}", apiClient.escapeString(templatePart.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "docusignAccessCode" };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Deletes a template lock.
* Deletes the lock from the specified template. The `X-DocuSign-Edit` header must be included in the request.
* @param accountId The external account number (int) or account ID Guid. (required)
* @param templateId The ID of the template being accessed. (required)
* @param lockRequest (optional)
* @return LockInformation
* @throws ApiException if fails to make API call
*/
public LockInformation deleteLock(String accountId, String templateId, LockRequest lockRequest) throws ApiException {
Object localVarPostBody = lockRequest;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(400, "Missing the required parameter 'accountId' when calling deleteLock");
}
// verify the required parameter 'templateId' is set
if (templateId == null) {
throw new ApiException(400, "Missing the required parameter 'templateId' when calling deleteLock");
}
// create path and map variables
String localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/lock"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "docusignAccessCode" };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Deletes the specified recipient file from a template.
* Deletes the specified recipient file from the specified template.
* @param accountId The external account number (int) or account ID Guid. (required)
* @param templateId The ID of the template being accessed. (required)
* @param recipientId The ID of the recipient being accessed. (required)
* @param templateRecipients (optional)
* @return Recipients
* @throws ApiException if fails to make API call
*/
public Recipients deleteRecipient(String accountId, String templateId, String recipientId, TemplateRecipients templateRecipients) throws ApiException {
Object localVarPostBody = templateRecipients;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(400, "Missing the required parameter 'accountId' when calling deleteRecipient");
}
// verify the required parameter 'templateId' is set
if (templateId == null) {
throw new ApiException(400, "Missing the required parameter 'templateId' when calling deleteRecipient");
}
// verify the required parameter 'recipientId' is set
if (recipientId == null) {
throw new ApiException(400, "Missing the required parameter 'recipientId' when calling deleteRecipient");
}
// create path and map variables
String localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString()))
.replaceAll("\\{" + "recipientId" + "\\}", apiClient.escapeString(recipientId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "docusignAccessCode" };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Deletes recipients from a template.
* Deletes one or more recipients from a template. Recipients to be deleted are listed in the request, with the `recipientId` being used as the key for deleting recipients.
* @param accountId The external account number (int) or account ID Guid. (required)
* @param templateId The ID of the template being accessed. (required)
* @param templateRecipients (optional)
* @return Recipients
* @throws ApiException if fails to make API call
*/
public Recipients deleteRecipients(String accountId, String templateId, TemplateRecipients templateRecipients) throws ApiException {
Object localVarPostBody = templateRecipients;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(400, "Missing the required parameter 'accountId' when calling deleteRecipients");
}
// verify the required parameter 'templateId' is set
if (templateId == null) {
throw new ApiException(400, "Missing the required parameter 'templateId' when calling deleteRecipients");
}
// create path and map variables
String localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/recipients"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "docusignAccessCode" };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Deletes the tabs associated with a recipient in a template.
* Deletes one or more tabs associated with a recipient in a template.
* @param accountId The external account number (int) or account ID Guid. (required)
* @param templateId The ID of the template being accessed. (required)
* @param recipientId The ID of the recipient being accessed. (required)
* @param templateTabs (optional)
* @return Tabs
* @throws ApiException if fails to make API call
*/
public Tabs deleteTabs(String accountId, String templateId, String recipientId, TemplateTabs templateTabs) throws ApiException {
Object localVarPostBody = templateTabs;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(400, "Missing the required parameter 'accountId' when calling deleteTabs");
}
// verify the required parameter 'templateId' is set
if (templateId == null) {
throw new ApiException(400, "Missing the required parameter 'templateId' when calling deleteTabs");
}
// verify the required parameter 'recipientId' is set
if (recipientId == null) {
throw new ApiException(400, "Missing the required parameter 'recipientId' when calling deleteTabs");
}
// create path and map variables
String localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/recipients/{recipientId}/tabs"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString()))
.replaceAll("\\{" + "recipientId" + "\\}", apiClient.escapeString(recipientId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "docusignAccessCode" };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Deletes tabs from an envelope document
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param templateId The ID of the template being accessed. (required)
* @param documentId The ID of the document being accessed. (required)
* @param templateTabs (optional)
* @return Tabs
* @throws ApiException if fails to make API call
*/
public Tabs deleteTemplateDocumentTabs(String accountId, String templateId, String documentId, TemplateTabs templateTabs) throws ApiException {
Object localVarPostBody = templateTabs;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(400, "Missing the required parameter 'accountId' when calling deleteTemplateDocumentTabs");
}
// verify the required parameter 'templateId' is set
if (templateId == null) {
throw new ApiException(400, "Missing the required parameter 'templateId' when calling deleteTemplateDocumentTabs");
}
// verify the required parameter 'documentId' is set
if (documentId == null) {
throw new ApiException(400, "Missing the required parameter 'documentId' when calling deleteTemplateDocumentTabs");
}
// create path and map variables
String localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString()))
.replaceAll("\\{" + "documentId" + "\\}", apiClient.escapeString(documentId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "docusignAccessCode" };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
///
/// Gets a list of templates for a specified account. Retrieves the definition of the specified template.
///
public class GetOptions
{
private String include = null;
/*
*
*/
public void setInclude(String include) {
this.include = include;
}
public String getInclude() {
return this.include;
}
}
/**
* Gets a list of templates for a specified account.
* Retrieves the definition of the specified template.
* @param accountId The external account number (int) or account ID Guid. (required)
* @param templateId The ID of the template being accessed. (required)
* @return EnvelopeTemplate
*/
public EnvelopeTemplate get(String accountId, String templateId) throws ApiException {
return get(accountId, templateId, null);
}
/**
* Gets a list of templates for a specified account.
* Retrieves the definition of the specified template.
* @param accountId The external account number (int) or account ID Guid. (required)
* @param templateId The ID of the template being accessed. (required)
* @param options for modifying the method behavior.
* @return EnvelopeTemplate
* @throws ApiException if fails to make API call
*/
public EnvelopeTemplate get(String accountId, String templateId, TemplatesApi.GetOptions options) throws ApiException {
Object localVarPostBody = "{}";
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(400, "Missing the required parameter 'accountId' when calling get");
}
// verify the required parameter 'templateId' is set
if (templateId == null) {
throw new ApiException(400, "Missing the required parameter 'templateId' when calling get");
}
// create path and map variables
String localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
if (options != null) {
localVarQueryParams.addAll(apiClient.parameterToPair("include", options.include));
}
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "docusignAccessCode" };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
///
/// Gets PDF documents from a template. Retrieves one or more PDF documents from the specified template. You can specify the ID of the document to retrieve or can specify `combined` to retrieve all documents in the template as one pdf.
///
public class GetDocumentOptions
{
private String encrypt = null;
private String showChanges = null;
/*
*
*/
public void setEncrypt(String encrypt) {
this.encrypt = encrypt;
}
public String getEncrypt() {
return this.encrypt;
}
/*
*
*/
public void setShowChanges(String showChanges) {
this.showChanges = showChanges;
}
public String getShowChanges() {
return this.showChanges;
}
}
/**
* Gets PDF documents from a template.
* Retrieves one or more PDF documents from the specified template. You can specify the ID of the document to retrieve or can specify `combined` to retrieve all documents in the template as one pdf.
* @param accountId The external account number (int) or account ID Guid. (required)
* @param templateId The ID of the template being accessed. (required)
* @param documentId The ID of the document being accessed. (required)
* @return byte[]
*/
public byte[] getDocument(String accountId, String templateId, String documentId) throws ApiException {
return getDocument(accountId, templateId, documentId, null);
}
/**
* Gets PDF documents from a template.
* Retrieves one or more PDF documents from the specified template. You can specify the ID of the document to retrieve or can specify `combined` to retrieve all documents in the template as one pdf.
* @param accountId The external account number (int) or account ID Guid. (required)
* @param templateId The ID of the template being accessed. (required)
* @param documentId The ID of the document being accessed. (required)
* @param options for modifying the method behavior.
* @return byte[]
* @throws ApiException if fails to make API call
*/
public byte[] getDocument(String accountId, String templateId, String documentId, TemplatesApi.GetDocumentOptions options) throws ApiException {
Object localVarPostBody = "{}";
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(400, "Missing the required parameter 'accountId' when calling getDocument");
}
// verify the required parameter 'templateId' is set
if (templateId == null) {
throw new ApiException(400, "Missing the required parameter 'templateId' when calling getDocument");
}
// verify the required parameter 'documentId' is set
if (documentId == null) {
throw new ApiException(400, "Missing the required parameter 'documentId' when calling getDocument");
}
// create path and map variables
String localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString()))
.replaceAll("\\{" + "documentId" + "\\}", apiClient.escapeString(documentId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
if (options != null) {
localVarQueryParams.addAll(apiClient.parameterToPair("encrypt", options.encrypt));
}if (options != null) {
localVarQueryParams.addAll(apiClient.parameterToPair("show_changes", options.showChanges));
}
final String[] localVarAccepts = {
"application/pdf"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "docusignAccessCode" };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
///
/// Gets a page image from a template for display. Retrieves a page image for display from the specified template.
///
public class GetDocumentPageImageOptions
{
private String dpi = null;
private String maxHeight = null;
private String maxWidth = null;
private String showChanges = null;
/*
*
*/
public void setDpi(String dpi) {
this.dpi = dpi;
}
public String getDpi() {
return this.dpi;
}
/*
*
*/
public void setMaxHeight(String maxHeight) {
this.maxHeight = maxHeight;
}
public String getMaxHeight() {
return this.maxHeight;
}
/*
*
*/
public void setMaxWidth(String maxWidth) {
this.maxWidth = maxWidth;
}
public String getMaxWidth() {
return this.maxWidth;
}
/*
*
*/
public void setShowChanges(String showChanges) {
this.showChanges = showChanges;
}
public String getShowChanges() {
return this.showChanges;
}
}
/**
* Gets a page image from a template for display.
* Retrieves a page image for display from the specified template.
* @param accountId The external account number (int) or account ID Guid. (required)
* @param templateId The ID of the template being accessed. (required)
* @param documentId The ID of the document being accessed. (required)
* @param pageNumber The page number being accessed. (required)
* @return byte[]
*/
public byte[] getDocumentPageImage(String accountId, String templateId, String documentId, String pageNumber) throws ApiException {
return getDocumentPageImage(accountId, templateId, documentId, pageNumber, null);
}
/**
* Gets a page image from a template for display.
* Retrieves a page image for display from the specified template.
* @param accountId The external account number (int) or account ID Guid. (required)
* @param templateId The ID of the template being accessed. (required)
* @param documentId The ID of the document being accessed. (required)
* @param pageNumber The page number being accessed. (required)
* @param options for modifying the method behavior.
* @return byte[]
* @throws ApiException if fails to make API call
*/
public byte[] getDocumentPageImage(String accountId, String templateId, String documentId, String pageNumber, TemplatesApi.GetDocumentPageImageOptions options) throws ApiException {
Object localVarPostBody = "{}";
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(400, "Missing the required parameter 'accountId' when calling getDocumentPageImage");
}
// verify the required parameter 'templateId' is set
if (templateId == null) {
throw new ApiException(400, "Missing the required parameter 'templateId' when calling getDocumentPageImage");
}
// verify the required parameter 'documentId' is set
if (documentId == null) {
throw new ApiException(400, "Missing the required parameter 'documentId' when calling getDocumentPageImage");
}
// verify the required parameter 'pageNumber' is set
if (pageNumber == null) {
throw new ApiException(400, "Missing the required parameter 'pageNumber' when calling getDocumentPageImage");
}
// create path and map variables
String localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/pages/{pageNumber}/page_image"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString()))
.replaceAll("\\{" + "documentId" + "\\}", apiClient.escapeString(documentId.toString()))
.replaceAll("\\{" + "pageNumber" + "\\}", apiClient.escapeString(pageNumber.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
if (options != null) {
localVarQueryParams.addAll(apiClient.parameterToPair("dpi", options.dpi));
}if (options != null) {
localVarQueryParams.addAll(apiClient.parameterToPair("max_height", options.maxHeight));
}if (options != null) {
localVarQueryParams.addAll(apiClient.parameterToPair("max_width", options.maxWidth));
}if (options != null) {
localVarQueryParams.addAll(apiClient.parameterToPair("show_changes", options.showChanges));
}
final String[] localVarAccepts = {
"image/png"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "docusignAccessCode" };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
///
/// Returns tabs on the document.
///
public class GetDocumentTabsOptions
{
private String pageNumbers = null;
/*
*
*/
public void setPageNumbers(String pageNumbers) {
this.pageNumbers = pageNumbers;
}
public String getPageNumbers() {
return this.pageNumbers;
}
}
/**
* Returns tabs on the document.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param templateId The ID of the template being accessed. (required)
* @param documentId The ID of the document being accessed. (required)
* @return Tabs
*/
public Tabs getDocumentTabs(String accountId, String templateId, String documentId) throws ApiException {
return getDocumentTabs(accountId, templateId, documentId, null);
}
/**
* Returns tabs on the document.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param templateId The ID of the template being accessed. (required)
* @param documentId The ID of the document being accessed. (required)
* @param options for modifying the method behavior.
* @return Tabs
* @throws ApiException if fails to make API call
*/
public Tabs getDocumentTabs(String accountId, String templateId, String documentId, TemplatesApi.GetDocumentTabsOptions options) throws ApiException {
Object localVarPostBody = "{}";
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(400, "Missing the required parameter 'accountId' when calling getDocumentTabs");
}
// verify the required parameter 'templateId' is set
if (templateId == null) {
throw new ApiException(400, "Missing the required parameter 'templateId' when calling getDocumentTabs");
}
// verify the required parameter 'documentId' is set
if (documentId == null) {
throw new ApiException(400, "Missing the required parameter 'documentId' when calling getDocumentTabs");
}
// create path and map variables
String localVarPath = "/v2.1/accounts/{accountId}/templates/{templateId}/documents/{documentId}/tabs"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString()))
.replaceAll("\\{" + "documentId" + "\\}", apiClient.escapeString(documentId.toString()));
// query params
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList