All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.docusign.esign.api.SignatureApi Maven / Gradle / Ivy

There is a newer version: 3.20.0
Show newest version
package com.docusign.esign.api;

import com.docusign.esign.client.ApiClient;
import com.docusign.esign.client.ApiException;
import com.docusign.esign.client.Configuration;
import com.docusign.esign.client.Pair;
import com.docusign.esign.model.*;
import javax.ws.rs.core.GenericType;

public class SignatureApi {
  private ApiClient apiClient;

  public SignatureApi() {
    this(Configuration.getDefaultApiClient());
  }

  public SignatureApi(ApiClient apiClient) {
    this.apiClient = apiClient;
  }

  public ApiClient getApiClient() {
    return apiClient;
  }

  public void setApiClient(ApiClient apiClient) {
    this.apiClient = apiClient;
  }

  /**
   * Complete Sign Hash
   *
   * @param completeSignRequest (optional)
   * @return CompleteSignHashResponse
   * @throws ApiException if fails to make API call
   */
  public CompleteSignHashResponse completeSignHash(CompleteSignRequest completeSignRequest)
      throws ApiException {
    Object localVarPostBody = completeSignRequest;

    // create path and map variables
    String localVarPath = "/v2.1/signature/completesignhash";

    // 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 User Info To Sign Document
   *
   * @return UserInfoResponse
   * @throws ApiException if fails to make API call
   */
  public UserInfoResponse getUserInfo() throws ApiException {
    Object localVarPostBody = "{}";

    // create path and map variables
    String localVarPath = "/v2.1/signature/userInfo";

    // 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,
        "GET",
        localVarQueryParams,
        localVarCollectionQueryParams,
        localVarPostBody,
        localVarHeaderParams,
        localVarFormParams,
        localVarAccept,
        localVarContentType,
        localVarAuthNames,
        localVarReturnType);
  }

  /**
   * Report status from the TSP to DocuSign
   *
   * @param tspHealthCheckRequest (optional)
   * @throws ApiException if fails to make API call
   */
  public void healthCheck(TspHealthCheckRequest tspHealthCheckRequest) throws ApiException {
    Object localVarPostBody = tspHealthCheckRequest;

    // create path and map variables
    String localVarPath = "/v2.1/signature/healthcheck";

    // 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,
        "POST",
        localVarQueryParams,
        localVarCollectionQueryParams,
        localVarPostBody,
        localVarHeaderParams,
        localVarFormParams,
        localVarAccept,
        localVarContentType,
        localVarAuthNames,
        null);
  }

  /**
   * Get Signature Session Info To Sign Document Hash
   *
   * @param signSessionInfoRequest (optional)
   * @return SignHashSessionInfoResponse
   * @throws ApiException if fails to make API call
   */
  public SignHashSessionInfoResponse signHashSessionInfo(
      SignSessionInfoRequest signSessionInfoRequest) throws ApiException {
    Object localVarPostBody = signSessionInfoRequest;

    // create path and map variables
    String localVarPath = "/v2.1/signature/signhashsessioninfo";

    // 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);
  }

  /**
   * Report an error from the tsp to docusign
   *
   * @param updateTransactionRequest (optional)
   * @return UpdateTransactionResponse
   * @throws ApiException if fails to make API call
   */
  public UpdateTransactionResponse updateTransaction(
      UpdateTransactionRequest updateTransactionRequest) throws ApiException {
    Object localVarPostBody = updateTransactionRequest;

    // create path and map variables
    String localVarPath = "/v2.1/signature/updatetransaction";

    // 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);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy