com.dropbox.sign.api.ReportApi Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dropbox-sign Show documentation
Show all versions of dropbox-sign Show documentation
Use the Dropbox Sign Java SDK to connect your Java app to the service of Dropbox Sign in microseconds!
The newest version!
package com.dropbox.sign.api;
import com.dropbox.sign.ApiException;
import com.dropbox.sign.ApiClient;
import com.dropbox.sign.ApiResponse;
import com.dropbox.sign.Configuration;
import com.dropbox.sign.Pair;
import jakarta.ws.rs.core.GenericType;
import com.dropbox.sign.model.ErrorResponse;
import com.dropbox.sign.model.ReportCreateRequest;
import com.dropbox.sign.model.ReportCreateResponse;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.8.0")
public class ReportApi {
private ApiClient apiClient;
public ReportApi() {
this(Configuration.getDefaultApiClient());
}
public ReportApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Get the API client
*
* @return API client
*/
public ApiClient getApiClient() {
return apiClient;
}
/**
* Set the API client
*
* @param apiClient an instance of API client
*/
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Create Report.
* Request the creation of one or more report(s). When the report(s) have been generated, you will receive an email (one per requested report type) containing a link to download the report as a CSV file. The requested date range may be up to 12 months in duration, and `start_date` must not be more than 10 years in the past.
* @param reportCreateRequest (required)
* @return ReportCreateResponse
* @throws ApiException if fails to make API call
* @http.response.details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/
public ReportCreateResponse reportCreate(ReportCreateRequest reportCreateRequest) throws ApiException {
return reportCreateWithHttpInfo(reportCreateRequest).getData();
}
/**
* Create Report.
* Request the creation of one or more report(s). When the report(s) have been generated, you will receive an email (one per requested report type) containing a link to download the report as a CSV file. The requested date range may be up to 12 months in duration, and `start_date` must not be more than 10 years in the past.
* @param reportCreateRequest (required)
* @return ApiResponse<ReportCreateResponse>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code Description Response Headers
200 successful operation * X-RateLimit-Limit -
* X-RateLimit-Remaining -
* X-Ratelimit-Reset -
4XX failed_operation -
*/
public ApiResponse reportCreateWithHttpInfo(ReportCreateRequest reportCreateRequest) throws ApiException {
// Check required parameters
if (reportCreateRequest == null) {
throw new ApiException(400, "Missing the required parameter 'reportCreateRequest' when calling reportCreate");
}
String localVarAccept = apiClient.selectHeaderAccept("application/json");
Map localVarFormParams = new LinkedHashMap<>();
localVarFormParams = reportCreateRequest.createFormData();
boolean isFileTypeFound = !localVarFormParams.isEmpty();
String localVarContentType = isFileTypeFound? "multipart/form-data" : apiClient.selectHeaderContentType("application/json");
String[] localVarAuthNames = new String[] {"api_key"};
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(
"ReportApi.reportCreate",
"/report/create",
"POST",
new ArrayList<>(),
isFileTypeFound ? null : reportCreateRequest,
new LinkedHashMap<>(),
new LinkedHashMap<>(),
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType,
false
);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy