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 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;
/** AccountsApi class. */
public class AccountsApi {
private ApiClient apiClient;
/** AccountsApi. */
public AccountsApi() {
this(Configuration.getDefaultApiClient());
}
/** AccountsApi. */
public AccountsApi(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 new accounts. Creates new DocuSign service accounts. This is used to create multiple
// DocuSign accounts with one call. It uses the same information and formats as the normal a
// [Accounts:create](accounts_create) call with the information included within a
// `newAccountRequests` element. A maximum of 100 new accounts can be created at one
// time. Note that the structure of the XML request is slightly different than the JSON request,
// in that the new account information is included in a `newAccountDefinition` property
// inside the `newAccountRequests` element. Response The response returns the new
// account ID, password and the default user information for each newly created account. A 201
// code is returned if the call succeeded. While the call may have succeed, some of the
// individual account requests may have failed. In the case of failures to create the account, an
// `errorDetails` node is added in the response to each specific request that failed.
///
/** CreateOptions Class. */
public class CreateOptions {
private String previewBillingPlan = null;
/** setPreviewBillingPlan method. */
public void setPreviewBillingPlan(String previewBillingPlan) {
this.previewBillingPlan = previewBillingPlan;
}
/**
* getPreviewBillingPlan method.
*
* @return String
*/
public String getPreviewBillingPlan() {
return this.previewBillingPlan;
}
}
/**
* Creates new accounts.. Creates new DocuSign service accounts. This is used to create multiple
* DocuSign accounts with one call. It uses the same information and formats as the normal a
* [Accounts:create](accounts_create) call with the information included within a
* `newAccountRequests` element. A maximum of 100 new accounts can be created at one
* time. Note that the structure of the XML request is slightly different than the JSON request,
* in that the new account information is included in a `newAccountDefinition` property
* inside the `newAccountRequests` element. Response The response returns the new
* account ID, password and the default user information for each newly created account. A 201
* code is returned if the call succeeded. While the call may have succeed, some of the individual
* account requests may have failed. In the case of failures to create the account, an
* `errorDetails` node is added in the response to each specific request that failed.
*
* @param newAccountDefinition (optional)
* @return NewAccountSummary
*/
public NewAccountSummary create(NewAccountDefinition newAccountDefinition) throws ApiException {
return create(newAccountDefinition, null);
}
/**
* Creates new accounts.. Creates new DocuSign service accounts. This is used to create multiple
* DocuSign accounts with one call. It uses the same information and formats as the normal a
* [Accounts:create](accounts_create) call with the information included within a
* `newAccountRequests` element. A maximum of 100 new accounts can be created at one
* time. Note that the structure of the XML request is slightly different than the JSON request,
* in that the new account information is included in a `newAccountDefinition` property
* inside the `newAccountRequests` element. Response The response returns the new
* account ID, password and the default user information for each newly created account. A 201
* code is returned if the call succeeded. While the call may have succeed, some of the individual
* account requests may have failed. In the case of failures to create the account, an
* `errorDetails` node is added in the response to each specific request that failed.
*
* @param newAccountDefinition (optional)
* @param options for modifying the method behavior.
* @return NewAccountSummary
* @throws ApiException if fails to make API call
*/
public NewAccountSummary create(
NewAccountDefinition newAccountDefinition, AccountsApi.CreateOptions options)
throws ApiException {
ApiResponse localVarResponse =
createWithHttpInfo(newAccountDefinition, options);
return localVarResponse.getData();
}
/**
* Creates new accounts. Creates new DocuSign service accounts. This is used to create multiple
* DocuSign accounts with one call. It uses the same information and formats as the normal a
* [Accounts:create](accounts_create) call with the information included within a
* `newAccountRequests` element. A maximum of 100 new accounts can be created at one
* time. Note that the structure of the XML request is slightly different than the JSON request,
* in that the new account information is included in a `newAccountDefinition` property
* inside the `newAccountRequests` element. Response The response returns the new
* account ID, password and the default user information for each newly created account. A 201
* code is returned if the call succeeded. While the call may have succeed, some of the individual
* account requests may have failed. In the case of failures to create the account, an
* `errorDetails` node is added in the response to each specific request that failed.
*
* @param newAccountDefinition (optional)
* @param options for modifying the method behavior.
* @return NewAccountSummary
* @throws ApiException if fails to make API call
*/
public ApiResponse createWithHttpInfo(
NewAccountDefinition newAccountDefinition, AccountsApi.CreateOptions options)
throws ApiException {
Object localVarPostBody = newAccountDefinition;
// create path and map variables
String localVarPath = "/v2.1/accounts";
// 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("preview_billing_plan", options.previewBillingPlan));
}
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() {};
NewAccountSummary localVarResponse =
apiClient.invokeAPI(
localVarPath,
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
return new ApiResponse(
apiClient.getStatusCode(), apiClient.getResponseHeaders(), localVarResponse);
}
///
/// Adds/updates one or more account signatures. This request may include images in multi-part
// format.
///
/** CreateAccountSignaturesOptions Class. */
public class CreateAccountSignaturesOptions {
private String decodeOnly = null;
/** setDecodeOnly method. */
public void setDecodeOnly(String decodeOnly) {
this.decodeOnly = decodeOnly;
}
/**
* getDecodeOnly method.
*
* @return String
*/
public String getDecodeOnly() {
return this.decodeOnly;
}
}
/**
* Adds/updates one or more account signatures. This request may include images in multi-part
* format..
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param accountSignaturesInformation (optional)
* @return AccountSignaturesInformation
*/
public AccountSignaturesInformation createAccountSignatures(
String accountId, AccountSignaturesInformation accountSignaturesInformation)
throws ApiException {
return createAccountSignatures(accountId, accountSignaturesInformation, null);
}
/**
* Adds/updates one or more account signatures. This request may include images in multi-part
* format..
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param accountSignaturesInformation (optional)
* @param options for modifying the method behavior.
* @return AccountSignaturesInformation
* @throws ApiException if fails to make API call
*/
public AccountSignaturesInformation createAccountSignatures(
String accountId,
AccountSignaturesInformation accountSignaturesInformation,
AccountsApi.CreateAccountSignaturesOptions options)
throws ApiException {
ApiResponse localVarResponse =
createAccountSignaturesWithHttpInfo(accountId, accountSignaturesInformation, options);
return localVarResponse.getData();
}
/**
* Adds/updates one or more account signatures. This request may include images in multi-part
* format.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param accountSignaturesInformation (optional)
* @param options for modifying the method behavior.
* @return AccountSignaturesInformation
* @throws ApiException if fails to make API call
*/
public ApiResponse createAccountSignaturesWithHttpInfo(
String accountId,
AccountSignaturesInformation accountSignaturesInformation,
AccountsApi.CreateAccountSignaturesOptions options)
throws ApiException {
Object localVarPostBody = accountSignaturesInformation;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(
400, "Missing the required parameter 'accountId' when calling createAccountSignatures");
}
// create path and map variables
String localVarPath =
"/v2.1/accounts/{accountId}/signatures"
.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();
if (options != null) {
localVarQueryParams.addAll(apiClient.parameterToPair("decode_only", options.decodeOnly));
}
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() {};
AccountSignaturesInformation localVarResponse =
apiClient.invokeAPI(
localVarPath,
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
return new ApiResponse(
apiClient.getStatusCode(), apiClient.getResponseHeaders(), localVarResponse);
}
/**
* Creates one or more brand profile files for the account.. Creates one or more brand profile
* files for the account. The Account Branding feature (accountSettings properties
* `canSelfBrandSend` and `canSelfBrandSig`) must be set to **true** for the
* account to use this call. An error is returned if `brandId` property for a brand
* profile is already set for the account. To upload a new version of an existing brand profile,
* you must delete the profile and then upload the newer version. When brand profile files are
* being uploaded, they must be combined into one zip file and the `Content-Type` must
* be `application/zip`.
*
* @param accountId The external account number (int) or account ID GUID. (required)
* @param brand (optional)
* @return BrandsResponse
* @throws ApiException if fails to make API call
*/
public BrandsResponse createBrand(String accountId, Brand brand) throws ApiException {
ApiResponse localVarResponse = createBrandWithHttpInfo(accountId, brand);
return localVarResponse.getData();
}
/**
* Creates one or more brand profile files for the account. Creates one or more brand profile
* files for the account. The Account Branding feature (accountSettings properties
* `canSelfBrandSend` and `canSelfBrandSig`) must be set to **true** for the
* account to use this call. An error is returned if `brandId` property for a brand
* profile is already set for the account. To upload a new version of an existing brand profile,
* you must delete the profile and then upload the newer version. When brand profile files are
* being uploaded, they must be combined into one zip file and the `Content-Type` must
* be `application/zip`.
*
* @param accountId The external account number (int) or account ID GUID. (required)
* @param brand (optional)
* @return BrandsResponse
* @throws ApiException if fails to make API call
*/
public ApiResponse createBrandWithHttpInfo(String accountId, Brand brand)
throws ApiException {
Object localVarPostBody = brand;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(
400, "Missing the required parameter 'accountId' when calling createBrand");
}
// create path and map variables
String localVarPath =
"/v2.1/accounts/{accountId}/brands"
.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() {};
BrandsResponse localVarResponse =
apiClient.invokeAPI(
localVarPath,
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
return new ApiResponse(
apiClient.getStatusCode(), apiClient.getResponseHeaders(), localVarResponse);
}
///
/// Creates an acount custom field. This method creates a custom field and makes it available for
// all new envelopes associated with an account.
///
/** CreateCustomFieldOptions Class. */
public class CreateCustomFieldOptions {
private String applyToTemplates = null;
/** setApplyToTemplates method. */
public void setApplyToTemplates(String applyToTemplates) {
this.applyToTemplates = applyToTemplates;
}
/**
* getApplyToTemplates method.
*
* @return String
*/
public String getApplyToTemplates() {
return this.applyToTemplates;
}
}
/**
* Creates an acount custom field.. This method creates a custom field and makes it available for
* all new envelopes associated with an account.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param customField (optional)
* @return CustomFields
*/
public CustomFields createCustomField(String accountId, CustomField customField)
throws ApiException {
return createCustomField(accountId, customField, null);
}
/**
* Creates an acount custom field.. This method creates a custom field and makes it available for
* all new envelopes associated with an account.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param customField (optional)
* @param options for modifying the method behavior.
* @return CustomFields
* @throws ApiException if fails to make API call
*/
public CustomFields createCustomField(
String accountId, CustomField customField, AccountsApi.CreateCustomFieldOptions options)
throws ApiException {
ApiResponse localVarResponse =
createCustomFieldWithHttpInfo(accountId, customField, options);
return localVarResponse.getData();
}
/**
* Creates an acount custom field. This method creates a custom field and makes it available for
* all new envelopes associated with an account.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param customField (optional)
* @param options for modifying the method behavior.
* @return CustomFields
* @throws ApiException if fails to make API call
*/
public ApiResponse createCustomFieldWithHttpInfo(
String accountId, CustomField customField, AccountsApi.CreateCustomFieldOptions options)
throws ApiException {
Object localVarPostBody = customField;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(
400, "Missing the required parameter 'accountId' when calling createCustomField");
}
// create path and map variables
String localVarPath =
"/v2.1/accounts/{accountId}/custom_fields"
.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();
if (options != null) {
localVarQueryParams.addAll(
apiClient.parameterToPair("apply_to_templates", options.applyToTemplates));
}
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() {};
CustomFields localVarResponse =
apiClient.invokeAPI(
localVarPath,
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
return new ApiResponse(
apiClient.getStatusCode(), apiClient.getResponseHeaders(), localVarResponse);
}
///
/// Creates a new permission profile in the specified account. This method creates a new
// permission profile for an account. ### Related topics - [How to create a permission
// profile](/docs/esign-rest-api/how-to/permission-profile-creating/)
///
/** CreatePermissionProfileOptions Class. */
public class CreatePermissionProfileOptions {
private String include = null;
/** setInclude method. */
public void setInclude(String include) {
this.include = include;
}
/**
* getInclude method.
*
* @return String
*/
public String getInclude() {
return this.include;
}
}
/**
* Creates a new permission profile in the specified account.. This method creates a new
* permission profile for an account. ### Related topics - [How to create a permission
* profile](/docs/esign-rest-api/how-to/permission-profile-creating/)
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param permissionProfile (optional)
* @return PermissionProfile
*/
public PermissionProfile createPermissionProfile(
String accountId, PermissionProfile permissionProfile) throws ApiException {
return createPermissionProfile(accountId, permissionProfile, null);
}
/**
* Creates a new permission profile in the specified account.. This method creates a new
* permission profile for an account. ### Related topics - [How to create a permission
* profile](/docs/esign-rest-api/how-to/permission-profile-creating/)
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param permissionProfile (optional)
* @param options for modifying the method behavior.
* @return PermissionProfile
* @throws ApiException if fails to make API call
*/
public PermissionProfile createPermissionProfile(
String accountId,
PermissionProfile permissionProfile,
AccountsApi.CreatePermissionProfileOptions options)
throws ApiException {
ApiResponse localVarResponse =
createPermissionProfileWithHttpInfo(accountId, permissionProfile, options);
return localVarResponse.getData();
}
/**
* Creates a new permission profile in the specified account. This method creates a new permission
* profile for an account. ### Related topics - [How to create a permission
* profile](/docs/esign-rest-api/how-to/permission-profile-creating/)
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param permissionProfile (optional)
* @param options for modifying the method behavior.
* @return PermissionProfile
* @throws ApiException if fails to make API call
*/
public ApiResponse createPermissionProfileWithHttpInfo(
String accountId,
PermissionProfile permissionProfile,
AccountsApi.CreatePermissionProfileOptions options)
throws ApiException {
Object localVarPostBody = permissionProfile;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(
400, "Missing the required parameter 'accountId' when calling createPermissionProfile");
}
// create path and map variables
String localVarPath =
"/v2.1/accounts/{accountId}/permission_profiles"
.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();
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() {};
PermissionProfile localVarResponse =
apiClient.invokeAPI(
localVarPath,
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
return new ApiResponse(
apiClient.getStatusCode(), apiClient.getResponseHeaders(), localVarResponse);
}
/**
* Creates the user authorization.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param userId The user ID of the user being accessed. Generally this is the user ID of the
* authenticated user, but if the authenticated user is an Admin on the account, this may be
* another user the Admin user is accessing. (required)
* @param userAuthorizationCreateRequest (optional)
* @return UserAuthorization
* @throws ApiException if fails to make API call
*/
public UserAuthorization createUserAuthorization(
String accountId,
String userId,
UserAuthorizationCreateRequest userAuthorizationCreateRequest)
throws ApiException {
ApiResponse localVarResponse =
createUserAuthorizationWithHttpInfo(accountId, userId, userAuthorizationCreateRequest);
return localVarResponse.getData();
}
/**
* Creates the user authorization
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param userId The user ID of the user being accessed. Generally this is the user ID of the
* authenticated user, but if the authenticated user is an Admin on the account, this may be
* another user the Admin user is accessing. (required)
* @param userAuthorizationCreateRequest (optional)
* @return UserAuthorization
* @throws ApiException if fails to make API call
*/
public ApiResponse createUserAuthorizationWithHttpInfo(
String accountId,
String userId,
UserAuthorizationCreateRequest userAuthorizationCreateRequest)
throws ApiException {
Object localVarPostBody = userAuthorizationCreateRequest;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(
400, "Missing the required parameter 'accountId' when calling createUserAuthorization");
}
// verify the required parameter 'userId' is set
if (userId == null) {
throw new ApiException(
400, "Missing the required parameter 'userId' when calling createUserAuthorization");
}
// create path and map variables
String localVarPath =
"/v2.1/accounts/{accountId}/users/{userId}/authorization"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "userId" + "\\}", apiClient.escapeString(userId.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() {};
UserAuthorization localVarResponse =
apiClient.invokeAPI(
localVarPath,
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
return new ApiResponse(
apiClient.getStatusCode(), apiClient.getResponseHeaders(), localVarResponse);
}
/**
* Creates ot updates user authorizations.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param userId The user ID of the user being accessed. Generally this is the user ID of the
* authenticated user, but if the authenticated user is an Admin on the account, this may be
* another user the Admin user is accessing. (required)
* @param userAuthorizationsRequest (optional)
* @return UserAuthorizationsResponse
* @throws ApiException if fails to make API call
*/
public UserAuthorizationsResponse createUserAuthorizations(
String accountId, String userId, UserAuthorizationsRequest userAuthorizationsRequest)
throws ApiException {
ApiResponse localVarResponse =
createUserAuthorizationsWithHttpInfo(accountId, userId, userAuthorizationsRequest);
return localVarResponse.getData();
}
/**
* Creates ot updates user authorizations
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param userId The user ID of the user being accessed. Generally this is the user ID of the
* authenticated user, but if the authenticated user is an Admin on the account, this may be
* another user the Admin user is accessing. (required)
* @param userAuthorizationsRequest (optional)
* @return UserAuthorizationsResponse
* @throws ApiException if fails to make API call
*/
public ApiResponse createUserAuthorizationsWithHttpInfo(
String accountId, String userId, UserAuthorizationsRequest userAuthorizationsRequest)
throws ApiException {
Object localVarPostBody = userAuthorizationsRequest;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(
400, "Missing the required parameter 'accountId' when calling createUserAuthorizations");
}
// verify the required parameter 'userId' is set
if (userId == null) {
throw new ApiException(
400, "Missing the required parameter 'userId' when calling createUserAuthorizations");
}
// create path and map variables
String localVarPath =
"/v2.1/accounts/{accountId}/users/{userId}/authorizations"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "userId" + "\\}", apiClient.escapeString(userId.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() {};
UserAuthorizationsResponse localVarResponse =
apiClient.invokeAPI(
localVarPath,
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
return new ApiResponse(
apiClient.getStatusCode(), apiClient.getResponseHeaders(), localVarResponse);
}
///
/// Deletes the specified account. This closes the specified account. You must be an account admin
// to close your account. Once closed, an account must be reopened by DocuSign.
///
/** DeleteOptions Class. */
public class DeleteOptions {
private String redactUserData = null;
/** setRedactUserData method. */
public void setRedactUserData(String redactUserData) {
this.redactUserData = redactUserData;
}
/**
* getRedactUserData method.
*
* @return String
*/
public String getRedactUserData() {
return this.redactUserData;
}
}
/**
* Deletes the specified account.. This closes the specified account. You must be an account admin
* to close your account. Once closed, an account must be reopened by DocuSign.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @return void
*/
public void delete(String accountId) throws ApiException {
delete(accountId, null);
}
/**
* Deletes the specified account.. This closes the specified account. You must be an account admin
* to close your account. Once closed, an account must be reopened by DocuSign.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param options for modifying the method behavior.
* @throws ApiException if fails to make API call
*/
public void delete(String accountId, AccountsApi.DeleteOptions options) throws ApiException {
deleteWithHttpInfo(accountId, options);
}
/**
* Deletes the specified account. This closes the specified account. You must be an account admin
* to close your account. Once closed, an account must be reopened by DocuSign.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param options for modifying the method behavior.
* @throws ApiException if fails to make API call
*/
public ApiResponse