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

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

Go to download

The official DocuSign eSignature JAVA client is based on version 2 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.

There is a newer version: 6.0.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.ApiResponse;
import com.docusign.esign.client.Configuration;
import com.docusign.esign.client.Pair;
import com.docusign.esign.model.*;
import jakarta.ws.rs.core.GenericType;

/** TrustServiceProvidersApi class. */
public class TrustServiceProvidersApi {
  private ApiClient apiClient;

  /** TrustServiceProvidersApi. */
  public TrustServiceProvidersApi() {
    this(Configuration.getDefaultApiClient());
  }

  /** TrustServiceProvidersApi. */
  public TrustServiceProvidersApi(ApiClient apiClient) {
    this.apiClient = apiClient;
  }

  /**
   * getApiClient Method.
   *
   * @return ApiClient
   */
  public ApiClient getApiClient() {
    return apiClient;
  }

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

  /**
   * Returns Account available seals for specified account..
   *
   * @param accountId The external account number (int) or account ID Guid. (required)
   * @return AccountSeals
   * @throws ApiException if fails to make API call
   */
  public AccountSeals getSealProviders(String accountId) throws ApiException {
    ApiResponse localVarResponse = getSealProvidersWithHttpInfo(accountId);
    return localVarResponse.getData();
  }

  /**
   * Returns Account available seals for specified account.
   *
   * @param accountId The external account number (int) or account ID Guid. (required)
   * @return AccountSeals
   * @throws ApiException if fails to make API call
   */
  public ApiResponse getSealProvidersWithHttpInfo(String accountId)
      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 getSealProviders");
    }

    // create path and map variables
    String localVarPath =
        "/v2.1/accounts/{accountId}/seals"
            .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() {};
    AccountSeals localVarResponse =
        apiClient.invokeAPI(
            localVarPath,
            "GET",
            localVarQueryParams,
            localVarCollectionQueryParams,
            localVarPostBody,
            localVarHeaderParams,
            localVarFormParams,
            localVarAccept,
            localVarContentType,
            localVarAuthNames,
            localVarReturnType);
    return new ApiResponse(
        apiClient.getStatusCode(), apiClient.getResponseHeaders(), localVarResponse);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy