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;
/** UsersApi class. */
public class UsersApi {
private ApiClient apiClient;
/** UsersApi. */
public UsersApi() {
this(Configuration.getDefaultApiClient());
}
/** UsersApi. */
public UsersApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* getApiClient Method.
*
* @return ApiClient
*/
public ApiClient getApiClient() {
return apiClient;
}
/** setApiClient Method. */
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
///
/// Retrieves the list of users for the specified account. Retrieves the list of users for the
// specified account. The response returns the list of users for the account along with the
// information about the result set. If the `additional_info` query was added to the
// endpoint and set to **true**, the full user information is returned for each user
///
/** CallListOptions Class. */
public class CallListOptions {
private String additionalInfo = null;
private String alternateAdminsOnly = null;
private String count = null;
private String domainUsersOnly = null;
private String email = null;
private String emailSubstring = null;
private String groupId = null;
private String includeUsersettingsForCsv = null;
private String loginStatus = null;
private String notGroupId = null;
private String startPosition = null;
private String status = null;
private String userNameSubstring = null;
/** setAdditionalInfo method. */
public void setAdditionalInfo(String additionalInfo) {
this.additionalInfo = additionalInfo;
}
/**
* getAdditionalInfo method.
*
* @return String
*/
public String getAdditionalInfo() {
return this.additionalInfo;
}
/** setAlternateAdminsOnly method. */
public void setAlternateAdminsOnly(String alternateAdminsOnly) {
this.alternateAdminsOnly = alternateAdminsOnly;
}
/**
* getAlternateAdminsOnly method.
*
* @return String
*/
public String getAlternateAdminsOnly() {
return this.alternateAdminsOnly;
}
/** setCount method. */
public void setCount(String count) {
this.count = count;
}
/**
* getCount method.
*
* @return String
*/
public String getCount() {
return this.count;
}
/** setDomainUsersOnly method. */
public void setDomainUsersOnly(String domainUsersOnly) {
this.domainUsersOnly = domainUsersOnly;
}
/**
* getDomainUsersOnly method.
*
* @return String
*/
public String getDomainUsersOnly() {
return this.domainUsersOnly;
}
/** setEmail method. */
public void setEmail(String email) {
this.email = email;
}
/**
* getEmail method.
*
* @return String
*/
public String getEmail() {
return this.email;
}
/** setEmailSubstring method. */
public void setEmailSubstring(String emailSubstring) {
this.emailSubstring = emailSubstring;
}
/**
* getEmailSubstring method.
*
* @return String
*/
public String getEmailSubstring() {
return this.emailSubstring;
}
/** setGroupId method. */
public void setGroupId(String groupId) {
this.groupId = groupId;
}
/**
* getGroupId method.
*
* @return String
*/
public String getGroupId() {
return this.groupId;
}
/** setIncludeUsersettingsForCsv method. */
public void setIncludeUsersettingsForCsv(String includeUsersettingsForCsv) {
this.includeUsersettingsForCsv = includeUsersettingsForCsv;
}
/**
* getIncludeUsersettingsForCsv method.
*
* @return String
*/
public String getIncludeUsersettingsForCsv() {
return this.includeUsersettingsForCsv;
}
/** setLoginStatus method. */
public void setLoginStatus(String loginStatus) {
this.loginStatus = loginStatus;
}
/**
* getLoginStatus method.
*
* @return String
*/
public String getLoginStatus() {
return this.loginStatus;
}
/** setNotGroupId method. */
public void setNotGroupId(String notGroupId) {
this.notGroupId = notGroupId;
}
/**
* getNotGroupId method.
*
* @return String
*/
public String getNotGroupId() {
return this.notGroupId;
}
/** setStartPosition method. */
public void setStartPosition(String startPosition) {
this.startPosition = startPosition;
}
/**
* getStartPosition method.
*
* @return String
*/
public String getStartPosition() {
return this.startPosition;
}
/** setStatus method. */
public void setStatus(String status) {
this.status = status;
}
/**
* getStatus method.
*
* @return String
*/
public String getStatus() {
return this.status;
}
/** setUserNameSubstring method. */
public void setUserNameSubstring(String userNameSubstring) {
this.userNameSubstring = userNameSubstring;
}
/**
* getUserNameSubstring method.
*
* @return String
*/
public String getUserNameSubstring() {
return this.userNameSubstring;
}
}
/**
* Retrieves the list of users for the specified account.. Retrieves the list of users for the
* specified account. The response returns the list of users for the account along with the
* information about the result set. If the `additional_info` query was added to the
* endpoint and set to **true**, the full user information is returned for each user
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @return UserInformationList
*/
public UserInformationList callList(String accountId) throws ApiException {
return callList(accountId, null);
}
/**
* Retrieves the list of users for the specified account.. Retrieves the list of users for the
* specified account. The response returns the list of users for the account along with the
* information about the result set. If the `additional_info` query was added to the
* endpoint and set to **true**, the full user information is returned for each user
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param options for modifying the method behavior.
* @return UserInformationList
* @throws ApiException if fails to make API call
*/
public UserInformationList callList(String accountId, UsersApi.CallListOptions options)
throws ApiException {
ApiResponse localVarResponse = callListWithHttpInfo(accountId, options);
return localVarResponse.getData();
}
/**
* Retrieves the list of users for the specified account. Retrieves the list of users for the
* specified account. The response returns the list of users for the account along with the
* information about the result set. If the `additional_info` query was added to the
* endpoint and set to **true**, the full user information is returned for each user
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param options for modifying the method behavior.
* @return UserInformationList
* @throws ApiException if fails to make API call
*/
public ApiResponse callListWithHttpInfo(
String accountId, UsersApi.CallListOptions 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 callList");
}
// create path and map variables
String localVarPath =
"/v2.1/accounts/{accountId}/users"
.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("additional_info", options.additionalInfo));
}
if (options != null) {
localVarQueryParams.addAll(
apiClient.parameterToPair("alternate_admins_only", options.alternateAdminsOnly));
}
if (options != null) {
localVarQueryParams.addAll(apiClient.parameterToPair("count", options.count));
}
if (options != null) {
localVarQueryParams.addAll(
apiClient.parameterToPair("domain_users_only", options.domainUsersOnly));
}
if (options != null) {
localVarQueryParams.addAll(apiClient.parameterToPair("email", options.email));
}
if (options != null) {
localVarQueryParams.addAll(
apiClient.parameterToPair("email_substring", options.emailSubstring));
}
if (options != null) {
localVarQueryParams.addAll(apiClient.parameterToPair("group_id", options.groupId));
}
if (options != null) {
localVarQueryParams.addAll(
apiClient.parameterToPair(
"include_usersettings_for_csv", options.includeUsersettingsForCsv));
}
if (options != null) {
localVarQueryParams.addAll(apiClient.parameterToPair("login_status", options.loginStatus));
}
if (options != null) {
localVarQueryParams.addAll(apiClient.parameterToPair("not_group_id", options.notGroupId));
}
if (options != null) {
localVarQueryParams.addAll(
apiClient.parameterToPair("start_position", options.startPosition));
}
if (options != null) {
localVarQueryParams.addAll(apiClient.parameterToPair("status", options.status));
}
if (options != null) {
localVarQueryParams.addAll(
apiClient.parameterToPair("user_name_substring", options.userNameSubstring));
}
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() {};
UserInformationList localVarResponse =
apiClient.invokeAPI(
localVarPath,
"GET",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
return new ApiResponse(
apiClient.getStatusCode(), apiClient.getResponseHeaders(), localVarResponse);
}
/**
* Adds news user to the specified account.. Adds new users to your account. Set the
* `userSettings` property in the request to specify the actions the users can perform
* on the account.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param newUsersDefinition (optional)
* @return NewUsersSummary
* @throws ApiException if fails to make API call
*/
public NewUsersSummary create(String accountId, NewUsersDefinition newUsersDefinition)
throws ApiException {
ApiResponse localVarResponse =
createWithHttpInfo(accountId, newUsersDefinition);
return localVarResponse.getData();
}
/**
* Adds news user to the specified account. Adds new users to your account. Set the
* `userSettings` property in the request to specify the actions the users can perform
* on the account.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param newUsersDefinition (optional)
* @return NewUsersSummary
* @throws ApiException if fails to make API call
*/
public ApiResponse createWithHttpInfo(
String accountId, NewUsersDefinition newUsersDefinition) throws ApiException {
Object localVarPostBody = newUsersDefinition;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(400, "Missing the required parameter 'accountId' when calling create");
}
// create path and map variables
String localVarPath =
"/v2.1/accounts/{accountId}/users"
.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() {};
NewUsersSummary localVarResponse =
apiClient.invokeAPI(
localVarPath,
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
return new ApiResponse(
apiClient.getStatusCode(), apiClient.getResponseHeaders(), localVarResponse);
}
/**
* Adds user Signature and initials images to a Signature.. Adds a user signature image and/or
* user initials image to the specified user. The userId property specified in the endpoint must
* match the authenticated user's userId and the user must be a member of the account. The
* rules and processes associated with this are: * If Content-Type is set to application/json,
* then the default behavior for creating a default signature image, based on the name and a
* DocuSign font, is used. * If Content-Type is set to multipart/form-data, then the request must
* contain a first part with the user signature information, followed by parts that contain the
* images. For each Image part, the Content-Disposition header has a \"filename\" value
* that is used to map to the `signatureName` and/or `signatureInitials`
* properties in the JSON to the image. For example: `Content-Disposition: file;
* filename=\"Ron Test20121127083900\"` If no matching image (by filename
* value) is found, then the image is not set. One, both, or neither of the signature and initials
* images can be set with this call. The Content-Transfer-Encoding: base64 header, set in the
* header for the part containing the image, can be set to indicate that the images are formatted
* as base64 instead of as binary. If successful, 200-OK is returned, and a JSON structure
* containing the signature information is provided, note that the signatureId can change with
* each API POST, PUT, or DELETE since the changes to the signature structure cause the current
* signature to be closed, and a new signature record to be created.
*
* @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 userSignaturesInformation (optional)
* @return UserSignaturesInformation
* @throws ApiException if fails to make API call
*/
public UserSignaturesInformation createSignatures(
String accountId, String userId, UserSignaturesInformation userSignaturesInformation)
throws ApiException {
ApiResponse localVarResponse =
createSignaturesWithHttpInfo(accountId, userId, userSignaturesInformation);
return localVarResponse.getData();
}
/**
* Adds user Signature and initials images to a Signature. Adds a user signature image and/or user
* initials image to the specified user. The userId property specified in the endpoint must match
* the authenticated user's userId and the user must be a member of the account. The rules and
* processes associated with this are: * If Content-Type is set to application/json, then the
* default behavior for creating a default signature image, based on the name and a DocuSign font,
* is used. * If Content-Type is set to multipart/form-data, then the request must contain a first
* part with the user signature information, followed by parts that contain the images. For each
* Image part, the Content-Disposition header has a \"filename\" value that is used to
* map to the `signatureName` and/or `signatureInitials` properties in the
* JSON to the image. For example: `Content-Disposition: file; filename=\"Ron
* Test20121127083900\"` If no matching image (by filename value) is found, then the
* image is not set. One, both, or neither of the signature and initials images can be set with
* this call. The Content-Transfer-Encoding: base64 header, set in the header for the part
* containing the image, can be set to indicate that the images are formatted as base64 instead of
* as binary. If successful, 200-OK is returned, and a JSON structure containing the signature
* information is provided, note that the signatureId can change with each API POST, PUT, or
* DELETE since the changes to the signature structure cause the current signature to be closed,
* and a new signature record to be created.
*
* @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 userSignaturesInformation (optional)
* @return UserSignaturesInformation
* @throws ApiException if fails to make API call
*/
public ApiResponse createSignaturesWithHttpInfo(
String accountId, String userId, UserSignaturesInformation userSignaturesInformation)
throws ApiException {
Object localVarPostBody = userSignaturesInformation;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(
400, "Missing the required parameter 'accountId' when calling createSignatures");
}
// verify the required parameter 'userId' is set
if (userId == null) {
throw new ApiException(
400, "Missing the required parameter 'userId' when calling createSignatures");
}
// create path and map variables
String localVarPath =
"/v2.1/accounts/{accountId}/users/{userId}/signatures"
.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() {};
UserSignaturesInformation localVarResponse =
apiClient.invokeAPI(
localVarPath,
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
return new ApiResponse(
apiClient.getStatusCode(), apiClient.getResponseHeaders(), localVarResponse);
}
///
/// Removes users account privileges. This closes one or more user records in the account. Users
// are never deleted from an account, but closing a user prevents them from using account
// functions. The response returns whether the API execution was successful (200 - OK) or if it
// failed. The response contains a user structure similar to the request and includes the user
// changes. If an error occurred during the DELETE operation for any of the users, the response
// for that user contains an `errorDetails` node with `errorCode` and
// `message` properties.
///
/** DeleteOptions Class. */
public class DeleteOptions {
private String delete = null;
/** setDelete method. */
public void setDelete(String delete) {
this.delete = delete;
}
/**
* getDelete method.
*
* @return String
*/
public String getDelete() {
return this.delete;
}
}
/**
* Removes users account privileges.. This closes one or more user records in the account. Users
* are never deleted from an account, but closing a user prevents them from using account
* functions. The response returns whether the API execution was successful (200 - OK) or if it
* failed. The response contains a user structure similar to the request and includes the user
* changes. If an error occurred during the DELETE operation for any of the users, the response
* for that user contains an `errorDetails` node with `errorCode` and
* `message` properties.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param userInfoList (optional)
* @return UsersResponse
*/
public UsersResponse delete(String accountId, UserInfoList userInfoList) throws ApiException {
return delete(accountId, userInfoList, null);
}
/**
* Removes users account privileges.. This closes one or more user records in the account. Users
* are never deleted from an account, but closing a user prevents them from using account
* functions. The response returns whether the API execution was successful (200 - OK) or if it
* failed. The response contains a user structure similar to the request and includes the user
* changes. If an error occurred during the DELETE operation for any of the users, the response
* for that user contains an `errorDetails` node with `errorCode` and
* `message` properties.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param userInfoList (optional)
* @param options for modifying the method behavior.
* @return UsersResponse
* @throws ApiException if fails to make API call
*/
public UsersResponse delete(
String accountId, UserInfoList userInfoList, UsersApi.DeleteOptions options)
throws ApiException {
ApiResponse localVarResponse =
deleteWithHttpInfo(accountId, userInfoList, options);
return localVarResponse.getData();
}
/**
* Removes users account privileges. This closes one or more user records in the account. Users
* are never deleted from an account, but closing a user prevents them from using account
* functions. The response returns whether the API execution was successful (200 - OK) or if it
* failed. The response contains a user structure similar to the request and includes the user
* changes. If an error occurred during the DELETE operation for any of the users, the response
* for that user contains an `errorDetails` node with `errorCode` and
* `message` properties.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param userInfoList (optional)
* @param options for modifying the method behavior.
* @return UsersResponse
* @throws ApiException if fails to make API call
*/
public ApiResponse deleteWithHttpInfo(
String accountId, UserInfoList userInfoList, UsersApi.DeleteOptions options)
throws ApiException {
Object localVarPostBody = userInfoList;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(400, "Missing the required parameter 'accountId' when calling delete");
}
// create path and map variables
String localVarPath =
"/v2.1/accounts/{accountId}/users"
.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("delete", options.delete));
}
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() {};
UsersResponse localVarResponse =
apiClient.invokeAPI(
localVarPath,
"DELETE",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
return new ApiResponse(
apiClient.getStatusCode(), apiClient.getResponseHeaders(), localVarResponse);
}
/**
* Replaces a particular contact associated with an account for the DocuSign service.. This method
* deletes a contact associated with an account.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param contactId The unique identifier of a person in the contacts address book. (required)
* @return ContactUpdateResponse
* @throws ApiException if fails to make API call
*/
public ContactUpdateResponse deleteContactWithId(String accountId, String contactId)
throws ApiException {
ApiResponse localVarResponse =
deleteContactWithIdWithHttpInfo(accountId, contactId);
return localVarResponse.getData();
}
/**
* Replaces a particular contact associated with an account for the DocuSign service. This method
* deletes a contact associated with an account.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param contactId The unique identifier of a person in the contacts address book. (required)
* @return ContactUpdateResponse
* @throws ApiException if fails to make API call
*/
public ApiResponse deleteContactWithIdWithHttpInfo(
String accountId, String contactId) 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 deleteContactWithId");
}
// verify the required parameter 'contactId' is set
if (contactId == null) {
throw new ApiException(
400, "Missing the required parameter 'contactId' when calling deleteContactWithId");
}
// create path and map variables
String localVarPath =
"/v2.1/accounts/{accountId}/contacts/{contactId}"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()))
.replaceAll("\\{" + "contactId" + "\\}", apiClient.escapeString(contactId.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() {};
ContactUpdateResponse localVarResponse =
apiClient.invokeAPI(
localVarPath,
"DELETE",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
return new ApiResponse(
apiClient.getStatusCode(), apiClient.getResponseHeaders(), localVarResponse);
}
/**
* Delete contacts associated with an account for the DocuSign service.. This method deletes
* multiple contacts associated with an account.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param contactModRequest (optional)
* @return ContactUpdateResponse
* @throws ApiException if fails to make API call
*/
public ContactUpdateResponse deleteContacts(String accountId, ContactModRequest contactModRequest)
throws ApiException {
ApiResponse localVarResponse =
deleteContactsWithHttpInfo(accountId, contactModRequest);
return localVarResponse.getData();
}
/**
* Delete contacts associated with an account for the DocuSign service. This method deletes
* multiple contacts associated with an account.
*
* @param accountId The external account number (int) or account ID Guid. (required)
* @param contactModRequest (optional)
* @return ContactUpdateResponse
* @throws ApiException if fails to make API call
*/
public ApiResponse deleteContactsWithHttpInfo(
String accountId, ContactModRequest contactModRequest) throws ApiException {
Object localVarPostBody = contactModRequest;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(
400, "Missing the required parameter 'accountId' when calling deleteContacts");
}
// create path and map variables
String localVarPath =
"/v2.1/accounts/{accountId}/contacts"
.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() {};
ContactUpdateResponse localVarResponse =
apiClient.invokeAPI(
localVarPath,
"DELETE",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
return new ApiResponse(
apiClient.getStatusCode(), apiClient.getResponseHeaders(), localVarResponse);
}
/**
* Deletes custom user settings for a specified user.. Deletes the specified custom user settings
* for a single user. ###Deleting Grouped Custom User Settings### If the custom user settings you
* want to delete are grouped, you must include the following information in the header, after
* Content-Type, in the request: `X-DocuSign-User-Settings-Key:group_name` Where the
* `group_name` is your designated name for the group of customer user settings. If the
* extra header information is not included, only the custom user settings that were added without
* a group are deleted.
*
* @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 customSettingsInformation (optional)
* @return CustomSettingsInformation
* @throws ApiException if fails to make API call
*/
public CustomSettingsInformation deleteCustomSettings(
String accountId, String userId, CustomSettingsInformation customSettingsInformation)
throws ApiException {
ApiResponse localVarResponse =
deleteCustomSettingsWithHttpInfo(accountId, userId, customSettingsInformation);
return localVarResponse.getData();
}
/**
* Deletes custom user settings for a specified user. Deletes the specified custom user settings
* for a single user. ###Deleting Grouped Custom User Settings### If the custom user settings you
* want to delete are grouped, you must include the following information in the header, after
* Content-Type, in the request: `X-DocuSign-User-Settings-Key:group_name` Where the
* `group_name` is your designated name for the group of customer user settings. If the
* extra header information is not included, only the custom user settings that were added without
* a group are deleted.
*
* @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 customSettingsInformation (optional)
* @return CustomSettingsInformation
* @throws ApiException if fails to make API call
*/
public ApiResponse deleteCustomSettingsWithHttpInfo(
String accountId, String userId, CustomSettingsInformation customSettingsInformation)
throws ApiException {
Object localVarPostBody = customSettingsInformation;
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(
400, "Missing the required parameter 'accountId' when calling deleteCustomSettings");
}
// verify the required parameter 'userId' is set
if (userId == null) {
throw new ApiException(
400, "Missing the required parameter 'userId' when calling deleteCustomSettings");
}
// create path and map variables
String localVarPath =
"/v2.1/accounts/{accountId}/users/{userId}/custom_settings"
.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() {};
CustomSettingsInformation localVarResponse =
apiClient.invokeAPI(
localVarPath,
"DELETE",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
return new ApiResponse(
apiClient.getStatusCode(), apiClient.getResponseHeaders(), localVarResponse);
}
/**
* Deletes the user profile image for the specified user.. Deletes the user profile image from the
* specified user's profile. The userId parameter specified in the endpoint must match the
* authenticated user's user ID and the user must be a member of the specified account.
*
* @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)
* @throws ApiException if fails to make API call
*/
public void deleteProfileImage(String accountId, String userId) throws ApiException {
deleteProfileImageWithHttpInfo(accountId, userId);
}
/**
* Deletes the user profile image for the specified user. Deletes the user profile image from the
* specified user's profile. The userId parameter specified in the endpoint must match the
* authenticated user's user ID and the user must be a member of the specified account.
*
* @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)
* @throws ApiException if fails to make API call
*/
public ApiResponse