com.docusign.admin.api.ReservedDomainsApi Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of docusign-admin-java Show documentation
Show all versions of docusign-admin-java Show documentation
The DocuSign Admin API enables you to automate user management with your existing systems while ensuring governance and compliance.
package com.docusign.admin.api;
import com.docusign.admin.client.ApiClient;
import com.docusign.admin.client.ApiException;
import com.docusign.admin.client.ApiResponse;
import com.docusign.admin.client.Configuration;
import com.docusign.admin.client.Pair;
import com.docusign.admin.model.*;
import jakarta.ws.rs.core.GenericType;
/** ReservedDomainsApi class. */
public class ReservedDomainsApi {
private ApiClient apiClient;
/** ReservedDomainsApi. */
public ReservedDomainsApi() {
this(Configuration.getDefaultApiClient());
}
/** ReservedDomainsApi. */
public ReservedDomainsApi(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 the list of reserved domains for the organization.. Required scopes: domain_read
*
* @param organizationId The organization ID Guid (required)
* @return DomainsResponse
* @throws ApiException if fails to make API call
*/
public DomainsResponse getReservedDomains(java.util.UUID organizationId) throws ApiException {
ApiResponse localVarResponse = getReservedDomainsWithHttpInfo(organizationId);
return localVarResponse.getData();
}
/**
* Returns the list of reserved domains for the organization. Required scopes: domain_read
*
* @param organizationId The organization ID Guid (required)
* @return DomainsResponse
* @throws ApiException if fails to make API call
*/
public ApiResponse getReservedDomainsWithHttpInfo(java.util.UUID organizationId)
throws ApiException {
Object localVarPostBody = "{}";
// verify the required parameter 'organizationId' is set
if (organizationId == null) {
throw new ApiException(
400, "Missing the required parameter 'organizationId' when calling getReservedDomains");
}
// create path and map variables
String localVarPath =
"/v2/organizations/{organizationId}/reserved_domains"
.replaceAll(
"\\{" + "organizationId" + "\\}",
apiClient.escapeString(organizationId.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 = {"application/json"};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] {};
GenericType localVarReturnType = new GenericType() {};
DomainsResponse localVarResponse =
apiClient.invokeAPI(
localVarPath,
"GET",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
return new ApiResponse(
apiClient.getStatusCode(), apiClient.getResponseHeaders(), localVarResponse);
}
}