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

org.openapitools.client.api.PaymentRunsApi Maven / Gradle / Ivy

There is a newer version: 3.2.1
Show newest version
/*
* Quickstart API Reference
* Zuora Quickstart API is the API that helps you achieve fundamental use cases.
* It provides a much simplified object model and improved performance, enabling developers to easily learn and use.
*/

package org.openapitools.client.api;

import org.openapitools.client.ApiCallback;
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.model.Headers;
import org.openapitools.client.model.ListQueryParams;
import org.openapitools.client.model.GetByIdQueryParams;
import org.openapitools.client.ApiResponse;
import org.openapitools.client.Configuration;
import org.openapitools.client.Pair;
import org.openapitools.client.ProgressRequestBody;
import org.openapitools.client.ProgressResponseBody;

import com.google.gson.reflect.TypeToken;
import java.io.IOException;


import java.math.BigDecimal;
import org.openapitools.client.model.ErrorResponse;
import org.openapitools.client.model.PaymentRun;
import org.openapitools.client.model.PaymentRunCreateRequest;
import org.openapitools.client.model.PaymentRunListResponse;
import org.openapitools.client.model.PaymentRunPatchRequest;

import org.openapitools.client.model.ErrorResponse;

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

    public class PaymentRunsApi {
    private ApiClient localVarApiClient;
    private int localHostIndex;
    private String localCustomBaseUrl;
    public PaymentRunsApi() {
    this(Configuration.getDefaultApiClient());
    }

    public PaymentRunsApi(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 createPaymentRunsCall(PaymentRunCreateRequest paymentRunCreateRequest, List fields, List paymentRunFields, List summaryFields, List expand, List filter, Integer pageSize, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, 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 = paymentRunCreateRequest;

        // create path and map variables
            String localVarPath = "/payment_runs";


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

                    if (fields != null) {
                localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "fields[]", fields));
                    }

                    if (paymentRunFields != null) {
                localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "payment_run.fields[]", paymentRunFields));
                    }

                    if (summaryFields != null) {
                localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "summary.fields[]", summaryFields));
                    }

                    if (expand != null) {
                localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand));
                    }

                    if (filter != null) {
                localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter));
                    }

                    if (pageSize != null) {
                localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_size", pageSize));
                    }

                    if (zuoraTrackId != null) {
                    localVarHeaderParams.put("zuora-track-id", localVarApiClient.parameterToString(zuoraTrackId));
                    }

                    if (async != null) {
                    localVarHeaderParams.put("async", localVarApiClient.parameterToString(async));
                    }

                    if (zuoraCacheEnabled != null) {
                    localVarHeaderParams.put("zuora-cache-enabled", localVarApiClient.parameterToString(zuoraCacheEnabled));
                    }

                    if (zuoraEntityIds != null) {
                    localVarHeaderParams.put("zuora-entity-ids", localVarApiClient.parameterToString(zuoraEntityIds));
                    }

                    if (idempotencyKey != null) {
                    localVarHeaderParams.put("idempotency-key", localVarApiClient.parameterToString(idempotencyKey));
                    }

                    if (acceptEncoding != null) {
                    localVarHeaderParams.put("accept-encoding", localVarApiClient.parameterToString(acceptEncoding));
                    }

                    if (contentEncoding != null) {
                    localVarHeaderParams.put("content-encoding", localVarApiClient.parameterToString(contentEncoding));
                    }

                    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, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
            }

            @SuppressWarnings("rawtypes")
            private okhttp3.Call createPaymentRunsValidateBeforeCall(PaymentRunCreateRequest paymentRunCreateRequest, List fields, List paymentRunFields, List summaryFields, List expand, List filter, Integer pageSize, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
                        // verify the required parameter 'paymentRunCreateRequest' is set
                        if (paymentRunCreateRequest == null) {
                        throw new ApiException("Missing the required parameter 'paymentRunCreateRequest' when calling createPaymentRuns(Async)");
                        }

                return createPaymentRunsCall(paymentRunCreateRequest, fields, paymentRunFields, summaryFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback);
            }

        private ApiResponse createPaymentRunsWithHttpInfo(PaymentRunCreateRequest paymentRunCreateRequest, List fields, List paymentRunFields, List summaryFields, List expand, List filter, Integer pageSize, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds) throws ApiException {
            okhttp3.Call localVarCall = createPaymentRunsValidateBeforeCall(paymentRunCreateRequest, fields, paymentRunFields, summaryFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, null);
                    try {
                    Type localVarReturnType = new TypeToken(){}.getType();
                    return localVarApiClient.execute(localVarCall, localVarReturnType);
                    } catch (ApiException e) {
                    e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType()));
                    throw e;
                    }
            }

        private okhttp3.Call createPaymentRunsAsync(PaymentRunCreateRequest paymentRunCreateRequest, List fields, List paymentRunFields, List summaryFields, List expand, List filter, Integer pageSize, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException {
            okhttp3.Call localVarCall = createPaymentRunsValidateBeforeCall(paymentRunCreateRequest, fields, paymentRunFields, summaryFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback);
        Type localVarReturnType = new TypeToken(){}.getType();
            localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
            return localVarCall;
            }

        public static class CreatePaymentRunsParams {
                    private final PaymentRunCreateRequest paymentRunCreateRequest;
            private Headers headers;
            /*
        * Check for list params
            */
                private GetByIdQueryParams getByIdQueryParams;
                    private List fields;
                    private List paymentRunFields;
                    private List summaryFields;
                    private List expand;
                    private List filter;
                    private Integer pageSize;
                    private String zuoraTrackId;
                    private Boolean async;
                    private Boolean zuoraCacheEnabled;
                    private String zuoraEntityIds;
                    private String idempotencyKey;
                    private String acceptEncoding;
                    private String contentEncoding;
                    private String zuoraOrgIds;
                public CreatePaymentRunsParams(PaymentRunCreateRequest paymentRunCreateRequest) {
                    this.paymentRunCreateRequest = paymentRunCreateRequest;
                }
                    /**
                    * Set getByIdQueryParams
                    * @param getByIdQueryParams GetByIdQueryParams
                    * @return CreatePaymentRunsParams
                    */
                    public CreatePaymentRunsParams getByIdQueryParams(GetByIdQueryParams getByIdQueryParams) {
                    this.getByIdQueryParams = getByIdQueryParams;
                        if (expand != null) {
                        this.expand = getByIdQueryParams.getExpand();
                        }
                        if (filter != null) {
                        this.filter = getByIdQueryParams.getFilter();
                        }
                        if (pageSize != null) {
                        this.pageSize = getByIdQueryParams.getPageSize();
                        }
                    return this;
                    }
            /**
            * Set headers
            * @param headers Headers
            * @return CreatePaymentRunsParams
            */
            public CreatePaymentRunsParams headers(Headers headers) {
            this.headers = headers;
                if (headers.getZuoraTrackId() != null) {
                this.zuoraTrackId = headers.getZuoraTrackId();
                }
                if (headers.getAsync() != null) {
                this.async = headers.getAsync();
                }
                if (headers.getZuoraCacheEnabled() != null) {
                this.zuoraCacheEnabled = headers.getZuoraCacheEnabled();
                }
                if (headers.getZuoraEntityIds() != null) {
                this.zuoraEntityIds = headers.getZuoraEntityIds();
                }
                if (headers.getIdempotencyKey() != null) {
                this.idempotencyKey = headers.getIdempotencyKey();
                }
                if (headers.getAcceptEncoding() != null) {
                this.acceptEncoding = headers.getAcceptEncoding();
                }
                if (headers.getContentEncoding() != null) {
                this.contentEncoding = headers.getContentEncoding();
                }
                if (headers.getZuoraOrgIds() != null) {
                this.zuoraOrgIds = headers.getZuoraOrgIds();
                }
            return this;
            }
                    /**
                    * Set fields
                    * @param fields Allows you to specify which fields are returned in the response.          <details>            <summary> Accepted values </summary>              `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `batch`, `bill_cycle_day`, `target_date`, `payment_run_number`, `state`, `apply_credit_memos`, `apply_unapplied_payments`, `bill_run_id`, `collect_payment`, `consolidate_payment`, `payment_run_date`, `payment_gateway_id`, `state_transitions`          </details> (optional)
                    * @return CreatePaymentRunsParams
                    */
                    public CreatePaymentRunsParams fields(List fields) {
                    this.fields = fields;
                    return this;
                    }
                    /**
                    * Set paymentRunFields
                    * @param paymentRunFields Allows you to specify which fields are returned in the response.          <details>            <summary> Accepted values </summary>              `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `batch`, `bill_cycle_day`, `target_date`, `payment_run_number`, `state`, `apply_credit_memos`, `apply_unapplied_payments`, `bill_run_id`, `collect_payment`, `consolidate_payment`, `payment_run_date`, `payment_gateway_id`, `state_transitions`          </details> (optional)
                    * @return CreatePaymentRunsParams
                    */
                    public CreatePaymentRunsParams paymentRunFields(List paymentRunFields) {
                    this.paymentRunFields = paymentRunFields;
                    return this;
                    }
                    /**
                    * Set summaryFields
                    * @param summaryFields Allows you to specify which fields are returned in the response.          <details>            <summary> Accepted values </summary>              `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `number_of_unprocessed_receivables`, `number_of_errors`, `number_of_invoices`, `number_of_payments`, `number_of_credit_memos`, `number_of_debit_memos`, `number_of_unprocessed_debit_memos`, `number_of_unapplied_payments`, `errors_total`, `invoices_total`, `payments_total`, `unprocessed_receivables_total`          </details> (optional)
                    * @return CreatePaymentRunsParams
                    */
                    public CreatePaymentRunsParams summaryFields(List summaryFields) {
                    this.summaryFields = summaryFields;
                    return this;
                    }
                    /**
                    * Set expand
                    * @param expand Allows you to expand responses by including related object information in a single call. See the [Expand responses](https://developer.zuora.com/quickstart-api/tutorial/expand-responses/) section of the Quickstart API Tutorials for detailed instructions. (optional)
                    * @return CreatePaymentRunsParams
                    */
                    public CreatePaymentRunsParams expand(List expand) {
                    this.expand = expand;
                    return this;
                    }
                    /**
                    * Set filter
                    * @param filter A case-sensitive filter on the list. See the [Filter lists](https://developer.zuora.com/quickstart-api/tutorial/filter-lists/) section of the Quickstart API Tutorial for detailed instructions.                         Note that the filters on this operation are only applicable to the related objects. For example, when you are calling the \"Retrieve a billing document\" operation, you can use the `filter[]` parameter on the related objects such as `filter[]=items[account_id].EQ:8ad09e208858b5cf0188595208151c63` (optional)
                    * @return CreatePaymentRunsParams
                    */
                    public CreatePaymentRunsParams filter(List filter) {
                    this.filter = filter;
                    return this;
                    }
                    /**
                    * Set pageSize
                    * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 99, Zuora will return a 400 error. (optional)
                    * @return CreatePaymentRunsParams
                    */
                    public CreatePaymentRunsParams pageSize(Integer pageSize) {
                    this.pageSize = pageSize;
                    return this;
                    }
                }

            /**
            * Create a payment run
            * Creates a payment run on a single account, or a batch of customer accounts.
                * @param paymentRunCreateRequest  (required)
            * @return PaymentRun
                * @http.response.details
                
Status Code Description Response Headers
201 Default Response * ratelimit-limit - The request limit quota for the time window closest to exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-remaining - The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-reset - The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* zuora-request-id - Zuora’s internal identifier for this request.
* zuora-track-id - A user-supplied identifier for this request. If you supply a `zuora-track-id` as a request header, Zuora returns the `zuora-track-id` as a response header.
400 Bad Request -
401 Unauthorized -
404 Not Found -
405 Method Not Allowed -
429 Too Many Requests -
500 Internal Server Error -
502 Bad Gateway -
503 Service Unavailable -
504 Gateway Timeout -
*/ public CreatePaymentRunsParams createPaymentRunsParams(PaymentRunCreateRequest paymentRunCreateRequest) { return new CreatePaymentRunsParams(paymentRunCreateRequest); } public PaymentRun createPaymentRuns(PaymentRunCreateRequest paymentRunCreateRequest) throws ApiException { CreatePaymentRunsParams params = new CreatePaymentRunsParams(paymentRunCreateRequest); return executeCreatePaymentRunsAPICall(params).getData(); } /** * Expose HTTP info public ApiResponse createPaymentRunsWithHttpInfo(PaymentRunCreateRequest paymentRunCreateRequest) throws ApiException { CreatePaymentRunsParams params = new CreatePaymentRunsParams(paymentRunCreateRequest); return executeCreatePaymentRunsAPICall(params); } **/ /** Legacy Query Params Requests **/ public PaymentRun createPaymentRuns( PaymentRunCreateRequest paymentRunCreateRequest , List expand) throws ApiException { CreatePaymentRunsParams params = new CreatePaymentRunsParams(paymentRunCreateRequest); params.expand(expand); return executeCreatePaymentRunsAPICall(params).getData(); } /* * add header methods */ public PaymentRun createPaymentRuns(PaymentRunCreateRequest paymentRunCreateRequest ,List expand,Headers headers) throws ApiException { CreatePaymentRunsParams params = new CreatePaymentRunsParams(paymentRunCreateRequest) .expand(expand) .headers(headers); return executeCreatePaymentRunsAPICall(params).getData(); } /** * Create a payment run * Creates a payment run on a single account, or a batch of customer accounts. * @param params CreatePaymentRunsParams * @return PaymentRun * @http.response.details
Status Code Description Response Headers
201 Default Response * ratelimit-limit - The request limit quota for the time window closest to exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-remaining - The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-reset - The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* zuora-request-id - Zuora’s internal identifier for this request.
* zuora-track-id - A user-supplied identifier for this request. If you supply a `zuora-track-id` as a request header, Zuora returns the `zuora-track-id` as a response header.
400 Bad Request -
401 Unauthorized -
404 Not Found -
405 Method Not Allowed -
429 Too Many Requests -
500 Internal Server Error -
502 Bad Gateway -
503 Service Unavailable -
504 Gateway Timeout -
*/ public PaymentRun create(CreatePaymentRunsParams params) throws ApiException { return executeCreatePaymentRunsAPICall(params).getData(); } public ApiResponse createWithHttpInfo(CreatePaymentRunsParams params) throws ApiException { return executeCreatePaymentRunsAPICall(params); } ApiResponse executeCreatePaymentRunsAPICall(CreatePaymentRunsParams params) throws ApiException { return createPaymentRunsWithHttpInfo(params.paymentRunCreateRequest, params.fields, params.paymentRunFields, params.summaryFields, params.expand, params.filter, params.pageSize, params.zuoraTrackId, params.async, params.zuoraCacheEnabled, params.zuoraEntityIds, params.idempotencyKey, params.acceptEncoding, params.contentEncoding, params.zuoraOrgIds); } private okhttp3.Call deletePaymentRunsCall(String paymentRunId, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, 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 = "/payment_runs/{payment_run_id}" .replace("{" + "payment_run_id" + "}", localVarApiClient.escapeString(paymentRunId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (zuoraTrackId != null) { localVarHeaderParams.put("zuora-track-id", localVarApiClient.parameterToString(zuoraTrackId)); } if (async != null) { localVarHeaderParams.put("async", localVarApiClient.parameterToString(async)); } if (zuoraCacheEnabled != null) { localVarHeaderParams.put("zuora-cache-enabled", localVarApiClient.parameterToString(zuoraCacheEnabled)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("zuora-entity-ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (idempotencyKey != null) { localVarHeaderParams.put("idempotency-key", localVarApiClient.parameterToString(idempotencyKey)); } if (acceptEncoding != null) { localVarHeaderParams.put("accept-encoding", localVarApiClient.parameterToString(acceptEncoding)); } if (contentEncoding != null) { localVarHeaderParams.put("content-encoding", localVarApiClient.parameterToString(contentEncoding)); } 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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deletePaymentRunsValidateBeforeCall(String paymentRunId, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { // verify the required parameter 'paymentRunId' is set if (paymentRunId == null) { throw new ApiException("Missing the required parameter 'paymentRunId' when calling deletePaymentRuns(Async)"); } return deletePaymentRunsCall(paymentRunId, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback); } private ApiResponse deletePaymentRunsWithHttpInfo(String paymentRunId, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds) throws ApiException { okhttp3.Call localVarCall = deletePaymentRunsValidateBeforeCall(paymentRunId, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, null); return localVarApiClient.execute(localVarCall); } private okhttp3.Call deletePaymentRunsAsync(String paymentRunId, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deletePaymentRunsValidateBeforeCall(paymentRunId, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } public static class DeletePaymentRunsParams { private final String paymentRunId; private Headers headers; /* * Check for list params */ private GetByIdQueryParams getByIdQueryParams; private String zuoraTrackId; private Boolean async; private Boolean zuoraCacheEnabled; private String zuoraEntityIds; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraOrgIds; public DeletePaymentRunsParams(String paymentRunId) { this.paymentRunId = paymentRunId; } /** * Set headers * @param headers Headers * @return DeletePaymentRunsParams */ public DeletePaymentRunsParams headers(Headers headers) { this.headers = headers; if (headers.getZuoraTrackId() != null) { this.zuoraTrackId = headers.getZuoraTrackId(); } if (headers.getAsync() != null) { this.async = headers.getAsync(); } if (headers.getZuoraCacheEnabled() != null) { this.zuoraCacheEnabled = headers.getZuoraCacheEnabled(); } if (headers.getZuoraEntityIds() != null) { this.zuoraEntityIds = headers.getZuoraEntityIds(); } if (headers.getIdempotencyKey() != null) { this.idempotencyKey = headers.getIdempotencyKey(); } if (headers.getAcceptEncoding() != null) { this.acceptEncoding = headers.getAcceptEncoding(); } if (headers.getContentEncoding() != null) { this.contentEncoding = headers.getContentEncoding(); } if (headers.getZuoraOrgIds() != null) { this.zuoraOrgIds = headers.getZuoraOrgIds(); } return this; } } /** * Delete a payment run * Deletes a payment run. Only the payment runs with the `canceled` or `pending` status can be deleted. * @param paymentRunId Identifier for the payment run, either `payment_run_number` or `payment_run_id` (required) * @return * @http.response.details
Status Code Description Response Headers
204 Default Response * ratelimit-limit - The request limit quota for the time window closest to exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-remaining - The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-reset - The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* zuora-request-id - Zuora’s internal identifier for this request.
* zuora-track-id - A user-supplied identifier for this request. If you supply a `zuora-track-id` as a request header, Zuora returns the `zuora-track-id` as a response header.
400 Bad Request -
401 Unauthorized -
404 Not Found -
405 Method Not Allowed -
429 Too Many Requests -
500 Internal Server Error -
502 Bad Gateway -
503 Service Unavailable -
504 Gateway Timeout -
*/ public DeletePaymentRunsParams deletePaymentRunsParams(String paymentRunId) { return new DeletePaymentRunsParams(paymentRunId); } public void deletePaymentRuns(String paymentRunId) throws ApiException { DeletePaymentRunsParams params = new DeletePaymentRunsParams(paymentRunId); executeDeletePaymentRunsAPICall(params); } /** * Expose HTTP info public ApiResponse deletePaymentRunsWithHttpInfo(String paymentRunId) throws ApiException { DeletePaymentRunsParams params = new DeletePaymentRunsParams(paymentRunId); return executeDeletePaymentRunsAPICall(params); } **/ /** Legacy Query Params Requests **/ /* * add header methods */ public void deletePaymentRuns(String paymentRunId ,Headers headers) throws ApiException { DeletePaymentRunsParams params = new DeletePaymentRunsParams(paymentRunId) .headers(headers); executeDeletePaymentRunsAPICall(params); } /** * Delete a payment run * Deletes a payment run. Only the payment runs with the `canceled` or `pending` status can be deleted. * @param params DeletePaymentRunsParams * @return * @http.response.details
Status Code Description Response Headers
204 Default Response * ratelimit-limit - The request limit quota for the time window closest to exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-remaining - The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-reset - The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* zuora-request-id - Zuora’s internal identifier for this request.
* zuora-track-id - A user-supplied identifier for this request. If you supply a `zuora-track-id` as a request header, Zuora returns the `zuora-track-id` as a response header.
400 Bad Request -
401 Unauthorized -
404 Not Found -
405 Method Not Allowed -
429 Too Many Requests -
500 Internal Server Error -
502 Bad Gateway -
503 Service Unavailable -
504 Gateway Timeout -
*/ public void delete(DeletePaymentRunsParams params) throws ApiException { executeDeletePaymentRunsAPICall(params).getData(); } public ApiResponse deleteWithHttpInfo(DeletePaymentRunsParams params) throws ApiException { return executeDeletePaymentRunsAPICall(params); } ApiResponse executeDeletePaymentRunsAPICall(DeletePaymentRunsParams params) throws ApiException { return deletePaymentRunsWithHttpInfo(params.paymentRunId, params.zuoraTrackId, params.async, params.zuoraCacheEnabled, params.zuoraEntityIds, params.idempotencyKey, params.acceptEncoding, params.contentEncoding, params.zuoraOrgIds); } private okhttp3.Call getPaymentRunCall(String paymentRunId, List fields, List paymentRunFields, List summaryFields, List expand, List filter, Integer pageSize, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, 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 = "/payment_runs/{payment_run_id}" .replace("{" + "payment_run_id" + "}", localVarApiClient.escapeString(paymentRunId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (fields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "fields[]", fields)); } if (paymentRunFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "payment_run.fields[]", paymentRunFields)); } if (summaryFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "summary.fields[]", summaryFields)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_size", pageSize)); } if (zuoraTrackId != null) { localVarHeaderParams.put("zuora-track-id", localVarApiClient.parameterToString(zuoraTrackId)); } if (async != null) { localVarHeaderParams.put("async", localVarApiClient.parameterToString(async)); } if (zuoraCacheEnabled != null) { localVarHeaderParams.put("zuora-cache-enabled", localVarApiClient.parameterToString(zuoraCacheEnabled)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("zuora-entity-ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (idempotencyKey != null) { localVarHeaderParams.put("idempotency-key", localVarApiClient.parameterToString(idempotencyKey)); } if (acceptEncoding != null) { localVarHeaderParams.put("accept-encoding", localVarApiClient.parameterToString(acceptEncoding)); } if (contentEncoding != null) { localVarHeaderParams.put("content-encoding", localVarApiClient.parameterToString(contentEncoding)); } 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 getPaymentRunValidateBeforeCall(String paymentRunId, List fields, List paymentRunFields, List summaryFields, List expand, List filter, Integer pageSize, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { // verify the required parameter 'paymentRunId' is set if (paymentRunId == null) { throw new ApiException("Missing the required parameter 'paymentRunId' when calling getPaymentRun(Async)"); } return getPaymentRunCall(paymentRunId, fields, paymentRunFields, summaryFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback); } private ApiResponse getPaymentRunWithHttpInfo(String paymentRunId, List fields, List paymentRunFields, List summaryFields, List expand, List filter, Integer pageSize, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds) throws ApiException { okhttp3.Call localVarCall = getPaymentRunValidateBeforeCall(paymentRunId, fields, paymentRunFields, summaryFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, null); try { Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } catch (ApiException e) { e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); throw e; } } private okhttp3.Call getPaymentRunAsync(String paymentRunId, List fields, List paymentRunFields, List summaryFields, List expand, List filter, Integer pageSize, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getPaymentRunValidateBeforeCall(paymentRunId, fields, paymentRunFields, summaryFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public static class GetPaymentRunParams { private final String paymentRunId; private Headers headers; /* * Check for list params */ private GetByIdQueryParams getByIdQueryParams; private List fields; private List paymentRunFields; private List summaryFields; private List expand; private List filter; private Integer pageSize; private String zuoraTrackId; private Boolean async; private Boolean zuoraCacheEnabled; private String zuoraEntityIds; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraOrgIds; public GetPaymentRunParams(String paymentRunId) { this.paymentRunId = paymentRunId; } /** * Set getByIdQueryParams * @param getByIdQueryParams GetByIdQueryParams * @return GetPaymentRunParams */ public GetPaymentRunParams getByIdQueryParams(GetByIdQueryParams getByIdQueryParams) { this.getByIdQueryParams = getByIdQueryParams; if (expand != null) { this.expand = getByIdQueryParams.getExpand(); } if (filter != null) { this.filter = getByIdQueryParams.getFilter(); } if (pageSize != null) { this.pageSize = getByIdQueryParams.getPageSize(); } return this; } /** * Set headers * @param headers Headers * @return GetPaymentRunParams */ public GetPaymentRunParams headers(Headers headers) { this.headers = headers; if (headers.getZuoraTrackId() != null) { this.zuoraTrackId = headers.getZuoraTrackId(); } if (headers.getAsync() != null) { this.async = headers.getAsync(); } if (headers.getZuoraCacheEnabled() != null) { this.zuoraCacheEnabled = headers.getZuoraCacheEnabled(); } if (headers.getZuoraEntityIds() != null) { this.zuoraEntityIds = headers.getZuoraEntityIds(); } if (headers.getIdempotencyKey() != null) { this.idempotencyKey = headers.getIdempotencyKey(); } if (headers.getAcceptEncoding() != null) { this.acceptEncoding = headers.getAcceptEncoding(); } if (headers.getContentEncoding() != null) { this.contentEncoding = headers.getContentEncoding(); } if (headers.getZuoraOrgIds() != null) { this.zuoraOrgIds = headers.getZuoraOrgIds(); } return this; } /** * Set fields * @param fields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `batch`, `bill_cycle_day`, `target_date`, `payment_run_number`, `state`, `apply_credit_memos`, `apply_unapplied_payments`, `bill_run_id`, `collect_payment`, `consolidate_payment`, `payment_run_date`, `payment_gateway_id`, `state_transitions` </details> (optional) * @return GetPaymentRunParams */ public GetPaymentRunParams fields(List fields) { this.fields = fields; return this; } /** * Set paymentRunFields * @param paymentRunFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `batch`, `bill_cycle_day`, `target_date`, `payment_run_number`, `state`, `apply_credit_memos`, `apply_unapplied_payments`, `bill_run_id`, `collect_payment`, `consolidate_payment`, `payment_run_date`, `payment_gateway_id`, `state_transitions` </details> (optional) * @return GetPaymentRunParams */ public GetPaymentRunParams paymentRunFields(List paymentRunFields) { this.paymentRunFields = paymentRunFields; return this; } /** * Set summaryFields * @param summaryFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `number_of_unprocessed_receivables`, `number_of_errors`, `number_of_invoices`, `number_of_payments`, `number_of_credit_memos`, `number_of_debit_memos`, `number_of_unprocessed_debit_memos`, `number_of_unapplied_payments`, `errors_total`, `invoices_total`, `payments_total`, `unprocessed_receivables_total` </details> (optional) * @return GetPaymentRunParams */ public GetPaymentRunParams summaryFields(List summaryFields) { this.summaryFields = summaryFields; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. See the [Expand responses](https://developer.zuora.com/quickstart-api/tutorial/expand-responses/) section of the Quickstart API Tutorials for detailed instructions. (optional) * @return GetPaymentRunParams */ public GetPaymentRunParams expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. See the [Filter lists](https://developer.zuora.com/quickstart-api/tutorial/filter-lists/) section of the Quickstart API Tutorial for detailed instructions. Note that the filters on this operation are only applicable to the related objects. For example, when you are calling the \"Retrieve a billing document\" operation, you can use the `filter[]` parameter on the related objects such as `filter[]=items[account_id].EQ:8ad09e208858b5cf0188595208151c63` (optional) * @return GetPaymentRunParams */ public GetPaymentRunParams filter(List filter) { this.filter = filter; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 99, Zuora will return a 400 error. (optional) * @return GetPaymentRunParams */ public GetPaymentRunParams pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } } /** * Retrieve a payment run * Retrieves the payment run information with the given ID. * @param paymentRunId Identifier for the payment run, either `payment_run_number` or `payment_run_id` (required) * @return PaymentRun * @http.response.details
Status Code Description Response Headers
200 Default Response * ratelimit-limit - The request limit quota for the time window closest to exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-remaining - The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-reset - The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* zuora-request-id - Zuora’s internal identifier for this request.
* zuora-track-id - A user-supplied identifier for this request. If you supply a `zuora-track-id` as a request header, Zuora returns the `zuora-track-id` as a response header.
400 Bad Request -
401 Unauthorized -
404 Not Found -
405 Method Not Allowed -
429 Too Many Requests -
500 Internal Server Error -
502 Bad Gateway -
503 Service Unavailable -
504 Gateway Timeout -
*/ public GetPaymentRunParams getPaymentRunParams(String paymentRunId) { return new GetPaymentRunParams(paymentRunId); } public PaymentRun getPaymentRun(String paymentRunId) throws ApiException { GetPaymentRunParams params = new GetPaymentRunParams(paymentRunId); return executeGetPaymentRunAPICall(params).getData(); } /** * Expose HTTP info public ApiResponse getPaymentRunWithHttpInfo(String paymentRunId) throws ApiException { GetPaymentRunParams params = new GetPaymentRunParams(paymentRunId); return executeGetPaymentRunAPICall(params); } **/ /** Legacy Query Params Requests **/ public PaymentRun getPaymentRun( String paymentRunId , List expand) throws ApiException { GetPaymentRunParams params = new GetPaymentRunParams(paymentRunId); params.expand(expand); return executeGetPaymentRunAPICall(params).getData(); } /* * add header methods */ public PaymentRun getPaymentRun(String paymentRunId ,List expand,Headers headers) throws ApiException { GetPaymentRunParams params = new GetPaymentRunParams(paymentRunId) .expand(expand) .headers(headers); return executeGetPaymentRunAPICall(params).getData(); } /** * Retrieve a payment run * Retrieves the payment run information with the given ID. * @param params GetPaymentRunParams * @return PaymentRun * @http.response.details
Status Code Description Response Headers
200 Default Response * ratelimit-limit - The request limit quota for the time window closest to exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-remaining - The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-reset - The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* zuora-request-id - Zuora’s internal identifier for this request.
* zuora-track-id - A user-supplied identifier for this request. If you supply a `zuora-track-id` as a request header, Zuora returns the `zuora-track-id` as a response header.
400 Bad Request -
401 Unauthorized -
404 Not Found -
405 Method Not Allowed -
429 Too Many Requests -
500 Internal Server Error -
502 Bad Gateway -
503 Service Unavailable -
504 Gateway Timeout -
*/ public PaymentRun get(GetPaymentRunParams params) throws ApiException { return executeGetPaymentRunAPICall(params).getData(); } public ApiResponse getWithHttpInfo(GetPaymentRunParams params) throws ApiException { return executeGetPaymentRunAPICall(params); } ApiResponse executeGetPaymentRunAPICall(GetPaymentRunParams params) throws ApiException { return getPaymentRunWithHttpInfo(params.paymentRunId, params.fields, params.paymentRunFields, params.summaryFields, params.expand, params.filter, params.pageSize, params.zuoraTrackId, params.async, params.zuoraCacheEnabled, params.zuoraEntityIds, params.idempotencyKey, params.acceptEncoding, params.contentEncoding, params.zuoraOrgIds); } private okhttp3.Call getPaymentRunsCall(String cursor, List expand, List filter, List sort, Integer pageSize, List fields, List paymentRunFields, List summaryFields, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, 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 = "/payment_runs"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (cursor != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("cursor", cursor)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } if (sort != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sort[]", sort)); } if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_size", pageSize)); } if (fields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "fields[]", fields)); } if (paymentRunFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "payment_run.fields[]", paymentRunFields)); } if (summaryFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "summary.fields[]", summaryFields)); } if (zuoraTrackId != null) { localVarHeaderParams.put("zuora-track-id", localVarApiClient.parameterToString(zuoraTrackId)); } if (async != null) { localVarHeaderParams.put("async", localVarApiClient.parameterToString(async)); } if (zuoraCacheEnabled != null) { localVarHeaderParams.put("zuora-cache-enabled", localVarApiClient.parameterToString(zuoraCacheEnabled)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("zuora-entity-ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (idempotencyKey != null) { localVarHeaderParams.put("idempotency-key", localVarApiClient.parameterToString(idempotencyKey)); } if (acceptEncoding != null) { localVarHeaderParams.put("accept-encoding", localVarApiClient.parameterToString(acceptEncoding)); } if (contentEncoding != null) { localVarHeaderParams.put("content-encoding", localVarApiClient.parameterToString(contentEncoding)); } 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 getPaymentRunsValidateBeforeCall(String cursor, List expand, List filter, List sort, Integer pageSize, List fields, List paymentRunFields, List summaryFields, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { return getPaymentRunsCall(cursor, expand, filter, sort, pageSize, fields, paymentRunFields, summaryFields, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback); } private ApiResponse getPaymentRunsWithHttpInfo(String cursor, List expand, List filter, List sort, Integer pageSize, List fields, List paymentRunFields, List summaryFields, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds) throws ApiException { okhttp3.Call localVarCall = getPaymentRunsValidateBeforeCall(cursor, expand, filter, sort, pageSize, fields, paymentRunFields, summaryFields, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, null); try { Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } catch (ApiException e) { e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); throw e; } } private okhttp3.Call getPaymentRunsAsync(String cursor, List expand, List filter, List sort, Integer pageSize, List fields, List paymentRunFields, List summaryFields, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getPaymentRunsValidateBeforeCall(cursor, expand, filter, sort, pageSize, fields, paymentRunFields, summaryFields, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public static class GetPaymentRunsParams { private Headers headers; /* * Check for list params */ private ListQueryParams listQueryParams; private String cursor; private List expand; private List filter; private List sort; private Integer pageSize; private List fields; private List paymentRunFields; private List summaryFields; private String zuoraTrackId; private Boolean async; private Boolean zuoraCacheEnabled; private String zuoraEntityIds; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraOrgIds; public GetPaymentRunsParams() { } /** * Set listQueryParams * @param listQueryParams ListQueryParams * @return GetPaymentRunsParams */ public GetPaymentRunsParams listQueryParams(ListQueryParams listQueryParams) { this.listQueryParams = listQueryParams; if (cursor != null) { this.cursor = listQueryParams.getCursor(); } if (expand != null) { this.expand = listQueryParams.getExpand(); } if (filter != null) { this.filter = listQueryParams.getFilter(); } if (sort != null) { this.sort = listQueryParams.getSort(); } if (pageSize != null) { this.pageSize = listQueryParams.getPageSize(); } return this; } /** * Set headers * @param headers Headers * @return GetPaymentRunsParams */ public GetPaymentRunsParams headers(Headers headers) { this.headers = headers; if (headers.getZuoraTrackId() != null) { this.zuoraTrackId = headers.getZuoraTrackId(); } if (headers.getAsync() != null) { this.async = headers.getAsync(); } if (headers.getZuoraCacheEnabled() != null) { this.zuoraCacheEnabled = headers.getZuoraCacheEnabled(); } if (headers.getZuoraEntityIds() != null) { this.zuoraEntityIds = headers.getZuoraEntityIds(); } if (headers.getIdempotencyKey() != null) { this.idempotencyKey = headers.getIdempotencyKey(); } if (headers.getAcceptEncoding() != null) { this.acceptEncoding = headers.getAcceptEncoding(); } if (headers.getContentEncoding() != null) { this.contentEncoding = headers.getContentEncoding(); } if (headers.getZuoraOrgIds() != null) { this.zuoraOrgIds = headers.getZuoraOrgIds(); } return this; } /** * Set cursor * @param cursor A cursor for use in pagination. A cursor defines the starting place in a list. For instance, if you make a list request and receive 100 objects, ending with `next_page=W3sib3JkZXJ=`, your subsequent call can include `cursor=W3sib3JkZXJ=` in order to fetch the next page of the list. (optional) * @return GetPaymentRunsParams */ public GetPaymentRunsParams cursor(String cursor) { this.cursor = cursor; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. See the [Expand responses](https://developer.zuora.com/quickstart-api/tutorial/expand-responses/) section of the Quickstart API Tutorials for detailed instructions. (optional) * @return GetPaymentRunsParams */ public GetPaymentRunsParams expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. See the [Filter lists](https://developer.zuora.com/quickstart-api/tutorial/filter-lists/) section of the Quickstart API Tutorials for detailed instructions. (optional) * @return GetPaymentRunsParams */ public GetPaymentRunsParams filter(List filter) { this.filter = filter; return this; } /** * Set sort * @param sort A case-sensitive query parameter that specifies the sort order of the list, which can be either ascending (e.g. `account_number.asc`) or descending (e.g. `account_number.desc`). You cannot sort on properties that are arrays. If the array-type properties are specified for the `sort[]` parameter, they are ignored. (optional) * @return GetPaymentRunsParams */ public GetPaymentRunsParams sort(List sort) { this.sort = sort; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 99, Zuora will return a 400 error. (optional) * @return GetPaymentRunsParams */ public GetPaymentRunsParams pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } /** * Set fields * @param fields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `batch`, `bill_cycle_day`, `target_date`, `payment_run_number`, `state`, `apply_credit_memos`, `apply_unapplied_payments`, `bill_run_id`, `collect_payment`, `consolidate_payment`, `payment_run_date`, `payment_gateway_id`, `state_transitions` </details> (optional) * @return GetPaymentRunsParams */ public GetPaymentRunsParams fields(List fields) { this.fields = fields; return this; } /** * Set paymentRunFields * @param paymentRunFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `batch`, `bill_cycle_day`, `target_date`, `payment_run_number`, `state`, `apply_credit_memos`, `apply_unapplied_payments`, `bill_run_id`, `collect_payment`, `consolidate_payment`, `payment_run_date`, `payment_gateway_id`, `state_transitions` </details> (optional) * @return GetPaymentRunsParams */ public GetPaymentRunsParams paymentRunFields(List paymentRunFields) { this.paymentRunFields = paymentRunFields; return this; } /** * Set summaryFields * @param summaryFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `number_of_unprocessed_receivables`, `number_of_errors`, `number_of_invoices`, `number_of_payments`, `number_of_credit_memos`, `number_of_debit_memos`, `number_of_unprocessed_debit_memos`, `number_of_unapplied_payments`, `errors_total`, `invoices_total`, `payments_total`, `unprocessed_receivables_total` </details> (optional) * @return GetPaymentRunsParams */ public GetPaymentRunsParams summaryFields(List summaryFields) { this.summaryFields = summaryFields; return this; } } /** * List payment runs * Returns an array of payment runs. Each entry in the array is a separate payment run object. If no more payment runs are available, the resulting array will be empty. This request should never return an error. * @return PaymentRunListResponse * @http.response.details
Status Code Description Response Headers
200 Default Response * ratelimit-limit - The request limit quota for the time window closest to exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-remaining - The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-reset - The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* zuora-request-id - Zuora’s internal identifier for this request.
* zuora-track-id - A user-supplied identifier for this request. If you supply a `zuora-track-id` as a request header, Zuora returns the `zuora-track-id` as a response header.
400 Bad Request -
401 Unauthorized -
404 Not Found -
405 Method Not Allowed -
429 Too Many Requests -
500 Internal Server Error -
502 Bad Gateway -
503 Service Unavailable -
504 Gateway Timeout -
*/ public GetPaymentRunsParams getPaymentRunsParams() { return new GetPaymentRunsParams(); } public PaymentRunListResponse getPaymentRuns() throws ApiException { GetPaymentRunsParams params = new GetPaymentRunsParams(); return executeGetPaymentRunsAPICall(params).getData(); } /** * Expose HTTP info public ApiResponse getPaymentRunsWithHttpInfo() throws ApiException { GetPaymentRunsParams params = new GetPaymentRunsParams(); return executeGetPaymentRunsAPICall(params); } **/ /** Legacy Query Params Requests **/ public PaymentRunListResponse getPaymentRuns(String cursor, List expand, List filter) throws ApiException { GetPaymentRunsParams params = new GetPaymentRunsParams(); params.cursor(cursor); params.expand(expand); params.filter(filter); return executeGetPaymentRunsAPICall(params).getData(); } /* * add header methods */ public PaymentRunListResponse getPaymentRuns(String cursor,List expand,List filter,Headers headers) throws ApiException { GetPaymentRunsParams params = new GetPaymentRunsParams() .cursor(cursor) .expand(expand) .filter(filter) .headers(headers); return executeGetPaymentRunsAPICall(params).getData(); } /** * List payment runs * Returns an array of payment runs. Each entry in the array is a separate payment run object. If no more payment runs are available, the resulting array will be empty. This request should never return an error. * @param params GetPaymentRunsParams * @return PaymentRunListResponse * @http.response.details
Status Code Description Response Headers
200 Default Response * ratelimit-limit - The request limit quota for the time window closest to exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-remaining - The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-reset - The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* zuora-request-id - Zuora’s internal identifier for this request.
* zuora-track-id - A user-supplied identifier for this request. If you supply a `zuora-track-id` as a request header, Zuora returns the `zuora-track-id` as a response header.
400 Bad Request -
401 Unauthorized -
404 Not Found -
405 Method Not Allowed -
429 Too Many Requests -
500 Internal Server Error -
502 Bad Gateway -
503 Service Unavailable -
504 Gateway Timeout -
*/ public PaymentRunListResponse list(GetPaymentRunsParams params) throws ApiException { return executeGetPaymentRunsAPICall(params).getData(); } public ApiResponse listWithHttpInfo(GetPaymentRunsParams params) throws ApiException { return executeGetPaymentRunsAPICall(params); } ApiResponse executeGetPaymentRunsAPICall(GetPaymentRunsParams params) throws ApiException { return getPaymentRunsWithHttpInfo(params.cursor, params.expand, params.filter, params.sort, params.pageSize, params.fields, params.paymentRunFields, params.summaryFields, params.zuoraTrackId, params.async, params.zuoraCacheEnabled, params.zuoraEntityIds, params.idempotencyKey, params.acceptEncoding, params.contentEncoding, params.zuoraOrgIds); } private okhttp3.Call updatePaymentRunsCall(String paymentRunId, PaymentRunPatchRequest paymentRunPatchRequest, List fields, List paymentRunFields, List summaryFields, List expand, List filter, Integer pageSize, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, 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 = paymentRunPatchRequest; // create path and map variables String localVarPath = "/payment_runs/{payment_run_id}" .replace("{" + "payment_run_id" + "}", localVarApiClient.escapeString(paymentRunId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (fields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "fields[]", fields)); } if (paymentRunFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "payment_run.fields[]", paymentRunFields)); } if (summaryFields != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "summary.fields[]", summaryFields)); } if (expand != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "expand[]", expand)); } if (filter != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filter[]", filter)); } if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_size", pageSize)); } if (zuoraTrackId != null) { localVarHeaderParams.put("zuora-track-id", localVarApiClient.parameterToString(zuoraTrackId)); } if (async != null) { localVarHeaderParams.put("async", localVarApiClient.parameterToString(async)); } if (zuoraCacheEnabled != null) { localVarHeaderParams.put("zuora-cache-enabled", localVarApiClient.parameterToString(zuoraCacheEnabled)); } if (zuoraEntityIds != null) { localVarHeaderParams.put("zuora-entity-ids", localVarApiClient.parameterToString(zuoraEntityIds)); } if (idempotencyKey != null) { localVarHeaderParams.put("idempotency-key", localVarApiClient.parameterToString(idempotencyKey)); } if (acceptEncoding != null) { localVarHeaderParams.put("accept-encoding", localVarApiClient.parameterToString(acceptEncoding)); } if (contentEncoding != null) { localVarHeaderParams.put("content-encoding", localVarApiClient.parameterToString(contentEncoding)); } 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, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updatePaymentRunsValidateBeforeCall(String paymentRunId, PaymentRunPatchRequest paymentRunPatchRequest, List fields, List paymentRunFields, List summaryFields, List expand, List filter, Integer pageSize, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { // verify the required parameter 'paymentRunId' is set if (paymentRunId == null) { throw new ApiException("Missing the required parameter 'paymentRunId' when calling updatePaymentRuns(Async)"); } // verify the required parameter 'paymentRunPatchRequest' is set if (paymentRunPatchRequest == null) { throw new ApiException("Missing the required parameter 'paymentRunPatchRequest' when calling updatePaymentRuns(Async)"); } return updatePaymentRunsCall(paymentRunId, paymentRunPatchRequest, fields, paymentRunFields, summaryFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback); } private ApiResponse updatePaymentRunsWithHttpInfo(String paymentRunId, PaymentRunPatchRequest paymentRunPatchRequest, List fields, List paymentRunFields, List summaryFields, List expand, List filter, Integer pageSize, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds) throws ApiException { okhttp3.Call localVarCall = updatePaymentRunsValidateBeforeCall(paymentRunId, paymentRunPatchRequest, fields, paymentRunFields, summaryFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, null); try { Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } catch (ApiException e) { e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken(){}.getType())); throw e; } } private okhttp3.Call updatePaymentRunsAsync(String paymentRunId, PaymentRunPatchRequest paymentRunPatchRequest, List fields, List paymentRunFields, List summaryFields, List expand, List filter, Integer pageSize, String zuoraTrackId, Boolean async, Boolean zuoraCacheEnabled, String zuoraEntityIds, String idempotencyKey, String acceptEncoding, String contentEncoding, String zuoraOrgIds, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updatePaymentRunsValidateBeforeCall(paymentRunId, paymentRunPatchRequest, fields, paymentRunFields, summaryFields, expand, filter, pageSize, zuoraTrackId, async, zuoraCacheEnabled, zuoraEntityIds, idempotencyKey, acceptEncoding, contentEncoding, zuoraOrgIds, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public static class UpdatePaymentRunsParams { private final String paymentRunId; private final PaymentRunPatchRequest paymentRunPatchRequest; private Headers headers; /* * Check for list params */ private GetByIdQueryParams getByIdQueryParams; private List fields; private List paymentRunFields; private List summaryFields; private List expand; private List filter; private Integer pageSize; private String zuoraTrackId; private Boolean async; private Boolean zuoraCacheEnabled; private String zuoraEntityIds; private String idempotencyKey; private String acceptEncoding; private String contentEncoding; private String zuoraOrgIds; public UpdatePaymentRunsParams(String paymentRunId, PaymentRunPatchRequest paymentRunPatchRequest) { this.paymentRunId = paymentRunId; this.paymentRunPatchRequest = paymentRunPatchRequest; } /** * Set getByIdQueryParams * @param getByIdQueryParams GetByIdQueryParams * @return UpdatePaymentRunsParams */ public UpdatePaymentRunsParams getByIdQueryParams(GetByIdQueryParams getByIdQueryParams) { this.getByIdQueryParams = getByIdQueryParams; if (expand != null) { this.expand = getByIdQueryParams.getExpand(); } if (filter != null) { this.filter = getByIdQueryParams.getFilter(); } if (pageSize != null) { this.pageSize = getByIdQueryParams.getPageSize(); } return this; } /** * Set headers * @param headers Headers * @return UpdatePaymentRunsParams */ public UpdatePaymentRunsParams headers(Headers headers) { this.headers = headers; if (headers.getZuoraTrackId() != null) { this.zuoraTrackId = headers.getZuoraTrackId(); } if (headers.getAsync() != null) { this.async = headers.getAsync(); } if (headers.getZuoraCacheEnabled() != null) { this.zuoraCacheEnabled = headers.getZuoraCacheEnabled(); } if (headers.getZuoraEntityIds() != null) { this.zuoraEntityIds = headers.getZuoraEntityIds(); } if (headers.getIdempotencyKey() != null) { this.idempotencyKey = headers.getIdempotencyKey(); } if (headers.getAcceptEncoding() != null) { this.acceptEncoding = headers.getAcceptEncoding(); } if (headers.getContentEncoding() != null) { this.contentEncoding = headers.getContentEncoding(); } if (headers.getZuoraOrgIds() != null) { this.zuoraOrgIds = headers.getZuoraOrgIds(); } return this; } /** * Set fields * @param fields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `batch`, `bill_cycle_day`, `target_date`, `payment_run_number`, `state`, `apply_credit_memos`, `apply_unapplied_payments`, `bill_run_id`, `collect_payment`, `consolidate_payment`, `payment_run_date`, `payment_gateway_id`, `state_transitions` </details> (optional) * @return UpdatePaymentRunsParams */ public UpdatePaymentRunsParams fields(List fields) { this.fields = fields; return this; } /** * Set paymentRunFields * @param paymentRunFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `batch`, `bill_cycle_day`, `target_date`, `payment_run_number`, `state`, `apply_credit_memos`, `apply_unapplied_payments`, `bill_run_id`, `collect_payment`, `consolidate_payment`, `payment_run_date`, `payment_gateway_id`, `state_transitions` </details> (optional) * @return UpdatePaymentRunsParams */ public UpdatePaymentRunsParams paymentRunFields(List paymentRunFields) { this.paymentRunFields = paymentRunFields; return this; } /** * Set summaryFields * @param summaryFields Allows you to specify which fields are returned in the response. <details> <summary> Accepted values </summary> `custom_fields`, `created_by_id`, `updated_by_id`, `created_time`, `id`, `updated_time`, `number_of_unprocessed_receivables`, `number_of_errors`, `number_of_invoices`, `number_of_payments`, `number_of_credit_memos`, `number_of_debit_memos`, `number_of_unprocessed_debit_memos`, `number_of_unapplied_payments`, `errors_total`, `invoices_total`, `payments_total`, `unprocessed_receivables_total` </details> (optional) * @return UpdatePaymentRunsParams */ public UpdatePaymentRunsParams summaryFields(List summaryFields) { this.summaryFields = summaryFields; return this; } /** * Set expand * @param expand Allows you to expand responses by including related object information in a single call. See the [Expand responses](https://developer.zuora.com/quickstart-api/tutorial/expand-responses/) section of the Quickstart API Tutorials for detailed instructions. (optional) * @return UpdatePaymentRunsParams */ public UpdatePaymentRunsParams expand(List expand) { this.expand = expand; return this; } /** * Set filter * @param filter A case-sensitive filter on the list. See the [Filter lists](https://developer.zuora.com/quickstart-api/tutorial/filter-lists/) section of the Quickstart API Tutorial for detailed instructions. Note that the filters on this operation are only applicable to the related objects. For example, when you are calling the \"Retrieve a billing document\" operation, you can use the `filter[]` parameter on the related objects such as `filter[]=items[account_id].EQ:8ad09e208858b5cf0188595208151c63` (optional) * @return UpdatePaymentRunsParams */ public UpdatePaymentRunsParams filter(List filter) { this.filter = filter; return this; } /** * Set pageSize * @param pageSize The maximum number of results to return in a single page. If the specified `page_size` is less than 1 or greater than 99, Zuora will return a 400 error. (optional) * @return UpdatePaymentRunsParams */ public UpdatePaymentRunsParams pageSize(Integer pageSize) { this.pageSize = pageSize; return this; } } /** * Update a payment run * Updates a payment run by setting the values of the specified fields. Any fields not provided in the request remain unchanged. * @param paymentRunId Identifier for the payment run, either `payment_run_number` or `payment_run_id` (required) * @param paymentRunPatchRequest (required) * @return PaymentRun * @http.response.details
Status Code Description Response Headers
200 Default Response * ratelimit-limit - The request limit quota for the time window closest to exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-remaining - The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-reset - The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* zuora-request-id - Zuora’s internal identifier for this request.
* zuora-track-id - A user-supplied identifier for this request. If you supply a `zuora-track-id` as a request header, Zuora returns the `zuora-track-id` as a response header.
400 Bad Request -
401 Unauthorized -
404 Not Found -
405 Method Not Allowed -
429 Too Many Requests -
500 Internal Server Error -
502 Bad Gateway -
503 Service Unavailable -
504 Gateway Timeout -
*/ public UpdatePaymentRunsParams updatePaymentRunsParams(String paymentRunId, PaymentRunPatchRequest paymentRunPatchRequest) { return new UpdatePaymentRunsParams(paymentRunId, paymentRunPatchRequest); } public PaymentRun updatePaymentRuns(String paymentRunId, PaymentRunPatchRequest paymentRunPatchRequest) throws ApiException { UpdatePaymentRunsParams params = new UpdatePaymentRunsParams(paymentRunId, paymentRunPatchRequest); return executeUpdatePaymentRunsAPICall(params).getData(); } /** * Expose HTTP info public ApiResponse updatePaymentRunsWithHttpInfo(String paymentRunId, PaymentRunPatchRequest paymentRunPatchRequest) throws ApiException { UpdatePaymentRunsParams params = new UpdatePaymentRunsParams(paymentRunId, paymentRunPatchRequest); return executeUpdatePaymentRunsAPICall(params); } **/ /** Legacy Query Params Requests **/ public PaymentRun updatePaymentRuns( String paymentRunId , PaymentRunPatchRequest paymentRunPatchRequest , List expand) throws ApiException { UpdatePaymentRunsParams params = new UpdatePaymentRunsParams(paymentRunId, paymentRunPatchRequest); params.expand(expand); return executeUpdatePaymentRunsAPICall(params).getData(); } /* * add header methods */ public PaymentRun updatePaymentRuns(String paymentRunId , PaymentRunPatchRequest paymentRunPatchRequest ,List expand,Headers headers) throws ApiException { UpdatePaymentRunsParams params = new UpdatePaymentRunsParams(paymentRunId, paymentRunPatchRequest) .expand(expand) .headers(headers); return executeUpdatePaymentRunsAPICall(params).getData(); } /** * Update a payment run * Updates a payment run by setting the values of the specified fields. Any fields not provided in the request remain unchanged. * @param params UpdatePaymentRunsParams * @return PaymentRun * @http.response.details
Status Code Description Response Headers
200 Default Response * ratelimit-limit - The request limit quota for the time window closest to exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-remaining - The number of requests remaining in the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* ratelimit-reset - The number of seconds until the quota resets for the time window closest to quota exhaustion. See [rate limits](https://developer.zuora.com/rest-api/general-concepts/rate-concurrency-limits/#rate-limits) for more information.
* zuora-request-id - Zuora’s internal identifier for this request.
* zuora-track-id - A user-supplied identifier for this request. If you supply a `zuora-track-id` as a request header, Zuora returns the `zuora-track-id` as a response header.
400 Bad Request -
401 Unauthorized -
404 Not Found -
405 Method Not Allowed -
429 Too Many Requests -
500 Internal Server Error -
502 Bad Gateway -
503 Service Unavailable -
504 Gateway Timeout -
*/ public PaymentRun update(UpdatePaymentRunsParams params) throws ApiException { return executeUpdatePaymentRunsAPICall(params).getData(); } public ApiResponse updateWithHttpInfo(UpdatePaymentRunsParams params) throws ApiException { return executeUpdatePaymentRunsAPICall(params); } ApiResponse executeUpdatePaymentRunsAPICall(UpdatePaymentRunsParams params) throws ApiException { return updatePaymentRunsWithHttpInfo(params.paymentRunId, params.paymentRunPatchRequest, params.fields, params.paymentRunFields, params.summaryFields, params.expand, params.filter, params.pageSize, params.zuoraTrackId, params.async, params.zuoraCacheEnabled, params.zuoraEntityIds, params.idempotencyKey, params.acceptEncoding, params.contentEncoding, params.zuoraOrgIds); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy