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

com.zuora.api.DataBackfillJobApi Maven / Gradle / Ivy

There is a newer version: 3.2.1
Show newest version
/*
 * Zuora API Reference
 * REST API reference for the Zuora Billing, Payments, and Central Platform! Check out the [REST API Overview](https://www.zuora.com/developer/api-references/api/overview/).
 *
 * The version of the OpenAPI document: 2024-05-20
 * Contact: [email protected]
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package com.zuora.api;

import com.zuora.ApiCallback;
import com.zuora.ApiClient;
import com.zuora.ApiException;
import com.zuora.ApiResponse;
import com.zuora.Configuration;
import com.zuora.Pair;
import com.zuora.ProgressRequestBody;
import com.zuora.ProgressResponseBody;

import com.google.gson.reflect.TypeToken;

import java.io.IOException;


import com.zuora.model.CommonResponse;
import java.io.File;
import com.zuora.model.GETDataBackfillJobById200Response;
import com.zuora.model.GETListDataBackfillJobs200Response;
import com.zuora.model.Job;
import com.zuora.model.JobType;
import com.zuora.model.POSTCreateDataBackfillJob200Response;
import com.zuora.model.PUTStopBookingDateBackfillJobByIdRequest;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class DataBackfillJobApi {
    private ApiClient localVarApiClient;
    private int localHostIndex;
    private String localCustomBaseUrl;

    public DataBackfillJobApi() {
        this(Configuration.getDefaultApiClient());
    }

    public DataBackfillJobApi(ApiClient apiClient) {
        this.localVarApiClient = apiClient;
    }

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

    public void setApiClient(ApiClient apiClient) {
        this.localVarApiClient = apiClient;
    }

    public int getHostIndex() {
        return localHostIndex;
    }

    public void setHostIndex(int hostIndex) {
        this.localHostIndex = hostIndex;
    }

    public String getCustomBaseUrl() {
        return localCustomBaseUrl;
    }

    public void setCustomBaseUrl(String customBaseUrl) {
        this.localCustomBaseUrl = customBaseUrl;
    }

    private okhttp3.Call gETDataBackfillJobByIdCall(String jobId, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/v1/uno/data-backfill/jobs/{jobId}"
            .replace("{" + "jobId" + "}", localVarApiClient.escapeString(jobId.toString()));

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();
        Map localVarHeaderParams = new HashMap();
        Map localVarCookieParams = new HashMap();
        Map localVarFormParams = new HashMap();

        if (zuoraOrgIds != null) {
            localVarHeaderParams.put("Zuora-Org-Ids", localVarApiClient.parameterToString(zuoraOrgIds));
        }

        final String[] localVarAccepts = {
            "application/json"
        };
        final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) {
            localVarHeaderParams.put("Accept", localVarAccept);
        }

        final String[] localVarContentTypes = {
        };
        final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
        if (localVarContentType != null) {
            localVarHeaderParams.put("Content-Type", localVarContentType);
        }

        String[] localVarAuthNames = new String[] { "bearerAuth" };
        return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call gETDataBackfillJobByIdValidateBeforeCall(String jobId, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
        // verify the required parameter 'jobId' is set
        if (jobId == null) {
            throw new ApiException("Missing the required parameter 'jobId' when calling gETDataBackfillJobById(Async)");
        }

        return gETDataBackfillJobByIdCall(jobId, zuoraOrgIds, _callback);

    }

            /**
            * Find Data Backfill job by ID
            * Returns a single Data Backfill job
                * @param jobId ID of job to return (required)
                * @param zuoraOrgIds Comma separated IDs. If you have Zuora Multi-Org enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header. The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. If the header is not set, the operation is performed in scope of the user's accessible orgs.  (optional)
                * @return GETDataBackfillJobById200Response
            * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
                * @http.response.details
                
Status Code Description Response Headers
200 Response of Data Backfill job by ID -
*/ protected GETDataBackfillJobById200Response gETDataBackfillJobById(String jobId, String zuoraOrgIds) throws ApiException { ApiResponse localVarResp = gETDataBackfillJobByIdWithHttpInfo(jobId, zuoraOrgIds); return localVarResp.getData(); } private ApiResponse gETDataBackfillJobByIdWithHttpInfo(String jobId, String zuoraOrgIds) throws ApiException { okhttp3.Call localVarCall = gETDataBackfillJobByIdValidateBeforeCall(jobId, zuoraOrgIds, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call gETDataBackfillJobByIdAsync(String jobId, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = gETDataBackfillJobByIdValidateBeforeCall(jobId, zuoraOrgIds, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class GETDataBackfillJobByIdApi { private final String jobId; private String zuoraOrgIds; private GETDataBackfillJobByIdApi(String jobId) { this.jobId = jobId; } /** * Set zuoraOrgIds * @param zuoraOrgIds Comma separated IDs. If you have Zuora Multi-Org enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header. The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. If the header is not set, the operation is performed in scope of the user's accessible orgs. (optional) * @return GETDataBackfillJobByIdApi */ public GETDataBackfillJobByIdApi zuoraOrgIds(String zuoraOrgIds) { this.zuoraOrgIds = zuoraOrgIds; return this; } /** * Build call for gETDataBackfillJobById * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Response of Data Backfill job by ID -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return gETDataBackfillJobByIdCall(jobId, zuoraOrgIds, _callback); } /** * Execute gETDataBackfillJobById request * @return GETDataBackfillJobById200Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Response of Data Backfill job by ID -
*/ public GETDataBackfillJobById200Response execute() throws ApiException { ApiResponse localVarResp = gETDataBackfillJobByIdWithHttpInfo(jobId, zuoraOrgIds); return localVarResp.getData(); } /** * Execute gETDataBackfillJobById request with HTTP info returned * @return ApiResponse<GETDataBackfillJobById200Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Response of Data Backfill job by ID -
*/ private ApiResponse executeWithHttpInfo() throws ApiException { return gETDataBackfillJobByIdWithHttpInfo(jobId, zuoraOrgIds); } /** * Execute gETDataBackfillJobById request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Response of Data Backfill job by ID -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return gETDataBackfillJobByIdAsync(jobId, zuoraOrgIds, _callback); } } /** * Find Data Backfill job by ID * Returns a single Data Backfill job * @param jobId ID of job to return (required) * @return GETDataBackfillJobByIdApi */ public GETDataBackfillJobByIdApi gETDataBackfillJobByIdApi(String jobId) { return new GETDataBackfillJobByIdApi(jobId); } private okhttp3.Call gETDataBackfillTemplateCall(JobType type, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/v1/uno/data-backfill/jobs/{type}/template" .replace("{" + "type" + "}", localVarApiClient.escapeString(type.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (zuoraOrgIds != null) { localVarHeaderParams.put("Zuora-Org-Ids", localVarApiClient.parameterToString(zuoraOrgIds)); } final String[] localVarAccepts = { "text/csv" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call gETDataBackfillTemplateValidateBeforeCall(JobType type, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { // verify the required parameter 'type' is set if (type == null) { throw new ApiException("Missing the required parameter 'type' when calling gETDataBackfillTemplate(Async)"); } return gETDataBackfillTemplateCall(type, zuoraOrgIds, _callback); } /** * Download a Data Backfill template file * Download a Data Backfill template file by type * @param type Type values of Data Backfill job (required) * @param zuoraOrgIds Comma separated IDs. If you have Zuora Multi-Org enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header. The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. If the header is not set, the operation is performed in scope of the user's accessible orgs. (optional) * @return String * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Successful operation * Content-Disposition - indicating it should be downloaded, prefilled with the value of the filename parameters if present
* Zuora-Request-Id -
*/ protected String gETDataBackfillTemplate(JobType type, String zuoraOrgIds) throws ApiException { ApiResponse localVarResp = gETDataBackfillTemplateWithHttpInfo(type, zuoraOrgIds); return localVarResp.getData(); } private ApiResponse gETDataBackfillTemplateWithHttpInfo(JobType type, String zuoraOrgIds) throws ApiException { okhttp3.Call localVarCall = gETDataBackfillTemplateValidateBeforeCall(type, zuoraOrgIds, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call gETDataBackfillTemplateAsync(JobType type, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = gETDataBackfillTemplateValidateBeforeCall(type, zuoraOrgIds, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class GETDataBackfillTemplateApi { private final JobType type; private String zuoraOrgIds; private GETDataBackfillTemplateApi(JobType type) { this.type = type; } /** * Set zuoraOrgIds * @param zuoraOrgIds Comma separated IDs. If you have Zuora Multi-Org enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header. The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. If the header is not set, the operation is performed in scope of the user's accessible orgs. (optional) * @return GETDataBackfillTemplateApi */ public GETDataBackfillTemplateApi zuoraOrgIds(String zuoraOrgIds) { this.zuoraOrgIds = zuoraOrgIds; return this; } /** * Build call for gETDataBackfillTemplate * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Successful operation * Content-Disposition - indicating it should be downloaded, prefilled with the value of the filename parameters if present
* Zuora-Request-Id -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return gETDataBackfillTemplateCall(type, zuoraOrgIds, _callback); } /** * Execute gETDataBackfillTemplate request * @return String * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Successful operation * Content-Disposition - indicating it should be downloaded, prefilled with the value of the filename parameters if present
* Zuora-Request-Id -
*/ public String execute() throws ApiException { ApiResponse localVarResp = gETDataBackfillTemplateWithHttpInfo(type, zuoraOrgIds); return localVarResp.getData(); } /** * Execute gETDataBackfillTemplate request with HTTP info returned * @return ApiResponse<String> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Successful operation * Content-Disposition - indicating it should be downloaded, prefilled with the value of the filename parameters if present
* Zuora-Request-Id -
*/ private ApiResponse executeWithHttpInfo() throws ApiException { return gETDataBackfillTemplateWithHttpInfo(type, zuoraOrgIds); } /** * Execute gETDataBackfillTemplate request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Successful operation * Content-Disposition - indicating it should be downloaded, prefilled with the value of the filename parameters if present
* Zuora-Request-Id -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return gETDataBackfillTemplateAsync(type, zuoraOrgIds, _callback); } } /** * Download a Data Backfill template file * Download a Data Backfill template file by type * @param type Type values of Data Backfill job (required) * @return GETDataBackfillTemplateApi */ public GETDataBackfillTemplateApi gETDataBackfillTemplateApi(JobType type) { return new GETDataBackfillTemplateApi(type); } private okhttp3.Call gETListDataBackfillJobsCall(final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/v1/uno/date-backfill/listjobs"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call gETListDataBackfillJobsValidateBeforeCall(final ApiCallback _callback) throws ApiException { return gETListDataBackfillJobsCall(_callback); } /** * Query all data backfill jobs * * @return GETListDataBackfillJobs200Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 successful operation -
*/ protected GETListDataBackfillJobs200Response gETListDataBackfillJobs() throws ApiException { ApiResponse localVarResp = gETListDataBackfillJobsWithHttpInfo(); return localVarResp.getData(); } private ApiResponse gETListDataBackfillJobsWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = gETListDataBackfillJobsValidateBeforeCall(null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call gETListDataBackfillJobsAsync(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = gETListDataBackfillJobsValidateBeforeCall(_callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class GETListDataBackfillJobsApi { private GETListDataBackfillJobsApi() { } /** * Build call for gETListDataBackfillJobs * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 successful operation -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return gETListDataBackfillJobsCall(_callback); } /** * Execute gETListDataBackfillJobs request * @return GETListDataBackfillJobs200Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 successful operation -
*/ public GETListDataBackfillJobs200Response execute() throws ApiException { ApiResponse localVarResp = gETListDataBackfillJobsWithHttpInfo(); return localVarResp.getData(); } /** * Execute gETListDataBackfillJobs request with HTTP info returned * @return ApiResponse<GETListDataBackfillJobs200Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 successful operation -
*/ private ApiResponse executeWithHttpInfo() throws ApiException { return gETListDataBackfillJobsWithHttpInfo(); } /** * Execute gETListDataBackfillJobs request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 successful operation -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return gETListDataBackfillJobsAsync(_callback); } } /** * Query all data backfill jobs * * @return GETListDataBackfillJobsApi */ public GETListDataBackfillJobsApi gETListDataBackfillJobsApi() { return new GETListDataBackfillJobsApi(); } private okhttp3.Call pOSTCreateDataBackfillJobCall(Job type, File _file, String checksum, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/v1/uno/data-backfill/jobs"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (type != null) { localVarFormParams.put("type", type); } if (_file != null) { localVarFormParams.put("file", _file); } if (checksum != null) { localVarFormParams.put("checksum", checksum); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "multipart/form-data" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call pOSTCreateDataBackfillJobValidateBeforeCall(Job type, File _file, String checksum, final ApiCallback _callback) throws ApiException { // verify the required parameter 'type' is set if (type == null) { throw new ApiException("Missing the required parameter 'type' when calling pOSTCreateDataBackfillJob(Async)"); } // verify the required parameter '_file' is set if (_file == null) { throw new ApiException("Missing the required parameter '_file' when calling pOSTCreateDataBackfillJob(Async)"); } return pOSTCreateDataBackfillJobCall(type, _file, checksum, _callback); } /** * Create a new Data Backfil job * A Data Backfill type and file are required * @param type (required) * @param _file File containing data about the data you want to backfill. The file must be a `.csv` file or a zipped `.csv` file. The maximum file size is 4 MB. The data in the file must be formatted according to the Data Backfill type you want to perform. (required) * @param checksum An MD5 checksum that is used to validate the integrity of the uploaded file. (optional) * @return POSTCreateDataBackfillJob200Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 upload response -
*/ protected POSTCreateDataBackfillJob200Response pOSTCreateDataBackfillJob(Job type, File _file, String checksum) throws ApiException { ApiResponse localVarResp = pOSTCreateDataBackfillJobWithHttpInfo(type, _file, checksum); return localVarResp.getData(); } private ApiResponse pOSTCreateDataBackfillJobWithHttpInfo(Job type, File _file, String checksum) throws ApiException { okhttp3.Call localVarCall = pOSTCreateDataBackfillJobValidateBeforeCall(type, _file, checksum, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call pOSTCreateDataBackfillJobAsync(Job type, File _file, String checksum, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = pOSTCreateDataBackfillJobValidateBeforeCall(type, _file, checksum, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class POSTCreateDataBackfillJobApi { private final Job type; private final File _file; private String checksum; private POSTCreateDataBackfillJobApi(Job type, File _file) { this.type = type; this._file = _file; } /** * Set checksum * @param checksum An MD5 checksum that is used to validate the integrity of the uploaded file. (optional) * @return POSTCreateDataBackfillJobApi */ public POSTCreateDataBackfillJobApi checksum(String checksum) { this.checksum = checksum; return this; } /** * Build call for pOSTCreateDataBackfillJob * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 upload response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return pOSTCreateDataBackfillJobCall(type, _file, checksum, _callback); } /** * Execute pOSTCreateDataBackfillJob request * @return POSTCreateDataBackfillJob200Response * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 upload response -
*/ public POSTCreateDataBackfillJob200Response execute() throws ApiException { ApiResponse localVarResp = pOSTCreateDataBackfillJobWithHttpInfo(type, _file, checksum); return localVarResp.getData(); } /** * Execute pOSTCreateDataBackfillJob request with HTTP info returned * @return ApiResponse<POSTCreateDataBackfillJob200Response> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 upload response -
*/ private ApiResponse executeWithHttpInfo() throws ApiException { return pOSTCreateDataBackfillJobWithHttpInfo(type, _file, checksum); } /** * Execute pOSTCreateDataBackfillJob request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 upload response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return pOSTCreateDataBackfillJobAsync(type, _file, checksum, _callback); } } /** * Create a new Data Backfil job * A Data Backfill type and file are required * @param type (required) * @param _file File containing data about the data you want to backfill. The file must be a `.csv` file or a zipped `.csv` file. The maximum file size is 4 MB. The data in the file must be formatted according to the Data Backfill type you want to perform. (required) * @return POSTCreateDataBackfillJobApi */ public POSTCreateDataBackfillJobApi pOSTCreateDataBackfillJobApi(Job type, File _file) { return new POSTCreateDataBackfillJobApi(type, _file); } private okhttp3.Call pUTStopDataBackfillJobByIdCall(String jobId, String zuoraOrgIds, PUTStopBookingDateBackfillJobByIdRequest puTStopBookingDateBackfillJobByIdRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = puTStopBookingDateBackfillJobByIdRequest; // create path and map variables String localVarPath = "/v1/uno/data-backfill/jobs/{jobId}" .replace("{" + "jobId" + "}", localVarApiClient.escapeString(jobId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (zuoraOrgIds != null) { localVarHeaderParams.put("Zuora-Org-Ids", localVarApiClient.parameterToString(zuoraOrgIds)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "bearerAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call pUTStopDataBackfillJobByIdValidateBeforeCall(String jobId, String zuoraOrgIds, PUTStopBookingDateBackfillJobByIdRequest puTStopBookingDateBackfillJobByIdRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'jobId' is set if (jobId == null) { throw new ApiException("Missing the required parameter 'jobId' when calling pUTStopDataBackfillJobById(Async)"); } return pUTStopDataBackfillJobByIdCall(jobId, zuoraOrgIds, puTStopBookingDateBackfillJobByIdRequest, _callback); } /** * Stop Data Backfill job by ID * Stop a single Data Backfill job * @param jobId ID of job to stop (required) * @param zuoraOrgIds Comma separated IDs. If you have Zuora Multi-Org enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header. The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. If the header is not set, the operation is performed in scope of the user's accessible orgs. (optional) * @param puTStopBookingDateBackfillJobByIdRequest (optional) * @return CommonResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Response of Stopping Data Backfill job by ID -
*/ protected CommonResponse pUTStopDataBackfillJobById(String jobId, String zuoraOrgIds, PUTStopBookingDateBackfillJobByIdRequest puTStopBookingDateBackfillJobByIdRequest) throws ApiException { ApiResponse localVarResp = pUTStopDataBackfillJobByIdWithHttpInfo(jobId, zuoraOrgIds, puTStopBookingDateBackfillJobByIdRequest); return localVarResp.getData(); } private ApiResponse pUTStopDataBackfillJobByIdWithHttpInfo(String jobId, String zuoraOrgIds, PUTStopBookingDateBackfillJobByIdRequest puTStopBookingDateBackfillJobByIdRequest) throws ApiException { okhttp3.Call localVarCall = pUTStopDataBackfillJobByIdValidateBeforeCall(jobId, zuoraOrgIds, puTStopBookingDateBackfillJobByIdRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call pUTStopDataBackfillJobByIdAsync(String jobId, String zuoraOrgIds, PUTStopBookingDateBackfillJobByIdRequest puTStopBookingDateBackfillJobByIdRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = pUTStopDataBackfillJobByIdValidateBeforeCall(jobId, zuoraOrgIds, puTStopBookingDateBackfillJobByIdRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class PUTStopDataBackfillJobByIdApi { private final String jobId; private String zuoraOrgIds; private PUTStopBookingDateBackfillJobByIdRequest puTStopBookingDateBackfillJobByIdRequest; private PUTStopDataBackfillJobByIdApi(String jobId) { this.jobId = jobId; } /** * Set zuoraOrgIds * @param zuoraOrgIds Comma separated IDs. If you have Zuora Multi-Org enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header. The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. If the header is not set, the operation is performed in scope of the user's accessible orgs. (optional) * @return PUTStopDataBackfillJobByIdApi */ public PUTStopDataBackfillJobByIdApi zuoraOrgIds(String zuoraOrgIds) { this.zuoraOrgIds = zuoraOrgIds; return this; } /** * Set puTStopBookingDateBackfillJobByIdRequest * @param puTStopBookingDateBackfillJobByIdRequest (optional) * @return PUTStopDataBackfillJobByIdApi */ public PUTStopDataBackfillJobByIdApi puTStopBookingDateBackfillJobByIdRequest(PUTStopBookingDateBackfillJobByIdRequest puTStopBookingDateBackfillJobByIdRequest) { this.puTStopBookingDateBackfillJobByIdRequest = puTStopBookingDateBackfillJobByIdRequest; return this; } /** * Build call for pUTStopDataBackfillJobById * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Response of Stopping Data Backfill job by ID -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return pUTStopDataBackfillJobByIdCall(jobId, zuoraOrgIds, puTStopBookingDateBackfillJobByIdRequest, _callback); } /** * Execute pUTStopDataBackfillJobById request * @return CommonResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Response of Stopping Data Backfill job by ID -
*/ public CommonResponse execute() throws ApiException { ApiResponse localVarResp = pUTStopDataBackfillJobByIdWithHttpInfo(jobId, zuoraOrgIds, puTStopBookingDateBackfillJobByIdRequest); return localVarResp.getData(); } /** * Execute pUTStopDataBackfillJobById request with HTTP info returned * @return ApiResponse<CommonResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Response of Stopping Data Backfill job by ID -
*/ private ApiResponse executeWithHttpInfo() throws ApiException { return pUTStopDataBackfillJobByIdWithHttpInfo(jobId, zuoraOrgIds, puTStopBookingDateBackfillJobByIdRequest); } /** * Execute pUTStopDataBackfillJobById request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Response of Stopping Data Backfill job by ID -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return pUTStopDataBackfillJobByIdAsync(jobId, zuoraOrgIds, puTStopBookingDateBackfillJobByIdRequest, _callback); } } /** * Stop Data Backfill job by ID * Stop a single Data Backfill job * @param jobId ID of job to stop (required) * @return PUTStopDataBackfillJobByIdApi */ public PUTStopDataBackfillJobByIdApi pUTStopDataBackfillJobByIdApi(String jobId) { return new PUTStopDataBackfillJobByIdApi(jobId); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy