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.
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 com.docusign.esign.client.ApiClient;
import com.docusign.esign.client.ApiException;
import com.docusign.esign.client.ApiResponse;
import com.docusign.esign.client.Configuration;
import com.docusign.esign.client.Pair;
import com.docusign.esign.model.*;
import jakarta.ws.rs.core.GenericType;
/** PowerFormsApi class. */
public class PowerFormsApi {
private ApiClient apiClient;
/** PowerFormsApi. */
public PowerFormsApi() {
this(Configuration.getDefaultApiClient());
}
/** PowerFormsApi. */
public PowerFormsApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* getApiClient Method.
*
* @return ApiClient
*/
public ApiClient getApiClient() {
return apiClient;
}
/** setApiClient Method. */
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Creates a new PowerForm.. This method creates a new PowerForm. You create a PowerForm from an
* existing DocuSign [template](/docs/esign-rest-api/reference/templates/templates/create/), based
* on the `templateId` in the request body. PowerForms that you create from a template
* are referred to as *web PowerForms*. **Note:** The DocuSign Admin console also supports
* creating a PowerForm by uploading a PDF file that has active form fields (referred to as a *PDF
* PowerForm*). However, PDF PowerForms are deprecated and are not supported in the API. **Note:**
* A PowerForm can have only one sender. (Because PowerForms are not necessarily sent by email,
* this user is also referred to as the PowerForm *initiator*.) If you need to associate multiple
* senders with a PowerForm, create multiple copies of the PowerForm by using the same template
* (one copy for each sender). By default, the sender is the PowerForm Administrator who creates
* the PowerForm. ### Signing modes You can use one of the following signing modes for a
* PowerForm: **`email`** This mode verifies the recipient's identity by using email
* authentication before the recipient can sign a document. The recipient enters their email
* address on the landing page and then clicks **Begin Signing** to begin the signing process. The
* system then sends an email message with a validation code to the recipient. If the recipient
* does not provide a valid email address, they do not receive the email message containing the
* access code and are not able to open and sign the document. Alternatively, you can make the
* process easier for signers by using email authentication only and omitting the access code. To
* do this, you append the `activateonly` flag to the PowerForm URL and set it to true
* by passing in the value `1`. When the flag is active, the first recipient receives an
* email with a link that initiates the signing session without having to enter access code.
* Example: `activateonly=1` **`direct`** This mode does not require any
* verification. After a recipient enters their email address on the landing page and clicks
* **Begin Signing,** a new browser tab opens and the recipient can immediately begin the signing
* process. Because the `direct` signing mode does not verify the recipient's
* identity by using email authentication, we strongly recommend that you use this mode only when
* the PowerForm is accessible behind a secure portal where the recipient's identity is
* already authenticated, or where another form of authentication is specified for the recipient
* in the DocuSign template (for example, an access code, phone authentication, or ID check).
* **Note:** In the account settings, `enablePowerFormDirect` must be **true** to use
* `direct` as the `signingMode`. ### Redirect URLs You can control the URL to
* which signers are redirected after signing your PowerForm. However, the URL is specified
* elsewhere, outside of the PowerForm creation process. For details, see [How do I specify a URL
* to redirect to when a PowerForm is
* completed?](https://support.docusign.com/en/articles/How-do-I-specify-a-URL-to-redirect-to-when-a-Powerform-is-completed).
* ### More information For more information about creating PowerForms, see [Create a
* PowerForm](https://support.docusign.com/en/guides/ndse-user-guide-create-a-powerform).
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param powerForm (optional)
* @return PowerForm
* @throws ApiException if fails to make API call
*/
public PowerForm createPowerForm(String accountId, PowerForm powerForm) throws ApiException {
ApiResponse localVarResponse = createPowerFormWithHttpInfo(accountId, powerForm);
return localVarResponse.getData();
}
/**
* Creates a new PowerForm. This method creates a new PowerForm. You create a PowerForm from an
* existing DocuSign [template](/docs/esign-rest-api/reference/templates/templates/create/), based
* on the `templateId` in the request body. PowerForms that you create from a template
* are referred to as *web PowerForms*. **Note:** The DocuSign Admin console also supports
* creating a PowerForm by uploading a PDF file that has active form fields (referred to as a *PDF
* PowerForm*). However, PDF PowerForms are deprecated and are not supported in the API. **Note:**
* A PowerForm can have only one sender. (Because PowerForms are not necessarily sent by email,
* this user is also referred to as the PowerForm *initiator*.) If you need to associate multiple
* senders with a PowerForm, create multiple copies of the PowerForm by using the same template
* (one copy for each sender). By default, the sender is the PowerForm Administrator who creates
* the PowerForm. ### Signing modes You can use one of the following signing modes for a
* PowerForm: **`email`** This mode verifies the recipient's identity by using email
* authentication before the recipient can sign a document. The recipient enters their email
* address on the landing page and then clicks **Begin Signing** to begin the signing process. The
* system then sends an email message with a validation code to the recipient. If the recipient
* does not provide a valid email address, they do not receive the email message containing the
* access code and are not able to open and sign the document. Alternatively, you can make the
* process easier for signers by using email authentication only and omitting the access code. To
* do this, you append the `activateonly` flag to the PowerForm URL and set it to true
* by passing in the value `1`. When the flag is active, the first recipient receives an
* email with a link that initiates the signing session without having to enter access code.
* Example: `activateonly=1` **`direct`** This mode does not require any
* verification. After a recipient enters their email address on the landing page and clicks
* **Begin Signing,** a new browser tab opens and the recipient can immediately begin the signing
* process. Because the `direct` signing mode does not verify the recipient's
* identity by using email authentication, we strongly recommend that you use this mode only when
* the PowerForm is accessible behind a secure portal where the recipient's identity is
* already authenticated, or where another form of authentication is specified for the recipient
* in the DocuSign template (for example, an access code, phone authentication, or ID check).
* **Note:** In the account settings, `enablePowerFormDirect` must be **true** to use
* `direct` as the `signingMode`. ### Redirect URLs You can control the URL to
* which signers are redirected after signing your PowerForm. However, the URL is specified
* elsewhere, outside of the PowerForm creation process. For details, see [How do I specify a URL
* to redirect to when a PowerForm is
* completed?](https://support.docusign.com/en/articles/How-do-I-specify-a-URL-to-redirect-to-when-a-Powerform-is-completed).
* ### More information For more information about creating PowerForms, see [Create a
* PowerForm](https://support.docusign.com/en/guides/ndse-user-guide-create-a-powerform).
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param powerForm (optional)
* @return PowerForm
* @throws ApiException if fails to make API call
*/
public ApiResponse createPowerFormWithHttpInfo(String accountId, PowerForm powerForm)
throws ApiException {
Object localVarPostBody = powerForm;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(
400, "Missing the required parameter 'accountId' when calling createPowerForm");
}
// create path and map variables
String localVarPath =
"/v2.1/accounts/{accountId}/powerforms"
.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() {};
PowerForm localVarResponse =
apiClient.invokeAPI(
localVarPath,
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
return new ApiResponse(
apiClient.getStatusCode(), apiClient.getResponseHeaders(), localVarResponse);
}
/**
* Delete a PowerForm.. This method deletes a PowerForm.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param powerFormId (required)
* @throws ApiException if fails to make API call
*/
public void deletePowerForm(String accountId, String powerFormId) throws ApiException {
deletePowerFormWithHttpInfo(accountId, powerFormId);
}
/**
* Delete a PowerForm. This method deletes a PowerForm.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param powerFormId (required)
* @throws ApiException if fails to make API call
*/
public ApiResponse